2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / configure
blob5ca63be3e8aee995ec22cc0e51d151bc33017d1a
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 --with-win32-nlsapi=ansi, unicows or unicode
49 native MinGW libgcj Win32 OS API [ansi]"
50 ac_help="$ac_help
51 --enable-libgcj-debug enable runtime debugging code"
52 ac_help="$ac_help
53 --enable-interpreter enable interpreter"
54 ac_help="$ac_help
55 --enable-sjlj-exceptions force use of builtin_setjmp for exceptions"
56 ac_help="$ac_help
57 --disable-java-net disable java.net"
58 ac_help="$ac_help
59 --without-libffi don't use libffi"
60 ac_help="$ac_help
61 --disable-jvmpi disable JVMPI support"
62 ac_help="$ac_help
63 --with-ecos enable runtime eCos target support"
64 ac_help="$ac_help
65 --with-system-zlib use installed libz"
66 ac_help="$ac_help
67 --with-x use the X Window System"
68 ac_help="$ac_help
69 --enable-java-awt list of AWT peer implementations to be built"
70 ac_help="$ac_help
71 --enable-java-gc=TYPE choose garbage collector [boehm]"
72 ac_help="$ac_help
73 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
74 ac_help="$ac_help
75 --disable-gtktest do not try to compile and run a test GTK+ program"
76 ac_help="$ac_help
77 --disable-glibtest do not try to compile and run a test GLIB program"
78 ac_help="$ac_help
79 --with-libart-prefix=PFX Prefix where LIBART is installed (optional)"
80 ac_help="$ac_help
81 --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)"
82 ac_help="$ac_help
83 --disable-libarttest Do not try to compile and run a test LIBART program"
85 # Initialize some variables set by options.
86 # The variables have the same names as the options, with
87 # dashes changed to underlines.
88 build=NONE
89 cache_file=./config.cache
90 exec_prefix=NONE
91 host=NONE
92 no_create=
93 nonopt=NONE
94 no_recursion=
95 prefix=NONE
96 program_prefix=NONE
97 program_suffix=NONE
98 program_transform_name=s,x,x,
99 silent=
100 site=
101 srcdir=
102 target=NONE
103 verbose=
104 x_includes=NONE
105 x_libraries=NONE
106 bindir='${exec_prefix}/bin'
107 sbindir='${exec_prefix}/sbin'
108 libexecdir='${exec_prefix}/libexec'
109 datadir='${prefix}/share'
110 sysconfdir='${prefix}/etc'
111 sharedstatedir='${prefix}/com'
112 localstatedir='${prefix}/var'
113 libdir='${exec_prefix}/lib'
114 includedir='${prefix}/include'
115 oldincludedir='/usr/include'
116 infodir='${prefix}/info'
117 mandir='${prefix}/man'
119 # Initialize some other variables.
120 subdirs=
121 MFLAGS= MAKEFLAGS=
122 SHELL=${CONFIG_SHELL-/bin/sh}
123 # Maximum number of lines to put in a shell here document.
124 ac_max_here_lines=12
126 ac_prev=
127 for ac_option
130 # If the previous option needs an argument, assign it.
131 if test -n "$ac_prev"; then
132 eval "$ac_prev=\$ac_option"
133 ac_prev=
134 continue
137 case "$ac_option" in
138 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
139 *) ac_optarg= ;;
140 esac
142 # Accept the important Cygnus configure options, so we can diagnose typos.
144 case "$ac_option" in
146 -bindir | --bindir | --bindi | --bind | --bin | --bi)
147 ac_prev=bindir ;;
148 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
149 bindir="$ac_optarg" ;;
151 -build | --build | --buil | --bui | --bu)
152 ac_prev=build ;;
153 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
154 build="$ac_optarg" ;;
156 -cache-file | --cache-file | --cache-fil | --cache-fi \
157 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
158 ac_prev=cache_file ;;
159 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
160 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
161 cache_file="$ac_optarg" ;;
163 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
164 ac_prev=datadir ;;
165 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
166 | --da=*)
167 datadir="$ac_optarg" ;;
169 -disable-* | --disable-*)
170 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
171 # Reject names that are not valid shell variable names.
172 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
173 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
175 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
176 eval "enable_${ac_feature}=no" ;;
178 -enable-* | --enable-*)
179 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
180 # Reject names that are not valid shell variable names.
181 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
182 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
184 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
185 case "$ac_option" in
186 *=*) ;;
187 *) ac_optarg=yes ;;
188 esac
189 eval "enable_${ac_feature}='$ac_optarg'" ;;
191 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
192 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
193 | --exec | --exe | --ex)
194 ac_prev=exec_prefix ;;
195 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
196 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
197 | --exec=* | --exe=* | --ex=*)
198 exec_prefix="$ac_optarg" ;;
200 -gas | --gas | --ga | --g)
201 # Obsolete; use --with-gas.
202 with_gas=yes ;;
204 -help | --help | --hel | --he)
205 # Omit some internal or obsolete options to make the list less imposing.
206 # This message is too long to be a string in the A/UX 3.1 sh.
207 cat << EOF
208 Usage: configure [options] [host]
209 Options: [defaults in brackets after descriptions]
210 Configuration:
211 --cache-file=FILE cache test results in FILE
212 --help print this message
213 --no-create do not create output files
214 --quiet, --silent do not print \`checking...' messages
215 --version print the version of autoconf that created configure
216 Directory and file names:
217 --prefix=PREFIX install architecture-independent files in PREFIX
218 [$ac_default_prefix]
219 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
220 [same as prefix]
221 --bindir=DIR user executables in DIR [EPREFIX/bin]
222 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
223 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
224 --datadir=DIR read-only architecture-independent data in DIR
225 [PREFIX/share]
226 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
227 --sharedstatedir=DIR modifiable architecture-independent data in DIR
228 [PREFIX/com]
229 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
230 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
231 --includedir=DIR C header files in DIR [PREFIX/include]
232 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
233 --infodir=DIR info documentation in DIR [PREFIX/info]
234 --mandir=DIR man documentation in DIR [PREFIX/man]
235 --srcdir=DIR find the sources in DIR [configure dir or ..]
236 --program-prefix=PREFIX prepend PREFIX to installed program names
237 --program-suffix=SUFFIX append SUFFIX to installed program names
238 --program-transform-name=PROGRAM
239 run sed PROGRAM on installed program names
241 cat << EOF
242 Host type:
243 --build=BUILD configure for building on BUILD [BUILD=HOST]
244 --host=HOST configure for HOST [guessed]
245 --target=TARGET configure for TARGET [TARGET=HOST]
246 Features and packages:
247 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
248 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
249 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
250 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
251 --x-includes=DIR X include files are in DIR
252 --x-libraries=DIR X library files are in DIR
254 if test -n "$ac_help"; then
255 echo "--enable and --with options recognized:$ac_help"
257 exit 0 ;;
259 -host | --host | --hos | --ho)
260 ac_prev=host ;;
261 -host=* | --host=* | --hos=* | --ho=*)
262 host="$ac_optarg" ;;
264 -includedir | --includedir | --includedi | --included | --include \
265 | --includ | --inclu | --incl | --inc)
266 ac_prev=includedir ;;
267 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
268 | --includ=* | --inclu=* | --incl=* | --inc=*)
269 includedir="$ac_optarg" ;;
271 -infodir | --infodir | --infodi | --infod | --info | --inf)
272 ac_prev=infodir ;;
273 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
274 infodir="$ac_optarg" ;;
276 -libdir | --libdir | --libdi | --libd)
277 ac_prev=libdir ;;
278 -libdir=* | --libdir=* | --libdi=* | --libd=*)
279 libdir="$ac_optarg" ;;
281 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
282 | --libexe | --libex | --libe)
283 ac_prev=libexecdir ;;
284 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
285 | --libexe=* | --libex=* | --libe=*)
286 libexecdir="$ac_optarg" ;;
288 -localstatedir | --localstatedir | --localstatedi | --localstated \
289 | --localstate | --localstat | --localsta | --localst \
290 | --locals | --local | --loca | --loc | --lo)
291 ac_prev=localstatedir ;;
292 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
293 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
294 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
295 localstatedir="$ac_optarg" ;;
297 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
298 ac_prev=mandir ;;
299 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
300 mandir="$ac_optarg" ;;
302 -nfp | --nfp | --nf)
303 # Obsolete; use --without-fp.
304 with_fp=no ;;
306 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
307 | --no-cr | --no-c)
308 no_create=yes ;;
310 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
311 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
312 no_recursion=yes ;;
314 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
315 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
316 | --oldin | --oldi | --old | --ol | --o)
317 ac_prev=oldincludedir ;;
318 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
319 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
320 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
321 oldincludedir="$ac_optarg" ;;
323 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
324 ac_prev=prefix ;;
325 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
326 prefix="$ac_optarg" ;;
328 -program-prefix | --program-prefix | --program-prefi | --program-pref \
329 | --program-pre | --program-pr | --program-p)
330 ac_prev=program_prefix ;;
331 -program-prefix=* | --program-prefix=* | --program-prefi=* \
332 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
333 program_prefix="$ac_optarg" ;;
335 -program-suffix | --program-suffix | --program-suffi | --program-suff \
336 | --program-suf | --program-su | --program-s)
337 ac_prev=program_suffix ;;
338 -program-suffix=* | --program-suffix=* | --program-suffi=* \
339 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
340 program_suffix="$ac_optarg" ;;
342 -program-transform-name | --program-transform-name \
343 | --program-transform-nam | --program-transform-na \
344 | --program-transform-n | --program-transform- \
345 | --program-transform | --program-transfor \
346 | --program-transfo | --program-transf \
347 | --program-trans | --program-tran \
348 | --progr-tra | --program-tr | --program-t)
349 ac_prev=program_transform_name ;;
350 -program-transform-name=* | --program-transform-name=* \
351 | --program-transform-nam=* | --program-transform-na=* \
352 | --program-transform-n=* | --program-transform-=* \
353 | --program-transform=* | --program-transfor=* \
354 | --program-transfo=* | --program-transf=* \
355 | --program-trans=* | --program-tran=* \
356 | --progr-tra=* | --program-tr=* | --program-t=*)
357 program_transform_name="$ac_optarg" ;;
359 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
360 | -silent | --silent | --silen | --sile | --sil)
361 silent=yes ;;
363 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
364 ac_prev=sbindir ;;
365 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
366 | --sbi=* | --sb=*)
367 sbindir="$ac_optarg" ;;
369 -sharedstatedir | --sharedstatedir | --sharedstatedi \
370 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
371 | --sharedst | --shareds | --shared | --share | --shar \
372 | --sha | --sh)
373 ac_prev=sharedstatedir ;;
374 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
375 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
376 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
377 | --sha=* | --sh=*)
378 sharedstatedir="$ac_optarg" ;;
380 -site | --site | --sit)
381 ac_prev=site ;;
382 -site=* | --site=* | --sit=*)
383 site="$ac_optarg" ;;
385 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
386 ac_prev=srcdir ;;
387 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
388 srcdir="$ac_optarg" ;;
390 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
391 | --syscon | --sysco | --sysc | --sys | --sy)
392 ac_prev=sysconfdir ;;
393 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
394 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
395 sysconfdir="$ac_optarg" ;;
397 -target | --target | --targe | --targ | --tar | --ta | --t)
398 ac_prev=target ;;
399 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
400 target="$ac_optarg" ;;
402 -v | -verbose | --verbose | --verbos | --verbo | --verb)
403 verbose=yes ;;
405 -version | --version | --versio | --versi | --vers)
406 echo "configure generated by autoconf version 2.13"
407 exit 0 ;;
409 -with-* | --with-*)
410 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
411 # Reject names that are not valid shell variable names.
412 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
413 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 ac_package=`echo $ac_package| sed 's/-/_/g'`
416 case "$ac_option" in
417 *=*) ;;
418 *) ac_optarg=yes ;;
419 esac
420 eval "with_${ac_package}='$ac_optarg'" ;;
422 -without-* | --without-*)
423 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
424 # Reject names that are not valid shell variable names.
425 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
426 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
428 ac_package=`echo $ac_package| sed 's/-/_/g'`
429 eval "with_${ac_package}=no" ;;
431 --x)
432 # Obsolete; use --with-x.
433 with_x=yes ;;
435 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
436 | --x-incl | --x-inc | --x-in | --x-i)
437 ac_prev=x_includes ;;
438 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
439 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
440 x_includes="$ac_optarg" ;;
442 -x-libraries | --x-libraries | --x-librarie | --x-librari \
443 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
444 ac_prev=x_libraries ;;
445 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
446 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
447 x_libraries="$ac_optarg" ;;
449 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
453 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
454 echo "configure: warning: $ac_option: invalid host type" 1>&2
456 if test "x$nonopt" != xNONE; then
457 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
459 nonopt="$ac_option"
462 esac
463 done
465 if test -n "$ac_prev"; then
466 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
469 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
471 # File descriptor usage:
472 # 0 standard input
473 # 1 file creation
474 # 2 errors and warnings
475 # 3 some systems may open it to /dev/tty
476 # 4 used on the Kubota Titan
477 # 6 checking for... messages and results
478 # 5 compiler messages saved in config.log
479 if test "$silent" = yes; then
480 exec 6>/dev/null
481 else
482 exec 6>&1
484 exec 5>./config.log
486 echo "\
487 This file contains any messages produced by compilers while
488 running configure, to aid debugging if configure makes a mistake.
489 " 1>&5
491 # Strip out --no-create and --no-recursion so they do not pile up.
492 # Also quote any args containing shell metacharacters.
493 ac_configure_args=
494 for ac_arg
496 case "$ac_arg" in
497 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
498 | --no-cr | --no-c) ;;
499 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
500 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
501 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
502 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
504 esac
505 done
507 # NLS nuisances.
508 # Only set these to C if already set. These must not be set unconditionally
509 # because not all systems understand e.g. LANG=C (notably SCO).
510 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
511 # Non-C LC_CTYPE values break the ctype check.
512 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
513 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
514 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
515 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
517 # confdefs.h avoids OS command line length limits that DEFS can exceed.
518 rm -rf conftest* confdefs.h
519 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
520 echo > confdefs.h
522 # A filename unique to this package, relative to the directory that
523 # configure is in, which we can look for to find out if srcdir is correct.
524 ac_unique_file=java/lang/System.java
526 # Find the source files, if location was not specified.
527 if test -z "$srcdir"; then
528 ac_srcdir_defaulted=yes
529 # Try the directory containing this script, then its parent.
530 ac_prog=$0
531 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
532 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
533 srcdir=$ac_confdir
534 if test ! -r $srcdir/$ac_unique_file; then
535 srcdir=..
537 else
538 ac_srcdir_defaulted=no
540 if test ! -r $srcdir/$ac_unique_file; then
541 if test "$ac_srcdir_defaulted" = yes; then
542 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
543 else
544 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
547 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
549 # Prefer explicitly selected file to automatically selected ones.
550 if test -z "$CONFIG_SITE"; then
551 if test "x$prefix" != xNONE; then
552 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
553 else
554 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
557 for ac_site_file in $CONFIG_SITE; do
558 if test -r "$ac_site_file"; then
559 echo "loading site script $ac_site_file"
560 . "$ac_site_file"
562 done
564 if test -r "$cache_file"; then
565 echo "loading cache $cache_file"
566 . $cache_file
567 else
568 echo "creating cache $cache_file"
569 > $cache_file
572 ac_ext=c
573 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
574 ac_cpp='$CPP $CPPFLAGS'
575 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
576 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
577 cross_compiling=$ac_cv_prog_cc_cross
579 ac_exeext=
580 ac_objext=o
581 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
582 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
583 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
584 ac_n= ac_c='
585 ' ac_t=' '
586 else
587 ac_n=-n ac_c= ac_t=
589 else
590 ac_n= ac_c='\c' ac_t=
595 # This works around the fact that libtool configuration may change LD
596 # for this particular configuration, but some shells, instead of
597 # keeping the changes in LD private, export them just because LD is
598 # exported.
599 ORIGINAL_LD_FOR_MULTILIBS=$LD
601 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
602 echo "configure:603: checking whether ln -s works" >&5
603 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
604 echo $ac_n "(cached) $ac_c" 1>&6
605 else
606 rm -f conftestdata
607 if ln -s X conftestdata 2>/dev/null
608 then
609 rm -f conftestdata
610 ac_cv_prog_LN_S="ln -s"
611 else
612 ac_cv_prog_LN_S=ln
615 LN_S="$ac_cv_prog_LN_S"
616 if test "$ac_cv_prog_LN_S" = "ln -s"; then
617 echo "$ac_t""yes" 1>&6
618 else
619 echo "$ac_t""no" 1>&6
623 # Check whether --with-target-subdir or --without-target-subdir was given.
624 if test "${with_target_subdir+set}" = set; then
625 withval="$with_target_subdir"
629 # Check whether --with-cross-host or --without-cross-host was given.
630 if test "${with_cross_host+set}" = set; then
631 withval="$with_cross_host"
636 # Check whether --with-newlib or --without-newlib was given.
637 if test "${with_newlib+set}" = set; then
638 withval="$with_newlib"
643 # Find a good install program. We prefer a C program (faster),
644 # so one script is as good as another. But avoid the broken or
645 # incompatible versions:
646 # SysV /etc/install, /usr/sbin/install
647 # SunOS /usr/etc/install
648 # IRIX /sbin/install
649 # AIX /bin/install
650 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
651 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
652 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
653 # ./install, which can be erroneously created by make from ./install.sh.
654 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
655 echo "configure:656: checking for a BSD compatible install" >&5
656 if test -z "$INSTALL"; then
657 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
658 echo $ac_n "(cached) $ac_c" 1>&6
659 else
660 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
661 for ac_dir in $PATH; do
662 # Account for people who put trailing slashes in PATH elements.
663 case "$ac_dir/" in
664 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
666 # OSF1 and SCO ODT 3.0 have their own names for install.
667 # Don't use installbsd from OSF since it installs stuff as root
668 # by default.
669 for ac_prog in ginstall scoinst install; do
670 if test -f $ac_dir/$ac_prog; then
671 if test $ac_prog = install &&
672 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
673 # AIX install. It has an incompatible calling convention.
675 else
676 ac_cv_path_install="$ac_dir/$ac_prog -c"
677 break 2
680 done
682 esac
683 done
684 IFS="$ac_save_IFS"
687 if test "${ac_cv_path_install+set}" = set; then
688 INSTALL="$ac_cv_path_install"
689 else
690 # As a last resort, use the slow shell script. We don't cache a
691 # path for INSTALL within a source directory, because that will
692 # break other packages using the cache if that directory is
693 # removed, or if the path is relative.
694 INSTALL="$ac_install_sh"
697 echo "$ac_t""$INSTALL" 1>&6
699 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
700 # It thinks the first close brace ends the variable substitution.
701 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
703 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
705 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
707 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
708 echo "configure:709: checking whether build environment is sane" >&5
709 # Just in case
710 sleep 1
711 echo timestamp > conftestfile
712 # Do `set' in a subshell so we don't clobber the current shell's
713 # arguments. Must try -L first in case configure is actually a
714 # symlink; some systems play weird games with the mod time of symlinks
715 # (eg FreeBSD returns the mod time of the symlink's containing
716 # directory).
717 if (
718 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
719 if test "$*" = "X"; then
720 # -L didn't work.
721 set X `ls -t $srcdir/configure conftestfile`
723 if test "$*" != "X $srcdir/configure conftestfile" \
724 && test "$*" != "X conftestfile $srcdir/configure"; then
726 # If neither matched, then we have a broken ls. This can happen
727 # if, for instance, CONFIG_SHELL is bash and it inherits a
728 # broken ls alias from the environment. This has actually
729 # happened. Such a system could not be considered "sane".
730 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
731 alias in your environment" 1>&2; exit 1; }
734 test "$2" = conftestfile
736 then
737 # Ok.
739 else
740 { echo "configure: error: newly created file is older than distributed files!
741 Check your system clock" 1>&2; exit 1; }
743 rm -f conftest*
744 echo "$ac_t""yes" 1>&6
745 if test "$program_transform_name" = s,x,x,; then
746 program_transform_name=
747 else
748 # Double any \ or $. echo might interpret backslashes.
749 cat <<\EOF_SED > conftestsed
750 s,\\,\\\\,g; s,\$,$$,g
751 EOF_SED
752 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
753 rm -f conftestsed
755 test "$program_prefix" != NONE &&
756 program_transform_name="s,^,${program_prefix},; $program_transform_name"
757 # Use a double $ so make ignores it.
758 test "$program_suffix" != NONE &&
759 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
761 # sed with no file args requires a program.
762 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
764 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
765 echo "configure:766: checking whether ${MAKE-make} sets \${MAKE}" >&5
766 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
767 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
768 echo $ac_n "(cached) $ac_c" 1>&6
769 else
770 cat > conftestmake <<\EOF
771 all:
772 @echo 'ac_maketemp="${MAKE}"'
774 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
775 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
776 if test -n "$ac_maketemp"; then
777 eval ac_cv_prog_make_${ac_make}_set=yes
778 else
779 eval ac_cv_prog_make_${ac_make}_set=no
781 rm -f conftestmake
783 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
784 echo "$ac_t""yes" 1>&6
785 SET_MAKE=
786 else
787 echo "$ac_t""no" 1>&6
788 SET_MAKE="MAKE=${MAKE-make}"
791 if test $host != $build; then
792 ac_tool_prefix=${host_alias}-
793 else
794 ac_tool_prefix=
797 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
798 echo "configure:799: checking for Cygwin environment" >&5
799 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
800 echo $ac_n "(cached) $ac_c" 1>&6
801 else
802 cat > conftest.$ac_ext <<EOF
803 #line 804 "configure"
804 #include "confdefs.h"
806 int main() {
808 #ifndef __CYGWIN__
809 #define __CYGWIN__ __CYGWIN32__
810 #endif
811 return __CYGWIN__;
812 ; return 0; }
814 if { (eval echo configure:815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
815 rm -rf conftest*
816 ac_cv_cygwin=yes
817 else
818 echo "configure: failed program was:" >&5
819 cat conftest.$ac_ext >&5
820 rm -rf conftest*
821 ac_cv_cygwin=no
823 rm -f conftest*
824 rm -f conftest*
827 echo "$ac_t""$ac_cv_cygwin" 1>&6
828 CYGWIN=
829 test "$ac_cv_cygwin" = yes && CYGWIN=yes
830 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
831 echo "configure:832: checking for mingw32 environment" >&5
832 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
833 echo $ac_n "(cached) $ac_c" 1>&6
834 else
835 cat > conftest.$ac_ext <<EOF
836 #line 837 "configure"
837 #include "confdefs.h"
839 int main() {
840 return __MINGW32__;
841 ; return 0; }
843 if { (eval echo configure:844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
844 rm -rf conftest*
845 ac_cv_mingw32=yes
846 else
847 echo "configure: failed program was:" >&5
848 cat conftest.$ac_ext >&5
849 rm -rf conftest*
850 ac_cv_mingw32=no
852 rm -f conftest*
853 rm -f conftest*
856 echo "$ac_t""$ac_cv_mingw32" 1>&6
857 MINGW32=
858 test "$ac_cv_mingw32" = yes && MINGW32=yes
860 # Check whether --enable-multilib or --disable-multilib was given.
861 if test "${enable_multilib+set}" = set; then
862 enableval="$enable_multilib"
863 case "${enableval}" in
864 yes) multilib=yes ;;
865 no) multilib=no ;;
866 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
867 esac
868 else
869 multilib=yes
873 # When building with srcdir == objdir, links to the source files will
874 # be created in directories within the target_subdir. We have to
875 # adjust toplevel_srcdir accordingly, so that configure finds
876 # install-sh and other auxiliary files that live in the top-level
877 # source directory.
878 if test "${srcdir}" = "."; then
879 if test -z "${with_target_subdir}"; then
880 toprel=".."
881 else
882 if test "${with_target_subdir}" != "."; then
883 toprel="${with_multisrctop}../.."
884 else
885 toprel="${with_multisrctop}.."
888 else
889 toprel=".."
892 libgcj_basedir=$srcdir/$toprel/./libjava
895 ac_aux_dir=
896 for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
897 if test -f $ac_dir/install-sh; then
898 ac_aux_dir=$ac_dir
899 ac_install_sh="$ac_aux_dir/install-sh -c"
900 break
901 elif test -f $ac_dir/install.sh; then
902 ac_aux_dir=$ac_dir
903 ac_install_sh="$ac_aux_dir/install.sh -c"
904 break
906 done
907 if test -z "$ac_aux_dir"; then
908 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
910 ac_config_guess=$ac_aux_dir/config.guess
911 ac_config_sub=$ac_aux_dir/config.sub
912 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
914 if :; then :; else
915 # This overrides the previous occurrence for automake, but not for
916 # autoconf, which is exactly what we want.
917 ac_aux_dir=
918 for ac_dir in .. $srcdir/..; do
919 if test -f $ac_dir/install-sh; then
920 ac_aux_dir=$ac_dir
921 ac_install_sh="$ac_aux_dir/install-sh -c"
922 break
923 elif test -f $ac_dir/install.sh; then
924 ac_aux_dir=$ac_dir
925 ac_install_sh="$ac_aux_dir/install.sh -c"
926 break
928 done
929 if test -z "$ac_aux_dir"; then
930 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
932 ac_config_guess=$ac_aux_dir/config.guess
933 ac_config_sub=$ac_aux_dir/config.sub
934 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
938 # This works around an automake problem.
939 mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
943 # Do some error checking and defaulting for the host and target type.
944 # The inputs are:
945 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
947 # The rules are:
948 # 1. You are not allowed to specify --host, --target, and nonopt at the
949 # same time.
950 # 2. Host defaults to nonopt.
951 # 3. If nonopt is not specified, then host defaults to the current host,
952 # as determined by config.guess.
953 # 4. Target and build default to nonopt.
954 # 5. If nonopt is not specified, then target and build default to host.
956 # The aliases save the names the user supplied, while $host etc.
957 # will get canonicalized.
958 case $host---$target---$nonopt in
959 NONE---*---* | *---NONE---* | *---*---NONE) ;;
960 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
961 esac
964 # Make sure we can run config.sub.
965 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
966 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
969 echo $ac_n "checking host system type""... $ac_c" 1>&6
970 echo "configure:971: checking host system type" >&5
972 host_alias=$host
973 case "$host_alias" in
974 NONE)
975 case $nonopt in
976 NONE)
977 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
978 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
979 fi ;;
980 *) host_alias=$nonopt ;;
981 esac ;;
982 esac
984 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
985 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
986 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
987 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
988 echo "$ac_t""$host" 1>&6
990 echo $ac_n "checking target system type""... $ac_c" 1>&6
991 echo "configure:992: checking target system type" >&5
993 target_alias=$target
994 case "$target_alias" in
995 NONE)
996 case $nonopt in
997 NONE) target_alias=$host_alias ;;
998 *) target_alias=$nonopt ;;
999 esac ;;
1000 esac
1002 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1003 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1004 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1005 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1006 echo "$ac_t""$target" 1>&6
1008 echo $ac_n "checking build system type""... $ac_c" 1>&6
1009 echo "configure:1010: checking build system type" >&5
1011 build_alias=$build
1012 case "$build_alias" in
1013 NONE)
1014 case $nonopt in
1015 NONE) build_alias=$host_alias ;;
1016 *) build_alias=$nonopt ;;
1017 esac ;;
1018 esac
1020 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1021 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1022 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1023 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1024 echo "$ac_t""$build" 1>&6
1026 test "$host_alias" != "$target_alias" &&
1027 test "$program_prefix$program_suffix$program_transform_name" = \
1028 NONENONEs,x,x, &&
1029 program_prefix=${target_alias}-
1035 # Extract the first word of "gcc", so it can be a program name with args.
1036 set dummy gcc; ac_word=$2
1037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1038 echo "configure:1039: checking for $ac_word" >&5
1039 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1040 echo $ac_n "(cached) $ac_c" 1>&6
1041 else
1042 if test -n "$CC"; then
1043 ac_cv_prog_CC="$CC" # Let the user override the test.
1044 else
1045 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1046 ac_dummy="$PATH"
1047 for ac_dir in $ac_dummy; do
1048 test -z "$ac_dir" && ac_dir=.
1049 if test -f $ac_dir/$ac_word; then
1050 ac_cv_prog_CC="gcc"
1051 break
1053 done
1054 IFS="$ac_save_ifs"
1057 CC="$ac_cv_prog_CC"
1058 if test -n "$CC"; then
1059 echo "$ac_t""$CC" 1>&6
1060 else
1061 echo "$ac_t""no" 1>&6
1064 if test -z "$CC"; then
1065 # Extract the first word of "cc", so it can be a program name with args.
1066 set dummy cc; ac_word=$2
1067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1068 echo "configure:1069: checking for $ac_word" >&5
1069 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1070 echo $ac_n "(cached) $ac_c" 1>&6
1071 else
1072 if test -n "$CC"; then
1073 ac_cv_prog_CC="$CC" # Let the user override the test.
1074 else
1075 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1076 ac_prog_rejected=no
1077 ac_dummy="$PATH"
1078 for ac_dir in $ac_dummy; do
1079 test -z "$ac_dir" && ac_dir=.
1080 if test -f $ac_dir/$ac_word; then
1081 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1082 ac_prog_rejected=yes
1083 continue
1085 ac_cv_prog_CC="cc"
1086 break
1088 done
1089 IFS="$ac_save_ifs"
1090 if test $ac_prog_rejected = yes; then
1091 # We found a bogon in the path, so make sure we never use it.
1092 set dummy $ac_cv_prog_CC
1093 shift
1094 if test $# -gt 0; then
1095 # We chose a different compiler from the bogus one.
1096 # However, it has the same basename, so the bogon will be chosen
1097 # first if we set CC to just the basename; use the full file name.
1098 shift
1099 set dummy "$ac_dir/$ac_word" "$@"
1100 shift
1101 ac_cv_prog_CC="$@"
1106 CC="$ac_cv_prog_CC"
1107 if test -n "$CC"; then
1108 echo "$ac_t""$CC" 1>&6
1109 else
1110 echo "$ac_t""no" 1>&6
1113 if test -z "$CC"; then
1114 case "`uname -s`" in
1115 *win32* | *WIN32*)
1116 # Extract the first word of "cl", so it can be a program name with args.
1117 set dummy cl; ac_word=$2
1118 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1119 echo "configure:1120: checking for $ac_word" >&5
1120 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1121 echo $ac_n "(cached) $ac_c" 1>&6
1122 else
1123 if test -n "$CC"; then
1124 ac_cv_prog_CC="$CC" # Let the user override the test.
1125 else
1126 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1127 ac_dummy="$PATH"
1128 for ac_dir in $ac_dummy; do
1129 test -z "$ac_dir" && ac_dir=.
1130 if test -f $ac_dir/$ac_word; then
1131 ac_cv_prog_CC="cl"
1132 break
1134 done
1135 IFS="$ac_save_ifs"
1138 CC="$ac_cv_prog_CC"
1139 if test -n "$CC"; then
1140 echo "$ac_t""$CC" 1>&6
1141 else
1142 echo "$ac_t""no" 1>&6
1145 esac
1147 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1151 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1152 echo "configure:1153: checking whether we are using GNU C" >&5
1153 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1154 echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156 cat > conftest.c <<EOF
1157 #ifdef __GNUC__
1158 yes;
1159 #endif
1161 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1162 ac_cv_prog_gcc=yes
1163 else
1164 ac_cv_prog_gcc=no
1168 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1170 if test $ac_cv_prog_gcc = yes; then
1171 GCC=yes
1172 else
1173 GCC=
1176 ac_test_CFLAGS="${CFLAGS+set}"
1177 ac_save_CFLAGS="$CFLAGS"
1178 CFLAGS=
1179 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1180 echo "configure:1181: checking whether ${CC-cc} accepts -g" >&5
1181 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1182 echo $ac_n "(cached) $ac_c" 1>&6
1183 else
1184 echo 'void f(){}' > conftest.c
1185 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1186 ac_cv_prog_cc_g=yes
1187 else
1188 ac_cv_prog_cc_g=no
1190 rm -f conftest*
1194 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1195 if test "$ac_test_CFLAGS" = set; then
1196 CFLAGS="$ac_save_CFLAGS"
1197 elif test $ac_cv_prog_cc_g = yes; then
1198 if test "$GCC" = yes; then
1199 CFLAGS="-g -O2"
1200 else
1201 CFLAGS="-g"
1203 else
1204 if test "$GCC" = yes; then
1205 CFLAGS="-O2"
1206 else
1207 CFLAGS=
1212 # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
1213 # glibjava_CXX instead of glibcpp_CXX. That's because we're passed a
1214 # different definition of CXX than other directories, since we don't
1215 # depend on libstdc++-v3 having already been built.
1219 # Use glibjava_CXX so that we do not cause CXX to be cached with the
1220 # flags that come in CXX while configuring libjava. They're different
1221 # from those used for all other target libraries. If CXX is set in
1222 # the environment, respect that here.
1223 glibjava_CXX=$CXX
1224 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1226 # Extract the first word of "$ac_prog", so it can be a program name with args.
1227 set dummy $ac_prog; ac_word=$2
1228 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1229 echo "configure:1230: checking for $ac_word" >&5
1230 if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then
1231 echo $ac_n "(cached) $ac_c" 1>&6
1232 else
1233 if test -n "$glibjava_CXX"; then
1234 ac_cv_prog_glibjava_CXX="$glibjava_CXX" # Let the user override the test.
1235 else
1236 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1237 ac_dummy="$PATH"
1238 for ac_dir in $ac_dummy; do
1239 test -z "$ac_dir" && ac_dir=.
1240 if test -f $ac_dir/$ac_word; then
1241 ac_cv_prog_glibjava_CXX="$ac_prog"
1242 break
1244 done
1245 IFS="$ac_save_ifs"
1248 glibjava_CXX="$ac_cv_prog_glibjava_CXX"
1249 if test -n "$glibjava_CXX"; then
1250 echo "$ac_t""$glibjava_CXX" 1>&6
1251 else
1252 echo "$ac_t""no" 1>&6
1255 test -n "$glibjava_CXX" && break
1256 done
1257 test -n "$glibjava_CXX" || glibjava_CXX="gcc"
1260 CXX=$glibjava_CXX
1261 test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1263 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1264 echo "configure:1265: checking whether we are using GNU C++" >&5
1265 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1266 echo $ac_n "(cached) $ac_c" 1>&6
1267 else
1268 cat > conftest.C <<EOF
1269 #ifdef __GNUC__
1270 yes;
1271 #endif
1273 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1274 ac_cv_prog_gxx=yes
1275 else
1276 ac_cv_prog_gxx=no
1280 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1282 if test $ac_cv_prog_gxx = yes; then
1283 GXX=yes
1284 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1285 ac_save_CXXFLAGS="$CXXFLAGS"
1286 CXXFLAGS=
1287 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1288 echo "configure:1289: checking whether ${CXX-g++} accepts -g" >&5
1289 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1290 echo $ac_n "(cached) $ac_c" 1>&6
1291 else
1292 echo 'void f(){}' > conftest.cc
1293 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1294 ac_cv_prog_cxx_g=yes
1295 else
1296 ac_cv_prog_cxx_g=no
1298 rm -f conftest*
1302 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1303 if test "$ac_test_CXXFLAGS" = set; then
1304 CXXFLAGS="$ac_save_CXXFLAGS"
1305 elif test $ac_cv_prog_cxx_g = yes; then
1306 CXXFLAGS="-g -O2"
1307 else
1308 CXXFLAGS="-O2"
1310 else
1311 GXX=
1312 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1316 version=0.0.7
1318 PACKAGE=libjava
1320 VERSION=$version
1322 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1323 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1325 cat >> confdefs.h <<EOF
1326 #define PACKAGE "$PACKAGE"
1329 cat >> confdefs.h <<EOF
1330 #define VERSION "$VERSION"
1335 missing_dir=`cd $ac_aux_dir && pwd`
1336 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1337 echo "configure:1338: checking for working aclocal" >&5
1338 # Run test in a subshell; some versions of sh will print an error if
1339 # an executable is not found, even if stderr is redirected.
1340 # Redirect stdin to placate older versions of autoconf. Sigh.
1341 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1342 ACLOCAL=aclocal
1343 echo "$ac_t""found" 1>&6
1344 else
1345 ACLOCAL="$missing_dir/missing aclocal"
1346 echo "$ac_t""missing" 1>&6
1349 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1350 echo "configure:1351: checking for working autoconf" >&5
1351 # Run test in a subshell; some versions of sh will print an error if
1352 # an executable is not found, even if stderr is redirected.
1353 # Redirect stdin to placate older versions of autoconf. Sigh.
1354 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1355 AUTOCONF=autoconf
1356 echo "$ac_t""found" 1>&6
1357 else
1358 AUTOCONF="$missing_dir/missing autoconf"
1359 echo "$ac_t""missing" 1>&6
1362 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1363 echo "configure:1364: checking for working automake" >&5
1364 # Run test in a subshell; some versions of sh will print an error if
1365 # an executable is not found, even if stderr is redirected.
1366 # Redirect stdin to placate older versions of autoconf. Sigh.
1367 if (automake --version) < /dev/null > /dev/null 2>&1; then
1368 AUTOMAKE=automake
1369 echo "$ac_t""found" 1>&6
1370 else
1371 AUTOMAKE="$missing_dir/missing automake"
1372 echo "$ac_t""missing" 1>&6
1375 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1376 echo "configure:1377: checking for working autoheader" >&5
1377 # Run test in a subshell; some versions of sh will print an error if
1378 # an executable is not found, even if stderr is redirected.
1379 # Redirect stdin to placate older versions of autoconf. Sigh.
1380 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1381 AUTOHEADER=autoheader
1382 echo "$ac_t""found" 1>&6
1383 else
1384 AUTOHEADER="$missing_dir/missing autoheader"
1385 echo "$ac_t""missing" 1>&6
1388 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1389 echo "configure:1390: checking for working makeinfo" >&5
1390 # Run test in a subshell; some versions of sh will print an error if
1391 # an executable is not found, even if stderr is redirected.
1392 # Redirect stdin to placate older versions of autoconf. Sigh.
1393 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1394 MAKEINFO=makeinfo
1395 echo "$ac_t""found" 1>&6
1396 else
1397 MAKEINFO="$missing_dir/missing makeinfo"
1398 echo "$ac_t""missing" 1>&6
1403 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1404 set dummy ${ac_tool_prefix}as; ac_word=$2
1405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1406 echo "configure:1407: checking for $ac_word" >&5
1407 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1408 echo $ac_n "(cached) $ac_c" 1>&6
1409 else
1410 if test -n "$AS"; then
1411 ac_cv_prog_AS="$AS" # Let the user override the test.
1412 else
1413 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1414 ac_dummy="$PATH"
1415 for ac_dir in $ac_dummy; do
1416 test -z "$ac_dir" && ac_dir=.
1417 if test -f $ac_dir/$ac_word; then
1418 ac_cv_prog_AS="${ac_tool_prefix}as"
1419 break
1421 done
1422 IFS="$ac_save_ifs"
1423 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1426 AS="$ac_cv_prog_AS"
1427 if test -n "$AS"; then
1428 echo "$ac_t""$AS" 1>&6
1429 else
1430 echo "$ac_t""no" 1>&6
1435 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1436 set dummy ${ac_tool_prefix}ar; ac_word=$2
1437 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1438 echo "configure:1439: checking for $ac_word" >&5
1439 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1440 echo $ac_n "(cached) $ac_c" 1>&6
1441 else
1442 if test -n "$AR"; then
1443 ac_cv_prog_AR="$AR" # Let the user override the test.
1444 else
1445 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1446 ac_dummy="$PATH"
1447 for ac_dir in $ac_dummy; do
1448 test -z "$ac_dir" && ac_dir=.
1449 if test -f $ac_dir/$ac_word; then
1450 ac_cv_prog_AR="${ac_tool_prefix}ar"
1451 break
1453 done
1454 IFS="$ac_save_ifs"
1455 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1458 AR="$ac_cv_prog_AR"
1459 if test -n "$AR"; then
1460 echo "$ac_t""$AR" 1>&6
1461 else
1462 echo "$ac_t""no" 1>&6
1467 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1468 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1469 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1470 echo "configure:1471: checking for $ac_word" >&5
1471 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1472 echo $ac_n "(cached) $ac_c" 1>&6
1473 else
1474 if test -n "$RANLIB"; then
1475 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1476 else
1477 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1478 ac_dummy="$PATH"
1479 for ac_dir in $ac_dummy; do
1480 test -z "$ac_dir" && ac_dir=.
1481 if test -f $ac_dir/$ac_word; then
1482 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1483 break
1485 done
1486 IFS="$ac_save_ifs"
1489 RANLIB="$ac_cv_prog_RANLIB"
1490 if test -n "$RANLIB"; then
1491 echo "$ac_t""$RANLIB" 1>&6
1492 else
1493 echo "$ac_t""no" 1>&6
1497 if test -z "$ac_cv_prog_RANLIB"; then
1498 if test -n "$ac_tool_prefix"; then
1499 # Extract the first word of "ranlib", so it can be a program name with args.
1500 set dummy ranlib; ac_word=$2
1501 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1502 echo "configure:1503: checking for $ac_word" >&5
1503 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1504 echo $ac_n "(cached) $ac_c" 1>&6
1505 else
1506 if test -n "$RANLIB"; then
1507 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1508 else
1509 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1510 ac_dummy="$PATH"
1511 for ac_dir in $ac_dummy; do
1512 test -z "$ac_dir" && ac_dir=.
1513 if test -f $ac_dir/$ac_word; then
1514 ac_cv_prog_RANLIB="ranlib"
1515 break
1517 done
1518 IFS="$ac_save_ifs"
1519 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1522 RANLIB="$ac_cv_prog_RANLIB"
1523 if test -n "$RANLIB"; then
1524 echo "$ac_t""$RANLIB" 1>&6
1525 else
1526 echo "$ac_t""no" 1>&6
1529 else
1530 RANLIB=":"
1535 # Find a good install program. We prefer a C program (faster),
1536 # so one script is as good as another. But avoid the broken or
1537 # incompatible versions:
1538 # SysV /etc/install, /usr/sbin/install
1539 # SunOS /usr/etc/install
1540 # IRIX /sbin/install
1541 # AIX /bin/install
1542 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1543 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1544 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1545 # ./install, which can be erroneously created by make from ./install.sh.
1546 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1547 echo "configure:1548: checking for a BSD compatible install" >&5
1548 if test -z "$INSTALL"; then
1549 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1550 echo $ac_n "(cached) $ac_c" 1>&6
1551 else
1552 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1553 for ac_dir in $PATH; do
1554 # Account for people who put trailing slashes in PATH elements.
1555 case "$ac_dir/" in
1556 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1558 # OSF1 and SCO ODT 3.0 have their own names for install.
1559 # Don't use installbsd from OSF since it installs stuff as root
1560 # by default.
1561 for ac_prog in ginstall scoinst install; do
1562 if test -f $ac_dir/$ac_prog; then
1563 if test $ac_prog = install &&
1564 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1565 # AIX install. It has an incompatible calling convention.
1567 else
1568 ac_cv_path_install="$ac_dir/$ac_prog -c"
1569 break 2
1572 done
1574 esac
1575 done
1576 IFS="$ac_save_IFS"
1579 if test "${ac_cv_path_install+set}" = set; then
1580 INSTALL="$ac_cv_path_install"
1581 else
1582 # As a last resort, use the slow shell script. We don't cache a
1583 # path for INSTALL within a source directory, because that will
1584 # break other packages using the cache if that directory is
1585 # removed, or if the path is relative.
1586 INSTALL="$ac_install_sh"
1589 echo "$ac_t""$INSTALL" 1>&6
1591 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1592 # It thinks the first close brace ends the variable substitution.
1593 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1595 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1597 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1600 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1601 echo "configure:1602: checking whether to enable maintainer-specific portions of Makefiles" >&5
1602 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1603 if test "${enable_maintainer_mode+set}" = set; then
1604 enableval="$enable_maintainer_mode"
1605 USE_MAINTAINER_MODE=$enableval
1606 else
1607 USE_MAINTAINER_MODE=no
1610 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1613 if test $USE_MAINTAINER_MODE = yes; then
1614 MAINTAINER_MODE_TRUE=
1615 MAINTAINER_MODE_FALSE='#'
1616 else
1617 MAINTAINER_MODE_TRUE='#'
1618 MAINTAINER_MODE_FALSE=
1620 MAINT=$MAINTAINER_MODE_TRUE
1626 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1627 echo "configure:1628: checking for executable suffix" >&5
1628 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1629 echo $ac_n "(cached) $ac_c" 1>&6
1630 else
1631 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1632 ac_cv_exeext=.exe
1633 else
1634 rm -f conftest*
1635 echo 'int main () { return 0; }' > conftest.$ac_ext
1636 ac_cv_exeext=
1637 if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1638 for file in conftest.*; do
1639 case $file in
1640 *.c | *.o | *.obj) ;;
1641 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1642 esac
1643 done
1644 else
1645 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1647 rm -f conftest*
1648 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1652 EXEEXT=""
1653 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1654 echo "$ac_t""${ac_cv_exeext}" 1>&6
1655 ac_exeext=$EXEEXT
1658 # configure.host sets the following important variables
1659 # libgcj_cflags - host specific C compiler flags
1660 # libgcj_cxxflags - host specific C++ compiler flags
1661 # libgcj_javaflags - host specific Java compiler flags
1663 libgcj_cflags=
1664 libgcj_cxxflags=
1665 libgcj_javaflags=
1667 . ${srcdir}/configure.host
1669 LIBGCJ_CFLAGS="${libgcj_cflags}"
1670 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1671 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1681 # Only use libltdl for non-newlib builds.
1682 if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
1683 case $enable_ltdl_convenience in
1684 no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1685 "") enable_ltdl_convenience=yes
1686 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1687 esac
1688 LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1689 INCLTDL='-I${top_srcdir}/''libltdl'
1692 DIRLTDL=libltdl
1693 cat >> confdefs.h <<\EOF
1694 #define USE_LTDL 1
1697 # Sigh. Libtool's macro doesn't do the right thing.
1698 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1699 # FIXME: this is a hack.
1700 sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`"
1701 ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
1706 # Check whether --enable-shared or --disable-shared was given.
1707 if test "${enable_shared+set}" = set; then
1708 enableval="$enable_shared"
1709 p=${PACKAGE-default}
1710 case $enableval in
1711 yes) enable_shared=yes ;;
1712 no) enable_shared=no ;;
1714 enable_shared=no
1715 # Look at the argument we got. We use all the common list separators.
1716 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1717 for pkg in $enableval; do
1718 if test "X$pkg" = "X$p"; then
1719 enable_shared=yes
1721 done
1722 IFS="$ac_save_ifs"
1724 esac
1725 else
1726 enable_shared=yes
1729 # Check whether --enable-static or --disable-static was given.
1730 if test "${enable_static+set}" = set; then
1731 enableval="$enable_static"
1732 p=${PACKAGE-default}
1733 case $enableval in
1734 yes) enable_static=yes ;;
1735 no) enable_static=no ;;
1737 enable_static=no
1738 # Look at the argument we got. We use all the common list separators.
1739 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1740 for pkg in $enableval; do
1741 if test "X$pkg" = "X$p"; then
1742 enable_static=yes
1744 done
1745 IFS="$ac_save_ifs"
1747 esac
1748 else
1749 enable_static=yes
1752 # Check whether --enable-fast-install or --disable-fast-install was given.
1753 if test "${enable_fast_install+set}" = set; then
1754 enableval="$enable_fast_install"
1755 p=${PACKAGE-default}
1756 case $enableval in
1757 yes) enable_fast_install=yes ;;
1758 no) enable_fast_install=no ;;
1760 enable_fast_install=no
1761 # Look at the argument we got. We use all the common list separators.
1762 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1763 for pkg in $enableval; do
1764 if test "X$pkg" = "X$p"; then
1765 enable_fast_install=yes
1767 done
1768 IFS="$ac_save_ifs"
1770 esac
1771 else
1772 enable_fast_install=yes
1775 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1776 if test "${with_gnu_ld+set}" = set; then
1777 withval="$with_gnu_ld"
1778 test "$withval" = no || with_gnu_ld=yes
1779 else
1780 with_gnu_ld=no
1783 ac_prog=ld
1784 if test "$GCC" = yes; then
1785 # Check if gcc -print-prog-name=ld gives a path.
1786 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1787 echo "configure:1788: checking for ld used by GCC" >&5
1788 case $host in
1789 *-*-mingw*)
1790 # gcc leaves a trailing carriage return which upsets mingw
1791 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1793 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1794 esac
1795 case $ac_prog in
1796 # Accept absolute paths.
1797 [\\/]* | [A-Za-z]:[\\/]*)
1798 re_direlt='/[^/][^/]*/\.\./'
1799 # Canonicalize the path of ld
1800 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1801 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1802 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1803 done
1804 test -z "$LD" && LD="$ac_prog"
1807 # If it fails, then pretend we aren't using GCC.
1808 ac_prog=ld
1811 # If it is relative, then search for the first ld in PATH.
1812 with_gnu_ld=unknown
1814 esac
1815 elif test "$with_gnu_ld" = yes; then
1816 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1817 echo "configure:1818: checking for GNU ld" >&5
1818 else
1819 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1820 echo "configure:1821: checking for non-GNU ld" >&5
1822 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1823 echo $ac_n "(cached) $ac_c" 1>&6
1824 else
1825 if test -z "$LD"; then
1826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1827 for ac_dir in $PATH; do
1828 test -z "$ac_dir" && ac_dir=.
1829 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1830 lt_cv_path_LD="$ac_dir/$ac_prog"
1831 # Check to see if the program is GNU ld. I'd rather use --version,
1832 # but apparently some GNU ld's only accept -v.
1833 # Break only if it was the GNU/non-GNU ld that we prefer.
1834 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1835 test "$with_gnu_ld" != no && break
1836 else
1837 test "$with_gnu_ld" != yes && break
1840 done
1841 IFS="$ac_save_ifs"
1842 else
1843 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1847 LD="$lt_cv_path_LD"
1848 if test -n "$LD"; then
1849 echo "$ac_t""$LD" 1>&6
1850 else
1851 echo "$ac_t""no" 1>&6
1853 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1854 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1855 echo "configure:1856: checking if the linker ($LD) is GNU ld" >&5
1856 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1857 echo $ac_n "(cached) $ac_c" 1>&6
1858 else
1859 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1860 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1861 lt_cv_prog_gnu_ld=yes
1862 else
1863 lt_cv_prog_gnu_ld=no
1867 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1868 with_gnu_ld=$lt_cv_prog_gnu_ld
1871 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1872 echo "configure:1873: checking for $LD option to reload object files" >&5
1873 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1874 echo $ac_n "(cached) $ac_c" 1>&6
1875 else
1876 lt_cv_ld_reload_flag='-r'
1879 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1880 reload_flag=$lt_cv_ld_reload_flag
1881 test -n "$reload_flag" && reload_flag=" $reload_flag"
1883 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1884 echo "configure:1885: checking for BSD-compatible nm" >&5
1885 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1886 echo $ac_n "(cached) $ac_c" 1>&6
1887 else
1888 if test -n "$NM"; then
1889 # Let the user override the test.
1890 lt_cv_path_NM="$NM"
1891 else
1892 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1893 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1894 test -z "$ac_dir" && ac_dir=.
1895 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1896 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1897 # Check to see if the nm accepts a BSD-compat flag.
1898 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1899 # nm: unknown option "B" ignored
1900 # Tru64's nm complains that /dev/null is an invalid object file
1901 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1902 lt_cv_path_NM="$tmp_nm -B"
1903 break
1904 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1905 lt_cv_path_NM="$tmp_nm -p"
1906 break
1907 else
1908 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1909 continue # so that we can try to find one that supports BSD flags
1912 done
1913 IFS="$ac_save_ifs"
1914 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1918 NM="$lt_cv_path_NM"
1919 echo "$ac_t""$NM" 1>&6
1921 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1922 echo "configure:1923: checking how to recognise dependant libraries" >&5
1923 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1924 echo $ac_n "(cached) $ac_c" 1>&6
1925 else
1926 lt_cv_file_magic_cmd='$MAGIC_CMD'
1927 lt_cv_file_magic_test_file=
1928 lt_cv_deplibs_check_method='unknown'
1929 # Need to set the preceding variable on all platforms that support
1930 # interlibrary dependencies.
1931 # 'none' -- dependencies not supported.
1932 # `unknown' -- same as none, but documents that we really don't know.
1933 # 'pass_all' -- all dependencies passed with no checks.
1934 # 'test_compile' -- check by making test program.
1935 # 'file_magic [regex]' -- check by looking for files in library path
1936 # which responds to the $file_magic_cmd with a given egrep regex.
1937 # If you have `file' or equivalent on your system and you're not sure
1938 # whether `pass_all' will *always* work, you probably want this one.
1940 case $host_os in
1941 aix*)
1942 lt_cv_deplibs_check_method=pass_all
1945 beos*)
1946 lt_cv_deplibs_check_method=pass_all
1949 bsdi4*)
1950 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1951 lt_cv_file_magic_cmd='/usr/bin/file -L'
1952 lt_cv_file_magic_test_file=/shlib/libc.so
1955 cygwin* | mingw* |pw32*)
1956 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1957 lt_cv_file_magic_cmd='$OBJDUMP -f'
1960 darwin* | rhapsody*)
1961 # this will be overwritten by pass_all, but leave it in just in case
1962 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1963 lt_cv_file_magic_cmd='/usr/bin/file -L'
1964 case "$host_os" in
1965 rhapsody* | darwin1.012)
1966 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1968 *) # Darwin 1.3 on
1969 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1971 esac
1972 lt_cv_deplibs_check_method=pass_all
1975 freebsd* )
1976 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1977 case $host_cpu in
1978 i*86 )
1979 # Not sure whether the presence of OpenBSD here was a mistake.
1980 # Let's accept both of them until this is cleared up.
1981 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1982 lt_cv_file_magic_cmd=/usr/bin/file
1983 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1985 esac
1986 else
1987 lt_cv_deplibs_check_method=pass_all
1991 gnu*)
1992 lt_cv_deplibs_check_method=pass_all
1995 hpux10.20*|hpux11*)
1996 case $host_cpu in
1997 hppa*)
1998 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1999 lt_cv_file_magic_cmd=/usr/bin/file
2000 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2002 ia64*)
2003 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
2004 lt_cv_file_magic_cmd=/usr/bin/file
2005 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2007 esac
2010 irix5* | irix6*)
2011 case $host_os in
2012 irix5*)
2013 # this will be overridden with pass_all, but let us keep it just in case
2014 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2017 case $LD in
2018 *-32|*"-32 ") libmagic=32-bit;;
2019 *-n32|*"-n32 ") libmagic=N32;;
2020 *-64|*"-64 ") libmagic=64-bit;;
2021 *) libmagic=never-match;;
2022 esac
2023 # this will be overridden with pass_all, but let us keep it just in case
2024 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2026 esac
2027 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2028 lt_cv_deplibs_check_method=pass_all
2031 # This must be Linux ELF.
2032 linux-gnu*)
2033 case $host_cpu in
2034 alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2035 lt_cv_deplibs_check_method=pass_all ;;
2037 # glibc up to 2.1.1 does not perform some relocations on ARM
2038 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2039 esac
2040 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2043 netbsd*)
2044 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2045 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2046 else
2047 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2051 newsos6)
2052 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2053 lt_cv_file_magic_cmd=/usr/bin/file
2054 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2057 osf3* | osf4* | osf5*)
2058 # this will be overridden with pass_all, but let us keep it just in case
2059 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2060 lt_cv_file_magic_test_file=/shlib/libc.so
2061 lt_cv_deplibs_check_method=pass_all
2064 sco3.2v5*)
2065 lt_cv_deplibs_check_method=pass_all
2068 solaris*)
2069 lt_cv_deplibs_check_method=pass_all
2070 lt_cv_file_magic_test_file=/lib/libc.so
2073 sysv5uw[78]* | sysv4*uw2*)
2074 lt_cv_deplibs_check_method=pass_all
2077 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2078 case $host_vendor in
2079 ncr)
2080 lt_cv_deplibs_check_method=pass_all
2082 motorola)
2083 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2084 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2086 esac
2088 esac
2092 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2093 file_magic_cmd=$lt_cv_file_magic_cmd
2094 deplibs_check_method=$lt_cv_deplibs_check_method
2096 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2097 echo "configure:2098: checking for object suffix" >&5
2098 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2099 echo $ac_n "(cached) $ac_c" 1>&6
2100 else
2101 rm -f conftest*
2102 echo 'int i = 1;' > conftest.$ac_ext
2103 if { (eval echo configure:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2104 for ac_file in conftest.*; do
2105 case $ac_file in
2106 *.c) ;;
2107 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2108 esac
2109 done
2110 else
2111 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2113 rm -f conftest*
2116 echo "$ac_t""$ac_cv_objext" 1>&6
2117 OBJEXT=$ac_cv_objext
2118 ac_objext=$ac_cv_objext
2120 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2122 # Only perform the check for file, if the check method requires it
2123 case $deplibs_check_method in
2124 file_magic*)
2125 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2126 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2127 echo "configure:2128: checking for ${ac_tool_prefix}file" >&5
2128 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2129 echo $ac_n "(cached) $ac_c" 1>&6
2130 else
2131 case $MAGIC_CMD in
2133 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2135 ?:/*)
2136 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2139 ac_save_MAGIC_CMD="$MAGIC_CMD"
2140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2141 ac_dummy="/usr/bin:$PATH"
2142 for ac_dir in $ac_dummy; do
2143 test -z "$ac_dir" && ac_dir=.
2144 if test -f $ac_dir/${ac_tool_prefix}file; then
2145 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2146 if test -n "$file_magic_test_file"; then
2147 case $deplibs_check_method in
2148 "file_magic "*)
2149 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2150 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2151 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2152 egrep "$file_magic_regex" > /dev/null; then
2154 else
2155 cat <<EOF 1>&2
2157 *** Warning: the command libtool uses to detect shared libraries,
2158 *** $file_magic_cmd, produces output that libtool cannot recognize.
2159 *** The result is that libtool may fail to recognize shared libraries
2160 *** as such. This will affect the creation of libtool libraries that
2161 *** depend on shared libraries, but programs linked with such libtool
2162 *** libraries will work regardless of this problem. Nevertheless, you
2163 *** may want to report the problem to your system manager and/or to
2164 *** bug-libtool@gnu.org
2167 fi ;;
2168 esac
2170 break
2172 done
2173 IFS="$ac_save_ifs"
2174 MAGIC_CMD="$ac_save_MAGIC_CMD"
2176 esac
2179 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2180 if test -n "$MAGIC_CMD"; then
2181 echo "$ac_t""$MAGIC_CMD" 1>&6
2182 else
2183 echo "$ac_t""no" 1>&6
2186 if test -z "$lt_cv_path_MAGIC_CMD"; then
2187 if test -n "$ac_tool_prefix"; then
2188 echo $ac_n "checking for file""... $ac_c" 1>&6
2189 echo "configure:2190: checking for file" >&5
2190 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2191 echo $ac_n "(cached) $ac_c" 1>&6
2192 else
2193 case $MAGIC_CMD in
2195 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2197 ?:/*)
2198 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2201 ac_save_MAGIC_CMD="$MAGIC_CMD"
2202 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2203 ac_dummy="/usr/bin:$PATH"
2204 for ac_dir in $ac_dummy; do
2205 test -z "$ac_dir" && ac_dir=.
2206 if test -f $ac_dir/file; then
2207 lt_cv_path_MAGIC_CMD="$ac_dir/file"
2208 if test -n "$file_magic_test_file"; then
2209 case $deplibs_check_method in
2210 "file_magic "*)
2211 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2212 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2213 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2214 egrep "$file_magic_regex" > /dev/null; then
2216 else
2217 cat <<EOF 1>&2
2219 *** Warning: the command libtool uses to detect shared libraries,
2220 *** $file_magic_cmd, produces output that libtool cannot recognize.
2221 *** The result is that libtool may fail to recognize shared libraries
2222 *** as such. This will affect the creation of libtool libraries that
2223 *** depend on shared libraries, but programs linked with such libtool
2224 *** libraries will work regardless of this problem. Nevertheless, you
2225 *** may want to report the problem to your system manager and/or to
2226 *** bug-libtool@gnu.org
2229 fi ;;
2230 esac
2232 break
2234 done
2235 IFS="$ac_save_ifs"
2236 MAGIC_CMD="$ac_save_MAGIC_CMD"
2238 esac
2241 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2242 if test -n "$MAGIC_CMD"; then
2243 echo "$ac_t""$MAGIC_CMD" 1>&6
2244 else
2245 echo "$ac_t""no" 1>&6
2248 else
2249 MAGIC_CMD=:
2255 esac
2257 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2258 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2260 echo "configure:2261: checking for $ac_word" >&5
2261 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2262 echo $ac_n "(cached) $ac_c" 1>&6
2263 else
2264 if test -n "$RANLIB"; then
2265 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2266 else
2267 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2268 ac_dummy="$PATH"
2269 for ac_dir in $ac_dummy; do
2270 test -z "$ac_dir" && ac_dir=.
2271 if test -f $ac_dir/$ac_word; then
2272 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2273 break
2275 done
2276 IFS="$ac_save_ifs"
2279 RANLIB="$ac_cv_prog_RANLIB"
2280 if test -n "$RANLIB"; then
2281 echo "$ac_t""$RANLIB" 1>&6
2282 else
2283 echo "$ac_t""no" 1>&6
2287 if test -z "$ac_cv_prog_RANLIB"; then
2288 if test -n "$ac_tool_prefix"; then
2289 # Extract the first word of "ranlib", so it can be a program name with args.
2290 set dummy ranlib; ac_word=$2
2291 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2292 echo "configure:2293: checking for $ac_word" >&5
2293 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2294 echo $ac_n "(cached) $ac_c" 1>&6
2295 else
2296 if test -n "$RANLIB"; then
2297 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2298 else
2299 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2300 ac_dummy="$PATH"
2301 for ac_dir in $ac_dummy; do
2302 test -z "$ac_dir" && ac_dir=.
2303 if test -f $ac_dir/$ac_word; then
2304 ac_cv_prog_RANLIB="ranlib"
2305 break
2307 done
2308 IFS="$ac_save_ifs"
2309 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2312 RANLIB="$ac_cv_prog_RANLIB"
2313 if test -n "$RANLIB"; then
2314 echo "$ac_t""$RANLIB" 1>&6
2315 else
2316 echo "$ac_t""no" 1>&6
2319 else
2320 RANLIB=":"
2324 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2325 set dummy ${ac_tool_prefix}strip; ac_word=$2
2326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2327 echo "configure:2328: checking for $ac_word" >&5
2328 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2329 echo $ac_n "(cached) $ac_c" 1>&6
2330 else
2331 if test -n "$STRIP"; then
2332 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2333 else
2334 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2335 ac_dummy="$PATH"
2336 for ac_dir in $ac_dummy; do
2337 test -z "$ac_dir" && ac_dir=.
2338 if test -f $ac_dir/$ac_word; then
2339 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2340 break
2342 done
2343 IFS="$ac_save_ifs"
2346 STRIP="$ac_cv_prog_STRIP"
2347 if test -n "$STRIP"; then
2348 echo "$ac_t""$STRIP" 1>&6
2349 else
2350 echo "$ac_t""no" 1>&6
2354 if test -z "$ac_cv_prog_STRIP"; then
2355 if test -n "$ac_tool_prefix"; then
2356 # Extract the first word of "strip", so it can be a program name with args.
2357 set dummy strip; ac_word=$2
2358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2359 echo "configure:2360: checking for $ac_word" >&5
2360 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2361 echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363 if test -n "$STRIP"; then
2364 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2365 else
2366 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2367 ac_dummy="$PATH"
2368 for ac_dir in $ac_dummy; do
2369 test -z "$ac_dir" && ac_dir=.
2370 if test -f $ac_dir/$ac_word; then
2371 ac_cv_prog_STRIP="strip"
2372 break
2374 done
2375 IFS="$ac_save_ifs"
2376 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2379 STRIP="$ac_cv_prog_STRIP"
2380 if test -n "$STRIP"; then
2381 echo "$ac_t""$STRIP" 1>&6
2382 else
2383 echo "$ac_t""no" 1>&6
2386 else
2387 STRIP=":"
2392 # Check for any special flags to pass to ltconfig.
2393 libtool_flags="--cache-file=$cache_file"
2394 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2395 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2396 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2397 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2398 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2399 libtool_flags="$libtool_flags --enable-dlopen"
2401 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2402 if test "${enable_libtool_lock+set}" = set; then
2403 enableval="$enable_libtool_lock"
2407 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2408 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2410 # Check whether --with-pic or --without-pic was given.
2411 if test "${with_pic+set}" = set; then
2412 withval="$with_pic"
2413 pic_mode="$withval"
2414 else
2415 pic_mode=default
2418 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2419 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2421 # Some flags need to be propagated to the compiler or linker for good
2422 # libtool support.
2423 case $host in
2424 *-*-irix6*)
2425 # Find out which ABI we are using.
2426 echo '#line 2427 "configure"' > conftest.$ac_ext
2427 if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2428 if test "$lt_cv_prog_gnu_ld" = yes; then
2429 case `/usr/bin/file conftest.$ac_objext` in
2430 *32-bit*)
2431 LD="${LD-ld} -melf32bsmip"
2433 *N32*)
2434 LD="${LD-ld} -melf32bmipn32"
2436 *64-bit*)
2437 LD="${LD-ld} -melf64bmip"
2439 esac
2440 else
2441 case `/usr/bin/file conftest.$ac_objext` in
2442 *32-bit*)
2443 LD="${LD-ld} -32"
2445 *N32*)
2446 LD="${LD-ld} -n32"
2448 *64-bit*)
2449 LD="${LD-ld} -64"
2451 esac
2454 rm -rf conftest*
2457 ia64-*-hpux*)
2458 # Find out which ABI we are using.
2459 echo 'int i;' > conftest.$ac_ext
2460 if { (eval echo configure:2461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2461 case "`/usr/bin/file conftest.o`" in
2462 *ELF-32*)
2463 HPUX_IA64_MODE="32"
2465 *ELF-64*)
2466 HPUX_IA64_MODE="64"
2468 esac
2470 rm -rf conftest*
2473 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2474 # Find out which ABI we are using.
2475 echo 'int i;' > conftest.$ac_ext
2476 if { (eval echo configure:2477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2477 case "`/usr/bin/file conftest.o`" in
2478 *32-bit*)
2479 case $host in
2480 x86_64-*linux*)
2481 LD="${LD-ld} -m elf_i386"
2483 ppc64-*linux*|powerpc64-*linux*)
2484 LD="${LD-ld} -m elf32ppclinux"
2486 s390x-*linux*)
2487 LD="${LD-ld} -m elf_s390"
2489 sparc64-*linux*)
2490 LD="${LD-ld} -m elf32_sparc"
2492 esac
2494 *64-bit*)
2495 case $host in
2496 x86_64-*linux*)
2497 LD="${LD-ld} -m elf_x86_64"
2499 ppc*-*linux*|powerpc*-*linux*)
2500 LD="${LD-ld} -m elf64ppc"
2502 s390*-*linux*)
2503 LD="${LD-ld} -m elf64_s390"
2505 sparc*-*linux*)
2506 LD="${LD-ld} -m elf64_sparc"
2508 esac
2510 esac
2512 rm -rf conftest*
2515 *-*-sco3.2v5*)
2516 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2517 SAVE_CFLAGS="$CFLAGS"
2518 CFLAGS="$CFLAGS -belf"
2519 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2520 echo "configure:2521: checking whether the C compiler needs -belf" >&5
2521 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2522 echo $ac_n "(cached) $ac_c" 1>&6
2523 else
2525 ac_ext=c
2526 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2527 ac_cpp='$CPP $CPPFLAGS'
2528 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2529 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2530 cross_compiling=$ac_cv_prog_cc_cross
2532 cat > conftest.$ac_ext <<EOF
2533 #line 2534 "configure"
2534 #include "confdefs.h"
2536 int main() {
2538 ; return 0; }
2540 if { (eval echo configure:2541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2541 rm -rf conftest*
2542 lt_cv_cc_needs_belf=yes
2543 else
2544 echo "configure: failed program was:" >&5
2545 cat conftest.$ac_ext >&5
2546 rm -rf conftest*
2547 lt_cv_cc_needs_belf=no
2549 rm -f conftest*
2550 ac_ext=c
2551 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2552 ac_cpp='$CPP $CPPFLAGS'
2553 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2554 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2555 cross_compiling=$ac_cv_prog_cc_cross
2559 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2560 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2561 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2562 CFLAGS="$SAVE_CFLAGS"
2567 esac
2569 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2570 echo "configure:2571: checking how to run the C++ preprocessor" >&5
2571 if test -z "$CXXCPP"; then
2572 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2573 echo $ac_n "(cached) $ac_c" 1>&6
2574 else
2575 ac_ext=C
2576 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2577 ac_cpp='$CXXCPP $CPPFLAGS'
2578 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2579 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2580 cross_compiling=$ac_cv_prog_cxx_cross
2581 CXXCPP="${CXX-g++} -E"
2582 cat > conftest.$ac_ext <<EOF
2583 #line 2584 "configure"
2584 #include "confdefs.h"
2585 #include <stdlib.h>
2587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2588 { (eval echo configure:2589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2590 if test -z "$ac_err"; then
2592 else
2593 echo "$ac_err" >&5
2594 echo "configure: failed program was:" >&5
2595 cat conftest.$ac_ext >&5
2596 rm -rf conftest*
2597 CXXCPP=/lib/cpp
2599 rm -f conftest*
2600 ac_cv_prog_CXXCPP="$CXXCPP"
2601 ac_ext=c
2602 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2603 ac_cpp='$CPP $CPPFLAGS'
2604 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2605 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2606 cross_compiling=$ac_cv_prog_cc_cross
2609 CXXCPP="$ac_cv_prog_CXXCPP"
2610 echo "$ac_t""$CXXCPP" 1>&6
2613 # Save cache, so that ltconfig can load it
2614 cat > confcache <<\EOF
2615 # This file is a shell script that caches the results of configure
2616 # tests run on this system so they can be shared between configure
2617 # scripts and configure runs. It is not useful on other systems.
2618 # If it contains results you don't want to keep, you may remove or edit it.
2620 # By default, configure uses ./config.cache as the cache file,
2621 # creating it if it does not exist already. You can give configure
2622 # the --cache-file=FILE option to use a different cache file; that is
2623 # what configure does when it calls configure scripts in
2624 # subdirectories, so they share the cache.
2625 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2626 # config.status only pays attention to the cache file if you give it the
2627 # --recheck option to rerun configure.
2630 # The following way of writing the cache mishandles newlines in values,
2631 # but we know of no workaround that is simple, portable, and efficient.
2632 # So, don't put newlines in cache variables' values.
2633 # Ultrix sh set writes to stderr and can't be redirected directly,
2634 # and sets the high bit in the cache file unless we assign to the vars.
2635 (set) 2>&1 |
2636 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2637 *ac_space=\ *)
2638 # `set' does not quote correctly, so add quotes (double-quote substitution
2639 # turns \\\\ into \\, and sed turns \\ into \).
2640 sed -n \
2641 -e "s/'/'\\\\''/g" \
2642 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2645 # `set' quotes correctly as required by POSIX, so do not add quotes.
2646 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2648 esac >> confcache
2649 if cmp -s $cache_file confcache; then
2651 else
2652 if test -w $cache_file; then
2653 echo "updating cache $cache_file"
2654 cat confcache > $cache_file
2655 else
2656 echo "not updating unwritable cache $cache_file"
2659 rm -f confcache
2662 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2663 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2664 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2665 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2666 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2667 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2668 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2669 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2670 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2671 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2673 # Reload cache, that may have been modified by ltconfig
2674 if test -r "$cache_file"; then
2675 echo "loading cache $cache_file"
2676 . $cache_file
2677 else
2678 echo "creating cache $cache_file"
2679 > $cache_file
2683 # This can be used to rebuild libtool when needed
2684 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2686 # Always use our own libtool.
2687 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2689 # Redirect the config.log output again, so that the ltconfig log is not
2690 # clobbered by the next message.
2691 exec 5>>./config.log
2695 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2696 lt_save_CC="$CC"
2697 lt_save_CFLAGS="$CFLAGS"
2698 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2699 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2700 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2701 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2702 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2703 deplibs_check_method="$deplibs_check_method" \
2704 file_magic_cmd="$file_magic_cmd" \
2705 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2706 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2707 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2708 CC="$lt_save_CC"
2709 CFLAGS="$lt_save_CFLAGS"
2711 # Redirect the config.log output again, so that the ltconfig log is not
2712 # clobbered by the next message.
2713 exec 5>>./config.log
2720 subdirs="$DIRLTDL"
2723 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2724 COMPPATH=.
2725 else
2726 COMPPATH=..
2732 if test -d $srcdir/testsuite; then
2733 TESTSUBDIR_TRUE=
2734 TESTSUBDIR_FALSE='#'
2735 else
2736 TESTSUBDIR_TRUE='#'
2737 TESTSUBDIR_FALSE=
2740 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2741 if test "${enable_getenv_properties+set}" = set; then
2742 enableval="$enable_getenv_properties"
2747 if test -z "$enable_getenv_properties"; then
2748 enable_getenv_properties=${enable_getenv_properties_default-yes}
2750 if test "$enable_getenv_properties" = no; then
2751 cat >> confdefs.h <<\EOF
2752 #define DISABLE_GETENV_PROPERTIES 1
2757 if test -z "$enable_main_args"; then
2758 enable_main_args=${enable_main_args_default-yes}
2760 if test "$enable_main_args" = no; then
2761 cat >> confdefs.h <<\EOF
2762 #define DISABLE_MAIN_ARGS 1
2768 # Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
2769 if test "${enable_hash_synchronization+set}" = set; then
2770 enableval="$enable_hash_synchronization"
2775 if test -z "$enable_hash_synchronization"; then
2776 enable_hash_synchronization=$enable_hash_synchronization_default
2779 # Do we allow intermodule optimizations (i.e. compiling many files at once)?
2780 # Check whether --enable-libgcj-multifile or --disable-libgcj-multifile was given.
2781 if test "${enable_libgcj_multifile+set}" = set; then
2782 enableval="$enable_libgcj_multifile"
2783 case "${enableval}" in
2784 yes) enable_libgcj_multifile=yes ;;
2785 no) enable_libgcj_multifile=no ;;
2786 *) { echo "configure: error: bad value ${enableval} for --enable-libgcj-multifile" 1>&2; exit 1; } ;;
2787 esac
2788 else
2789 enable_libgcj_multifile=no
2794 if test "$enable_libgcj_multifile" = yes; then
2795 ONESTEP_TRUE=
2796 ONESTEP_FALSE='#'
2797 else
2798 ONESTEP_TRUE='#'
2799 ONESTEP_FALSE=
2802 # What is the native OS API for MinGW?
2803 # Check whether --with-win32-nlsapi or --without-win32-nlsapi was given.
2804 if test "${with_win32_nlsapi+set}" = set; then
2805 withval="$with_win32_nlsapi"
2807 case "${withval}" in
2808 ansi) with_win32_nlsapi=ansi ;;
2809 unicows) with_win32_nlsapi=unicows ;;
2810 unicode) with_win32_nlsapi=unicode ;;
2811 *) { echo "configure: error: Bad value ${withval} for --with-win32-nlsapi." 1>&2; exit 1; } ;;
2812 esac
2813 else
2814 with_win32_nlsapi=ansi
2818 case "${with_win32_nlsapi}" in
2819 unicows | unicode)
2820 cat >> confdefs.h <<\EOF
2821 #define MINGW_LIBGCJ_UNICODE 1
2825 esac
2827 if test "${slow_pthread_self}" = "yes"; then
2828 cat >> confdefs.h <<\EOF
2829 #define SLOW_PTHREAD_SELF 1
2835 LIBGCJDEBUG="false"
2837 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2838 if test "${enable_libgcj_debug+set}" = set; then
2839 enableval="$enable_libgcj_debug"
2840 if test "$enable_libgcj_debug" = yes; then
2841 cat >> confdefs.h <<\EOF
2842 #define DEBUG 1
2845 LIBGCJDEBUG="true"
2850 # Check whether --enable-interpreter or --disable-interpreter was given.
2851 if test "${enable_interpreter+set}" = set; then
2852 enableval="$enable_interpreter"
2853 if test "$enable_interpreter" = yes; then
2854 # This can also be set in configure.host.
2855 libgcj_interpreter=yes
2856 elif test "$enable_interpreter" = no; then
2857 libgcj_interpreter=no
2862 if test "$libgcj_interpreter" = yes; then
2863 cat >> confdefs.h <<\EOF
2864 #define INTERPRETER 1
2868 INTERPRETER="$libgcj_interpreter"
2871 echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
2872 echo "configure:2873: checking for exception model to use" >&5
2874 ac_ext=C
2875 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2876 ac_cpp='$CXXCPP $CPPFLAGS'
2877 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2878 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2879 cross_compiling=$ac_cv_prog_cxx_cross
2881 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2882 if test "${enable_sjlj_exceptions+set}" = set; then
2883 enableval="$enable_sjlj_exceptions"
2885 else
2886 cat > conftest.$ac_ext << EOF
2887 #line 2888 "configure"
2888 struct S { ~S(); };
2889 void bar();
2890 void foo()
2892 S s;
2893 bar();
2896 old_CXXFLAGS="$CXXFLAGS"
2897 CXXFLAGS=-S
2898 if { (eval echo configure:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2899 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2900 enable_sjlj_exceptions=yes
2901 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
2902 enable_sjlj_exceptions=no
2905 CXXFLAGS="$old_CXXFLAGS"
2906 rm -f conftest*
2909 if test x$enable_sjlj_exceptions = xyes; then
2910 cat >> confdefs.h <<\EOF
2911 #define SJLJ_EXCEPTIONS 1
2914 ac_exception_model_name=sjlj
2915 elif test x$enable_sjlj_exceptions = xno; then
2916 ac_exception_model_name="call frame"
2917 else
2918 { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
2920 ac_ext=c
2921 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2922 ac_cpp='$CPP $CPPFLAGS'
2923 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2924 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2925 cross_compiling=$ac_cv_prog_cc_cross
2927 echo "$ac_t""$ac_exception_model_name" 1>&6
2929 # If we are non using SJLJ exceptions, and this host does not have support
2930 # for unwinding from a signal handler, enable checked dereferences and divides.
2931 if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
2932 CHECKREFSPEC=-fcheck-references
2933 DIVIDESPEC=-fuse-divide-subroutine
2934 EXCEPTIONSPEC=
2937 # Check whether --enable-java-net or --disable-java-net was given.
2938 if test "${enable_java_net+set}" = set; then
2939 enableval="$enable_java_net"
2944 if test -z "$enable_java_net"; then
2945 enable_java_net=${enable_java_net_default-yes}
2947 if test "$enable_java_net" = no; then
2948 cat >> confdefs.h <<\EOF
2949 #define DISABLE_JAVA_NET 1
2954 # Check whether --with-libffi or --without-libffi was given.
2955 if test "${with_libffi+set}" = set; then
2956 withval="$with_libffi"
2958 else
2959 with_libffi=${with_libffi_default-yes}
2963 LIBFFI=
2964 LIBFFIINCS=
2965 if test "$with_libffi" != no; then
2966 cat >> confdefs.h <<\EOF
2967 #define USE_LIBFFI 1
2970 LIBFFI=../libffi/libffi_convenience.la
2971 LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include'
2976 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2977 if test "${enable_jvmpi+set}" = set; then
2978 enableval="$enable_jvmpi"
2983 if test "$enable_jvmpi" != no; then
2984 cat >> confdefs.h <<\EOF
2985 #define ENABLE_JVMPI 1
2990 TARGET_ECOS=${PROCESS-"no"}
2991 # Check whether --with-ecos or --without-ecos was given.
2992 if test "${with_ecos+set}" = set; then
2993 withval="$with_ecos"
2994 TARGET_ECOS="$with_ecos"
2999 EXTRA_CC_FILES=
3002 PLATFORMOBJS=
3003 case "$TARGET_ECOS" in
3004 no) case "$host" in
3005 *mingw*)
3006 PLATFORM=Win32
3007 PLATFORMNET=Win32
3008 PLATFORMOBJS=win32.lo
3009 PLATFORMH=win32.h
3011 echo $ac_n "checking whether 'ld' is at least 2.13""... $ac_c" 1>&6
3012 echo "configure:3013: checking whether 'ld' is at least 2.13" >&5
3013 LD_PROG=`$CC --print-prog-name=ld`
3014 LD_VERSION=`$LD_PROG --version`
3015 LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
3016 LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
3017 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
3018 LD_OK="ok"
3019 else
3020 if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
3021 LD_OK="ok"
3024 if test "x$LD_OK" != x; then
3025 echo "$ac_t""yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
3026 else
3027 echo "$ac_t""no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
3028 echo "configure: warning: ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack..." 1>&2
3029 cat >> confdefs.h <<\EOF
3030 #define JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS 1
3036 PLATFORM=Posix
3037 PLATFORMNET=Posix
3038 PLATFORMOBJS=posix.lo
3039 PLATFORMH=posix.h
3041 esac
3044 PLATFORM=Ecos
3045 PLATFORMNET=NoNet
3046 cat >> confdefs.h <<\EOF
3047 #define ECOS 1
3050 PLATFORMOBJS=posix.lo
3051 PLATFORMH=posix.h
3053 esac
3057 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3058 echo "configure:3059: checking how to run the C preprocessor" >&5
3059 # On Suns, sometimes $CPP names a directory.
3060 if test -n "$CPP" && test -d "$CPP"; then
3061 CPP=
3063 if test -z "$CPP"; then
3064 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3065 echo $ac_n "(cached) $ac_c" 1>&6
3066 else
3067 # This must be in double quotes, not single quotes, because CPP may get
3068 # substituted into the Makefile and "${CC-cc}" will confuse make.
3069 CPP="${CC-cc} -E"
3070 # On the NeXT, cc -E runs the code through the compiler's parser,
3071 # not just through cpp.
3072 cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075 #include <assert.h>
3076 Syntax Error
3078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3079 { (eval echo configure:3080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3080 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3081 if test -z "$ac_err"; then
3083 else
3084 echo "$ac_err" >&5
3085 echo "configure: failed program was:" >&5
3086 cat conftest.$ac_ext >&5
3087 rm -rf conftest*
3088 CPP="${CC-cc} -E -traditional-cpp"
3089 cat > conftest.$ac_ext <<EOF
3090 #line 3091 "configure"
3091 #include "confdefs.h"
3092 #include <assert.h>
3093 Syntax Error
3095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3096 { (eval echo configure:3097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3098 if test -z "$ac_err"; then
3100 else
3101 echo "$ac_err" >&5
3102 echo "configure: failed program was:" >&5
3103 cat conftest.$ac_ext >&5
3104 rm -rf conftest*
3105 CPP="${CC-cc} -nologo -E"
3106 cat > conftest.$ac_ext <<EOF
3107 #line 3108 "configure"
3108 #include "confdefs.h"
3109 #include <assert.h>
3110 Syntax Error
3112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3113 { (eval echo configure:3114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3115 if test -z "$ac_err"; then
3117 else
3118 echo "$ac_err" >&5
3119 echo "configure: failed program was:" >&5
3120 cat conftest.$ac_ext >&5
3121 rm -rf conftest*
3122 CPP=/lib/cpp
3124 rm -f conftest*
3126 rm -f conftest*
3128 rm -f conftest*
3129 ac_cv_prog_CPP="$CPP"
3131 CPP="$ac_cv_prog_CPP"
3132 else
3133 ac_cv_prog_CPP="$CPP"
3135 echo "$ac_t""$CPP" 1>&6
3137 cat > conftest.$ac_ext <<EOF
3138 #line 3139 "configure"
3139 #include "confdefs.h"
3140 #include <stdint.h>
3142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3143 egrep "uint32_t" >/dev/null 2>&1; then
3144 rm -rf conftest*
3145 cat >> confdefs.h <<\EOF
3146 #define HAVE_INT32_DEFINED 1
3150 rm -f conftest*
3152 cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 #include <inttypes.h>
3157 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3158 egrep "uint32_t" >/dev/null 2>&1; then
3159 rm -rf conftest*
3160 cat >> confdefs.h <<\EOF
3161 #define HAVE_INT32_DEFINED 1
3165 rm -f conftest*
3167 cat > conftest.$ac_ext <<EOF
3168 #line 3169 "configure"
3169 #include "confdefs.h"
3170 #include <sys/types.h>
3172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3173 egrep "u_int32_t" >/dev/null 2>&1; then
3174 rm -rf conftest*
3175 cat >> confdefs.h <<\EOF
3176 #define HAVE_BSD_INT32_DEFINED 1
3180 rm -f conftest*
3182 cat > conftest.$ac_ext <<EOF
3183 #line 3184 "configure"
3184 #include "confdefs.h"
3185 #include <sys/config.h>
3187 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3188 egrep "u_int32_t" >/dev/null 2>&1; then
3189 rm -rf conftest*
3190 cat >> confdefs.h <<\EOF
3191 #define HAVE_BSD_INT32_DEFINED 1
3195 rm -f conftest*
3199 cat > conftest.$ac_ext <<EOF
3200 #line 3201 "configure"
3201 #include "confdefs.h"
3202 #include <time.h>
3204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3205 egrep "mktime" >/dev/null 2>&1; then
3206 rm -rf conftest*
3207 cat >> confdefs.h <<\EOF
3208 #define HAVE_MKTIME 1
3212 rm -f conftest*
3214 cat > conftest.$ac_ext <<EOF
3215 #line 3216 "configure"
3216 #include "confdefs.h"
3217 #include <time.h>
3219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3220 egrep "localtime" >/dev/null 2>&1; then
3221 rm -rf conftest*
3222 cat >> confdefs.h <<\EOF
3223 #define HAVE_LOCALTIME 1
3227 rm -f conftest*
3230 test -d java || mkdir java
3231 test -d java/io || mkdir java/io
3232 test -d gnu || mkdir gnu
3236 test -d java/lang || mkdir java/lang
3240 test -d java/net || mkdir java/net
3244 test -d gnu/java || mkdir gnu/java
3245 test -d gnu/java/net || mkdir gnu/java/net
3249 test -d gnu/java/nio || mkdir gnu/java/nio
3253 case "${host}" in
3254 *mingw*)
3255 SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32"
3256 if test "${with_win32_nlsapi}" = "unicows"; then
3257 SYSTEMSPEC="-lunicows $SYSTEMSPEC"
3261 SYSTEMSPEC=
3263 esac
3266 LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
3269 # Check whether --with-system-zlib or --without-system-zlib was given.
3270 if test "${with_system_zlib+set}" = set; then
3271 withval="$with_system_zlib"
3275 ZLIBSPEC=
3277 ZLIBTESTSPEC=
3280 # If we find X, set shell vars x_includes and x_libraries to the
3281 # paths, otherwise set no_x=yes.
3282 # Uses ac_ vars as temps to allow command line to override cache and checks.
3283 # --without-x overrides everything else, but does not touch the cache.
3284 echo $ac_n "checking for X""... $ac_c" 1>&6
3285 echo "configure:3286: checking for X" >&5
3287 # Check whether --with-x or --without-x was given.
3288 if test "${with_x+set}" = set; then
3289 withval="$with_x"
3293 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3294 if test "x$with_x" = xno; then
3295 # The user explicitly disabled X.
3296 have_x=disabled
3297 else
3298 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3299 # Both variables are already set.
3300 have_x=yes
3301 else
3302 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3303 echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305 # One or both of the vars are not set, and there is no cached value.
3306 ac_x_includes=NO ac_x_libraries=NO
3307 rm -fr conftestdir
3308 if mkdir conftestdir; then
3309 cd conftestdir
3310 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3311 cat > Imakefile <<'EOF'
3312 acfindx:
3313 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3315 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3316 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3317 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3318 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3319 for ac_extension in a so sl; do
3320 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3321 test -f $ac_im_libdir/libX11.$ac_extension; then
3322 ac_im_usrlibdir=$ac_im_libdir; break
3324 done
3325 # Screen out bogus values from the imake configuration. They are
3326 # bogus both because they are the default anyway, and because
3327 # using them would break gcc on systems where it needs fixed includes.
3328 case "$ac_im_incroot" in
3329 /usr/include) ;;
3330 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3331 esac
3332 case "$ac_im_usrlibdir" in
3333 /usr/lib | /lib) ;;
3334 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3335 esac
3337 cd ..
3338 rm -fr conftestdir
3341 if test "$ac_x_includes" = NO; then
3342 # Guess where to find include files, by looking for this one X11 .h file.
3343 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3345 # First, try using that file with no special directory specified.
3346 cat > conftest.$ac_ext <<EOF
3347 #line 3348 "configure"
3348 #include "confdefs.h"
3349 #include <$x_direct_test_include>
3351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3352 { (eval echo configure:3353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3354 if test -z "$ac_err"; then
3355 rm -rf conftest*
3356 # We can compile using X headers with no special include directory.
3357 ac_x_includes=
3358 else
3359 echo "$ac_err" >&5
3360 echo "configure: failed program was:" >&5
3361 cat conftest.$ac_ext >&5
3362 rm -rf conftest*
3363 # Look for the header file in a standard set of common directories.
3364 # Check X11 before X11Rn because it is often a symlink to the current release.
3365 for ac_dir in \
3366 /usr/X11/include \
3367 /usr/X11R6/include \
3368 /usr/X11R5/include \
3369 /usr/X11R4/include \
3371 /usr/include/X11 \
3372 /usr/include/X11R6 \
3373 /usr/include/X11R5 \
3374 /usr/include/X11R4 \
3376 /usr/local/X11/include \
3377 /usr/local/X11R6/include \
3378 /usr/local/X11R5/include \
3379 /usr/local/X11R4/include \
3381 /usr/local/include/X11 \
3382 /usr/local/include/X11R6 \
3383 /usr/local/include/X11R5 \
3384 /usr/local/include/X11R4 \
3386 /usr/X386/include \
3387 /usr/x386/include \
3388 /usr/XFree86/include/X11 \
3390 /usr/include \
3391 /usr/local/include \
3392 /usr/unsupported/include \
3393 /usr/athena/include \
3394 /usr/local/x11r5/include \
3395 /usr/lpp/Xamples/include \
3397 /usr/openwin/include \
3398 /usr/openwin/share/include \
3401 if test -r "$ac_dir/$x_direct_test_include"; then
3402 ac_x_includes=$ac_dir
3403 break
3405 done
3407 rm -f conftest*
3408 fi # $ac_x_includes = NO
3410 if test "$ac_x_libraries" = NO; then
3411 # Check for the libraries.
3413 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3414 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3416 # See if we find them without any special options.
3417 # Don't add to $LIBS permanently.
3418 ac_save_LIBS="$LIBS"
3419 LIBS="-l$x_direct_test_library $LIBS"
3420 cat > conftest.$ac_ext <<EOF
3421 #line 3422 "configure"
3422 #include "confdefs.h"
3424 int main() {
3425 ${x_direct_test_function}()
3426 ; return 0; }
3428 if { (eval echo configure:3429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3429 rm -rf conftest*
3430 LIBS="$ac_save_LIBS"
3431 # We can link X programs with no special library path.
3432 ac_x_libraries=
3433 else
3434 echo "configure: failed program was:" >&5
3435 cat conftest.$ac_ext >&5
3436 rm -rf conftest*
3437 LIBS="$ac_save_LIBS"
3438 # First see if replacing the include by lib works.
3439 # Check X11 before X11Rn because it is often a symlink to the current release.
3440 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3441 /usr/X11/lib \
3442 /usr/X11R6/lib \
3443 /usr/X11R5/lib \
3444 /usr/X11R4/lib \
3446 /usr/lib/X11 \
3447 /usr/lib/X11R6 \
3448 /usr/lib/X11R5 \
3449 /usr/lib/X11R4 \
3451 /usr/local/X11/lib \
3452 /usr/local/X11R6/lib \
3453 /usr/local/X11R5/lib \
3454 /usr/local/X11R4/lib \
3456 /usr/local/lib/X11 \
3457 /usr/local/lib/X11R6 \
3458 /usr/local/lib/X11R5 \
3459 /usr/local/lib/X11R4 \
3461 /usr/X386/lib \
3462 /usr/x386/lib \
3463 /usr/XFree86/lib/X11 \
3465 /usr/lib \
3466 /usr/local/lib \
3467 /usr/unsupported/lib \
3468 /usr/athena/lib \
3469 /usr/local/x11r5/lib \
3470 /usr/lpp/Xamples/lib \
3471 /lib/usr/lib/X11 \
3473 /usr/openwin/lib \
3474 /usr/openwin/share/lib \
3477 for ac_extension in a so sl; do
3478 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3479 ac_x_libraries=$ac_dir
3480 break 2
3482 done
3483 done
3485 rm -f conftest*
3486 fi # $ac_x_libraries = NO
3488 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3489 # Didn't find X anywhere. Cache the known absence of X.
3490 ac_cv_have_x="have_x=no"
3491 else
3492 # Record where we found X for the cache.
3493 ac_cv_have_x="have_x=yes \
3494 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3498 eval "$ac_cv_have_x"
3499 fi # $with_x != no
3501 if test "$have_x" != yes; then
3502 echo "$ac_t""$have_x" 1>&6
3503 no_x=yes
3504 else
3505 # If each of the values was on the command line, it overrides each guess.
3506 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3507 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3508 # Update the cache value to reflect the command line values.
3509 ac_cv_have_x="have_x=yes \
3510 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3511 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3514 if test "$no_x" = yes; then
3515 # Not all programs may use this symbol, but it does not hurt to define it.
3516 cat >> confdefs.h <<\EOF
3517 #define X_DISPLAY_MISSING 1
3520 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3521 else
3522 if test -n "$x_includes"; then
3523 X_CFLAGS="$X_CFLAGS -I$x_includes"
3526 # It would also be nice to do this for all -L options, not just this one.
3527 if test -n "$x_libraries"; then
3528 X_LIBS="$X_LIBS -L$x_libraries"
3529 # For Solaris; some versions of Sun CC require a space after -R and
3530 # others require no space. Words are not sufficient . . . .
3531 case "`(uname -sr) 2>/dev/null`" in
3532 "SunOS 5"*)
3533 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
3534 echo "configure:3535: checking whether -R must be followed by a space" >&5
3535 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3536 cat > conftest.$ac_ext <<EOF
3537 #line 3538 "configure"
3538 #include "confdefs.h"
3540 int main() {
3542 ; return 0; }
3544 if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3545 rm -rf conftest*
3546 ac_R_nospace=yes
3547 else
3548 echo "configure: failed program was:" >&5
3549 cat conftest.$ac_ext >&5
3550 rm -rf conftest*
3551 ac_R_nospace=no
3553 rm -f conftest*
3554 if test $ac_R_nospace = yes; then
3555 echo "$ac_t""no" 1>&6
3556 X_LIBS="$X_LIBS -R$x_libraries"
3557 else
3558 LIBS="$ac_xsave_LIBS -R $x_libraries"
3559 cat > conftest.$ac_ext <<EOF
3560 #line 3561 "configure"
3561 #include "confdefs.h"
3563 int main() {
3565 ; return 0; }
3567 if { (eval echo configure:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3568 rm -rf conftest*
3569 ac_R_space=yes
3570 else
3571 echo "configure: failed program was:" >&5
3572 cat conftest.$ac_ext >&5
3573 rm -rf conftest*
3574 ac_R_space=no
3576 rm -f conftest*
3577 if test $ac_R_space = yes; then
3578 echo "$ac_t""yes" 1>&6
3579 X_LIBS="$X_LIBS -R $x_libraries"
3580 else
3581 echo "$ac_t""neither works" 1>&6
3584 LIBS="$ac_xsave_LIBS"
3585 esac
3588 # Check for system-dependent libraries X programs must link with.
3589 # Do this before checking for the system-independent R6 libraries
3590 # (-lICE), since we may need -lsocket or whatever for X linking.
3592 if test "$ISC" = yes; then
3593 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3594 else
3595 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3596 # libraries were built with DECnet support. And karl@cs.umb.edu says
3597 # the Alpha needs dnet_stub (dnet does not exist).
3598 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3599 echo "configure:3600: checking for dnet_ntoa in -ldnet" >&5
3600 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3602 echo $ac_n "(cached) $ac_c" 1>&6
3603 else
3604 ac_save_LIBS="$LIBS"
3605 LIBS="-ldnet $LIBS"
3606 cat > conftest.$ac_ext <<EOF
3607 #line 3608 "configure"
3608 #include "confdefs.h"
3609 /* Override any gcc2 internal prototype to avoid an error. */
3610 /* We use char because int might match the return type of a gcc2
3611 builtin and then its argument prototype would still apply. */
3612 char dnet_ntoa();
3614 int main() {
3615 dnet_ntoa()
3616 ; return 0; }
3618 if { (eval echo configure:3619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3619 rm -rf conftest*
3620 eval "ac_cv_lib_$ac_lib_var=yes"
3621 else
3622 echo "configure: failed program was:" >&5
3623 cat conftest.$ac_ext >&5
3624 rm -rf conftest*
3625 eval "ac_cv_lib_$ac_lib_var=no"
3627 rm -f conftest*
3628 LIBS="$ac_save_LIBS"
3631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3632 echo "$ac_t""yes" 1>&6
3633 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3634 else
3635 echo "$ac_t""no" 1>&6
3638 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3639 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
3640 echo "configure:3641: checking for dnet_ntoa in -ldnet_stub" >&5
3641 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3642 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3643 echo $ac_n "(cached) $ac_c" 1>&6
3644 else
3645 ac_save_LIBS="$LIBS"
3646 LIBS="-ldnet_stub $LIBS"
3647 cat > conftest.$ac_ext <<EOF
3648 #line 3649 "configure"
3649 #include "confdefs.h"
3650 /* Override any gcc2 internal prototype to avoid an error. */
3651 /* We use char because int might match the return type of a gcc2
3652 builtin and then its argument prototype would still apply. */
3653 char dnet_ntoa();
3655 int main() {
3656 dnet_ntoa()
3657 ; return 0; }
3659 if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3660 rm -rf conftest*
3661 eval "ac_cv_lib_$ac_lib_var=yes"
3662 else
3663 echo "configure: failed program was:" >&5
3664 cat conftest.$ac_ext >&5
3665 rm -rf conftest*
3666 eval "ac_cv_lib_$ac_lib_var=no"
3668 rm -f conftest*
3669 LIBS="$ac_save_LIBS"
3672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3673 echo "$ac_t""yes" 1>&6
3674 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3675 else
3676 echo "$ac_t""no" 1>&6
3681 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3682 # to get the SysV transport functions.
3683 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3684 # needs -lnsl.
3685 # The nsl library prevents programs from opening the X display
3686 # on Irix 5.2, according to dickey@clark.net.
3687 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3688 echo "configure:3689: checking for gethostbyname" >&5
3689 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3690 echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692 cat > conftest.$ac_ext <<EOF
3693 #line 3694 "configure"
3694 #include "confdefs.h"
3695 /* System header to define __stub macros and hopefully few prototypes,
3696 which can conflict with char gethostbyname(); below. */
3697 #include <assert.h>
3698 /* Override any gcc2 internal prototype to avoid an error. */
3699 /* We use char because int might match the return type of a gcc2
3700 builtin and then its argument prototype would still apply. */
3701 char gethostbyname();
3703 int main() {
3705 /* The GNU C library defines this for functions which it implements
3706 to always fail with ENOSYS. Some functions are actually named
3707 something starting with __ and the normal name is an alias. */
3708 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3709 choke me
3710 #else
3711 gethostbyname();
3712 #endif
3714 ; return 0; }
3716 if { (eval echo configure:3717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3717 rm -rf conftest*
3718 eval "ac_cv_func_gethostbyname=yes"
3719 else
3720 echo "configure: failed program was:" >&5
3721 cat conftest.$ac_ext >&5
3722 rm -rf conftest*
3723 eval "ac_cv_func_gethostbyname=no"
3725 rm -f conftest*
3728 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3729 echo "$ac_t""yes" 1>&6
3731 else
3732 echo "$ac_t""no" 1>&6
3735 if test $ac_cv_func_gethostbyname = no; then
3736 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3737 echo "configure:3738: checking for gethostbyname in -lnsl" >&5
3738 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3739 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3740 echo $ac_n "(cached) $ac_c" 1>&6
3741 else
3742 ac_save_LIBS="$LIBS"
3743 LIBS="-lnsl $LIBS"
3744 cat > conftest.$ac_ext <<EOF
3745 #line 3746 "configure"
3746 #include "confdefs.h"
3747 /* Override any gcc2 internal prototype to avoid an error. */
3748 /* We use char because int might match the return type of a gcc2
3749 builtin and then its argument prototype would still apply. */
3750 char gethostbyname();
3752 int main() {
3753 gethostbyname()
3754 ; return 0; }
3756 if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3757 rm -rf conftest*
3758 eval "ac_cv_lib_$ac_lib_var=yes"
3759 else
3760 echo "configure: failed program was:" >&5
3761 cat conftest.$ac_ext >&5
3762 rm -rf conftest*
3763 eval "ac_cv_lib_$ac_lib_var=no"
3765 rm -f conftest*
3766 LIBS="$ac_save_LIBS"
3769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3770 echo "$ac_t""yes" 1>&6
3771 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3772 else
3773 echo "$ac_t""no" 1>&6
3778 # lieder@skyler.mavd.honeywell.com says without -lsocket,
3779 # socket/setsockopt and other routines are undefined under SCO ODT
3780 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
3781 # on later versions), says simon@lia.di.epfl.ch: it contains
3782 # gethostby* variants that don't use the nameserver (or something).
3783 # -lsocket must be given before -lnsl if both are needed.
3784 # We assume that if connect needs -lnsl, so does gethostbyname.
3785 echo $ac_n "checking for connect""... $ac_c" 1>&6
3786 echo "configure:3787: checking for connect" >&5
3787 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3788 echo $ac_n "(cached) $ac_c" 1>&6
3789 else
3790 cat > conftest.$ac_ext <<EOF
3791 #line 3792 "configure"
3792 #include "confdefs.h"
3793 /* System header to define __stub macros and hopefully few prototypes,
3794 which can conflict with char connect(); below. */
3795 #include <assert.h>
3796 /* Override any gcc2 internal prototype to avoid an error. */
3797 /* We use char because int might match the return type of a gcc2
3798 builtin and then its argument prototype would still apply. */
3799 char connect();
3801 int main() {
3803 /* The GNU C library defines this for functions which it implements
3804 to always fail with ENOSYS. Some functions are actually named
3805 something starting with __ and the normal name is an alias. */
3806 #if defined (__stub_connect) || defined (__stub___connect)
3807 choke me
3808 #else
3809 connect();
3810 #endif
3812 ; return 0; }
3814 if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3815 rm -rf conftest*
3816 eval "ac_cv_func_connect=yes"
3817 else
3818 echo "configure: failed program was:" >&5
3819 cat conftest.$ac_ext >&5
3820 rm -rf conftest*
3821 eval "ac_cv_func_connect=no"
3823 rm -f conftest*
3826 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3827 echo "$ac_t""yes" 1>&6
3829 else
3830 echo "$ac_t""no" 1>&6
3833 if test $ac_cv_func_connect = no; then
3834 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3835 echo "configure:3836: checking for connect in -lsocket" >&5
3836 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3837 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3838 echo $ac_n "(cached) $ac_c" 1>&6
3839 else
3840 ac_save_LIBS="$LIBS"
3841 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3842 cat > conftest.$ac_ext <<EOF
3843 #line 3844 "configure"
3844 #include "confdefs.h"
3845 /* Override any gcc2 internal prototype to avoid an error. */
3846 /* We use char because int might match the return type of a gcc2
3847 builtin and then its argument prototype would still apply. */
3848 char connect();
3850 int main() {
3851 connect()
3852 ; return 0; }
3854 if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3855 rm -rf conftest*
3856 eval "ac_cv_lib_$ac_lib_var=yes"
3857 else
3858 echo "configure: failed program was:" >&5
3859 cat conftest.$ac_ext >&5
3860 rm -rf conftest*
3861 eval "ac_cv_lib_$ac_lib_var=no"
3863 rm -f conftest*
3864 LIBS="$ac_save_LIBS"
3867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3868 echo "$ac_t""yes" 1>&6
3869 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3870 else
3871 echo "$ac_t""no" 1>&6
3876 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3877 echo $ac_n "checking for remove""... $ac_c" 1>&6
3878 echo "configure:3879: checking for remove" >&5
3879 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3880 echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882 cat > conftest.$ac_ext <<EOF
3883 #line 3884 "configure"
3884 #include "confdefs.h"
3885 /* System header to define __stub macros and hopefully few prototypes,
3886 which can conflict with char remove(); below. */
3887 #include <assert.h>
3888 /* Override any gcc2 internal prototype to avoid an error. */
3889 /* We use char because int might match the return type of a gcc2
3890 builtin and then its argument prototype would still apply. */
3891 char remove();
3893 int main() {
3895 /* The GNU C library defines this for functions which it implements
3896 to always fail with ENOSYS. Some functions are actually named
3897 something starting with __ and the normal name is an alias. */
3898 #if defined (__stub_remove) || defined (__stub___remove)
3899 choke me
3900 #else
3901 remove();
3902 #endif
3904 ; return 0; }
3906 if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3907 rm -rf conftest*
3908 eval "ac_cv_func_remove=yes"
3909 else
3910 echo "configure: failed program was:" >&5
3911 cat conftest.$ac_ext >&5
3912 rm -rf conftest*
3913 eval "ac_cv_func_remove=no"
3915 rm -f conftest*
3918 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3919 echo "$ac_t""yes" 1>&6
3921 else
3922 echo "$ac_t""no" 1>&6
3925 if test $ac_cv_func_remove = no; then
3926 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3927 echo "configure:3928: checking for remove in -lposix" >&5
3928 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3929 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3930 echo $ac_n "(cached) $ac_c" 1>&6
3931 else
3932 ac_save_LIBS="$LIBS"
3933 LIBS="-lposix $LIBS"
3934 cat > conftest.$ac_ext <<EOF
3935 #line 3936 "configure"
3936 #include "confdefs.h"
3937 /* Override any gcc2 internal prototype to avoid an error. */
3938 /* We use char because int might match the return type of a gcc2
3939 builtin and then its argument prototype would still apply. */
3940 char remove();
3942 int main() {
3943 remove()
3944 ; return 0; }
3946 if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3947 rm -rf conftest*
3948 eval "ac_cv_lib_$ac_lib_var=yes"
3949 else
3950 echo "configure: failed program was:" >&5
3951 cat conftest.$ac_ext >&5
3952 rm -rf conftest*
3953 eval "ac_cv_lib_$ac_lib_var=no"
3955 rm -f conftest*
3956 LIBS="$ac_save_LIBS"
3959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3960 echo "$ac_t""yes" 1>&6
3961 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3962 else
3963 echo "$ac_t""no" 1>&6
3968 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3969 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3970 echo "configure:3971: checking for shmat" >&5
3971 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3972 echo $ac_n "(cached) $ac_c" 1>&6
3973 else
3974 cat > conftest.$ac_ext <<EOF
3975 #line 3976 "configure"
3976 #include "confdefs.h"
3977 /* System header to define __stub macros and hopefully few prototypes,
3978 which can conflict with char shmat(); below. */
3979 #include <assert.h>
3980 /* Override any gcc2 internal prototype to avoid an error. */
3981 /* We use char because int might match the return type of a gcc2
3982 builtin and then its argument prototype would still apply. */
3983 char shmat();
3985 int main() {
3987 /* The GNU C library defines this for functions which it implements
3988 to always fail with ENOSYS. Some functions are actually named
3989 something starting with __ and the normal name is an alias. */
3990 #if defined (__stub_shmat) || defined (__stub___shmat)
3991 choke me
3992 #else
3993 shmat();
3994 #endif
3996 ; return 0; }
3998 if { (eval echo configure:3999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3999 rm -rf conftest*
4000 eval "ac_cv_func_shmat=yes"
4001 else
4002 echo "configure: failed program was:" >&5
4003 cat conftest.$ac_ext >&5
4004 rm -rf conftest*
4005 eval "ac_cv_func_shmat=no"
4007 rm -f conftest*
4010 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
4011 echo "$ac_t""yes" 1>&6
4013 else
4014 echo "$ac_t""no" 1>&6
4017 if test $ac_cv_func_shmat = no; then
4018 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
4019 echo "configure:4020: checking for shmat in -lipc" >&5
4020 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
4021 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4022 echo $ac_n "(cached) $ac_c" 1>&6
4023 else
4024 ac_save_LIBS="$LIBS"
4025 LIBS="-lipc $LIBS"
4026 cat > conftest.$ac_ext <<EOF
4027 #line 4028 "configure"
4028 #include "confdefs.h"
4029 /* Override any gcc2 internal prototype to avoid an error. */
4030 /* We use char because int might match the return type of a gcc2
4031 builtin and then its argument prototype would still apply. */
4032 char shmat();
4034 int main() {
4035 shmat()
4036 ; return 0; }
4038 if { (eval echo configure:4039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4039 rm -rf conftest*
4040 eval "ac_cv_lib_$ac_lib_var=yes"
4041 else
4042 echo "configure: failed program was:" >&5
4043 cat conftest.$ac_ext >&5
4044 rm -rf conftest*
4045 eval "ac_cv_lib_$ac_lib_var=no"
4047 rm -f conftest*
4048 LIBS="$ac_save_LIBS"
4051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4052 echo "$ac_t""yes" 1>&6
4053 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
4054 else
4055 echo "$ac_t""no" 1>&6
4061 # Check for libraries that X11R6 Xt/Xaw programs need.
4062 ac_save_LDFLAGS="$LDFLAGS"
4063 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
4064 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
4065 # check for ICE first), but we must link in the order -lSM -lICE or
4066 # we get undefined symbols. So assume we have SM if we have ICE.
4067 # These have to be linked with before -lX11, unlike the other
4068 # libraries we check for below, so use a different variable.
4069 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
4070 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
4071 echo "configure:4072: checking for IceConnectionNumber in -lICE" >&5
4072 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
4073 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4074 echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076 ac_save_LIBS="$LIBS"
4077 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
4078 cat > conftest.$ac_ext <<EOF
4079 #line 4080 "configure"
4080 #include "confdefs.h"
4081 /* Override any gcc2 internal prototype to avoid an error. */
4082 /* We use char because int might match the return type of a gcc2
4083 builtin and then its argument prototype would still apply. */
4084 char IceConnectionNumber();
4086 int main() {
4087 IceConnectionNumber()
4088 ; return 0; }
4090 if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4091 rm -rf conftest*
4092 eval "ac_cv_lib_$ac_lib_var=yes"
4093 else
4094 echo "configure: failed program was:" >&5
4095 cat conftest.$ac_ext >&5
4096 rm -rf conftest*
4097 eval "ac_cv_lib_$ac_lib_var=no"
4099 rm -f conftest*
4100 LIBS="$ac_save_LIBS"
4103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4104 echo "$ac_t""yes" 1>&6
4105 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
4106 else
4107 echo "$ac_t""no" 1>&6
4110 LDFLAGS="$ac_save_LDFLAGS"
4115 # Check whether --enable-java-awt or --disable-java-awt was given.
4116 if test "${enable_java_awt+set}" = set; then
4117 enableval="$enable_java_awt"
4122 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
4123 use_xlib_awt=""
4124 use_gtk_awt=""
4125 # The default toolkit to use is the first one specified.
4126 TOOLKIT=
4129 for peer in $peerlibs ; do
4130 case $peer in
4131 xlib)
4132 if test "$no_x" = yes; then
4133 echo "*** xlib peers requested but no X library available" 1>&2
4134 exit 1
4135 else
4136 use_xlib_awt="yes"
4137 if test -z "$TOOLKIT"; then
4138 TOOLKIT=gnu.awt.xlib.XToolkit
4142 gtk)
4143 if test "$no_x" = yes; then
4144 echo "*** xlib peers requested but no X library available" 1>&2
4145 exit 1
4146 else
4147 use_gtk_awt=yes
4148 if test -z "$TOOLKIT"; then
4149 TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit
4151 test -d jniinclude || mkdir jniinclude
4155 use_xlib_awt=
4156 use_gtk_awt=
4157 break
4160 echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
4161 exit 1
4162 esac
4163 done
4167 if test "$use_xlib_awt" = yes; then
4168 XLIB_AWT_TRUE=
4169 XLIB_AWT_FALSE='#'
4170 else
4171 XLIB_AWT_TRUE='#'
4172 XLIB_AWT_FALSE=
4176 if test "$use_gtk_awt" = yes; then
4177 GTK_AWT_TRUE=
4178 GTK_AWT_FALSE='#'
4179 else
4180 GTK_AWT_TRUE='#'
4181 GTK_AWT_FALSE=
4185 libsubdir=.libs
4187 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
4188 echo "configure:4189: checking for garbage collector to use" >&5
4189 # Check whether --enable-java-gc or --disable-java-gc was given.
4190 if test "${enable_java_gc+set}" = set; then
4191 enableval="$enable_java_gc"
4193 GC=$enableval
4194 else
4195 GC=boehm
4198 GCLIBS=
4199 GCINCS=
4200 GCDEPS=
4201 GCOBJS=
4202 GCSPEC=
4203 JC1GCSPEC=
4204 GCTESTSPEC=
4205 case "$GC" in
4206 boehm)
4207 echo "$ac_t""boehm" 1>&6
4208 GCLIBS=../boehm-gc/libgcjgc_convenience.la
4209 JC1GCSPEC='-fuse-boehm-gc'
4210 GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
4212 GCINCS="`cat ../boehm-gc/boehm-cflags`"
4213 GCOBJS=boehm.lo
4214 GCHDR=boehm-gc.h
4215 cat >> confdefs.h <<\EOF
4216 #define HAVE_BOEHM_GC 1
4221 echo "$ac_t""none" 1>&6
4222 GCOBJS=nogc.lo
4223 GCHDR=no-gc.h
4226 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
4228 esac
4239 echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
4240 echo "configure:4241: checking for thread model used by GCC" >&5
4241 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
4242 echo "$ac_t""$THREADS" 1>&6
4244 case "$THREADS" in
4245 no | none | single)
4246 THREADS=none
4248 posix | pthreads)
4249 THREADS=posix
4250 case "$host" in
4251 *-*-linux*)
4252 cat >> confdefs.h <<\EOF
4253 #define LINUX_THREADS 1
4257 esac
4259 win32)
4261 decosf1 | irix | mach | os2 | solaris | dce | vxworks)
4262 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
4265 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
4267 esac
4269 THREADCXXFLAGS=
4270 THREADLDFLAGS=
4271 THREADLIBS=
4272 THREADINCS=
4273 THREADDEPS=
4274 THREADOBJS=
4275 THREADH=
4276 THREADSPEC=
4277 case "$THREADS" in
4278 posix)
4279 case "$host" in
4280 *-*-cygwin*)
4281 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
4284 *-*-freebsd[1234]*)
4286 # Before FreeBSD 5, it didn't have -lpthread (or any library which
4287 # merely adds pthread_* functions) but it does have a -pthread switch
4288 # which is required at link-time to select -lc_r *instead* of -lc.
4289 THREADLDFLAGS=-pthread
4290 # Don't set THREADSPEC here as might be expected since -pthread is
4291 # not processed when found within a spec file, it must come from
4292 # the command line. For now, the user must provide the -pthread
4293 # switch to link code compiled with gcj. In future, consider adding
4294 # support for weak references to pthread_* functions ala gthr.h API.
4295 THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
4297 *-*-freebsd*)
4298 # FreeBSD 5 implements a model much closer to other modern UNIX
4299 # which support threads. However, it still does not support
4300 # -lpthread.
4301 THREADLDFLAGS=-pthread
4302 THREADSPEC=-lc_r
4304 alpha*-dec-osf*)
4305 THREADCXXFLAGS=-pthread
4306 # boehm-gc needs some functions from librt, so link that too.
4307 THREADLIBS='-lpthread -lrt'
4308 THREADSPEC='-lpthread -lrt'
4311 THREADLIBS=-lpthread
4312 THREADSPEC=-lpthread
4314 esac
4315 THREADOBJS=posix-threads.lo
4316 THREADH=posix-threads.h
4317 # MIT pthreads doesn't seem to have the mutexattr functions.
4318 # But for now we don't check for it. We just assume you aren't
4319 # using MIT pthreads.
4320 cat >> confdefs.h <<\EOF
4321 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
4325 # If we're using the Boehm GC, then we happen to know that it
4326 # defines _REENTRANT, so we don't bother. Eww.
4327 if test "$GC" != boehm; then
4328 cat >> confdefs.h <<\EOF
4329 #define _REENTRANT 1
4333 cat >> confdefs.h <<\EOF
4334 #define _POSIX_PTHREAD_SEMANTICS 1
4339 win32)
4340 THREADOBJS=win32-threads.lo
4341 THREADH=win32-threads.h
4344 none)
4345 THREADOBJS=no-threads.lo
4346 THREADH=no-threads.h
4348 esac
4358 if test -d sysdep; then true; else mkdir sysdep; fi
4361 HASH_SYNC_SPEC=
4362 # Hash synchronization is only useful with posix threads right now.
4363 if test "$enable_hash_synchronization" = yes && test "$THREADS" != "none"; then
4364 HASH_SYNC_SPEC=-fhash-synchronization
4365 cat >> confdefs.h <<\EOF
4366 #define JV_HASH_SYNCHRONIZATION 1
4375 if test "$GCC" = yes; then
4376 USING_GCC_TRUE=
4377 USING_GCC_FALSE='#'
4378 else
4379 USING_GCC_TRUE='#'
4380 USING_GCC_FALSE=
4383 CANADIAN=no
4384 NULL_TARGET=no
4385 NATIVE=yes
4387 # We're in the tree with gcc, and need to include some of its headers.
4388 GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
4390 # Figure out where generated headers like libgcj-config.h get installed.
4391 gcc_version_trigger=${libgcj_basedir}/../gcc/version.c
4392 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4393 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4394 tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include
4398 if test "x${with_newlib}" = "xyes"; then
4399 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
4400 # may not work correctly, because the compiler may not be able to
4401 # link executables.
4403 # We assume newlib. This lets us hard-code the functions we know
4404 # we'll have.
4405 cat >> confdefs.h <<\EOF
4406 #define HAVE_MEMMOVE 1
4409 cat >> confdefs.h <<\EOF
4410 #define HAVE_MEMCPY 1
4413 cat >> confdefs.h <<\EOF
4414 #define HAVE_STRERROR 1
4417 cat >> confdefs.h <<\EOF
4418 #define HAVE_TIME 1
4421 cat >> confdefs.h <<\EOF
4422 #define HAVE_GMTIME_R 1
4425 cat >> confdefs.h <<\EOF
4426 #define HAVE_LOCALTIME_R 1
4429 cat >> confdefs.h <<\EOF
4430 #define HAVE_USLEEP_DECL 1
4433 cat >> confdefs.h <<\EOF
4434 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
4437 cat >> confdefs.h <<\EOF
4438 #define HAVE_ALLOCA 1
4442 cat >> confdefs.h <<\EOF
4443 #define NO_GETUID 1
4446 PLATFORMNET=NoNet
4447 else
4448 for ac_func in strerror ioctl select fstat open fsync sleep opendir
4450 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4451 echo "configure:4452: checking for $ac_func" >&5
4452 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4453 echo $ac_n "(cached) $ac_c" 1>&6
4454 else
4455 cat > conftest.$ac_ext <<EOF
4456 #line 4457 "configure"
4457 #include "confdefs.h"
4458 /* System header to define __stub macros and hopefully few prototypes,
4459 which can conflict with char $ac_func(); below. */
4460 #include <assert.h>
4461 /* Override any gcc2 internal prototype to avoid an error. */
4462 /* We use char because int might match the return type of a gcc2
4463 builtin and then its argument prototype would still apply. */
4464 char $ac_func();
4466 int main() {
4468 /* The GNU C library defines this for functions which it implements
4469 to always fail with ENOSYS. Some functions are actually named
4470 something starting with __ and the normal name is an alias. */
4471 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4472 choke me
4473 #else
4474 $ac_func();
4475 #endif
4477 ; return 0; }
4479 if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4480 rm -rf conftest*
4481 eval "ac_cv_func_$ac_func=yes"
4482 else
4483 echo "configure: failed program was:" >&5
4484 cat conftest.$ac_ext >&5
4485 rm -rf conftest*
4486 eval "ac_cv_func_$ac_func=no"
4488 rm -f conftest*
4491 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4492 echo "$ac_t""yes" 1>&6
4493 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4494 cat >> confdefs.h <<EOF
4495 #define $ac_tr_func 1
4498 else
4499 echo "$ac_t""no" 1>&6
4501 done
4503 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
4505 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4506 echo "configure:4507: checking for $ac_func" >&5
4507 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4508 echo $ac_n "(cached) $ac_c" 1>&6
4509 else
4510 cat > conftest.$ac_ext <<EOF
4511 #line 4512 "configure"
4512 #include "confdefs.h"
4513 /* System header to define __stub macros and hopefully few prototypes,
4514 which can conflict with char $ac_func(); below. */
4515 #include <assert.h>
4516 /* Override any gcc2 internal prototype to avoid an error. */
4517 /* We use char because int might match the return type of a gcc2
4518 builtin and then its argument prototype would still apply. */
4519 char $ac_func();
4521 int main() {
4523 /* The GNU C library defines this for functions which it implements
4524 to always fail with ENOSYS. Some functions are actually named
4525 something starting with __ and the normal name is an alias. */
4526 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4527 choke me
4528 #else
4529 $ac_func();
4530 #endif
4532 ; return 0; }
4534 if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4535 rm -rf conftest*
4536 eval "ac_cv_func_$ac_func=yes"
4537 else
4538 echo "configure: failed program was:" >&5
4539 cat conftest.$ac_ext >&5
4540 rm -rf conftest*
4541 eval "ac_cv_func_$ac_func=no"
4543 rm -f conftest*
4546 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4547 echo "$ac_t""yes" 1>&6
4548 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4549 cat >> confdefs.h <<EOF
4550 #define $ac_tr_func 1
4553 else
4554 echo "$ac_t""no" 1>&6
4556 done
4558 for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
4560 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4561 echo "configure:4562: checking for $ac_func" >&5
4562 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4563 echo $ac_n "(cached) $ac_c" 1>&6
4564 else
4565 cat > conftest.$ac_ext <<EOF
4566 #line 4567 "configure"
4567 #include "confdefs.h"
4568 /* System header to define __stub macros and hopefully few prototypes,
4569 which can conflict with char $ac_func(); below. */
4570 #include <assert.h>
4571 /* Override any gcc2 internal prototype to avoid an error. */
4572 /* We use char because int might match the return type of a gcc2
4573 builtin and then its argument prototype would still apply. */
4574 char $ac_func();
4576 int main() {
4578 /* The GNU C library defines this for functions which it implements
4579 to always fail with ENOSYS. Some functions are actually named
4580 something starting with __ and the normal name is an alias. */
4581 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4582 choke me
4583 #else
4584 $ac_func();
4585 #endif
4587 ; return 0; }
4589 if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4590 rm -rf conftest*
4591 eval "ac_cv_func_$ac_func=yes"
4592 else
4593 echo "configure: failed program was:" >&5
4594 cat conftest.$ac_ext >&5
4595 rm -rf conftest*
4596 eval "ac_cv_func_$ac_func=no"
4598 rm -f conftest*
4601 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4602 echo "$ac_t""yes" 1>&6
4603 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4604 cat >> confdefs.h <<EOF
4605 #define $ac_tr_func 1
4608 else
4609 echo "$ac_t""no" 1>&6
4611 done
4613 for ac_func in nl_langinfo setlocale
4615 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4616 echo "configure:4617: checking for $ac_func" >&5
4617 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4618 echo $ac_n "(cached) $ac_c" 1>&6
4619 else
4620 cat > conftest.$ac_ext <<EOF
4621 #line 4622 "configure"
4622 #include "confdefs.h"
4623 /* System header to define __stub macros and hopefully few prototypes,
4624 which can conflict with char $ac_func(); below. */
4625 #include <assert.h>
4626 /* Override any gcc2 internal prototype to avoid an error. */
4627 /* We use char because int might match the return type of a gcc2
4628 builtin and then its argument prototype would still apply. */
4629 char $ac_func();
4631 int main() {
4633 /* The GNU C library defines this for functions which it implements
4634 to always fail with ENOSYS. Some functions are actually named
4635 something starting with __ and the normal name is an alias. */
4636 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4637 choke me
4638 #else
4639 $ac_func();
4640 #endif
4642 ; return 0; }
4644 if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4645 rm -rf conftest*
4646 eval "ac_cv_func_$ac_func=yes"
4647 else
4648 echo "configure: failed program was:" >&5
4649 cat conftest.$ac_ext >&5
4650 rm -rf conftest*
4651 eval "ac_cv_func_$ac_func=no"
4653 rm -f conftest*
4656 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4657 echo "$ac_t""yes" 1>&6
4658 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4659 cat >> confdefs.h <<EOF
4660 #define $ac_tr_func 1
4663 else
4664 echo "$ac_t""no" 1>&6
4666 done
4668 for ac_func in inet_aton inet_addr
4670 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4671 echo "configure:4672: checking for $ac_func" >&5
4672 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4673 echo $ac_n "(cached) $ac_c" 1>&6
4674 else
4675 cat > conftest.$ac_ext <<EOF
4676 #line 4677 "configure"
4677 #include "confdefs.h"
4678 /* System header to define __stub macros and hopefully few prototypes,
4679 which can conflict with char $ac_func(); below. */
4680 #include <assert.h>
4681 /* Override any gcc2 internal prototype to avoid an error. */
4682 /* We use char because int might match the return type of a gcc2
4683 builtin and then its argument prototype would still apply. */
4684 char $ac_func();
4686 int main() {
4688 /* The GNU C library defines this for functions which it implements
4689 to always fail with ENOSYS. Some functions are actually named
4690 something starting with __ and the normal name is an alias. */
4691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4692 choke me
4693 #else
4694 $ac_func();
4695 #endif
4697 ; return 0; }
4699 if { (eval echo configure:4700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4700 rm -rf conftest*
4701 eval "ac_cv_func_$ac_func=yes"
4702 else
4703 echo "configure: failed program was:" >&5
4704 cat conftest.$ac_ext >&5
4705 rm -rf conftest*
4706 eval "ac_cv_func_$ac_func=no"
4708 rm -f conftest*
4711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4712 echo "$ac_t""yes" 1>&6
4713 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4714 cat >> confdefs.h <<EOF
4715 #define $ac_tr_func 1
4717 break
4718 else
4719 echo "$ac_t""no" 1>&6
4721 done
4723 for ac_func in inet_pton uname inet_ntoa
4725 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4726 echo "configure:4727: checking for $ac_func" >&5
4727 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4728 echo $ac_n "(cached) $ac_c" 1>&6
4729 else
4730 cat > conftest.$ac_ext <<EOF
4731 #line 4732 "configure"
4732 #include "confdefs.h"
4733 /* System header to define __stub macros and hopefully few prototypes,
4734 which can conflict with char $ac_func(); below. */
4735 #include <assert.h>
4736 /* Override any gcc2 internal prototype to avoid an error. */
4737 /* We use char because int might match the return type of a gcc2
4738 builtin and then its argument prototype would still apply. */
4739 char $ac_func();
4741 int main() {
4743 /* The GNU C library defines this for functions which it implements
4744 to always fail with ENOSYS. Some functions are actually named
4745 something starting with __ and the normal name is an alias. */
4746 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4747 choke me
4748 #else
4749 $ac_func();
4750 #endif
4752 ; return 0; }
4754 if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4755 rm -rf conftest*
4756 eval "ac_cv_func_$ac_func=yes"
4757 else
4758 echo "configure: failed program was:" >&5
4759 cat conftest.$ac_ext >&5
4760 rm -rf conftest*
4761 eval "ac_cv_func_$ac_func=no"
4763 rm -f conftest*
4766 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4767 echo "$ac_t""yes" 1>&6
4768 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4769 cat >> confdefs.h <<EOF
4770 #define $ac_tr_func 1
4773 else
4774 echo "$ac_t""no" 1>&6
4776 done
4778 for ac_func in fork execvp pipe sigaction ftruncate
4780 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4781 echo "configure:4782: checking for $ac_func" >&5
4782 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4783 echo $ac_n "(cached) $ac_c" 1>&6
4784 else
4785 cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 /* System header to define __stub macros and hopefully few prototypes,
4789 which can conflict with char $ac_func(); below. */
4790 #include <assert.h>
4791 /* Override any gcc2 internal prototype to avoid an error. */
4792 /* We use char because int might match the return type of a gcc2
4793 builtin and then its argument prototype would still apply. */
4794 char $ac_func();
4796 int main() {
4798 /* The GNU C library defines this for functions which it implements
4799 to always fail with ENOSYS. Some functions are actually named
4800 something starting with __ and the normal name is an alias. */
4801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4802 choke me
4803 #else
4804 $ac_func();
4805 #endif
4807 ; return 0; }
4809 if { (eval echo configure:4810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4810 rm -rf conftest*
4811 eval "ac_cv_func_$ac_func=yes"
4812 else
4813 echo "configure: failed program was:" >&5
4814 cat conftest.$ac_ext >&5
4815 rm -rf conftest*
4816 eval "ac_cv_func_$ac_func=no"
4818 rm -f conftest*
4821 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4822 echo "$ac_t""yes" 1>&6
4823 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4824 cat >> confdefs.h <<EOF
4825 #define $ac_tr_func 1
4828 else
4829 echo "$ac_t""no" 1>&6
4831 done
4833 for ac_hdr in execinfo.h unistd.h dlfcn.h
4835 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4836 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4837 echo "configure:4838: checking for $ac_hdr" >&5
4838 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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 #include <$ac_hdr>
4846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4847 { (eval echo configure:4848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4849 if test -z "$ac_err"; then
4850 rm -rf conftest*
4851 eval "ac_cv_header_$ac_safe=yes"
4852 else
4853 echo "$ac_err" >&5
4854 echo "configure: failed program was:" >&5
4855 cat conftest.$ac_ext >&5
4856 rm -rf conftest*
4857 eval "ac_cv_header_$ac_safe=no"
4859 rm -f conftest*
4861 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4862 echo "$ac_t""yes" 1>&6
4863 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4864 cat >> confdefs.h <<EOF
4865 #define $ac_tr_hdr 1
4868 else
4869 echo "$ac_t""no" 1>&6
4871 done
4873 echo $ac_n "checking for backtrace""... $ac_c" 1>&6
4874 echo "configure:4875: checking for backtrace" >&5
4875 if eval "test \"`echo '$''{'ac_cv_func_backtrace'+set}'`\" = set"; then
4876 echo $ac_n "(cached) $ac_c" 1>&6
4877 else
4878 cat > conftest.$ac_ext <<EOF
4879 #line 4880 "configure"
4880 #include "confdefs.h"
4881 /* System header to define __stub macros and hopefully few prototypes,
4882 which can conflict with char backtrace(); below. */
4883 #include <assert.h>
4884 /* Override any gcc2 internal prototype to avoid an error. */
4885 /* We use char because int might match the return type of a gcc2
4886 builtin and then its argument prototype would still apply. */
4887 char backtrace();
4889 int main() {
4891 /* The GNU C library defines this for functions which it implements
4892 to always fail with ENOSYS. Some functions are actually named
4893 something starting with __ and the normal name is an alias. */
4894 #if defined (__stub_backtrace) || defined (__stub___backtrace)
4895 choke me
4896 #else
4897 backtrace();
4898 #endif
4900 ; return 0; }
4902 if { (eval echo configure:4903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4903 rm -rf conftest*
4904 eval "ac_cv_func_backtrace=yes"
4905 else
4906 echo "configure: failed program was:" >&5
4907 cat conftest.$ac_ext >&5
4908 rm -rf conftest*
4909 eval "ac_cv_func_backtrace=no"
4911 rm -f conftest*
4914 if eval "test \"`echo '$ac_cv_func_'backtrace`\" = yes"; then
4915 echo "$ac_t""yes" 1>&6
4917 case "$host" in
4918 ia64-*-linux*)
4919 # Has broken backtrace()
4921 mips*-*-linux*)
4922 # Has broken backtrace(), but we supply our own.
4923 if test -d sysdep; then true; else mkdir -p sysdep; fi
4924 EXTRA_CC_FILES="${EXTRA_CC_FILES} sysdep/dwarf2-backtrace.cc"
4925 cat >> confdefs.h <<\EOF
4926 #define HAVE_BACKTRACE 1
4931 cat >> confdefs.h <<\EOF
4932 #define HAVE_BACKTRACE 1
4936 esac
4938 else
4939 echo "$ac_t""no" 1>&6
4941 case "$host" in
4942 *mingw*)
4943 # Has backtrace() defined in libgcj itself
4944 cat >> confdefs.h <<\EOF
4945 #define HAVE_BACKTRACE 1
4949 esac
4954 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
4955 echo "configure:4956: checking for dladdr in -ldl" >&5
4956 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
4957 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4958 echo $ac_n "(cached) $ac_c" 1>&6
4959 else
4960 ac_save_LIBS="$LIBS"
4961 LIBS="-ldl $LIBS"
4962 cat > conftest.$ac_ext <<EOF
4963 #line 4964 "configure"
4964 #include "confdefs.h"
4965 /* Override any gcc2 internal prototype to avoid an error. */
4966 /* We use char because int might match the return type of a gcc2
4967 builtin and then its argument prototype would still apply. */
4968 char dladdr();
4970 int main() {
4971 dladdr()
4972 ; return 0; }
4974 if { (eval echo configure:4975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4975 rm -rf conftest*
4976 eval "ac_cv_lib_$ac_lib_var=yes"
4977 else
4978 echo "configure: failed program was:" >&5
4979 cat conftest.$ac_ext >&5
4980 rm -rf conftest*
4981 eval "ac_cv_lib_$ac_lib_var=no"
4983 rm -f conftest*
4984 LIBS="$ac_save_LIBS"
4987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4988 echo "$ac_t""yes" 1>&6
4990 if test "x${disable_dladdr}" = "xyes"; then
4991 #Broken dladdr().
4992 true
4993 else
4994 cat >> confdefs.h <<\EOF
4995 #define HAVE_DLADDR 1
5000 else
5001 echo "$ac_t""no" 1>&6
5004 if test x"$build" = x"$host"; then
5005 for ac_file in /proc/self/exe
5008 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
5009 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
5010 echo "configure:5011: checking for $ac_file" >&5
5011 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
5012 echo $ac_n "(cached) $ac_c" 1>&6
5013 else
5014 if test "$cross_compiling" = yes; then
5015 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
5016 else
5017 if test -r $ac_file; then
5018 eval "ac_cv_file_$ac_safe=yes"
5019 else
5020 eval "ac_cv_file_$ac_safe=no"
5024 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
5025 echo "$ac_t""yes" 1>&6
5026 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5027 cat >> confdefs.h <<EOF
5028 #define $ac_tr_file 1
5031 cat >> confdefs.h <<\EOF
5032 #define HAVE_PROC_SELF_EXE 1
5035 else
5036 echo "$ac_t""no" 1>&6
5039 done
5041 else
5042 case $host in
5043 *-linux*)
5044 cat >> confdefs.h <<\EOF
5045 #define HAVE_PROC_SELF_EXE 1
5049 esac
5054 am_cv_lib_iconv_ldpath=
5055 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5056 if test "${with_libiconv_prefix+set}" = set; then
5057 withval="$with_libiconv_prefix"
5059 for dir in `echo "$withval" | tr : ' '`; do
5060 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5061 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5062 done
5067 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5068 echo "configure:5069: checking for iconv" >&5
5069 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5070 echo $ac_n "(cached) $ac_c" 1>&6
5071 else
5073 am_cv_func_iconv="no, consider installing GNU libiconv"
5074 am_cv_lib_iconv=no
5075 cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078 #include <stdlib.h>
5079 #include <iconv.h>
5080 int main() {
5081 iconv_t cd = iconv_open("","");
5082 iconv(cd,NULL,NULL,NULL,NULL);
5083 iconv_close(cd);
5084 ; return 0; }
5086 if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5087 rm -rf conftest*
5088 am_cv_func_iconv=yes
5089 else
5090 echo "configure: failed program was:" >&5
5091 cat conftest.$ac_ext >&5
5093 rm -f conftest*
5094 if test "$am_cv_func_iconv" != yes; then
5095 am_save_LIBS="$LIBS"
5096 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
5097 cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 #include <stdlib.h>
5101 #include <iconv.h>
5102 int main() {
5103 iconv_t cd = iconv_open("","");
5104 iconv(cd,NULL,NULL,NULL,NULL);
5105 iconv_close(cd);
5106 ; return 0; }
5108 if { (eval echo configure:5109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5109 rm -rf conftest*
5110 am_cv_lib_iconv=yes
5111 am_cv_func_iconv=yes
5112 else
5113 echo "configure: failed program was:" >&5
5114 cat conftest.$ac_ext >&5
5116 rm -f conftest*
5117 LIBS="$am_save_LIBS"
5122 echo "$ac_t""$am_cv_func_iconv" 1>&6
5123 if test "$am_cv_func_iconv" = yes; then
5124 cat >> confdefs.h <<\EOF
5125 #define HAVE_ICONV 1
5128 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5129 echo "configure:5130: checking for iconv declaration" >&5
5130 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5131 echo $ac_n "(cached) $ac_c" 1>&6
5132 else
5134 cat > conftest.$ac_ext <<EOF
5135 #line 5136 "configure"
5136 #include "confdefs.h"
5138 #include <stdlib.h>
5139 #include <iconv.h>
5140 extern
5141 #ifdef __cplusplus
5143 #endif
5144 #if defined(__STDC__) || defined(__cplusplus)
5145 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5146 #else
5147 size_t iconv();
5148 #endif
5150 int main() {
5152 ; return 0; }
5154 if { (eval echo configure:5155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5155 rm -rf conftest*
5156 am_cv_proto_iconv_arg1=""
5157 else
5158 echo "configure: failed program was:" >&5
5159 cat conftest.$ac_ext >&5
5160 rm -rf conftest*
5161 am_cv_proto_iconv_arg1="const"
5163 rm -f conftest*
5164 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);"
5167 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5168 echo "$ac_t""${ac_t:-
5169 }$am_cv_proto_iconv" 1>&6
5170 cat >> confdefs.h <<EOF
5171 #define ICONV_CONST $am_cv_proto_iconv_arg1
5175 LIBICONV=
5176 if test "$am_cv_lib_iconv" = yes; then
5177 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
5181 for ac_hdr in locale.h
5183 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5184 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5185 echo "configure:5186: checking for $ac_hdr" >&5
5186 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5187 echo $ac_n "(cached) $ac_c" 1>&6
5188 else
5189 cat > conftest.$ac_ext <<EOF
5190 #line 5191 "configure"
5191 #include "confdefs.h"
5192 #include <$ac_hdr>
5194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5195 { (eval echo configure:5196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5197 if test -z "$ac_err"; then
5198 rm -rf conftest*
5199 eval "ac_cv_header_$ac_safe=yes"
5200 else
5201 echo "$ac_err" >&5
5202 echo "configure: failed program was:" >&5
5203 cat conftest.$ac_ext >&5
5204 rm -rf conftest*
5205 eval "ac_cv_header_$ac_safe=no"
5207 rm -f conftest*
5209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5210 echo "$ac_t""yes" 1>&6
5211 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5212 cat >> confdefs.h <<EOF
5213 #define $ac_tr_hdr 1
5216 else
5217 echo "$ac_t""no" 1>&6
5219 done
5221 if test $ac_cv_header_locale_h = yes; then
5222 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5223 echo "configure:5224: checking for LC_MESSAGES" >&5
5224 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5225 echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227 cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230 #include <locale.h>
5231 int main() {
5232 return LC_MESSAGES
5233 ; return 0; }
5235 if { (eval echo configure:5236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5236 rm -rf conftest*
5237 am_cv_val_LC_MESSAGES=yes
5238 else
5239 echo "configure: failed program was:" >&5
5240 cat conftest.$ac_ext >&5
5241 rm -rf conftest*
5242 am_cv_val_LC_MESSAGES=no
5244 rm -f conftest*
5247 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5248 if test $am_cv_val_LC_MESSAGES = yes; then
5249 cat >> confdefs.h <<\EOF
5250 #define HAVE_LC_MESSAGES 1
5255 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5256 echo "configure:5257: checking whether struct tm is in sys/time.h or time.h" >&5
5257 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5258 echo $ac_n "(cached) $ac_c" 1>&6
5259 else
5260 cat > conftest.$ac_ext <<EOF
5261 #line 5262 "configure"
5262 #include "confdefs.h"
5263 #include <sys/types.h>
5264 #include <time.h>
5265 int main() {
5266 struct tm *tp; tp->tm_sec;
5267 ; return 0; }
5269 if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5270 rm -rf conftest*
5271 ac_cv_struct_tm=time.h
5272 else
5273 echo "configure: failed program was:" >&5
5274 cat conftest.$ac_ext >&5
5275 rm -rf conftest*
5276 ac_cv_struct_tm=sys/time.h
5278 rm -f conftest*
5281 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5282 if test $ac_cv_struct_tm = sys/time.h; then
5283 cat >> confdefs.h <<\EOF
5284 #define TM_IN_SYS_TIME 1
5289 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5290 echo "configure:5291: checking for tm_zone in struct tm" >&5
5291 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5292 echo $ac_n "(cached) $ac_c" 1>&6
5293 else
5294 cat > conftest.$ac_ext <<EOF
5295 #line 5296 "configure"
5296 #include "confdefs.h"
5297 #include <sys/types.h>
5298 #include <$ac_cv_struct_tm>
5299 int main() {
5300 struct tm tm; tm.tm_zone;
5301 ; return 0; }
5303 if { (eval echo configure:5304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5304 rm -rf conftest*
5305 ac_cv_struct_tm_zone=yes
5306 else
5307 echo "configure: failed program was:" >&5
5308 cat conftest.$ac_ext >&5
5309 rm -rf conftest*
5310 ac_cv_struct_tm_zone=no
5312 rm -f conftest*
5315 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5316 if test "$ac_cv_struct_tm_zone" = yes; then
5317 cat >> confdefs.h <<\EOF
5318 #define HAVE_TM_ZONE 1
5321 else
5322 echo $ac_n "checking for tzname""... $ac_c" 1>&6
5323 echo "configure:5324: checking for tzname" >&5
5324 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5325 echo $ac_n "(cached) $ac_c" 1>&6
5326 else
5327 cat > conftest.$ac_ext <<EOF
5328 #line 5329 "configure"
5329 #include "confdefs.h"
5330 #include <time.h>
5331 #ifndef tzname /* For SGI. */
5332 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
5333 #endif
5334 int main() {
5335 atoi(*tzname);
5336 ; return 0; }
5338 if { (eval echo configure:5339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5339 rm -rf conftest*
5340 ac_cv_var_tzname=yes
5341 else
5342 echo "configure: failed program was:" >&5
5343 cat conftest.$ac_ext >&5
5344 rm -rf conftest*
5345 ac_cv_var_tzname=no
5347 rm -f conftest*
5350 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5351 if test $ac_cv_var_tzname = yes; then
5352 cat >> confdefs.h <<\EOF
5353 #define HAVE_TZNAME 1
5360 for ac_func in gethostbyname_r
5362 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5363 echo "configure:5364: checking for $ac_func" >&5
5364 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5365 echo $ac_n "(cached) $ac_c" 1>&6
5366 else
5367 cat > conftest.$ac_ext <<EOF
5368 #line 5369 "configure"
5369 #include "confdefs.h"
5370 /* System header to define __stub macros and hopefully few prototypes,
5371 which can conflict with char $ac_func(); below. */
5372 #include <assert.h>
5373 /* Override any gcc2 internal prototype to avoid an error. */
5374 /* We use char because int might match the return type of a gcc2
5375 builtin and then its argument prototype would still apply. */
5376 char $ac_func();
5378 int main() {
5380 /* The GNU C library defines this for functions which it implements
5381 to always fail with ENOSYS. Some functions are actually named
5382 something starting with __ and the normal name is an alias. */
5383 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5384 choke me
5385 #else
5386 $ac_func();
5387 #endif
5389 ; return 0; }
5391 if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5392 rm -rf conftest*
5393 eval "ac_cv_func_$ac_func=yes"
5394 else
5395 echo "configure: failed program was:" >&5
5396 cat conftest.$ac_ext >&5
5397 rm -rf conftest*
5398 eval "ac_cv_func_$ac_func=no"
5400 rm -f conftest*
5403 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5404 echo "$ac_t""yes" 1>&6
5405 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5406 cat >> confdefs.h <<EOF
5407 #define $ac_tr_func 1
5410 cat >> confdefs.h <<\EOF
5411 #define HAVE_GETHOSTBYNAME_R 1
5414 # There are two different kinds of gethostbyname_r.
5415 # We look for the one that returns `int'.
5416 # Hopefully this check is robust enough.
5417 cat > conftest.$ac_ext <<EOF
5418 #line 5419 "configure"
5419 #include "confdefs.h"
5420 #include <netdb.h>
5422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5423 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
5424 rm -rf conftest*
5426 cat >> confdefs.h <<\EOF
5427 #define GETHOSTBYNAME_R_RETURNS_INT 1
5431 rm -f conftest*
5434 case " $GCINCS " in
5435 *" -D_REENTRANT "*) ;;
5437 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
5438 echo "configure:5439: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
5439 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
5440 echo $ac_n "(cached) $ac_c" 1>&6
5441 else
5443 ac_ext=C
5444 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5445 ac_cpp='$CXXCPP $CPPFLAGS'
5446 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5447 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5448 cross_compiling=$ac_cv_prog_cxx_cross
5450 cat > conftest.$ac_ext <<EOF
5451 #line 5452 "configure"
5452 #include "confdefs.h"
5453 #include <netdb.h>
5454 int main() {
5455 gethostbyname_r("", 0, 0);
5456 ; return 0; }
5458 if { (eval echo configure:5459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5459 rm -rf conftest*
5460 libjava_cv_gethostbyname_r_needs_reentrant=no
5461 else
5462 echo "configure: failed program was:" >&5
5463 cat conftest.$ac_ext >&5
5464 rm -rf conftest*
5465 CPPFLAGS_SAVE="$CPPFLAGS"
5466 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
5467 cat > conftest.$ac_ext <<EOF
5468 #line 5469 "configure"
5469 #include "confdefs.h"
5470 #include <netdb.h>
5471 int main() {
5472 gethostbyname_r("", 0, 0);
5473 ; return 0; }
5475 if { (eval echo configure:5476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5476 rm -rf conftest*
5477 libjava_cv_gethostbyname_r_needs_reentrant=yes
5478 else
5479 echo "configure: failed program was:" >&5
5480 cat conftest.$ac_ext >&5
5481 rm -rf conftest*
5482 libjava_cv_gethostbyname_r_needs_reentrant=fail
5484 rm -f conftest*
5485 CPPFLAGS="$CPPFLAGS_SAVE"
5488 rm -f conftest*
5489 ac_ext=c
5490 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5491 ac_cpp='$CPP $CPPFLAGS'
5492 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5493 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5494 cross_compiling=$ac_cv_prog_cc_cross
5499 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
5500 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
5501 cat >> confdefs.h <<\EOF
5502 #define _REENTRANT 1
5507 esac
5509 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
5510 echo "configure:5511: checking for struct hostent_data" >&5
5511 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
5512 echo $ac_n "(cached) $ac_c" 1>&6
5513 else
5514 cat > conftest.$ac_ext <<EOF
5515 #line 5516 "configure"
5516 #include "confdefs.h"
5518 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
5519 # define _REENTRANT 1
5520 #endif
5521 #include <netdb.h>
5522 int main() {
5523 struct hostent_data data;
5524 ; return 0; }
5526 if { (eval echo configure:5527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5527 rm -rf conftest*
5528 libjava_cv_struct_hostent_data=yes
5529 else
5530 echo "configure: failed program was:" >&5
5531 cat conftest.$ac_ext >&5
5532 rm -rf conftest*
5533 libjava_cv_struct_hostent_data=no
5535 rm -f conftest*
5538 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
5539 if test "x$libjava_cv_struct_hostent_data" = xyes; then
5540 cat >> confdefs.h <<\EOF
5541 #define HAVE_STRUCT_HOSTENT_DATA 1
5546 else
5547 echo "$ac_t""no" 1>&6
5549 done
5552 # FIXME: libjava source code expects to find a prototype for
5553 # gethostbyaddr_r in netdb.h. The outer check ensures that
5554 # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
5555 # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
5556 # linkage check is enough, yet C++ code requires proper prototypes.)
5557 cat > conftest.$ac_ext <<EOF
5558 #line 5559 "configure"
5559 #include "confdefs.h"
5560 #include <netdb.h>
5562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5563 egrep "gethostbyaddr_r" >/dev/null 2>&1; then
5564 rm -rf conftest*
5566 for ac_func in gethostbyaddr_r
5568 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5569 echo "configure:5570: checking for $ac_func" >&5
5570 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5571 echo $ac_n "(cached) $ac_c" 1>&6
5572 else
5573 cat > conftest.$ac_ext <<EOF
5574 #line 5575 "configure"
5575 #include "confdefs.h"
5576 /* System header to define __stub macros and hopefully few prototypes,
5577 which can conflict with char $ac_func(); below. */
5578 #include <assert.h>
5579 /* Override any gcc2 internal prototype to avoid an error. */
5580 /* We use char because int might match the return type of a gcc2
5581 builtin and then its argument prototype would still apply. */
5582 char $ac_func();
5584 int main() {
5586 /* The GNU C library defines this for functions which it implements
5587 to always fail with ENOSYS. Some functions are actually named
5588 something starting with __ and the normal name is an alias. */
5589 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5590 choke me
5591 #else
5592 $ac_func();
5593 #endif
5595 ; return 0; }
5597 if { (eval echo configure:5598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5598 rm -rf conftest*
5599 eval "ac_cv_func_$ac_func=yes"
5600 else
5601 echo "configure: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603 rm -rf conftest*
5604 eval "ac_cv_func_$ac_func=no"
5606 rm -f conftest*
5609 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5610 echo "$ac_t""yes" 1>&6
5611 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5612 cat >> confdefs.h <<EOF
5613 #define $ac_tr_func 1
5616 cat >> confdefs.h <<\EOF
5617 #define HAVE_GETHOSTBYADDR_R 1
5620 # There are two different kinds of gethostbyaddr_r.
5621 # We look for the one that returns `int'.
5622 # Hopefully this check is robust enough.
5623 cat > conftest.$ac_ext <<EOF
5624 #line 5625 "configure"
5625 #include "confdefs.h"
5626 #include <netdb.h>
5628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5629 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
5630 rm -rf conftest*
5632 cat >> confdefs.h <<\EOF
5633 #define GETHOSTBYADDR_R_RETURNS_INT 1
5637 rm -f conftest*
5639 else
5640 echo "$ac_t""no" 1>&6
5642 done
5645 rm -f conftest*
5648 for ac_func in gethostname
5650 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5651 echo "configure:5652: checking for $ac_func" >&5
5652 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5653 echo $ac_n "(cached) $ac_c" 1>&6
5654 else
5655 cat > conftest.$ac_ext <<EOF
5656 #line 5657 "configure"
5657 #include "confdefs.h"
5658 /* System header to define __stub macros and hopefully few prototypes,
5659 which can conflict with char $ac_func(); below. */
5660 #include <assert.h>
5661 /* Override any gcc2 internal prototype to avoid an error. */
5662 /* We use char because int might match the return type of a gcc2
5663 builtin and then its argument prototype would still apply. */
5664 char $ac_func();
5666 int main() {
5668 /* The GNU C library defines this for functions which it implements
5669 to always fail with ENOSYS. Some functions are actually named
5670 something starting with __ and the normal name is an alias. */
5671 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5672 choke me
5673 #else
5674 $ac_func();
5675 #endif
5677 ; return 0; }
5679 if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5680 rm -rf conftest*
5681 eval "ac_cv_func_$ac_func=yes"
5682 else
5683 echo "configure: failed program was:" >&5
5684 cat conftest.$ac_ext >&5
5685 rm -rf conftest*
5686 eval "ac_cv_func_$ac_func=no"
5688 rm -f conftest*
5691 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5692 echo "$ac_t""yes" 1>&6
5693 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5694 cat >> confdefs.h <<EOF
5695 #define $ac_tr_func 1
5698 cat >> confdefs.h <<\EOF
5699 #define HAVE_GETHOSTNAME 1
5702 cat > conftest.$ac_ext <<EOF
5703 #line 5704 "configure"
5704 #include "confdefs.h"
5705 #include <unistd.h>
5707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5708 egrep "gethostname" >/dev/null 2>&1; then
5709 rm -rf conftest*
5711 cat >> confdefs.h <<\EOF
5712 #define HAVE_GETHOSTNAME_DECL 1
5716 rm -f conftest*
5718 else
5719 echo "$ac_t""no" 1>&6
5721 done
5724 for ac_func in usleep
5726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5727 echo "configure:5728: checking for $ac_func" >&5
5728 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5729 echo $ac_n "(cached) $ac_c" 1>&6
5730 else
5731 cat > conftest.$ac_ext <<EOF
5732 #line 5733 "configure"
5733 #include "confdefs.h"
5734 /* System header to define __stub macros and hopefully few prototypes,
5735 which can conflict with char $ac_func(); below. */
5736 #include <assert.h>
5737 /* Override any gcc2 internal prototype to avoid an error. */
5738 /* We use char because int might match the return type of a gcc2
5739 builtin and then its argument prototype would still apply. */
5740 char $ac_func();
5742 int main() {
5744 /* The GNU C library defines this for functions which it implements
5745 to always fail with ENOSYS. Some functions are actually named
5746 something starting with __ and the normal name is an alias. */
5747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5748 choke me
5749 #else
5750 $ac_func();
5751 #endif
5753 ; return 0; }
5755 if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5756 rm -rf conftest*
5757 eval "ac_cv_func_$ac_func=yes"
5758 else
5759 echo "configure: failed program was:" >&5
5760 cat conftest.$ac_ext >&5
5761 rm -rf conftest*
5762 eval "ac_cv_func_$ac_func=no"
5764 rm -f conftest*
5767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5768 echo "$ac_t""yes" 1>&6
5769 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5770 cat >> confdefs.h <<EOF
5771 #define $ac_tr_func 1
5774 cat > conftest.$ac_ext <<EOF
5775 #line 5776 "configure"
5776 #include "confdefs.h"
5777 #include <unistd.h>
5779 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5780 egrep "usleep" >/dev/null 2>&1; then
5781 rm -rf conftest*
5783 cat >> confdefs.h <<\EOF
5784 #define HAVE_USLEEP_DECL 1
5788 rm -f conftest*
5790 else
5791 echo "$ac_t""no" 1>&6
5793 done
5796 # Look for these functions in the thread library, but only bother
5797 # if using POSIX threads.
5798 if test "$THREADS" = posix; then
5799 save_LIBS="$LIBS"
5800 LIBS="$LIBS $THREADLIBS"
5801 # Some POSIX thread systems don't have pthread_mutexattr_settype.
5802 # E.g., Solaris.
5803 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
5805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5806 echo "configure:5807: checking for $ac_func" >&5
5807 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5808 echo $ac_n "(cached) $ac_c" 1>&6
5809 else
5810 cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813 /* System header to define __stub macros and hopefully few prototypes,
5814 which can conflict with char $ac_func(); below. */
5815 #include <assert.h>
5816 /* Override any gcc2 internal prototype to avoid an error. */
5817 /* We use char because int might match the return type of a gcc2
5818 builtin and then its argument prototype would still apply. */
5819 char $ac_func();
5821 int main() {
5823 /* The GNU C library defines this for functions which it implements
5824 to always fail with ENOSYS. Some functions are actually named
5825 something starting with __ and the normal name is an alias. */
5826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5827 choke me
5828 #else
5829 $ac_func();
5830 #endif
5832 ; return 0; }
5834 if { (eval echo configure:5835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5835 rm -rf conftest*
5836 eval "ac_cv_func_$ac_func=yes"
5837 else
5838 echo "configure: failed program was:" >&5
5839 cat conftest.$ac_ext >&5
5840 rm -rf conftest*
5841 eval "ac_cv_func_$ac_func=no"
5843 rm -f conftest*
5846 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5847 echo "$ac_t""yes" 1>&6
5848 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5849 cat >> confdefs.h <<EOF
5850 #define $ac_tr_func 1
5853 else
5854 echo "$ac_t""no" 1>&6
5856 done
5859 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
5860 # Solaris 7 the name librt is preferred.
5861 for ac_func in sched_yield
5863 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5864 echo "configure:5865: checking for $ac_func" >&5
5865 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5866 echo $ac_n "(cached) $ac_c" 1>&6
5867 else
5868 cat > conftest.$ac_ext <<EOF
5869 #line 5870 "configure"
5870 #include "confdefs.h"
5871 /* System header to define __stub macros and hopefully few prototypes,
5872 which can conflict with char $ac_func(); below. */
5873 #include <assert.h>
5874 /* Override any gcc2 internal prototype to avoid an error. */
5875 /* We use char because int might match the return type of a gcc2
5876 builtin and then its argument prototype would still apply. */
5877 char $ac_func();
5879 int main() {
5881 /* The GNU C library defines this for functions which it implements
5882 to always fail with ENOSYS. Some functions are actually named
5883 something starting with __ and the normal name is an alias. */
5884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5885 choke me
5886 #else
5887 $ac_func();
5888 #endif
5890 ; return 0; }
5892 if { (eval echo configure:5893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5893 rm -rf conftest*
5894 eval "ac_cv_func_$ac_func=yes"
5895 else
5896 echo "configure: failed program was:" >&5
5897 cat conftest.$ac_ext >&5
5898 rm -rf conftest*
5899 eval "ac_cv_func_$ac_func=no"
5901 rm -f conftest*
5904 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5905 echo "$ac_t""yes" 1>&6
5906 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5907 cat >> confdefs.h <<EOF
5908 #define $ac_tr_func 1
5911 else
5912 echo "$ac_t""no" 1>&6
5913 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5914 echo "configure:5915: checking for sched_yield in -lrt" >&5
5915 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5916 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5917 echo $ac_n "(cached) $ac_c" 1>&6
5918 else
5919 ac_save_LIBS="$LIBS"
5920 LIBS="-lrt $LIBS"
5921 cat > conftest.$ac_ext <<EOF
5922 #line 5923 "configure"
5923 #include "confdefs.h"
5924 /* Override any gcc2 internal prototype to avoid an error. */
5925 /* We use char because int might match the return type of a gcc2
5926 builtin and then its argument prototype would still apply. */
5927 char sched_yield();
5929 int main() {
5930 sched_yield()
5931 ; return 0; }
5933 if { (eval echo configure:5934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5934 rm -rf conftest*
5935 eval "ac_cv_lib_$ac_lib_var=yes"
5936 else
5937 echo "configure: failed program was:" >&5
5938 cat conftest.$ac_ext >&5
5939 rm -rf conftest*
5940 eval "ac_cv_lib_$ac_lib_var=no"
5942 rm -f conftest*
5943 LIBS="$ac_save_LIBS"
5946 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5947 echo "$ac_t""yes" 1>&6
5949 cat >> confdefs.h <<\EOF
5950 #define HAVE_SCHED_YIELD 1
5953 THREADLIBS="$THREADLIBS -lrt"
5954 THREADSPEC="$THREADSPEC -lrt"
5955 else
5956 echo "$ac_t""no" 1>&6
5958 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
5959 echo "configure:5960: checking for sched_yield in -lposix4" >&5
5960 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
5961 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5962 echo $ac_n "(cached) $ac_c" 1>&6
5963 else
5964 ac_save_LIBS="$LIBS"
5965 LIBS="-lposix4 $LIBS"
5966 cat > conftest.$ac_ext <<EOF
5967 #line 5968 "configure"
5968 #include "confdefs.h"
5969 /* Override any gcc2 internal prototype to avoid an error. */
5970 /* We use char because int might match the return type of a gcc2
5971 builtin and then its argument prototype would still apply. */
5972 char sched_yield();
5974 int main() {
5975 sched_yield()
5976 ; return 0; }
5978 if { (eval echo configure:5979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5979 rm -rf conftest*
5980 eval "ac_cv_lib_$ac_lib_var=yes"
5981 else
5982 echo "configure: failed program was:" >&5
5983 cat conftest.$ac_ext >&5
5984 rm -rf conftest*
5985 eval "ac_cv_lib_$ac_lib_var=no"
5987 rm -f conftest*
5988 LIBS="$ac_save_LIBS"
5991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5992 echo "$ac_t""yes" 1>&6
5994 cat >> confdefs.h <<\EOF
5995 #define HAVE_SCHED_YIELD 1
5998 THREADLIBS="$THREADLIBS -lposix4"
5999 THREADSPEC="$THREADSPEC -lposix4"
6000 else
6001 echo "$ac_t""no" 1>&6
6007 done
6009 LIBS="$save_LIBS"
6011 # We can save a little space at runtime if the mutex has m_count
6012 # or __m_count. This is a nice hack for Linux.
6013 cat > conftest.$ac_ext <<EOF
6014 #line 6015 "configure"
6015 #include "confdefs.h"
6016 #include <pthread.h>
6017 int main() {
6019 extern pthread_mutex_t *mutex; int q = mutex->m_count;
6021 ; return 0; }
6023 if { (eval echo configure:6024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6024 rm -rf conftest*
6025 cat >> confdefs.h <<\EOF
6026 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
6029 else
6030 echo "configure: failed program was:" >&5
6031 cat conftest.$ac_ext >&5
6032 rm -rf conftest*
6034 cat > conftest.$ac_ext <<EOF
6035 #line 6036 "configure"
6036 #include "confdefs.h"
6037 #include <pthread.h>
6038 int main() {
6040 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
6042 ; return 0; }
6044 if { (eval echo configure:6045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6045 rm -rf conftest*
6046 cat >> confdefs.h <<\EOF
6047 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
6050 else
6051 echo "configure: failed program was:" >&5
6052 cat conftest.$ac_ext >&5
6054 rm -f conftest*
6056 rm -f conftest*
6059 # We require a way to get the time.
6060 time_found=no
6061 for ac_func in gettimeofday time ftime
6063 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6064 echo "configure:6065: checking for $ac_func" >&5
6065 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6066 echo $ac_n "(cached) $ac_c" 1>&6
6067 else
6068 cat > conftest.$ac_ext <<EOF
6069 #line 6070 "configure"
6070 #include "confdefs.h"
6071 /* System header to define __stub macros and hopefully few prototypes,
6072 which can conflict with char $ac_func(); below. */
6073 #include <assert.h>
6074 /* Override any gcc2 internal prototype to avoid an error. */
6075 /* We use char because int might match the return type of a gcc2
6076 builtin and then its argument prototype would still apply. */
6077 char $ac_func();
6079 int main() {
6081 /* The GNU C library defines this for functions which it implements
6082 to always fail with ENOSYS. Some functions are actually named
6083 something starting with __ and the normal name is an alias. */
6084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6085 choke me
6086 #else
6087 $ac_func();
6088 #endif
6090 ; return 0; }
6092 if { (eval echo configure:6093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6093 rm -rf conftest*
6094 eval "ac_cv_func_$ac_func=yes"
6095 else
6096 echo "configure: failed program was:" >&5
6097 cat conftest.$ac_ext >&5
6098 rm -rf conftest*
6099 eval "ac_cv_func_$ac_func=no"
6101 rm -f conftest*
6104 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6105 echo "$ac_t""yes" 1>&6
6106 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6107 cat >> confdefs.h <<EOF
6108 #define $ac_tr_func 1
6110 time_found=yes
6111 else
6112 echo "$ac_t""no" 1>&6
6114 done
6116 if test "$time_found" = no; then
6117 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
6120 for ac_func in memmove
6122 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6123 echo "configure:6124: checking for $ac_func" >&5
6124 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6125 echo $ac_n "(cached) $ac_c" 1>&6
6126 else
6127 cat > conftest.$ac_ext <<EOF
6128 #line 6129 "configure"
6129 #include "confdefs.h"
6130 /* System header to define __stub macros and hopefully few prototypes,
6131 which can conflict with char $ac_func(); below. */
6132 #include <assert.h>
6133 /* Override any gcc2 internal prototype to avoid an error. */
6134 /* We use char because int might match the return type of a gcc2
6135 builtin and then its argument prototype would still apply. */
6136 char $ac_func();
6138 int main() {
6140 /* The GNU C library defines this for functions which it implements
6141 to always fail with ENOSYS. Some functions are actually named
6142 something starting with __ and the normal name is an alias. */
6143 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6144 choke me
6145 #else
6146 $ac_func();
6147 #endif
6149 ; return 0; }
6151 if { (eval echo configure:6152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6152 rm -rf conftest*
6153 eval "ac_cv_func_$ac_func=yes"
6154 else
6155 echo "configure: failed program was:" >&5
6156 cat conftest.$ac_ext >&5
6157 rm -rf conftest*
6158 eval "ac_cv_func_$ac_func=no"
6160 rm -f conftest*
6163 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6164 echo "$ac_t""yes" 1>&6
6165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6166 cat >> confdefs.h <<EOF
6167 #define $ac_tr_func 1
6170 else
6171 echo "$ac_t""no" 1>&6
6173 done
6176 # We require memcpy.
6177 memcpy_found=no
6178 for ac_func in memcpy
6180 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6181 echo "configure:6182: checking for $ac_func" >&5
6182 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6183 echo $ac_n "(cached) $ac_c" 1>&6
6184 else
6185 cat > conftest.$ac_ext <<EOF
6186 #line 6187 "configure"
6187 #include "confdefs.h"
6188 /* System header to define __stub macros and hopefully few prototypes,
6189 which can conflict with char $ac_func(); below. */
6190 #include <assert.h>
6191 /* Override any gcc2 internal prototype to avoid an error. */
6192 /* We use char because int might match the return type of a gcc2
6193 builtin and then its argument prototype would still apply. */
6194 char $ac_func();
6196 int main() {
6198 /* The GNU C library defines this for functions which it implements
6199 to always fail with ENOSYS. Some functions are actually named
6200 something starting with __ and the normal name is an alias. */
6201 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6202 choke me
6203 #else
6204 $ac_func();
6205 #endif
6207 ; return 0; }
6209 if { (eval echo configure:6210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6210 rm -rf conftest*
6211 eval "ac_cv_func_$ac_func=yes"
6212 else
6213 echo "configure: failed program was:" >&5
6214 cat conftest.$ac_ext >&5
6215 rm -rf conftest*
6216 eval "ac_cv_func_$ac_func=no"
6218 rm -f conftest*
6221 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6222 echo "$ac_t""yes" 1>&6
6223 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6224 cat >> confdefs.h <<EOF
6225 #define $ac_tr_func 1
6227 memcpy_found=yes
6228 else
6229 echo "$ac_t""no" 1>&6
6231 done
6233 if test "$memcpy_found" = no; then
6234 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
6237 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6238 echo "configure:6239: checking for dlopen in -ldl" >&5
6239 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6240 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6241 echo $ac_n "(cached) $ac_c" 1>&6
6242 else
6243 ac_save_LIBS="$LIBS"
6244 LIBS="-ldl $LIBS"
6245 cat > conftest.$ac_ext <<EOF
6246 #line 6247 "configure"
6247 #include "confdefs.h"
6248 /* Override any gcc2 internal prototype to avoid an error. */
6249 /* We use char because int might match the return type of a gcc2
6250 builtin and then its argument prototype would still apply. */
6251 char dlopen();
6253 int main() {
6254 dlopen()
6255 ; return 0; }
6257 if { (eval echo configure:6258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6258 rm -rf conftest*
6259 eval "ac_cv_lib_$ac_lib_var=yes"
6260 else
6261 echo "configure: failed program was:" >&5
6262 cat conftest.$ac_ext >&5
6263 rm -rf conftest*
6264 eval "ac_cv_lib_$ac_lib_var=no"
6266 rm -f conftest*
6267 LIBS="$ac_save_LIBS"
6270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6271 echo "$ac_t""yes" 1>&6
6273 cat >> confdefs.h <<\EOF
6274 #define HAVE_DLOPEN 1
6277 else
6278 echo "$ac_t""no" 1>&6
6282 # Some library-finding code we stole from Tcl.
6283 #--------------------------------------------------------------------
6284 # Check for the existence of the -lsocket and -lnsl libraries.
6285 # The order here is important, so that they end up in the right
6286 # order in the command line generated by make. Here are some
6287 # special considerations:
6288 # 1. Use "connect" and "accept" to check for -lsocket, and
6289 # "gethostbyname" to check for -lnsl.
6290 # 2. Use each function name only once: can't redo a check because
6291 # autoconf caches the results of the last check and won't redo it.
6292 # 3. Use -lnsl and -lsocket only if they supply procedures that
6293 # aren't already present in the normal libraries. This is because
6294 # IRIX 5.2 has libraries, but they aren't needed and they're
6295 # bogus: they goof up name resolution if used.
6296 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
6297 # To get around this problem, check for both libraries together
6298 # if -lsocket doesn't work by itself.
6299 #--------------------------------------------------------------------
6301 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
6302 echo "configure:6303: checking for socket libraries" >&5
6303 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
6304 echo $ac_n "(cached) $ac_c" 1>&6
6305 else
6306 gcj_cv_lib_sockets=
6307 gcj_checkBoth=0
6308 unset ac_cv_func_connect
6309 echo $ac_n "checking for connect""... $ac_c" 1>&6
6310 echo "configure:6311: checking for connect" >&5
6311 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6312 echo $ac_n "(cached) $ac_c" 1>&6
6313 else
6314 cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6317 /* System header to define __stub macros and hopefully few prototypes,
6318 which can conflict with char connect(); below. */
6319 #include <assert.h>
6320 /* Override any gcc2 internal prototype to avoid an error. */
6321 /* We use char because int might match the return type of a gcc2
6322 builtin and then its argument prototype would still apply. */
6323 char connect();
6325 int main() {
6327 /* The GNU C library defines this for functions which it implements
6328 to always fail with ENOSYS. Some functions are actually named
6329 something starting with __ and the normal name is an alias. */
6330 #if defined (__stub_connect) || defined (__stub___connect)
6331 choke me
6332 #else
6333 connect();
6334 #endif
6336 ; return 0; }
6338 if { (eval echo configure:6339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6339 rm -rf conftest*
6340 eval "ac_cv_func_connect=yes"
6341 else
6342 echo "configure: failed program was:" >&5
6343 cat conftest.$ac_ext >&5
6344 rm -rf conftest*
6345 eval "ac_cv_func_connect=no"
6347 rm -f conftest*
6350 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6351 echo "$ac_t""yes" 1>&6
6352 gcj_checkSocket=0
6353 else
6354 echo "$ac_t""no" 1>&6
6355 gcj_checkSocket=1
6358 if test "$gcj_checkSocket" = 1; then
6359 unset ac_cv_func_connect
6360 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
6361 echo "configure:6362: checking for main in -lsocket" >&5
6362 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
6363 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6364 echo $ac_n "(cached) $ac_c" 1>&6
6365 else
6366 ac_save_LIBS="$LIBS"
6367 LIBS="-lsocket $LIBS"
6368 cat > conftest.$ac_ext <<EOF
6369 #line 6370 "configure"
6370 #include "confdefs.h"
6372 int main() {
6373 main()
6374 ; return 0; }
6376 if { (eval echo configure:6377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6377 rm -rf conftest*
6378 eval "ac_cv_lib_$ac_lib_var=yes"
6379 else
6380 echo "configure: failed program was:" >&5
6381 cat conftest.$ac_ext >&5
6382 rm -rf conftest*
6383 eval "ac_cv_lib_$ac_lib_var=no"
6385 rm -f conftest*
6386 LIBS="$ac_save_LIBS"
6389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6390 echo "$ac_t""yes" 1>&6
6391 gcj_cv_lib_sockets="-lsocket"
6392 else
6393 echo "$ac_t""no" 1>&6
6394 gcj_checkBoth=1
6398 if test "$gcj_checkBoth" = 1; then
6399 gcj_oldLibs=$LIBS
6400 LIBS="$LIBS -lsocket -lnsl"
6401 unset ac_cv_func_accept
6402 echo $ac_n "checking for accept""... $ac_c" 1>&6
6403 echo "configure:6404: checking for accept" >&5
6404 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
6405 echo $ac_n "(cached) $ac_c" 1>&6
6406 else
6407 cat > conftest.$ac_ext <<EOF
6408 #line 6409 "configure"
6409 #include "confdefs.h"
6410 /* System header to define __stub macros and hopefully few prototypes,
6411 which can conflict with char accept(); below. */
6412 #include <assert.h>
6413 /* Override any gcc2 internal prototype to avoid an error. */
6414 /* We use char because int might match the return type of a gcc2
6415 builtin and then its argument prototype would still apply. */
6416 char accept();
6418 int main() {
6420 /* The GNU C library defines this for functions which it implements
6421 to always fail with ENOSYS. Some functions are actually named
6422 something starting with __ and the normal name is an alias. */
6423 #if defined (__stub_accept) || defined (__stub___accept)
6424 choke me
6425 #else
6426 accept();
6427 #endif
6429 ; return 0; }
6431 if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6432 rm -rf conftest*
6433 eval "ac_cv_func_accept=yes"
6434 else
6435 echo "configure: failed program was:" >&5
6436 cat conftest.$ac_ext >&5
6437 rm -rf conftest*
6438 eval "ac_cv_func_accept=no"
6440 rm -f conftest*
6443 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
6444 echo "$ac_t""yes" 1>&6
6445 gcj_checkNsl=0
6446 gcj_cv_lib_sockets="-lsocket -lnsl"
6447 else
6448 echo "$ac_t""no" 1>&6
6451 unset ac_cv_func_accept
6452 LIBS=$gcj_oldLibs
6454 unset ac_cv_func_gethostbyname
6455 gcj_oldLibs=$LIBS
6456 LIBS="$LIBS $gcj_cv_lib_sockets"
6457 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6458 echo "configure:6459: checking for gethostbyname" >&5
6459 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6460 echo $ac_n "(cached) $ac_c" 1>&6
6461 else
6462 cat > conftest.$ac_ext <<EOF
6463 #line 6464 "configure"
6464 #include "confdefs.h"
6465 /* System header to define __stub macros and hopefully few prototypes,
6466 which can conflict with char gethostbyname(); below. */
6467 #include <assert.h>
6468 /* Override any gcc2 internal prototype to avoid an error. */
6469 /* We use char because int might match the return type of a gcc2
6470 builtin and then its argument prototype would still apply. */
6471 char gethostbyname();
6473 int main() {
6475 /* The GNU C library defines this for functions which it implements
6476 to always fail with ENOSYS. Some functions are actually named
6477 something starting with __ and the normal name is an alias. */
6478 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6479 choke me
6480 #else
6481 gethostbyname();
6482 #endif
6484 ; return 0; }
6486 if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6487 rm -rf conftest*
6488 eval "ac_cv_func_gethostbyname=yes"
6489 else
6490 echo "configure: failed program was:" >&5
6491 cat conftest.$ac_ext >&5
6492 rm -rf conftest*
6493 eval "ac_cv_func_gethostbyname=no"
6495 rm -f conftest*
6498 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6499 echo "$ac_t""yes" 1>&6
6501 else
6502 echo "$ac_t""no" 1>&6
6503 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
6504 echo "configure:6505: checking for main in -lnsl" >&5
6505 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
6506 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6507 echo $ac_n "(cached) $ac_c" 1>&6
6508 else
6509 ac_save_LIBS="$LIBS"
6510 LIBS="-lnsl $LIBS"
6511 cat > conftest.$ac_ext <<EOF
6512 #line 6513 "configure"
6513 #include "confdefs.h"
6515 int main() {
6516 main()
6517 ; return 0; }
6519 if { (eval echo configure:6520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6520 rm -rf conftest*
6521 eval "ac_cv_lib_$ac_lib_var=yes"
6522 else
6523 echo "configure: failed program was:" >&5
6524 cat conftest.$ac_ext >&5
6525 rm -rf conftest*
6526 eval "ac_cv_lib_$ac_lib_var=no"
6528 rm -f conftest*
6529 LIBS="$ac_save_LIBS"
6532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6533 echo "$ac_t""yes" 1>&6
6534 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
6535 else
6536 echo "$ac_t""no" 1>&6
6541 unset ac_cv_func_gethostbyname
6542 LIBS=$gcj_oldLIBS
6546 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
6547 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
6549 if test "$with_system_zlib" = yes; then
6550 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
6551 echo "configure:6552: checking for deflate in -lz" >&5
6552 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
6553 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6554 echo $ac_n "(cached) $ac_c" 1>&6
6555 else
6556 ac_save_LIBS="$LIBS"
6557 LIBS="-lz $LIBS"
6558 cat > conftest.$ac_ext <<EOF
6559 #line 6560 "configure"
6560 #include "confdefs.h"
6561 /* Override any gcc2 internal prototype to avoid an error. */
6562 /* We use char because int might match the return type of a gcc2
6563 builtin and then its argument prototype would still apply. */
6564 char deflate();
6566 int main() {
6567 deflate()
6568 ; return 0; }
6570 if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6571 rm -rf conftest*
6572 eval "ac_cv_lib_$ac_lib_var=yes"
6573 else
6574 echo "configure: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576 rm -rf conftest*
6577 eval "ac_cv_lib_$ac_lib_var=no"
6579 rm -f conftest*
6580 LIBS="$ac_save_LIBS"
6583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6584 echo "$ac_t""yes" 1>&6
6585 ZLIBSPEC=-lz
6586 else
6587 echo "$ac_t""no" 1>&6
6588 ZLIBSPEC=
6593 # Test for Gtk stuff, if asked for.
6594 if test "$use_gtk_awt" = yes; then
6595 # Check whether --enable-gtktest or --disable-gtktest was given.
6596 if test "${enable_gtktest+set}" = set; then
6597 enableval="$enable_gtktest"
6599 else
6600 enable_gtktest=yes
6604 pkg_config_args=gtk+-2.0
6605 for module in .
6607 case "$module" in
6608 gthread)
6609 pkg_config_args="$pkg_config_args gthread-2.0"
6611 esac
6612 done
6614 no_gtk=""
6616 # Extract the first word of "pkg-config", so it can be a program name with args.
6617 set dummy pkg-config; ac_word=$2
6618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6619 echo "configure:6620: checking for $ac_word" >&5
6620 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
6621 echo $ac_n "(cached) $ac_c" 1>&6
6622 else
6623 case "$PKG_CONFIG" in
6625 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6627 ?:/*)
6628 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
6631 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6632 ac_dummy="$PATH"
6633 for ac_dir in $ac_dummy; do
6634 test -z "$ac_dir" && ac_dir=.
6635 if test -f $ac_dir/$ac_word; then
6636 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6637 break
6639 done
6640 IFS="$ac_save_ifs"
6641 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6643 esac
6645 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6646 if test -n "$PKG_CONFIG"; then
6647 echo "$ac_t""$PKG_CONFIG" 1>&6
6648 else
6649 echo "$ac_t""no" 1>&6
6653 if test x$PKG_CONFIG != xno ; then
6654 if pkg-config --atleast-pkgconfig-version 0.7 ; then
6656 else
6657 echo *** pkg-config too old; version 0.7 or better required.
6658 no_gtk=yes
6659 PKG_CONFIG=no
6661 else
6662 no_gtk=yes
6665 min_gtk_version=2.2.0
6666 echo $ac_n "checking for GTK+ - version >= $min_gtk_version""... $ac_c" 1>&6
6667 echo "configure:6668: checking for GTK+ - version >= $min_gtk_version" >&5
6669 if test x$PKG_CONFIG != xno ; then
6670 ## don't try to run the test against uninstalled libtool libs
6671 if $PKG_CONFIG --uninstalled $pkg_config_args; then
6672 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
6673 enable_gtktest=no
6676 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
6678 else
6679 no_gtk=yes
6683 if test x"$no_gtk" = x ; then
6684 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
6685 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
6686 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
6687 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
6688 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
6689 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
6690 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
6691 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
6692 if test "x$enable_gtktest" = "xyes" ; then
6693 ac_save_CFLAGS="$CFLAGS"
6694 ac_save_LIBS="$LIBS"
6695 CFLAGS="$CFLAGS $GTK_CFLAGS"
6696 LIBS="$GTK_LIBS $LIBS"
6697 rm -f conf.gtktest
6698 if test "$cross_compiling" = yes; then
6699 echo $ac_n "cross compiling; assumed OK... $ac_c"
6700 else
6701 cat > conftest.$ac_ext <<EOF
6702 #line 6703 "configure"
6703 #include "confdefs.h"
6705 #include <gtk/gtk.h>
6706 #include <stdio.h>
6707 #include <stdlib.h>
6709 int
6710 main ()
6712 int major, minor, micro;
6713 char *tmp_version;
6715 system ("touch conf.gtktest");
6717 /* HP/UX 9 (%@#!) writes to sscanf strings */
6718 tmp_version = g_strdup("$min_gtk_version");
6719 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
6720 printf("%s, bad version string\n", "$min_gtk_version");
6721 exit(1);
6724 if ((gtk_major_version != $gtk_config_major_version) ||
6725 (gtk_minor_version != $gtk_config_minor_version) ||
6726 (gtk_micro_version != $gtk_config_micro_version))
6728 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
6729 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
6730 gtk_major_version, gtk_minor_version, gtk_micro_version);
6731 printf ("*** was found! If pkg-config was correct, then it is best\n");
6732 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
6733 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
6734 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
6735 printf("*** required on your system.\n");
6736 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
6737 printf("*** to point to the correct configuration files\n");
6739 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
6740 (gtk_minor_version != GTK_MINOR_VERSION) ||
6741 (gtk_micro_version != GTK_MICRO_VERSION))
6743 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
6744 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
6745 printf("*** library (version %d.%d.%d)\n",
6746 gtk_major_version, gtk_minor_version, gtk_micro_version);
6748 else
6750 if ((gtk_major_version > major) ||
6751 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
6752 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
6754 return 0;
6756 else
6758 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
6759 gtk_major_version, gtk_minor_version, gtk_micro_version);
6760 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
6761 major, minor, micro);
6762 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
6763 printf("***\n");
6764 printf("*** If you have already installed a sufficiently new version, this error\n");
6765 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
6766 printf("*** being found. The easiest way to fix this is to remove the old version\n");
6767 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
6768 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
6769 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
6770 printf("*** so that the correct libraries are found at run-time))\n");
6773 return 1;
6777 if { (eval echo configure:6778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6778 then
6780 else
6781 echo "configure: failed program was:" >&5
6782 cat conftest.$ac_ext >&5
6783 rm -fr conftest*
6784 no_gtk=yes
6786 rm -fr conftest*
6789 CFLAGS="$ac_save_CFLAGS"
6790 LIBS="$ac_save_LIBS"
6793 if test "x$no_gtk" = x ; then
6794 echo "$ac_t""yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" 1>&6
6796 else
6797 echo "$ac_t""no" 1>&6
6798 if test "$PKG_CONFIG" = "no" ; then
6799 echo "*** A new enough version of pkg-config was not found."
6800 echo "*** See http://pkgconfig.sourceforge.net"
6801 else
6802 if test -f conf.gtktest ; then
6804 else
6805 echo "*** Could not run GTK+ test program, checking why..."
6806 ac_save_CFLAGS="$CFLAGS"
6807 ac_save_LIBS="$LIBS"
6808 CFLAGS="$CFLAGS $GTK_CFLAGS"
6809 LIBS="$LIBS $GTK_LIBS"
6810 cat > conftest.$ac_ext <<EOF
6811 #line 6812 "configure"
6812 #include "confdefs.h"
6814 #include <gtk/gtk.h>
6815 #include <stdio.h>
6817 int main() {
6818 return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
6819 ; return 0; }
6821 if { (eval echo configure:6822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6822 rm -rf conftest*
6823 echo "*** The test program compiled, but did not run. This usually means"
6824 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
6825 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
6826 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
6827 echo "*** to the installed location Also, make sure you have run ldconfig if that"
6828 echo "*** is required on your system"
6829 echo "***"
6830 echo "*** If you have an old version installed, it is best to remove it, although"
6831 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
6832 else
6833 echo "configure: failed program was:" >&5
6834 cat conftest.$ac_ext >&5
6835 rm -rf conftest*
6836 echo "*** The test program failed to compile or link. See the file config.log for the"
6837 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."
6839 rm -f conftest*
6840 CFLAGS="$ac_save_CFLAGS"
6841 LIBS="$ac_save_LIBS"
6844 GTK_CFLAGS=""
6845 GTK_LIBS=""
6846 exit 1
6850 rm -f conf.gtktest
6852 # Check whether --enable-glibtest or --disable-glibtest was given.
6853 if test "${enable_glibtest+set}" = set; then
6854 enableval="$enable_glibtest"
6856 else
6857 enable_glibtest=yes
6861 pkg_config_args=glib-2.0
6862 for module in . gthread
6864 case "$module" in
6865 gmodule)
6866 pkg_config_args="$pkg_config_args gmodule-2.0"
6868 gobject)
6869 pkg_config_args="$pkg_config_args gobject-2.0"
6871 gthread)
6872 pkg_config_args="$pkg_config_args gthread-2.0"
6874 esac
6875 done
6877 # Extract the first word of "pkg-config", so it can be a program name with args.
6878 set dummy pkg-config; ac_word=$2
6879 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6880 echo "configure:6881: checking for $ac_word" >&5
6881 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
6882 echo $ac_n "(cached) $ac_c" 1>&6
6883 else
6884 case "$PKG_CONFIG" in
6886 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6888 ?:/*)
6889 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
6892 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6893 ac_dummy="$PATH"
6894 for ac_dir in $ac_dummy; do
6895 test -z "$ac_dir" && ac_dir=.
6896 if test -f $ac_dir/$ac_word; then
6897 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6898 break
6900 done
6901 IFS="$ac_save_ifs"
6902 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6904 esac
6906 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6907 if test -n "$PKG_CONFIG"; then
6908 echo "$ac_t""$PKG_CONFIG" 1>&6
6909 else
6910 echo "$ac_t""no" 1>&6
6914 no_glib=""
6916 if test x$PKG_CONFIG != xno ; then
6917 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
6919 else
6920 echo *** pkg-config too old; version 0.7 or better required.
6921 no_glib=yes
6922 PKG_CONFIG=no
6924 else
6925 no_glib=yes
6928 min_glib_version=2.2.0
6929 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
6930 echo "configure:6931: checking for GLIB - version >= $min_glib_version" >&5
6932 if test x$PKG_CONFIG != xno ; then
6933 ## don't try to run the test against uninstalled libtool libs
6934 if $PKG_CONFIG --uninstalled $pkg_config_args; then
6935 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
6936 enable_glibtest=no
6939 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
6941 else
6942 no_glib=yes
6946 if test x"$no_glib" = x ; then
6947 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
6948 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
6949 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
6951 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
6952 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
6953 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
6954 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
6955 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
6956 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
6957 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
6958 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
6959 if test "x$enable_glibtest" = "xyes" ; then
6960 ac_save_CFLAGS="$CFLAGS"
6961 ac_save_LIBS="$LIBS"
6962 CFLAGS="$CFLAGS $GLIB_CFLAGS"
6963 LIBS="$GLIB_LIBS $LIBS"
6964 rm -f conf.glibtest
6965 if test "$cross_compiling" = yes; then
6966 echo $ac_n "cross compiling; assumed OK... $ac_c"
6967 else
6968 cat > conftest.$ac_ext <<EOF
6969 #line 6970 "configure"
6970 #include "confdefs.h"
6972 #include <glib.h>
6973 #include <stdio.h>
6974 #include <stdlib.h>
6976 int
6977 main ()
6979 int major, minor, micro;
6980 char *tmp_version;
6982 system ("touch conf.glibtest");
6984 /* HP/UX 9 (%@#!) writes to sscanf strings */
6985 tmp_version = g_strdup("$min_glib_version");
6986 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
6987 printf("%s, bad version string\n", "$min_glib_version");
6988 exit(1);
6991 if ((glib_major_version != $glib_config_major_version) ||
6992 (glib_minor_version != $glib_config_minor_version) ||
6993 (glib_micro_version != $glib_config_micro_version))
6995 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
6996 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
6997 glib_major_version, glib_minor_version, glib_micro_version);
6998 printf ("*** was found! If pkg-config was correct, then it is best\n");
6999 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
7000 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
7001 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
7002 printf("*** required on your system.\n");
7003 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
7004 printf("*** to point to the correct configuration files\n");
7006 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
7007 (glib_minor_version != GLIB_MINOR_VERSION) ||
7008 (glib_micro_version != GLIB_MICRO_VERSION))
7010 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
7011 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
7012 printf("*** library (version %d.%d.%d)\n",
7013 glib_major_version, glib_minor_version, glib_micro_version);
7015 else
7017 if ((glib_major_version > major) ||
7018 ((glib_major_version == major) && (glib_minor_version > minor)) ||
7019 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
7021 return 0;
7023 else
7025 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
7026 glib_major_version, glib_minor_version, glib_micro_version);
7027 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
7028 major, minor, micro);
7029 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
7030 printf("***\n");
7031 printf("*** If you have already installed a sufficiently new version, this error\n");
7032 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
7033 printf("*** being found. The easiest way to fix this is to remove the old version\n");
7034 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
7035 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
7036 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
7037 printf("*** so that the correct libraries are found at run-time))\n");
7040 return 1;
7044 if { (eval echo configure:7045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7045 then
7047 else
7048 echo "configure: failed program was:" >&5
7049 cat conftest.$ac_ext >&5
7050 rm -fr conftest*
7051 no_glib=yes
7053 rm -fr conftest*
7056 CFLAGS="$ac_save_CFLAGS"
7057 LIBS="$ac_save_LIBS"
7060 if test "x$no_glib" = x ; then
7061 echo "$ac_t""yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" 1>&6
7063 else
7064 echo "$ac_t""no" 1>&6
7065 if test "$PKG_CONFIG" = "no" ; then
7066 echo "*** A new enough version of pkg-config was not found."
7067 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
7068 else
7069 if test -f conf.glibtest ; then
7071 else
7072 echo "*** Could not run GLIB test program, checking why..."
7073 ac_save_CFLAGS="$CFLAGS"
7074 ac_save_LIBS="$LIBS"
7075 CFLAGS="$CFLAGS $GLIB_CFLAGS"
7076 LIBS="$LIBS $GLIB_LIBS"
7077 cat > conftest.$ac_ext <<EOF
7078 #line 7079 "configure"
7079 #include "confdefs.h"
7081 #include <glib.h>
7082 #include <stdio.h>
7084 int main() {
7085 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
7086 ; return 0; }
7088 if { (eval echo configure:7089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7089 rm -rf conftest*
7090 echo "*** The test program compiled, but did not run. This usually means"
7091 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
7092 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
7093 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7094 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7095 echo "*** is required on your system"
7096 echo "***"
7097 echo "*** If you have an old version installed, it is best to remove it, although"
7098 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
7099 else
7100 echo "configure: failed program was:" >&5
7101 cat conftest.$ac_ext >&5
7102 rm -rf conftest*
7103 echo "*** The test program failed to compile or link. See the file config.log for the"
7104 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."
7106 rm -f conftest*
7107 CFLAGS="$ac_save_CFLAGS"
7108 LIBS="$ac_save_LIBS"
7111 GLIB_CFLAGS=""
7112 GLIB_LIBS=""
7113 GLIB_GENMARSHAL=""
7114 GOBJECT_QUERY=""
7115 GLIB_MKENUMS=""
7116 exit 1
7123 rm -f conf.glibtest
7125 enable_libarttest=no
7126 # Check whether --with-libart-prefix or --without-libart-prefix was given.
7127 if test "${with_libart_prefix+set}" = set; then
7128 withval="$with_libart_prefix"
7129 libart_prefix="$withval"
7130 else
7131 libart_prefix=""
7134 # Check whether --with-libart-exec-prefix or --without-libart-exec-prefix was given.
7135 if test "${with_libart_exec_prefix+set}" = set; then
7136 withval="$with_libart_exec_prefix"
7137 libart_exec_prefix="$withval"
7138 else
7139 libart_exec_prefix=""
7142 # Check whether --enable-libarttest or --disable-libarttest was given.
7143 if test "${enable_libarttest+set}" = set; then
7144 enableval="$enable_libarttest"
7146 else
7147 enable_libarttest=yes
7151 if test x$libart_exec_prefix != x ; then
7152 libart_args="$libart_args --exec-prefix=$libart_exec_prefix"
7153 if test x${LIBART_CONFIG+set} != xset ; then
7154 LIBART_CONFIG=$libart_exec_prefix/bin/libart-config
7157 if test x$libart_prefix != x ; then
7158 libart_args="$libart_args --prefix=$libart_prefix"
7159 if test x${LIBART_CONFIG+set} != xset ; then
7160 LIBART_CONFIG=$libart_prefix/bin/libart-config
7164 # Extract the first word of "libart2-config", so it can be a program name with args.
7165 set dummy libart2-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
7200 if test "$LIBART_CONFIG" = "no" ; then
7201 # Extract the first word of "libart-config", so it can be a program name with args.
7202 set dummy libart-config; ac_word=$2
7203 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7204 echo "configure:7205: checking for $ac_word" >&5
7205 if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then
7206 echo $ac_n "(cached) $ac_c" 1>&6
7207 else
7208 case "$LIBART_CONFIG" in
7210 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path.
7212 ?:/*)
7213 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path.
7216 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7217 ac_dummy="$PATH"
7218 for ac_dir in $ac_dummy; do
7219 test -z "$ac_dir" && ac_dir=.
7220 if test -f $ac_dir/$ac_word; then
7221 ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word"
7222 break
7224 done
7225 IFS="$ac_save_ifs"
7226 test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no"
7228 esac
7230 LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG"
7231 if test -n "$LIBART_CONFIG"; then
7232 echo "$ac_t""$LIBART_CONFIG" 1>&6
7233 else
7234 echo "$ac_t""no" 1>&6
7238 min_libart_version=2.1.0
7239 echo $ac_n "checking for LIBART - version >= $min_libart_version""... $ac_c" 1>&6
7240 echo "configure:7241: checking for LIBART - version >= $min_libart_version" >&5
7241 no_libart=""
7242 if test "$LIBART_CONFIG" = "no" ; then
7243 no_libart=yes
7244 else
7245 LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags`
7246 LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs`
7248 libart_major_version=`$LIBART_CONFIG $libart_args --version | \
7249 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
7250 libart_minor_version=`$LIBART_CONFIG $libart_args --version | \
7251 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
7252 libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \
7253 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
7254 if test "x$enable_libarttest" = "xyes" ; then
7255 ac_save_CFLAGS="$CFLAGS"
7256 ac_save_LIBS="$LIBS"
7257 CFLAGS="$CFLAGS $LIBART_CFLAGS"
7258 LIBS="$LIBS $LIBART_LIBS"
7259 rm -f conf.libarttest
7260 if test "$cross_compiling" = yes; then
7261 echo $ac_n "cross compiling; assumed OK... $ac_c"
7262 else
7263 cat > conftest.$ac_ext <<EOF
7264 #line 7265 "configure"
7265 #include "confdefs.h"
7267 #include <stdio.h>
7268 #include <stdlib.h>
7269 #include <string.h>
7270 #include <libart_lgpl/libart.h>
7272 char*
7273 my_strdup (char *str)
7275 char *new_str;
7277 if (str)
7279 new_str = malloc ((strlen (str) + 1) * sizeof(char));
7280 strcpy (new_str, str);
7282 else
7283 new_str = NULL;
7285 return new_str;
7288 int main ()
7290 int major, minor, micro;
7291 char *tmp_version;
7293 system ("touch conf.libarttest");
7295 /* HP/UX 9 (%@#!) writes to sscanf strings */
7296 tmp_version = my_strdup("$min_libart_version");
7297 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
7298 printf("%s, bad version string\n", "$min_libart_version");
7299 exit(1);
7302 if (($libart_major_version > major) ||
7303 (($libart_major_version == major) && ($libart_minor_version > minor)) ||
7304 (($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro)))
7306 return 0;
7308 else
7310 printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version);
7311 printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro);
7312 printf("*** best to upgrade to the required version.\n");
7313 printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n");
7314 printf("*** to point to the correct copy of libart-config, and remove the file\n");
7315 printf("*** config.cache before re-running configure\n");
7316 return 1;
7322 if { (eval echo configure:7323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7323 then
7325 else
7326 echo "configure: failed program was:" >&5
7327 cat conftest.$ac_ext >&5
7328 rm -fr conftest*
7329 no_libart=yes
7331 rm -fr conftest*
7334 CFLAGS="$ac_save_CFLAGS"
7335 LIBS="$ac_save_LIBS"
7338 if test "x$no_libart" = x ; then
7339 echo "$ac_t""yes" 1>&6
7341 else
7342 echo "$ac_t""no" 1>&6
7343 if test "$LIBART_CONFIG" = "no" ; then
7344 echo "*** The libart-config script installed by LIBART could not be found"
7345 echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in"
7346 echo "*** your path, or set the LIBART_CONFIG environment variable to the"
7347 echo "*** full path to libart-config."
7348 else
7349 if test -f conf.libarttest ; then
7351 else
7352 echo "*** Could not run LIBART test program, checking why..."
7353 CFLAGS="$CFLAGS $LIBART_CFLAGS"
7354 LIBS="$LIBS $LIBART_LIBS"
7355 cat > conftest.$ac_ext <<EOF
7356 #line 7357 "configure"
7357 #include "confdefs.h"
7359 #include <stdio.h>
7360 #include <libart_lgpl/libart.h>
7362 int main() {
7363 return 0;
7364 ; return 0; }
7366 if { (eval echo configure:7367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7367 rm -rf conftest*
7368 echo "*** The test program compiled, but did not run. This usually means"
7369 echo "*** that the run-time linker is not finding LIBART or finding the wrong"
7370 echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your"
7371 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7372 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7373 echo "*** is required on your system"
7374 echo "***"
7375 echo "*** If you have an old version installed, it is best to remove it, although"
7376 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
7377 else
7378 echo "configure: failed program was:" >&5
7379 cat conftest.$ac_ext >&5
7380 rm -rf conftest*
7381 echo "*** The test program failed to compile or link. See the file config.log for the"
7382 echo "*** exact error that occured. This usually means LIBART was incorrectly installed"
7383 echo "*** or that you have moved LIBART since it was installed. In the latter case, you"
7384 echo "*** may want to edit the libart-config script: $LIBART_CONFIG"
7386 rm -f conftest*
7387 CFLAGS="$ac_save_CFLAGS"
7388 LIBS="$ac_save_LIBS"
7391 LIBART_CFLAGS=""
7392 LIBART_LIBS=""
7393 exit 1
7397 rm -f conf.libarttest
7401 # On Solaris, and maybe other architectures, the Boehm collector
7402 # requires -ldl.
7403 if test "$GC" = boehm; then
7404 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
7405 echo "configure:7406: checking for main in -ldl" >&5
7406 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
7407 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7408 echo $ac_n "(cached) $ac_c" 1>&6
7409 else
7410 ac_save_LIBS="$LIBS"
7411 LIBS="-ldl $LIBS"
7412 cat > conftest.$ac_ext <<EOF
7413 #line 7414 "configure"
7414 #include "confdefs.h"
7416 int main() {
7417 main()
7418 ; return 0; }
7420 if { (eval echo configure:7421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7421 rm -rf conftest*
7422 eval "ac_cv_lib_$ac_lib_var=yes"
7423 else
7424 echo "configure: failed program was:" >&5
7425 cat conftest.$ac_ext >&5
7426 rm -rf conftest*
7427 eval "ac_cv_lib_$ac_lib_var=no"
7429 rm -f conftest*
7430 LIBS="$ac_save_LIBS"
7433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7434 echo "$ac_t""yes" 1>&6
7435 SYSTEMSPEC="$SYSTEMSPEC -ldl"
7436 else
7437 echo "$ac_t""no" 1>&6
7443 if test -z "${with_multisubdir}"; then
7444 builddotdot=.
7445 else
7447 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
7451 # Which gcj do we use?
7452 which_gcj=default
7453 built_gcc_dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`"
7454 if test -n "${with_cross_host}"; then
7455 # We are being configured with a cross compiler. We can't
7456 # use ac_exeext, because that is for the target platform.
7457 NATIVE=no
7458 cross_host_exeext=
7459 case "${with_cross_host}" in
7460 *mingw* | *cygwin*)
7461 cross_host_exeext=.exe
7463 esac
7464 if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then
7465 if test x"$build_alias" = x"$with_cross_host"; then
7466 # Ordinary cross (host!=target and host=build)
7467 which_gcj=built
7468 else
7469 # Canadian cross (host!=target and host!=build)
7470 which_gcj=cross
7472 else
7473 which_gcj=cross
7475 else
7476 # We are being configured with a native or crossed-native compiler
7477 if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then
7478 if test x"$build" = x"$host"; then
7479 # True native build (host=target and host=build)
7480 which_gcj=built
7481 else
7482 # Crossed-native build (host=target and host!=build)
7483 which_gcj=cross
7485 else
7486 which_gcj=path
7489 case "${which_gcj}" in
7490 built)
7491 GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
7493 cross)
7494 # See the comment in Makefile.am about CANADIAN being a misnomer
7495 CANADIAN=yes
7496 NULL_TARGET=no
7497 if test "x${with_newlib}" = "xyes"; then
7498 # FIXME (comment): Why is this needed?
7499 GCC_UNWIND_INCLUDE=
7500 GCJ="${target_alias}-gcj"
7501 else
7502 GCJ="${target_alias}-gcj -B`${PWDCMD-pwd}`/"
7505 path)
7506 # See the comment in Makefile.am about CANADIAN being a misnomer
7507 CANADIAN=yes
7508 NULL_TARGET=yes
7509 GCJ="gcj -B`${PWDCMD-pwd}`/"
7511 esac
7513 # Create it, so that compile/link tests don't fail
7514 test -f libgcj.spec || touch libgcj.spec
7516 # We must search the source tree for java.lang, since we still don't
7517 # have libgcj.jar nor java/lang/*.class
7518 GCJ_SAVE_CPPFLAGS=$CPPFLAGS
7519 CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I`cd $srcdir && ${PWDCMD-pwd}`"
7521 # Since some classes depend on this one, we need its source available
7522 # before we can do any GCJ compilation test :-(
7523 if test ! -f gnu/classpath/Configuration.java; then
7524 test -d gnu || mkdir gnu
7525 test -d gnu/classpath || mkdir gnu/classpath
7526 sed -e 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
7527 -e 's,@TOOLKIT@,$TOOLKIT,' \
7528 < $srcdir/gnu/classpath/Configuration.java.in \
7529 > gnu/classpath/Configuration.java
7530 # We do not want to redirect the output of the grep below to /dev/null,
7531 # but we add /dev/null to the input list so that grep will print the
7532 # filename of Configuration.java in case it finds any matches.
7533 if grep @ gnu/classpath/Configuration.java /dev/null; then
7534 { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
7538 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
7539 set dummy ${ac_tool_prefix}gcj; ac_word=$2
7540 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7541 echo "configure:7542: checking for $ac_word" >&5
7542 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
7543 echo $ac_n "(cached) $ac_c" 1>&6
7544 else
7545 if test -n "$GCJ"; then
7546 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
7547 else
7548 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7549 ac_dummy="$PATH"
7550 for ac_dir in $ac_dummy; do
7551 test -z "$ac_dir" && ac_dir=.
7552 if test -f $ac_dir/$ac_word; then
7553 ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
7554 break
7556 done
7557 IFS="$ac_save_ifs"
7560 GCJ="$ac_cv_prog_GCJ"
7561 if test -n "$GCJ"; then
7562 echo "$ac_t""$GCJ" 1>&6
7563 else
7564 echo "$ac_t""no" 1>&6
7568 if test -z "$ac_cv_prog_GCJ"; then
7569 if test -n "$ac_tool_prefix"; then
7570 # Extract the first word of "gcj", so it can be a program name with args.
7571 set dummy gcj; ac_word=$2
7572 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7573 echo "configure:7574: checking for $ac_word" >&5
7574 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
7575 echo $ac_n "(cached) $ac_c" 1>&6
7576 else
7577 if test -n "$GCJ"; then
7578 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
7579 else
7580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7581 ac_dummy="$PATH"
7582 for ac_dir in $ac_dummy; do
7583 test -z "$ac_dir" && ac_dir=.
7584 if test -f $ac_dir/$ac_word; then
7585 ac_cv_prog_GCJ="gcj"
7586 break
7588 done
7589 IFS="$ac_save_ifs"
7590 test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
7593 GCJ="$ac_cv_prog_GCJ"
7594 if test -n "$GCJ"; then
7595 echo "$ac_t""$GCJ" 1>&6
7596 else
7597 echo "$ac_t""no" 1>&6
7600 else
7601 GCJ="no"
7605 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7609 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
7610 lt_save_CC="$CC"
7611 lt_save_CFLAGS="$CFLAGS"
7612 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
7613 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
7614 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
7615 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
7616 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
7617 deplibs_check_method="$deplibs_check_method" \
7618 file_magic_cmd="$file_magic_cmd" \
7619 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
7620 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
7621 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
7622 CC="$lt_save_CC"
7623 CFLAGS="$lt_save_CFLAGS"
7625 # Redirect the config.log output again, so that the ltconfig log is not
7626 # clobbered by the next message.
7627 exec 5>>./config.log
7632 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
7634 echo $ac_n "checking size of void *""... $ac_c" 1>&6
7635 echo "configure:7636: checking size of void *" >&5
7636 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
7637 echo $ac_n "(cached) $ac_c" 1>&6
7638 else
7639 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
7640 cat > conftest.$ac_ext <<EOF
7641 #line 7642 "configure"
7642 #include "confdefs.h"
7643 #include "confdefs.h"
7644 #include <sys/types.h>
7647 int main() {
7648 switch (0) case 0: case (sizeof (void *) == $ac_size):;
7649 ; return 0; }
7651 if { (eval echo configure:7652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7652 rm -rf conftest*
7653 ac_cv_sizeof_void_p=$ac_size
7654 else
7655 echo "configure: failed program was:" >&5
7656 cat conftest.$ac_ext >&5
7658 rm -f conftest*
7659 if test x$ac_cv_sizeof_void_p != x ; then break; fi
7660 done
7664 if test x$ac_cv_sizeof_void_p = x ; then
7665 { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
7667 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
7668 cat >> confdefs.h <<EOF
7669 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
7674 ZLIBS=
7675 SYS_ZLIBS=
7676 ZINCS=
7678 if test -z "$ZLIBSPEC"; then
7679 # Use zlib from the GCC tree.
7680 ZINCS='-I$(top_srcdir)/../zlib'
7681 ZLIBS=../zlib/libzgcj_convenience.la
7682 else
7683 # System's zlib.
7684 SYS_ZLIBS="$ZLIBSPEC"
7696 if test "$CANADIAN" = yes; then
7697 CANADIAN_TRUE=
7698 CANADIAN_FALSE='#'
7699 else
7700 CANADIAN_TRUE='#'
7701 CANADIAN_FALSE=
7705 if test "$NULL_TARGET" = yes; then
7706 NULL_TARGET_TRUE=
7707 NULL_TARGET_FALSE='#'
7708 else
7709 NULL_TARGET_TRUE='#'
7710 NULL_TARGET_FALSE=
7714 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
7715 NATIVE_TRUE=
7716 NATIVE_FALSE='#'
7717 else
7718 NATIVE_TRUE='#'
7719 NATIVE_FALSE=
7723 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
7724 NEEDS_DATA_START_TRUE=
7725 NEEDS_DATA_START_FALSE='#'
7726 else
7727 NEEDS_DATA_START_TRUE='#'
7728 NEEDS_DATA_START_FALSE=
7732 if test -n "$with_cross_host" &&
7733 test x"$with_cross_host" != x"no"; then
7734 toolexecdir='$(exec_prefix)/$(target_alias)'
7735 toolexecmainlibdir='$(toolexecdir)/lib'
7736 else
7737 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
7738 toolexecmainlibdir='$(libdir)'
7740 multi_os_directory=`$CC -print-multi-os-directory`
7741 case $multi_os_directory in
7742 .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
7743 *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
7744 esac
7749 # Determine gcj version number.
7751 gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
7753 GCJVERSION=$gcjversion
7755 cat >> confdefs.h <<EOF
7756 #define GCJVERSION "$GCJVERSION"
7760 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
7762 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7763 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7764 echo "configure:7765: checking for $ac_hdr" >&5
7765 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7766 echo $ac_n "(cached) $ac_c" 1>&6
7767 else
7768 cat > conftest.$ac_ext <<EOF
7769 #line 7770 "configure"
7770 #include "confdefs.h"
7771 #include <$ac_hdr>
7773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7774 { (eval echo configure:7775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7776 if test -z "$ac_err"; then
7777 rm -rf conftest*
7778 eval "ac_cv_header_$ac_safe=yes"
7779 else
7780 echo "$ac_err" >&5
7781 echo "configure: failed program was:" >&5
7782 cat conftest.$ac_ext >&5
7783 rm -rf conftest*
7784 eval "ac_cv_header_$ac_safe=no"
7786 rm -f conftest*
7788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7789 echo "$ac_t""yes" 1>&6
7790 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7791 cat >> confdefs.h <<EOF
7792 #define $ac_tr_hdr 1
7795 else
7796 echo "$ac_t""no" 1>&6
7798 done
7800 for ac_hdr in dirent.h
7802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7804 echo "configure:7805: checking for $ac_hdr" >&5
7805 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7806 echo $ac_n "(cached) $ac_c" 1>&6
7807 else
7808 cat > conftest.$ac_ext <<EOF
7809 #line 7810 "configure"
7810 #include "confdefs.h"
7811 #include <$ac_hdr>
7813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7814 { (eval echo configure:7815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7816 if test -z "$ac_err"; then
7817 rm -rf conftest*
7818 eval "ac_cv_header_$ac_safe=yes"
7819 else
7820 echo "$ac_err" >&5
7821 echo "configure: failed program was:" >&5
7822 cat conftest.$ac_ext >&5
7823 rm -rf conftest*
7824 eval "ac_cv_header_$ac_safe=no"
7826 rm -f conftest*
7828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7829 echo "$ac_t""yes" 1>&6
7830 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7831 cat >> confdefs.h <<EOF
7832 #define $ac_tr_hdr 1
7835 else
7836 echo "$ac_t""no" 1>&6
7838 done
7840 for ac_hdr in inttypes.h
7842 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7843 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7844 echo "configure:7845: checking for $ac_hdr" >&5
7845 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7846 echo $ac_n "(cached) $ac_c" 1>&6
7847 else
7848 cat > conftest.$ac_ext <<EOF
7849 #line 7850 "configure"
7850 #include "confdefs.h"
7851 #include <$ac_hdr>
7853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7854 { (eval echo configure:7855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7856 if test -z "$ac_err"; then
7857 rm -rf conftest*
7858 eval "ac_cv_header_$ac_safe=yes"
7859 else
7860 echo "$ac_err" >&5
7861 echo "configure: failed program was:" >&5
7862 cat conftest.$ac_ext >&5
7863 rm -rf conftest*
7864 eval "ac_cv_header_$ac_safe=no"
7866 rm -f conftest*
7868 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7869 echo "$ac_t""yes" 1>&6
7870 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7871 cat >> confdefs.h <<EOF
7872 #define $ac_tr_hdr 1
7875 cat >> confdefs.h <<\EOF
7876 #define HAVE_INTTYPES_H 1
7879 cat >> confdefs.h <<\EOF
7880 #define JV_HAVE_INTTYPES_H 1
7884 else
7885 echo "$ac_t""no" 1>&6
7887 done
7889 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
7890 echo "configure:7891: checking for sys/wait.h that is POSIX.1 compatible" >&5
7891 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
7892 echo $ac_n "(cached) $ac_c" 1>&6
7893 else
7894 cat > conftest.$ac_ext <<EOF
7895 #line 7896 "configure"
7896 #include "confdefs.h"
7897 #include <sys/types.h>
7898 #include <sys/wait.h>
7899 #ifndef WEXITSTATUS
7900 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7901 #endif
7902 #ifndef WIFEXITED
7903 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7904 #endif
7905 int main() {
7906 int s;
7907 wait (&s);
7908 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7909 ; return 0; }
7911 if { (eval echo configure:7912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7912 rm -rf conftest*
7913 ac_cv_header_sys_wait_h=yes
7914 else
7915 echo "configure: failed program was:" >&5
7916 cat conftest.$ac_ext >&5
7917 rm -rf conftest*
7918 ac_cv_header_sys_wait_h=no
7920 rm -f conftest*
7923 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
7924 if test $ac_cv_header_sys_wait_h = yes; then
7925 cat >> confdefs.h <<\EOF
7926 #define HAVE_SYS_WAIT_H 1
7932 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7933 echo "configure:7934: checking for ANSI C header files" >&5
7934 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
7935 echo $ac_n "(cached) $ac_c" 1>&6
7936 else
7937 cat > conftest.$ac_ext <<EOF
7938 #line 7939 "configure"
7939 #include "confdefs.h"
7940 #include <stdlib.h>
7941 #include <stdarg.h>
7942 #include <string.h>
7943 #include <float.h>
7945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7946 { (eval echo configure:7947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7947 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7948 if test -z "$ac_err"; then
7949 rm -rf conftest*
7950 ac_cv_header_stdc=yes
7951 else
7952 echo "$ac_err" >&5
7953 echo "configure: failed program was:" >&5
7954 cat conftest.$ac_ext >&5
7955 rm -rf conftest*
7956 ac_cv_header_stdc=no
7958 rm -f conftest*
7960 if test $ac_cv_header_stdc = yes; then
7961 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7962 cat > conftest.$ac_ext <<EOF
7963 #line 7964 "configure"
7964 #include "confdefs.h"
7965 #include <string.h>
7967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7968 egrep "memchr" >/dev/null 2>&1; then
7970 else
7971 rm -rf conftest*
7972 ac_cv_header_stdc=no
7974 rm -f conftest*
7978 if test $ac_cv_header_stdc = yes; then
7979 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7980 cat > conftest.$ac_ext <<EOF
7981 #line 7982 "configure"
7982 #include "confdefs.h"
7983 #include <stdlib.h>
7985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7986 egrep "free" >/dev/null 2>&1; then
7988 else
7989 rm -rf conftest*
7990 ac_cv_header_stdc=no
7992 rm -f conftest*
7996 if test $ac_cv_header_stdc = yes; then
7997 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7998 if test "$cross_compiling" = yes; then
8000 else
8001 cat > conftest.$ac_ext <<EOF
8002 #line 8003 "configure"
8003 #include "confdefs.h"
8004 #include <ctype.h>
8005 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8006 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8007 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8008 int main () { int i; for (i = 0; i < 256; i++)
8009 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8010 exit (0); }
8013 if { (eval echo configure:8014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8014 then
8016 else
8017 echo "configure: failed program was:" >&5
8018 cat conftest.$ac_ext >&5
8019 rm -fr conftest*
8020 ac_cv_header_stdc=no
8022 rm -fr conftest*
8028 echo "$ac_t""$ac_cv_header_stdc" 1>&6
8029 if test $ac_cv_header_stdc = yes; then
8030 cat >> confdefs.h <<\EOF
8031 #define STDC_HEADERS 1
8036 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
8037 echo "configure:8038: checking for ssize_t" >&5
8038 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
8039 echo $ac_n "(cached) $ac_c" 1>&6
8040 else
8041 cat > conftest.$ac_ext <<EOF
8042 #line 8043 "configure"
8043 #include "confdefs.h"
8044 #include <sys/types.h>
8045 #if STDC_HEADERS
8046 #include <stdlib.h>
8047 #include <stddef.h>
8048 #endif
8050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8051 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8052 rm -rf conftest*
8053 ac_cv_type_ssize_t=yes
8054 else
8055 rm -rf conftest*
8056 ac_cv_type_ssize_t=no
8058 rm -f conftest*
8061 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
8062 if test $ac_cv_type_ssize_t = no; then
8063 cat >> confdefs.h <<\EOF
8064 #define ssize_t int
8070 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
8071 echo "configure:8072: checking for in_addr_t" >&5
8072 cat > conftest.$ac_ext <<EOF
8073 #line 8074 "configure"
8074 #include "confdefs.h"
8075 #include <sys/types.h>
8076 #if STDC_HEADERS
8077 #include <stdlib.h>
8078 #include <stddef.h>
8079 #endif
8080 #if HAVE_NETINET_IN_H
8081 #include <netinet/in.h>
8082 #endif
8083 int main() {
8084 in_addr_t foo;
8085 ; return 0; }
8087 if { (eval echo configure:8088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8088 rm -rf conftest*
8089 cat >> confdefs.h <<\EOF
8090 #define HAVE_IN_ADDR_T 1
8093 echo "$ac_t""yes" 1>&6
8094 else
8095 echo "configure: failed program was:" >&5
8096 cat conftest.$ac_ext >&5
8097 rm -rf conftest*
8098 echo "$ac_t""no" 1>&6
8100 rm -f conftest*
8102 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
8103 echo "configure:8104: checking whether struct ip_mreq is in netinet/in.h" >&5
8104 cat > conftest.$ac_ext <<EOF
8105 #line 8106 "configure"
8106 #include "confdefs.h"
8107 #include <netinet/in.h>
8108 int main() {
8109 struct ip_mreq mreq;
8110 ; return 0; }
8112 if { (eval echo configure:8113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8113 rm -rf conftest*
8114 cat >> confdefs.h <<\EOF
8115 #define HAVE_STRUCT_IP_MREQ 1
8118 echo "$ac_t""yes" 1>&6
8119 else
8120 echo "configure: failed program was:" >&5
8121 cat conftest.$ac_ext >&5
8122 rm -rf conftest*
8123 echo "$ac_t""no" 1>&6
8125 rm -f conftest*
8127 echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
8128 echo "configure:8129: checking whether struct ipv6_mreq is in netinet/in.h" >&5
8129 cat > conftest.$ac_ext <<EOF
8130 #line 8131 "configure"
8131 #include "confdefs.h"
8132 #include <netinet/in.h>
8133 int main() {
8134 struct ipv6_mreq mreq6;
8135 ; return 0; }
8137 if { (eval echo configure:8138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8138 rm -rf conftest*
8139 cat >> confdefs.h <<\EOF
8140 #define HAVE_STRUCT_IPV6_MREQ 1
8143 echo "$ac_t""yes" 1>&6
8144 else
8145 echo "configure: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8147 rm -rf conftest*
8148 echo "$ac_t""no" 1>&6
8150 rm -f conftest*
8152 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
8153 echo "configure:8154: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
8154 cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 #include <netinet/in.h>
8158 int main() {
8159 struct sockaddr_in6 addr6;
8160 ; return 0; }
8162 if { (eval echo configure:8163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8163 rm -rf conftest*
8164 cat >> confdefs.h <<\EOF
8165 #define HAVE_INET6 1
8168 echo "$ac_t""yes" 1>&6
8169 else
8170 echo "configure: failed program was:" >&5
8171 cat conftest.$ac_ext >&5
8172 rm -rf conftest*
8173 echo "$ac_t""no" 1>&6
8175 rm -f conftest*
8177 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
8178 echo "configure:8179: checking for socklen_t in sys/socket.h" >&5
8179 cat > conftest.$ac_ext <<EOF
8180 #line 8181 "configure"
8181 #include "confdefs.h"
8182 #define _POSIX_PII_SOCKET
8183 #include <sys/types.h>
8184 #include <sys/socket.h>
8185 int main() {
8186 socklen_t x = 5;
8187 ; return 0; }
8189 if { (eval echo configure:8190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8190 rm -rf conftest*
8191 cat >> confdefs.h <<\EOF
8192 #define HAVE_SOCKLEN_T 1
8195 echo "$ac_t""yes" 1>&6
8196 else
8197 echo "configure: failed program was:" >&5
8198 cat conftest.$ac_ext >&5
8199 rm -rf conftest*
8200 echo "$ac_t""no" 1>&6
8202 rm -f conftest*
8204 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
8205 echo "configure:8206: checking for tm_gmtoff in struct tm" >&5
8206 cat > conftest.$ac_ext <<EOF
8207 #line 8208 "configure"
8208 #include "confdefs.h"
8209 #include <time.h>
8210 int main() {
8211 struct tm tim; tim.tm_gmtoff = 0;
8212 ; return 0; }
8214 if { (eval echo configure:8215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8215 rm -rf conftest*
8216 cat >> confdefs.h <<\EOF
8217 #define STRUCT_TM_HAS_GMTOFF 1
8220 echo "$ac_t""yes" 1>&6
8221 else
8222 echo "configure: failed program was:" >&5
8223 cat conftest.$ac_ext >&5
8224 rm -rf conftest*
8225 echo "$ac_t""no" 1>&6
8226 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
8227 echo "configure:8228: checking for global timezone variable" >&5
8228 cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 #include <time.h>
8232 int main() {
8233 void i(){long z2 = 2*timezone;}
8234 ; return 0; }
8236 if { (eval echo configure:8237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8237 rm -rf conftest*
8238 cat >> confdefs.h <<\EOF
8239 #define HAVE_TIMEZONE 1
8242 echo "$ac_t""yes" 1>&6
8243 else
8244 echo "configure: failed program was:" >&5
8245 cat conftest.$ac_ext >&5
8246 rm -rf conftest*
8247 echo "$ac_t""no" 1>&6
8248 echo $ac_n "checking for global _timezone variable""... $ac_c" 1>&6
8249 echo "configure:8250: checking for global _timezone variable" >&5
8250 cat > conftest.$ac_ext <<EOF
8251 #line 8252 "configure"
8252 #include "confdefs.h"
8253 #include <time.h>
8254 int main() {
8255 long z2 = _timezone;
8256 ; return 0; }
8258 if { (eval echo configure:8259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8259 rm -rf conftest*
8260 cat >> confdefs.h <<\EOF
8261 #define HAVE_UNDERSCORE_TIMEZONE 1
8264 echo "$ac_t""yes" 1>&6
8265 else
8266 echo "configure: failed program was:" >&5
8267 cat conftest.$ac_ext >&5
8268 rm -rf conftest*
8269 echo "$ac_t""no" 1>&6
8271 rm -f conftest*
8273 rm -f conftest*
8275 rm -f conftest*
8277 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8278 # for constant arguments. Useless!
8279 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8280 echo "configure:8281: checking for working alloca.h" >&5
8281 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
8282 echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284 cat > conftest.$ac_ext <<EOF
8285 #line 8286 "configure"
8286 #include "confdefs.h"
8287 #include <alloca.h>
8288 int main() {
8289 char *p = alloca(2 * sizeof(int));
8290 ; return 0; }
8292 if { (eval echo configure:8293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8293 rm -rf conftest*
8294 ac_cv_header_alloca_h=yes
8295 else
8296 echo "configure: failed program was:" >&5
8297 cat conftest.$ac_ext >&5
8298 rm -rf conftest*
8299 ac_cv_header_alloca_h=no
8301 rm -f conftest*
8304 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8305 if test $ac_cv_header_alloca_h = yes; then
8306 cat >> confdefs.h <<\EOF
8307 #define HAVE_ALLOCA_H 1
8312 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8313 echo "configure:8314: checking for alloca" >&5
8314 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
8315 echo $ac_n "(cached) $ac_c" 1>&6
8316 else
8317 cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8321 #ifdef __GNUC__
8322 # define alloca __builtin_alloca
8323 #else
8324 # ifdef _MSC_VER
8325 # include <malloc.h>
8326 # define alloca _alloca
8327 # else
8328 # if HAVE_ALLOCA_H
8329 # include <alloca.h>
8330 # else
8331 # ifdef _AIX
8332 #pragma alloca
8333 # else
8334 # ifndef alloca /* predefined by HP cc +Olibcalls */
8335 char *alloca ();
8336 # endif
8337 # endif
8338 # endif
8339 # endif
8340 #endif
8342 int main() {
8343 char *p = (char *) alloca(1);
8344 ; return 0; }
8346 if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8347 rm -rf conftest*
8348 ac_cv_func_alloca_works=yes
8349 else
8350 echo "configure: failed program was:" >&5
8351 cat conftest.$ac_ext >&5
8352 rm -rf conftest*
8353 ac_cv_func_alloca_works=no
8355 rm -f conftest*
8358 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8359 if test $ac_cv_func_alloca_works = yes; then
8360 cat >> confdefs.h <<\EOF
8361 #define HAVE_ALLOCA 1
8366 if test $ac_cv_func_alloca_works = no; then
8367 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8368 # that cause trouble. Some versions do not even contain alloca or
8369 # contain a buggy version. If you still want to use their alloca,
8370 # use ar to extract alloca.o from them instead of compiling alloca.c.
8371 ALLOCA=alloca.${ac_objext}
8372 cat >> confdefs.h <<\EOF
8373 #define C_ALLOCA 1
8377 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8378 echo "configure:8379: checking whether alloca needs Cray hooks" >&5
8379 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
8380 echo $ac_n "(cached) $ac_c" 1>&6
8381 else
8382 cat > conftest.$ac_ext <<EOF
8383 #line 8384 "configure"
8384 #include "confdefs.h"
8385 #if defined(CRAY) && ! defined(CRAY2)
8386 webecray
8387 #else
8388 wenotbecray
8389 #endif
8392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8393 egrep "webecray" >/dev/null 2>&1; then
8394 rm -rf conftest*
8395 ac_cv_os_cray=yes
8396 else
8397 rm -rf conftest*
8398 ac_cv_os_cray=no
8400 rm -f conftest*
8404 echo "$ac_t""$ac_cv_os_cray" 1>&6
8405 if test $ac_cv_os_cray = yes; then
8406 for ac_func in _getb67 GETB67 getb67; do
8407 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8408 echo "configure:8409: checking for $ac_func" >&5
8409 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8410 echo $ac_n "(cached) $ac_c" 1>&6
8411 else
8412 cat > conftest.$ac_ext <<EOF
8413 #line 8414 "configure"
8414 #include "confdefs.h"
8415 /* System header to define __stub macros and hopefully few prototypes,
8416 which can conflict with char $ac_func(); below. */
8417 #include <assert.h>
8418 /* Override any gcc2 internal prototype to avoid an error. */
8419 /* We use char because int might match the return type of a gcc2
8420 builtin and then its argument prototype would still apply. */
8421 char $ac_func();
8423 int main() {
8425 /* The GNU C library defines this for functions which it implements
8426 to always fail with ENOSYS. Some functions are actually named
8427 something starting with __ and the normal name is an alias. */
8428 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8429 choke me
8430 #else
8431 $ac_func();
8432 #endif
8434 ; return 0; }
8436 if { (eval echo configure:8437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8437 rm -rf conftest*
8438 eval "ac_cv_func_$ac_func=yes"
8439 else
8440 echo "configure: failed program was:" >&5
8441 cat conftest.$ac_ext >&5
8442 rm -rf conftest*
8443 eval "ac_cv_func_$ac_func=no"
8445 rm -f conftest*
8448 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8449 echo "$ac_t""yes" 1>&6
8450 cat >> confdefs.h <<EOF
8451 #define CRAY_STACKSEG_END $ac_func
8454 break
8455 else
8456 echo "$ac_t""no" 1>&6
8459 done
8462 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8463 echo "configure:8464: checking stack direction for C alloca" >&5
8464 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
8465 echo $ac_n "(cached) $ac_c" 1>&6
8466 else
8467 if test "$cross_compiling" = yes; then
8468 ac_cv_c_stack_direction=0
8469 else
8470 cat > conftest.$ac_ext <<EOF
8471 #line 8472 "configure"
8472 #include "confdefs.h"
8473 find_stack_direction ()
8475 static char *addr = 0;
8476 auto char dummy;
8477 if (addr == 0)
8479 addr = &dummy;
8480 return find_stack_direction ();
8482 else
8483 return (&dummy > addr) ? 1 : -1;
8485 main ()
8487 exit (find_stack_direction() < 0);
8490 if { (eval echo configure:8491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8491 then
8492 ac_cv_c_stack_direction=1
8493 else
8494 echo "configure: failed program was:" >&5
8495 cat conftest.$ac_ext >&5
8496 rm -fr conftest*
8497 ac_cv_c_stack_direction=-1
8499 rm -fr conftest*
8504 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8505 cat >> confdefs.h <<EOF
8506 #define STACK_DIRECTION $ac_cv_c_stack_direction
8511 for ac_hdr in unistd.h
8513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8515 echo "configure:8516: checking for $ac_hdr" >&5
8516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8517 echo $ac_n "(cached) $ac_c" 1>&6
8518 else
8519 cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 #include <$ac_hdr>
8524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8525 { (eval echo configure:8526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8527 if test -z "$ac_err"; then
8528 rm -rf conftest*
8529 eval "ac_cv_header_$ac_safe=yes"
8530 else
8531 echo "$ac_err" >&5
8532 echo "configure: failed program was:" >&5
8533 cat conftest.$ac_ext >&5
8534 rm -rf conftest*
8535 eval "ac_cv_header_$ac_safe=no"
8537 rm -f conftest*
8539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8540 echo "$ac_t""yes" 1>&6
8541 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8542 cat >> confdefs.h <<EOF
8543 #define $ac_tr_hdr 1
8546 else
8547 echo "$ac_t""no" 1>&6
8549 done
8551 for ac_func in getpagesize
8553 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8554 echo "configure:8555: checking for $ac_func" >&5
8555 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8556 echo $ac_n "(cached) $ac_c" 1>&6
8557 else
8558 cat > conftest.$ac_ext <<EOF
8559 #line 8560 "configure"
8560 #include "confdefs.h"
8561 /* System header to define __stub macros and hopefully few prototypes,
8562 which can conflict with char $ac_func(); below. */
8563 #include <assert.h>
8564 /* Override any gcc2 internal prototype to avoid an error. */
8565 /* We use char because int might match the return type of a gcc2
8566 builtin and then its argument prototype would still apply. */
8567 char $ac_func();
8569 int main() {
8571 /* The GNU C library defines this for functions which it implements
8572 to always fail with ENOSYS. Some functions are actually named
8573 something starting with __ and the normal name is an alias. */
8574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8575 choke me
8576 #else
8577 $ac_func();
8578 #endif
8580 ; return 0; }
8582 if { (eval echo configure:8583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8583 rm -rf conftest*
8584 eval "ac_cv_func_$ac_func=yes"
8585 else
8586 echo "configure: failed program was:" >&5
8587 cat conftest.$ac_ext >&5
8588 rm -rf conftest*
8589 eval "ac_cv_func_$ac_func=no"
8591 rm -f conftest*
8594 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8595 echo "$ac_t""yes" 1>&6
8596 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8597 cat >> confdefs.h <<EOF
8598 #define $ac_tr_func 1
8601 else
8602 echo "$ac_t""no" 1>&6
8604 done
8606 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
8607 echo "configure:8608: checking for working mmap" >&5
8608 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
8609 echo $ac_n "(cached) $ac_c" 1>&6
8610 else
8611 if test "$cross_compiling" = yes; then
8612 ac_cv_func_mmap_fixed_mapped=no
8613 else
8614 cat > conftest.$ac_ext <<EOF
8615 #line 8616 "configure"
8616 #include "confdefs.h"
8618 /* Thanks to Mike Haertel and Jim Avera for this test.
8619 Here is a matrix of mmap possibilities:
8620 mmap private not fixed
8621 mmap private fixed at somewhere currently unmapped
8622 mmap private fixed at somewhere already mapped
8623 mmap shared not fixed
8624 mmap shared fixed at somewhere currently unmapped
8625 mmap shared fixed at somewhere already mapped
8626 For private mappings, we should verify that changes cannot be read()
8627 back from the file, nor mmap's back from the file at a different
8628 address. (There have been systems where private was not correctly
8629 implemented like the infamous i386 svr4.0, and systems where the
8630 VM page cache was not coherent with the filesystem buffer cache
8631 like early versions of FreeBSD and possibly contemporary NetBSD.)
8632 For shared mappings, we should conversely verify that changes get
8633 propogated back to all the places they're supposed to be.
8635 Grep wants private fixed already mapped.
8636 The main things grep needs to know about mmap are:
8637 * does it exist and is it safe to write into the mmap'd area
8638 * how to use it (BSD variants) */
8639 #include <sys/types.h>
8640 #include <fcntl.h>
8641 #include <sys/mman.h>
8643 /* This mess was copied from the GNU getpagesize.h. */
8644 #ifndef HAVE_GETPAGESIZE
8645 # ifdef HAVE_UNISTD_H
8646 # include <unistd.h>
8647 # endif
8649 /* Assume that all systems that can run configure have sys/param.h. */
8650 # ifndef HAVE_SYS_PARAM_H
8651 # define HAVE_SYS_PARAM_H 1
8652 # endif
8654 # ifdef _SC_PAGESIZE
8655 # define getpagesize() sysconf(_SC_PAGESIZE)
8656 # else /* no _SC_PAGESIZE */
8657 # ifdef HAVE_SYS_PARAM_H
8658 # include <sys/param.h>
8659 # ifdef EXEC_PAGESIZE
8660 # define getpagesize() EXEC_PAGESIZE
8661 # else /* no EXEC_PAGESIZE */
8662 # ifdef NBPG
8663 # define getpagesize() NBPG * CLSIZE
8664 # ifndef CLSIZE
8665 # define CLSIZE 1
8666 # endif /* no CLSIZE */
8667 # else /* no NBPG */
8668 # ifdef NBPC
8669 # define getpagesize() NBPC
8670 # else /* no NBPC */
8671 # ifdef PAGESIZE
8672 # define getpagesize() PAGESIZE
8673 # endif /* PAGESIZE */
8674 # endif /* no NBPC */
8675 # endif /* no NBPG */
8676 # endif /* no EXEC_PAGESIZE */
8677 # else /* no HAVE_SYS_PARAM_H */
8678 # define getpagesize() 8192 /* punt totally */
8679 # endif /* no HAVE_SYS_PARAM_H */
8680 # endif /* no _SC_PAGESIZE */
8682 #endif /* no HAVE_GETPAGESIZE */
8684 #ifdef __cplusplus
8685 extern "C" { void *malloc(unsigned); }
8686 #else
8687 char *malloc();
8688 #endif
8691 main()
8693 char *data, *data2, *data3;
8694 int i, pagesize;
8695 int fd;
8697 pagesize = getpagesize();
8700 * First, make a file with some known garbage in it.
8702 data = malloc(pagesize);
8703 if (!data)
8704 exit(1);
8705 for (i = 0; i < pagesize; ++i)
8706 *(data + i) = rand();
8707 umask(0);
8708 fd = creat("conftestmmap", 0600);
8709 if (fd < 0)
8710 exit(1);
8711 if (write(fd, data, pagesize) != pagesize)
8712 exit(1);
8713 close(fd);
8716 * Next, try to mmap the file at a fixed address which
8717 * already has something else allocated at it. If we can,
8718 * also make sure that we see the same garbage.
8720 fd = open("conftestmmap", O_RDWR);
8721 if (fd < 0)
8722 exit(1);
8723 data2 = malloc(2 * pagesize);
8724 if (!data2)
8725 exit(1);
8726 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
8727 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
8728 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8729 exit(1);
8730 for (i = 0; i < pagesize; ++i)
8731 if (*(data + i) != *(data2 + i))
8732 exit(1);
8735 * Finally, make sure that changes to the mapped area
8736 * do not percolate back to the file as seen by read().
8737 * (This is a bug on some variants of i386 svr4.0.)
8739 for (i = 0; i < pagesize; ++i)
8740 *(data2 + i) = *(data2 + i) + 1;
8741 data3 = malloc(pagesize);
8742 if (!data3)
8743 exit(1);
8744 if (read(fd, data3, pagesize) != pagesize)
8745 exit(1);
8746 for (i = 0; i < pagesize; ++i)
8747 if (*(data + i) != *(data3 + i))
8748 exit(1);
8749 close(fd);
8750 unlink("conftestmmap");
8751 exit(0);
8755 if { (eval echo configure:8756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8756 then
8757 ac_cv_func_mmap_fixed_mapped=yes
8758 else
8759 echo "configure: failed program was:" >&5
8760 cat conftest.$ac_ext >&5
8761 rm -fr conftest*
8762 ac_cv_func_mmap_fixed_mapped=no
8764 rm -fr conftest*
8769 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
8770 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8771 cat >> confdefs.h <<\EOF
8772 #define HAVE_MMAP 1
8778 for ac_prog in perl
8780 # Extract the first word of "$ac_prog", so it can be a program name with args.
8781 set dummy $ac_prog; ac_word=$2
8782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8783 echo "configure:8784: checking for $ac_word" >&5
8784 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
8785 echo $ac_n "(cached) $ac_c" 1>&6
8786 else
8787 if test -n "$PERL"; then
8788 ac_cv_prog_PERL="$PERL" # Let the user override the test.
8789 else
8790 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8791 ac_dummy="$PATH"
8792 for ac_dir in $ac_dummy; do
8793 test -z "$ac_dir" && ac_dir=.
8794 if test -f $ac_dir/$ac_word; then
8795 ac_cv_prog_PERL="$ac_prog"
8796 break
8798 done
8799 IFS="$ac_save_ifs"
8802 PERL="$ac_cv_prog_PERL"
8803 if test -n "$PERL"; then
8804 echo "$ac_t""$PERL" 1>&6
8805 else
8806 echo "$ac_t""no" 1>&6
8809 test -n "$PERL" && break
8810 done
8811 test -n "$PERL" || PERL="false"
8814 SYSDEP_SOURCES=
8816 case "${host}" in
8817 i?86-*-linux*)
8818 SIGNAL_HANDLER=include/i386-signal.h
8820 sparc*-sun-solaris*)
8821 SIGNAL_HANDLER=include/sparc-signal.h
8823 # ia64-*)
8824 # SYSDEP_SOURCES=sysdep/ia64.c
8825 # test -d sysdep || mkdir sysdep
8826 # ;;
8827 ia64-*-linux*)
8828 SIGNAL_HANDLER=include/dwarf2-signal.h
8830 powerpc-*-linux*)
8831 SIGNAL_HANDLER=include/powerpc-signal.h
8833 alpha*-*-linux*)
8834 SIGNAL_HANDLER=include/dwarf2-signal.h
8836 s390*-*-linux*)
8837 SIGNAL_HANDLER=include/s390-signal.h
8839 x86_64*-*-linux*)
8840 SIGNAL_HANDLER=include/x86_64-signal.h
8842 sparc*-*-linux*)
8843 SIGNAL_HANDLER=include/dwarf2-signal.h
8845 sh-*-linux* | sh[34]*-*-linux*)
8846 SIGNAL_HANDLER=include/dwarf2-signal.h
8848 *mingw*)
8849 SIGNAL_HANDLER=include/win32-signal.h
8851 mips*-*-linux*)
8852 SIGNAL_HANDLER=include/mips-signal.h
8855 SIGNAL_HANDLER=include/default-signal.h
8857 esac
8859 # If we're using sjlj exceptions, forget what we just learned.
8860 if test "$enable_sjlj_exceptions" = yes; then
8861 SIGNAL_HANDLER=include/default-signal.h
8864 # Define here any compiler flags that you need in order to make backtrace() work.
8865 BACKTRACESPEC=
8866 case "${host}" in
8867 x86_64*-*-linux*)
8868 BACKTRACESPEC=-fno-omit-frame-pointer
8870 esac
8877 if test "${multilib}" = "yes"; then
8878 multilib_arg="--enable-multilib"
8879 else
8880 multilib_arg=
8885 here=`${PWDCMD-pwd}`
8888 # We get this from the environment.
8891 trap '' 1 2 15
8892 cat > confcache <<\EOF
8893 # This file is a shell script that caches the results of configure
8894 # tests run on this system so they can be shared between configure
8895 # scripts and configure runs. It is not useful on other systems.
8896 # If it contains results you don't want to keep, you may remove or edit it.
8898 # By default, configure uses ./config.cache as the cache file,
8899 # creating it if it does not exist already. You can give configure
8900 # the --cache-file=FILE option to use a different cache file; that is
8901 # what configure does when it calls configure scripts in
8902 # subdirectories, so they share the cache.
8903 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8904 # config.status only pays attention to the cache file if you give it the
8905 # --recheck option to rerun configure.
8908 # The following way of writing the cache mishandles newlines in values,
8909 # but we know of no workaround that is simple, portable, and efficient.
8910 # So, don't put newlines in cache variables' values.
8911 # Ultrix sh set writes to stderr and can't be redirected directly,
8912 # and sets the high bit in the cache file unless we assign to the vars.
8913 (set) 2>&1 |
8914 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8915 *ac_space=\ *)
8916 # `set' does not quote correctly, so add quotes (double-quote substitution
8917 # turns \\\\ into \\, and sed turns \\ into \).
8918 sed -n \
8919 -e "s/'/'\\\\''/g" \
8920 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8923 # `set' quotes correctly as required by POSIX, so do not add quotes.
8924 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8926 esac >> confcache
8927 if cmp -s $cache_file confcache; then
8929 else
8930 if test -w $cache_file; then
8931 echo "updating cache $cache_file"
8932 cat confcache > $cache_file
8933 else
8934 echo "not updating unwritable cache $cache_file"
8937 rm -f confcache
8939 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8941 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8942 # Let make expand exec_prefix.
8943 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8945 # Any assignment to VPATH causes Sun make to only execute
8946 # the first set of double-colon rules, so remove it if not needed.
8947 # If there is a colon in the path, we need to keep it.
8948 if test "x$srcdir" = x.; then
8949 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8952 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8954 DEFS=-DHAVE_CONFIG_H
8956 # Without the "./", some shells look in PATH for config.status.
8957 : ${CONFIG_STATUS=./config.status}
8959 echo creating $CONFIG_STATUS
8960 rm -f $CONFIG_STATUS
8961 cat > $CONFIG_STATUS <<EOF
8962 #! /bin/sh
8963 # Generated automatically by configure.
8964 # Run this file to recreate the current configuration.
8965 # This directory was configured as follows,
8966 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8968 # $0 $ac_configure_args
8970 # Compiler output produced by configure, useful for debugging
8971 # configure, is in ./config.log if it exists.
8973 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8974 for ac_option
8976 case "\$ac_option" in
8977 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8978 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8979 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8980 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8981 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8982 exit 0 ;;
8983 -help | --help | --hel | --he | --h)
8984 echo "\$ac_cs_usage"; exit 0 ;;
8985 *) echo "\$ac_cs_usage"; exit 1 ;;
8986 esac
8987 done
8989 ac_given_srcdir=$srcdir
8990 ac_given_INSTALL="$INSTALL"
8992 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
8994 cat >> $CONFIG_STATUS <<EOF
8996 # Protect against being on the right side of a sed subst in config.status.
8997 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8998 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8999 $ac_vpsub
9000 $extrasub
9001 s%@SHELL@%$SHELL%g
9002 s%@CFLAGS@%$CFLAGS%g
9003 s%@CPPFLAGS@%$CPPFLAGS%g
9004 s%@CXXFLAGS@%$CXXFLAGS%g
9005 s%@FFLAGS@%$FFLAGS%g
9006 s%@DEFS@%$DEFS%g
9007 s%@LDFLAGS@%$LDFLAGS%g
9008 s%@LIBS@%$LIBS%g
9009 s%@exec_prefix@%$exec_prefix%g
9010 s%@prefix@%$prefix%g
9011 s%@program_transform_name@%$program_transform_name%g
9012 s%@bindir@%$bindir%g
9013 s%@sbindir@%$sbindir%g
9014 s%@libexecdir@%$libexecdir%g
9015 s%@datadir@%$datadir%g
9016 s%@sysconfdir@%$sysconfdir%g
9017 s%@sharedstatedir@%$sharedstatedir%g
9018 s%@localstatedir@%$localstatedir%g
9019 s%@libdir@%$libdir%g
9020 s%@includedir@%$includedir%g
9021 s%@oldincludedir@%$oldincludedir%g
9022 s%@infodir@%$infodir%g
9023 s%@mandir@%$mandir%g
9024 s%@LN_S@%$LN_S%g
9025 s%@libgcj_basedir@%$libgcj_basedir%g
9026 s%@mkinstalldirs@%$mkinstalldirs%g
9027 s%@host@%$host%g
9028 s%@host_alias@%$host_alias%g
9029 s%@host_cpu@%$host_cpu%g
9030 s%@host_vendor@%$host_vendor%g
9031 s%@host_os@%$host_os%g
9032 s%@target@%$target%g
9033 s%@target_alias@%$target_alias%g
9034 s%@target_cpu@%$target_cpu%g
9035 s%@target_vendor@%$target_vendor%g
9036 s%@target_os@%$target_os%g
9037 s%@build@%$build%g
9038 s%@build_alias@%$build_alias%g
9039 s%@build_cpu@%$build_cpu%g
9040 s%@build_vendor@%$build_vendor%g
9041 s%@build_os@%$build_os%g
9042 s%@CC@%$CC%g
9043 s%@glibjava_CXX@%$glibjava_CXX%g
9044 s%@CXX@%$CXX%g
9045 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9046 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9047 s%@INSTALL_DATA@%$INSTALL_DATA%g
9048 s%@PACKAGE@%$PACKAGE%g
9049 s%@VERSION@%$VERSION%g
9050 s%@ACLOCAL@%$ACLOCAL%g
9051 s%@AUTOCONF@%$AUTOCONF%g
9052 s%@AUTOMAKE@%$AUTOMAKE%g
9053 s%@AUTOHEADER@%$AUTOHEADER%g
9054 s%@MAKEINFO@%$MAKEINFO%g
9055 s%@SET_MAKE@%$SET_MAKE%g
9056 s%@AS@%$AS%g
9057 s%@AR@%$AR%g
9058 s%@RANLIB@%$RANLIB%g
9059 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
9060 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
9061 s%@MAINT@%$MAINT%g
9062 s%@EXEEXT@%$EXEEXT%g
9063 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
9064 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
9065 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
9066 s%@INCLTDL@%$INCLTDL%g
9067 s%@LIBLTDL@%$LIBLTDL%g
9068 s%@DIRLTDL@%$DIRLTDL%g
9069 s%@OBJEXT@%$OBJEXT%g
9070 s%@STRIP@%$STRIP%g
9071 s%@LIBTOOL@%$LIBTOOL%g
9072 s%@CXXCPP@%$CXXCPP%g
9073 s%@subdirs@%$subdirs%g
9074 s%@COMPPATH@%$COMPPATH%g
9075 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
9076 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
9077 s%@ONESTEP_TRUE@%$ONESTEP_TRUE%g
9078 s%@ONESTEP_FALSE@%$ONESTEP_FALSE%g
9079 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
9080 s%@INTERPRETER@%$INTERPRETER%g
9081 s%@LIBFFI@%$LIBFFI%g
9082 s%@LIBFFIINCS@%$LIBFFIINCS%g
9083 s%@EXTRA_CC_FILES@%$EXTRA_CC_FILES%g
9084 s%@PLATFORMOBJS@%$PLATFORMOBJS%g
9085 s%@CPP@%$CPP%g
9086 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
9087 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
9088 s%@ZLIBSPEC@%$ZLIBSPEC%g
9089 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
9090 s%@X_CFLAGS@%$X_CFLAGS%g
9091 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9092 s%@X_LIBS@%$X_LIBS%g
9093 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9094 s%@TOOLKIT@%$TOOLKIT%g
9095 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
9096 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
9097 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
9098 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
9099 s%@GCLIBS@%$GCLIBS%g
9100 s%@GCINCS@%$GCINCS%g
9101 s%@GCDEPS@%$GCDEPS%g
9102 s%@GCOBJS@%$GCOBJS%g
9103 s%@GCSPEC@%$GCSPEC%g
9104 s%@JC1GCSPEC@%$JC1GCSPEC%g
9105 s%@GCTESTSPEC@%$GCTESTSPEC%g
9106 s%@THREADLIBS@%$THREADLIBS%g
9107 s%@THREADINCS@%$THREADINCS%g
9108 s%@THREADDEPS@%$THREADDEPS%g
9109 s%@THREADOBJS@%$THREADOBJS%g
9110 s%@THREADSPEC@%$THREADSPEC%g
9111 s%@THREADLDFLAGS@%$THREADLDFLAGS%g
9112 s%@THREADCXXFLAGS@%$THREADCXXFLAGS%g
9113 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
9114 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
9115 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
9116 s%@tool_include_dir@%$tool_include_dir%g
9117 s%@gcc_version@%$gcc_version%g
9118 s%@LIBICONV@%$LIBICONV%g
9119 s%@PKG_CONFIG@%$PKG_CONFIG%g
9120 s%@GTK_CFLAGS@%$GTK_CFLAGS%g
9121 s%@GTK_LIBS@%$GTK_LIBS%g
9122 s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
9123 s%@GLIB_LIBS@%$GLIB_LIBS%g
9124 s%@GLIB_GENMARSHAL@%$GLIB_GENMARSHAL%g
9125 s%@GOBJECT_QUERY@%$GOBJECT_QUERY%g
9126 s%@GLIB_MKENUMS@%$GLIB_MKENUMS%g
9127 s%@LIBART_CONFIG@%$LIBART_CONFIG%g
9128 s%@LIBART_CFLAGS@%$LIBART_CFLAGS%g
9129 s%@LIBART_LIBS@%$LIBART_LIBS%g
9130 s%@GCJ@%$GCJ%g
9131 s%@GCJFLAGS@%$GCJFLAGS%g
9132 s%@ZLIBS@%$ZLIBS%g
9133 s%@SYS_ZLIBS@%$SYS_ZLIBS%g
9134 s%@ZINCS@%$ZINCS%g
9135 s%@DIVIDESPEC@%$DIVIDESPEC%g
9136 s%@CHECKREFSPEC@%$CHECKREFSPEC%g
9137 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
9138 s%@IEEESPEC@%$IEEESPEC%g
9139 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
9140 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
9141 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
9142 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
9143 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
9144 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
9145 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
9146 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
9147 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
9148 s%@toolexecdir@%$toolexecdir%g
9149 s%@toolexecmainlibdir@%$toolexecmainlibdir%g
9150 s%@toolexeclibdir@%$toolexeclibdir%g
9151 s%@GCJVERSION@%$GCJVERSION%g
9152 s%@ALLOCA@%$ALLOCA%g
9153 s%@PERL@%$PERL%g
9154 s%@BACKTRACESPEC@%$BACKTRACESPEC%g
9155 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
9156 s%@here@%$here%g
9158 CEOF
9161 cat >> $CONFIG_STATUS <<\EOF
9163 # Split the substitutions into bite-sized pieces for seds with
9164 # small command number limits, like on Digital OSF/1 and HP-UX.
9165 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9166 ac_file=1 # Number of current file.
9167 ac_beg=1 # First line for current file.
9168 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9169 ac_more_lines=:
9170 ac_sed_cmds=""
9171 while $ac_more_lines; do
9172 if test $ac_beg -gt 1; then
9173 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9174 else
9175 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9177 if test ! -s conftest.s$ac_file; then
9178 ac_more_lines=false
9179 rm -f conftest.s$ac_file
9180 else
9181 if test -z "$ac_sed_cmds"; then
9182 ac_sed_cmds="sed -f conftest.s$ac_file"
9183 else
9184 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9186 ac_file=`expr $ac_file + 1`
9187 ac_beg=$ac_end
9188 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9190 done
9191 if test -z "$ac_sed_cmds"; then
9192 ac_sed_cmds=cat
9196 cat >> $CONFIG_STATUS <<EOF
9198 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.pc libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
9200 cat >> $CONFIG_STATUS <<\EOF
9201 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9202 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9203 case "$ac_file" in
9204 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9205 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9206 *) ac_file_in="${ac_file}.in" ;;
9207 esac
9209 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9211 # Remove last slash and all that follows it. Not all systems have dirname.
9212 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9213 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9214 # The file is in a subdirectory.
9215 test ! -d "$ac_dir" && mkdir "$ac_dir"
9216 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9217 # A "../" for each directory in $ac_dir_suffix.
9218 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9219 else
9220 ac_dir_suffix= ac_dots=
9223 case "$ac_given_srcdir" in
9224 .) srcdir=.
9225 if test -z "$ac_dots"; then top_srcdir=.
9226 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9227 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9228 *) # Relative path.
9229 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9230 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9231 esac
9233 case "$ac_given_INSTALL" in
9234 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9235 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9236 esac
9238 echo creating "$ac_file"
9239 rm -f "$ac_file"
9240 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9241 case "$ac_file" in
9242 *Makefile*) ac_comsub="1i\\
9243 # $configure_input" ;;
9244 *) ac_comsub= ;;
9245 esac
9247 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9248 sed -e "$ac_comsub
9249 s%@configure_input@%$configure_input%g
9250 s%@srcdir@%$srcdir%g
9251 s%@top_srcdir@%$top_srcdir%g
9252 s%@INSTALL@%$INSTALL%g
9253 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9254 fi; done
9255 rm -f conftest.s*
9257 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9258 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9260 # ac_d sets the value in "#define NAME VALUE" lines.
9261 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9262 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9263 ac_dC='\3'
9264 ac_dD='%g'
9265 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9266 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9267 ac_uB='\([ ]\)%\1#\2define\3'
9268 ac_uC=' '
9269 ac_uD='\4%g'
9270 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9271 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9272 ac_eB='$%\1#\2define\3'
9273 ac_eC=' '
9274 ac_eD='%g'
9276 if test "${CONFIG_HEADERS+set}" != set; then
9278 cat >> $CONFIG_STATUS <<EOF
9279 CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
9281 cat >> $CONFIG_STATUS <<\EOF
9283 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9284 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9285 case "$ac_file" in
9286 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9287 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9288 *) ac_file_in="${ac_file}.in" ;;
9289 esac
9291 echo creating $ac_file
9293 rm -f conftest.frag conftest.in conftest.out
9294 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9295 cat $ac_file_inputs > conftest.in
9299 # Transform confdefs.h into a sed script conftest.vals that substitutes
9300 # the proper values into config.h.in to produce config.h. And first:
9301 # Protect against being on the right side of a sed subst in config.status.
9302 # Protect against being in an unquoted here document in config.status.
9303 rm -f conftest.vals
9304 cat > conftest.hdr <<\EOF
9305 s/[\\&%]/\\&/g
9306 s%[\\$`]%\\&%g
9307 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9308 s%ac_d%ac_u%gp
9309 s%ac_u%ac_e%gp
9311 sed -n -f conftest.hdr confdefs.h > conftest.vals
9312 rm -f conftest.hdr
9314 # This sed command replaces #undef with comments. This is necessary, for
9315 # example, in the case of _POSIX_SOURCE, which is predefined and required
9316 # on some systems where configure will not decide to define it.
9317 cat >> conftest.vals <<\EOF
9318 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9321 # Break up conftest.vals because some shells have a limit on
9322 # the size of here documents, and old seds have small limits too.
9324 rm -f conftest.tail
9325 while :
9327 ac_lines=`grep -c . conftest.vals`
9328 # grep -c gives empty output for an empty file on some AIX systems.
9329 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9330 # Write a limited-size here document to conftest.frag.
9331 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9332 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9333 echo 'CEOF
9334 sed -f conftest.frag conftest.in > conftest.out
9335 rm -f conftest.in
9336 mv conftest.out conftest.in
9337 ' >> $CONFIG_STATUS
9338 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9339 rm -f conftest.vals
9340 mv conftest.tail conftest.vals
9341 done
9342 rm -f conftest.vals
9344 cat >> $CONFIG_STATUS <<\EOF
9345 rm -f conftest.frag conftest.h
9346 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9347 cat conftest.in >> conftest.h
9348 rm -f conftest.in
9349 if cmp -s $ac_file conftest.h 2>/dev/null; then
9350 echo "$ac_file is unchanged"
9351 rm -f conftest.h
9352 else
9353 # Remove last slash and all that follows it. Not all systems have dirname.
9354 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9355 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9356 # The file is in a subdirectory.
9357 test ! -d "$ac_dir" && mkdir "$ac_dir"
9359 rm -f $ac_file
9360 mv conftest.h $ac_file
9362 fi; done
9366 cat >> $CONFIG_STATUS <<EOF
9367 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 gnu/java/nio/natPipeImpl${PLATFORM}.cc gnu/java/nio/natSelectorImpl${PLATFORM}.cc include/$GCHDR include/$THREADH sysdep/$sysdeps_dir/locks.h $SIGNAL_HANDLER"
9368 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 gnu/java/nio/natPipeImpl.cc gnu/java/nio/natSelectorImpl.cc include/java-gc.h include/java-threads.h sysdep/locks.h include/java-signal.h"
9371 cat >> $CONFIG_STATUS <<\EOF
9372 srcdir=$ac_given_srcdir
9373 while test -n "$ac_sources"; do
9374 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9375 set $ac_sources; ac_source=$1; shift; ac_sources=$*
9377 echo "linking $srcdir/$ac_source to $ac_dest"
9379 if test ! -r $srcdir/$ac_source; then
9380 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9382 rm -f $ac_dest
9384 # Make relative symlinks.
9385 # Remove last slash and all that follows it. Not all systems have dirname.
9386 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9387 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9388 # The dest file is in a subdirectory.
9389 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9390 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9391 # A "../" for each directory in $ac_dest_dir_suffix.
9392 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9393 else
9394 ac_dest_dir_suffix= ac_dots=
9397 case "$srcdir" in
9398 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9399 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9400 esac
9402 # Make a symlink if possible; otherwise try a hard link.
9403 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9404 ln $srcdir/$ac_source $ac_dest; then :
9405 else
9406 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9408 done
9410 cat >> $CONFIG_STATUS <<EOF
9412 srcdir=${srcdir}
9413 host=${host}
9414 target=${target}
9415 with_multisubdir=${with_multisubdir}
9416 ac_configure_args="${multilib_arg} ${ac_configure_args}"
9417 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
9418 libgcj_basedir=${libgcj_basedir}
9419 CC="${CC}"
9420 CXX="${CXX}"
9421 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
9424 cat >> $CONFIG_STATUS <<\EOF
9425 am_indx=1
9426 for am_file in include/config.h gcj/libgcj-config.h; do
9427 case " $CONFIG_HEADERS " in
9428 *" $am_file "*)
9429 echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
9431 esac
9432 am_indx=`expr "$am_indx" + 1`
9433 done
9434 # Only add multilib support code if we just rebuilt top-level Makefile.
9435 case " $CONFIG_FILES " in
9436 *" Makefile "*)
9437 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
9438 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
9440 esac
9442 # Make subdirectories and `.d' files. Look in both srcdir and
9443 # builddir for the .java files.
9444 h=`${PWDCMD-pwd}`
9445 : > deps.mk
9446 ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) ;
9447 find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) | \
9448 fgrep -v testsuite | \
9449 sed -e 's/\.java/.d/'\;'s/\.cc/.d/'\;'s/\.c/.d/' | \
9450 while read f; do
9451 echo "include $f" >> deps.mk
9452 test -f $f || {
9454 d=`echo $f | sed -e 's,/[^/]*$,,'`
9456 if test ! -d $d; then
9457 $libgcj_basedir/../mkinstalldirs $d
9459 echo > $f
9461 done
9463 exit 0
9465 chmod +x $CONFIG_STATUS
9466 rm -fr confdefs* $ac_clean_files
9467 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9469 if test "$no_recursion" != yes; then
9471 # Remove --cache-file and --srcdir arguments so they do not pile up.
9472 ac_sub_configure_args=
9473 ac_prev=
9474 for ac_arg in $ac_configure_args; do
9475 if test -n "$ac_prev"; then
9476 ac_prev=
9477 continue
9479 case "$ac_arg" in
9480 -cache-file | --cache-file | --cache-fil | --cache-fi \
9481 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9482 ac_prev=cache_file ;;
9483 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9484 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9486 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9487 ac_prev=srcdir ;;
9488 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9490 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9491 esac
9492 done
9494 for ac_config_dir in $DIRLTDL; do
9496 # Do not complain, so a configure script can configure whichever
9497 # parts of a large source tree are present.
9498 if test ! -d $srcdir/$ac_config_dir; then
9499 continue
9502 echo configuring in $ac_config_dir
9504 case "$srcdir" in
9505 .) ;;
9507 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9508 else
9509 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9512 esac
9514 ac_popdir=`pwd`
9515 cd $ac_config_dir
9517 # A "../" for each directory in /$ac_config_dir.
9518 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9520 case "$srcdir" in
9521 .) # No --srcdir option. We are building in place.
9522 ac_sub_srcdir=$srcdir ;;
9523 /*) # Absolute path.
9524 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9525 *) # Relative path.
9526 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9527 esac
9529 # Check for guested configure; otherwise get Cygnus style configure.
9530 if test -f $ac_sub_srcdir/configure; then
9531 ac_sub_configure=$ac_sub_srcdir/configure
9532 elif test -f $ac_sub_srcdir/configure.in; then
9533 ac_sub_configure=$ac_configure
9534 else
9535 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9536 ac_sub_configure=
9539 # The recursion is here.
9540 if test -n "$ac_sub_configure"; then
9542 # Make the cache file name correct relative to the subdirectory.
9543 case "$cache_file" in
9544 /*) ac_sub_cache_file=$cache_file ;;
9545 *) # Relative path.
9546 ac_sub_cache_file="$ac_dots$cache_file" ;;
9547 esac
9548 case "$ac_given_INSTALL" in
9549 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9550 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9551 esac
9553 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9554 # The eval makes quoting arguments work.
9555 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9556 then :
9557 else
9558 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9562 cd $ac_popdir
9563 done