vector-check.h: Corrected type for var g_##TMODE
[official-gcc.git] / libjava / configure
blob254bc4bc2a324dc4f7c9f89a417dcdc56832a50a
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-target-subdir=SUBDIR
16 configuring in a subdirectory"
17 ac_help="$ac_help
18 --with-cross-host=HOST configuring with a cross compiler"
19 ac_help="$ac_help
20 --with-newlib Configuring with newlib"
21 ac_help="$ac_help
22 --enable-multilib build many library versions (default)"
23 ac_help="$ac_help
24 --enable-maintainer-mode enable make rules and dependencies not useful
25 (and sometimes confusing) to the casual installer"
26 ac_help="$ac_help
27 --enable-shared[=PKGS] build shared libraries [default=yes]"
28 ac_help="$ac_help
29 --enable-static[=PKGS] build static libraries [default=yes]"
30 ac_help="$ac_help
31 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
32 ac_help="$ac_help
33 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
34 ac_help="$ac_help
35 --disable-libtool-lock avoid locking (might break parallel builds)"
36 ac_help="$ac_help
37 --with-pic try to use only PIC/non-PIC objects [default=use both]"
38 ac_help="$ac_help
39 --disable-getenv-properties
40 don't set system properties from GCJ_PROPERTIES"
41 ac_help="$ac_help
42 --enable-hash-synchronization
43 use global hash table for monitor locks"
44 ac_help="$ac_help
45 --enable-libgcj-multifile
46 allow compilation of several files at once"
47 ac_help="$ac_help
48 --enable-libgcj-debug enable runtime debugging code"
49 ac_help="$ac_help
50 --enable-interpreter enable interpreter"
51 ac_help="$ac_help
52 --enable-sjlj-exceptions force use of builtin_setjmp for exceptions"
53 ac_help="$ac_help
54 --disable-java-net disable java.net"
55 ac_help="$ac_help
56 --without-libffi don't use libffi"
57 ac_help="$ac_help
58 --disable-jvmpi disable JVMPI support"
59 ac_help="$ac_help
60 --with-ecos enable runtime eCos target support"
61 ac_help="$ac_help
62 --with-system-zlib use installed libz"
63 ac_help="$ac_help
64 --with-x use the X Window System"
65 ac_help="$ac_help
66 --enable-java-awt list of AWT peer implementations to be built"
67 ac_help="$ac_help
68 --enable-java-gc=TYPE choose garbage collector [boehm]"
69 ac_help="$ac_help
70 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
71 ac_help="$ac_help
72 --disable-gtktest do not try to compile and run a test GTK+ program"
73 ac_help="$ac_help
74 --disable-glibtest do not try to compile and run a test GLIB program"
75 ac_help="$ac_help
76 --with-libart-prefix=PFX Prefix where LIBART is installed (optional)"
77 ac_help="$ac_help
78 --with-libart-exec-prefix=PFX Exec prefix where LIBART is installed (optional)"
79 ac_help="$ac_help
80 --disable-libarttest Do not try to compile and run a test LIBART program"
82 # Initialize some variables set by options.
83 # The variables have the same names as the options, with
84 # dashes changed to underlines.
85 build=NONE
86 cache_file=./config.cache
87 exec_prefix=NONE
88 host=NONE
89 no_create=
90 nonopt=NONE
91 no_recursion=
92 prefix=NONE
93 program_prefix=NONE
94 program_suffix=NONE
95 program_transform_name=s,x,x,
96 silent=
97 site=
98 sitefile=
99 srcdir=
100 target=NONE
101 verbose=
102 x_includes=NONE
103 x_libraries=NONE
104 bindir='${exec_prefix}/bin'
105 sbindir='${exec_prefix}/sbin'
106 libexecdir='${exec_prefix}/libexec'
107 datadir='${prefix}/share'
108 sysconfdir='${prefix}/etc'
109 sharedstatedir='${prefix}/com'
110 localstatedir='${prefix}/var'
111 libdir='${exec_prefix}/lib'
112 includedir='${prefix}/include'
113 oldincludedir='/usr/include'
114 infodir='${prefix}/info'
115 mandir='${prefix}/man'
117 # Initialize some other variables.
118 subdirs=
119 MFLAGS= MAKEFLAGS=
120 SHELL=${CONFIG_SHELL-/bin/sh}
121 # Maximum number of lines to put in a shell here document.
122 ac_max_here_lines=12
124 ac_prev=
125 for ac_option
128 # If the previous option needs an argument, assign it.
129 if test -n "$ac_prev"; then
130 eval "$ac_prev=\$ac_option"
131 ac_prev=
132 continue
135 case "$ac_option" in
136 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
137 *) ac_optarg= ;;
138 esac
140 # Accept the important Cygnus configure options, so we can diagnose typos.
142 case "$ac_option" in
144 -bindir | --bindir | --bindi | --bind | --bin | --bi)
145 ac_prev=bindir ;;
146 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
147 bindir="$ac_optarg" ;;
149 -build | --build | --buil | --bui | --bu)
150 ac_prev=build ;;
151 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
152 build="$ac_optarg" ;;
154 -cache-file | --cache-file | --cache-fil | --cache-fi \
155 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
156 ac_prev=cache_file ;;
157 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
158 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
159 cache_file="$ac_optarg" ;;
161 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
162 ac_prev=datadir ;;
163 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
164 | --da=*)
165 datadir="$ac_optarg" ;;
167 -disable-* | --disable-*)
168 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
169 # Reject names that are not valid shell variable names.
170 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
171 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
173 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
174 eval "enable_${ac_feature}=no" ;;
176 -enable-* | --enable-*)
177 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
178 # Reject names that are not valid shell variable names.
179 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
180 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
182 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
183 case "$ac_option" in
184 *=*) ;;
185 *) ac_optarg=yes ;;
186 esac
187 eval "enable_${ac_feature}='$ac_optarg'" ;;
189 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
190 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
191 | --exec | --exe | --ex)
192 ac_prev=exec_prefix ;;
193 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
194 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
195 | --exec=* | --exe=* | --ex=*)
196 exec_prefix="$ac_optarg" ;;
198 -gas | --gas | --ga | --g)
199 # Obsolete; use --with-gas.
200 with_gas=yes ;;
202 -help | --help | --hel | --he)
203 # Omit some internal or obsolete options to make the list less imposing.
204 # This message is too long to be a string in the A/UX 3.1 sh.
205 cat << EOF
206 Usage: configure [options] [host]
207 Options: [defaults in brackets after descriptions]
208 Configuration:
209 --cache-file=FILE cache test results in FILE
210 --help print this message
211 --no-create do not create output files
212 --quiet, --silent do not print \`checking...' messages
213 --site-file=FILE use FILE as the site file
214 --version print the version of autoconf that created configure
215 Directory and file names:
216 --prefix=PREFIX install architecture-independent files in PREFIX
217 [$ac_default_prefix]
218 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
219 [same as prefix]
220 --bindir=DIR user executables in DIR [EPREFIX/bin]
221 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
222 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
223 --datadir=DIR read-only architecture-independent data in DIR
224 [PREFIX/share]
225 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
226 --sharedstatedir=DIR modifiable architecture-independent data in DIR
227 [PREFIX/com]
228 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
229 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
230 --includedir=DIR C header files in DIR [PREFIX/include]
231 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
232 --infodir=DIR info documentation in DIR [PREFIX/info]
233 --mandir=DIR man documentation in DIR [PREFIX/man]
234 --srcdir=DIR find the sources in DIR [configure dir or ..]
235 --program-prefix=PREFIX prepend PREFIX to installed program names
236 --program-suffix=SUFFIX append SUFFIX to installed program names
237 --program-transform-name=PROGRAM
238 run sed PROGRAM on installed program names
240 cat << EOF
241 Host type:
242 --build=BUILD configure for building on BUILD [BUILD=HOST]
243 --host=HOST configure for HOST [guessed]
244 --target=TARGET configure for TARGET [TARGET=HOST]
245 Features and packages:
246 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
247 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
248 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
249 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
250 --x-includes=DIR X include files are in DIR
251 --x-libraries=DIR X library files are in DIR
253 if test -n "$ac_help"; then
254 echo "--enable and --with options recognized:$ac_help"
256 exit 0 ;;
258 -host | --host | --hos | --ho)
259 ac_prev=host ;;
260 -host=* | --host=* | --hos=* | --ho=*)
261 host="$ac_optarg" ;;
263 -includedir | --includedir | --includedi | --included | --include \
264 | --includ | --inclu | --incl | --inc)
265 ac_prev=includedir ;;
266 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
267 | --includ=* | --inclu=* | --incl=* | --inc=*)
268 includedir="$ac_optarg" ;;
270 -infodir | --infodir | --infodi | --infod | --info | --inf)
271 ac_prev=infodir ;;
272 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
273 infodir="$ac_optarg" ;;
275 -libdir | --libdir | --libdi | --libd)
276 ac_prev=libdir ;;
277 -libdir=* | --libdir=* | --libdi=* | --libd=*)
278 libdir="$ac_optarg" ;;
280 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
281 | --libexe | --libex | --libe)
282 ac_prev=libexecdir ;;
283 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
284 | --libexe=* | --libex=* | --libe=*)
285 libexecdir="$ac_optarg" ;;
287 -localstatedir | --localstatedir | --localstatedi | --localstated \
288 | --localstate | --localstat | --localsta | --localst \
289 | --locals | --local | --loca | --loc | --lo)
290 ac_prev=localstatedir ;;
291 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
292 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
293 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
294 localstatedir="$ac_optarg" ;;
296 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
297 ac_prev=mandir ;;
298 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
299 mandir="$ac_optarg" ;;
301 -nfp | --nfp | --nf)
302 # Obsolete; use --without-fp.
303 with_fp=no ;;
305 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
306 | --no-cr | --no-c)
307 no_create=yes ;;
309 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
310 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
311 no_recursion=yes ;;
313 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
314 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
315 | --oldin | --oldi | --old | --ol | --o)
316 ac_prev=oldincludedir ;;
317 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
318 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
319 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
320 oldincludedir="$ac_optarg" ;;
322 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
323 ac_prev=prefix ;;
324 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
325 prefix="$ac_optarg" ;;
327 -program-prefix | --program-prefix | --program-prefi | --program-pref \
328 | --program-pre | --program-pr | --program-p)
329 ac_prev=program_prefix ;;
330 -program-prefix=* | --program-prefix=* | --program-prefi=* \
331 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
332 program_prefix="$ac_optarg" ;;
334 -program-suffix | --program-suffix | --program-suffi | --program-suff \
335 | --program-suf | --program-su | --program-s)
336 ac_prev=program_suffix ;;
337 -program-suffix=* | --program-suffix=* | --program-suffi=* \
338 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
339 program_suffix="$ac_optarg" ;;
341 -program-transform-name | --program-transform-name \
342 | --program-transform-nam | --program-transform-na \
343 | --program-transform-n | --program-transform- \
344 | --program-transform | --program-transfor \
345 | --program-transfo | --program-transf \
346 | --program-trans | --program-tran \
347 | --progr-tra | --program-tr | --program-t)
348 ac_prev=program_transform_name ;;
349 -program-transform-name=* | --program-transform-name=* \
350 | --program-transform-nam=* | --program-transform-na=* \
351 | --program-transform-n=* | --program-transform-=* \
352 | --program-transform=* | --program-transfor=* \
353 | --program-transfo=* | --program-transf=* \
354 | --program-trans=* | --program-tran=* \
355 | --progr-tra=* | --program-tr=* | --program-t=*)
356 program_transform_name="$ac_optarg" ;;
358 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
359 | -silent | --silent | --silen | --sile | --sil)
360 silent=yes ;;
362 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
363 ac_prev=sbindir ;;
364 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
365 | --sbi=* | --sb=*)
366 sbindir="$ac_optarg" ;;
368 -sharedstatedir | --sharedstatedir | --sharedstatedi \
369 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
370 | --sharedst | --shareds | --shared | --share | --shar \
371 | --sha | --sh)
372 ac_prev=sharedstatedir ;;
373 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
374 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
375 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
376 | --sha=* | --sh=*)
377 sharedstatedir="$ac_optarg" ;;
379 -site | --site | --sit)
380 ac_prev=site ;;
381 -site=* | --site=* | --sit=*)
382 site="$ac_optarg" ;;
384 -site-file | --site-file | --site-fil | --site-fi | --site-f)
385 ac_prev=sitefile ;;
386 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
387 sitefile="$ac_optarg" ;;
389 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
390 ac_prev=srcdir ;;
391 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
392 srcdir="$ac_optarg" ;;
394 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
395 | --syscon | --sysco | --sysc | --sys | --sy)
396 ac_prev=sysconfdir ;;
397 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
398 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
399 sysconfdir="$ac_optarg" ;;
401 -target | --target | --targe | --targ | --tar | --ta | --t)
402 ac_prev=target ;;
403 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
404 target="$ac_optarg" ;;
406 -v | -verbose | --verbose | --verbos | --verbo | --verb)
407 verbose=yes ;;
409 -version | --version | --versio | --versi | --vers)
410 echo "configure generated by autoconf version 2.13"
411 exit 0 ;;
413 -with-* | --with-*)
414 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
415 # Reject names that are not valid shell variable names.
416 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
417 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
419 ac_package=`echo $ac_package| sed 's/-/_/g'`
420 case "$ac_option" in
421 *=*) ;;
422 *) ac_optarg=yes ;;
423 esac
424 eval "with_${ac_package}='$ac_optarg'" ;;
426 -without-* | --without-*)
427 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
428 # Reject names that are not valid shell variable names.
429 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
430 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
432 ac_package=`echo $ac_package| sed 's/-/_/g'`
433 eval "with_${ac_package}=no" ;;
435 --x)
436 # Obsolete; use --with-x.
437 with_x=yes ;;
439 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
440 | --x-incl | --x-inc | --x-in | --x-i)
441 ac_prev=x_includes ;;
442 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
443 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
444 x_includes="$ac_optarg" ;;
446 -x-libraries | --x-libraries | --x-librarie | --x-librari \
447 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
448 ac_prev=x_libraries ;;
449 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
450 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
451 x_libraries="$ac_optarg" ;;
453 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
457 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
458 echo "configure: warning: $ac_option: invalid host type" 1>&2
460 if test "x$nonopt" != xNONE; then
461 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
463 nonopt="$ac_option"
466 esac
467 done
469 if test -n "$ac_prev"; then
470 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
473 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
475 # File descriptor usage:
476 # 0 standard input
477 # 1 file creation
478 # 2 errors and warnings
479 # 3 some systems may open it to /dev/tty
480 # 4 used on the Kubota Titan
481 # 6 checking for... messages and results
482 # 5 compiler messages saved in config.log
483 if test "$silent" = yes; then
484 exec 6>/dev/null
485 else
486 exec 6>&1
488 exec 5>./config.log
490 echo "\
491 This file contains any messages produced by compilers while
492 running configure, to aid debugging if configure makes a mistake.
493 " 1>&5
495 # Strip out --no-create and --no-recursion so they do not pile up.
496 # Also quote any args containing shell metacharacters.
497 ac_configure_args=
498 for ac_arg
500 case "$ac_arg" in
501 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
502 | --no-cr | --no-c) ;;
503 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
504 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
505 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
506 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
507 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
508 esac
509 done
511 # NLS nuisances.
512 # Only set these to C if already set. These must not be set unconditionally
513 # because not all systems understand e.g. LANG=C (notably SCO).
514 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
515 # Non-C LC_CTYPE values break the ctype check.
516 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
517 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
518 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
519 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
521 # confdefs.h avoids OS command line length limits that DEFS can exceed.
522 rm -rf conftest* confdefs.h
523 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
524 echo > confdefs.h
526 # A filename unique to this package, relative to the directory that
527 # configure is in, which we can look for to find out if srcdir is correct.
528 ac_unique_file=java/lang/System.java
530 # Find the source files, if location was not specified.
531 if test -z "$srcdir"; then
532 ac_srcdir_defaulted=yes
533 # Try the directory containing this script, then its parent.
534 ac_prog=$0
535 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
536 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
537 srcdir=$ac_confdir
538 if test ! -r $srcdir/$ac_unique_file; then
539 srcdir=..
541 else
542 ac_srcdir_defaulted=no
544 if test ! -r $srcdir/$ac_unique_file; then
545 if test "$ac_srcdir_defaulted" = yes; then
546 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
547 else
548 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
551 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
553 # Prefer explicitly selected file to automatically selected ones.
554 if test -z "$sitefile"; then
555 if test -z "$CONFIG_SITE"; then
556 if test "x$prefix" != xNONE; then
557 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
558 else
559 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
562 else
563 CONFIG_SITE="$sitefile"
565 for ac_site_file in $CONFIG_SITE; do
566 if test -r "$ac_site_file"; then
567 echo "loading site script $ac_site_file"
568 . "$ac_site_file"
570 done
572 if test -r "$cache_file"; then
573 echo "loading cache $cache_file"
574 . $cache_file
575 else
576 echo "creating cache $cache_file"
577 > $cache_file
580 ac_ext=c
581 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
582 ac_cpp='$CPP $CPPFLAGS'
583 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
584 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
585 cross_compiling=$ac_cv_prog_cc_cross
587 ac_exeext=
588 ac_objext=o
589 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
590 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
591 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
592 ac_n= ac_c='
593 ' ac_t=' '
594 else
595 ac_n=-n ac_c= ac_t=
597 else
598 ac_n= ac_c='\c' ac_t=
603 # This works around the fact that libtool configuration may change LD
604 # for this particular configuration, but some shells, instead of
605 # keeping the changes in LD private, export them just because LD is
606 # exported.
607 ORIGINAL_LD_FOR_MULTILIBS=$LD
609 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
610 echo "configure:611: checking whether ln -s works" >&5
611 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
612 echo $ac_n "(cached) $ac_c" 1>&6
613 else
614 rm -f conftestdata
615 if ln -s X conftestdata 2>/dev/null
616 then
617 rm -f conftestdata
618 ac_cv_prog_LN_S="ln -s"
619 else
620 ac_cv_prog_LN_S=ln
623 LN_S="$ac_cv_prog_LN_S"
624 if test "$ac_cv_prog_LN_S" = "ln -s"; then
625 echo "$ac_t""yes" 1>&6
626 else
627 echo "$ac_t""no" 1>&6
631 # Check whether --with-target-subdir or --without-target-subdir was given.
632 if test "${with_target_subdir+set}" = set; then
633 withval="$with_target_subdir"
637 # Check whether --with-cross-host or --without-cross-host was given.
638 if test "${with_cross_host+set}" = set; then
639 withval="$with_cross_host"
644 # Check whether --with-newlib or --without-newlib was given.
645 if test "${with_newlib+set}" = set; then
646 withval="$with_newlib"
651 # Find a good install program. We prefer a C program (faster),
652 # so one script is as good as another. But avoid the broken or
653 # incompatible versions:
654 # SysV /etc/install, /usr/sbin/install
655 # SunOS /usr/etc/install
656 # IRIX /sbin/install
657 # AIX /bin/install
658 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
659 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
660 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
661 # ./install, which can be erroneously created by make from ./install.sh.
662 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
663 echo "configure:664: checking for a BSD compatible install" >&5
664 if test -z "$INSTALL"; then
665 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
666 echo $ac_n "(cached) $ac_c" 1>&6
667 else
668 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
669 for ac_dir in $PATH; do
670 # Account for people who put trailing slashes in PATH elements.
671 case "$ac_dir/" in
672 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
674 # OSF1 and SCO ODT 3.0 have their own names for install.
675 # Don't use installbsd from OSF since it installs stuff as root
676 # by default.
677 for ac_prog in ginstall scoinst install; do
678 if test -f $ac_dir/$ac_prog; then
679 if test $ac_prog = install &&
680 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
681 # AIX install. It has an incompatible calling convention.
683 else
684 ac_cv_path_install="$ac_dir/$ac_prog -c"
685 break 2
688 done
690 esac
691 done
692 IFS="$ac_save_IFS"
695 if test "${ac_cv_path_install+set}" = set; then
696 INSTALL="$ac_cv_path_install"
697 else
698 # As a last resort, use the slow shell script. We don't cache a
699 # path for INSTALL within a source directory, because that will
700 # break other packages using the cache if that directory is
701 # removed, or if the path is relative.
702 INSTALL="$ac_install_sh"
705 echo "$ac_t""$INSTALL" 1>&6
707 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
708 # It thinks the first close brace ends the variable substitution.
709 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
711 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
713 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
715 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
716 echo "configure:717: checking whether build environment is sane" >&5
717 # Just in case
718 sleep 1
719 echo timestamp > conftestfile
720 # Do `set' in a subshell so we don't clobber the current shell's
721 # arguments. Must try -L first in case configure is actually a
722 # symlink; some systems play weird games with the mod time of symlinks
723 # (eg FreeBSD returns the mod time of the symlink's containing
724 # directory).
725 if (
726 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
727 if test "$*" = "X"; then
728 # -L didn't work.
729 set X `ls -t $srcdir/configure conftestfile`
731 if test "$*" != "X $srcdir/configure conftestfile" \
732 && test "$*" != "X conftestfile $srcdir/configure"; then
734 # If neither matched, then we have a broken ls. This can happen
735 # if, for instance, CONFIG_SHELL is bash and it inherits a
736 # broken ls alias from the environment. This has actually
737 # happened. Such a system could not be considered "sane".
738 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
739 alias in your environment" 1>&2; exit 1; }
742 test "$2" = conftestfile
744 then
745 # Ok.
747 else
748 { echo "configure: error: newly created file is older than distributed files!
749 Check your system clock" 1>&2; exit 1; }
751 rm -f conftest*
752 echo "$ac_t""yes" 1>&6
753 if test "$program_transform_name" = s,x,x,; then
754 program_transform_name=
755 else
756 # Double any \ or $. echo might interpret backslashes.
757 cat <<\EOF_SED > conftestsed
758 s,\\,\\\\,g; s,\$,$$,g
759 EOF_SED
760 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
761 rm -f conftestsed
763 test "$program_prefix" != NONE &&
764 program_transform_name="s,^,${program_prefix},; $program_transform_name"
765 # Use a double $ so make ignores it.
766 test "$program_suffix" != NONE &&
767 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
769 # sed with no file args requires a program.
770 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
772 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
773 echo "configure:774: checking whether ${MAKE-make} sets \${MAKE}" >&5
774 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
775 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777 else
778 cat > conftestmake <<\EOF
779 all:
780 @echo 'ac_maketemp="${MAKE}"'
782 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
783 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
784 if test -n "$ac_maketemp"; then
785 eval ac_cv_prog_make_${ac_make}_set=yes
786 else
787 eval ac_cv_prog_make_${ac_make}_set=no
789 rm -f conftestmake
791 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
792 echo "$ac_t""yes" 1>&6
793 SET_MAKE=
794 else
795 echo "$ac_t""no" 1>&6
796 SET_MAKE="MAKE=${MAKE-make}"
799 if test $host != $build; then
800 ac_tool_prefix=${host_alias}-
801 else
802 ac_tool_prefix=
805 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
806 echo "configure:807: checking for Cygwin environment" >&5
807 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
808 echo $ac_n "(cached) $ac_c" 1>&6
809 else
810 cat > conftest.$ac_ext <<EOF
811 #line 812 "configure"
812 #include "confdefs.h"
814 int main() {
816 #ifndef __CYGWIN__
817 #define __CYGWIN__ __CYGWIN32__
818 #endif
819 return __CYGWIN__;
820 ; return 0; }
822 if { (eval echo configure:823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
823 rm -rf conftest*
824 ac_cv_cygwin=yes
825 else
826 echo "configure: failed program was:" >&5
827 cat conftest.$ac_ext >&5
828 rm -rf conftest*
829 ac_cv_cygwin=no
831 rm -f conftest*
832 rm -f conftest*
835 echo "$ac_t""$ac_cv_cygwin" 1>&6
836 CYGWIN=
837 test "$ac_cv_cygwin" = yes && CYGWIN=yes
838 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
839 echo "configure:840: checking for mingw32 environment" >&5
840 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
842 else
843 cat > conftest.$ac_ext <<EOF
844 #line 845 "configure"
845 #include "confdefs.h"
847 int main() {
848 return __MINGW32__;
849 ; return 0; }
851 if { (eval echo configure:852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
852 rm -rf conftest*
853 ac_cv_mingw32=yes
854 else
855 echo "configure: failed program was:" >&5
856 cat conftest.$ac_ext >&5
857 rm -rf conftest*
858 ac_cv_mingw32=no
860 rm -f conftest*
861 rm -f conftest*
864 echo "$ac_t""$ac_cv_mingw32" 1>&6
865 MINGW32=
866 test "$ac_cv_mingw32" = yes && MINGW32=yes
868 # Check whether --enable-multilib or --disable-multilib was given.
869 if test "${enable_multilib+set}" = set; then
870 enableval="$enable_multilib"
871 case "${enableval}" in
872 yes) multilib=yes ;;
873 no) multilib=no ;;
874 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
875 esac
876 else
877 multilib=yes
881 # When building with srcdir == objdir, links to the source files will
882 # be created in directories within the target_subdir. We have to
883 # adjust toplevel_srcdir accordingly, so that configure finds
884 # install-sh and other auxiliary files that live in the top-level
885 # source directory.
886 if test "${srcdir}" = "."; then
887 if test -z "${with_target_subdir}"; then
888 toprel=".."
889 else
890 if test "${with_target_subdir}" != "."; then
891 toprel="${with_multisrctop}../.."
892 else
893 toprel="${with_multisrctop}.."
896 else
897 toprel=".."
900 libgcj_basedir=$srcdir/$toprel/./libjava
903 ac_aux_dir=
904 for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
905 if test -f $ac_dir/install-sh; then
906 ac_aux_dir=$ac_dir
907 ac_install_sh="$ac_aux_dir/install-sh -c"
908 break
909 elif test -f $ac_dir/install.sh; then
910 ac_aux_dir=$ac_dir
911 ac_install_sh="$ac_aux_dir/install.sh -c"
912 break
914 done
915 if test -z "$ac_aux_dir"; then
916 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
918 ac_config_guess=$ac_aux_dir/config.guess
919 ac_config_sub=$ac_aux_dir/config.sub
920 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
922 if :; then :; else
923 # This overrides the previous occurrence for automake, but not for
924 # autoconf, which is exactly what we want.
925 ac_aux_dir=
926 for ac_dir in .. $srcdir/..; do
927 if test -f $ac_dir/install-sh; then
928 ac_aux_dir=$ac_dir
929 ac_install_sh="$ac_aux_dir/install-sh -c"
930 break
931 elif test -f $ac_dir/install.sh; then
932 ac_aux_dir=$ac_dir
933 ac_install_sh="$ac_aux_dir/install.sh -c"
934 break
936 done
937 if test -z "$ac_aux_dir"; then
938 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
940 ac_config_guess=$ac_aux_dir/config.guess
941 ac_config_sub=$ac_aux_dir/config.sub
942 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
946 # This works around an automake problem.
947 mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
951 # Do some error checking and defaulting for the host and target type.
952 # The inputs are:
953 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
955 # The rules are:
956 # 1. You are not allowed to specify --host, --target, and nonopt at the
957 # same time.
958 # 2. Host defaults to nonopt.
959 # 3. If nonopt is not specified, then host defaults to the current host,
960 # as determined by config.guess.
961 # 4. Target and build default to nonopt.
962 # 5. If nonopt is not specified, then target and build default to host.
964 # The aliases save the names the user supplied, while $host etc.
965 # will get canonicalized.
966 case $host---$target---$nonopt in
967 NONE---*---* | *---NONE---* | *---*---NONE) ;;
968 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
969 esac
972 # Make sure we can run config.sub.
973 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
974 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
977 echo $ac_n "checking host system type""... $ac_c" 1>&6
978 echo "configure:979: checking host system type" >&5
980 host_alias=$host
981 case "$host_alias" in
982 NONE)
983 case $nonopt in
984 NONE)
985 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
986 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
987 fi ;;
988 *) host_alias=$nonopt ;;
989 esac ;;
990 esac
992 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
993 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
994 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
995 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
996 echo "$ac_t""$host" 1>&6
998 echo $ac_n "checking target system type""... $ac_c" 1>&6
999 echo "configure:1000: checking target system type" >&5
1001 target_alias=$target
1002 case "$target_alias" in
1003 NONE)
1004 case $nonopt in
1005 NONE) target_alias=$host_alias ;;
1006 *) target_alias=$nonopt ;;
1007 esac ;;
1008 esac
1010 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1011 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1012 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1013 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1014 echo "$ac_t""$target" 1>&6
1016 echo $ac_n "checking build system type""... $ac_c" 1>&6
1017 echo "configure:1018: checking build system type" >&5
1019 build_alias=$build
1020 case "$build_alias" in
1021 NONE)
1022 case $nonopt in
1023 NONE) build_alias=$host_alias ;;
1024 *) build_alias=$nonopt ;;
1025 esac ;;
1026 esac
1028 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1029 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1030 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1031 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1032 echo "$ac_t""$build" 1>&6
1034 test "$host_alias" != "$target_alias" &&
1035 test "$program_prefix$program_suffix$program_transform_name" = \
1036 NONENONEs,x,x, &&
1037 program_prefix=${target_alias}-
1043 # Extract the first word of "gcc", so it can be a program name with args.
1044 set dummy gcc; ac_word=$2
1045 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1046 echo "configure:1047: checking for $ac_word" >&5
1047 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1048 echo $ac_n "(cached) $ac_c" 1>&6
1049 else
1050 if test -n "$CC"; then
1051 ac_cv_prog_CC="$CC" # Let the user override the test.
1052 else
1053 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1054 ac_dummy="$PATH"
1055 for ac_dir in $ac_dummy; do
1056 test -z "$ac_dir" && ac_dir=.
1057 if test -f $ac_dir/$ac_word; then
1058 ac_cv_prog_CC="gcc"
1059 break
1061 done
1062 IFS="$ac_save_ifs"
1065 CC="$ac_cv_prog_CC"
1066 if test -n "$CC"; then
1067 echo "$ac_t""$CC" 1>&6
1068 else
1069 echo "$ac_t""no" 1>&6
1072 if test -z "$CC"; then
1073 # Extract the first word of "cc", so it can be a program name with args.
1074 set dummy cc; ac_word=$2
1075 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1076 echo "configure:1077: checking for $ac_word" >&5
1077 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1078 echo $ac_n "(cached) $ac_c" 1>&6
1079 else
1080 if test -n "$CC"; then
1081 ac_cv_prog_CC="$CC" # Let the user override the test.
1082 else
1083 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1084 ac_prog_rejected=no
1085 ac_dummy="$PATH"
1086 for ac_dir in $ac_dummy; do
1087 test -z "$ac_dir" && ac_dir=.
1088 if test -f $ac_dir/$ac_word; then
1089 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1090 ac_prog_rejected=yes
1091 continue
1093 ac_cv_prog_CC="cc"
1094 break
1096 done
1097 IFS="$ac_save_ifs"
1098 if test $ac_prog_rejected = yes; then
1099 # We found a bogon in the path, so make sure we never use it.
1100 set dummy $ac_cv_prog_CC
1101 shift
1102 if test $# -gt 0; then
1103 # We chose a different compiler from the bogus one.
1104 # However, it has the same basename, so the bogon will be chosen
1105 # first if we set CC to just the basename; use the full file name.
1106 shift
1107 set dummy "$ac_dir/$ac_word" "$@"
1108 shift
1109 ac_cv_prog_CC="$@"
1114 CC="$ac_cv_prog_CC"
1115 if test -n "$CC"; then
1116 echo "$ac_t""$CC" 1>&6
1117 else
1118 echo "$ac_t""no" 1>&6
1121 if test -z "$CC"; then
1122 case "`uname -s`" in
1123 *win32* | *WIN32*)
1124 # Extract the first word of "cl", so it can be a program name with args.
1125 set dummy cl; ac_word=$2
1126 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1127 echo "configure:1128: checking for $ac_word" >&5
1128 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1129 echo $ac_n "(cached) $ac_c" 1>&6
1130 else
1131 if test -n "$CC"; then
1132 ac_cv_prog_CC="$CC" # Let the user override the test.
1133 else
1134 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1135 ac_dummy="$PATH"
1136 for ac_dir in $ac_dummy; do
1137 test -z "$ac_dir" && ac_dir=.
1138 if test -f $ac_dir/$ac_word; then
1139 ac_cv_prog_CC="cl"
1140 break
1142 done
1143 IFS="$ac_save_ifs"
1146 CC="$ac_cv_prog_CC"
1147 if test -n "$CC"; then
1148 echo "$ac_t""$CC" 1>&6
1149 else
1150 echo "$ac_t""no" 1>&6
1153 esac
1155 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1159 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1160 echo "configure:1161: checking whether we are using GNU C" >&5
1161 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1162 echo $ac_n "(cached) $ac_c" 1>&6
1163 else
1164 cat > conftest.c <<EOF
1165 #ifdef __GNUC__
1166 yes;
1167 #endif
1169 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1170 ac_cv_prog_gcc=yes
1171 else
1172 ac_cv_prog_gcc=no
1176 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1178 if test $ac_cv_prog_gcc = yes; then
1179 GCC=yes
1180 else
1181 GCC=
1184 ac_test_CFLAGS="${CFLAGS+set}"
1185 ac_save_CFLAGS="$CFLAGS"
1186 CFLAGS=
1187 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1188 echo "configure:1189: checking whether ${CC-cc} accepts -g" >&5
1189 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1190 echo $ac_n "(cached) $ac_c" 1>&6
1191 else
1192 echo 'void f(){}' > conftest.c
1193 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1194 ac_cv_prog_cc_g=yes
1195 else
1196 ac_cv_prog_cc_g=no
1198 rm -f conftest*
1202 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1203 if test "$ac_test_CFLAGS" = set; then
1204 CFLAGS="$ac_save_CFLAGS"
1205 elif test $ac_cv_prog_cc_g = yes; then
1206 if test "$GCC" = yes; then
1207 CFLAGS="-g -O2"
1208 else
1209 CFLAGS="-g"
1211 else
1212 if test "$GCC" = yes; then
1213 CFLAGS="-O2"
1214 else
1215 CFLAGS=
1220 # We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
1221 # glibjava_CXX instead of glibcpp_CXX. That's because we're passed a
1222 # different definition of CXX than other directories, since we don't
1223 # depend on libstdc++-v3 having already been built.
1227 # Use glibjava_CXX so that we do not cause CXX to be cached with the
1228 # flags that come in CXX while configuring libjava. They're different
1229 # from those used for all other target libraries. If CXX is set in
1230 # the environment, respect that here.
1231 glibjava_CXX=$CXX
1232 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1234 # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1237 echo "configure:1238: checking for $ac_word" >&5
1238 if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240 else
1241 if test -n "$glibjava_CXX"; then
1242 ac_cv_prog_glibjava_CXX="$glibjava_CXX" # Let the user override the test.
1243 else
1244 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1245 ac_dummy="$PATH"
1246 for ac_dir in $ac_dummy; do
1247 test -z "$ac_dir" && ac_dir=.
1248 if test -f $ac_dir/$ac_word; then
1249 ac_cv_prog_glibjava_CXX="$ac_prog"
1250 break
1252 done
1253 IFS="$ac_save_ifs"
1256 glibjava_CXX="$ac_cv_prog_glibjava_CXX"
1257 if test -n "$glibjava_CXX"; then
1258 echo "$ac_t""$glibjava_CXX" 1>&6
1259 else
1260 echo "$ac_t""no" 1>&6
1263 test -n "$glibjava_CXX" && break
1264 done
1265 test -n "$glibjava_CXX" || glibjava_CXX="gcc"
1268 CXX=$glibjava_CXX
1269 test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1271 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1272 echo "configure:1273: checking whether we are using GNU C++" >&5
1273 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1274 echo $ac_n "(cached) $ac_c" 1>&6
1275 else
1276 cat > conftest.C <<EOF
1277 #ifdef __GNUC__
1278 yes;
1279 #endif
1281 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1282 ac_cv_prog_gxx=yes
1283 else
1284 ac_cv_prog_gxx=no
1288 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1290 if test $ac_cv_prog_gxx = yes; then
1291 GXX=yes
1292 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1293 ac_save_CXXFLAGS="$CXXFLAGS"
1294 CXXFLAGS=
1295 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1296 echo "configure:1297: checking whether ${CXX-g++} accepts -g" >&5
1297 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1298 echo $ac_n "(cached) $ac_c" 1>&6
1299 else
1300 echo 'void f(){}' > conftest.cc
1301 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1302 ac_cv_prog_cxx_g=yes
1303 else
1304 ac_cv_prog_cxx_g=no
1306 rm -f conftest*
1310 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1311 if test "$ac_test_CXXFLAGS" = set; then
1312 CXXFLAGS="$ac_save_CXXFLAGS"
1313 elif test $ac_cv_prog_cxx_g = yes; then
1314 CXXFLAGS="-g -O2"
1315 else
1316 CXXFLAGS="-O2"
1318 else
1319 GXX=
1320 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1324 version=0.0.7
1326 PACKAGE=libjava
1328 VERSION=$version
1330 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1331 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1333 cat >> confdefs.h <<EOF
1334 #define PACKAGE "$PACKAGE"
1337 cat >> confdefs.h <<EOF
1338 #define VERSION "$VERSION"
1343 missing_dir=`cd $ac_aux_dir && pwd`
1344 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1345 echo "configure:1346: checking for working aclocal" >&5
1346 # Run test in a subshell; some versions of sh will print an error if
1347 # an executable is not found, even if stderr is redirected.
1348 # Redirect stdin to placate older versions of autoconf. Sigh.
1349 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1350 ACLOCAL=aclocal
1351 echo "$ac_t""found" 1>&6
1352 else
1353 ACLOCAL="$missing_dir/missing aclocal"
1354 echo "$ac_t""missing" 1>&6
1357 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1358 echo "configure:1359: checking for working autoconf" >&5
1359 # Run test in a subshell; some versions of sh will print an error if
1360 # an executable is not found, even if stderr is redirected.
1361 # Redirect stdin to placate older versions of autoconf. Sigh.
1362 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1363 AUTOCONF=autoconf
1364 echo "$ac_t""found" 1>&6
1365 else
1366 AUTOCONF="$missing_dir/missing autoconf"
1367 echo "$ac_t""missing" 1>&6
1370 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1371 echo "configure:1372: checking for working automake" >&5
1372 # Run test in a subshell; some versions of sh will print an error if
1373 # an executable is not found, even if stderr is redirected.
1374 # Redirect stdin to placate older versions of autoconf. Sigh.
1375 if (automake --version) < /dev/null > /dev/null 2>&1; then
1376 AUTOMAKE=automake
1377 echo "$ac_t""found" 1>&6
1378 else
1379 AUTOMAKE="$missing_dir/missing automake"
1380 echo "$ac_t""missing" 1>&6
1383 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1384 echo "configure:1385: checking for working autoheader" >&5
1385 # Run test in a subshell; some versions of sh will print an error if
1386 # an executable is not found, even if stderr is redirected.
1387 # Redirect stdin to placate older versions of autoconf. Sigh.
1388 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1389 AUTOHEADER=autoheader
1390 echo "$ac_t""found" 1>&6
1391 else
1392 AUTOHEADER="$missing_dir/missing autoheader"
1393 echo "$ac_t""missing" 1>&6
1396 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1397 echo "configure:1398: checking for working makeinfo" >&5
1398 # Run test in a subshell; some versions of sh will print an error if
1399 # an executable is not found, even if stderr is redirected.
1400 # Redirect stdin to placate older versions of autoconf. Sigh.
1401 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1402 MAKEINFO=makeinfo
1403 echo "$ac_t""found" 1>&6
1404 else
1405 MAKEINFO="$missing_dir/missing makeinfo"
1406 echo "$ac_t""missing" 1>&6
1411 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1412 set dummy ${ac_tool_prefix}as; ac_word=$2
1413 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1414 echo "configure:1415: checking for $ac_word" >&5
1415 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1416 echo $ac_n "(cached) $ac_c" 1>&6
1417 else
1418 if test -n "$AS"; then
1419 ac_cv_prog_AS="$AS" # Let the user override the test.
1420 else
1421 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1422 ac_dummy="$PATH"
1423 for ac_dir in $ac_dummy; do
1424 test -z "$ac_dir" && ac_dir=.
1425 if test -f $ac_dir/$ac_word; then
1426 ac_cv_prog_AS="${ac_tool_prefix}as"
1427 break
1429 done
1430 IFS="$ac_save_ifs"
1431 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1434 AS="$ac_cv_prog_AS"
1435 if test -n "$AS"; then
1436 echo "$ac_t""$AS" 1>&6
1437 else
1438 echo "$ac_t""no" 1>&6
1443 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1444 set dummy ${ac_tool_prefix}ar; ac_word=$2
1445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1446 echo "configure:1447: checking for $ac_word" >&5
1447 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1448 echo $ac_n "(cached) $ac_c" 1>&6
1449 else
1450 if test -n "$AR"; then
1451 ac_cv_prog_AR="$AR" # Let the user override the test.
1452 else
1453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1454 ac_dummy="$PATH"
1455 for ac_dir in $ac_dummy; do
1456 test -z "$ac_dir" && ac_dir=.
1457 if test -f $ac_dir/$ac_word; then
1458 ac_cv_prog_AR="${ac_tool_prefix}ar"
1459 break
1461 done
1462 IFS="$ac_save_ifs"
1463 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1466 AR="$ac_cv_prog_AR"
1467 if test -n "$AR"; then
1468 echo "$ac_t""$AR" 1>&6
1469 else
1470 echo "$ac_t""no" 1>&6
1475 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1476 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1477 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1478 echo "configure:1479: checking for $ac_word" >&5
1479 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1480 echo $ac_n "(cached) $ac_c" 1>&6
1481 else
1482 if test -n "$RANLIB"; then
1483 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1484 else
1485 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1486 ac_dummy="$PATH"
1487 for ac_dir in $ac_dummy; do
1488 test -z "$ac_dir" && ac_dir=.
1489 if test -f $ac_dir/$ac_word; then
1490 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1491 break
1493 done
1494 IFS="$ac_save_ifs"
1497 RANLIB="$ac_cv_prog_RANLIB"
1498 if test -n "$RANLIB"; then
1499 echo "$ac_t""$RANLIB" 1>&6
1500 else
1501 echo "$ac_t""no" 1>&6
1505 if test -z "$ac_cv_prog_RANLIB"; then
1506 if test -n "$ac_tool_prefix"; then
1507 # Extract the first word of "ranlib", so it can be a program name with args.
1508 set dummy ranlib; ac_word=$2
1509 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1510 echo "configure:1511: checking for $ac_word" >&5
1511 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1512 echo $ac_n "(cached) $ac_c" 1>&6
1513 else
1514 if test -n "$RANLIB"; then
1515 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1516 else
1517 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1518 ac_dummy="$PATH"
1519 for ac_dir in $ac_dummy; do
1520 test -z "$ac_dir" && ac_dir=.
1521 if test -f $ac_dir/$ac_word; then
1522 ac_cv_prog_RANLIB="ranlib"
1523 break
1525 done
1526 IFS="$ac_save_ifs"
1527 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1530 RANLIB="$ac_cv_prog_RANLIB"
1531 if test -n "$RANLIB"; then
1532 echo "$ac_t""$RANLIB" 1>&6
1533 else
1534 echo "$ac_t""no" 1>&6
1537 else
1538 RANLIB=":"
1543 # Find a good install program. We prefer a C program (faster),
1544 # so one script is as good as another. But avoid the broken or
1545 # incompatible versions:
1546 # SysV /etc/install, /usr/sbin/install
1547 # SunOS /usr/etc/install
1548 # IRIX /sbin/install
1549 # AIX /bin/install
1550 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1551 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1552 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1553 # ./install, which can be erroneously created by make from ./install.sh.
1554 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1555 echo "configure:1556: checking for a BSD compatible install" >&5
1556 if test -z "$INSTALL"; then
1557 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1558 echo $ac_n "(cached) $ac_c" 1>&6
1559 else
1560 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1561 for ac_dir in $PATH; do
1562 # Account for people who put trailing slashes in PATH elements.
1563 case "$ac_dir/" in
1564 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1566 # OSF1 and SCO ODT 3.0 have their own names for install.
1567 # Don't use installbsd from OSF since it installs stuff as root
1568 # by default.
1569 for ac_prog in ginstall scoinst install; do
1570 if test -f $ac_dir/$ac_prog; then
1571 if test $ac_prog = install &&
1572 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1573 # AIX install. It has an incompatible calling convention.
1575 else
1576 ac_cv_path_install="$ac_dir/$ac_prog -c"
1577 break 2
1580 done
1582 esac
1583 done
1584 IFS="$ac_save_IFS"
1587 if test "${ac_cv_path_install+set}" = set; then
1588 INSTALL="$ac_cv_path_install"
1589 else
1590 # As a last resort, use the slow shell script. We don't cache a
1591 # path for INSTALL within a source directory, because that will
1592 # break other packages using the cache if that directory is
1593 # removed, or if the path is relative.
1594 INSTALL="$ac_install_sh"
1597 echo "$ac_t""$INSTALL" 1>&6
1599 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1600 # It thinks the first close brace ends the variable substitution.
1601 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1603 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1605 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1608 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1609 echo "configure:1610: checking whether to enable maintainer-specific portions of Makefiles" >&5
1610 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1611 if test "${enable_maintainer_mode+set}" = set; then
1612 enableval="$enable_maintainer_mode"
1613 USE_MAINTAINER_MODE=$enableval
1614 else
1615 USE_MAINTAINER_MODE=no
1618 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1621 if test $USE_MAINTAINER_MODE = yes; then
1622 MAINTAINER_MODE_TRUE=
1623 MAINTAINER_MODE_FALSE='#'
1624 else
1625 MAINTAINER_MODE_TRUE='#'
1626 MAINTAINER_MODE_FALSE=
1628 MAINT=$MAINTAINER_MODE_TRUE
1634 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1635 echo "configure:1636: checking for executable suffix" >&5
1636 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1637 echo $ac_n "(cached) $ac_c" 1>&6
1638 else
1639 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1640 ac_cv_exeext=.exe
1641 else
1642 rm -f conftest*
1643 echo 'int main () { return 0; }' > conftest.$ac_ext
1644 ac_cv_exeext=
1645 if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1646 for file in conftest.*; do
1647 case $file in
1648 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
1649 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1650 esac
1651 done
1652 else
1653 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1655 rm -f conftest*
1656 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1660 EXEEXT=""
1661 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1662 echo "$ac_t""${ac_cv_exeext}" 1>&6
1663 ac_exeext=$EXEEXT
1666 # configure.host sets the following important variables
1667 # libgcj_cflags - host specific C compiler flags
1668 # libgcj_cxxflags - host specific C++ compiler flags
1669 # libgcj_javaflags - host specific Java compiler flags
1671 libgcj_cflags=
1672 libgcj_cxxflags=
1673 libgcj_javaflags=
1675 . ${srcdir}/configure.host
1677 LIBGCJ_CFLAGS="${libgcj_cflags}"
1678 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1679 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1689 # Only use libltdl for non-newlib builds.
1690 if test "x${with_newlib}" = "x" || test "x${with_newlib}" = "xno"; then
1691 case $enable_ltdl_convenience in
1692 no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1693 "") enable_ltdl_convenience=yes
1694 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1695 esac
1696 LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1697 INCLTDL='-I${top_srcdir}/''libltdl'
1700 DIRLTDL=libltdl
1701 cat >> confdefs.h <<\EOF
1702 #define USE_LTDL 1
1705 # Sigh. Libtool's macro doesn't do the right thing.
1706 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1707 # FIXME: this is a hack.
1708 sub_auxdir="`cd $ac_aux_dir && ${PWDCMD-pwd}`"
1709 ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
1714 # Check whether --enable-shared or --disable-shared was given.
1715 if test "${enable_shared+set}" = set; then
1716 enableval="$enable_shared"
1717 p=${PACKAGE-default}
1718 case $enableval in
1719 yes) enable_shared=yes ;;
1720 no) enable_shared=no ;;
1722 enable_shared=no
1723 # Look at the argument we got. We use all the common list separators.
1724 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1725 for pkg in $enableval; do
1726 if test "X$pkg" = "X$p"; then
1727 enable_shared=yes
1729 done
1730 IFS="$ac_save_ifs"
1732 esac
1733 else
1734 enable_shared=yes
1737 # Check whether --enable-static or --disable-static was given.
1738 if test "${enable_static+set}" = set; then
1739 enableval="$enable_static"
1740 p=${PACKAGE-default}
1741 case $enableval in
1742 yes) enable_static=yes ;;
1743 no) enable_static=no ;;
1745 enable_static=no
1746 # Look at the argument we got. We use all the common list separators.
1747 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1748 for pkg in $enableval; do
1749 if test "X$pkg" = "X$p"; then
1750 enable_static=yes
1752 done
1753 IFS="$ac_save_ifs"
1755 esac
1756 else
1757 enable_static=yes
1760 # Check whether --enable-fast-install or --disable-fast-install was given.
1761 if test "${enable_fast_install+set}" = set; then
1762 enableval="$enable_fast_install"
1763 p=${PACKAGE-default}
1764 case $enableval in
1765 yes) enable_fast_install=yes ;;
1766 no) enable_fast_install=no ;;
1768 enable_fast_install=no
1769 # Look at the argument we got. We use all the common list separators.
1770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1771 for pkg in $enableval; do
1772 if test "X$pkg" = "X$p"; then
1773 enable_fast_install=yes
1775 done
1776 IFS="$ac_save_ifs"
1778 esac
1779 else
1780 enable_fast_install=yes
1783 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1784 if test "${with_gnu_ld+set}" = set; then
1785 withval="$with_gnu_ld"
1786 test "$withval" = no || with_gnu_ld=yes
1787 else
1788 with_gnu_ld=no
1791 ac_prog=ld
1792 if test "$GCC" = yes; then
1793 # Check if gcc -print-prog-name=ld gives a path.
1794 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1795 echo "configure:1796: checking for ld used by GCC" >&5
1796 case $host in
1797 *-*-mingw*)
1798 # gcc leaves a trailing carriage return which upsets mingw
1799 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1801 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1802 esac
1803 case $ac_prog in
1804 # Accept absolute paths.
1805 [\\/]* | [A-Za-z]:[\\/]*)
1806 re_direlt='/[^/][^/]*/\.\./'
1807 # Canonicalize the path of ld
1808 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1809 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1810 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1811 done
1812 test -z "$LD" && LD="$ac_prog"
1815 # If it fails, then pretend we aren't using GCC.
1816 ac_prog=ld
1819 # If it is relative, then search for the first ld in PATH.
1820 with_gnu_ld=unknown
1822 esac
1823 elif test "$with_gnu_ld" = yes; then
1824 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1825 echo "configure:1826: checking for GNU ld" >&5
1826 else
1827 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1828 echo "configure:1829: checking for non-GNU ld" >&5
1830 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1831 echo $ac_n "(cached) $ac_c" 1>&6
1832 else
1833 if test -z "$LD"; then
1834 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1835 for ac_dir in $PATH; do
1836 test -z "$ac_dir" && ac_dir=.
1837 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1838 lt_cv_path_LD="$ac_dir/$ac_prog"
1839 # Check to see if the program is GNU ld. I'd rather use --version,
1840 # but apparently some GNU ld's only accept -v.
1841 # Break only if it was the GNU/non-GNU ld that we prefer.
1842 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1843 test "$with_gnu_ld" != no && break
1844 else
1845 test "$with_gnu_ld" != yes && break
1848 done
1849 IFS="$ac_save_ifs"
1850 else
1851 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1855 LD="$lt_cv_path_LD"
1856 if test -n "$LD"; then
1857 echo "$ac_t""$LD" 1>&6
1858 else
1859 echo "$ac_t""no" 1>&6
1861 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1862 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1863 echo "configure:1864: checking if the linker ($LD) is GNU ld" >&5
1864 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1865 echo $ac_n "(cached) $ac_c" 1>&6
1866 else
1867 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1868 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1869 lt_cv_prog_gnu_ld=yes
1870 else
1871 lt_cv_prog_gnu_ld=no
1875 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1876 with_gnu_ld=$lt_cv_prog_gnu_ld
1879 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1880 echo "configure:1881: checking for $LD option to reload object files" >&5
1881 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1882 echo $ac_n "(cached) $ac_c" 1>&6
1883 else
1884 lt_cv_ld_reload_flag='-r'
1887 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1888 reload_flag=$lt_cv_ld_reload_flag
1889 test -n "$reload_flag" && reload_flag=" $reload_flag"
1891 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1892 echo "configure:1893: checking for BSD-compatible nm" >&5
1893 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1894 echo $ac_n "(cached) $ac_c" 1>&6
1895 else
1896 if test -n "$NM"; then
1897 # Let the user override the test.
1898 lt_cv_path_NM="$NM"
1899 else
1900 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1901 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1902 test -z "$ac_dir" && ac_dir=.
1903 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1904 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1905 # Check to see if the nm accepts a BSD-compat flag.
1906 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1907 # nm: unknown option "B" ignored
1908 # Tru64's nm complains that /dev/null is an invalid object file
1909 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1910 lt_cv_path_NM="$tmp_nm -B"
1911 break
1912 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1913 lt_cv_path_NM="$tmp_nm -p"
1914 break
1915 else
1916 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1917 continue # so that we can try to find one that supports BSD flags
1920 done
1921 IFS="$ac_save_ifs"
1922 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1926 NM="$lt_cv_path_NM"
1927 echo "$ac_t""$NM" 1>&6
1929 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1930 echo "configure:1931: checking how to recognise dependant libraries" >&5
1931 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1932 echo $ac_n "(cached) $ac_c" 1>&6
1933 else
1934 lt_cv_file_magic_cmd='$MAGIC_CMD'
1935 lt_cv_file_magic_test_file=
1936 lt_cv_deplibs_check_method='unknown'
1937 # Need to set the preceding variable on all platforms that support
1938 # interlibrary dependencies.
1939 # 'none' -- dependencies not supported.
1940 # `unknown' -- same as none, but documents that we really don't know.
1941 # 'pass_all' -- all dependencies passed with no checks.
1942 # 'test_compile' -- check by making test program.
1943 # 'file_magic [regex]' -- check by looking for files in library path
1944 # which responds to the $file_magic_cmd with a given egrep regex.
1945 # If you have `file' or equivalent on your system and you're not sure
1946 # whether `pass_all' will *always* work, you probably want this one.
1948 case $host_os in
1949 aix*)
1950 lt_cv_deplibs_check_method=pass_all
1953 beos*)
1954 lt_cv_deplibs_check_method=pass_all
1957 bsdi4*)
1958 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1959 lt_cv_file_magic_cmd='/usr/bin/file -L'
1960 lt_cv_file_magic_test_file=/shlib/libc.so
1963 cygwin* | mingw* |pw32*)
1964 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1965 lt_cv_file_magic_cmd='$OBJDUMP -f'
1968 darwin* | rhapsody*)
1969 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1970 lt_cv_file_magic_cmd='/usr/bin/file -L'
1971 case "$host_os" in
1972 rhapsody* | darwin1.012)
1973 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1975 *) # Darwin 1.3 on
1976 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1978 esac
1981 freebsd* )
1982 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1983 case $host_cpu in
1984 i*86 )
1985 # Not sure whether the presence of OpenBSD here was a mistake.
1986 # Let's accept both of them until this is cleared up.
1987 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1988 lt_cv_file_magic_cmd=/usr/bin/file
1989 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1991 esac
1992 else
1993 lt_cv_deplibs_check_method=pass_all
1997 gnu*)
1998 lt_cv_deplibs_check_method=pass_all
2001 hpux10.20*|hpux11*)
2002 case $host_cpu in
2003 hppa*)
2004 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
2005 lt_cv_file_magic_cmd=/usr/bin/file
2006 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2008 ia64*)
2009 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
2010 lt_cv_file_magic_cmd=/usr/bin/file
2011 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2013 esac
2016 irix5* | irix6*)
2017 case $host_os in
2018 irix5*)
2019 # this will be overridden with pass_all, but let us keep it just in case
2020 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2023 case $LD in
2024 *-32|*"-32 ") libmagic=32-bit;;
2025 *-n32|*"-n32 ") libmagic=N32;;
2026 *-64|*"-64 ") libmagic=64-bit;;
2027 *) libmagic=never-match;;
2028 esac
2029 # this will be overridden with pass_all, but let us keep it just in case
2030 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2032 esac
2033 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2034 lt_cv_deplibs_check_method=pass_all
2037 # This must be Linux ELF.
2038 linux-gnu*)
2039 case $host_cpu in
2040 alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2041 lt_cv_deplibs_check_method=pass_all ;;
2043 # glibc up to 2.1.1 does not perform some relocations on ARM
2044 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2045 esac
2046 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2049 netbsd*)
2050 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2051 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2052 else
2053 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2057 newsos6)
2058 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2059 lt_cv_file_magic_cmd=/usr/bin/file
2060 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2063 osf3* | osf4* | osf5*)
2064 # this will be overridden with pass_all, but let us keep it just in case
2065 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2066 lt_cv_file_magic_test_file=/shlib/libc.so
2067 lt_cv_deplibs_check_method=pass_all
2070 sco3.2v5*)
2071 lt_cv_deplibs_check_method=pass_all
2074 solaris*)
2075 lt_cv_deplibs_check_method=pass_all
2076 lt_cv_file_magic_test_file=/lib/libc.so
2079 sysv5uw[78]* | sysv4*uw2*)
2080 lt_cv_deplibs_check_method=pass_all
2083 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2084 case $host_vendor in
2085 ncr)
2086 lt_cv_deplibs_check_method=pass_all
2088 motorola)
2089 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]'
2090 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2092 esac
2094 esac
2098 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2099 file_magic_cmd=$lt_cv_file_magic_cmd
2100 deplibs_check_method=$lt_cv_deplibs_check_method
2102 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2103 echo "configure:2104: checking for object suffix" >&5
2104 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2105 echo $ac_n "(cached) $ac_c" 1>&6
2106 else
2107 rm -f conftest*
2108 echo 'int i = 1;' > conftest.$ac_ext
2109 if { (eval echo configure:2110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2110 for ac_file in conftest.*; do
2111 case $ac_file in
2112 *.c) ;;
2113 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2114 esac
2115 done
2116 else
2117 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2119 rm -f conftest*
2122 echo "$ac_t""$ac_cv_objext" 1>&6
2123 OBJEXT=$ac_cv_objext
2124 ac_objext=$ac_cv_objext
2126 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2128 # Only perform the check for file, if the check method requires it
2129 case $deplibs_check_method in
2130 file_magic*)
2131 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2132 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2133 echo "configure:2134: checking for ${ac_tool_prefix}file" >&5
2134 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2135 echo $ac_n "(cached) $ac_c" 1>&6
2136 else
2137 case $MAGIC_CMD in
2139 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2141 ?:/*)
2142 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2145 ac_save_MAGIC_CMD="$MAGIC_CMD"
2146 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2147 ac_dummy="/usr/bin:$PATH"
2148 for ac_dir in $ac_dummy; do
2149 test -z "$ac_dir" && ac_dir=.
2150 if test -f $ac_dir/${ac_tool_prefix}file; then
2151 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2152 if test -n "$file_magic_test_file"; then
2153 case $deplibs_check_method in
2154 "file_magic "*)
2155 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2156 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2157 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2158 egrep "$file_magic_regex" > /dev/null; then
2160 else
2161 cat <<EOF 1>&2
2163 *** Warning: the command libtool uses to detect shared libraries,
2164 *** $file_magic_cmd, produces output that libtool cannot recognize.
2165 *** The result is that libtool may fail to recognize shared libraries
2166 *** as such. This will affect the creation of libtool libraries that
2167 *** depend on shared libraries, but programs linked with such libtool
2168 *** libraries will work regardless of this problem. Nevertheless, you
2169 *** may want to report the problem to your system manager and/or to
2170 *** bug-libtool@gnu.org
2173 fi ;;
2174 esac
2176 break
2178 done
2179 IFS="$ac_save_ifs"
2180 MAGIC_CMD="$ac_save_MAGIC_CMD"
2182 esac
2185 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2186 if test -n "$MAGIC_CMD"; then
2187 echo "$ac_t""$MAGIC_CMD" 1>&6
2188 else
2189 echo "$ac_t""no" 1>&6
2192 if test -z "$lt_cv_path_MAGIC_CMD"; then
2193 if test -n "$ac_tool_prefix"; then
2194 echo $ac_n "checking for file""... $ac_c" 1>&6
2195 echo "configure:2196: checking for file" >&5
2196 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2197 echo $ac_n "(cached) $ac_c" 1>&6
2198 else
2199 case $MAGIC_CMD in
2201 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2203 ?:/*)
2204 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2207 ac_save_MAGIC_CMD="$MAGIC_CMD"
2208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2209 ac_dummy="/usr/bin:$PATH"
2210 for ac_dir in $ac_dummy; do
2211 test -z "$ac_dir" && ac_dir=.
2212 if test -f $ac_dir/file; then
2213 lt_cv_path_MAGIC_CMD="$ac_dir/file"
2214 if test -n "$file_magic_test_file"; then
2215 case $deplibs_check_method in
2216 "file_magic "*)
2217 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2218 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2219 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2220 egrep "$file_magic_regex" > /dev/null; then
2222 else
2223 cat <<EOF 1>&2
2225 *** Warning: the command libtool uses to detect shared libraries,
2226 *** $file_magic_cmd, produces output that libtool cannot recognize.
2227 *** The result is that libtool may fail to recognize shared libraries
2228 *** as such. This will affect the creation of libtool libraries that
2229 *** depend on shared libraries, but programs linked with such libtool
2230 *** libraries will work regardless of this problem. Nevertheless, you
2231 *** may want to report the problem to your system manager and/or to
2232 *** bug-libtool@gnu.org
2235 fi ;;
2236 esac
2238 break
2240 done
2241 IFS="$ac_save_ifs"
2242 MAGIC_CMD="$ac_save_MAGIC_CMD"
2244 esac
2247 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2248 if test -n "$MAGIC_CMD"; then
2249 echo "$ac_t""$MAGIC_CMD" 1>&6
2250 else
2251 echo "$ac_t""no" 1>&6
2254 else
2255 MAGIC_CMD=:
2261 esac
2263 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2264 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2265 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2266 echo "configure:2267: checking for $ac_word" >&5
2267 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2268 echo $ac_n "(cached) $ac_c" 1>&6
2269 else
2270 if test -n "$RANLIB"; then
2271 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2272 else
2273 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2274 ac_dummy="$PATH"
2275 for ac_dir in $ac_dummy; do
2276 test -z "$ac_dir" && ac_dir=.
2277 if test -f $ac_dir/$ac_word; then
2278 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2279 break
2281 done
2282 IFS="$ac_save_ifs"
2285 RANLIB="$ac_cv_prog_RANLIB"
2286 if test -n "$RANLIB"; then
2287 echo "$ac_t""$RANLIB" 1>&6
2288 else
2289 echo "$ac_t""no" 1>&6
2293 if test -z "$ac_cv_prog_RANLIB"; then
2294 if test -n "$ac_tool_prefix"; then
2295 # Extract the first word of "ranlib", so it can be a program name with args.
2296 set dummy ranlib; ac_word=$2
2297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2298 echo "configure:2299: checking for $ac_word" >&5
2299 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2300 echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302 if test -n "$RANLIB"; then
2303 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2304 else
2305 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2306 ac_dummy="$PATH"
2307 for ac_dir in $ac_dummy; do
2308 test -z "$ac_dir" && ac_dir=.
2309 if test -f $ac_dir/$ac_word; then
2310 ac_cv_prog_RANLIB="ranlib"
2311 break
2313 done
2314 IFS="$ac_save_ifs"
2315 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2318 RANLIB="$ac_cv_prog_RANLIB"
2319 if test -n "$RANLIB"; then
2320 echo "$ac_t""$RANLIB" 1>&6
2321 else
2322 echo "$ac_t""no" 1>&6
2325 else
2326 RANLIB=":"
2330 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2331 set dummy ${ac_tool_prefix}strip; ac_word=$2
2332 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2333 echo "configure:2334: checking for $ac_word" >&5
2334 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2335 echo $ac_n "(cached) $ac_c" 1>&6
2336 else
2337 if test -n "$STRIP"; then
2338 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2339 else
2340 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2341 ac_dummy="$PATH"
2342 for ac_dir in $ac_dummy; do
2343 test -z "$ac_dir" && ac_dir=.
2344 if test -f $ac_dir/$ac_word; then
2345 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2346 break
2348 done
2349 IFS="$ac_save_ifs"
2352 STRIP="$ac_cv_prog_STRIP"
2353 if test -n "$STRIP"; then
2354 echo "$ac_t""$STRIP" 1>&6
2355 else
2356 echo "$ac_t""no" 1>&6
2360 if test -z "$ac_cv_prog_STRIP"; then
2361 if test -n "$ac_tool_prefix"; then
2362 # Extract the first word of "strip", so it can be a program name with args.
2363 set dummy strip; ac_word=$2
2364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2365 echo "configure:2366: checking for $ac_word" >&5
2366 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2367 echo $ac_n "(cached) $ac_c" 1>&6
2368 else
2369 if test -n "$STRIP"; then
2370 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2371 else
2372 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2373 ac_dummy="$PATH"
2374 for ac_dir in $ac_dummy; do
2375 test -z "$ac_dir" && ac_dir=.
2376 if test -f $ac_dir/$ac_word; then
2377 ac_cv_prog_STRIP="strip"
2378 break
2380 done
2381 IFS="$ac_save_ifs"
2382 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2385 STRIP="$ac_cv_prog_STRIP"
2386 if test -n "$STRIP"; then
2387 echo "$ac_t""$STRIP" 1>&6
2388 else
2389 echo "$ac_t""no" 1>&6
2392 else
2393 STRIP=":"
2398 # Check for any special flags to pass to ltconfig.
2399 libtool_flags="--cache-file=$cache_file"
2400 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2401 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2402 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2403 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2404 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2405 libtool_flags="$libtool_flags --enable-dlopen"
2407 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2408 if test "${enable_libtool_lock+set}" = set; then
2409 enableval="$enable_libtool_lock"
2413 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2414 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2416 # Check whether --with-pic or --without-pic was given.
2417 if test "${with_pic+set}" = set; then
2418 withval="$with_pic"
2419 pic_mode="$withval"
2420 else
2421 pic_mode=default
2424 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2425 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2427 # Some flags need to be propagated to the compiler or linker for good
2428 # libtool support.
2429 case $host in
2430 *-*-irix6*)
2431 # Find out which ABI we are using.
2432 echo '#line 2433 "configure"' > conftest.$ac_ext
2433 if { (eval echo configure:2434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2434 if test "$lt_cv_prog_gnu_ld" = yes; then
2435 case `/usr/bin/file conftest.$ac_objext` in
2436 *32-bit*)
2437 LD="${LD-ld} -melf32bsmip"
2439 *N32*)
2440 LD="${LD-ld} -melf32bmipn32"
2442 *64-bit*)
2443 LD="${LD-ld} -melf64bmip"
2445 esac
2446 else
2447 case `/usr/bin/file conftest.$ac_objext` in
2448 *32-bit*)
2449 LD="${LD-ld} -32"
2451 *N32*)
2452 LD="${LD-ld} -n32"
2454 *64-bit*)
2455 LD="${LD-ld} -64"
2457 esac
2460 rm -rf conftest*
2463 ia64-*-hpux*)
2464 # Find out which ABI we are using.
2465 echo 'int i;' > conftest.$ac_ext
2466 if { (eval echo configure:2467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2467 case "`/usr/bin/file conftest.o`" in
2468 *ELF-32*)
2469 HPUX_IA64_MODE="32"
2471 *ELF-64*)
2472 HPUX_IA64_MODE="64"
2474 esac
2476 rm -rf conftest*
2479 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2480 # Find out which ABI we are using.
2481 echo 'int i;' > conftest.$ac_ext
2482 if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2483 case "`/usr/bin/file conftest.o`" in
2484 *32-bit*)
2485 case $host in
2486 x86_64-*linux*)
2487 LD="${LD-ld} -m elf_i386"
2489 ppc64-*linux*|powerpc64-*linux*)
2490 LD="${LD-ld} -m elf32ppclinux"
2492 s390x-*linux*)
2493 LD="${LD-ld} -m elf_s390"
2495 sparc64-*linux*)
2496 LD="${LD-ld} -m elf32_sparc"
2498 esac
2500 *64-bit*)
2501 case $host in
2502 x86_64-*linux*)
2503 LD="${LD-ld} -m elf_x86_64"
2505 ppc*-*linux*|powerpc*-*linux*)
2506 LD="${LD-ld} -m elf64ppc"
2508 s390*-*linux*)
2509 LD="${LD-ld} -m elf64_s390"
2511 sparc*-*linux*)
2512 LD="${LD-ld} -m elf64_sparc"
2514 esac
2516 esac
2518 rm -rf conftest*
2521 *-*-sco3.2v5*)
2522 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2523 SAVE_CFLAGS="$CFLAGS"
2524 CFLAGS="$CFLAGS -belf"
2525 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2526 echo "configure:2527: checking whether the C compiler needs -belf" >&5
2527 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2528 echo $ac_n "(cached) $ac_c" 1>&6
2529 else
2531 ac_ext=c
2532 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2533 ac_cpp='$CPP $CPPFLAGS'
2534 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2535 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2536 cross_compiling=$ac_cv_prog_cc_cross
2538 cat > conftest.$ac_ext <<EOF
2539 #line 2540 "configure"
2540 #include "confdefs.h"
2542 int main() {
2544 ; return 0; }
2546 if { (eval echo configure:2547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2547 rm -rf conftest*
2548 lt_cv_cc_needs_belf=yes
2549 else
2550 echo "configure: failed program was:" >&5
2551 cat conftest.$ac_ext >&5
2552 rm -rf conftest*
2553 lt_cv_cc_needs_belf=no
2555 rm -f conftest*
2556 ac_ext=c
2557 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2558 ac_cpp='$CPP $CPPFLAGS'
2559 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2560 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2561 cross_compiling=$ac_cv_prog_cc_cross
2565 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2566 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2567 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2568 CFLAGS="$SAVE_CFLAGS"
2573 esac
2575 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2576 echo "configure:2577: checking how to run the C++ preprocessor" >&5
2577 if test -z "$CXXCPP"; then
2578 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2579 echo $ac_n "(cached) $ac_c" 1>&6
2580 else
2581 ac_ext=C
2582 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2583 ac_cpp='$CXXCPP $CPPFLAGS'
2584 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2585 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2586 cross_compiling=$ac_cv_prog_cxx_cross
2587 CXXCPP="${CXX-g++} -E"
2588 cat > conftest.$ac_ext <<EOF
2589 #line 2590 "configure"
2590 #include "confdefs.h"
2591 #include <stdlib.h>
2593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2594 { (eval echo configure:2595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2596 if test -z "$ac_err"; then
2598 else
2599 echo "$ac_err" >&5
2600 echo "configure: failed program was:" >&5
2601 cat conftest.$ac_ext >&5
2602 rm -rf conftest*
2603 CXXCPP=/lib/cpp
2605 rm -f conftest*
2606 ac_cv_prog_CXXCPP="$CXXCPP"
2607 ac_ext=c
2608 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2609 ac_cpp='$CPP $CPPFLAGS'
2610 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2611 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2612 cross_compiling=$ac_cv_prog_cc_cross
2615 CXXCPP="$ac_cv_prog_CXXCPP"
2616 echo "$ac_t""$CXXCPP" 1>&6
2619 # Save cache, so that ltconfig can load it
2620 cat > confcache <<\EOF
2621 # This file is a shell script that caches the results of configure
2622 # tests run on this system so they can be shared between configure
2623 # scripts and configure runs. It is not useful on other systems.
2624 # If it contains results you don't want to keep, you may remove or edit it.
2626 # By default, configure uses ./config.cache as the cache file,
2627 # creating it if it does not exist already. You can give configure
2628 # the --cache-file=FILE option to use a different cache file; that is
2629 # what configure does when it calls configure scripts in
2630 # subdirectories, so they share the cache.
2631 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2632 # config.status only pays attention to the cache file if you give it the
2633 # --recheck option to rerun configure.
2636 # The following way of writing the cache mishandles newlines in values,
2637 # but we know of no workaround that is simple, portable, and efficient.
2638 # So, don't put newlines in cache variables' values.
2639 # Ultrix sh set writes to stderr and can't be redirected directly,
2640 # and sets the high bit in the cache file unless we assign to the vars.
2641 (set) 2>&1 |
2642 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2643 *ac_space=\ *)
2644 # `set' does not quote correctly, so add quotes (double-quote substitution
2645 # turns \\\\ into \\, and sed turns \\ into \).
2646 sed -n \
2647 -e "s/'/'\\\\''/g" \
2648 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2651 # `set' quotes correctly as required by POSIX, so do not add quotes.
2652 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2654 esac >> confcache
2655 if cmp -s $cache_file confcache; then
2657 else
2658 if test -w $cache_file; then
2659 echo "updating cache $cache_file"
2660 cat confcache > $cache_file
2661 else
2662 echo "not updating unwritable cache $cache_file"
2665 rm -f confcache
2668 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2669 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2670 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2671 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2672 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2673 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2674 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2675 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2676 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2677 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2679 # Reload cache, that may have been modified by ltconfig
2680 if test -r "$cache_file"; then
2681 echo "loading cache $cache_file"
2682 . $cache_file
2683 else
2684 echo "creating cache $cache_file"
2685 > $cache_file
2689 # This can be used to rebuild libtool when needed
2690 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2692 # Always use our own libtool.
2693 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2695 # Redirect the config.log output again, so that the ltconfig log is not
2696 # clobbered by the next message.
2697 exec 5>>./config.log
2701 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2702 lt_save_CC="$CC"
2703 lt_save_CFLAGS="$CFLAGS"
2704 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2705 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2706 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2707 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2708 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2709 deplibs_check_method="$deplibs_check_method" \
2710 file_magic_cmd="$file_magic_cmd" \
2711 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2712 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2713 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2714 CC="$lt_save_CC"
2715 CFLAGS="$lt_save_CFLAGS"
2717 # Redirect the config.log output again, so that the ltconfig log is not
2718 # clobbered by the next message.
2719 exec 5>>./config.log
2726 subdirs="$DIRLTDL"
2729 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2730 COMPPATH=.
2731 else
2732 COMPPATH=..
2738 if test -d $srcdir/testsuite; then
2739 TESTSUBDIR_TRUE=
2740 TESTSUBDIR_FALSE='#'
2741 else
2742 TESTSUBDIR_TRUE='#'
2743 TESTSUBDIR_FALSE=
2746 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2747 if test "${enable_getenv_properties+set}" = set; then
2748 enableval="$enable_getenv_properties"
2753 if test -z "$enable_getenv_properties"; then
2754 enable_getenv_properties=${enable_getenv_properties_default-yes}
2756 if test "$enable_getenv_properties" = no; then
2757 cat >> confdefs.h <<\EOF
2758 #define DISABLE_GETENV_PROPERTIES 1
2763 if test -z "$enable_main_args"; then
2764 enable_main_args=${enable_main_args_default-yes}
2766 if test "$enable_main_args" = no; then
2767 cat >> confdefs.h <<\EOF
2768 #define DISABLE_MAIN_ARGS 1
2774 # Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
2775 if test "${enable_hash_synchronization+set}" = set; then
2776 enableval="$enable_hash_synchronization"
2781 if test -z "$enable_hash_synchronization"; then
2782 enable_hash_synchronization=$enable_hash_synchronization_default
2785 # Do we allow intermodule optimizations (i.e. compiling many files at once)?
2786 # Check whether --enable-libgcj-multifile or --disable-libgcj-multifile was given.
2787 if test "${enable_libgcj_multifile+set}" = set; then
2788 enableval="$enable_libgcj_multifile"
2789 case "${enableval}" in
2790 yes) enable_libgcj_multifile=yes ;;
2791 no) enable_libgcj_multifile=no ;;
2792 *) { echo "configure: error: bad value ${enableval} for --enable-libgcj-multifile" 1>&2; exit 1; } ;;
2793 esac
2794 else
2795 enable_libgcj_multifile=no
2800 if test "$enable_libgcj_multifile" = yes; then
2801 ONESTEP_TRUE=
2802 ONESTEP_FALSE='#'
2803 else
2804 ONESTEP_TRUE='#'
2805 ONESTEP_FALSE=
2808 if test "${slow_pthread_self}" = "yes"; then
2809 cat >> confdefs.h <<\EOF
2810 #define SLOW_PTHREAD_SELF 1
2816 LIBGCJDEBUG="false"
2818 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2819 if test "${enable_libgcj_debug+set}" = set; then
2820 enableval="$enable_libgcj_debug"
2821 if test "$enable_libgcj_debug" = yes; then
2822 cat >> confdefs.h <<\EOF
2823 #define DEBUG 1
2826 LIBGCJDEBUG="true"
2831 # Check whether --enable-interpreter or --disable-interpreter was given.
2832 if test "${enable_interpreter+set}" = set; then
2833 enableval="$enable_interpreter"
2834 if test "$enable_interpreter" = yes; then
2835 # This can also be set in configure.host.
2836 libgcj_interpreter=yes
2837 elif test "$enable_interpreter" = no; then
2838 libgcj_interpreter=no
2843 if test "$libgcj_interpreter" = yes; then
2844 cat >> confdefs.h <<\EOF
2845 #define INTERPRETER 1
2849 INTERPRETER="$libgcj_interpreter"
2852 echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
2853 echo "configure:2854: checking for exception model to use" >&5
2855 ac_ext=C
2856 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2857 ac_cpp='$CXXCPP $CPPFLAGS'
2858 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2859 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2860 cross_compiling=$ac_cv_prog_cxx_cross
2862 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2863 if test "${enable_sjlj_exceptions+set}" = set; then
2864 enableval="$enable_sjlj_exceptions"
2866 else
2867 cat > conftest.$ac_ext << EOF
2868 #line 2869 "configure"
2869 struct S { ~S(); };
2870 void bar();
2871 void foo()
2873 S s;
2874 bar();
2877 old_CXXFLAGS="$CXXFLAGS"
2878 CXXFLAGS=-S
2879 if { (eval echo configure:2880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2880 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2881 enable_sjlj_exceptions=yes
2882 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
2883 enable_sjlj_exceptions=no
2886 CXXFLAGS="$old_CXXFLAGS"
2887 rm -f conftest*
2890 if test x$enable_sjlj_exceptions = xyes; then
2891 cat >> confdefs.h <<\EOF
2892 #define SJLJ_EXCEPTIONS 1
2895 ac_exception_model_name=sjlj
2896 elif test x$enable_sjlj_exceptions = xno; then
2897 ac_exception_model_name="call frame"
2898 else
2899 { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
2901 ac_ext=c
2902 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2903 ac_cpp='$CPP $CPPFLAGS'
2904 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2905 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2906 cross_compiling=$ac_cv_prog_cc_cross
2908 echo "$ac_t""$ac_exception_model_name" 1>&6
2910 # If we are non using SJLJ exceptions, and this host does not have support
2911 # for unwinding from a signal handler, enable checked dereferences and divides.
2912 if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
2913 CHECKREFSPEC=-fcheck-references
2914 DIVIDESPEC=-fuse-divide-subroutine
2915 EXCEPTIONSPEC=
2918 # Check whether --enable-java-net or --disable-java-net was given.
2919 if test "${enable_java_net+set}" = set; then
2920 enableval="$enable_java_net"
2925 if test -z "$enable_java_net"; then
2926 enable_java_net=${enable_java_net_default-yes}
2928 if test "$enable_java_net" = no; then
2929 cat >> confdefs.h <<\EOF
2930 #define DISABLE_JAVA_NET 1
2935 # Check whether --with-libffi or --without-libffi was given.
2936 if test "${with_libffi+set}" = set; then
2937 withval="$with_libffi"
2939 else
2940 with_libffi=${with_libffi_default-yes}
2944 LIBFFI=
2945 LIBFFIINCS=
2946 if test "$with_libffi" != no; then
2947 cat >> confdefs.h <<\EOF
2948 #define USE_LIBFFI 1
2951 LIBFFI=../libffi/libffi_convenience.la
2952 LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I../libffi/include'
2957 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2958 if test "${enable_jvmpi+set}" = set; then
2959 enableval="$enable_jvmpi"
2964 if test "$enable_jvmpi" != no; then
2965 cat >> confdefs.h <<\EOF
2966 #define ENABLE_JVMPI 1
2971 TARGET_ECOS=${PROCESS-"no"}
2972 # Check whether --with-ecos or --without-ecos was given.
2973 if test "${with_ecos+set}" = set; then
2974 withval="$with_ecos"
2975 TARGET_ECOS="$with_ecos"
2980 EXTRA_CC_FILES=
2983 PLATFORMOBJS=
2984 case "$TARGET_ECOS" in
2985 no) case "$host" in
2986 *mingw*)
2987 PLATFORM=Win32
2988 PLATFORMNET=Win32
2989 PLATFORMOBJS=win32.lo
2990 PLATFORMH=win32.h
2992 echo $ac_n "checking whether 'ld' is at least 2.13""... $ac_c" 1>&6
2993 echo "configure:2994: checking whether 'ld' is at least 2.13" >&5
2994 LD_PROG=`$CC --print-prog-name=ld`
2995 LD_VERSION=`$LD_PROG --version`
2996 LD_VERSION_MAJOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 1 | cut -d ' ' -f 4`
2997 LD_VERSION_MINOR=`echo "$LD_VERSION" | head -1 | cut -d '.' -f 2`
2998 if expr "$LD_VERSION_MAJOR" \> 2 > /dev/null; then
2999 LD_OK="ok"
3000 else
3001 if expr "$LD_VERSION_MAJOR" = 2 && expr "$LD_VERSION_MINOR" \>= 13 > /dev/null; then
3002 LD_OK="ok"
3005 if test "x$LD_OK" != x; then
3006 echo "$ac_t""yes; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
3007 else
3008 echo "$ac_t""no; major=$LD_VERSION_MAJOR, minor=$LD_VERSION_MINOR" 1>&6
3009 echo "configure: warning: ld <2.13 detected; enabling JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS hack..." 1>&2
3010 cat >> confdefs.h <<\EOF
3011 #define JV_LINKER_CANNOT_8BYTE_ALIGN_STATICS 1
3017 PLATFORM=Posix
3018 PLATFORMNET=Posix
3019 PLATFORMOBJS=posix.lo
3020 PLATFORMH=posix.h
3022 esac
3025 PLATFORM=Ecos
3026 PLATFORMNET=NoNet
3027 cat >> confdefs.h <<\EOF
3028 #define ECOS 1
3031 PLATFORMOBJS=posix.lo
3032 PLATFORMH=posix.h
3034 esac
3038 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3039 echo "configure:3040: checking how to run the C preprocessor" >&5
3040 # On Suns, sometimes $CPP names a directory.
3041 if test -n "$CPP" && test -d "$CPP"; then
3042 CPP=
3044 if test -z "$CPP"; then
3045 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
3046 echo $ac_n "(cached) $ac_c" 1>&6
3047 else
3048 # This must be in double quotes, not single quotes, because CPP may get
3049 # substituted into the Makefile and "${CC-cc}" will confuse make.
3050 CPP="${CC-cc} -E"
3051 # On the NeXT, cc -E runs the code through the compiler's parser,
3052 # not just through cpp.
3053 cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 #include <assert.h>
3057 Syntax Error
3059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3060 { (eval echo configure:3061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3062 if test -z "$ac_err"; then
3064 else
3065 echo "$ac_err" >&5
3066 echo "configure: failed program was:" >&5
3067 cat conftest.$ac_ext >&5
3068 rm -rf conftest*
3069 CPP="${CC-cc} -E -traditional-cpp"
3070 cat > conftest.$ac_ext <<EOF
3071 #line 3072 "configure"
3072 #include "confdefs.h"
3073 #include <assert.h>
3074 Syntax Error
3076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3077 { (eval echo configure:3078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3079 if test -z "$ac_err"; then
3081 else
3082 echo "$ac_err" >&5
3083 echo "configure: failed program was:" >&5
3084 cat conftest.$ac_ext >&5
3085 rm -rf conftest*
3086 CPP="${CC-cc} -nologo -E"
3087 cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090 #include <assert.h>
3091 Syntax Error
3093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3094 { (eval echo configure:3095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3096 if test -z "$ac_err"; then
3098 else
3099 echo "$ac_err" >&5
3100 echo "configure: failed program was:" >&5
3101 cat conftest.$ac_ext >&5
3102 rm -rf conftest*
3103 CPP=/lib/cpp
3105 rm -f conftest*
3107 rm -f conftest*
3109 rm -f conftest*
3110 ac_cv_prog_CPP="$CPP"
3112 CPP="$ac_cv_prog_CPP"
3113 else
3114 ac_cv_prog_CPP="$CPP"
3116 echo "$ac_t""$CPP" 1>&6
3118 cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121 #include <stdint.h>
3123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3124 egrep "uint32_t" >/dev/null 2>&1; then
3125 rm -rf conftest*
3126 cat >> confdefs.h <<\EOF
3127 #define HAVE_INT32_DEFINED 1
3131 rm -f conftest*
3133 cat > conftest.$ac_ext <<EOF
3134 #line 3135 "configure"
3135 #include "confdefs.h"
3136 #include <inttypes.h>
3138 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3139 egrep "uint32_t" >/dev/null 2>&1; then
3140 rm -rf conftest*
3141 cat >> confdefs.h <<\EOF
3142 #define HAVE_INT32_DEFINED 1
3146 rm -f conftest*
3148 cat > conftest.$ac_ext <<EOF
3149 #line 3150 "configure"
3150 #include "confdefs.h"
3151 #include <sys/types.h>
3153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3154 egrep "u_int32_t" >/dev/null 2>&1; then
3155 rm -rf conftest*
3156 cat >> confdefs.h <<\EOF
3157 #define HAVE_BSD_INT32_DEFINED 1
3161 rm -f conftest*
3163 cat > conftest.$ac_ext <<EOF
3164 #line 3165 "configure"
3165 #include "confdefs.h"
3166 #include <sys/config.h>
3168 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3169 egrep "u_int32_t" >/dev/null 2>&1; then
3170 rm -rf conftest*
3171 cat >> confdefs.h <<\EOF
3172 #define HAVE_BSD_INT32_DEFINED 1
3176 rm -f conftest*
3180 cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183 #include <time.h>
3185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3186 egrep "mktime" >/dev/null 2>&1; then
3187 rm -rf conftest*
3188 cat >> confdefs.h <<\EOF
3189 #define HAVE_MKTIME 1
3193 rm -f conftest*
3195 cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198 #include <time.h>
3200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3201 egrep "localtime" >/dev/null 2>&1; then
3202 rm -rf conftest*
3203 cat >> confdefs.h <<\EOF
3204 #define HAVE_LOCALTIME 1
3208 rm -f conftest*
3211 test -d java || mkdir java
3212 test -d java/io || mkdir java/io
3213 test -d gnu || mkdir gnu
3217 test -d java/lang || mkdir java/lang
3221 test -d java/net || mkdir java/net
3225 test -d gnu/java || mkdir gnu/java
3226 test -d gnu/java/net || mkdir gnu/java/net
3230 test -d gnu/java/nio || mkdir gnu/java/nio
3234 case "${host}" in
3235 *mingw*)
3236 SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32"
3239 SYSTEMSPEC=
3241 esac
3244 LIBGCJTESTSPEC="-L`${PWDCMD-pwd}`/.libs -rpath `${PWDCMD-pwd}`/.libs"
3247 # Check whether --with-system-zlib or --without-system-zlib was given.
3248 if test "${with_system_zlib+set}" = set; then
3249 withval="$with_system_zlib"
3253 ZLIBSPEC=
3255 ZLIBTESTSPEC=
3258 # If we find X, set shell vars x_includes and x_libraries to the
3259 # paths, otherwise set no_x=yes.
3260 # Uses ac_ vars as temps to allow command line to override cache and checks.
3261 # --without-x overrides everything else, but does not touch the cache.
3262 echo $ac_n "checking for X""... $ac_c" 1>&6
3263 echo "configure:3264: checking for X" >&5
3265 # Check whether --with-x or --without-x was given.
3266 if test "${with_x+set}" = set; then
3267 withval="$with_x"
3271 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
3272 if test "x$with_x" = xno; then
3273 # The user explicitly disabled X.
3274 have_x=disabled
3275 else
3276 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3277 # Both variables are already set.
3278 have_x=yes
3279 else
3280 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
3281 echo $ac_n "(cached) $ac_c" 1>&6
3282 else
3283 # One or both of the vars are not set, and there is no cached value.
3284 ac_x_includes=NO ac_x_libraries=NO
3285 rm -fr conftestdir
3286 if mkdir conftestdir; then
3287 cd conftestdir
3288 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
3289 cat > Imakefile <<'EOF'
3290 acfindx:
3291 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
3293 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
3294 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3295 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
3296 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
3297 for ac_extension in a so sl; do
3298 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
3299 test -f $ac_im_libdir/libX11.$ac_extension; then
3300 ac_im_usrlibdir=$ac_im_libdir; break
3302 done
3303 # Screen out bogus values from the imake configuration. They are
3304 # bogus both because they are the default anyway, and because
3305 # using them would break gcc on systems where it needs fixed includes.
3306 case "$ac_im_incroot" in
3307 /usr/include) ;;
3308 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
3309 esac
3310 case "$ac_im_usrlibdir" in
3311 /usr/lib | /lib) ;;
3312 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
3313 esac
3315 cd ..
3316 rm -fr conftestdir
3319 if test "$ac_x_includes" = NO; then
3320 # Guess where to find include files, by looking for this one X11 .h file.
3321 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
3323 # First, try using that file with no special directory specified.
3324 cat > conftest.$ac_ext <<EOF
3325 #line 3326 "configure"
3326 #include "confdefs.h"
3327 #include <$x_direct_test_include>
3329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3330 { (eval echo configure:3331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3332 if test -z "$ac_err"; then
3333 rm -rf conftest*
3334 # We can compile using X headers with no special include directory.
3335 ac_x_includes=
3336 else
3337 echo "$ac_err" >&5
3338 echo "configure: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
3340 rm -rf conftest*
3341 # Look for the header file in a standard set of common directories.
3342 # Check X11 before X11Rn because it is often a symlink to the current release.
3343 for ac_dir in \
3344 /usr/X11/include \
3345 /usr/X11R6/include \
3346 /usr/X11R5/include \
3347 /usr/X11R4/include \
3349 /usr/include/X11 \
3350 /usr/include/X11R6 \
3351 /usr/include/X11R5 \
3352 /usr/include/X11R4 \
3354 /usr/local/X11/include \
3355 /usr/local/X11R6/include \
3356 /usr/local/X11R5/include \
3357 /usr/local/X11R4/include \
3359 /usr/local/include/X11 \
3360 /usr/local/include/X11R6 \
3361 /usr/local/include/X11R5 \
3362 /usr/local/include/X11R4 \
3364 /usr/X386/include \
3365 /usr/x386/include \
3366 /usr/XFree86/include/X11 \
3368 /usr/include \
3369 /usr/local/include \
3370 /usr/unsupported/include \
3371 /usr/athena/include \
3372 /usr/local/x11r5/include \
3373 /usr/lpp/Xamples/include \
3375 /usr/openwin/include \
3376 /usr/openwin/share/include \
3379 if test -r "$ac_dir/$x_direct_test_include"; then
3380 ac_x_includes=$ac_dir
3381 break
3383 done
3385 rm -f conftest*
3386 fi # $ac_x_includes = NO
3388 if test "$ac_x_libraries" = NO; then
3389 # Check for the libraries.
3391 test -z "$x_direct_test_library" && x_direct_test_library=Xt
3392 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
3394 # See if we find them without any special options.
3395 # Don't add to $LIBS permanently.
3396 ac_save_LIBS="$LIBS"
3397 LIBS="-l$x_direct_test_library $LIBS"
3398 cat > conftest.$ac_ext <<EOF
3399 #line 3400 "configure"
3400 #include "confdefs.h"
3402 int main() {
3403 ${x_direct_test_function}()
3404 ; return 0; }
3406 if { (eval echo configure:3407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3407 rm -rf conftest*
3408 LIBS="$ac_save_LIBS"
3409 # We can link X programs with no special library path.
3410 ac_x_libraries=
3411 else
3412 echo "configure: failed program was:" >&5
3413 cat conftest.$ac_ext >&5
3414 rm -rf conftest*
3415 LIBS="$ac_save_LIBS"
3416 # First see if replacing the include by lib works.
3417 # Check X11 before X11Rn because it is often a symlink to the current release.
3418 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
3419 /usr/X11/lib \
3420 /usr/X11R6/lib \
3421 /usr/X11R5/lib \
3422 /usr/X11R4/lib \
3424 /usr/lib/X11 \
3425 /usr/lib/X11R6 \
3426 /usr/lib/X11R5 \
3427 /usr/lib/X11R4 \
3429 /usr/local/X11/lib \
3430 /usr/local/X11R6/lib \
3431 /usr/local/X11R5/lib \
3432 /usr/local/X11R4/lib \
3434 /usr/local/lib/X11 \
3435 /usr/local/lib/X11R6 \
3436 /usr/local/lib/X11R5 \
3437 /usr/local/lib/X11R4 \
3439 /usr/X386/lib \
3440 /usr/x386/lib \
3441 /usr/XFree86/lib/X11 \
3443 /usr/lib \
3444 /usr/local/lib \
3445 /usr/unsupported/lib \
3446 /usr/athena/lib \
3447 /usr/local/x11r5/lib \
3448 /usr/lpp/Xamples/lib \
3449 /lib/usr/lib/X11 \
3451 /usr/openwin/lib \
3452 /usr/openwin/share/lib \
3455 for ac_extension in a so sl; do
3456 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3457 ac_x_libraries=$ac_dir
3458 break 2
3460 done
3461 done
3463 rm -f conftest*
3464 fi # $ac_x_libraries = NO
3466 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
3467 # Didn't find X anywhere. Cache the known absence of X.
3468 ac_cv_have_x="have_x=no"
3469 else
3470 # Record where we found X for the cache.
3471 ac_cv_have_x="have_x=yes \
3472 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
3476 eval "$ac_cv_have_x"
3477 fi # $with_x != no
3479 if test "$have_x" != yes; then
3480 echo "$ac_t""$have_x" 1>&6
3481 no_x=yes
3482 else
3483 # If each of the values was on the command line, it overrides each guess.
3484 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
3485 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3486 # Update the cache value to reflect the command line values.
3487 ac_cv_have_x="have_x=yes \
3488 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
3489 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
3492 if test "$no_x" = yes; then
3493 # Not all programs may use this symbol, but it does not hurt to define it.
3494 cat >> confdefs.h <<\EOF
3495 #define X_DISPLAY_MISSING 1
3498 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
3499 else
3500 if test -n "$x_includes"; then
3501 X_CFLAGS="$X_CFLAGS -I$x_includes"
3504 # It would also be nice to do this for all -L options, not just this one.
3505 if test -n "$x_libraries"; then
3506 X_LIBS="$X_LIBS -L$x_libraries"
3507 # For Solaris; some versions of Sun CC require a space after -R and
3508 # others require no space. Words are not sufficient . . . .
3509 case "`(uname -sr) 2>/dev/null`" in
3510 "SunOS 5"*)
3511 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
3512 echo "configure:3513: checking whether -R must be followed by a space" >&5
3513 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
3514 cat > conftest.$ac_ext <<EOF
3515 #line 3516 "configure"
3516 #include "confdefs.h"
3518 int main() {
3520 ; return 0; }
3522 if { (eval echo configure:3523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3523 rm -rf conftest*
3524 ac_R_nospace=yes
3525 else
3526 echo "configure: failed program was:" >&5
3527 cat conftest.$ac_ext >&5
3528 rm -rf conftest*
3529 ac_R_nospace=no
3531 rm -f conftest*
3532 if test $ac_R_nospace = yes; then
3533 echo "$ac_t""no" 1>&6
3534 X_LIBS="$X_LIBS -R$x_libraries"
3535 else
3536 LIBS="$ac_xsave_LIBS -R $x_libraries"
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3541 int main() {
3543 ; return 0; }
3545 if { (eval echo configure:3546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3546 rm -rf conftest*
3547 ac_R_space=yes
3548 else
3549 echo "configure: failed program was:" >&5
3550 cat conftest.$ac_ext >&5
3551 rm -rf conftest*
3552 ac_R_space=no
3554 rm -f conftest*
3555 if test $ac_R_space = yes; then
3556 echo "$ac_t""yes" 1>&6
3557 X_LIBS="$X_LIBS -R $x_libraries"
3558 else
3559 echo "$ac_t""neither works" 1>&6
3562 LIBS="$ac_xsave_LIBS"
3563 esac
3566 # Check for system-dependent libraries X programs must link with.
3567 # Do this before checking for the system-independent R6 libraries
3568 # (-lICE), since we may need -lsocket or whatever for X linking.
3570 if test "$ISC" = yes; then
3571 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
3572 else
3573 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
3574 # libraries were built with DECnet support. And karl@cs.umb.edu says
3575 # the Alpha needs dnet_stub (dnet does not exist).
3576 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
3577 echo "configure:3578: checking for dnet_ntoa in -ldnet" >&5
3578 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3579 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3580 echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582 ac_save_LIBS="$LIBS"
3583 LIBS="-ldnet $LIBS"
3584 cat > conftest.$ac_ext <<EOF
3585 #line 3586 "configure"
3586 #include "confdefs.h"
3587 /* Override any gcc2 internal prototype to avoid an error. */
3588 /* We use char because int might match the return type of a gcc2
3589 builtin and then its argument prototype would still apply. */
3590 char dnet_ntoa();
3592 int main() {
3593 dnet_ntoa()
3594 ; return 0; }
3596 if { (eval echo configure:3597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3597 rm -rf conftest*
3598 eval "ac_cv_lib_$ac_lib_var=yes"
3599 else
3600 echo "configure: failed program was:" >&5
3601 cat conftest.$ac_ext >&5
3602 rm -rf conftest*
3603 eval "ac_cv_lib_$ac_lib_var=no"
3605 rm -f conftest*
3606 LIBS="$ac_save_LIBS"
3609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3610 echo "$ac_t""yes" 1>&6
3611 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
3612 else
3613 echo "$ac_t""no" 1>&6
3616 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
3617 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
3618 echo "configure:3619: checking for dnet_ntoa in -ldnet_stub" >&5
3619 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
3620 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3621 echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623 ac_save_LIBS="$LIBS"
3624 LIBS="-ldnet_stub $LIBS"
3625 cat > conftest.$ac_ext <<EOF
3626 #line 3627 "configure"
3627 #include "confdefs.h"
3628 /* Override any gcc2 internal prototype to avoid an error. */
3629 /* We use char because int might match the return type of a gcc2
3630 builtin and then its argument prototype would still apply. */
3631 char dnet_ntoa();
3633 int main() {
3634 dnet_ntoa()
3635 ; return 0; }
3637 if { (eval echo configure:3638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3638 rm -rf conftest*
3639 eval "ac_cv_lib_$ac_lib_var=yes"
3640 else
3641 echo "configure: failed program was:" >&5
3642 cat conftest.$ac_ext >&5
3643 rm -rf conftest*
3644 eval "ac_cv_lib_$ac_lib_var=no"
3646 rm -f conftest*
3647 LIBS="$ac_save_LIBS"
3650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3651 echo "$ac_t""yes" 1>&6
3652 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
3653 else
3654 echo "$ac_t""no" 1>&6
3659 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
3660 # to get the SysV transport functions.
3661 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
3662 # needs -lnsl.
3663 # The nsl library prevents programs from opening the X display
3664 # on Irix 5.2, according to dickey@clark.net.
3665 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3666 echo "configure:3667: checking for gethostbyname" >&5
3667 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3668 echo $ac_n "(cached) $ac_c" 1>&6
3669 else
3670 cat > conftest.$ac_ext <<EOF
3671 #line 3672 "configure"
3672 #include "confdefs.h"
3673 /* System header to define __stub macros and hopefully few prototypes,
3674 which can conflict with char gethostbyname(); below. */
3675 #include <assert.h>
3676 /* Override any gcc2 internal prototype to avoid an error. */
3677 /* We use char because int might match the return type of a gcc2
3678 builtin and then its argument prototype would still apply. */
3679 char gethostbyname();
3681 int main() {
3683 /* The GNU C library defines this for functions which it implements
3684 to always fail with ENOSYS. Some functions are actually named
3685 something starting with __ and the normal name is an alias. */
3686 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3687 choke me
3688 #else
3689 gethostbyname();
3690 #endif
3692 ; return 0; }
3694 if { (eval echo configure:3695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3695 rm -rf conftest*
3696 eval "ac_cv_func_gethostbyname=yes"
3697 else
3698 echo "configure: failed program was:" >&5
3699 cat conftest.$ac_ext >&5
3700 rm -rf conftest*
3701 eval "ac_cv_func_gethostbyname=no"
3703 rm -f conftest*
3706 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3707 echo "$ac_t""yes" 1>&6
3709 else
3710 echo "$ac_t""no" 1>&6
3713 if test $ac_cv_func_gethostbyname = no; then
3714 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3715 echo "configure:3716: checking for gethostbyname in -lnsl" >&5
3716 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3717 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3718 echo $ac_n "(cached) $ac_c" 1>&6
3719 else
3720 ac_save_LIBS="$LIBS"
3721 LIBS="-lnsl $LIBS"
3722 cat > conftest.$ac_ext <<EOF
3723 #line 3724 "configure"
3724 #include "confdefs.h"
3725 /* Override any gcc2 internal prototype to avoid an error. */
3726 /* We use char because int might match the return type of a gcc2
3727 builtin and then its argument prototype would still apply. */
3728 char gethostbyname();
3730 int main() {
3731 gethostbyname()
3732 ; return 0; }
3734 if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3735 rm -rf conftest*
3736 eval "ac_cv_lib_$ac_lib_var=yes"
3737 else
3738 echo "configure: failed program was:" >&5
3739 cat conftest.$ac_ext >&5
3740 rm -rf conftest*
3741 eval "ac_cv_lib_$ac_lib_var=no"
3743 rm -f conftest*
3744 LIBS="$ac_save_LIBS"
3747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3748 echo "$ac_t""yes" 1>&6
3749 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
3750 else
3751 echo "$ac_t""no" 1>&6
3756 # lieder@skyler.mavd.honeywell.com says without -lsocket,
3757 # socket/setsockopt and other routines are undefined under SCO ODT
3758 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
3759 # on later versions), says simon@lia.di.epfl.ch: it contains
3760 # gethostby* variants that don't use the nameserver (or something).
3761 # -lsocket must be given before -lnsl if both are needed.
3762 # We assume that if connect needs -lnsl, so does gethostbyname.
3763 echo $ac_n "checking for connect""... $ac_c" 1>&6
3764 echo "configure:3765: checking for connect" >&5
3765 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
3766 echo $ac_n "(cached) $ac_c" 1>&6
3767 else
3768 cat > conftest.$ac_ext <<EOF
3769 #line 3770 "configure"
3770 #include "confdefs.h"
3771 /* System header to define __stub macros and hopefully few prototypes,
3772 which can conflict with char connect(); below. */
3773 #include <assert.h>
3774 /* Override any gcc2 internal prototype to avoid an error. */
3775 /* We use char because int might match the return type of a gcc2
3776 builtin and then its argument prototype would still apply. */
3777 char connect();
3779 int main() {
3781 /* The GNU C library defines this for functions which it implements
3782 to always fail with ENOSYS. Some functions are actually named
3783 something starting with __ and the normal name is an alias. */
3784 #if defined (__stub_connect) || defined (__stub___connect)
3785 choke me
3786 #else
3787 connect();
3788 #endif
3790 ; return 0; }
3792 if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3793 rm -rf conftest*
3794 eval "ac_cv_func_connect=yes"
3795 else
3796 echo "configure: failed program was:" >&5
3797 cat conftest.$ac_ext >&5
3798 rm -rf conftest*
3799 eval "ac_cv_func_connect=no"
3801 rm -f conftest*
3804 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
3805 echo "$ac_t""yes" 1>&6
3807 else
3808 echo "$ac_t""no" 1>&6
3811 if test $ac_cv_func_connect = no; then
3812 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3813 echo "configure:3814: checking for connect in -lsocket" >&5
3814 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
3815 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3816 echo $ac_n "(cached) $ac_c" 1>&6
3817 else
3818 ac_save_LIBS="$LIBS"
3819 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
3820 cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823 /* Override any gcc2 internal prototype to avoid an error. */
3824 /* We use char because int might match the return type of a gcc2
3825 builtin and then its argument prototype would still apply. */
3826 char connect();
3828 int main() {
3829 connect()
3830 ; return 0; }
3832 if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3833 rm -rf conftest*
3834 eval "ac_cv_lib_$ac_lib_var=yes"
3835 else
3836 echo "configure: failed program was:" >&5
3837 cat conftest.$ac_ext >&5
3838 rm -rf conftest*
3839 eval "ac_cv_lib_$ac_lib_var=no"
3841 rm -f conftest*
3842 LIBS="$ac_save_LIBS"
3845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3846 echo "$ac_t""yes" 1>&6
3847 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
3848 else
3849 echo "$ac_t""no" 1>&6
3854 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
3855 echo $ac_n "checking for remove""... $ac_c" 1>&6
3856 echo "configure:3857: checking for remove" >&5
3857 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
3858 echo $ac_n "(cached) $ac_c" 1>&6
3859 else
3860 cat > conftest.$ac_ext <<EOF
3861 #line 3862 "configure"
3862 #include "confdefs.h"
3863 /* System header to define __stub macros and hopefully few prototypes,
3864 which can conflict with char remove(); below. */
3865 #include <assert.h>
3866 /* Override any gcc2 internal prototype to avoid an error. */
3867 /* We use char because int might match the return type of a gcc2
3868 builtin and then its argument prototype would still apply. */
3869 char remove();
3871 int main() {
3873 /* The GNU C library defines this for functions which it implements
3874 to always fail with ENOSYS. Some functions are actually named
3875 something starting with __ and the normal name is an alias. */
3876 #if defined (__stub_remove) || defined (__stub___remove)
3877 choke me
3878 #else
3879 remove();
3880 #endif
3882 ; return 0; }
3884 if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3885 rm -rf conftest*
3886 eval "ac_cv_func_remove=yes"
3887 else
3888 echo "configure: failed program was:" >&5
3889 cat conftest.$ac_ext >&5
3890 rm -rf conftest*
3891 eval "ac_cv_func_remove=no"
3893 rm -f conftest*
3896 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
3897 echo "$ac_t""yes" 1>&6
3899 else
3900 echo "$ac_t""no" 1>&6
3903 if test $ac_cv_func_remove = no; then
3904 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
3905 echo "configure:3906: checking for remove in -lposix" >&5
3906 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
3907 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3908 echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910 ac_save_LIBS="$LIBS"
3911 LIBS="-lposix $LIBS"
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 /* Override any gcc2 internal prototype to avoid an error. */
3916 /* We use char because int might match the return type of a gcc2
3917 builtin and then its argument prototype would still apply. */
3918 char remove();
3920 int main() {
3921 remove()
3922 ; return 0; }
3924 if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3925 rm -rf conftest*
3926 eval "ac_cv_lib_$ac_lib_var=yes"
3927 else
3928 echo "configure: failed program was:" >&5
3929 cat conftest.$ac_ext >&5
3930 rm -rf conftest*
3931 eval "ac_cv_lib_$ac_lib_var=no"
3933 rm -f conftest*
3934 LIBS="$ac_save_LIBS"
3937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3938 echo "$ac_t""yes" 1>&6
3939 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
3940 else
3941 echo "$ac_t""no" 1>&6
3946 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
3947 echo $ac_n "checking for shmat""... $ac_c" 1>&6
3948 echo "configure:3949: checking for shmat" >&5
3949 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
3950 echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952 cat > conftest.$ac_ext <<EOF
3953 #line 3954 "configure"
3954 #include "confdefs.h"
3955 /* System header to define __stub macros and hopefully few prototypes,
3956 which can conflict with char shmat(); below. */
3957 #include <assert.h>
3958 /* Override any gcc2 internal prototype to avoid an error. */
3959 /* We use char because int might match the return type of a gcc2
3960 builtin and then its argument prototype would still apply. */
3961 char shmat();
3963 int main() {
3965 /* The GNU C library defines this for functions which it implements
3966 to always fail with ENOSYS. Some functions are actually named
3967 something starting with __ and the normal name is an alias. */
3968 #if defined (__stub_shmat) || defined (__stub___shmat)
3969 choke me
3970 #else
3971 shmat();
3972 #endif
3974 ; return 0; }
3976 if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3977 rm -rf conftest*
3978 eval "ac_cv_func_shmat=yes"
3979 else
3980 echo "configure: failed program was:" >&5
3981 cat conftest.$ac_ext >&5
3982 rm -rf conftest*
3983 eval "ac_cv_func_shmat=no"
3985 rm -f conftest*
3988 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
3989 echo "$ac_t""yes" 1>&6
3991 else
3992 echo "$ac_t""no" 1>&6
3995 if test $ac_cv_func_shmat = no; then
3996 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
3997 echo "configure:3998: checking for shmat in -lipc" >&5
3998 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
3999 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4000 echo $ac_n "(cached) $ac_c" 1>&6
4001 else
4002 ac_save_LIBS="$LIBS"
4003 LIBS="-lipc $LIBS"
4004 cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4007 /* Override any gcc2 internal prototype to avoid an error. */
4008 /* We use char because int might match the return type of a gcc2
4009 builtin and then its argument prototype would still apply. */
4010 char shmat();
4012 int main() {
4013 shmat()
4014 ; return 0; }
4016 if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4017 rm -rf conftest*
4018 eval "ac_cv_lib_$ac_lib_var=yes"
4019 else
4020 echo "configure: failed program was:" >&5
4021 cat conftest.$ac_ext >&5
4022 rm -rf conftest*
4023 eval "ac_cv_lib_$ac_lib_var=no"
4025 rm -f conftest*
4026 LIBS="$ac_save_LIBS"
4029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4030 echo "$ac_t""yes" 1>&6
4031 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
4032 else
4033 echo "$ac_t""no" 1>&6
4039 # Check for libraries that X11R6 Xt/Xaw programs need.
4040 ac_save_LDFLAGS="$LDFLAGS"
4041 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
4042 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
4043 # check for ICE first), but we must link in the order -lSM -lICE or
4044 # we get undefined symbols. So assume we have SM if we have ICE.
4045 # These have to be linked with before -lX11, unlike the other
4046 # libraries we check for below, so use a different variable.
4047 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
4048 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
4049 echo "configure:4050: checking for IceConnectionNumber in -lICE" >&5
4050 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
4051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4052 echo $ac_n "(cached) $ac_c" 1>&6
4053 else
4054 ac_save_LIBS="$LIBS"
4055 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
4056 cat > conftest.$ac_ext <<EOF
4057 #line 4058 "configure"
4058 #include "confdefs.h"
4059 /* Override any gcc2 internal prototype to avoid an error. */
4060 /* We use char because int might match the return type of a gcc2
4061 builtin and then its argument prototype would still apply. */
4062 char IceConnectionNumber();
4064 int main() {
4065 IceConnectionNumber()
4066 ; return 0; }
4068 if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4069 rm -rf conftest*
4070 eval "ac_cv_lib_$ac_lib_var=yes"
4071 else
4072 echo "configure: failed program was:" >&5
4073 cat conftest.$ac_ext >&5
4074 rm -rf conftest*
4075 eval "ac_cv_lib_$ac_lib_var=no"
4077 rm -f conftest*
4078 LIBS="$ac_save_LIBS"
4081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4082 echo "$ac_t""yes" 1>&6
4083 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
4084 else
4085 echo "$ac_t""no" 1>&6
4088 LDFLAGS="$ac_save_LDFLAGS"
4093 # Check whether --enable-java-awt or --disable-java-awt was given.
4094 if test "${enable_java_awt+set}" = set; then
4095 enableval="$enable_java_awt"
4100 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
4101 use_xlib_awt=""
4102 use_gtk_awt=""
4103 # The default toolkit to use is the first one specified.
4104 TOOLKIT=
4107 for peer in $peerlibs ; do
4108 case $peer in
4109 xlib)
4110 if test "$no_x" = yes; then
4111 echo "*** xlib peers requested but no X library available" 1>&2
4112 exit 1
4113 else
4114 use_xlib_awt="yes"
4115 if test -z "$TOOLKIT"; then
4116 TOOLKIT=gnu.awt.xlib.XToolkit
4120 gtk)
4121 if test "$no_x" = yes; then
4122 echo "*** xlib peers requested but no X library available" 1>&2
4123 exit 1
4124 else
4125 use_gtk_awt=yes
4126 if test -z "$TOOLKIT"; then
4127 TOOLKIT=gnu.java.awt.peer.gtk.GtkToolkit
4129 test -d jniinclude || mkdir jniinclude
4133 use_xlib_awt=
4134 use_gtk_awt=
4135 break
4138 echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
4139 exit 1
4140 esac
4141 done
4145 if test "$use_xlib_awt" = yes; then
4146 XLIB_AWT_TRUE=
4147 XLIB_AWT_FALSE='#'
4148 else
4149 XLIB_AWT_TRUE='#'
4150 XLIB_AWT_FALSE=
4154 if test "$use_gtk_awt" = yes; then
4155 GTK_AWT_TRUE=
4156 GTK_AWT_FALSE='#'
4157 else
4158 GTK_AWT_TRUE='#'
4159 GTK_AWT_FALSE=
4163 libsubdir=.libs
4165 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
4166 echo "configure:4167: checking for garbage collector to use" >&5
4167 # Check whether --enable-java-gc or --disable-java-gc was given.
4168 if test "${enable_java_gc+set}" = set; then
4169 enableval="$enable_java_gc"
4171 GC=$enableval
4172 else
4173 GC=boehm
4176 GCLIBS=
4177 GCINCS=
4178 GCDEPS=
4179 GCOBJS=
4180 GCSPEC=
4181 JC1GCSPEC=
4182 GCTESTSPEC=
4183 case "$GC" in
4184 boehm)
4185 echo "$ac_t""boehm" 1>&6
4186 GCLIBS=../boehm-gc/libgcjgc_convenience.la
4187 JC1GCSPEC='-fuse-boehm-gc'
4188 GCTESTSPEC="-L`${PWDCMD-pwd}`/../boehm-gc/.libs -rpath `${PWDCMD-pwd}`/../boehm-gc/.libs"
4190 GCINCS="`cat ../boehm-gc/boehm-cflags`"
4191 GCOBJS=boehm.lo
4192 GCHDR=boehm-gc.h
4193 cat >> confdefs.h <<\EOF
4194 #define HAVE_BOEHM_GC 1
4199 echo "$ac_t""none" 1>&6
4200 GCOBJS=nogc.lo
4201 GCHDR=no-gc.h
4204 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
4206 esac
4217 echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
4218 echo "configure:4219: checking for thread model used by GCC" >&5
4219 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
4220 echo "$ac_t""$THREADS" 1>&6
4222 case "$THREADS" in
4223 no | none | single)
4224 THREADS=none
4226 posix | pthreads)
4227 THREADS=posix
4228 case "$host" in
4229 *-*-linux*)
4230 cat >> confdefs.h <<\EOF
4231 #define LINUX_THREADS 1
4235 esac
4237 win32)
4239 decosf1 | irix | mach | os2 | solaris | dce | vxworks)
4240 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
4243 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
4245 esac
4247 THREADCXXFLAGS=
4248 THREADLDFLAGS=
4249 THREADLIBS=
4250 THREADINCS=
4251 THREADDEPS=
4252 THREADOBJS=
4253 THREADH=
4254 THREADSPEC=
4255 case "$THREADS" in
4256 posix)
4257 case "$host" in
4258 *-*-cygwin*)
4259 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
4262 *-*-freebsd[1234]*)
4264 # Before FreeBSD 5, it didn't have -lpthread (or any library which
4265 # merely adds pthread_* functions) but it does have a -pthread switch
4266 # which is required at link-time to select -lc_r *instead* of -lc.
4267 THREADLDFLAGS=-pthread
4268 # Don't set THREADSPEC here as might be expected since -pthread is
4269 # not processed when found within a spec file, it must come from
4270 # the command line. For now, the user must provide the -pthread
4271 # switch to link code compiled with gcj. In future, consider adding
4272 # support for weak references to pthread_* functions ala gthr.h API.
4273 THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
4275 *-*-freebsd*)
4276 # FreeBSD 5 implements a model much closer to other modern UNIX
4277 # which support threads. However, it still does not support
4278 # -lpthread.
4279 THREADLDFLAGS=-pthread
4280 THREADSPEC=-lc_r
4282 alpha*-dec-osf*)
4283 THREADCXXFLAGS=-pthread
4284 # boehm-gc needs some functions from librt, so link that too.
4285 THREADLIBS='-lpthread -lrt'
4286 THREADSPEC='-lpthread -lrt'
4289 THREADLIBS=-lpthread
4290 THREADSPEC=-lpthread
4292 esac
4293 THREADOBJS=posix-threads.lo
4294 THREADH=posix-threads.h
4295 # MIT pthreads doesn't seem to have the mutexattr functions.
4296 # But for now we don't check for it. We just assume you aren't
4297 # using MIT pthreads.
4298 cat >> confdefs.h <<\EOF
4299 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
4303 # If we're using the Boehm GC, then we happen to know that it
4304 # defines _REENTRANT, so we don't bother. Eww.
4305 if test "$GC" != boehm; then
4306 cat >> confdefs.h <<\EOF
4307 #define _REENTRANT 1
4311 cat >> confdefs.h <<\EOF
4312 #define _POSIX_PTHREAD_SEMANTICS 1
4317 win32)
4318 THREADOBJS=win32-threads.lo
4319 THREADH=win32-threads.h
4322 none)
4323 THREADOBJS=no-threads.lo
4324 THREADH=no-threads.h
4326 esac
4336 if test -d sysdep; then true; else mkdir sysdep; fi
4339 HASH_SYNC_SPEC=
4340 # Hash synchronization is only useful with posix threads right now.
4341 if test "$enable_hash_synchronization" = yes && test "$THREADS" != "none"; then
4342 HASH_SYNC_SPEC=-fhash-synchronization
4343 cat >> confdefs.h <<\EOF
4344 #define JV_HASH_SYNCHRONIZATION 1
4353 if test "$GCC" = yes; then
4354 USING_GCC_TRUE=
4355 USING_GCC_FALSE='#'
4356 else
4357 USING_GCC_TRUE='#'
4358 USING_GCC_FALSE=
4361 CANADIAN=no
4362 NULL_TARGET=no
4363 NATIVE=yes
4365 # We're in the tree with gcc, and need to include some of its headers.
4366 GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
4368 # Figure out where generated headers like libgcj-config.h get installed.
4369 gcc_version_trigger=${libgcj_basedir}/../gcc/version.c
4370 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
4371 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
4372 tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include
4376 if test "x${with_newlib}" = "xyes"; then
4377 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
4378 # may not work correctly, because the compiler may not be able to
4379 # link executables.
4381 # We assume newlib. This lets us hard-code the functions we know
4382 # we'll have.
4383 cat >> confdefs.h <<\EOF
4384 #define HAVE_MEMMOVE 1
4387 cat >> confdefs.h <<\EOF
4388 #define HAVE_MEMCPY 1
4391 cat >> confdefs.h <<\EOF
4392 #define HAVE_STRERROR 1
4395 cat >> confdefs.h <<\EOF
4396 #define HAVE_TIME 1
4399 cat >> confdefs.h <<\EOF
4400 #define HAVE_GMTIME_R 1
4403 cat >> confdefs.h <<\EOF
4404 #define HAVE_LOCALTIME_R 1
4407 cat >> confdefs.h <<\EOF
4408 #define HAVE_USLEEP_DECL 1
4411 cat >> confdefs.h <<\EOF
4412 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
4415 cat >> confdefs.h <<\EOF
4416 #define HAVE_ALLOCA 1
4420 cat >> confdefs.h <<\EOF
4421 #define NO_GETUID 1
4424 PLATFORMNET=NoNet
4425 else
4426 for ac_func in strerror ioctl select fstat open fsync sleep opendir
4428 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4429 echo "configure:4430: checking for $ac_func" >&5
4430 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4431 echo $ac_n "(cached) $ac_c" 1>&6
4432 else
4433 cat > conftest.$ac_ext <<EOF
4434 #line 4435 "configure"
4435 #include "confdefs.h"
4436 /* System header to define __stub macros and hopefully few prototypes,
4437 which can conflict with char $ac_func(); below. */
4438 #include <assert.h>
4439 /* Override any gcc2 internal prototype to avoid an error. */
4440 /* We use char because int might match the return type of a gcc2
4441 builtin and then its argument prototype would still apply. */
4442 char $ac_func();
4444 int main() {
4446 /* The GNU C library defines this for functions which it implements
4447 to always fail with ENOSYS. Some functions are actually named
4448 something starting with __ and the normal name is an alias. */
4449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4450 choke me
4451 #else
4452 $ac_func();
4453 #endif
4455 ; return 0; }
4457 if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4458 rm -rf conftest*
4459 eval "ac_cv_func_$ac_func=yes"
4460 else
4461 echo "configure: failed program was:" >&5
4462 cat conftest.$ac_ext >&5
4463 rm -rf conftest*
4464 eval "ac_cv_func_$ac_func=no"
4466 rm -f conftest*
4469 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4470 echo "$ac_t""yes" 1>&6
4471 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4472 cat >> confdefs.h <<EOF
4473 #define $ac_tr_func 1
4476 else
4477 echo "$ac_t""no" 1>&6
4479 done
4481 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
4483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4484 echo "configure:4485: checking for $ac_func" >&5
4485 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4486 echo $ac_n "(cached) $ac_c" 1>&6
4487 else
4488 cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491 /* System header to define __stub macros and hopefully few prototypes,
4492 which can conflict with char $ac_func(); below. */
4493 #include <assert.h>
4494 /* Override any gcc2 internal prototype to avoid an error. */
4495 /* We use char because int might match the return type of a gcc2
4496 builtin and then its argument prototype would still apply. */
4497 char $ac_func();
4499 int main() {
4501 /* The GNU C library defines this for functions which it implements
4502 to always fail with ENOSYS. Some functions are actually named
4503 something starting with __ and the normal name is an alias. */
4504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4505 choke me
4506 #else
4507 $ac_func();
4508 #endif
4510 ; return 0; }
4512 if { (eval echo configure:4513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4513 rm -rf conftest*
4514 eval "ac_cv_func_$ac_func=yes"
4515 else
4516 echo "configure: failed program was:" >&5
4517 cat conftest.$ac_ext >&5
4518 rm -rf conftest*
4519 eval "ac_cv_func_$ac_func=no"
4521 rm -f conftest*
4524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4525 echo "$ac_t""yes" 1>&6
4526 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4527 cat >> confdefs.h <<EOF
4528 #define $ac_tr_func 1
4531 else
4532 echo "$ac_t""no" 1>&6
4534 done
4536 for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
4538 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4539 echo "configure:4540: checking for $ac_func" >&5
4540 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4541 echo $ac_n "(cached) $ac_c" 1>&6
4542 else
4543 cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4546 /* System header to define __stub macros and hopefully few prototypes,
4547 which can conflict with char $ac_func(); below. */
4548 #include <assert.h>
4549 /* Override any gcc2 internal prototype to avoid an error. */
4550 /* We use char because int might match the return type of a gcc2
4551 builtin and then its argument prototype would still apply. */
4552 char $ac_func();
4554 int main() {
4556 /* The GNU C library defines this for functions which it implements
4557 to always fail with ENOSYS. Some functions are actually named
4558 something starting with __ and the normal name is an alias. */
4559 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4560 choke me
4561 #else
4562 $ac_func();
4563 #endif
4565 ; return 0; }
4567 if { (eval echo configure:4568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4568 rm -rf conftest*
4569 eval "ac_cv_func_$ac_func=yes"
4570 else
4571 echo "configure: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
4573 rm -rf conftest*
4574 eval "ac_cv_func_$ac_func=no"
4576 rm -f conftest*
4579 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4580 echo "$ac_t""yes" 1>&6
4581 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4582 cat >> confdefs.h <<EOF
4583 #define $ac_tr_func 1
4586 else
4587 echo "$ac_t""no" 1>&6
4589 done
4591 for ac_func in nl_langinfo setlocale
4593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4594 echo "configure:4595: checking for $ac_func" >&5
4595 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4596 echo $ac_n "(cached) $ac_c" 1>&6
4597 else
4598 cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601 /* System header to define __stub macros and hopefully few prototypes,
4602 which can conflict with char $ac_func(); below. */
4603 #include <assert.h>
4604 /* Override any gcc2 internal prototype to avoid an error. */
4605 /* We use char because int might match the return type of a gcc2
4606 builtin and then its argument prototype would still apply. */
4607 char $ac_func();
4609 int main() {
4611 /* The GNU C library defines this for functions which it implements
4612 to always fail with ENOSYS. Some functions are actually named
4613 something starting with __ and the normal name is an alias. */
4614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4615 choke me
4616 #else
4617 $ac_func();
4618 #endif
4620 ; return 0; }
4622 if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4623 rm -rf conftest*
4624 eval "ac_cv_func_$ac_func=yes"
4625 else
4626 echo "configure: failed program was:" >&5
4627 cat conftest.$ac_ext >&5
4628 rm -rf conftest*
4629 eval "ac_cv_func_$ac_func=no"
4631 rm -f conftest*
4634 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4635 echo "$ac_t""yes" 1>&6
4636 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4637 cat >> confdefs.h <<EOF
4638 #define $ac_tr_func 1
4641 else
4642 echo "$ac_t""no" 1>&6
4644 done
4646 for ac_func in inet_aton inet_addr
4648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4649 echo "configure:4650: checking for $ac_func" >&5
4650 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4651 echo $ac_n "(cached) $ac_c" 1>&6
4652 else
4653 cat > conftest.$ac_ext <<EOF
4654 #line 4655 "configure"
4655 #include "confdefs.h"
4656 /* System header to define __stub macros and hopefully few prototypes,
4657 which can conflict with char $ac_func(); below. */
4658 #include <assert.h>
4659 /* Override any gcc2 internal prototype to avoid an error. */
4660 /* We use char because int might match the return type of a gcc2
4661 builtin and then its argument prototype would still apply. */
4662 char $ac_func();
4664 int main() {
4666 /* The GNU C library defines this for functions which it implements
4667 to always fail with ENOSYS. Some functions are actually named
4668 something starting with __ and the normal name is an alias. */
4669 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4670 choke me
4671 #else
4672 $ac_func();
4673 #endif
4675 ; return 0; }
4677 if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4678 rm -rf conftest*
4679 eval "ac_cv_func_$ac_func=yes"
4680 else
4681 echo "configure: failed program was:" >&5
4682 cat conftest.$ac_ext >&5
4683 rm -rf conftest*
4684 eval "ac_cv_func_$ac_func=no"
4686 rm -f conftest*
4689 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4690 echo "$ac_t""yes" 1>&6
4691 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4692 cat >> confdefs.h <<EOF
4693 #define $ac_tr_func 1
4695 break
4696 else
4697 echo "$ac_t""no" 1>&6
4699 done
4701 for ac_func in inet_pton uname inet_ntoa
4703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4704 echo "configure:4705: checking for $ac_func" >&5
4705 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4706 echo $ac_n "(cached) $ac_c" 1>&6
4707 else
4708 cat > conftest.$ac_ext <<EOF
4709 #line 4710 "configure"
4710 #include "confdefs.h"
4711 /* System header to define __stub macros and hopefully few prototypes,
4712 which can conflict with char $ac_func(); below. */
4713 #include <assert.h>
4714 /* Override any gcc2 internal prototype to avoid an error. */
4715 /* We use char because int might match the return type of a gcc2
4716 builtin and then its argument prototype would still apply. */
4717 char $ac_func();
4719 int main() {
4721 /* The GNU C library defines this for functions which it implements
4722 to always fail with ENOSYS. Some functions are actually named
4723 something starting with __ and the normal name is an alias. */
4724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4725 choke me
4726 #else
4727 $ac_func();
4728 #endif
4730 ; return 0; }
4732 if { (eval echo configure:4733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4733 rm -rf conftest*
4734 eval "ac_cv_func_$ac_func=yes"
4735 else
4736 echo "configure: failed program was:" >&5
4737 cat conftest.$ac_ext >&5
4738 rm -rf conftest*
4739 eval "ac_cv_func_$ac_func=no"
4741 rm -f conftest*
4744 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4745 echo "$ac_t""yes" 1>&6
4746 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4747 cat >> confdefs.h <<EOF
4748 #define $ac_tr_func 1
4751 else
4752 echo "$ac_t""no" 1>&6
4754 done
4756 for ac_func in fork execvp pipe sigaction ftruncate
4758 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4759 echo "configure:4760: checking for $ac_func" >&5
4760 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4761 echo $ac_n "(cached) $ac_c" 1>&6
4762 else
4763 cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4766 /* System header to define __stub macros and hopefully few prototypes,
4767 which can conflict with char $ac_func(); below. */
4768 #include <assert.h>
4769 /* Override any gcc2 internal prototype to avoid an error. */
4770 /* We use char because int might match the return type of a gcc2
4771 builtin and then its argument prototype would still apply. */
4772 char $ac_func();
4774 int main() {
4776 /* The GNU C library defines this for functions which it implements
4777 to always fail with ENOSYS. Some functions are actually named
4778 something starting with __ and the normal name is an alias. */
4779 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4780 choke me
4781 #else
4782 $ac_func();
4783 #endif
4785 ; return 0; }
4787 if { (eval echo configure:4788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4788 rm -rf conftest*
4789 eval "ac_cv_func_$ac_func=yes"
4790 else
4791 echo "configure: failed program was:" >&5
4792 cat conftest.$ac_ext >&5
4793 rm -rf conftest*
4794 eval "ac_cv_func_$ac_func=no"
4796 rm -f conftest*
4799 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4800 echo "$ac_t""yes" 1>&6
4801 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4802 cat >> confdefs.h <<EOF
4803 #define $ac_tr_func 1
4806 else
4807 echo "$ac_t""no" 1>&6
4809 done
4811 for ac_hdr in execinfo.h unistd.h dlfcn.h
4813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4815 echo "configure:4816: checking for $ac_hdr" >&5
4816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4817 echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819 cat > conftest.$ac_ext <<EOF
4820 #line 4821 "configure"
4821 #include "confdefs.h"
4822 #include <$ac_hdr>
4824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4825 { (eval echo configure:4826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4827 if test -z "$ac_err"; then
4828 rm -rf conftest*
4829 eval "ac_cv_header_$ac_safe=yes"
4830 else
4831 echo "$ac_err" >&5
4832 echo "configure: failed program was:" >&5
4833 cat conftest.$ac_ext >&5
4834 rm -rf conftest*
4835 eval "ac_cv_header_$ac_safe=no"
4837 rm -f conftest*
4839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4840 echo "$ac_t""yes" 1>&6
4841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4842 cat >> confdefs.h <<EOF
4843 #define $ac_tr_hdr 1
4846 else
4847 echo "$ac_t""no" 1>&6
4849 done
4851 echo $ac_n "checking for backtrace""... $ac_c" 1>&6
4852 echo "configure:4853: checking for backtrace" >&5
4853 if eval "test \"`echo '$''{'ac_cv_func_backtrace'+set}'`\" = set"; then
4854 echo $ac_n "(cached) $ac_c" 1>&6
4855 else
4856 cat > conftest.$ac_ext <<EOF
4857 #line 4858 "configure"
4858 #include "confdefs.h"
4859 /* System header to define __stub macros and hopefully few prototypes,
4860 which can conflict with char backtrace(); below. */
4861 #include <assert.h>
4862 /* Override any gcc2 internal prototype to avoid an error. */
4863 /* We use char because int might match the return type of a gcc2
4864 builtin and then its argument prototype would still apply. */
4865 char backtrace();
4867 int main() {
4869 /* The GNU C library defines this for functions which it implements
4870 to always fail with ENOSYS. Some functions are actually named
4871 something starting with __ and the normal name is an alias. */
4872 #if defined (__stub_backtrace) || defined (__stub___backtrace)
4873 choke me
4874 #else
4875 backtrace();
4876 #endif
4878 ; return 0; }
4880 if { (eval echo configure:4881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4881 rm -rf conftest*
4882 eval "ac_cv_func_backtrace=yes"
4883 else
4884 echo "configure: failed program was:" >&5
4885 cat conftest.$ac_ext >&5
4886 rm -rf conftest*
4887 eval "ac_cv_func_backtrace=no"
4889 rm -f conftest*
4892 if eval "test \"`echo '$ac_cv_func_'backtrace`\" = yes"; then
4893 echo "$ac_t""yes" 1>&6
4895 case "$host" in
4896 ia64-*-linux*)
4897 # Has broken backtrace()
4899 mips*-*-linux*)
4900 # Has broken backtrace(), but we supply our own.
4901 if test -d sysdep; then true; else mkdir -p sysdep; fi
4902 EXTRA_CC_FILES="${EXTRA_CC_FILES} sysdep/dwarf2-backtrace.cc"
4903 cat >> confdefs.h <<\EOF
4904 #define HAVE_BACKTRACE 1
4909 cat >> confdefs.h <<\EOF
4910 #define HAVE_BACKTRACE 1
4914 esac
4916 else
4917 echo "$ac_t""no" 1>&6
4919 case "$host" in
4920 *mingw*)
4921 # Has backtrace() defined in libgcj itself
4922 cat >> confdefs.h <<\EOF
4923 #define HAVE_BACKTRACE 1
4927 esac
4932 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
4933 echo "configure:4934: checking for dladdr in -ldl" >&5
4934 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
4935 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4936 echo $ac_n "(cached) $ac_c" 1>&6
4937 else
4938 ac_save_LIBS="$LIBS"
4939 LIBS="-ldl $LIBS"
4940 cat > conftest.$ac_ext <<EOF
4941 #line 4942 "configure"
4942 #include "confdefs.h"
4943 /* Override any gcc2 internal prototype to avoid an error. */
4944 /* We use char because int might match the return type of a gcc2
4945 builtin and then its argument prototype would still apply. */
4946 char dladdr();
4948 int main() {
4949 dladdr()
4950 ; return 0; }
4952 if { (eval echo configure:4953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4953 rm -rf conftest*
4954 eval "ac_cv_lib_$ac_lib_var=yes"
4955 else
4956 echo "configure: failed program was:" >&5
4957 cat conftest.$ac_ext >&5
4958 rm -rf conftest*
4959 eval "ac_cv_lib_$ac_lib_var=no"
4961 rm -f conftest*
4962 LIBS="$ac_save_LIBS"
4965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4966 echo "$ac_t""yes" 1>&6
4968 if test "x${disable_dladdr}" = "xyes"; then
4969 #Broken dladdr().
4970 true
4971 else
4972 cat >> confdefs.h <<\EOF
4973 #define HAVE_DLADDR 1
4978 else
4979 echo "$ac_t""no" 1>&6
4982 if test x"$build" = x"$host"; then
4983 for ac_file in /proc/self/exe
4986 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
4987 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
4988 echo "configure:4989: checking for $ac_file" >&5
4989 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
4990 echo $ac_n "(cached) $ac_c" 1>&6
4991 else
4992 if test "$cross_compiling" = yes; then
4993 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
4994 else
4995 if test -r $ac_file; then
4996 eval "ac_cv_file_$ac_safe=yes"
4997 else
4998 eval "ac_cv_file_$ac_safe=no"
5002 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
5003 echo "$ac_t""yes" 1>&6
5004 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5005 cat >> confdefs.h <<EOF
5006 #define $ac_tr_file 1
5009 cat >> confdefs.h <<\EOF
5010 #define HAVE_PROC_SELF_EXE 1
5013 else
5014 echo "$ac_t""no" 1>&6
5017 done
5019 else
5020 case $host in
5021 *-linux*)
5022 cat >> confdefs.h <<\EOF
5023 #define HAVE_PROC_SELF_EXE 1
5027 esac
5032 am_cv_lib_iconv_ldpath=
5033 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
5034 if test "${with_libiconv_prefix+set}" = set; then
5035 withval="$with_libiconv_prefix"
5037 for dir in `echo "$withval" | tr : ' '`; do
5038 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
5039 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
5040 done
5045 echo $ac_n "checking for iconv""... $ac_c" 1>&6
5046 echo "configure:5047: checking for iconv" >&5
5047 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
5048 echo $ac_n "(cached) $ac_c" 1>&6
5049 else
5051 am_cv_func_iconv="no, consider installing GNU libiconv"
5052 am_cv_lib_iconv=no
5053 cat > conftest.$ac_ext <<EOF
5054 #line 5055 "configure"
5055 #include "confdefs.h"
5056 #include <stdlib.h>
5057 #include <iconv.h>
5058 int main() {
5059 iconv_t cd = iconv_open("","");
5060 iconv(cd,NULL,NULL,NULL,NULL);
5061 iconv_close(cd);
5062 ; return 0; }
5064 if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5065 rm -rf conftest*
5066 am_cv_func_iconv=yes
5067 else
5068 echo "configure: failed program was:" >&5
5069 cat conftest.$ac_ext >&5
5071 rm -f conftest*
5072 if test "$am_cv_func_iconv" != yes; then
5073 am_save_LIBS="$LIBS"
5074 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
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_lib_iconv=yes
5089 am_cv_func_iconv=yes
5090 else
5091 echo "configure: failed program was:" >&5
5092 cat conftest.$ac_ext >&5
5094 rm -f conftest*
5095 LIBS="$am_save_LIBS"
5100 echo "$ac_t""$am_cv_func_iconv" 1>&6
5101 if test "$am_cv_func_iconv" = yes; then
5102 cat >> confdefs.h <<\EOF
5103 #define HAVE_ICONV 1
5106 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
5107 echo "configure:5108: checking for iconv declaration" >&5
5108 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
5109 echo $ac_n "(cached) $ac_c" 1>&6
5110 else
5112 cat > conftest.$ac_ext <<EOF
5113 #line 5114 "configure"
5114 #include "confdefs.h"
5116 #include <stdlib.h>
5117 #include <iconv.h>
5118 extern
5119 #ifdef __cplusplus
5121 #endif
5122 #if defined(__STDC__) || defined(__cplusplus)
5123 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5124 #else
5125 size_t iconv();
5126 #endif
5128 int main() {
5130 ; return 0; }
5132 if { (eval echo configure:5133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5133 rm -rf conftest*
5134 am_cv_proto_iconv_arg1=""
5135 else
5136 echo "configure: failed program was:" >&5
5137 cat conftest.$ac_ext >&5
5138 rm -rf conftest*
5139 am_cv_proto_iconv_arg1="const"
5141 rm -f conftest*
5142 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);"
5145 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5146 echo "$ac_t""${ac_t:-
5147 }$am_cv_proto_iconv" 1>&6
5148 cat >> confdefs.h <<EOF
5149 #define ICONV_CONST $am_cv_proto_iconv_arg1
5153 LIBICONV=
5154 if test "$am_cv_lib_iconv" = yes; then
5155 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
5159 for ac_hdr in locale.h
5161 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5162 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5163 echo "configure:5164: checking for $ac_hdr" >&5
5164 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5165 echo $ac_n "(cached) $ac_c" 1>&6
5166 else
5167 cat > conftest.$ac_ext <<EOF
5168 #line 5169 "configure"
5169 #include "confdefs.h"
5170 #include <$ac_hdr>
5172 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5173 { (eval echo configure:5174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5174 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5175 if test -z "$ac_err"; then
5176 rm -rf conftest*
5177 eval "ac_cv_header_$ac_safe=yes"
5178 else
5179 echo "$ac_err" >&5
5180 echo "configure: failed program was:" >&5
5181 cat conftest.$ac_ext >&5
5182 rm -rf conftest*
5183 eval "ac_cv_header_$ac_safe=no"
5185 rm -f conftest*
5187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5188 echo "$ac_t""yes" 1>&6
5189 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5190 cat >> confdefs.h <<EOF
5191 #define $ac_tr_hdr 1
5194 else
5195 echo "$ac_t""no" 1>&6
5197 done
5199 if test $ac_cv_header_locale_h = yes; then
5200 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5201 echo "configure:5202: checking for LC_MESSAGES" >&5
5202 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
5203 echo $ac_n "(cached) $ac_c" 1>&6
5204 else
5205 cat > conftest.$ac_ext <<EOF
5206 #line 5207 "configure"
5207 #include "confdefs.h"
5208 #include <locale.h>
5209 int main() {
5210 return LC_MESSAGES
5211 ; return 0; }
5213 if { (eval echo configure:5214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5214 rm -rf conftest*
5215 am_cv_val_LC_MESSAGES=yes
5216 else
5217 echo "configure: failed program was:" >&5
5218 cat conftest.$ac_ext >&5
5219 rm -rf conftest*
5220 am_cv_val_LC_MESSAGES=no
5222 rm -f conftest*
5225 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
5226 if test $am_cv_val_LC_MESSAGES = yes; then
5227 cat >> confdefs.h <<\EOF
5228 #define HAVE_LC_MESSAGES 1
5233 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
5234 echo "configure:5235: checking whether struct tm is in sys/time.h or time.h" >&5
5235 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5236 echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238 cat > conftest.$ac_ext <<EOF
5239 #line 5240 "configure"
5240 #include "confdefs.h"
5241 #include <sys/types.h>
5242 #include <time.h>
5243 int main() {
5244 struct tm *tp; tp->tm_sec;
5245 ; return 0; }
5247 if { (eval echo configure:5248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5248 rm -rf conftest*
5249 ac_cv_struct_tm=time.h
5250 else
5251 echo "configure: failed program was:" >&5
5252 cat conftest.$ac_ext >&5
5253 rm -rf conftest*
5254 ac_cv_struct_tm=sys/time.h
5256 rm -f conftest*
5259 echo "$ac_t""$ac_cv_struct_tm" 1>&6
5260 if test $ac_cv_struct_tm = sys/time.h; then
5261 cat >> confdefs.h <<\EOF
5262 #define TM_IN_SYS_TIME 1
5267 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
5268 echo "configure:5269: checking for tm_zone in struct tm" >&5
5269 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5270 echo $ac_n "(cached) $ac_c" 1>&6
5271 else
5272 cat > conftest.$ac_ext <<EOF
5273 #line 5274 "configure"
5274 #include "confdefs.h"
5275 #include <sys/types.h>
5276 #include <$ac_cv_struct_tm>
5277 int main() {
5278 struct tm tm; tm.tm_zone;
5279 ; return 0; }
5281 if { (eval echo configure:5282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5282 rm -rf conftest*
5283 ac_cv_struct_tm_zone=yes
5284 else
5285 echo "configure: failed program was:" >&5
5286 cat conftest.$ac_ext >&5
5287 rm -rf conftest*
5288 ac_cv_struct_tm_zone=no
5290 rm -f conftest*
5293 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5294 if test "$ac_cv_struct_tm_zone" = yes; then
5295 cat >> confdefs.h <<\EOF
5296 #define HAVE_TM_ZONE 1
5299 else
5300 echo $ac_n "checking for tzname""... $ac_c" 1>&6
5301 echo "configure:5302: checking for tzname" >&5
5302 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5303 echo $ac_n "(cached) $ac_c" 1>&6
5304 else
5305 cat > conftest.$ac_ext <<EOF
5306 #line 5307 "configure"
5307 #include "confdefs.h"
5308 #include <time.h>
5309 #ifndef tzname /* For SGI. */
5310 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
5311 #endif
5312 int main() {
5313 atoi(*tzname);
5314 ; return 0; }
5316 if { (eval echo configure:5317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5317 rm -rf conftest*
5318 ac_cv_var_tzname=yes
5319 else
5320 echo "configure: failed program was:" >&5
5321 cat conftest.$ac_ext >&5
5322 rm -rf conftest*
5323 ac_cv_var_tzname=no
5325 rm -f conftest*
5328 echo "$ac_t""$ac_cv_var_tzname" 1>&6
5329 if test $ac_cv_var_tzname = yes; then
5330 cat >> confdefs.h <<\EOF
5331 #define HAVE_TZNAME 1
5338 for ac_func in gethostbyname_r
5340 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5341 echo "configure:5342: checking for $ac_func" >&5
5342 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5343 echo $ac_n "(cached) $ac_c" 1>&6
5344 else
5345 cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 /* System header to define __stub macros and hopefully few prototypes,
5349 which can conflict with char $ac_func(); below. */
5350 #include <assert.h>
5351 /* Override any gcc2 internal prototype to avoid an error. */
5352 /* We use char because int might match the return type of a gcc2
5353 builtin and then its argument prototype would still apply. */
5354 char $ac_func();
5356 int main() {
5358 /* The GNU C library defines this for functions which it implements
5359 to always fail with ENOSYS. Some functions are actually named
5360 something starting with __ and the normal name is an alias. */
5361 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5362 choke me
5363 #else
5364 $ac_func();
5365 #endif
5367 ; return 0; }
5369 if { (eval echo configure:5370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5370 rm -rf conftest*
5371 eval "ac_cv_func_$ac_func=yes"
5372 else
5373 echo "configure: failed program was:" >&5
5374 cat conftest.$ac_ext >&5
5375 rm -rf conftest*
5376 eval "ac_cv_func_$ac_func=no"
5378 rm -f conftest*
5381 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5382 echo "$ac_t""yes" 1>&6
5383 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5384 cat >> confdefs.h <<EOF
5385 #define $ac_tr_func 1
5388 cat >> confdefs.h <<\EOF
5389 #define HAVE_GETHOSTBYNAME_R 1
5392 # There are two different kinds of gethostbyname_r.
5393 # We look for the one that returns `int'.
5394 # Hopefully this check is robust enough.
5395 cat > conftest.$ac_ext <<EOF
5396 #line 5397 "configure"
5397 #include "confdefs.h"
5398 #include <netdb.h>
5400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5401 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
5402 rm -rf conftest*
5404 cat >> confdefs.h <<\EOF
5405 #define GETHOSTBYNAME_R_RETURNS_INT 1
5409 rm -f conftest*
5412 case " $GCINCS " in
5413 *" -D_REENTRANT "*) ;;
5415 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
5416 echo "configure:5417: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
5417 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
5418 echo $ac_n "(cached) $ac_c" 1>&6
5419 else
5421 ac_ext=C
5422 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5423 ac_cpp='$CXXCPP $CPPFLAGS'
5424 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5425 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5426 cross_compiling=$ac_cv_prog_cxx_cross
5428 cat > conftest.$ac_ext <<EOF
5429 #line 5430 "configure"
5430 #include "confdefs.h"
5431 #include <netdb.h>
5432 int main() {
5433 gethostbyname_r("", 0, 0);
5434 ; return 0; }
5436 if { (eval echo configure:5437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5437 rm -rf conftest*
5438 libjava_cv_gethostbyname_r_needs_reentrant=no
5439 else
5440 echo "configure: failed program was:" >&5
5441 cat conftest.$ac_ext >&5
5442 rm -rf conftest*
5443 CPPFLAGS_SAVE="$CPPFLAGS"
5444 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
5445 cat > conftest.$ac_ext <<EOF
5446 #line 5447 "configure"
5447 #include "confdefs.h"
5448 #include <netdb.h>
5449 int main() {
5450 gethostbyname_r("", 0, 0);
5451 ; return 0; }
5453 if { (eval echo configure:5454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5454 rm -rf conftest*
5455 libjava_cv_gethostbyname_r_needs_reentrant=yes
5456 else
5457 echo "configure: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 rm -rf conftest*
5460 libjava_cv_gethostbyname_r_needs_reentrant=fail
5462 rm -f conftest*
5463 CPPFLAGS="$CPPFLAGS_SAVE"
5466 rm -f conftest*
5467 ac_ext=c
5468 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5469 ac_cpp='$CPP $CPPFLAGS'
5470 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5471 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5472 cross_compiling=$ac_cv_prog_cc_cross
5477 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
5478 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
5479 cat >> confdefs.h <<\EOF
5480 #define _REENTRANT 1
5485 esac
5487 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
5488 echo "configure:5489: checking for struct hostent_data" >&5
5489 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
5490 echo $ac_n "(cached) $ac_c" 1>&6
5491 else
5492 cat > conftest.$ac_ext <<EOF
5493 #line 5494 "configure"
5494 #include "confdefs.h"
5496 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
5497 # define _REENTRANT 1
5498 #endif
5499 #include <netdb.h>
5500 int main() {
5501 struct hostent_data data;
5502 ; return 0; }
5504 if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5505 rm -rf conftest*
5506 libjava_cv_struct_hostent_data=yes
5507 else
5508 echo "configure: failed program was:" >&5
5509 cat conftest.$ac_ext >&5
5510 rm -rf conftest*
5511 libjava_cv_struct_hostent_data=no
5513 rm -f conftest*
5516 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
5517 if test "x$libjava_cv_struct_hostent_data" = xyes; then
5518 cat >> confdefs.h <<\EOF
5519 #define HAVE_STRUCT_HOSTENT_DATA 1
5524 else
5525 echo "$ac_t""no" 1>&6
5527 done
5530 # FIXME: libjava source code expects to find a prototype for
5531 # gethostbyaddr_r in netdb.h. The outer check ensures that
5532 # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
5533 # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
5534 # linkage check is enough, yet C++ code requires proper prototypes.)
5535 cat > conftest.$ac_ext <<EOF
5536 #line 5537 "configure"
5537 #include "confdefs.h"
5538 #include <netdb.h>
5540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5541 egrep "gethostbyaddr_r" >/dev/null 2>&1; then
5542 rm -rf conftest*
5544 for ac_func in gethostbyaddr_r
5546 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5547 echo "configure:5548: checking for $ac_func" >&5
5548 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5549 echo $ac_n "(cached) $ac_c" 1>&6
5550 else
5551 cat > conftest.$ac_ext <<EOF
5552 #line 5553 "configure"
5553 #include "confdefs.h"
5554 /* System header to define __stub macros and hopefully few prototypes,
5555 which can conflict with char $ac_func(); below. */
5556 #include <assert.h>
5557 /* Override any gcc2 internal prototype to avoid an error. */
5558 /* We use char because int might match the return type of a gcc2
5559 builtin and then its argument prototype would still apply. */
5560 char $ac_func();
5562 int main() {
5564 /* The GNU C library defines this for functions which it implements
5565 to always fail with ENOSYS. Some functions are actually named
5566 something starting with __ and the normal name is an alias. */
5567 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5568 choke me
5569 #else
5570 $ac_func();
5571 #endif
5573 ; return 0; }
5575 if { (eval echo configure:5576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5576 rm -rf conftest*
5577 eval "ac_cv_func_$ac_func=yes"
5578 else
5579 echo "configure: failed program was:" >&5
5580 cat conftest.$ac_ext >&5
5581 rm -rf conftest*
5582 eval "ac_cv_func_$ac_func=no"
5584 rm -f conftest*
5587 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5588 echo "$ac_t""yes" 1>&6
5589 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5590 cat >> confdefs.h <<EOF
5591 #define $ac_tr_func 1
5594 cat >> confdefs.h <<\EOF
5595 #define HAVE_GETHOSTBYADDR_R 1
5598 # There are two different kinds of gethostbyaddr_r.
5599 # We look for the one that returns `int'.
5600 # Hopefully this check is robust enough.
5601 cat > conftest.$ac_ext <<EOF
5602 #line 5603 "configure"
5603 #include "confdefs.h"
5604 #include <netdb.h>
5606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5607 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
5608 rm -rf conftest*
5610 cat >> confdefs.h <<\EOF
5611 #define GETHOSTBYADDR_R_RETURNS_INT 1
5615 rm -f conftest*
5617 else
5618 echo "$ac_t""no" 1>&6
5620 done
5623 rm -f conftest*
5626 for ac_func in gethostname
5628 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5629 echo "configure:5630: checking for $ac_func" >&5
5630 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5631 echo $ac_n "(cached) $ac_c" 1>&6
5632 else
5633 cat > conftest.$ac_ext <<EOF
5634 #line 5635 "configure"
5635 #include "confdefs.h"
5636 /* System header to define __stub macros and hopefully few prototypes,
5637 which can conflict with char $ac_func(); below. */
5638 #include <assert.h>
5639 /* Override any gcc2 internal prototype to avoid an error. */
5640 /* We use char because int might match the return type of a gcc2
5641 builtin and then its argument prototype would still apply. */
5642 char $ac_func();
5644 int main() {
5646 /* The GNU C library defines this for functions which it implements
5647 to always fail with ENOSYS. Some functions are actually named
5648 something starting with __ and the normal name is an alias. */
5649 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5650 choke me
5651 #else
5652 $ac_func();
5653 #endif
5655 ; return 0; }
5657 if { (eval echo configure:5658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5658 rm -rf conftest*
5659 eval "ac_cv_func_$ac_func=yes"
5660 else
5661 echo "configure: failed program was:" >&5
5662 cat conftest.$ac_ext >&5
5663 rm -rf conftest*
5664 eval "ac_cv_func_$ac_func=no"
5666 rm -f conftest*
5669 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5670 echo "$ac_t""yes" 1>&6
5671 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5672 cat >> confdefs.h <<EOF
5673 #define $ac_tr_func 1
5676 cat >> confdefs.h <<\EOF
5677 #define HAVE_GETHOSTNAME 1
5680 cat > conftest.$ac_ext <<EOF
5681 #line 5682 "configure"
5682 #include "confdefs.h"
5683 #include <unistd.h>
5685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5686 egrep "gethostname" >/dev/null 2>&1; then
5687 rm -rf conftest*
5689 cat >> confdefs.h <<\EOF
5690 #define HAVE_GETHOSTNAME_DECL 1
5694 rm -f conftest*
5696 else
5697 echo "$ac_t""no" 1>&6
5699 done
5702 for ac_func in usleep
5704 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5705 echo "configure:5706: checking for $ac_func" >&5
5706 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5707 echo $ac_n "(cached) $ac_c" 1>&6
5708 else
5709 cat > conftest.$ac_ext <<EOF
5710 #line 5711 "configure"
5711 #include "confdefs.h"
5712 /* System header to define __stub macros and hopefully few prototypes,
5713 which can conflict with char $ac_func(); below. */
5714 #include <assert.h>
5715 /* Override any gcc2 internal prototype to avoid an error. */
5716 /* We use char because int might match the return type of a gcc2
5717 builtin and then its argument prototype would still apply. */
5718 char $ac_func();
5720 int main() {
5722 /* The GNU C library defines this for functions which it implements
5723 to always fail with ENOSYS. Some functions are actually named
5724 something starting with __ and the normal name is an alias. */
5725 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5726 choke me
5727 #else
5728 $ac_func();
5729 #endif
5731 ; return 0; }
5733 if { (eval echo configure:5734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5734 rm -rf conftest*
5735 eval "ac_cv_func_$ac_func=yes"
5736 else
5737 echo "configure: failed program was:" >&5
5738 cat conftest.$ac_ext >&5
5739 rm -rf conftest*
5740 eval "ac_cv_func_$ac_func=no"
5742 rm -f conftest*
5745 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5746 echo "$ac_t""yes" 1>&6
5747 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5748 cat >> confdefs.h <<EOF
5749 #define $ac_tr_func 1
5752 cat > conftest.$ac_ext <<EOF
5753 #line 5754 "configure"
5754 #include "confdefs.h"
5755 #include <unistd.h>
5757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5758 egrep "usleep" >/dev/null 2>&1; then
5759 rm -rf conftest*
5761 cat >> confdefs.h <<\EOF
5762 #define HAVE_USLEEP_DECL 1
5766 rm -f conftest*
5768 else
5769 echo "$ac_t""no" 1>&6
5771 done
5774 # Look for these functions in the thread library, but only bother
5775 # if using POSIX threads.
5776 if test "$THREADS" = posix; then
5777 save_LIBS="$LIBS"
5778 LIBS="$LIBS $THREADLIBS"
5779 # Some POSIX thread systems don't have pthread_mutexattr_settype.
5780 # E.g., Solaris.
5781 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
5783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5784 echo "configure:5785: checking for $ac_func" >&5
5785 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5786 echo $ac_n "(cached) $ac_c" 1>&6
5787 else
5788 cat > conftest.$ac_ext <<EOF
5789 #line 5790 "configure"
5790 #include "confdefs.h"
5791 /* System header to define __stub macros and hopefully few prototypes,
5792 which can conflict with char $ac_func(); below. */
5793 #include <assert.h>
5794 /* Override any gcc2 internal prototype to avoid an error. */
5795 /* We use char because int might match the return type of a gcc2
5796 builtin and then its argument prototype would still apply. */
5797 char $ac_func();
5799 int main() {
5801 /* The GNU C library defines this for functions which it implements
5802 to always fail with ENOSYS. Some functions are actually named
5803 something starting with __ and the normal name is an alias. */
5804 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5805 choke me
5806 #else
5807 $ac_func();
5808 #endif
5810 ; return 0; }
5812 if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5813 rm -rf conftest*
5814 eval "ac_cv_func_$ac_func=yes"
5815 else
5816 echo "configure: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 rm -rf conftest*
5819 eval "ac_cv_func_$ac_func=no"
5821 rm -f conftest*
5824 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5825 echo "$ac_t""yes" 1>&6
5826 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5827 cat >> confdefs.h <<EOF
5828 #define $ac_tr_func 1
5831 else
5832 echo "$ac_t""no" 1>&6
5834 done
5837 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
5838 # Solaris 7 the name librt is preferred.
5839 for ac_func in sched_yield
5841 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5842 echo "configure:5843: checking for $ac_func" >&5
5843 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5844 echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846 cat > conftest.$ac_ext <<EOF
5847 #line 5848 "configure"
5848 #include "confdefs.h"
5849 /* System header to define __stub macros and hopefully few prototypes,
5850 which can conflict with char $ac_func(); below. */
5851 #include <assert.h>
5852 /* Override any gcc2 internal prototype to avoid an error. */
5853 /* We use char because int might match the return type of a gcc2
5854 builtin and then its argument prototype would still apply. */
5855 char $ac_func();
5857 int main() {
5859 /* The GNU C library defines this for functions which it implements
5860 to always fail with ENOSYS. Some functions are actually named
5861 something starting with __ and the normal name is an alias. */
5862 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5863 choke me
5864 #else
5865 $ac_func();
5866 #endif
5868 ; return 0; }
5870 if { (eval echo configure:5871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5871 rm -rf conftest*
5872 eval "ac_cv_func_$ac_func=yes"
5873 else
5874 echo "configure: failed program was:" >&5
5875 cat conftest.$ac_ext >&5
5876 rm -rf conftest*
5877 eval "ac_cv_func_$ac_func=no"
5879 rm -f conftest*
5882 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5883 echo "$ac_t""yes" 1>&6
5884 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5885 cat >> confdefs.h <<EOF
5886 #define $ac_tr_func 1
5889 else
5890 echo "$ac_t""no" 1>&6
5891 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
5892 echo "configure:5893: checking for sched_yield in -lrt" >&5
5893 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
5894 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5895 echo $ac_n "(cached) $ac_c" 1>&6
5896 else
5897 ac_save_LIBS="$LIBS"
5898 LIBS="-lrt $LIBS"
5899 cat > conftest.$ac_ext <<EOF
5900 #line 5901 "configure"
5901 #include "confdefs.h"
5902 /* Override any gcc2 internal prototype to avoid an error. */
5903 /* We use char because int might match the return type of a gcc2
5904 builtin and then its argument prototype would still apply. */
5905 char sched_yield();
5907 int main() {
5908 sched_yield()
5909 ; return 0; }
5911 if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5912 rm -rf conftest*
5913 eval "ac_cv_lib_$ac_lib_var=yes"
5914 else
5915 echo "configure: failed program was:" >&5
5916 cat conftest.$ac_ext >&5
5917 rm -rf conftest*
5918 eval "ac_cv_lib_$ac_lib_var=no"
5920 rm -f conftest*
5921 LIBS="$ac_save_LIBS"
5924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5925 echo "$ac_t""yes" 1>&6
5927 cat >> confdefs.h <<\EOF
5928 #define HAVE_SCHED_YIELD 1
5931 THREADLIBS="$THREADLIBS -lrt"
5932 THREADSPEC="$THREADSPEC -lrt"
5933 else
5934 echo "$ac_t""no" 1>&6
5936 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
5937 echo "configure:5938: checking for sched_yield in -lposix4" >&5
5938 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
5939 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5940 echo $ac_n "(cached) $ac_c" 1>&6
5941 else
5942 ac_save_LIBS="$LIBS"
5943 LIBS="-lposix4 $LIBS"
5944 cat > conftest.$ac_ext <<EOF
5945 #line 5946 "configure"
5946 #include "confdefs.h"
5947 /* Override any gcc2 internal prototype to avoid an error. */
5948 /* We use char because int might match the return type of a gcc2
5949 builtin and then its argument prototype would still apply. */
5950 char sched_yield();
5952 int main() {
5953 sched_yield()
5954 ; return 0; }
5956 if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5957 rm -rf conftest*
5958 eval "ac_cv_lib_$ac_lib_var=yes"
5959 else
5960 echo "configure: failed program was:" >&5
5961 cat conftest.$ac_ext >&5
5962 rm -rf conftest*
5963 eval "ac_cv_lib_$ac_lib_var=no"
5965 rm -f conftest*
5966 LIBS="$ac_save_LIBS"
5969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5970 echo "$ac_t""yes" 1>&6
5972 cat >> confdefs.h <<\EOF
5973 #define HAVE_SCHED_YIELD 1
5976 THREADLIBS="$THREADLIBS -lposix4"
5977 THREADSPEC="$THREADSPEC -lposix4"
5978 else
5979 echo "$ac_t""no" 1>&6
5985 done
5987 LIBS="$save_LIBS"
5989 # We can save a little space at runtime if the mutex has m_count
5990 # or __m_count. This is a nice hack for Linux.
5991 cat > conftest.$ac_ext <<EOF
5992 #line 5993 "configure"
5993 #include "confdefs.h"
5994 #include <pthread.h>
5995 int main() {
5997 extern pthread_mutex_t *mutex; int q = mutex->m_count;
5999 ; return 0; }
6001 if { (eval echo configure:6002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6002 rm -rf conftest*
6003 cat >> confdefs.h <<\EOF
6004 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
6007 else
6008 echo "configure: failed program was:" >&5
6009 cat conftest.$ac_ext >&5
6010 rm -rf conftest*
6012 cat > conftest.$ac_ext <<EOF
6013 #line 6014 "configure"
6014 #include "confdefs.h"
6015 #include <pthread.h>
6016 int main() {
6018 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
6020 ; return 0; }
6022 if { (eval echo configure:6023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6023 rm -rf conftest*
6024 cat >> confdefs.h <<\EOF
6025 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
6028 else
6029 echo "configure: failed program was:" >&5
6030 cat conftest.$ac_ext >&5
6032 rm -f conftest*
6034 rm -f conftest*
6037 # We require a way to get the time.
6038 time_found=no
6039 for ac_func in gettimeofday time ftime
6041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6042 echo "configure:6043: checking for $ac_func" >&5
6043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6044 echo $ac_n "(cached) $ac_c" 1>&6
6045 else
6046 cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 /* System header to define __stub macros and hopefully few prototypes,
6050 which can conflict with char $ac_func(); below. */
6051 #include <assert.h>
6052 /* Override any gcc2 internal prototype to avoid an error. */
6053 /* We use char because int might match the return type of a gcc2
6054 builtin and then its argument prototype would still apply. */
6055 char $ac_func();
6057 int main() {
6059 /* The GNU C library defines this for functions which it implements
6060 to always fail with ENOSYS. Some functions are actually named
6061 something starting with __ and the normal name is an alias. */
6062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6063 choke me
6064 #else
6065 $ac_func();
6066 #endif
6068 ; return 0; }
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071 rm -rf conftest*
6072 eval "ac_cv_func_$ac_func=yes"
6073 else
6074 echo "configure: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6076 rm -rf conftest*
6077 eval "ac_cv_func_$ac_func=no"
6079 rm -f conftest*
6082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6083 echo "$ac_t""yes" 1>&6
6084 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6085 cat >> confdefs.h <<EOF
6086 #define $ac_tr_func 1
6088 time_found=yes
6089 else
6090 echo "$ac_t""no" 1>&6
6092 done
6094 if test "$time_found" = no; then
6095 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
6098 for ac_func in memmove
6100 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6101 echo "configure:6102: checking for $ac_func" >&5
6102 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6103 echo $ac_n "(cached) $ac_c" 1>&6
6104 else
6105 cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108 /* System header to define __stub macros and hopefully few prototypes,
6109 which can conflict with char $ac_func(); below. */
6110 #include <assert.h>
6111 /* Override any gcc2 internal prototype to avoid an error. */
6112 /* We use char because int might match the return type of a gcc2
6113 builtin and then its argument prototype would still apply. */
6114 char $ac_func();
6116 int main() {
6118 /* The GNU C library defines this for functions which it implements
6119 to always fail with ENOSYS. Some functions are actually named
6120 something starting with __ and the normal name is an alias. */
6121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6122 choke me
6123 #else
6124 $ac_func();
6125 #endif
6127 ; return 0; }
6129 if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6130 rm -rf conftest*
6131 eval "ac_cv_func_$ac_func=yes"
6132 else
6133 echo "configure: failed program was:" >&5
6134 cat conftest.$ac_ext >&5
6135 rm -rf conftest*
6136 eval "ac_cv_func_$ac_func=no"
6138 rm -f conftest*
6141 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6142 echo "$ac_t""yes" 1>&6
6143 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6144 cat >> confdefs.h <<EOF
6145 #define $ac_tr_func 1
6148 else
6149 echo "$ac_t""no" 1>&6
6151 done
6154 # We require memcpy.
6155 memcpy_found=no
6156 for ac_func in memcpy
6158 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6159 echo "configure:6160: checking for $ac_func" >&5
6160 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6161 echo $ac_n "(cached) $ac_c" 1>&6
6162 else
6163 cat > conftest.$ac_ext <<EOF
6164 #line 6165 "configure"
6165 #include "confdefs.h"
6166 /* System header to define __stub macros and hopefully few prototypes,
6167 which can conflict with char $ac_func(); below. */
6168 #include <assert.h>
6169 /* Override any gcc2 internal prototype to avoid an error. */
6170 /* We use char because int might match the return type of a gcc2
6171 builtin and then its argument prototype would still apply. */
6172 char $ac_func();
6174 int main() {
6176 /* The GNU C library defines this for functions which it implements
6177 to always fail with ENOSYS. Some functions are actually named
6178 something starting with __ and the normal name is an alias. */
6179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6180 choke me
6181 #else
6182 $ac_func();
6183 #endif
6185 ; return 0; }
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188 rm -rf conftest*
6189 eval "ac_cv_func_$ac_func=yes"
6190 else
6191 echo "configure: failed program was:" >&5
6192 cat conftest.$ac_ext >&5
6193 rm -rf conftest*
6194 eval "ac_cv_func_$ac_func=no"
6196 rm -f conftest*
6199 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6200 echo "$ac_t""yes" 1>&6
6201 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6202 cat >> confdefs.h <<EOF
6203 #define $ac_tr_func 1
6205 memcpy_found=yes
6206 else
6207 echo "$ac_t""no" 1>&6
6209 done
6211 if test "$memcpy_found" = no; then
6212 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
6215 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6216 echo "configure:6217: checking for dlopen in -ldl" >&5
6217 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6218 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6219 echo $ac_n "(cached) $ac_c" 1>&6
6220 else
6221 ac_save_LIBS="$LIBS"
6222 LIBS="-ldl $LIBS"
6223 cat > conftest.$ac_ext <<EOF
6224 #line 6225 "configure"
6225 #include "confdefs.h"
6226 /* Override any gcc2 internal prototype to avoid an error. */
6227 /* We use char because int might match the return type of a gcc2
6228 builtin and then its argument prototype would still apply. */
6229 char dlopen();
6231 int main() {
6232 dlopen()
6233 ; return 0; }
6235 if { (eval echo configure:6236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6236 rm -rf conftest*
6237 eval "ac_cv_lib_$ac_lib_var=yes"
6238 else
6239 echo "configure: failed program was:" >&5
6240 cat conftest.$ac_ext >&5
6241 rm -rf conftest*
6242 eval "ac_cv_lib_$ac_lib_var=no"
6244 rm -f conftest*
6245 LIBS="$ac_save_LIBS"
6248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6249 echo "$ac_t""yes" 1>&6
6251 cat >> confdefs.h <<\EOF
6252 #define HAVE_DLOPEN 1
6255 else
6256 echo "$ac_t""no" 1>&6
6260 # Some library-finding code we stole from Tcl.
6261 #--------------------------------------------------------------------
6262 # Check for the existence of the -lsocket and -lnsl libraries.
6263 # The order here is important, so that they end up in the right
6264 # order in the command line generated by make. Here are some
6265 # special considerations:
6266 # 1. Use "connect" and "accept" to check for -lsocket, and
6267 # "gethostbyname" to check for -lnsl.
6268 # 2. Use each function name only once: can't redo a check because
6269 # autoconf caches the results of the last check and won't redo it.
6270 # 3. Use -lnsl and -lsocket only if they supply procedures that
6271 # aren't already present in the normal libraries. This is because
6272 # IRIX 5.2 has libraries, but they aren't needed and they're
6273 # bogus: they goof up name resolution if used.
6274 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
6275 # To get around this problem, check for both libraries together
6276 # if -lsocket doesn't work by itself.
6277 #--------------------------------------------------------------------
6279 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
6280 echo "configure:6281: checking for socket libraries" >&5
6281 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
6282 echo $ac_n "(cached) $ac_c" 1>&6
6283 else
6284 gcj_cv_lib_sockets=
6285 gcj_checkBoth=0
6286 unset ac_cv_func_connect
6287 echo $ac_n "checking for connect""... $ac_c" 1>&6
6288 echo "configure:6289: checking for connect" >&5
6289 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6290 echo $ac_n "(cached) $ac_c" 1>&6
6291 else
6292 cat > conftest.$ac_ext <<EOF
6293 #line 6294 "configure"
6294 #include "confdefs.h"
6295 /* System header to define __stub macros and hopefully few prototypes,
6296 which can conflict with char connect(); below. */
6297 #include <assert.h>
6298 /* Override any gcc2 internal prototype to avoid an error. */
6299 /* We use char because int might match the return type of a gcc2
6300 builtin and then its argument prototype would still apply. */
6301 char connect();
6303 int main() {
6305 /* The GNU C library defines this for functions which it implements
6306 to always fail with ENOSYS. Some functions are actually named
6307 something starting with __ and the normal name is an alias. */
6308 #if defined (__stub_connect) || defined (__stub___connect)
6309 choke me
6310 #else
6311 connect();
6312 #endif
6314 ; return 0; }
6316 if { (eval echo configure:6317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6317 rm -rf conftest*
6318 eval "ac_cv_func_connect=yes"
6319 else
6320 echo "configure: failed program was:" >&5
6321 cat conftest.$ac_ext >&5
6322 rm -rf conftest*
6323 eval "ac_cv_func_connect=no"
6325 rm -f conftest*
6328 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6329 echo "$ac_t""yes" 1>&6
6330 gcj_checkSocket=0
6331 else
6332 echo "$ac_t""no" 1>&6
6333 gcj_checkSocket=1
6336 if test "$gcj_checkSocket" = 1; then
6337 unset ac_cv_func_connect
6338 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
6339 echo "configure:6340: checking for main in -lsocket" >&5
6340 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
6341 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6342 echo $ac_n "(cached) $ac_c" 1>&6
6343 else
6344 ac_save_LIBS="$LIBS"
6345 LIBS="-lsocket $LIBS"
6346 cat > conftest.$ac_ext <<EOF
6347 #line 6348 "configure"
6348 #include "confdefs.h"
6350 int main() {
6351 main()
6352 ; return 0; }
6354 if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6355 rm -rf conftest*
6356 eval "ac_cv_lib_$ac_lib_var=yes"
6357 else
6358 echo "configure: failed program was:" >&5
6359 cat conftest.$ac_ext >&5
6360 rm -rf conftest*
6361 eval "ac_cv_lib_$ac_lib_var=no"
6363 rm -f conftest*
6364 LIBS="$ac_save_LIBS"
6367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6368 echo "$ac_t""yes" 1>&6
6369 gcj_cv_lib_sockets="-lsocket"
6370 else
6371 echo "$ac_t""no" 1>&6
6372 gcj_checkBoth=1
6376 if test "$gcj_checkBoth" = 1; then
6377 gcj_oldLibs=$LIBS
6378 LIBS="$LIBS -lsocket -lnsl"
6379 unset ac_cv_func_accept
6380 echo $ac_n "checking for accept""... $ac_c" 1>&6
6381 echo "configure:6382: checking for accept" >&5
6382 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
6383 echo $ac_n "(cached) $ac_c" 1>&6
6384 else
6385 cat > conftest.$ac_ext <<EOF
6386 #line 6387 "configure"
6387 #include "confdefs.h"
6388 /* System header to define __stub macros and hopefully few prototypes,
6389 which can conflict with char accept(); below. */
6390 #include <assert.h>
6391 /* Override any gcc2 internal prototype to avoid an error. */
6392 /* We use char because int might match the return type of a gcc2
6393 builtin and then its argument prototype would still apply. */
6394 char accept();
6396 int main() {
6398 /* The GNU C library defines this for functions which it implements
6399 to always fail with ENOSYS. Some functions are actually named
6400 something starting with __ and the normal name is an alias. */
6401 #if defined (__stub_accept) || defined (__stub___accept)
6402 choke me
6403 #else
6404 accept();
6405 #endif
6407 ; return 0; }
6409 if { (eval echo configure:6410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6410 rm -rf conftest*
6411 eval "ac_cv_func_accept=yes"
6412 else
6413 echo "configure: failed program was:" >&5
6414 cat conftest.$ac_ext >&5
6415 rm -rf conftest*
6416 eval "ac_cv_func_accept=no"
6418 rm -f conftest*
6421 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
6422 echo "$ac_t""yes" 1>&6
6423 gcj_checkNsl=0
6424 gcj_cv_lib_sockets="-lsocket -lnsl"
6425 else
6426 echo "$ac_t""no" 1>&6
6429 unset ac_cv_func_accept
6430 LIBS=$gcj_oldLibs
6432 unset ac_cv_func_gethostbyname
6433 gcj_oldLibs=$LIBS
6434 LIBS="$LIBS $gcj_cv_lib_sockets"
6435 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6436 echo "configure:6437: checking for gethostbyname" >&5
6437 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6438 echo $ac_n "(cached) $ac_c" 1>&6
6439 else
6440 cat > conftest.$ac_ext <<EOF
6441 #line 6442 "configure"
6442 #include "confdefs.h"
6443 /* System header to define __stub macros and hopefully few prototypes,
6444 which can conflict with char gethostbyname(); below. */
6445 #include <assert.h>
6446 /* Override any gcc2 internal prototype to avoid an error. */
6447 /* We use char because int might match the return type of a gcc2
6448 builtin and then its argument prototype would still apply. */
6449 char gethostbyname();
6451 int main() {
6453 /* The GNU C library defines this for functions which it implements
6454 to always fail with ENOSYS. Some functions are actually named
6455 something starting with __ and the normal name is an alias. */
6456 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6457 choke me
6458 #else
6459 gethostbyname();
6460 #endif
6462 ; return 0; }
6464 if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6465 rm -rf conftest*
6466 eval "ac_cv_func_gethostbyname=yes"
6467 else
6468 echo "configure: failed program was:" >&5
6469 cat conftest.$ac_ext >&5
6470 rm -rf conftest*
6471 eval "ac_cv_func_gethostbyname=no"
6473 rm -f conftest*
6476 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6477 echo "$ac_t""yes" 1>&6
6479 else
6480 echo "$ac_t""no" 1>&6
6481 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
6482 echo "configure:6483: checking for main in -lnsl" >&5
6483 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
6484 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6485 echo $ac_n "(cached) $ac_c" 1>&6
6486 else
6487 ac_save_LIBS="$LIBS"
6488 LIBS="-lnsl $LIBS"
6489 cat > conftest.$ac_ext <<EOF
6490 #line 6491 "configure"
6491 #include "confdefs.h"
6493 int main() {
6494 main()
6495 ; return 0; }
6497 if { (eval echo configure:6498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6498 rm -rf conftest*
6499 eval "ac_cv_lib_$ac_lib_var=yes"
6500 else
6501 echo "configure: failed program was:" >&5
6502 cat conftest.$ac_ext >&5
6503 rm -rf conftest*
6504 eval "ac_cv_lib_$ac_lib_var=no"
6506 rm -f conftest*
6507 LIBS="$ac_save_LIBS"
6510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6511 echo "$ac_t""yes" 1>&6
6512 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
6513 else
6514 echo "$ac_t""no" 1>&6
6519 unset ac_cv_func_gethostbyname
6520 LIBS=$gcj_oldLIBS
6524 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
6525 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
6527 if test "$with_system_zlib" = yes; then
6528 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
6529 echo "configure:6530: checking for deflate in -lz" >&5
6530 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
6531 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6532 echo $ac_n "(cached) $ac_c" 1>&6
6533 else
6534 ac_save_LIBS="$LIBS"
6535 LIBS="-lz $LIBS"
6536 cat > conftest.$ac_ext <<EOF
6537 #line 6538 "configure"
6538 #include "confdefs.h"
6539 /* Override any gcc2 internal prototype to avoid an error. */
6540 /* We use char because int might match the return type of a gcc2
6541 builtin and then its argument prototype would still apply. */
6542 char deflate();
6544 int main() {
6545 deflate()
6546 ; return 0; }
6548 if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6549 rm -rf conftest*
6550 eval "ac_cv_lib_$ac_lib_var=yes"
6551 else
6552 echo "configure: failed program was:" >&5
6553 cat conftest.$ac_ext >&5
6554 rm -rf conftest*
6555 eval "ac_cv_lib_$ac_lib_var=no"
6557 rm -f conftest*
6558 LIBS="$ac_save_LIBS"
6561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6562 echo "$ac_t""yes" 1>&6
6563 ZLIBSPEC=-lz
6564 else
6565 echo "$ac_t""no" 1>&6
6566 ZLIBSPEC=
6571 # Test for Gtk stuff, if asked for.
6572 if test "$use_gtk_awt" = yes; then
6573 # Check whether --enable-gtktest or --disable-gtktest was given.
6574 if test "${enable_gtktest+set}" = set; then
6575 enableval="$enable_gtktest"
6577 else
6578 enable_gtktest=yes
6582 pkg_config_args=gtk+-2.0
6583 for module in .
6585 case "$module" in
6586 gthread)
6587 pkg_config_args="$pkg_config_args gthread-2.0"
6589 esac
6590 done
6592 no_gtk=""
6594 # Extract the first word of "pkg-config", so it can be a program name with args.
6595 set dummy pkg-config; ac_word=$2
6596 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6597 echo "configure:6598: checking for $ac_word" >&5
6598 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
6599 echo $ac_n "(cached) $ac_c" 1>&6
6600 else
6601 case "$PKG_CONFIG" in
6603 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6605 ?:/*)
6606 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
6609 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6610 ac_dummy="$PATH"
6611 for ac_dir in $ac_dummy; do
6612 test -z "$ac_dir" && ac_dir=.
6613 if test -f $ac_dir/$ac_word; then
6614 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6615 break
6617 done
6618 IFS="$ac_save_ifs"
6619 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6621 esac
6623 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6624 if test -n "$PKG_CONFIG"; then
6625 echo "$ac_t""$PKG_CONFIG" 1>&6
6626 else
6627 echo "$ac_t""no" 1>&6
6631 if test x$PKG_CONFIG != xno ; then
6632 if pkg-config --atleast-pkgconfig-version 0.7 ; then
6634 else
6635 echo *** pkg-config too old; version 0.7 or better required.
6636 no_gtk=yes
6637 PKG_CONFIG=no
6639 else
6640 no_gtk=yes
6643 min_gtk_version=2.2.0
6644 echo $ac_n "checking for GTK+ - version >= $min_gtk_version""... $ac_c" 1>&6
6645 echo "configure:6646: checking for GTK+ - version >= $min_gtk_version" >&5
6647 if test x$PKG_CONFIG != xno ; then
6648 ## don't try to run the test against uninstalled libtool libs
6649 if $PKG_CONFIG --uninstalled $pkg_config_args; then
6650 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
6651 enable_gtktest=no
6654 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
6656 else
6657 no_gtk=yes
6661 if test x"$no_gtk" = x ; then
6662 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
6663 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
6664 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
6665 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
6666 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
6667 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
6668 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
6669 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
6670 if test "x$enable_gtktest" = "xyes" ; then
6671 ac_save_CFLAGS="$CFLAGS"
6672 ac_save_LIBS="$LIBS"
6673 CFLAGS="$CFLAGS $GTK_CFLAGS"
6674 LIBS="$GTK_LIBS $LIBS"
6675 rm -f conf.gtktest
6676 if test "$cross_compiling" = yes; then
6677 echo $ac_n "cross compiling; assumed OK... $ac_c"
6678 else
6679 cat > conftest.$ac_ext <<EOF
6680 #line 6681 "configure"
6681 #include "confdefs.h"
6683 #include <gtk/gtk.h>
6684 #include <stdio.h>
6685 #include <stdlib.h>
6687 int
6688 main ()
6690 int major, minor, micro;
6691 char *tmp_version;
6693 system ("touch conf.gtktest");
6695 /* HP/UX 9 (%@#!) writes to sscanf strings */
6696 tmp_version = g_strdup("$min_gtk_version");
6697 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
6698 printf("%s, bad version string\n", "$min_gtk_version");
6699 exit(1);
6702 if ((gtk_major_version != $gtk_config_major_version) ||
6703 (gtk_minor_version != $gtk_config_minor_version) ||
6704 (gtk_micro_version != $gtk_config_micro_version))
6706 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
6707 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
6708 gtk_major_version, gtk_minor_version, gtk_micro_version);
6709 printf ("*** was found! If pkg-config was correct, then it is best\n");
6710 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
6711 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
6712 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
6713 printf("*** required on your system.\n");
6714 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
6715 printf("*** to point to the correct configuration files\n");
6717 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
6718 (gtk_minor_version != GTK_MINOR_VERSION) ||
6719 (gtk_micro_version != GTK_MICRO_VERSION))
6721 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
6722 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
6723 printf("*** library (version %d.%d.%d)\n",
6724 gtk_major_version, gtk_minor_version, gtk_micro_version);
6726 else
6728 if ((gtk_major_version > major) ||
6729 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
6730 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
6732 return 0;
6734 else
6736 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
6737 gtk_major_version, gtk_minor_version, gtk_micro_version);
6738 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
6739 major, minor, micro);
6740 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
6741 printf("***\n");
6742 printf("*** If you have already installed a sufficiently new version, this error\n");
6743 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
6744 printf("*** being found. The easiest way to fix this is to remove the old version\n");
6745 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
6746 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
6747 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
6748 printf("*** so that the correct libraries are found at run-time))\n");
6751 return 1;
6755 if { (eval echo configure:6756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6756 then
6758 else
6759 echo "configure: failed program was:" >&5
6760 cat conftest.$ac_ext >&5
6761 rm -fr conftest*
6762 no_gtk=yes
6764 rm -fr conftest*
6767 CFLAGS="$ac_save_CFLAGS"
6768 LIBS="$ac_save_LIBS"
6771 if test "x$no_gtk" = x ; then
6772 echo "$ac_t""yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" 1>&6
6774 else
6775 echo "$ac_t""no" 1>&6
6776 if test "$PKG_CONFIG" = "no" ; then
6777 echo "*** A new enough version of pkg-config was not found."
6778 echo "*** See http://pkgconfig.sourceforge.net"
6779 else
6780 if test -f conf.gtktest ; then
6782 else
6783 echo "*** Could not run GTK+ test program, checking why..."
6784 ac_save_CFLAGS="$CFLAGS"
6785 ac_save_LIBS="$LIBS"
6786 CFLAGS="$CFLAGS $GTK_CFLAGS"
6787 LIBS="$LIBS $GTK_LIBS"
6788 cat > conftest.$ac_ext <<EOF
6789 #line 6790 "configure"
6790 #include "confdefs.h"
6792 #include <gtk/gtk.h>
6793 #include <stdio.h>
6795 int main() {
6796 return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
6797 ; return 0; }
6799 if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6800 rm -rf conftest*
6801 echo "*** The test program compiled, but did not run. This usually means"
6802 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
6803 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
6804 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
6805 echo "*** to the installed location Also, make sure you have run ldconfig if that"
6806 echo "*** is required on your system"
6807 echo "***"
6808 echo "*** If you have an old version installed, it is best to remove it, although"
6809 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
6810 else
6811 echo "configure: failed program was:" >&5
6812 cat conftest.$ac_ext >&5
6813 rm -rf conftest*
6814 echo "*** The test program failed to compile or link. See the file config.log for the"
6815 echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."
6817 rm -f conftest*
6818 CFLAGS="$ac_save_CFLAGS"
6819 LIBS="$ac_save_LIBS"
6822 GTK_CFLAGS=""
6823 GTK_LIBS=""
6824 exit 1
6828 rm -f conf.gtktest
6830 # Check whether --enable-glibtest or --disable-glibtest was given.
6831 if test "${enable_glibtest+set}" = set; then
6832 enableval="$enable_glibtest"
6834 else
6835 enable_glibtest=yes
6839 pkg_config_args=glib-2.0
6840 for module in . gthread
6842 case "$module" in
6843 gmodule)
6844 pkg_config_args="$pkg_config_args gmodule-2.0"
6846 gobject)
6847 pkg_config_args="$pkg_config_args gobject-2.0"
6849 gthread)
6850 pkg_config_args="$pkg_config_args gthread-2.0"
6852 esac
6853 done
6855 # Extract the first word of "pkg-config", so it can be a program name with args.
6856 set dummy pkg-config; ac_word=$2
6857 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6858 echo "configure:6859: checking for $ac_word" >&5
6859 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
6860 echo $ac_n "(cached) $ac_c" 1>&6
6861 else
6862 case "$PKG_CONFIG" in
6864 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6866 ?:/*)
6867 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
6870 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6871 ac_dummy="$PATH"
6872 for ac_dir in $ac_dummy; do
6873 test -z "$ac_dir" && ac_dir=.
6874 if test -f $ac_dir/$ac_word; then
6875 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6876 break
6878 done
6879 IFS="$ac_save_ifs"
6880 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6882 esac
6884 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6885 if test -n "$PKG_CONFIG"; then
6886 echo "$ac_t""$PKG_CONFIG" 1>&6
6887 else
6888 echo "$ac_t""no" 1>&6
6892 no_glib=""
6894 if test x$PKG_CONFIG != xno ; then
6895 if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
6897 else
6898 echo *** pkg-config too old; version 0.7 or better required.
6899 no_glib=yes
6900 PKG_CONFIG=no
6902 else
6903 no_glib=yes
6906 min_glib_version=2.2.0
6907 echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6
6908 echo "configure:6909: checking for GLIB - version >= $min_glib_version" >&5
6910 if test x$PKG_CONFIG != xno ; then
6911 ## don't try to run the test against uninstalled libtool libs
6912 if $PKG_CONFIG --uninstalled $pkg_config_args; then
6913 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
6914 enable_glibtest=no
6917 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
6919 else
6920 no_glib=yes
6924 if test x"$no_glib" = x ; then
6925 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
6926 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
6927 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
6929 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
6930 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
6931 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
6932 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
6933 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
6934 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
6935 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
6936 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
6937 if test "x$enable_glibtest" = "xyes" ; then
6938 ac_save_CFLAGS="$CFLAGS"
6939 ac_save_LIBS="$LIBS"
6940 CFLAGS="$CFLAGS $GLIB_CFLAGS"
6941 LIBS="$GLIB_LIBS $LIBS"
6942 rm -f conf.glibtest
6943 if test "$cross_compiling" = yes; then
6944 echo $ac_n "cross compiling; assumed OK... $ac_c"
6945 else
6946 cat > conftest.$ac_ext <<EOF
6947 #line 6948 "configure"
6948 #include "confdefs.h"
6950 #include <glib.h>
6951 #include <stdio.h>
6952 #include <stdlib.h>
6954 int
6955 main ()
6957 int major, minor, micro;
6958 char *tmp_version;
6960 system ("touch conf.glibtest");
6962 /* HP/UX 9 (%@#!) writes to sscanf strings */
6963 tmp_version = g_strdup("$min_glib_version");
6964 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
6965 printf("%s, bad version string\n", "$min_glib_version");
6966 exit(1);
6969 if ((glib_major_version != $glib_config_major_version) ||
6970 (glib_minor_version != $glib_config_minor_version) ||
6971 (glib_micro_version != $glib_config_micro_version))
6973 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
6974 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
6975 glib_major_version, glib_minor_version, glib_micro_version);
6976 printf ("*** was found! If pkg-config was correct, then it is best\n");
6977 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
6978 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
6979 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
6980 printf("*** required on your system.\n");
6981 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
6982 printf("*** to point to the correct configuration files\n");
6984 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
6985 (glib_minor_version != GLIB_MINOR_VERSION) ||
6986 (glib_micro_version != GLIB_MICRO_VERSION))
6988 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
6989 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
6990 printf("*** library (version %d.%d.%d)\n",
6991 glib_major_version, glib_minor_version, glib_micro_version);
6993 else
6995 if ((glib_major_version > major) ||
6996 ((glib_major_version == major) && (glib_minor_version > minor)) ||
6997 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
6999 return 0;
7001 else
7003 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
7004 glib_major_version, glib_minor_version, glib_micro_version);
7005 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
7006 major, minor, micro);
7007 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
7008 printf("***\n");
7009 printf("*** If you have already installed a sufficiently new version, this error\n");
7010 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
7011 printf("*** being found. The easiest way to fix this is to remove the old version\n");
7012 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
7013 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
7014 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
7015 printf("*** so that the correct libraries are found at run-time))\n");
7018 return 1;
7022 if { (eval echo configure:7023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7023 then
7025 else
7026 echo "configure: failed program was:" >&5
7027 cat conftest.$ac_ext >&5
7028 rm -fr conftest*
7029 no_glib=yes
7031 rm -fr conftest*
7034 CFLAGS="$ac_save_CFLAGS"
7035 LIBS="$ac_save_LIBS"
7038 if test "x$no_glib" = x ; then
7039 echo "$ac_t""yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" 1>&6
7041 else
7042 echo "$ac_t""no" 1>&6
7043 if test "$PKG_CONFIG" = "no" ; then
7044 echo "*** A new enough version of pkg-config was not found."
7045 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
7046 else
7047 if test -f conf.glibtest ; then
7049 else
7050 echo "*** Could not run GLIB test program, checking why..."
7051 ac_save_CFLAGS="$CFLAGS"
7052 ac_save_LIBS="$LIBS"
7053 CFLAGS="$CFLAGS $GLIB_CFLAGS"
7054 LIBS="$LIBS $GLIB_LIBS"
7055 cat > conftest.$ac_ext <<EOF
7056 #line 7057 "configure"
7057 #include "confdefs.h"
7059 #include <glib.h>
7060 #include <stdio.h>
7062 int main() {
7063 return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
7064 ; return 0; }
7066 if { (eval echo configure:7067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7067 rm -rf conftest*
7068 echo "*** The test program compiled, but did not run. This usually means"
7069 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
7070 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
7071 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7072 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7073 echo "*** is required on your system"
7074 echo "***"
7075 echo "*** If you have an old version installed, it is best to remove it, although"
7076 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
7077 else
7078 echo "configure: failed program was:" >&5
7079 cat conftest.$ac_ext >&5
7080 rm -rf conftest*
7081 echo "*** The test program failed to compile or link. See the file config.log for the"
7082 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."
7084 rm -f conftest*
7085 CFLAGS="$ac_save_CFLAGS"
7086 LIBS="$ac_save_LIBS"
7089 GLIB_CFLAGS=""
7090 GLIB_LIBS=""
7091 GLIB_GENMARSHAL=""
7092 GOBJECT_QUERY=""
7093 GLIB_MKENUMS=""
7094 exit 1
7101 rm -f conf.glibtest
7103 enable_libarttest=no
7104 # Check whether --with-libart-prefix or --without-libart-prefix was given.
7105 if test "${with_libart_prefix+set}" = set; then
7106 withval="$with_libart_prefix"
7107 libart_prefix="$withval"
7108 else
7109 libart_prefix=""
7112 # Check whether --with-libart-exec-prefix or --without-libart-exec-prefix was given.
7113 if test "${with_libart_exec_prefix+set}" = set; then
7114 withval="$with_libart_exec_prefix"
7115 libart_exec_prefix="$withval"
7116 else
7117 libart_exec_prefix=""
7120 # Check whether --enable-libarttest or --disable-libarttest was given.
7121 if test "${enable_libarttest+set}" = set; then
7122 enableval="$enable_libarttest"
7124 else
7125 enable_libarttest=yes
7129 if test x$libart_exec_prefix != x ; then
7130 libart_args="$libart_args --exec-prefix=$libart_exec_prefix"
7131 if test x${LIBART_CONFIG+set} != xset ; then
7132 LIBART_CONFIG=$libart_exec_prefix/bin/libart-config
7135 if test x$libart_prefix != x ; then
7136 libart_args="$libart_args --prefix=$libart_prefix"
7137 if test x${LIBART_CONFIG+set} != xset ; then
7138 LIBART_CONFIG=$libart_prefix/bin/libart-config
7142 # Extract the first word of "libart2-config", so it can be a program name with args.
7143 set dummy libart2-config; ac_word=$2
7144 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7145 echo "configure:7146: checking for $ac_word" >&5
7146 if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then
7147 echo $ac_n "(cached) $ac_c" 1>&6
7148 else
7149 case "$LIBART_CONFIG" in
7151 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path.
7153 ?:/*)
7154 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path.
7157 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7158 ac_dummy="$PATH"
7159 for ac_dir in $ac_dummy; do
7160 test -z "$ac_dir" && ac_dir=.
7161 if test -f $ac_dir/$ac_word; then
7162 ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word"
7163 break
7165 done
7166 IFS="$ac_save_ifs"
7167 test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no"
7169 esac
7171 LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG"
7172 if test -n "$LIBART_CONFIG"; then
7173 echo "$ac_t""$LIBART_CONFIG" 1>&6
7174 else
7175 echo "$ac_t""no" 1>&6
7178 if test "$LIBART_CONFIG" = "no" ; then
7179 # Extract the first word of "libart-config", so it can be a program name with args.
7180 set dummy libart-config; ac_word=$2
7181 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7182 echo "configure:7183: checking for $ac_word" >&5
7183 if eval "test \"`echo '$''{'ac_cv_path_LIBART_CONFIG'+set}'`\" = set"; then
7184 echo $ac_n "(cached) $ac_c" 1>&6
7185 else
7186 case "$LIBART_CONFIG" in
7188 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a path.
7190 ?:/*)
7191 ac_cv_path_LIBART_CONFIG="$LIBART_CONFIG" # Let the user override the test with a dos path.
7194 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7195 ac_dummy="$PATH"
7196 for ac_dir in $ac_dummy; do
7197 test -z "$ac_dir" && ac_dir=.
7198 if test -f $ac_dir/$ac_word; then
7199 ac_cv_path_LIBART_CONFIG="$ac_dir/$ac_word"
7200 break
7202 done
7203 IFS="$ac_save_ifs"
7204 test -z "$ac_cv_path_LIBART_CONFIG" && ac_cv_path_LIBART_CONFIG="no"
7206 esac
7208 LIBART_CONFIG="$ac_cv_path_LIBART_CONFIG"
7209 if test -n "$LIBART_CONFIG"; then
7210 echo "$ac_t""$LIBART_CONFIG" 1>&6
7211 else
7212 echo "$ac_t""no" 1>&6
7216 min_libart_version=2.1.0
7217 echo $ac_n "checking for LIBART - version >= $min_libart_version""... $ac_c" 1>&6
7218 echo "configure:7219: checking for LIBART - version >= $min_libart_version" >&5
7219 no_libart=""
7220 if test "$LIBART_CONFIG" = "no" ; then
7221 no_libart=yes
7222 else
7223 LIBART_CFLAGS=`$LIBART_CONFIG $libartconf_args --cflags`
7224 LIBART_LIBS=`$LIBART_CONFIG $libartconf_args --libs`
7226 libart_major_version=`$LIBART_CONFIG $libart_args --version | \
7227 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
7228 libart_minor_version=`$LIBART_CONFIG $libart_args --version | \
7229 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
7230 libart_micro_version=`$LIBART_CONFIG $libart_config_args --version | \
7231 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
7232 if test "x$enable_libarttest" = "xyes" ; then
7233 ac_save_CFLAGS="$CFLAGS"
7234 ac_save_LIBS="$LIBS"
7235 CFLAGS="$CFLAGS $LIBART_CFLAGS"
7236 LIBS="$LIBS $LIBART_LIBS"
7237 rm -f conf.libarttest
7238 if test "$cross_compiling" = yes; then
7239 echo $ac_n "cross compiling; assumed OK... $ac_c"
7240 else
7241 cat > conftest.$ac_ext <<EOF
7242 #line 7243 "configure"
7243 #include "confdefs.h"
7245 #include <stdio.h>
7246 #include <stdlib.h>
7247 #include <string.h>
7248 #include <libart_lgpl/libart.h>
7250 char*
7251 my_strdup (char *str)
7253 char *new_str;
7255 if (str)
7257 new_str = malloc ((strlen (str) + 1) * sizeof(char));
7258 strcpy (new_str, str);
7260 else
7261 new_str = NULL;
7263 return new_str;
7266 int main ()
7268 int major, minor, micro;
7269 char *tmp_version;
7271 system ("touch conf.libarttest");
7273 /* HP/UX 9 (%@#!) writes to sscanf strings */
7274 tmp_version = my_strdup("$min_libart_version");
7275 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
7276 printf("%s, bad version string\n", "$min_libart_version");
7277 exit(1);
7280 if (($libart_major_version > major) ||
7281 (($libart_major_version == major) && ($libart_minor_version > minor)) ||
7282 (($libart_major_version == major) && ($libart_minor_version == minor) && ($libart_micro_version >= micro)))
7284 return 0;
7286 else
7288 printf("\n*** 'libart-config --version' returned %d.%d.%d, but the minimum version\n", $libart_major_version, $libart_minor_version, $libart_micro_version);
7289 printf("*** of LIBART required is %d.%d.%d. If libart-config is correct, then it is\n", major, minor, micro);
7290 printf("*** best to upgrade to the required version.\n");
7291 printf("*** If libart-config was wrong, set the environment variable LIBART_CONFIG\n");
7292 printf("*** to point to the correct copy of libart-config, and remove the file\n");
7293 printf("*** config.cache before re-running configure\n");
7294 return 1;
7300 if { (eval echo configure:7301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7301 then
7303 else
7304 echo "configure: failed program was:" >&5
7305 cat conftest.$ac_ext >&5
7306 rm -fr conftest*
7307 no_libart=yes
7309 rm -fr conftest*
7312 CFLAGS="$ac_save_CFLAGS"
7313 LIBS="$ac_save_LIBS"
7316 if test "x$no_libart" = x ; then
7317 echo "$ac_t""yes" 1>&6
7319 else
7320 echo "$ac_t""no" 1>&6
7321 if test "$LIBART_CONFIG" = "no" ; then
7322 echo "*** The libart-config script installed by LIBART could not be found"
7323 echo "*** If LIBART was installed in PREFIX, make sure PREFIX/bin is in"
7324 echo "*** your path, or set the LIBART_CONFIG environment variable to the"
7325 echo "*** full path to libart-config."
7326 else
7327 if test -f conf.libarttest ; then
7329 else
7330 echo "*** Could not run LIBART test program, checking why..."
7331 CFLAGS="$CFLAGS $LIBART_CFLAGS"
7332 LIBS="$LIBS $LIBART_LIBS"
7333 cat > conftest.$ac_ext <<EOF
7334 #line 7335 "configure"
7335 #include "confdefs.h"
7337 #include <stdio.h>
7338 #include <libart_lgpl/libart.h>
7340 int main() {
7341 return 0;
7342 ; return 0; }
7344 if { (eval echo configure:7345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7345 rm -rf conftest*
7346 echo "*** The test program compiled, but did not run. This usually means"
7347 echo "*** that the run-time linker is not finding LIBART or finding the wrong"
7348 echo "*** version of LIBART. If it is not finding LIBART, you'll need to set your"
7349 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
7350 echo "*** to the installed location Also, make sure you have run ldconfig if that"
7351 echo "*** is required on your system"
7352 echo "***"
7353 echo "*** If you have an old version installed, it is best to remove it, although"
7354 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
7355 else
7356 echo "configure: failed program was:" >&5
7357 cat conftest.$ac_ext >&5
7358 rm -rf conftest*
7359 echo "*** The test program failed to compile or link. See the file config.log for the"
7360 echo "*** exact error that occured. This usually means LIBART was incorrectly installed"
7361 echo "*** or that you have moved LIBART since it was installed. In the latter case, you"
7362 echo "*** may want to edit the libart-config script: $LIBART_CONFIG"
7364 rm -f conftest*
7365 CFLAGS="$ac_save_CFLAGS"
7366 LIBS="$ac_save_LIBS"
7369 LIBART_CFLAGS=""
7370 LIBART_LIBS=""
7371 exit 1
7375 rm -f conf.libarttest
7379 # On Solaris, and maybe other architectures, the Boehm collector
7380 # requires -ldl.
7381 if test "$GC" = boehm; then
7382 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
7383 echo "configure:7384: checking for main in -ldl" >&5
7384 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
7385 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7386 echo $ac_n "(cached) $ac_c" 1>&6
7387 else
7388 ac_save_LIBS="$LIBS"
7389 LIBS="-ldl $LIBS"
7390 cat > conftest.$ac_ext <<EOF
7391 #line 7392 "configure"
7392 #include "confdefs.h"
7394 int main() {
7395 main()
7396 ; return 0; }
7398 if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7399 rm -rf conftest*
7400 eval "ac_cv_lib_$ac_lib_var=yes"
7401 else
7402 echo "configure: failed program was:" >&5
7403 cat conftest.$ac_ext >&5
7404 rm -rf conftest*
7405 eval "ac_cv_lib_$ac_lib_var=no"
7407 rm -f conftest*
7408 LIBS="$ac_save_LIBS"
7411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7412 echo "$ac_t""yes" 1>&6
7413 SYSTEMSPEC="$SYSTEMSPEC -ldl"
7414 else
7415 echo "$ac_t""no" 1>&6
7421 if test -z "${with_multisubdir}"; then
7422 builddotdot=.
7423 else
7425 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
7429 # Which gcj do we use?
7430 which_gcj=default
7431 built_gcc_dir="`cd ${builddotdot}/../../gcc && ${PWDCMD-pwd}`"
7432 if test -n "${with_cross_host}"; then
7433 # We are being configured with a cross compiler. We can't
7434 # use ac_exeext, because that is for the target platform.
7435 NATIVE=no
7436 cross_host_exeext=
7437 case "${with_cross_host}" in
7438 *mingw* | *cygwin*)
7439 cross_host_exeext=.exe
7441 esac
7442 if test -x "${built_gcc_dir}/gcj${cross_host_exeext}"; then
7443 if test x"$build_alias" = x"$with_cross_host"; then
7444 # Ordinary cross (host!=target and host=build)
7445 which_gcj=built
7446 else
7447 # Canadian cross (host!=target and host!=build)
7448 which_gcj=cross
7450 else
7451 which_gcj=cross
7453 else
7454 # We are being configured with a native or crossed-native compiler
7455 if test -x "${built_gcc_dir}/gcj${ac_exeext}"; then
7456 if test x"$build" = x"$host"; then
7457 # True native build (host=target and host=build)
7458 which_gcj=built
7459 else
7460 # Crossed-native build (host=target and host!=build)
7461 which_gcj=cross
7463 else
7464 which_gcj=path
7467 case "${which_gcj}" in
7468 built)
7469 GCJ="$built_gcc_dir/gcj -B`${PWDCMD-pwd}`/ -B$built_gcc_dir/"
7471 cross)
7472 # See the comment in Makefile.am about CANADIAN being a misnomer
7473 CANADIAN=yes
7474 NULL_TARGET=no
7475 if test "x${with_newlib}" = "xyes"; then
7476 # FIXME (comment): Why is this needed?
7477 GCC_UNWIND_INCLUDE=
7478 GCJ="${target_alias}-gcj"
7479 else
7480 GCJ="${target_alias}-gcj -B`${PWDCMD-pwd}`/"
7483 path)
7484 # See the comment in Makefile.am about CANADIAN being a misnomer
7485 CANADIAN=yes
7486 NULL_TARGET=yes
7487 GCJ="gcj -B`${PWDCMD-pwd}`/"
7489 esac
7491 # Create it, so that compile/link tests don't fail
7492 test -f libgcj.spec || touch libgcj.spec
7494 # We must search the source tree for java.lang, since we still don't
7495 # have libgcj.jar nor java/lang/*.class
7496 GCJ_SAVE_CPPFLAGS=$CPPFLAGS
7497 CPPFLAGS="$CPPFLAGS -I`${PWDCMD-pwd}` -I`cd $srcdir && ${PWDCMD-pwd}`"
7499 # Since some classes depend on this one, we need its source available
7500 # before we can do any GCJ compilation test :-(
7501 if test ! -f gnu/classpath/Configuration.java; then
7502 test -d gnu || mkdir gnu
7503 test -d gnu/classpath || mkdir gnu/classpath
7504 sed -e 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
7505 -e 's,@TOOLKIT@,$TOOLKIT,' \
7506 < $srcdir/gnu/classpath/Configuration.java.in \
7507 > gnu/classpath/Configuration.java
7508 # We do not want to redirect the output of the grep below to /dev/null,
7509 # but we add /dev/null to the input list so that grep will print the
7510 # filename of Configuration.java in case it finds any matches.
7511 if grep @ gnu/classpath/Configuration.java /dev/null; then
7512 { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
7516 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
7517 set dummy ${ac_tool_prefix}gcj; ac_word=$2
7518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7519 echo "configure:7520: checking for $ac_word" >&5
7520 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
7521 echo $ac_n "(cached) $ac_c" 1>&6
7522 else
7523 if test -n "$GCJ"; then
7524 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
7525 else
7526 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7527 ac_dummy="$PATH"
7528 for ac_dir in $ac_dummy; do
7529 test -z "$ac_dir" && ac_dir=.
7530 if test -f $ac_dir/$ac_word; then
7531 ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
7532 break
7534 done
7535 IFS="$ac_save_ifs"
7538 GCJ="$ac_cv_prog_GCJ"
7539 if test -n "$GCJ"; then
7540 echo "$ac_t""$GCJ" 1>&6
7541 else
7542 echo "$ac_t""no" 1>&6
7546 if test -z "$ac_cv_prog_GCJ"; then
7547 if test -n "$ac_tool_prefix"; then
7548 # Extract the first word of "gcj", so it can be a program name with args.
7549 set dummy gcj; ac_word=$2
7550 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7551 echo "configure:7552: checking for $ac_word" >&5
7552 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
7553 echo $ac_n "(cached) $ac_c" 1>&6
7554 else
7555 if test -n "$GCJ"; then
7556 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
7557 else
7558 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7559 ac_dummy="$PATH"
7560 for ac_dir in $ac_dummy; do
7561 test -z "$ac_dir" && ac_dir=.
7562 if test -f $ac_dir/$ac_word; then
7563 ac_cv_prog_GCJ="gcj"
7564 break
7566 done
7567 IFS="$ac_save_ifs"
7568 test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
7571 GCJ="$ac_cv_prog_GCJ"
7572 if test -n "$GCJ"; then
7573 echo "$ac_t""$GCJ" 1>&6
7574 else
7575 echo "$ac_t""no" 1>&6
7578 else
7579 GCJ="no"
7583 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7587 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
7588 lt_save_CC="$CC"
7589 lt_save_CFLAGS="$CFLAGS"
7590 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
7591 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
7592 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
7593 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
7594 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
7595 deplibs_check_method="$deplibs_check_method" \
7596 file_magic_cmd="$file_magic_cmd" \
7597 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
7598 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
7599 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
7600 CC="$lt_save_CC"
7601 CFLAGS="$lt_save_CFLAGS"
7603 # Redirect the config.log output again, so that the ltconfig log is not
7604 # clobbered by the next message.
7605 exec 5>>./config.log
7610 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
7612 echo $ac_n "checking size of void *""... $ac_c" 1>&6
7613 echo "configure:7614: checking size of void *" >&5
7614 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
7615 echo $ac_n "(cached) $ac_c" 1>&6
7616 else
7617 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
7618 cat > conftest.$ac_ext <<EOF
7619 #line 7620 "configure"
7620 #include "confdefs.h"
7621 #include "confdefs.h"
7622 #include <sys/types.h>
7625 int main() {
7626 switch (0) case 0: case (sizeof (void *) == $ac_size):;
7627 ; return 0; }
7629 if { (eval echo configure:7630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7630 rm -rf conftest*
7631 ac_cv_sizeof_void_p=$ac_size
7632 else
7633 echo "configure: failed program was:" >&5
7634 cat conftest.$ac_ext >&5
7636 rm -f conftest*
7637 if test x$ac_cv_sizeof_void_p != x ; then break; fi
7638 done
7642 if test x$ac_cv_sizeof_void_p = x ; then
7643 { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
7645 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
7646 cat >> confdefs.h <<EOF
7647 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
7652 ZLIBS=
7653 SYS_ZLIBS=
7654 ZINCS=
7656 if test -z "$ZLIBSPEC"; then
7657 # Use zlib from the GCC tree.
7658 ZINCS='-I$(top_srcdir)/../zlib'
7659 ZLIBS=../zlib/libzgcj_convenience.la
7660 else
7661 # System's zlib.
7662 SYS_ZLIBS="$ZLIBSPEC"
7674 if test "$CANADIAN" = yes; then
7675 CANADIAN_TRUE=
7676 CANADIAN_FALSE='#'
7677 else
7678 CANADIAN_TRUE='#'
7679 CANADIAN_FALSE=
7683 if test "$NULL_TARGET" = yes; then
7684 NULL_TARGET_TRUE=
7685 NULL_TARGET_FALSE='#'
7686 else
7687 NULL_TARGET_TRUE='#'
7688 NULL_TARGET_FALSE=
7692 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
7693 NATIVE_TRUE=
7694 NATIVE_FALSE='#'
7695 else
7696 NATIVE_TRUE='#'
7697 NATIVE_FALSE=
7701 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
7702 NEEDS_DATA_START_TRUE=
7703 NEEDS_DATA_START_FALSE='#'
7704 else
7705 NEEDS_DATA_START_TRUE='#'
7706 NEEDS_DATA_START_FALSE=
7710 if test -n "$with_cross_host" &&
7711 test x"$with_cross_host" != x"no"; then
7712 toolexecdir='$(exec_prefix)/$(target_alias)'
7713 toolexecmainlibdir='$(toolexecdir)/lib'
7714 else
7715 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
7716 toolexecmainlibdir='$(libdir)'
7718 multi_os_directory=`$CC -print-multi-os-directory`
7719 case $multi_os_directory in
7720 .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /.
7721 *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;;
7722 esac
7727 # Determine gcj version number.
7729 gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
7731 GCJVERSION=$gcjversion
7733 cat >> confdefs.h <<EOF
7734 #define GCJVERSION "$GCJVERSION"
7738 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
7740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7742 echo "configure:7743: checking for $ac_hdr" >&5
7743 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7744 echo $ac_n "(cached) $ac_c" 1>&6
7745 else
7746 cat > conftest.$ac_ext <<EOF
7747 #line 7748 "configure"
7748 #include "confdefs.h"
7749 #include <$ac_hdr>
7751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7752 { (eval echo configure:7753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7754 if test -z "$ac_err"; then
7755 rm -rf conftest*
7756 eval "ac_cv_header_$ac_safe=yes"
7757 else
7758 echo "$ac_err" >&5
7759 echo "configure: failed program was:" >&5
7760 cat conftest.$ac_ext >&5
7761 rm -rf conftest*
7762 eval "ac_cv_header_$ac_safe=no"
7764 rm -f conftest*
7766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7767 echo "$ac_t""yes" 1>&6
7768 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7769 cat >> confdefs.h <<EOF
7770 #define $ac_tr_hdr 1
7773 else
7774 echo "$ac_t""no" 1>&6
7776 done
7778 for ac_hdr in dirent.h
7780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7782 echo "configure:7783: checking for $ac_hdr" >&5
7783 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7784 echo $ac_n "(cached) $ac_c" 1>&6
7785 else
7786 cat > conftest.$ac_ext <<EOF
7787 #line 7788 "configure"
7788 #include "confdefs.h"
7789 #include <$ac_hdr>
7791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7792 { (eval echo configure:7793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7794 if test -z "$ac_err"; then
7795 rm -rf conftest*
7796 eval "ac_cv_header_$ac_safe=yes"
7797 else
7798 echo "$ac_err" >&5
7799 echo "configure: failed program was:" >&5
7800 cat conftest.$ac_ext >&5
7801 rm -rf conftest*
7802 eval "ac_cv_header_$ac_safe=no"
7804 rm -f conftest*
7806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7807 echo "$ac_t""yes" 1>&6
7808 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7809 cat >> confdefs.h <<EOF
7810 #define $ac_tr_hdr 1
7813 else
7814 echo "$ac_t""no" 1>&6
7816 done
7818 for ac_hdr in inttypes.h
7820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7822 echo "configure:7823: checking for $ac_hdr" >&5
7823 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7824 echo $ac_n "(cached) $ac_c" 1>&6
7825 else
7826 cat > conftest.$ac_ext <<EOF
7827 #line 7828 "configure"
7828 #include "confdefs.h"
7829 #include <$ac_hdr>
7831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7832 { (eval echo configure:7833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7834 if test -z "$ac_err"; then
7835 rm -rf conftest*
7836 eval "ac_cv_header_$ac_safe=yes"
7837 else
7838 echo "$ac_err" >&5
7839 echo "configure: failed program was:" >&5
7840 cat conftest.$ac_ext >&5
7841 rm -rf conftest*
7842 eval "ac_cv_header_$ac_safe=no"
7844 rm -f conftest*
7846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7847 echo "$ac_t""yes" 1>&6
7848 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7849 cat >> confdefs.h <<EOF
7850 #define $ac_tr_hdr 1
7853 cat >> confdefs.h <<\EOF
7854 #define HAVE_INTTYPES_H 1
7857 cat >> confdefs.h <<\EOF
7858 #define JV_HAVE_INTTYPES_H 1
7862 else
7863 echo "$ac_t""no" 1>&6
7865 done
7867 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
7868 echo "configure:7869: checking for sys/wait.h that is POSIX.1 compatible" >&5
7869 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
7870 echo $ac_n "(cached) $ac_c" 1>&6
7871 else
7872 cat > conftest.$ac_ext <<EOF
7873 #line 7874 "configure"
7874 #include "confdefs.h"
7875 #include <sys/types.h>
7876 #include <sys/wait.h>
7877 #ifndef WEXITSTATUS
7878 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7879 #endif
7880 #ifndef WIFEXITED
7881 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7882 #endif
7883 int main() {
7884 int s;
7885 wait (&s);
7886 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7887 ; return 0; }
7889 if { (eval echo configure:7890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7890 rm -rf conftest*
7891 ac_cv_header_sys_wait_h=yes
7892 else
7893 echo "configure: failed program was:" >&5
7894 cat conftest.$ac_ext >&5
7895 rm -rf conftest*
7896 ac_cv_header_sys_wait_h=no
7898 rm -f conftest*
7901 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
7902 if test $ac_cv_header_sys_wait_h = yes; then
7903 cat >> confdefs.h <<\EOF
7904 #define HAVE_SYS_WAIT_H 1
7910 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7911 echo "configure:7912: checking for ANSI C header files" >&5
7912 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
7913 echo $ac_n "(cached) $ac_c" 1>&6
7914 else
7915 cat > conftest.$ac_ext <<EOF
7916 #line 7917 "configure"
7917 #include "confdefs.h"
7918 #include <stdlib.h>
7919 #include <stdarg.h>
7920 #include <string.h>
7921 #include <float.h>
7923 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7924 { (eval echo configure:7925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7925 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7926 if test -z "$ac_err"; then
7927 rm -rf conftest*
7928 ac_cv_header_stdc=yes
7929 else
7930 echo "$ac_err" >&5
7931 echo "configure: failed program was:" >&5
7932 cat conftest.$ac_ext >&5
7933 rm -rf conftest*
7934 ac_cv_header_stdc=no
7936 rm -f conftest*
7938 if test $ac_cv_header_stdc = yes; then
7939 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7940 cat > conftest.$ac_ext <<EOF
7941 #line 7942 "configure"
7942 #include "confdefs.h"
7943 #include <string.h>
7945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7946 egrep "memchr" >/dev/null 2>&1; then
7948 else
7949 rm -rf conftest*
7950 ac_cv_header_stdc=no
7952 rm -f conftest*
7956 if test $ac_cv_header_stdc = yes; then
7957 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7958 cat > conftest.$ac_ext <<EOF
7959 #line 7960 "configure"
7960 #include "confdefs.h"
7961 #include <stdlib.h>
7963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7964 egrep "free" >/dev/null 2>&1; then
7966 else
7967 rm -rf conftest*
7968 ac_cv_header_stdc=no
7970 rm -f conftest*
7974 if test $ac_cv_header_stdc = yes; then
7975 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7976 if test "$cross_compiling" = yes; then
7978 else
7979 cat > conftest.$ac_ext <<EOF
7980 #line 7981 "configure"
7981 #include "confdefs.h"
7982 #include <ctype.h>
7983 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7984 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7985 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7986 int main () { int i; for (i = 0; i < 256; i++)
7987 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
7988 exit (0); }
7991 if { (eval echo configure:7992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7992 then
7994 else
7995 echo "configure: failed program was:" >&5
7996 cat conftest.$ac_ext >&5
7997 rm -fr conftest*
7998 ac_cv_header_stdc=no
8000 rm -fr conftest*
8006 echo "$ac_t""$ac_cv_header_stdc" 1>&6
8007 if test $ac_cv_header_stdc = yes; then
8008 cat >> confdefs.h <<\EOF
8009 #define STDC_HEADERS 1
8014 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
8015 echo "configure:8016: checking for ssize_t" >&5
8016 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
8017 echo $ac_n "(cached) $ac_c" 1>&6
8018 else
8019 cat > conftest.$ac_ext <<EOF
8020 #line 8021 "configure"
8021 #include "confdefs.h"
8022 #include <sys/types.h>
8023 #if STDC_HEADERS
8024 #include <stdlib.h>
8025 #include <stddef.h>
8026 #endif
8028 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8029 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8030 rm -rf conftest*
8031 ac_cv_type_ssize_t=yes
8032 else
8033 rm -rf conftest*
8034 ac_cv_type_ssize_t=no
8036 rm -f conftest*
8039 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
8040 if test $ac_cv_type_ssize_t = no; then
8041 cat >> confdefs.h <<\EOF
8042 #define ssize_t int
8048 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
8049 echo "configure:8050: checking for in_addr_t" >&5
8050 cat > conftest.$ac_ext <<EOF
8051 #line 8052 "configure"
8052 #include "confdefs.h"
8053 #include <sys/types.h>
8054 #if STDC_HEADERS
8055 #include <stdlib.h>
8056 #include <stddef.h>
8057 #endif
8058 #if HAVE_NETINET_IN_H
8059 #include <netinet/in.h>
8060 #endif
8061 int main() {
8062 in_addr_t foo;
8063 ; return 0; }
8065 if { (eval echo configure:8066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8066 rm -rf conftest*
8067 cat >> confdefs.h <<\EOF
8068 #define HAVE_IN_ADDR_T 1
8071 echo "$ac_t""yes" 1>&6
8072 else
8073 echo "configure: failed program was:" >&5
8074 cat conftest.$ac_ext >&5
8075 rm -rf conftest*
8076 echo "$ac_t""no" 1>&6
8078 rm -f conftest*
8080 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
8081 echo "configure:8082: checking whether struct ip_mreq is in netinet/in.h" >&5
8082 cat > conftest.$ac_ext <<EOF
8083 #line 8084 "configure"
8084 #include "confdefs.h"
8085 #include <netinet/in.h>
8086 int main() {
8087 struct ip_mreq mreq;
8088 ; return 0; }
8090 if { (eval echo configure:8091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8091 rm -rf conftest*
8092 cat >> confdefs.h <<\EOF
8093 #define HAVE_STRUCT_IP_MREQ 1
8096 echo "$ac_t""yes" 1>&6
8097 else
8098 echo "configure: failed program was:" >&5
8099 cat conftest.$ac_ext >&5
8100 rm -rf conftest*
8101 echo "$ac_t""no" 1>&6
8103 rm -f conftest*
8105 echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
8106 echo "configure:8107: checking whether struct ipv6_mreq is in netinet/in.h" >&5
8107 cat > conftest.$ac_ext <<EOF
8108 #line 8109 "configure"
8109 #include "confdefs.h"
8110 #include <netinet/in.h>
8111 int main() {
8112 struct ipv6_mreq mreq6;
8113 ; return 0; }
8115 if { (eval echo configure:8116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8116 rm -rf conftest*
8117 cat >> confdefs.h <<\EOF
8118 #define HAVE_STRUCT_IPV6_MREQ 1
8121 echo "$ac_t""yes" 1>&6
8122 else
8123 echo "configure: failed program was:" >&5
8124 cat conftest.$ac_ext >&5
8125 rm -rf conftest*
8126 echo "$ac_t""no" 1>&6
8128 rm -f conftest*
8130 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
8131 echo "configure:8132: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
8132 cat > conftest.$ac_ext <<EOF
8133 #line 8134 "configure"
8134 #include "confdefs.h"
8135 #include <netinet/in.h>
8136 int main() {
8137 struct sockaddr_in6 addr6;
8138 ; return 0; }
8140 if { (eval echo configure:8141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8141 rm -rf conftest*
8142 cat >> confdefs.h <<\EOF
8143 #define HAVE_INET6 1
8146 echo "$ac_t""yes" 1>&6
8147 else
8148 echo "configure: failed program was:" >&5
8149 cat conftest.$ac_ext >&5
8150 rm -rf conftest*
8151 echo "$ac_t""no" 1>&6
8153 rm -f conftest*
8155 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
8156 echo "configure:8157: checking for socklen_t in sys/socket.h" >&5
8157 cat > conftest.$ac_ext <<EOF
8158 #line 8159 "configure"
8159 #include "confdefs.h"
8160 #define _POSIX_PII_SOCKET
8161 #include <sys/types.h>
8162 #include <sys/socket.h>
8163 int main() {
8164 socklen_t x = 5;
8165 ; return 0; }
8167 if { (eval echo configure:8168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8168 rm -rf conftest*
8169 cat >> confdefs.h <<\EOF
8170 #define HAVE_SOCKLEN_T 1
8173 echo "$ac_t""yes" 1>&6
8174 else
8175 echo "configure: failed program was:" >&5
8176 cat conftest.$ac_ext >&5
8177 rm -rf conftest*
8178 echo "$ac_t""no" 1>&6
8180 rm -f conftest*
8182 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
8183 echo "configure:8184: checking for tm_gmtoff in struct tm" >&5
8184 cat > conftest.$ac_ext <<EOF
8185 #line 8186 "configure"
8186 #include "confdefs.h"
8187 #include <time.h>
8188 int main() {
8189 struct tm tim; tim.tm_gmtoff = 0;
8190 ; return 0; }
8192 if { (eval echo configure:8193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8193 rm -rf conftest*
8194 cat >> confdefs.h <<\EOF
8195 #define STRUCT_TM_HAS_GMTOFF 1
8198 echo "$ac_t""yes" 1>&6
8199 else
8200 echo "configure: failed program was:" >&5
8201 cat conftest.$ac_ext >&5
8202 rm -rf conftest*
8203 echo "$ac_t""no" 1>&6
8204 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
8205 echo "configure:8206: checking for global timezone variable" >&5
8206 cat > conftest.$ac_ext <<EOF
8207 #line 8208 "configure"
8208 #include "confdefs.h"
8209 #include <time.h>
8210 int main() {
8211 void i(){long z2 = 2*timezone;}
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 HAVE_TIMEZONE 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 long z2 = _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_UNDERSCORE_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
8249 rm -f conftest*
8251 rm -f conftest*
8253 rm -f conftest*
8255 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8256 # for constant arguments. Useless!
8257 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8258 echo "configure:8259: checking for working alloca.h" >&5
8259 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
8260 echo $ac_n "(cached) $ac_c" 1>&6
8261 else
8262 cat > conftest.$ac_ext <<EOF
8263 #line 8264 "configure"
8264 #include "confdefs.h"
8265 #include <alloca.h>
8266 int main() {
8267 char *p = alloca(2 * sizeof(int));
8268 ; return 0; }
8270 if { (eval echo configure:8271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8271 rm -rf conftest*
8272 ac_cv_header_alloca_h=yes
8273 else
8274 echo "configure: failed program was:" >&5
8275 cat conftest.$ac_ext >&5
8276 rm -rf conftest*
8277 ac_cv_header_alloca_h=no
8279 rm -f conftest*
8282 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8283 if test $ac_cv_header_alloca_h = yes; then
8284 cat >> confdefs.h <<\EOF
8285 #define HAVE_ALLOCA_H 1
8290 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8291 echo "configure:8292: checking for alloca" >&5
8292 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
8293 echo $ac_n "(cached) $ac_c" 1>&6
8294 else
8295 cat > conftest.$ac_ext <<EOF
8296 #line 8297 "configure"
8297 #include "confdefs.h"
8299 #ifdef __GNUC__
8300 # define alloca __builtin_alloca
8301 #else
8302 # ifdef _MSC_VER
8303 # include <malloc.h>
8304 # define alloca _alloca
8305 # else
8306 # if HAVE_ALLOCA_H
8307 # include <alloca.h>
8308 # else
8309 # ifdef _AIX
8310 #pragma alloca
8311 # else
8312 # ifndef alloca /* predefined by HP cc +Olibcalls */
8313 char *alloca ();
8314 # endif
8315 # endif
8316 # endif
8317 # endif
8318 #endif
8320 int main() {
8321 char *p = (char *) alloca(1);
8322 ; return 0; }
8324 if { (eval echo configure:8325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8325 rm -rf conftest*
8326 ac_cv_func_alloca_works=yes
8327 else
8328 echo "configure: failed program was:" >&5
8329 cat conftest.$ac_ext >&5
8330 rm -rf conftest*
8331 ac_cv_func_alloca_works=no
8333 rm -f conftest*
8336 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8337 if test $ac_cv_func_alloca_works = yes; then
8338 cat >> confdefs.h <<\EOF
8339 #define HAVE_ALLOCA 1
8344 if test $ac_cv_func_alloca_works = no; then
8345 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8346 # that cause trouble. Some versions do not even contain alloca or
8347 # contain a buggy version. If you still want to use their alloca,
8348 # use ar to extract alloca.o from them instead of compiling alloca.c.
8349 ALLOCA=alloca.${ac_objext}
8350 cat >> confdefs.h <<\EOF
8351 #define C_ALLOCA 1
8355 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8356 echo "configure:8357: checking whether alloca needs Cray hooks" >&5
8357 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
8358 echo $ac_n "(cached) $ac_c" 1>&6
8359 else
8360 cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 #if defined(CRAY) && ! defined(CRAY2)
8364 webecray
8365 #else
8366 wenotbecray
8367 #endif
8370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8371 egrep "webecray" >/dev/null 2>&1; then
8372 rm -rf conftest*
8373 ac_cv_os_cray=yes
8374 else
8375 rm -rf conftest*
8376 ac_cv_os_cray=no
8378 rm -f conftest*
8382 echo "$ac_t""$ac_cv_os_cray" 1>&6
8383 if test $ac_cv_os_cray = yes; then
8384 for ac_func in _getb67 GETB67 getb67; do
8385 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8386 echo "configure:8387: checking for $ac_func" >&5
8387 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8388 echo $ac_n "(cached) $ac_c" 1>&6
8389 else
8390 cat > conftest.$ac_ext <<EOF
8391 #line 8392 "configure"
8392 #include "confdefs.h"
8393 /* System header to define __stub macros and hopefully few prototypes,
8394 which can conflict with char $ac_func(); below. */
8395 #include <assert.h>
8396 /* Override any gcc2 internal prototype to avoid an error. */
8397 /* We use char because int might match the return type of a gcc2
8398 builtin and then its argument prototype would still apply. */
8399 char $ac_func();
8401 int main() {
8403 /* The GNU C library defines this for functions which it implements
8404 to always fail with ENOSYS. Some functions are actually named
8405 something starting with __ and the normal name is an alias. */
8406 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8407 choke me
8408 #else
8409 $ac_func();
8410 #endif
8412 ; return 0; }
8414 if { (eval echo configure:8415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8415 rm -rf conftest*
8416 eval "ac_cv_func_$ac_func=yes"
8417 else
8418 echo "configure: failed program was:" >&5
8419 cat conftest.$ac_ext >&5
8420 rm -rf conftest*
8421 eval "ac_cv_func_$ac_func=no"
8423 rm -f conftest*
8426 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8427 echo "$ac_t""yes" 1>&6
8428 cat >> confdefs.h <<EOF
8429 #define CRAY_STACKSEG_END $ac_func
8432 break
8433 else
8434 echo "$ac_t""no" 1>&6
8437 done
8440 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
8441 echo "configure:8442: checking stack direction for C alloca" >&5
8442 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
8443 echo $ac_n "(cached) $ac_c" 1>&6
8444 else
8445 if test "$cross_compiling" = yes; then
8446 ac_cv_c_stack_direction=0
8447 else
8448 cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 find_stack_direction ()
8453 static char *addr = 0;
8454 auto char dummy;
8455 if (addr == 0)
8457 addr = &dummy;
8458 return find_stack_direction ();
8460 else
8461 return (&dummy > addr) ? 1 : -1;
8463 main ()
8465 exit (find_stack_direction() < 0);
8468 if { (eval echo configure:8469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8469 then
8470 ac_cv_c_stack_direction=1
8471 else
8472 echo "configure: failed program was:" >&5
8473 cat conftest.$ac_ext >&5
8474 rm -fr conftest*
8475 ac_cv_c_stack_direction=-1
8477 rm -fr conftest*
8482 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
8483 cat >> confdefs.h <<EOF
8484 #define STACK_DIRECTION $ac_cv_c_stack_direction
8489 for ac_hdr in unistd.h
8491 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8492 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8493 echo "configure:8494: checking for $ac_hdr" >&5
8494 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8495 echo $ac_n "(cached) $ac_c" 1>&6
8496 else
8497 cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 #include <$ac_hdr>
8502 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8503 { (eval echo configure:8504: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8504 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8505 if test -z "$ac_err"; then
8506 rm -rf conftest*
8507 eval "ac_cv_header_$ac_safe=yes"
8508 else
8509 echo "$ac_err" >&5
8510 echo "configure: failed program was:" >&5
8511 cat conftest.$ac_ext >&5
8512 rm -rf conftest*
8513 eval "ac_cv_header_$ac_safe=no"
8515 rm -f conftest*
8517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8518 echo "$ac_t""yes" 1>&6
8519 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8520 cat >> confdefs.h <<EOF
8521 #define $ac_tr_hdr 1
8524 else
8525 echo "$ac_t""no" 1>&6
8527 done
8529 for ac_func in getpagesize
8531 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8532 echo "configure:8533: checking for $ac_func" >&5
8533 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8534 echo $ac_n "(cached) $ac_c" 1>&6
8535 else
8536 cat > conftest.$ac_ext <<EOF
8537 #line 8538 "configure"
8538 #include "confdefs.h"
8539 /* System header to define __stub macros and hopefully few prototypes,
8540 which can conflict with char $ac_func(); below. */
8541 #include <assert.h>
8542 /* Override any gcc2 internal prototype to avoid an error. */
8543 /* We use char because int might match the return type of a gcc2
8544 builtin and then its argument prototype would still apply. */
8545 char $ac_func();
8547 int main() {
8549 /* The GNU C library defines this for functions which it implements
8550 to always fail with ENOSYS. Some functions are actually named
8551 something starting with __ and the normal name is an alias. */
8552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8553 choke me
8554 #else
8555 $ac_func();
8556 #endif
8558 ; return 0; }
8560 if { (eval echo configure:8561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8561 rm -rf conftest*
8562 eval "ac_cv_func_$ac_func=yes"
8563 else
8564 echo "configure: failed program was:" >&5
8565 cat conftest.$ac_ext >&5
8566 rm -rf conftest*
8567 eval "ac_cv_func_$ac_func=no"
8569 rm -f conftest*
8572 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8573 echo "$ac_t""yes" 1>&6
8574 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8575 cat >> confdefs.h <<EOF
8576 #define $ac_tr_func 1
8579 else
8580 echo "$ac_t""no" 1>&6
8582 done
8584 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
8585 echo "configure:8586: checking for working mmap" >&5
8586 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
8587 echo $ac_n "(cached) $ac_c" 1>&6
8588 else
8589 if test "$cross_compiling" = yes; then
8590 ac_cv_func_mmap_fixed_mapped=no
8591 else
8592 cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8596 /* Thanks to Mike Haertel and Jim Avera for this test.
8597 Here is a matrix of mmap possibilities:
8598 mmap private not fixed
8599 mmap private fixed at somewhere currently unmapped
8600 mmap private fixed at somewhere already mapped
8601 mmap shared not fixed
8602 mmap shared fixed at somewhere currently unmapped
8603 mmap shared fixed at somewhere already mapped
8604 For private mappings, we should verify that changes cannot be read()
8605 back from the file, nor mmap's back from the file at a different
8606 address. (There have been systems where private was not correctly
8607 implemented like the infamous i386 svr4.0, and systems where the
8608 VM page cache was not coherent with the filesystem buffer cache
8609 like early versions of FreeBSD and possibly contemporary NetBSD.)
8610 For shared mappings, we should conversely verify that changes get
8611 propogated back to all the places they're supposed to be.
8613 Grep wants private fixed already mapped.
8614 The main things grep needs to know about mmap are:
8615 * does it exist and is it safe to write into the mmap'd area
8616 * how to use it (BSD variants) */
8617 #include <sys/types.h>
8618 #include <fcntl.h>
8619 #include <sys/mman.h>
8621 /* This mess was copied from the GNU getpagesize.h. */
8622 #ifndef HAVE_GETPAGESIZE
8623 # ifdef HAVE_UNISTD_H
8624 # include <unistd.h>
8625 # endif
8627 /* Assume that all systems that can run configure have sys/param.h. */
8628 # ifndef HAVE_SYS_PARAM_H
8629 # define HAVE_SYS_PARAM_H 1
8630 # endif
8632 # ifdef _SC_PAGESIZE
8633 # define getpagesize() sysconf(_SC_PAGESIZE)
8634 # else /* no _SC_PAGESIZE */
8635 # ifdef HAVE_SYS_PARAM_H
8636 # include <sys/param.h>
8637 # ifdef EXEC_PAGESIZE
8638 # define getpagesize() EXEC_PAGESIZE
8639 # else /* no EXEC_PAGESIZE */
8640 # ifdef NBPG
8641 # define getpagesize() NBPG * CLSIZE
8642 # ifndef CLSIZE
8643 # define CLSIZE 1
8644 # endif /* no CLSIZE */
8645 # else /* no NBPG */
8646 # ifdef NBPC
8647 # define getpagesize() NBPC
8648 # else /* no NBPC */
8649 # ifdef PAGESIZE
8650 # define getpagesize() PAGESIZE
8651 # endif /* PAGESIZE */
8652 # endif /* no NBPC */
8653 # endif /* no NBPG */
8654 # endif /* no EXEC_PAGESIZE */
8655 # else /* no HAVE_SYS_PARAM_H */
8656 # define getpagesize() 8192 /* punt totally */
8657 # endif /* no HAVE_SYS_PARAM_H */
8658 # endif /* no _SC_PAGESIZE */
8660 #endif /* no HAVE_GETPAGESIZE */
8662 #ifdef __cplusplus
8663 extern "C" { void *malloc(unsigned); }
8664 #else
8665 char *malloc();
8666 #endif
8669 main()
8671 char *data, *data2, *data3;
8672 int i, pagesize;
8673 int fd;
8675 pagesize = getpagesize();
8678 * First, make a file with some known garbage in it.
8680 data = malloc(pagesize);
8681 if (!data)
8682 exit(1);
8683 for (i = 0; i < pagesize; ++i)
8684 *(data + i) = rand();
8685 umask(0);
8686 fd = creat("conftestmmap", 0600);
8687 if (fd < 0)
8688 exit(1);
8689 if (write(fd, data, pagesize) != pagesize)
8690 exit(1);
8691 close(fd);
8694 * Next, try to mmap the file at a fixed address which
8695 * already has something else allocated at it. If we can,
8696 * also make sure that we see the same garbage.
8698 fd = open("conftestmmap", O_RDWR);
8699 if (fd < 0)
8700 exit(1);
8701 data2 = malloc(2 * pagesize);
8702 if (!data2)
8703 exit(1);
8704 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
8705 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
8706 MAP_PRIVATE | MAP_FIXED, fd, 0L))
8707 exit(1);
8708 for (i = 0; i < pagesize; ++i)
8709 if (*(data + i) != *(data2 + i))
8710 exit(1);
8713 * Finally, make sure that changes to the mapped area
8714 * do not percolate back to the file as seen by read().
8715 * (This is a bug on some variants of i386 svr4.0.)
8717 for (i = 0; i < pagesize; ++i)
8718 *(data2 + i) = *(data2 + i) + 1;
8719 data3 = malloc(pagesize);
8720 if (!data3)
8721 exit(1);
8722 if (read(fd, data3, pagesize) != pagesize)
8723 exit(1);
8724 for (i = 0; i < pagesize; ++i)
8725 if (*(data + i) != *(data3 + i))
8726 exit(1);
8727 close(fd);
8728 unlink("conftestmmap");
8729 exit(0);
8733 if { (eval echo configure:8734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8734 then
8735 ac_cv_func_mmap_fixed_mapped=yes
8736 else
8737 echo "configure: failed program was:" >&5
8738 cat conftest.$ac_ext >&5
8739 rm -fr conftest*
8740 ac_cv_func_mmap_fixed_mapped=no
8742 rm -fr conftest*
8747 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
8748 if test $ac_cv_func_mmap_fixed_mapped = yes; then
8749 cat >> confdefs.h <<\EOF
8750 #define HAVE_MMAP 1
8756 for ac_prog in perl
8758 # Extract the first word of "$ac_prog", so it can be a program name with args.
8759 set dummy $ac_prog; ac_word=$2
8760 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8761 echo "configure:8762: checking for $ac_word" >&5
8762 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
8763 echo $ac_n "(cached) $ac_c" 1>&6
8764 else
8765 if test -n "$PERL"; then
8766 ac_cv_prog_PERL="$PERL" # Let the user override the test.
8767 else
8768 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8769 ac_dummy="$PATH"
8770 for ac_dir in $ac_dummy; do
8771 test -z "$ac_dir" && ac_dir=.
8772 if test -f $ac_dir/$ac_word; then
8773 ac_cv_prog_PERL="$ac_prog"
8774 break
8776 done
8777 IFS="$ac_save_ifs"
8780 PERL="$ac_cv_prog_PERL"
8781 if test -n "$PERL"; then
8782 echo "$ac_t""$PERL" 1>&6
8783 else
8784 echo "$ac_t""no" 1>&6
8787 test -n "$PERL" && break
8788 done
8789 test -n "$PERL" || PERL="false"
8792 SYSDEP_SOURCES=
8794 case "${host}" in
8795 i?86-*-linux*)
8796 SIGNAL_HANDLER=include/i386-signal.h
8798 sparc*-sun-solaris*)
8799 SIGNAL_HANDLER=include/sparc-signal.h
8801 # ia64-*)
8802 # SYSDEP_SOURCES=sysdep/ia64.c
8803 # test -d sysdep || mkdir sysdep
8804 # ;;
8805 ia64-*-linux*)
8806 SIGNAL_HANDLER=include/dwarf2-signal.h
8808 powerpc-*-linux*)
8809 SIGNAL_HANDLER=include/powerpc-signal.h
8811 alpha*-*-linux*)
8812 SIGNAL_HANDLER=include/dwarf2-signal.h
8814 s390*-*-linux*)
8815 SIGNAL_HANDLER=include/s390-signal.h
8817 x86_64*-*-linux*)
8818 SIGNAL_HANDLER=include/x86_64-signal.h
8820 sparc*-*-linux*)
8821 SIGNAL_HANDLER=include/dwarf2-signal.h
8823 sh-*-linux* | sh[34]*-*-linux*)
8824 SIGNAL_HANDLER=include/dwarf2-signal.h
8826 *mingw*)
8827 SIGNAL_HANDLER=include/win32-signal.h
8829 mips*-*-linux*)
8830 SIGNAL_HANDLER=include/mips-signal.h
8833 SIGNAL_HANDLER=include/default-signal.h
8835 esac
8837 # If we're using sjlj exceptions, forget what we just learned.
8838 if test "$enable_sjlj_exceptions" = yes; then
8839 SIGNAL_HANDLER=include/default-signal.h
8842 # Define here any compiler flags that you need in order to make backtrace() work.
8843 BACKTRACESPEC=
8844 case "${host}" in
8845 x86_64*-*-linux*)
8846 BACKTRACESPEC=-fno-omit-frame-pointer
8848 esac
8855 if test "${multilib}" = "yes"; then
8856 multilib_arg="--enable-multilib"
8857 else
8858 multilib_arg=
8863 here=`${PWDCMD-pwd}`
8866 # We get this from the environment.
8869 trap '' 1 2 15
8870 cat > confcache <<\EOF
8871 # This file is a shell script that caches the results of configure
8872 # tests run on this system so they can be shared between configure
8873 # scripts and configure runs. It is not useful on other systems.
8874 # If it contains results you don't want to keep, you may remove or edit it.
8876 # By default, configure uses ./config.cache as the cache file,
8877 # creating it if it does not exist already. You can give configure
8878 # the --cache-file=FILE option to use a different cache file; that is
8879 # what configure does when it calls configure scripts in
8880 # subdirectories, so they share the cache.
8881 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8882 # config.status only pays attention to the cache file if you give it the
8883 # --recheck option to rerun configure.
8886 # The following way of writing the cache mishandles newlines in values,
8887 # but we know of no workaround that is simple, portable, and efficient.
8888 # So, don't put newlines in cache variables' values.
8889 # Ultrix sh set writes to stderr and can't be redirected directly,
8890 # and sets the high bit in the cache file unless we assign to the vars.
8891 (set) 2>&1 |
8892 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8893 *ac_space=\ *)
8894 # `set' does not quote correctly, so add quotes (double-quote substitution
8895 # turns \\\\ into \\, and sed turns \\ into \).
8896 sed -n \
8897 -e "s/'/'\\\\''/g" \
8898 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8901 # `set' quotes correctly as required by POSIX, so do not add quotes.
8902 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8904 esac >> confcache
8905 if cmp -s $cache_file confcache; then
8907 else
8908 if test -w $cache_file; then
8909 echo "updating cache $cache_file"
8910 cat confcache > $cache_file
8911 else
8912 echo "not updating unwritable cache $cache_file"
8915 rm -f confcache
8917 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8919 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8920 # Let make expand exec_prefix.
8921 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8923 # Any assignment to VPATH causes Sun make to only execute
8924 # the first set of double-colon rules, so remove it if not needed.
8925 # If there is a colon in the path, we need to keep it.
8926 if test "x$srcdir" = x.; then
8927 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8930 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8932 DEFS=-DHAVE_CONFIG_H
8934 # Without the "./", some shells look in PATH for config.status.
8935 : ${CONFIG_STATUS=./config.status}
8937 echo creating $CONFIG_STATUS
8938 rm -f $CONFIG_STATUS
8939 cat > $CONFIG_STATUS <<EOF
8940 #! /bin/sh
8941 # Generated automatically by configure.
8942 # Run this file to recreate the current configuration.
8943 # This directory was configured as follows,
8944 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8946 # $0 $ac_configure_args
8948 # Compiler output produced by configure, useful for debugging
8949 # configure, is in ./config.log if it exists.
8951 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8952 for ac_option
8954 case "\$ac_option" in
8955 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8956 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8957 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8958 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8959 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8960 exit 0 ;;
8961 -help | --help | --hel | --he | --h)
8962 echo "\$ac_cs_usage"; exit 0 ;;
8963 *) echo "\$ac_cs_usage"; exit 1 ;;
8964 esac
8965 done
8967 ac_given_srcdir=$srcdir
8968 ac_given_INSTALL="$INSTALL"
8970 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
8972 cat >> $CONFIG_STATUS <<EOF
8974 # Protect against being on the right side of a sed subst in config.status.
8975 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8976 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8977 $ac_vpsub
8978 $extrasub
8979 s%@SHELL@%$SHELL%g
8980 s%@CFLAGS@%$CFLAGS%g
8981 s%@CPPFLAGS@%$CPPFLAGS%g
8982 s%@CXXFLAGS@%$CXXFLAGS%g
8983 s%@FFLAGS@%$FFLAGS%g
8984 s%@DEFS@%$DEFS%g
8985 s%@LDFLAGS@%$LDFLAGS%g
8986 s%@LIBS@%$LIBS%g
8987 s%@exec_prefix@%$exec_prefix%g
8988 s%@prefix@%$prefix%g
8989 s%@program_transform_name@%$program_transform_name%g
8990 s%@bindir@%$bindir%g
8991 s%@sbindir@%$sbindir%g
8992 s%@libexecdir@%$libexecdir%g
8993 s%@datadir@%$datadir%g
8994 s%@sysconfdir@%$sysconfdir%g
8995 s%@sharedstatedir@%$sharedstatedir%g
8996 s%@localstatedir@%$localstatedir%g
8997 s%@libdir@%$libdir%g
8998 s%@includedir@%$includedir%g
8999 s%@oldincludedir@%$oldincludedir%g
9000 s%@infodir@%$infodir%g
9001 s%@mandir@%$mandir%g
9002 s%@LN_S@%$LN_S%g
9003 s%@libgcj_basedir@%$libgcj_basedir%g
9004 s%@mkinstalldirs@%$mkinstalldirs%g
9005 s%@host@%$host%g
9006 s%@host_alias@%$host_alias%g
9007 s%@host_cpu@%$host_cpu%g
9008 s%@host_vendor@%$host_vendor%g
9009 s%@host_os@%$host_os%g
9010 s%@target@%$target%g
9011 s%@target_alias@%$target_alias%g
9012 s%@target_cpu@%$target_cpu%g
9013 s%@target_vendor@%$target_vendor%g
9014 s%@target_os@%$target_os%g
9015 s%@build@%$build%g
9016 s%@build_alias@%$build_alias%g
9017 s%@build_cpu@%$build_cpu%g
9018 s%@build_vendor@%$build_vendor%g
9019 s%@build_os@%$build_os%g
9020 s%@CC@%$CC%g
9021 s%@glibjava_CXX@%$glibjava_CXX%g
9022 s%@CXX@%$CXX%g
9023 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9024 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9025 s%@INSTALL_DATA@%$INSTALL_DATA%g
9026 s%@PACKAGE@%$PACKAGE%g
9027 s%@VERSION@%$VERSION%g
9028 s%@ACLOCAL@%$ACLOCAL%g
9029 s%@AUTOCONF@%$AUTOCONF%g
9030 s%@AUTOMAKE@%$AUTOMAKE%g
9031 s%@AUTOHEADER@%$AUTOHEADER%g
9032 s%@MAKEINFO@%$MAKEINFO%g
9033 s%@SET_MAKE@%$SET_MAKE%g
9034 s%@AS@%$AS%g
9035 s%@AR@%$AR%g
9036 s%@RANLIB@%$RANLIB%g
9037 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
9038 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
9039 s%@MAINT@%$MAINT%g
9040 s%@EXEEXT@%$EXEEXT%g
9041 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
9042 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
9043 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
9044 s%@INCLTDL@%$INCLTDL%g
9045 s%@LIBLTDL@%$LIBLTDL%g
9046 s%@DIRLTDL@%$DIRLTDL%g
9047 s%@OBJEXT@%$OBJEXT%g
9048 s%@STRIP@%$STRIP%g
9049 s%@LIBTOOL@%$LIBTOOL%g
9050 s%@CXXCPP@%$CXXCPP%g
9051 s%@subdirs@%$subdirs%g
9052 s%@COMPPATH@%$COMPPATH%g
9053 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
9054 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
9055 s%@ONESTEP_TRUE@%$ONESTEP_TRUE%g
9056 s%@ONESTEP_FALSE@%$ONESTEP_FALSE%g
9057 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
9058 s%@INTERPRETER@%$INTERPRETER%g
9059 s%@LIBFFI@%$LIBFFI%g
9060 s%@LIBFFIINCS@%$LIBFFIINCS%g
9061 s%@EXTRA_CC_FILES@%$EXTRA_CC_FILES%g
9062 s%@PLATFORMOBJS@%$PLATFORMOBJS%g
9063 s%@CPP@%$CPP%g
9064 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
9065 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
9066 s%@ZLIBSPEC@%$ZLIBSPEC%g
9067 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
9068 s%@X_CFLAGS@%$X_CFLAGS%g
9069 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9070 s%@X_LIBS@%$X_LIBS%g
9071 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9072 s%@TOOLKIT@%$TOOLKIT%g
9073 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
9074 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
9075 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
9076 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
9077 s%@GCLIBS@%$GCLIBS%g
9078 s%@GCINCS@%$GCINCS%g
9079 s%@GCDEPS@%$GCDEPS%g
9080 s%@GCOBJS@%$GCOBJS%g
9081 s%@GCSPEC@%$GCSPEC%g
9082 s%@JC1GCSPEC@%$JC1GCSPEC%g
9083 s%@GCTESTSPEC@%$GCTESTSPEC%g
9084 s%@THREADLIBS@%$THREADLIBS%g
9085 s%@THREADINCS@%$THREADINCS%g
9086 s%@THREADDEPS@%$THREADDEPS%g
9087 s%@THREADOBJS@%$THREADOBJS%g
9088 s%@THREADSPEC@%$THREADSPEC%g
9089 s%@THREADLDFLAGS@%$THREADLDFLAGS%g
9090 s%@THREADCXXFLAGS@%$THREADCXXFLAGS%g
9091 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
9092 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
9093 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
9094 s%@tool_include_dir@%$tool_include_dir%g
9095 s%@gcc_version@%$gcc_version%g
9096 s%@LIBICONV@%$LIBICONV%g
9097 s%@PKG_CONFIG@%$PKG_CONFIG%g
9098 s%@GTK_CFLAGS@%$GTK_CFLAGS%g
9099 s%@GTK_LIBS@%$GTK_LIBS%g
9100 s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g
9101 s%@GLIB_LIBS@%$GLIB_LIBS%g
9102 s%@GLIB_GENMARSHAL@%$GLIB_GENMARSHAL%g
9103 s%@GOBJECT_QUERY@%$GOBJECT_QUERY%g
9104 s%@GLIB_MKENUMS@%$GLIB_MKENUMS%g
9105 s%@LIBART_CONFIG@%$LIBART_CONFIG%g
9106 s%@LIBART_CFLAGS@%$LIBART_CFLAGS%g
9107 s%@LIBART_LIBS@%$LIBART_LIBS%g
9108 s%@GCJ@%$GCJ%g
9109 s%@GCJFLAGS@%$GCJFLAGS%g
9110 s%@ZLIBS@%$ZLIBS%g
9111 s%@SYS_ZLIBS@%$SYS_ZLIBS%g
9112 s%@ZINCS@%$ZINCS%g
9113 s%@DIVIDESPEC@%$DIVIDESPEC%g
9114 s%@CHECKREFSPEC@%$CHECKREFSPEC%g
9115 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
9116 s%@IEEESPEC@%$IEEESPEC%g
9117 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
9118 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
9119 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
9120 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
9121 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
9122 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
9123 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
9124 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
9125 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
9126 s%@toolexecdir@%$toolexecdir%g
9127 s%@toolexecmainlibdir@%$toolexecmainlibdir%g
9128 s%@toolexeclibdir@%$toolexeclibdir%g
9129 s%@GCJVERSION@%$GCJVERSION%g
9130 s%@ALLOCA@%$ALLOCA%g
9131 s%@PERL@%$PERL%g
9132 s%@BACKTRACESPEC@%$BACKTRACESPEC%g
9133 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
9134 s%@here@%$here%g
9136 CEOF
9139 cat >> $CONFIG_STATUS <<\EOF
9141 # Split the substitutions into bite-sized pieces for seds with
9142 # small command number limits, like on Digital OSF/1 and HP-UX.
9143 ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script.
9144 ac_file=1 # Number of current file.
9145 ac_beg=1 # First line for current file.
9146 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9147 ac_more_lines=:
9148 ac_sed_cmds=""
9149 while $ac_more_lines; do
9150 if test $ac_beg -gt 1; then
9151 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9152 else
9153 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9155 if test ! -s conftest.s$ac_file; then
9156 ac_more_lines=false
9157 rm -f conftest.s$ac_file
9158 else
9159 if test -z "$ac_sed_cmds"; then
9160 ac_sed_cmds="sed -f conftest.s$ac_file"
9161 else
9162 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9164 ac_file=`expr $ac_file + 1`
9165 ac_beg=$ac_end
9166 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9168 done
9169 if test -z "$ac_sed_cmds"; then
9170 ac_sed_cmds=cat
9174 cat >> $CONFIG_STATUS <<EOF
9176 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.pc libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
9178 cat >> $CONFIG_STATUS <<\EOF
9179 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9180 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9181 case "$ac_file" in
9182 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9183 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9184 *) ac_file_in="${ac_file}.in" ;;
9185 esac
9187 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9189 # Remove last slash and all that follows it. Not all systems have dirname.
9190 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9191 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9192 # The file is in a subdirectory.
9193 test ! -d "$ac_dir" && mkdir "$ac_dir"
9194 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9195 # A "../" for each directory in $ac_dir_suffix.
9196 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9197 else
9198 ac_dir_suffix= ac_dots=
9201 case "$ac_given_srcdir" in
9202 .) srcdir=.
9203 if test -z "$ac_dots"; then top_srcdir=.
9204 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9205 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9206 *) # Relative path.
9207 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9208 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9209 esac
9211 case "$ac_given_INSTALL" in
9212 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9213 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9214 esac
9216 echo creating "$ac_file"
9217 rm -f "$ac_file"
9218 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9219 case "$ac_file" in
9220 *Makefile*) ac_comsub="1i\\
9221 # $configure_input" ;;
9222 *) ac_comsub= ;;
9223 esac
9225 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9226 sed -e "$ac_comsub
9227 s%@configure_input@%$configure_input%g
9228 s%@srcdir@%$srcdir%g
9229 s%@top_srcdir@%$top_srcdir%g
9230 s%@INSTALL@%$INSTALL%g
9231 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9232 fi; done
9233 rm -f conftest.s*
9235 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9236 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9238 # ac_d sets the value in "#define NAME VALUE" lines.
9239 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9240 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9241 ac_dC='\3'
9242 ac_dD='%g'
9243 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9244 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9245 ac_uB='\([ ]\)%\1#\2define\3'
9246 ac_uC=' '
9247 ac_uD='\4%g'
9248 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9249 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9250 ac_eB='$%\1#\2define\3'
9251 ac_eC=' '
9252 ac_eD='%g'
9254 if test "${CONFIG_HEADERS+set}" != set; then
9256 cat >> $CONFIG_STATUS <<EOF
9257 CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
9259 cat >> $CONFIG_STATUS <<\EOF
9261 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9262 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9263 case "$ac_file" in
9264 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9265 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9266 *) ac_file_in="${ac_file}.in" ;;
9267 esac
9269 echo creating $ac_file
9271 rm -f conftest.frag conftest.in conftest.out
9272 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9273 cat $ac_file_inputs > conftest.in
9277 # Transform confdefs.h into a sed script conftest.vals that substitutes
9278 # the proper values into config.h.in to produce config.h. And first:
9279 # Protect against being on the right side of a sed subst in config.status.
9280 # Protect against being in an unquoted here document in config.status.
9281 rm -f conftest.vals
9282 cat > conftest.hdr <<\EOF
9283 s/[\\&%]/\\&/g
9284 s%[\\$`]%\\&%g
9285 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9286 s%ac_d%ac_u%gp
9287 s%ac_u%ac_e%gp
9289 sed -n -f conftest.hdr confdefs.h > conftest.vals
9290 rm -f conftest.hdr
9292 # This sed command replaces #undef with comments. This is necessary, for
9293 # example, in the case of _POSIX_SOURCE, which is predefined and required
9294 # on some systems where configure will not decide to define it.
9295 cat >> conftest.vals <<\EOF
9296 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9299 # Break up conftest.vals because some shells have a limit on
9300 # the size of here documents, and old seds have small limits too.
9302 rm -f conftest.tail
9303 while :
9305 ac_lines=`grep -c . conftest.vals`
9306 # grep -c gives empty output for an empty file on some AIX systems.
9307 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9308 # Write a limited-size here document to conftest.frag.
9309 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9310 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9311 echo 'CEOF
9312 sed -f conftest.frag conftest.in > conftest.out
9313 rm -f conftest.in
9314 mv conftest.out conftest.in
9315 ' >> $CONFIG_STATUS
9316 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9317 rm -f conftest.vals
9318 mv conftest.tail conftest.vals
9319 done
9320 rm -f conftest.vals
9322 cat >> $CONFIG_STATUS <<\EOF
9323 rm -f conftest.frag conftest.h
9324 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9325 cat conftest.in >> conftest.h
9326 rm -f conftest.in
9327 if cmp -s $ac_file conftest.h 2>/dev/null; then
9328 echo "$ac_file is unchanged"
9329 rm -f conftest.h
9330 else
9331 # Remove last slash and all that follows it. Not all systems have dirname.
9332 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9333 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9334 # The file is in a subdirectory.
9335 test ! -d "$ac_dir" && mkdir "$ac_dir"
9337 rm -f $ac_file
9338 mv conftest.h $ac_file
9340 fi; done
9344 cat >> $CONFIG_STATUS <<EOF
9345 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"
9346 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"
9349 cat >> $CONFIG_STATUS <<\EOF
9350 srcdir=$ac_given_srcdir
9351 while test -n "$ac_sources"; do
9352 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9353 set $ac_sources; ac_source=$1; shift; ac_sources=$*
9355 echo "linking $srcdir/$ac_source to $ac_dest"
9357 if test ! -r $srcdir/$ac_source; then
9358 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9360 rm -f $ac_dest
9362 # Make relative symlinks.
9363 # Remove last slash and all that follows it. Not all systems have dirname.
9364 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9365 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9366 # The dest file is in a subdirectory.
9367 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9368 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9369 # A "../" for each directory in $ac_dest_dir_suffix.
9370 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9371 else
9372 ac_dest_dir_suffix= ac_dots=
9375 case "$srcdir" in
9376 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9377 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9378 esac
9380 # Make a symlink if possible; otherwise try a hard link.
9381 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9382 ln $srcdir/$ac_source $ac_dest; then :
9383 else
9384 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9386 done
9388 cat >> $CONFIG_STATUS <<EOF
9390 srcdir=${srcdir}
9391 host=${host}
9392 target=${target}
9393 with_multisubdir=${with_multisubdir}
9394 ac_configure_args="${multilib_arg} ${ac_configure_args}"
9395 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
9396 libgcj_basedir=${libgcj_basedir}
9397 CC="${CC}"
9398 CXX="${CXX}"
9399 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
9402 cat >> $CONFIG_STATUS <<\EOF
9403 am_indx=1
9404 for am_file in include/config.h gcj/libgcj-config.h; do
9405 case " $CONFIG_HEADERS " in
9406 *" $am_file "*)
9407 echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
9409 esac
9410 am_indx=`expr "$am_indx" + 1`
9411 done
9412 # Only add multilib support code if we just rebuilt top-level Makefile.
9413 case " $CONFIG_FILES " in
9414 *" Makefile "*)
9415 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
9416 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
9418 esac
9420 # Make subdirectories and `.d' files. Look in both srcdir and
9421 # builddir for the .java files.
9422 h=`${PWDCMD-pwd}`
9423 : > deps.mk
9424 ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) ;
9425 find . \( -name '*.java' -o -name '*.cc' -o -name '*.c' \) -print) | \
9426 fgrep -v testsuite | \
9427 sed -e 's/\.java/.d/'\;'s/\.cc/.d/'\;'s/\.c/.d/' | \
9428 while read f; do
9429 echo "include $f" >> deps.mk
9430 test -f $f || {
9432 d=`echo $f | sed -e 's,/[^/]*$,,'`
9434 if test ! -d $d; then
9435 $libgcj_basedir/../mkinstalldirs $d
9437 echo > $f
9439 done
9441 exit 0
9443 chmod +x $CONFIG_STATUS
9444 rm -fr confdefs* $ac_clean_files
9445 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9447 if test "$no_recursion" != yes; then
9449 # Remove --cache-file and --srcdir arguments so they do not pile up.
9450 ac_sub_configure_args=
9451 ac_prev=
9452 for ac_arg in $ac_configure_args; do
9453 if test -n "$ac_prev"; then
9454 ac_prev=
9455 continue
9457 case "$ac_arg" in
9458 -cache-file | --cache-file | --cache-fil | --cache-fi \
9459 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9460 ac_prev=cache_file ;;
9461 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9462 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9464 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9465 ac_prev=srcdir ;;
9466 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9468 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9469 esac
9470 done
9472 for ac_config_dir in $DIRLTDL; do
9474 # Do not complain, so a configure script can configure whichever
9475 # parts of a large source tree are present.
9476 if test ! -d $srcdir/$ac_config_dir; then
9477 continue
9480 echo configuring in $ac_config_dir
9482 case "$srcdir" in
9483 .) ;;
9485 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9486 else
9487 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9490 esac
9492 ac_popdir=`pwd`
9493 cd $ac_config_dir
9495 # A "../" for each directory in /$ac_config_dir.
9496 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9498 case "$srcdir" in
9499 .) # No --srcdir option. We are building in place.
9500 ac_sub_srcdir=$srcdir ;;
9501 /*) # Absolute path.
9502 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9503 *) # Relative path.
9504 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9505 esac
9507 # Check for guested configure; otherwise get Cygnus style configure.
9508 if test -f $ac_sub_srcdir/configure; then
9509 ac_sub_configure=$ac_sub_srcdir/configure
9510 elif test -f $ac_sub_srcdir/configure.in; then
9511 ac_sub_configure=$ac_configure
9512 else
9513 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9514 ac_sub_configure=
9517 # The recursion is here.
9518 if test -n "$ac_sub_configure"; then
9520 # Make the cache file name correct relative to the subdirectory.
9521 case "$cache_file" in
9522 /*) ac_sub_cache_file=$cache_file ;;
9523 *) # Relative path.
9524 ac_sub_cache_file="$ac_dots$cache_file" ;;
9525 esac
9526 case "$ac_given_INSTALL" in
9527 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9528 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9529 esac
9531 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9532 # The eval makes quoting arguments work.
9533 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9534 then :
9535 else
9536 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9540 cd $ac_popdir
9541 done