function.c (keep_stack_depressed): Major rework.
[official-gcc.git] / libjava / configure
blob06c782ff37dc00f7fa451c61e8e6cc24e404fc2d
1 #! /bin/sh
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-target-subdir=SUBDIR
16 configuring in a subdirectory"
17 ac_help="$ac_help
18 --with-cross-host=HOST configuring with a cross compiler"
19 ac_help="$ac_help
20 --enable-multilib build many library versions (default)"
21 ac_help="$ac_help
22 --enable-maintainer-mode enable make rules and dependencies not useful
23 (and sometimes confusing) to the casual installer"
24 ac_help="$ac_help
25 --enable-shared[=PKGS] build shared libraries [default=yes]"
26 ac_help="$ac_help
27 --enable-static[=PKGS] build static libraries [default=yes]"
28 ac_help="$ac_help
29 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
30 ac_help="$ac_help
31 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
32 ac_help="$ac_help
33 --disable-libtool-lock avoid locking (might break parallel builds)"
34 ac_help="$ac_help
35 --with-pic try to use only PIC/non-PIC objects [default=use both]"
36 ac_help="$ac_help
37 --enable-fast-character prefer speed over size for Character"
38 ac_help="$ac_help
39 --disable-getenv-properties
40 don't set system properties from GCJ_PROPERTIES"
41 ac_help="$ac_help
42 --enable-hash-synchronization
43 Use global hash table for monitor locks"
44 ac_help="$ac_help
45 --enable-libgcj-debug enable runtime debugging code"
46 ac_help="$ac_help
47 --enable-interpreter enable interpreter"
48 ac_help="$ac_help
49 --enable-sjlj-exceptions force use of builtin_setjmp for exceptions"
50 ac_help="$ac_help
51 --disable-java-net disable java.net"
52 ac_help="$ac_help
53 --without-libffi don't use libffi"
54 ac_help="$ac_help
55 --disable-jvmpi disable JVMPI support"
56 ac_help="$ac_help
57 --with-ecos enable runtime eCos target support"
58 ac_help="$ac_help
59 --with-system-zlib use installed libz"
60 ac_help="$ac_help
61 --enable-java-gc=TYPE choose garbage collector [boehm]"
62 ac_help="$ac_help
63 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
64 ac_help="$ac_help
65 --with-x use the X Window System"
66 ac_help="$ac_help
67 --enable-java-awt list of AWT peer implementations to be built"
69 # Initialize some variables set by options.
70 # The variables have the same names as the options, with
71 # dashes changed to underlines.
72 build=NONE
73 cache_file=./config.cache
74 exec_prefix=NONE
75 host=NONE
76 no_create=
77 nonopt=NONE
78 no_recursion=
79 prefix=NONE
80 program_prefix=NONE
81 program_suffix=NONE
82 program_transform_name=s,x,x,
83 silent=
84 site=
85 srcdir=
86 target=NONE
87 verbose=
88 x_includes=NONE
89 x_libraries=NONE
90 bindir='${exec_prefix}/bin'
91 sbindir='${exec_prefix}/sbin'
92 libexecdir='${exec_prefix}/libexec'
93 datadir='${prefix}/share'
94 sysconfdir='${prefix}/etc'
95 sharedstatedir='${prefix}/com'
96 localstatedir='${prefix}/var'
97 libdir='${exec_prefix}/lib'
98 includedir='${prefix}/include'
99 oldincludedir='/usr/include'
100 infodir='${prefix}/info'
101 mandir='${prefix}/man'
103 # Initialize some other variables.
104 subdirs=
105 MFLAGS= MAKEFLAGS=
106 SHELL=${CONFIG_SHELL-/bin/sh}
107 # Maximum number of lines to put in a shell here document.
108 ac_max_here_lines=12
110 ac_prev=
111 for ac_option
114 # If the previous option needs an argument, assign it.
115 if test -n "$ac_prev"; then
116 eval "$ac_prev=\$ac_option"
117 ac_prev=
118 continue
121 case "$ac_option" in
122 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
123 *) ac_optarg= ;;
124 esac
126 # Accept the important Cygnus configure options, so we can diagnose typos.
128 case "$ac_option" in
130 -bindir | --bindir | --bindi | --bind | --bin | --bi)
131 ac_prev=bindir ;;
132 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
133 bindir="$ac_optarg" ;;
135 -build | --build | --buil | --bui | --bu)
136 ac_prev=build ;;
137 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
138 build="$ac_optarg" ;;
140 -cache-file | --cache-file | --cache-fil | --cache-fi \
141 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
142 ac_prev=cache_file ;;
143 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
144 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
145 cache_file="$ac_optarg" ;;
147 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
148 ac_prev=datadir ;;
149 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
150 | --da=*)
151 datadir="$ac_optarg" ;;
153 -disable-* | --disable-*)
154 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
155 # Reject names that are not valid shell variable names.
156 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
157 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
159 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
160 eval "enable_${ac_feature}=no" ;;
162 -enable-* | --enable-*)
163 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
164 # Reject names that are not valid shell variable names.
165 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
166 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
168 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
169 case "$ac_option" in
170 *=*) ;;
171 *) ac_optarg=yes ;;
172 esac
173 eval "enable_${ac_feature}='$ac_optarg'" ;;
175 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
176 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
177 | --exec | --exe | --ex)
178 ac_prev=exec_prefix ;;
179 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
180 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
181 | --exec=* | --exe=* | --ex=*)
182 exec_prefix="$ac_optarg" ;;
184 -gas | --gas | --ga | --g)
185 # Obsolete; use --with-gas.
186 with_gas=yes ;;
188 -help | --help | --hel | --he)
189 # Omit some internal or obsolete options to make the list less imposing.
190 # This message is too long to be a string in the A/UX 3.1 sh.
191 cat << EOF
192 Usage: configure [options] [host]
193 Options: [defaults in brackets after descriptions]
194 Configuration:
195 --cache-file=FILE cache test results in FILE
196 --help print this message
197 --no-create do not create output files
198 --quiet, --silent do not print \`checking...' messages
199 --version print the version of autoconf that created configure
200 Directory and file names:
201 --prefix=PREFIX install architecture-independent files in PREFIX
202 [$ac_default_prefix]
203 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
204 [same as prefix]
205 --bindir=DIR user executables in DIR [EPREFIX/bin]
206 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
207 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
208 --datadir=DIR read-only architecture-independent data in DIR
209 [PREFIX/share]
210 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
211 --sharedstatedir=DIR modifiable architecture-independent data in DIR
212 [PREFIX/com]
213 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
214 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
215 --includedir=DIR C header files in DIR [PREFIX/include]
216 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
217 --infodir=DIR info documentation in DIR [PREFIX/info]
218 --mandir=DIR man documentation in DIR [PREFIX/man]
219 --srcdir=DIR find the sources in DIR [configure dir or ..]
220 --program-prefix=PREFIX prepend PREFIX to installed program names
221 --program-suffix=SUFFIX append SUFFIX to installed program names
222 --program-transform-name=PROGRAM
223 run sed PROGRAM on installed program names
225 cat << EOF
226 Host type:
227 --build=BUILD configure for building on BUILD [BUILD=HOST]
228 --host=HOST configure for HOST [guessed]
229 --target=TARGET configure for TARGET [TARGET=HOST]
230 Features and packages:
231 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
232 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
233 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
234 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
235 --x-includes=DIR X include files are in DIR
236 --x-libraries=DIR X library files are in DIR
238 if test -n "$ac_help"; then
239 echo "--enable and --with options recognized:$ac_help"
241 exit 0 ;;
243 -host | --host | --hos | --ho)
244 ac_prev=host ;;
245 -host=* | --host=* | --hos=* | --ho=*)
246 host="$ac_optarg" ;;
248 -includedir | --includedir | --includedi | --included | --include \
249 | --includ | --inclu | --incl | --inc)
250 ac_prev=includedir ;;
251 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
252 | --includ=* | --inclu=* | --incl=* | --inc=*)
253 includedir="$ac_optarg" ;;
255 -infodir | --infodir | --infodi | --infod | --info | --inf)
256 ac_prev=infodir ;;
257 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
258 infodir="$ac_optarg" ;;
260 -libdir | --libdir | --libdi | --libd)
261 ac_prev=libdir ;;
262 -libdir=* | --libdir=* | --libdi=* | --libd=*)
263 libdir="$ac_optarg" ;;
265 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
266 | --libexe | --libex | --libe)
267 ac_prev=libexecdir ;;
268 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
269 | --libexe=* | --libex=* | --libe=*)
270 libexecdir="$ac_optarg" ;;
272 -localstatedir | --localstatedir | --localstatedi | --localstated \
273 | --localstate | --localstat | --localsta | --localst \
274 | --locals | --local | --loca | --loc | --lo)
275 ac_prev=localstatedir ;;
276 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
277 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
278 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
279 localstatedir="$ac_optarg" ;;
281 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
282 ac_prev=mandir ;;
283 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
284 mandir="$ac_optarg" ;;
286 -nfp | --nfp | --nf)
287 # Obsolete; use --without-fp.
288 with_fp=no ;;
290 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
291 | --no-cr | --no-c)
292 no_create=yes ;;
294 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
295 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
296 no_recursion=yes ;;
298 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
299 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
300 | --oldin | --oldi | --old | --ol | --o)
301 ac_prev=oldincludedir ;;
302 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
303 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
304 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
305 oldincludedir="$ac_optarg" ;;
307 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
308 ac_prev=prefix ;;
309 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
310 prefix="$ac_optarg" ;;
312 -program-prefix | --program-prefix | --program-prefi | --program-pref \
313 | --program-pre | --program-pr | --program-p)
314 ac_prev=program_prefix ;;
315 -program-prefix=* | --program-prefix=* | --program-prefi=* \
316 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
317 program_prefix="$ac_optarg" ;;
319 -program-suffix | --program-suffix | --program-suffi | --program-suff \
320 | --program-suf | --program-su | --program-s)
321 ac_prev=program_suffix ;;
322 -program-suffix=* | --program-suffix=* | --program-suffi=* \
323 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
324 program_suffix="$ac_optarg" ;;
326 -program-transform-name | --program-transform-name \
327 | --program-transform-nam | --program-transform-na \
328 | --program-transform-n | --program-transform- \
329 | --program-transform | --program-transfor \
330 | --program-transfo | --program-transf \
331 | --program-trans | --program-tran \
332 | --progr-tra | --program-tr | --program-t)
333 ac_prev=program_transform_name ;;
334 -program-transform-name=* | --program-transform-name=* \
335 | --program-transform-nam=* | --program-transform-na=* \
336 | --program-transform-n=* | --program-transform-=* \
337 | --program-transform=* | --program-transfor=* \
338 | --program-transfo=* | --program-transf=* \
339 | --program-trans=* | --program-tran=* \
340 | --progr-tra=* | --program-tr=* | --program-t=*)
341 program_transform_name="$ac_optarg" ;;
343 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
344 | -silent | --silent | --silen | --sile | --sil)
345 silent=yes ;;
347 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
348 ac_prev=sbindir ;;
349 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
350 | --sbi=* | --sb=*)
351 sbindir="$ac_optarg" ;;
353 -sharedstatedir | --sharedstatedir | --sharedstatedi \
354 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
355 | --sharedst | --shareds | --shared | --share | --shar \
356 | --sha | --sh)
357 ac_prev=sharedstatedir ;;
358 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
359 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
360 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
361 | --sha=* | --sh=*)
362 sharedstatedir="$ac_optarg" ;;
364 -site | --site | --sit)
365 ac_prev=site ;;
366 -site=* | --site=* | --sit=*)
367 site="$ac_optarg" ;;
369 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
370 ac_prev=srcdir ;;
371 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
372 srcdir="$ac_optarg" ;;
374 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
375 | --syscon | --sysco | --sysc | --sys | --sy)
376 ac_prev=sysconfdir ;;
377 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
378 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
379 sysconfdir="$ac_optarg" ;;
381 -target | --target | --targe | --targ | --tar | --ta | --t)
382 ac_prev=target ;;
383 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
384 target="$ac_optarg" ;;
386 -v | -verbose | --verbose | --verbos | --verbo | --verb)
387 verbose=yes ;;
389 -version | --version | --versio | --versi | --vers)
390 echo "configure generated by autoconf version 2.13"
391 exit 0 ;;
393 -with-* | --with-*)
394 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
395 # Reject names that are not valid shell variable names.
396 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
397 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
399 ac_package=`echo $ac_package| sed 's/-/_/g'`
400 case "$ac_option" in
401 *=*) ;;
402 *) ac_optarg=yes ;;
403 esac
404 eval "with_${ac_package}='$ac_optarg'" ;;
406 -without-* | --without-*)
407 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
408 # Reject names that are not valid shell variable names.
409 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
410 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
412 ac_package=`echo $ac_package| sed 's/-/_/g'`
413 eval "with_${ac_package}=no" ;;
415 --x)
416 # Obsolete; use --with-x.
417 with_x=yes ;;
419 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
420 | --x-incl | --x-inc | --x-in | --x-i)
421 ac_prev=x_includes ;;
422 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
423 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
424 x_includes="$ac_optarg" ;;
426 -x-libraries | --x-libraries | --x-librarie | --x-librari \
427 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
428 ac_prev=x_libraries ;;
429 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
430 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
431 x_libraries="$ac_optarg" ;;
433 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
437 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
438 echo "configure: warning: $ac_option: invalid host type" 1>&2
440 if test "x$nonopt" != xNONE; then
441 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
443 nonopt="$ac_option"
446 esac
447 done
449 if test -n "$ac_prev"; then
450 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
453 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
455 # File descriptor usage:
456 # 0 standard input
457 # 1 file creation
458 # 2 errors and warnings
459 # 3 some systems may open it to /dev/tty
460 # 4 used on the Kubota Titan
461 # 6 checking for... messages and results
462 # 5 compiler messages saved in config.log
463 if test "$silent" = yes; then
464 exec 6>/dev/null
465 else
466 exec 6>&1
468 exec 5>./config.log
470 echo "\
471 This file contains any messages produced by compilers while
472 running configure, to aid debugging if configure makes a mistake.
473 " 1>&5
475 # Strip out --no-create and --no-recursion so they do not pile up.
476 # Also quote any args containing shell metacharacters.
477 ac_configure_args=
478 for ac_arg
480 case "$ac_arg" in
481 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
482 | --no-cr | --no-c) ;;
483 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
484 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
485 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
486 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
487 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
488 esac
489 done
491 # NLS nuisances.
492 # Only set these to C if already set. These must not be set unconditionally
493 # because not all systems understand e.g. LANG=C (notably SCO).
494 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
495 # Non-C LC_CTYPE values break the ctype check.
496 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
497 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
498 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
499 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
501 # confdefs.h avoids OS command line length limits that DEFS can exceed.
502 rm -rf conftest* confdefs.h
503 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
504 echo > confdefs.h
506 # A filename unique to this package, relative to the directory that
507 # configure is in, which we can look for to find out if srcdir is correct.
508 ac_unique_file=java/lang/System.java
510 # Find the source files, if location was not specified.
511 if test -z "$srcdir"; then
512 ac_srcdir_defaulted=yes
513 # Try the directory containing this script, then its parent.
514 ac_prog=$0
515 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
516 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
517 srcdir=$ac_confdir
518 if test ! -r $srcdir/$ac_unique_file; then
519 srcdir=..
521 else
522 ac_srcdir_defaulted=no
524 if test ! -r $srcdir/$ac_unique_file; then
525 if test "$ac_srcdir_defaulted" = yes; then
526 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
527 else
528 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
531 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
533 # Prefer explicitly selected file to automatically selected ones.
534 if test -z "$CONFIG_SITE"; then
535 if test "x$prefix" != xNONE; then
536 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
537 else
538 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
541 for ac_site_file in $CONFIG_SITE; do
542 if test -r "$ac_site_file"; then
543 echo "loading site script $ac_site_file"
544 . "$ac_site_file"
546 done
548 if test -r "$cache_file"; then
549 echo "loading cache $cache_file"
550 . $cache_file
551 else
552 echo "creating cache $cache_file"
553 > $cache_file
556 ac_ext=c
557 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
558 ac_cpp='$CPP $CPPFLAGS'
559 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
560 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
561 cross_compiling=$ac_cv_prog_cc_cross
563 ac_exeext=
564 ac_objext=o
565 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
566 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
567 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
568 ac_n= ac_c='
569 ' ac_t=' '
570 else
571 ac_n=-n ac_c= ac_t=
573 else
574 ac_n= ac_c='\c' ac_t=
579 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
580 echo "configure:581: checking whether ln -s works" >&5
581 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
582 echo $ac_n "(cached) $ac_c" 1>&6
583 else
584 rm -f conftestdata
585 if ln -s X conftestdata 2>/dev/null
586 then
587 rm -f conftestdata
588 ac_cv_prog_LN_S="ln -s"
589 else
590 ac_cv_prog_LN_S=ln
593 LN_S="$ac_cv_prog_LN_S"
594 if test "$ac_cv_prog_LN_S" = "ln -s"; then
595 echo "$ac_t""yes" 1>&6
596 else
597 echo "$ac_t""no" 1>&6
601 # Check whether --with-target-subdir or --without-target-subdir was given.
602 if test "${with_target_subdir+set}" = set; then
603 withval="$with_target_subdir"
607 # Check whether --with-cross-host or --without-cross-host was given.
608 if test "${with_cross_host+set}" = set; then
609 withval="$with_cross_host"
614 # Find a good install program. We prefer a C program (faster),
615 # so one script is as good as another. But avoid the broken or
616 # incompatible versions:
617 # SysV /etc/install, /usr/sbin/install
618 # SunOS /usr/etc/install
619 # IRIX /sbin/install
620 # AIX /bin/install
621 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
622 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
623 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
624 # ./install, which can be erroneously created by make from ./install.sh.
625 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
626 echo "configure:627: checking for a BSD compatible install" >&5
627 if test -z "$INSTALL"; then
628 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
629 echo $ac_n "(cached) $ac_c" 1>&6
630 else
631 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
632 for ac_dir in $PATH; do
633 # Account for people who put trailing slashes in PATH elements.
634 case "$ac_dir/" in
635 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
637 # OSF1 and SCO ODT 3.0 have their own names for install.
638 # Don't use installbsd from OSF since it installs stuff as root
639 # by default.
640 for ac_prog in ginstall scoinst install; do
641 if test -f $ac_dir/$ac_prog; then
642 if test $ac_prog = install &&
643 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
644 # AIX install. It has an incompatible calling convention.
646 else
647 ac_cv_path_install="$ac_dir/$ac_prog -c"
648 break 2
651 done
653 esac
654 done
655 IFS="$ac_save_IFS"
658 if test "${ac_cv_path_install+set}" = set; then
659 INSTALL="$ac_cv_path_install"
660 else
661 # As a last resort, use the slow shell script. We don't cache a
662 # path for INSTALL within a source directory, because that will
663 # break other packages using the cache if that directory is
664 # removed, or if the path is relative.
665 INSTALL="$ac_install_sh"
668 echo "$ac_t""$INSTALL" 1>&6
670 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
671 # It thinks the first close brace ends the variable substitution.
672 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
674 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
676 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
678 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
679 echo "configure:680: checking whether build environment is sane" >&5
680 # Just in case
681 sleep 1
682 echo timestamp > conftestfile
683 # Do `set' in a subshell so we don't clobber the current shell's
684 # arguments. Must try -L first in case configure is actually a
685 # symlink; some systems play weird games with the mod time of symlinks
686 # (eg FreeBSD returns the mod time of the symlink's containing
687 # directory).
688 if (
689 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
690 if test "$*" = "X"; then
691 # -L didn't work.
692 set X `ls -t $srcdir/configure conftestfile`
694 if test "$*" != "X $srcdir/configure conftestfile" \
695 && test "$*" != "X conftestfile $srcdir/configure"; then
697 # If neither matched, then we have a broken ls. This can happen
698 # if, for instance, CONFIG_SHELL is bash and it inherits a
699 # broken ls alias from the environment. This has actually
700 # happened. Such a system could not be considered "sane".
701 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
702 alias in your environment" 1>&2; exit 1; }
705 test "$2" = conftestfile
707 then
708 # Ok.
710 else
711 { echo "configure: error: newly created file is older than distributed files!
712 Check your system clock" 1>&2; exit 1; }
714 rm -f conftest*
715 echo "$ac_t""yes" 1>&6
716 if test "$program_transform_name" = s,x,x,; then
717 program_transform_name=
718 else
719 # Double any \ or $. echo might interpret backslashes.
720 cat <<\EOF_SED > conftestsed
721 s,\\,\\\\,g; s,\$,$$,g
722 EOF_SED
723 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
724 rm -f conftestsed
726 test "$program_prefix" != NONE &&
727 program_transform_name="s,^,${program_prefix},; $program_transform_name"
728 # Use a double $ so make ignores it.
729 test "$program_suffix" != NONE &&
730 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
732 # sed with no file args requires a program.
733 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
735 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
736 echo "configure:737: checking whether ${MAKE-make} sets \${MAKE}" >&5
737 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
738 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
739 echo $ac_n "(cached) $ac_c" 1>&6
740 else
741 cat > conftestmake <<\EOF
742 all:
743 @echo 'ac_maketemp="${MAKE}"'
745 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
746 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
747 if test -n "$ac_maketemp"; then
748 eval ac_cv_prog_make_${ac_make}_set=yes
749 else
750 eval ac_cv_prog_make_${ac_make}_set=no
752 rm -f conftestmake
754 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
755 echo "$ac_t""yes" 1>&6
756 SET_MAKE=
757 else
758 echo "$ac_t""no" 1>&6
759 SET_MAKE="MAKE=${MAKE-make}"
762 if test $host != $build; then
763 ac_tool_prefix=${host_alias}-
764 else
765 ac_tool_prefix=
768 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
769 echo "configure:770: checking for Cygwin environment" >&5
770 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
771 echo $ac_n "(cached) $ac_c" 1>&6
772 else
773 cat > conftest.$ac_ext <<EOF
774 #line 775 "configure"
775 #include "confdefs.h"
777 int main() {
779 #ifndef __CYGWIN__
780 #define __CYGWIN__ __CYGWIN32__
781 #endif
782 return __CYGWIN__;
783 ; return 0; }
785 if { (eval echo configure:786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
786 rm -rf conftest*
787 ac_cv_cygwin=yes
788 else
789 echo "configure: failed program was:" >&5
790 cat conftest.$ac_ext >&5
791 rm -rf conftest*
792 ac_cv_cygwin=no
794 rm -f conftest*
795 rm -f conftest*
798 echo "$ac_t""$ac_cv_cygwin" 1>&6
799 CYGWIN=
800 test "$ac_cv_cygwin" = yes && CYGWIN=yes
801 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
802 echo "configure:803: checking for mingw32 environment" >&5
803 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805 else
806 cat > conftest.$ac_ext <<EOF
807 #line 808 "configure"
808 #include "confdefs.h"
810 int main() {
811 return __MINGW32__;
812 ; return 0; }
814 if { (eval echo configure:815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
815 rm -rf conftest*
816 ac_cv_mingw32=yes
817 else
818 echo "configure: failed program was:" >&5
819 cat conftest.$ac_ext >&5
820 rm -rf conftest*
821 ac_cv_mingw32=no
823 rm -f conftest*
824 rm -f conftest*
827 echo "$ac_t""$ac_cv_mingw32" 1>&6
828 MINGW32=
829 test "$ac_cv_mingw32" = yes && MINGW32=yes
831 # Check whether --enable-multilib or --disable-multilib was given.
832 if test "${enable_multilib+set}" = set; then
833 enableval="$enable_multilib"
834 case "${enableval}" in
835 yes) multilib=yes ;;
836 no) multilib=no ;;
837 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
838 esac
839 else
840 multilib=yes
844 # When building with srcdir == objdir, links to the source files will
845 # be created in directories within the target_subdir. We have to
846 # adjust toplevel_srcdir accordingly, so that configure finds
847 # install-sh and other auxiliary files that live in the top-level
848 # source directory.
849 if test "${srcdir}" = "."; then
850 if test -z "${with_target_subdir}"; then
851 toprel=".."
852 else
853 if test "${with_target_subdir}" != "."; then
854 toprel="${with_multisrctop}../.."
855 else
856 toprel="${with_multisrctop}.."
859 else
860 toprel=".."
863 libgcj_basedir=$srcdir/$toprel/./libjava
866 ac_aux_dir=
867 for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
868 if test -f $ac_dir/install-sh; then
869 ac_aux_dir=$ac_dir
870 ac_install_sh="$ac_aux_dir/install-sh -c"
871 break
872 elif test -f $ac_dir/install.sh; then
873 ac_aux_dir=$ac_dir
874 ac_install_sh="$ac_aux_dir/install.sh -c"
875 break
877 done
878 if test -z "$ac_aux_dir"; then
879 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
881 ac_config_guess=$ac_aux_dir/config.guess
882 ac_config_sub=$ac_aux_dir/config.sub
883 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
885 if :; then :; else
886 # This overrides the previous occurrence for automake, but not for
887 # autoconf, which is exactly what we want.
888 ac_aux_dir=
889 for ac_dir in .. $srcdir/..; do
890 if test -f $ac_dir/install-sh; then
891 ac_aux_dir=$ac_dir
892 ac_install_sh="$ac_aux_dir/install-sh -c"
893 break
894 elif test -f $ac_dir/install.sh; then
895 ac_aux_dir=$ac_dir
896 ac_install_sh="$ac_aux_dir/install.sh -c"
897 break
899 done
900 if test -z "$ac_aux_dir"; then
901 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
903 ac_config_guess=$ac_aux_dir/config.guess
904 ac_config_sub=$ac_aux_dir/config.sub
905 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
909 # This works around an automake problem.
910 mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
914 # Do some error checking and defaulting for the host and target type.
915 # The inputs are:
916 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
918 # The rules are:
919 # 1. You are not allowed to specify --host, --target, and nonopt at the
920 # same time.
921 # 2. Host defaults to nonopt.
922 # 3. If nonopt is not specified, then host defaults to the current host,
923 # as determined by config.guess.
924 # 4. Target and build default to nonopt.
925 # 5. If nonopt is not specified, then target and build default to host.
927 # The aliases save the names the user supplied, while $host etc.
928 # will get canonicalized.
929 case $host---$target---$nonopt in
930 NONE---*---* | *---NONE---* | *---*---NONE) ;;
931 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
932 esac
935 # Make sure we can run config.sub.
936 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
937 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
940 echo $ac_n "checking host system type""... $ac_c" 1>&6
941 echo "configure:942: checking host system type" >&5
943 host_alias=$host
944 case "$host_alias" in
945 NONE)
946 case $nonopt in
947 NONE)
948 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
949 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
950 fi ;;
951 *) host_alias=$nonopt ;;
952 esac ;;
953 esac
955 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
956 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
957 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
958 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
959 echo "$ac_t""$host" 1>&6
961 echo $ac_n "checking target system type""... $ac_c" 1>&6
962 echo "configure:963: checking target system type" >&5
964 target_alias=$target
965 case "$target_alias" in
966 NONE)
967 case $nonopt in
968 NONE) target_alias=$host_alias ;;
969 *) target_alias=$nonopt ;;
970 esac ;;
971 esac
973 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
974 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
975 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
976 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
977 echo "$ac_t""$target" 1>&6
979 echo $ac_n "checking build system type""... $ac_c" 1>&6
980 echo "configure:981: checking build system type" >&5
982 build_alias=$build
983 case "$build_alias" in
984 NONE)
985 case $nonopt in
986 NONE) build_alias=$host_alias ;;
987 *) build_alias=$nonopt ;;
988 esac ;;
989 esac
991 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
992 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
993 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
994 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
995 echo "$ac_t""$build" 1>&6
997 test "$host_alias" != "$target_alias" &&
998 test "$program_prefix$program_suffix$program_transform_name" = \
999 NONENONEs,x,x, &&
1000 program_prefix=${target_alias}-
1006 # Extract the first word of "gcc", so it can be a program name with args.
1007 set dummy gcc; ac_word=$2
1008 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1009 echo "configure:1010: checking for $ac_word" >&5
1010 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1011 echo $ac_n "(cached) $ac_c" 1>&6
1012 else
1013 if test -n "$CC"; then
1014 ac_cv_prog_CC="$CC" # Let the user override the test.
1015 else
1016 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1017 ac_dummy="$PATH"
1018 for ac_dir in $ac_dummy; do
1019 test -z "$ac_dir" && ac_dir=.
1020 if test -f $ac_dir/$ac_word; then
1021 ac_cv_prog_CC="gcc"
1022 break
1024 done
1025 IFS="$ac_save_ifs"
1028 CC="$ac_cv_prog_CC"
1029 if test -n "$CC"; then
1030 echo "$ac_t""$CC" 1>&6
1031 else
1032 echo "$ac_t""no" 1>&6
1035 if test -z "$CC"; then
1036 # Extract the first word of "cc", so it can be a program name with args.
1037 set dummy cc; ac_word=$2
1038 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1039 echo "configure:1040: checking for $ac_word" >&5
1040 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1041 echo $ac_n "(cached) $ac_c" 1>&6
1042 else
1043 if test -n "$CC"; then
1044 ac_cv_prog_CC="$CC" # Let the user override the test.
1045 else
1046 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1047 ac_prog_rejected=no
1048 ac_dummy="$PATH"
1049 for ac_dir in $ac_dummy; do
1050 test -z "$ac_dir" && ac_dir=.
1051 if test -f $ac_dir/$ac_word; then
1052 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1053 ac_prog_rejected=yes
1054 continue
1056 ac_cv_prog_CC="cc"
1057 break
1059 done
1060 IFS="$ac_save_ifs"
1061 if test $ac_prog_rejected = yes; then
1062 # We found a bogon in the path, so make sure we never use it.
1063 set dummy $ac_cv_prog_CC
1064 shift
1065 if test $# -gt 0; then
1066 # We chose a different compiler from the bogus one.
1067 # However, it has the same basename, so the bogon will be chosen
1068 # first if we set CC to just the basename; use the full file name.
1069 shift
1070 set dummy "$ac_dir/$ac_word" "$@"
1071 shift
1072 ac_cv_prog_CC="$@"
1077 CC="$ac_cv_prog_CC"
1078 if test -n "$CC"; then
1079 echo "$ac_t""$CC" 1>&6
1080 else
1081 echo "$ac_t""no" 1>&6
1084 if test -z "$CC"; then
1085 case "`uname -s`" in
1086 *win32* | *WIN32*)
1087 # Extract the first word of "cl", so it can be a program name with args.
1088 set dummy cl; ac_word=$2
1089 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1090 echo "configure:1091: checking for $ac_word" >&5
1091 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1092 echo $ac_n "(cached) $ac_c" 1>&6
1093 else
1094 if test -n "$CC"; then
1095 ac_cv_prog_CC="$CC" # Let the user override the test.
1096 else
1097 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1098 ac_dummy="$PATH"
1099 for ac_dir in $ac_dummy; do
1100 test -z "$ac_dir" && ac_dir=.
1101 if test -f $ac_dir/$ac_word; then
1102 ac_cv_prog_CC="cl"
1103 break
1105 done
1106 IFS="$ac_save_ifs"
1109 CC="$ac_cv_prog_CC"
1110 if test -n "$CC"; then
1111 echo "$ac_t""$CC" 1>&6
1112 else
1113 echo "$ac_t""no" 1>&6
1116 esac
1118 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1122 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1123 echo "configure:1124: checking whether we are using GNU C" >&5
1124 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1125 echo $ac_n "(cached) $ac_c" 1>&6
1126 else
1127 cat > conftest.c <<EOF
1128 #ifdef __GNUC__
1129 yes;
1130 #endif
1132 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1133 ac_cv_prog_gcc=yes
1134 else
1135 ac_cv_prog_gcc=no
1139 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1141 if test $ac_cv_prog_gcc = yes; then
1142 GCC=yes
1143 else
1144 GCC=
1147 ac_test_CFLAGS="${CFLAGS+set}"
1148 ac_save_CFLAGS="$CFLAGS"
1149 CFLAGS=
1150 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1151 echo "configure:1152: checking whether ${CC-cc} accepts -g" >&5
1152 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1153 echo $ac_n "(cached) $ac_c" 1>&6
1154 else
1155 echo 'void f(){}' > conftest.c
1156 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1157 ac_cv_prog_cc_g=yes
1158 else
1159 ac_cv_prog_cc_g=no
1161 rm -f conftest*
1165 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1166 if test "$ac_test_CFLAGS" = set; then
1167 CFLAGS="$ac_save_CFLAGS"
1168 elif test $ac_cv_prog_cc_g = yes; then
1169 if test "$GCC" = yes; then
1170 CFLAGS="-g -O2"
1171 else
1172 CFLAGS="-g"
1174 else
1175 if test "$GCC" = yes; then
1176 CFLAGS="-O2"
1177 else
1178 CFLAGS=
1182 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1184 # Extract the first word of "$ac_prog", so it can be a program name with args.
1185 set dummy $ac_prog; ac_word=$2
1186 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1187 echo "configure:1188: checking for $ac_word" >&5
1188 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1189 echo $ac_n "(cached) $ac_c" 1>&6
1190 else
1191 if test -n "$CXX"; then
1192 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1193 else
1194 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1195 ac_dummy="$PATH"
1196 for ac_dir in $ac_dummy; do
1197 test -z "$ac_dir" && ac_dir=.
1198 if test -f $ac_dir/$ac_word; then
1199 ac_cv_prog_CXX="$ac_prog"
1200 break
1202 done
1203 IFS="$ac_save_ifs"
1206 CXX="$ac_cv_prog_CXX"
1207 if test -n "$CXX"; then
1208 echo "$ac_t""$CXX" 1>&6
1209 else
1210 echo "$ac_t""no" 1>&6
1213 test -n "$CXX" && break
1214 done
1215 test -n "$CXX" || CXX="gcc"
1219 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1220 echo "configure:1221: checking whether we are using GNU C++" >&5
1221 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1222 echo $ac_n "(cached) $ac_c" 1>&6
1223 else
1224 cat > conftest.C <<EOF
1225 #ifdef __GNUC__
1226 yes;
1227 #endif
1229 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1230 ac_cv_prog_gxx=yes
1231 else
1232 ac_cv_prog_gxx=no
1236 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1238 if test $ac_cv_prog_gxx = yes; then
1239 GXX=yes
1240 else
1241 GXX=
1244 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1245 ac_save_CXXFLAGS="$CXXFLAGS"
1246 CXXFLAGS=
1247 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1248 echo "configure:1249: checking whether ${CXX-g++} accepts -g" >&5
1249 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251 else
1252 echo 'void f(){}' > conftest.cc
1253 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1254 ac_cv_prog_cxx_g=yes
1255 else
1256 ac_cv_prog_cxx_g=no
1258 rm -f conftest*
1262 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1263 if test "$ac_test_CXXFLAGS" = set; then
1264 CXXFLAGS="$ac_save_CXXFLAGS"
1265 elif test $ac_cv_prog_cxx_g = yes; then
1266 if test "$GXX" = yes; then
1267 CXXFLAGS="-g -O2"
1268 else
1269 CXXFLAGS="-g"
1271 else
1272 if test "$GXX" = yes; then
1273 CXXFLAGS="-O2"
1274 else
1275 CXXFLAGS=
1280 version=0.0.7
1282 PACKAGE=libjava
1284 VERSION=$version
1286 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1287 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1289 cat >> confdefs.h <<EOF
1290 #define PACKAGE "$PACKAGE"
1293 cat >> confdefs.h <<EOF
1294 #define VERSION "$VERSION"
1299 missing_dir=`cd $ac_aux_dir && pwd`
1300 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1301 echo "configure:1302: checking for working aclocal" >&5
1302 # Run test in a subshell; some versions of sh will print an error if
1303 # an executable is not found, even if stderr is redirected.
1304 # Redirect stdin to placate older versions of autoconf. Sigh.
1305 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1306 ACLOCAL=aclocal
1307 echo "$ac_t""found" 1>&6
1308 else
1309 ACLOCAL="$missing_dir/missing aclocal"
1310 echo "$ac_t""missing" 1>&6
1313 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1314 echo "configure:1315: checking for working autoconf" >&5
1315 # Run test in a subshell; some versions of sh will print an error if
1316 # an executable is not found, even if stderr is redirected.
1317 # Redirect stdin to placate older versions of autoconf. Sigh.
1318 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1319 AUTOCONF=autoconf
1320 echo "$ac_t""found" 1>&6
1321 else
1322 AUTOCONF="$missing_dir/missing autoconf"
1323 echo "$ac_t""missing" 1>&6
1326 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1327 echo "configure:1328: checking for working automake" >&5
1328 # Run test in a subshell; some versions of sh will print an error if
1329 # an executable is not found, even if stderr is redirected.
1330 # Redirect stdin to placate older versions of autoconf. Sigh.
1331 if (automake --version) < /dev/null > /dev/null 2>&1; then
1332 AUTOMAKE=automake
1333 echo "$ac_t""found" 1>&6
1334 else
1335 AUTOMAKE="$missing_dir/missing automake"
1336 echo "$ac_t""missing" 1>&6
1339 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1340 echo "configure:1341: checking for working autoheader" >&5
1341 # Run test in a subshell; some versions of sh will print an error if
1342 # an executable is not found, even if stderr is redirected.
1343 # Redirect stdin to placate older versions of autoconf. Sigh.
1344 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1345 AUTOHEADER=autoheader
1346 echo "$ac_t""found" 1>&6
1347 else
1348 AUTOHEADER="$missing_dir/missing autoheader"
1349 echo "$ac_t""missing" 1>&6
1352 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1353 echo "configure:1354: checking for working makeinfo" >&5
1354 # Run test in a subshell; some versions of sh will print an error if
1355 # an executable is not found, even if stderr is redirected.
1356 # Redirect stdin to placate older versions of autoconf. Sigh.
1357 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1358 MAKEINFO=makeinfo
1359 echo "$ac_t""found" 1>&6
1360 else
1361 MAKEINFO="$missing_dir/missing makeinfo"
1362 echo "$ac_t""missing" 1>&6
1367 # AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
1368 # run it explicitly here, it will be run implicitly before
1369 # LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1370 # be run before AC_CANONICAL_HOST.
1371 echo $ac_n "checking build system type""... $ac_c" 1>&6
1372 echo "configure:1373: checking build system type" >&5
1374 build_alias=$build
1375 case "$build_alias" in
1376 NONE)
1377 case $nonopt in
1378 NONE) build_alias=$host_alias ;;
1379 *) build_alias=$nonopt ;;
1380 esac ;;
1381 esac
1383 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1384 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1385 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1386 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1387 echo "$ac_t""$build" 1>&6
1390 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1391 set dummy ${ac_tool_prefix}as; ac_word=$2
1392 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1393 echo "configure:1394: checking for $ac_word" >&5
1394 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1395 echo $ac_n "(cached) $ac_c" 1>&6
1396 else
1397 if test -n "$AS"; then
1398 ac_cv_prog_AS="$AS" # Let the user override the test.
1399 else
1400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1401 ac_dummy="$PATH"
1402 for ac_dir in $ac_dummy; do
1403 test -z "$ac_dir" && ac_dir=.
1404 if test -f $ac_dir/$ac_word; then
1405 ac_cv_prog_AS="${ac_tool_prefix}as"
1406 break
1408 done
1409 IFS="$ac_save_ifs"
1410 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1413 AS="$ac_cv_prog_AS"
1414 if test -n "$AS"; then
1415 echo "$ac_t""$AS" 1>&6
1416 else
1417 echo "$ac_t""no" 1>&6
1422 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1423 set dummy ${ac_tool_prefix}ar; ac_word=$2
1424 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1425 echo "configure:1426: checking for $ac_word" >&5
1426 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1427 echo $ac_n "(cached) $ac_c" 1>&6
1428 else
1429 if test -n "$AR"; then
1430 ac_cv_prog_AR="$AR" # Let the user override the test.
1431 else
1432 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1433 ac_dummy="$PATH"
1434 for ac_dir in $ac_dummy; do
1435 test -z "$ac_dir" && ac_dir=.
1436 if test -f $ac_dir/$ac_word; then
1437 ac_cv_prog_AR="${ac_tool_prefix}ar"
1438 break
1440 done
1441 IFS="$ac_save_ifs"
1442 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1445 AR="$ac_cv_prog_AR"
1446 if test -n "$AR"; then
1447 echo "$ac_t""$AR" 1>&6
1448 else
1449 echo "$ac_t""no" 1>&6
1454 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1455 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1456 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1457 echo "configure:1458: checking for $ac_word" >&5
1458 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1459 echo $ac_n "(cached) $ac_c" 1>&6
1460 else
1461 if test -n "$RANLIB"; then
1462 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1463 else
1464 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1465 ac_dummy="$PATH"
1466 for ac_dir in $ac_dummy; do
1467 test -z "$ac_dir" && ac_dir=.
1468 if test -f $ac_dir/$ac_word; then
1469 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1470 break
1472 done
1473 IFS="$ac_save_ifs"
1476 RANLIB="$ac_cv_prog_RANLIB"
1477 if test -n "$RANLIB"; then
1478 echo "$ac_t""$RANLIB" 1>&6
1479 else
1480 echo "$ac_t""no" 1>&6
1484 if test -z "$ac_cv_prog_RANLIB"; then
1485 if test -n "$ac_tool_prefix"; then
1486 # Extract the first word of "ranlib", so it can be a program name with args.
1487 set dummy ranlib; ac_word=$2
1488 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1489 echo "configure:1490: checking for $ac_word" >&5
1490 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1491 echo $ac_n "(cached) $ac_c" 1>&6
1492 else
1493 if test -n "$RANLIB"; then
1494 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1495 else
1496 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1497 ac_dummy="$PATH"
1498 for ac_dir in $ac_dummy; do
1499 test -z "$ac_dir" && ac_dir=.
1500 if test -f $ac_dir/$ac_word; then
1501 ac_cv_prog_RANLIB="ranlib"
1502 break
1504 done
1505 IFS="$ac_save_ifs"
1506 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1509 RANLIB="$ac_cv_prog_RANLIB"
1510 if test -n "$RANLIB"; then
1511 echo "$ac_t""$RANLIB" 1>&6
1512 else
1513 echo "$ac_t""no" 1>&6
1516 else
1517 RANLIB=":"
1522 # Find a good install program. We prefer a C program (faster),
1523 # so one script is as good as another. But avoid the broken or
1524 # incompatible versions:
1525 # SysV /etc/install, /usr/sbin/install
1526 # SunOS /usr/etc/install
1527 # IRIX /sbin/install
1528 # AIX /bin/install
1529 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1530 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1531 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1532 # ./install, which can be erroneously created by make from ./install.sh.
1533 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1534 echo "configure:1535: checking for a BSD compatible install" >&5
1535 if test -z "$INSTALL"; then
1536 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1537 echo $ac_n "(cached) $ac_c" 1>&6
1538 else
1539 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1540 for ac_dir in $PATH; do
1541 # Account for people who put trailing slashes in PATH elements.
1542 case "$ac_dir/" in
1543 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1545 # OSF1 and SCO ODT 3.0 have their own names for install.
1546 # Don't use installbsd from OSF since it installs stuff as root
1547 # by default.
1548 for ac_prog in ginstall scoinst install; do
1549 if test -f $ac_dir/$ac_prog; then
1550 if test $ac_prog = install &&
1551 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1552 # AIX install. It has an incompatible calling convention.
1554 else
1555 ac_cv_path_install="$ac_dir/$ac_prog -c"
1556 break 2
1559 done
1561 esac
1562 done
1563 IFS="$ac_save_IFS"
1566 if test "${ac_cv_path_install+set}" = set; then
1567 INSTALL="$ac_cv_path_install"
1568 else
1569 # As a last resort, use the slow shell script. We don't cache a
1570 # path for INSTALL within a source directory, because that will
1571 # break other packages using the cache if that directory is
1572 # removed, or if the path is relative.
1573 INSTALL="$ac_install_sh"
1576 echo "$ac_t""$INSTALL" 1>&6
1578 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1579 # It thinks the first close brace ends the variable substitution.
1580 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1582 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1584 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1587 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1588 echo "configure:1589: checking whether to enable maintainer-specific portions of Makefiles" >&5
1589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1590 if test "${enable_maintainer_mode+set}" = set; then
1591 enableval="$enable_maintainer_mode"
1592 USE_MAINTAINER_MODE=$enableval
1593 else
1594 USE_MAINTAINER_MODE=no
1597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1600 if test $USE_MAINTAINER_MODE = yes; then
1601 MAINTAINER_MODE_TRUE=
1602 MAINTAINER_MODE_FALSE='#'
1603 else
1604 MAINTAINER_MODE_TRUE='#'
1605 MAINTAINER_MODE_FALSE=
1607 MAINT=$MAINTAINER_MODE_TRUE
1611 # We need AC_EXEEXT to keep automake happy in cygnus mode. However,
1612 # at least currently, we never actually build a program, so we never
1613 # need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1614 # fails, because we are probably configuring with a cross compiler
1615 # which cant create executables. So we include AC_EXEEXT to keep
1616 # automake happy, but we don't execute it, since we don't care about
1617 # the result.
1618 if false; then
1619 # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
1620 # to nothing, so nothing would remain between `then' and `fi' if it
1621 # were not for the `:' below.
1625 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1626 echo "configure:1627: checking for executable suffix" >&5
1627 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1628 echo $ac_n "(cached) $ac_c" 1>&6
1629 else
1630 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1631 ac_cv_exeext=.exe
1632 else
1633 rm -f conftest*
1634 echo 'int main () { return 0; }' > conftest.$ac_ext
1635 ac_cv_exeext=
1636 if { (eval echo configure:1637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1637 for file in conftest.*; do
1638 case $file in
1639 *.c | *.C | *.o | *.obj) ;;
1640 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1641 esac
1642 done
1643 else
1644 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1646 rm -f conftest*
1647 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1651 EXEEXT=""
1652 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1653 echo "$ac_t""${ac_cv_exeext}" 1>&6
1654 ac_exeext=$EXEEXT
1658 # configure.host sets the following important variables
1659 # libgcj_cflags - host specific C compiler flags
1660 # libgcj_cxxflags - host specific C++ compiler flags
1661 # libgcj_javaflags - host specific Java compiler flags
1663 libgcj_cflags=
1664 libgcj_cxxflags=
1665 libgcj_javaflags=
1667 . ${srcdir}/configure.host
1669 LIBGCJ_CFLAGS="${libgcj_cflags}"
1670 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1671 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1681 # Only use libltdl for native builds.
1682 if test -z "${with_cross_host}"; then
1683 case $enable_ltdl_convenience in
1684 no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1685 "") enable_ltdl_convenience=yes
1686 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1687 esac
1688 LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1689 INCLTDL='-I${top_srcdir}/''libltdl'
1692 DIRLTDL=libltdl
1693 cat >> confdefs.h <<\EOF
1694 #define USE_LTDL 1
1697 # Sigh. Libtool's macro doesn't do the right thing.
1698 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1699 # FIXME: this is a hack.
1700 sub_auxdir="`cd $ac_aux_dir && pwd`"
1701 ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
1706 # Check whether --enable-shared or --disable-shared was given.
1707 if test "${enable_shared+set}" = set; then
1708 enableval="$enable_shared"
1709 p=${PACKAGE-default}
1710 case $enableval in
1711 yes) enable_shared=yes ;;
1712 no) enable_shared=no ;;
1714 enable_shared=no
1715 # Look at the argument we got. We use all the common list separators.
1716 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1717 for pkg in $enableval; do
1718 if test "X$pkg" = "X$p"; then
1719 enable_shared=yes
1721 done
1722 IFS="$ac_save_ifs"
1724 esac
1725 else
1726 enable_shared=yes
1729 # Check whether --enable-static or --disable-static was given.
1730 if test "${enable_static+set}" = set; then
1731 enableval="$enable_static"
1732 p=${PACKAGE-default}
1733 case $enableval in
1734 yes) enable_static=yes ;;
1735 no) enable_static=no ;;
1737 enable_static=no
1738 # Look at the argument we got. We use all the common list separators.
1739 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1740 for pkg in $enableval; do
1741 if test "X$pkg" = "X$p"; then
1742 enable_static=yes
1744 done
1745 IFS="$ac_save_ifs"
1747 esac
1748 else
1749 enable_static=yes
1752 # Check whether --enable-fast-install or --disable-fast-install was given.
1753 if test "${enable_fast_install+set}" = set; then
1754 enableval="$enable_fast_install"
1755 p=${PACKAGE-default}
1756 case $enableval in
1757 yes) enable_fast_install=yes ;;
1758 no) enable_fast_install=no ;;
1760 enable_fast_install=no
1761 # Look at the argument we got. We use all the common list separators.
1762 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1763 for pkg in $enableval; do
1764 if test "X$pkg" = "X$p"; then
1765 enable_fast_install=yes
1767 done
1768 IFS="$ac_save_ifs"
1770 esac
1771 else
1772 enable_fast_install=yes
1775 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1776 if test "${with_gnu_ld+set}" = set; then
1777 withval="$with_gnu_ld"
1778 test "$withval" = no || with_gnu_ld=yes
1779 else
1780 with_gnu_ld=no
1783 ac_prog=ld
1784 if test "$GCC" = yes; then
1785 # Check if gcc -print-prog-name=ld gives a path.
1786 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1787 echo "configure:1788: checking for ld used by GCC" >&5
1788 case $host in
1789 *-*-mingw*)
1790 # gcc leaves a trailing carriage return which upsets mingw
1791 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1793 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1794 esac
1795 case $ac_prog in
1796 # Accept absolute paths.
1797 [\\/]* | [A-Za-z]:[\\/]*)
1798 re_direlt='/[^/][^/]*/\.\./'
1799 # Canonicalize the path of ld
1800 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1801 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1802 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1803 done
1804 test -z "$LD" && LD="$ac_prog"
1807 # If it fails, then pretend we aren't using GCC.
1808 ac_prog=ld
1811 # If it is relative, then search for the first ld in PATH.
1812 with_gnu_ld=unknown
1814 esac
1815 elif test "$with_gnu_ld" = yes; then
1816 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1817 echo "configure:1818: checking for GNU ld" >&5
1818 else
1819 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1820 echo "configure:1821: checking for non-GNU ld" >&5
1822 if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1823 echo $ac_n "(cached) $ac_c" 1>&6
1824 else
1825 if test -z "$LD"; then
1826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1827 for ac_dir in $PATH; do
1828 test -z "$ac_dir" && ac_dir=.
1829 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1830 lt_cv_path_LD="$ac_dir/$ac_prog"
1831 # Check to see if the program is GNU ld. I'd rather use --version,
1832 # but apparently some GNU ld's only accept -v.
1833 # Break only if it was the GNU/non-GNU ld that we prefer.
1834 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1835 test "$with_gnu_ld" != no && break
1836 else
1837 test "$with_gnu_ld" != yes && break
1840 done
1841 IFS="$ac_save_ifs"
1842 else
1843 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1847 LD="$lt_cv_path_LD"
1848 if test -n "$LD"; then
1849 echo "$ac_t""$LD" 1>&6
1850 else
1851 echo "$ac_t""no" 1>&6
1853 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1854 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1855 echo "configure:1856: checking if the linker ($LD) is GNU ld" >&5
1856 if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1857 echo $ac_n "(cached) $ac_c" 1>&6
1858 else
1859 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1860 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1861 lt_cv_prog_gnu_ld=yes
1862 else
1863 lt_cv_prog_gnu_ld=no
1867 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1868 with_gnu_ld=$lt_cv_prog_gnu_ld
1871 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1872 echo "configure:1873: checking for $LD option to reload object files" >&5
1873 if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1874 echo $ac_n "(cached) $ac_c" 1>&6
1875 else
1876 lt_cv_ld_reload_flag='-r'
1879 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1880 reload_flag=$lt_cv_ld_reload_flag
1881 test -n "$reload_flag" && reload_flag=" $reload_flag"
1883 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1884 echo "configure:1885: checking for BSD-compatible nm" >&5
1885 if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1886 echo $ac_n "(cached) $ac_c" 1>&6
1887 else
1888 if test -n "$NM"; then
1889 # Let the user override the test.
1890 lt_cv_path_NM="$NM"
1891 else
1892 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1893 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1894 test -z "$ac_dir" && ac_dir=.
1895 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1896 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1897 # Check to see if the nm accepts a BSD-compat flag.
1898 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1899 # nm: unknown option "B" ignored
1900 # Tru64's nm complains that /dev/null is an invalid object file
1901 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1902 lt_cv_path_NM="$tmp_nm -B"
1903 break
1904 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1905 lt_cv_path_NM="$tmp_nm -p"
1906 break
1907 else
1908 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1909 continue # so that we can try to find one that supports BSD flags
1912 done
1913 IFS="$ac_save_ifs"
1914 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1918 NM="$lt_cv_path_NM"
1919 echo "$ac_t""$NM" 1>&6
1921 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1922 echo "configure:1923: checking how to recognise dependant libraries" >&5
1923 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1924 echo $ac_n "(cached) $ac_c" 1>&6
1925 else
1926 lt_cv_file_magic_cmd='$MAGIC_CMD'
1927 lt_cv_file_magic_test_file=
1928 lt_cv_deplibs_check_method='unknown'
1929 # Need to set the preceding variable on all platforms that support
1930 # interlibrary dependencies.
1931 # 'none' -- dependencies not supported.
1932 # `unknown' -- same as none, but documents that we really don't know.
1933 # 'pass_all' -- all dependencies passed with no checks.
1934 # 'test_compile' -- check by making test program.
1935 # 'file_magic [regex]' -- check by looking for files in library path
1936 # which responds to the $file_magic_cmd with a given egrep regex.
1937 # If you have `file' or equivalent on your system and you're not sure
1938 # whether `pass_all' will *always* work, you probably want this one.
1940 case $host_os in
1941 aix*)
1942 lt_cv_deplibs_check_method=pass_all
1945 beos*)
1946 lt_cv_deplibs_check_method=pass_all
1949 bsdi4*)
1950 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1951 lt_cv_file_magic_cmd='/usr/bin/file -L'
1952 lt_cv_file_magic_test_file=/shlib/libc.so
1955 cygwin* | mingw* |pw32*)
1956 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1957 lt_cv_file_magic_cmd='$OBJDUMP -f'
1960 darwin* | rhapsody*)
1961 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1962 lt_cv_file_magic_cmd='/usr/bin/file -L'
1963 case "$host_os" in
1964 rhapsody* | darwin1.012)
1965 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1967 *) # Darwin 1.3 on
1968 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1970 esac
1973 freebsd* )
1974 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1975 case $host_cpu in
1976 i*86 )
1977 # Not sure whether the presence of OpenBSD here was a mistake.
1978 # Let's accept both of them until this is cleared up.
1979 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1980 lt_cv_file_magic_cmd=/usr/bin/file
1981 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1983 esac
1984 else
1985 lt_cv_deplibs_check_method=pass_all
1989 gnu*)
1990 lt_cv_deplibs_check_method=pass_all
1993 hpux10.20*|hpux11*)
1994 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1995 lt_cv_file_magic_cmd=/usr/bin/file
1996 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1999 irix5* | irix6*)
2000 case $host_os in
2001 irix5*)
2002 # this will be overridden with pass_all, but let us keep it just in case
2003 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2006 case $LD in
2007 *-32|*"-32 ") libmagic=32-bit;;
2008 *-n32|*"-n32 ") libmagic=N32;;
2009 *-64|*"-64 ") libmagic=64-bit;;
2010 *) libmagic=never-match;;
2011 esac
2012 # this will be overridden with pass_all, but let us keep it just in case
2013 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2015 esac
2016 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2017 lt_cv_deplibs_check_method=pass_all
2020 # This must be Linux ELF.
2021 linux-gnu*)
2022 case $host_cpu in
2023 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2024 lt_cv_deplibs_check_method=pass_all ;;
2026 # glibc up to 2.1.1 does not perform some relocations on ARM
2027 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2028 esac
2029 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2032 netbsd*)
2033 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2034 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2035 else
2036 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2040 newsos6)
2041 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2042 lt_cv_file_magic_cmd=/usr/bin/file
2043 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2046 osf3* | osf4* | osf5*)
2047 # this will be overridden with pass_all, but let us keep it just in case
2048 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2049 lt_cv_file_magic_test_file=/shlib/libc.so
2050 lt_cv_deplibs_check_method=pass_all
2053 sco3.2v5*)
2054 lt_cv_deplibs_check_method=pass_all
2057 solaris*)
2058 lt_cv_deplibs_check_method=pass_all
2059 lt_cv_file_magic_test_file=/lib/libc.so
2062 sysv5uw[78]* | sysv4*uw2*)
2063 lt_cv_deplibs_check_method=pass_all
2066 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2067 case $host_vendor in
2068 ncr)
2069 lt_cv_deplibs_check_method=pass_all
2071 motorola)
2072 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]'
2073 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2075 esac
2077 esac
2081 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2082 file_magic_cmd=$lt_cv_file_magic_cmd
2083 deplibs_check_method=$lt_cv_deplibs_check_method
2085 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2086 echo "configure:2087: checking for object suffix" >&5
2087 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2088 echo $ac_n "(cached) $ac_c" 1>&6
2089 else
2090 rm -f conftest*
2091 echo 'int i = 1;' > conftest.$ac_ext
2092 if { (eval echo configure:2093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2093 for ac_file in conftest.*; do
2094 case $ac_file in
2095 *.c) ;;
2096 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2097 esac
2098 done
2099 else
2100 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2102 rm -f conftest*
2105 echo "$ac_t""$ac_cv_objext" 1>&6
2106 OBJEXT=$ac_cv_objext
2107 ac_objext=$ac_cv_objext
2109 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2111 # Only perform the check for file, if the check method requires it
2112 case $deplibs_check_method in
2113 file_magic*)
2114 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2115 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2116 echo "configure:2117: checking for ${ac_tool_prefix}file" >&5
2117 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2118 echo $ac_n "(cached) $ac_c" 1>&6
2119 else
2120 case $MAGIC_CMD in
2122 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2124 ?:/*)
2125 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2128 ac_save_MAGIC_CMD="$MAGIC_CMD"
2129 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2130 ac_dummy="/usr/bin:$PATH"
2131 for ac_dir in $ac_dummy; do
2132 test -z "$ac_dir" && ac_dir=.
2133 if test -f $ac_dir/${ac_tool_prefix}file; then
2134 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2135 if test -n "$file_magic_test_file"; then
2136 case $deplibs_check_method in
2137 "file_magic "*)
2138 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2139 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2140 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2141 egrep "$file_magic_regex" > /dev/null; then
2143 else
2144 cat <<EOF 1>&2
2146 *** Warning: the command libtool uses to detect shared libraries,
2147 *** $file_magic_cmd, produces output that libtool cannot recognize.
2148 *** The result is that libtool may fail to recognize shared libraries
2149 *** as such. This will affect the creation of libtool libraries that
2150 *** depend on shared libraries, but programs linked with such libtool
2151 *** libraries will work regardless of this problem. Nevertheless, you
2152 *** may want to report the problem to your system manager and/or to
2153 *** bug-libtool@gnu.org
2156 fi ;;
2157 esac
2159 break
2161 done
2162 IFS="$ac_save_ifs"
2163 MAGIC_CMD="$ac_save_MAGIC_CMD"
2165 esac
2168 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2169 if test -n "$MAGIC_CMD"; then
2170 echo "$ac_t""$MAGIC_CMD" 1>&6
2171 else
2172 echo "$ac_t""no" 1>&6
2175 if test -z "$lt_cv_path_MAGIC_CMD"; then
2176 if test -n "$ac_tool_prefix"; then
2177 echo $ac_n "checking for file""... $ac_c" 1>&6
2178 echo "configure:2179: checking for file" >&5
2179 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2180 echo $ac_n "(cached) $ac_c" 1>&6
2181 else
2182 case $MAGIC_CMD in
2184 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2186 ?:/*)
2187 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2190 ac_save_MAGIC_CMD="$MAGIC_CMD"
2191 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2192 ac_dummy="/usr/bin:$PATH"
2193 for ac_dir in $ac_dummy; do
2194 test -z "$ac_dir" && ac_dir=.
2195 if test -f $ac_dir/file; then
2196 lt_cv_path_MAGIC_CMD="$ac_dir/file"
2197 if test -n "$file_magic_test_file"; then
2198 case $deplibs_check_method in
2199 "file_magic "*)
2200 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2201 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2202 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2203 egrep "$file_magic_regex" > /dev/null; then
2205 else
2206 cat <<EOF 1>&2
2208 *** Warning: the command libtool uses to detect shared libraries,
2209 *** $file_magic_cmd, produces output that libtool cannot recognize.
2210 *** The result is that libtool may fail to recognize shared libraries
2211 *** as such. This will affect the creation of libtool libraries that
2212 *** depend on shared libraries, but programs linked with such libtool
2213 *** libraries will work regardless of this problem. Nevertheless, you
2214 *** may want to report the problem to your system manager and/or to
2215 *** bug-libtool@gnu.org
2218 fi ;;
2219 esac
2221 break
2223 done
2224 IFS="$ac_save_ifs"
2225 MAGIC_CMD="$ac_save_MAGIC_CMD"
2227 esac
2230 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2231 if test -n "$MAGIC_CMD"; then
2232 echo "$ac_t""$MAGIC_CMD" 1>&6
2233 else
2234 echo "$ac_t""no" 1>&6
2237 else
2238 MAGIC_CMD=:
2244 esac
2246 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2247 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2248 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2249 echo "configure:2250: checking for $ac_word" >&5
2250 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2251 echo $ac_n "(cached) $ac_c" 1>&6
2252 else
2253 if test -n "$RANLIB"; then
2254 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2255 else
2256 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2257 ac_dummy="$PATH"
2258 for ac_dir in $ac_dummy; do
2259 test -z "$ac_dir" && ac_dir=.
2260 if test -f $ac_dir/$ac_word; then
2261 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2262 break
2264 done
2265 IFS="$ac_save_ifs"
2268 RANLIB="$ac_cv_prog_RANLIB"
2269 if test -n "$RANLIB"; then
2270 echo "$ac_t""$RANLIB" 1>&6
2271 else
2272 echo "$ac_t""no" 1>&6
2276 if test -z "$ac_cv_prog_RANLIB"; then
2277 if test -n "$ac_tool_prefix"; then
2278 # Extract the first word of "ranlib", so it can be a program name with args.
2279 set dummy ranlib; ac_word=$2
2280 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2281 echo "configure:2282: checking for $ac_word" >&5
2282 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2283 echo $ac_n "(cached) $ac_c" 1>&6
2284 else
2285 if test -n "$RANLIB"; then
2286 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2287 else
2288 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2289 ac_dummy="$PATH"
2290 for ac_dir in $ac_dummy; do
2291 test -z "$ac_dir" && ac_dir=.
2292 if test -f $ac_dir/$ac_word; then
2293 ac_cv_prog_RANLIB="ranlib"
2294 break
2296 done
2297 IFS="$ac_save_ifs"
2298 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2301 RANLIB="$ac_cv_prog_RANLIB"
2302 if test -n "$RANLIB"; then
2303 echo "$ac_t""$RANLIB" 1>&6
2304 else
2305 echo "$ac_t""no" 1>&6
2308 else
2309 RANLIB=":"
2313 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2314 set dummy ${ac_tool_prefix}strip; ac_word=$2
2315 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2316 echo "configure:2317: checking for $ac_word" >&5
2317 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2318 echo $ac_n "(cached) $ac_c" 1>&6
2319 else
2320 if test -n "$STRIP"; then
2321 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2322 else
2323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2324 ac_dummy="$PATH"
2325 for ac_dir in $ac_dummy; do
2326 test -z "$ac_dir" && ac_dir=.
2327 if test -f $ac_dir/$ac_word; then
2328 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2329 break
2331 done
2332 IFS="$ac_save_ifs"
2335 STRIP="$ac_cv_prog_STRIP"
2336 if test -n "$STRIP"; then
2337 echo "$ac_t""$STRIP" 1>&6
2338 else
2339 echo "$ac_t""no" 1>&6
2343 if test -z "$ac_cv_prog_STRIP"; then
2344 if test -n "$ac_tool_prefix"; then
2345 # Extract the first word of "strip", so it can be a program name with args.
2346 set dummy strip; ac_word=$2
2347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2348 echo "configure:2349: checking for $ac_word" >&5
2349 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2350 echo $ac_n "(cached) $ac_c" 1>&6
2351 else
2352 if test -n "$STRIP"; then
2353 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2354 else
2355 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2356 ac_dummy="$PATH"
2357 for ac_dir in $ac_dummy; do
2358 test -z "$ac_dir" && ac_dir=.
2359 if test -f $ac_dir/$ac_word; then
2360 ac_cv_prog_STRIP="strip"
2361 break
2363 done
2364 IFS="$ac_save_ifs"
2365 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2368 STRIP="$ac_cv_prog_STRIP"
2369 if test -n "$STRIP"; then
2370 echo "$ac_t""$STRIP" 1>&6
2371 else
2372 echo "$ac_t""no" 1>&6
2375 else
2376 STRIP=":"
2381 # Check for any special flags to pass to ltconfig.
2382 libtool_flags="--cache-file=$cache_file"
2383 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2384 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2385 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2386 test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2387 test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2388 libtool_flags="$libtool_flags --enable-dlopen"
2390 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2391 if test "${enable_libtool_lock+set}" = set; then
2392 enableval="$enable_libtool_lock"
2396 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2397 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2399 # Check whether --with-pic or --without-pic was given.
2400 if test "${with_pic+set}" = set; then
2401 withval="$with_pic"
2402 pic_mode="$withval"
2403 else
2404 pic_mode=default
2407 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2408 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2410 # Some flags need to be propagated to the compiler or linker for good
2411 # libtool support.
2412 case $host in
2413 *-*-irix6*)
2414 # Find out which ABI we are using.
2415 echo '#line 2416 "configure"' > conftest.$ac_ext
2416 if { (eval echo configure:2417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2417 case `/usr/bin/file conftest.$ac_objext` in
2418 *32-bit*)
2419 LD="${LD-ld} -32"
2421 *N32*)
2422 LD="${LD-ld} -n32"
2424 *64-bit*)
2425 LD="${LD-ld} -64"
2427 esac
2429 rm -rf conftest*
2432 *-*-sco3.2v5*)
2433 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2434 SAVE_CFLAGS="$CFLAGS"
2435 CFLAGS="$CFLAGS -belf"
2436 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2437 echo "configure:2438: checking whether the C compiler needs -belf" >&5
2438 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2439 echo $ac_n "(cached) $ac_c" 1>&6
2440 else
2442 ac_ext=c
2443 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2444 ac_cpp='$CPP $CPPFLAGS'
2445 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2446 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2447 cross_compiling=$ac_cv_prog_cc_cross
2449 cat > conftest.$ac_ext <<EOF
2450 #line 2451 "configure"
2451 #include "confdefs.h"
2453 int main() {
2455 ; return 0; }
2457 if { (eval echo configure:2458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2458 rm -rf conftest*
2459 lt_cv_cc_needs_belf=yes
2460 else
2461 echo "configure: failed program was:" >&5
2462 cat conftest.$ac_ext >&5
2463 rm -rf conftest*
2464 lt_cv_cc_needs_belf=no
2466 rm -f conftest*
2467 ac_ext=c
2468 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2469 ac_cpp='$CPP $CPPFLAGS'
2470 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2471 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2472 cross_compiling=$ac_cv_prog_cc_cross
2476 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2477 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2478 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2479 CFLAGS="$SAVE_CFLAGS"
2484 esac
2486 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2487 echo "configure:2488: checking how to run the C++ preprocessor" >&5
2488 if test -z "$CXXCPP"; then
2489 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2490 echo $ac_n "(cached) $ac_c" 1>&6
2491 else
2492 ac_ext=C
2493 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2494 ac_cpp='$CXXCPP $CPPFLAGS'
2495 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2496 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2497 cross_compiling=$ac_cv_prog_cxx_cross
2498 CXXCPP="${CXX-g++} -E"
2499 cat > conftest.$ac_ext <<EOF
2500 #line 2501 "configure"
2501 #include "confdefs.h"
2502 #include <stdlib.h>
2504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2505 { (eval echo configure:2506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2507 if test -z "$ac_err"; then
2509 else
2510 echo "$ac_err" >&5
2511 echo "configure: failed program was:" >&5
2512 cat conftest.$ac_ext >&5
2513 rm -rf conftest*
2514 CXXCPP=/lib/cpp
2516 rm -f conftest*
2517 ac_cv_prog_CXXCPP="$CXXCPP"
2518 ac_ext=c
2519 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2520 ac_cpp='$CPP $CPPFLAGS'
2521 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2522 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2523 cross_compiling=$ac_cv_prog_cc_cross
2526 CXXCPP="$ac_cv_prog_CXXCPP"
2527 echo "$ac_t""$CXXCPP" 1>&6
2530 # Save cache, so that ltconfig can load it
2531 cat > confcache <<\EOF
2532 # This file is a shell script that caches the results of configure
2533 # tests run on this system so they can be shared between configure
2534 # scripts and configure runs. It is not useful on other systems.
2535 # If it contains results you don't want to keep, you may remove or edit it.
2537 # By default, configure uses ./config.cache as the cache file,
2538 # creating it if it does not exist already. You can give configure
2539 # the --cache-file=FILE option to use a different cache file; that is
2540 # what configure does when it calls configure scripts in
2541 # subdirectories, so they share the cache.
2542 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2543 # config.status only pays attention to the cache file if you give it the
2544 # --recheck option to rerun configure.
2547 # The following way of writing the cache mishandles newlines in values,
2548 # but we know of no workaround that is simple, portable, and efficient.
2549 # So, don't put newlines in cache variables' values.
2550 # Ultrix sh set writes to stderr and can't be redirected directly,
2551 # and sets the high bit in the cache file unless we assign to the vars.
2552 (set) 2>&1 |
2553 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2554 *ac_space=\ *)
2555 # `set' does not quote correctly, so add quotes (double-quote substitution
2556 # turns \\\\ into \\, and sed turns \\ into \).
2557 sed -n \
2558 -e "s/'/'\\\\''/g" \
2559 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2562 # `set' quotes correctly as required by POSIX, so do not add quotes.
2563 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2565 esac >> confcache
2566 if cmp -s $cache_file confcache; then
2568 else
2569 if test -w $cache_file; then
2570 echo "updating cache $cache_file"
2571 cat confcache > $cache_file
2572 else
2573 echo "not updating unwritable cache $cache_file"
2576 rm -f confcache
2579 # Actually configure libtool. ac_aux_dir is where install-sh is found.
2580 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2581 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2582 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2583 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2584 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2585 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2586 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2587 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2588 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2590 # Reload cache, that may have been modified by ltconfig
2591 if test -r "$cache_file"; then
2592 echo "loading cache $cache_file"
2593 . $cache_file
2594 else
2595 echo "creating cache $cache_file"
2596 > $cache_file
2600 # This can be used to rebuild libtool when needed
2601 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2603 # Always use our own libtool.
2604 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2606 # Redirect the config.log output again, so that the ltconfig log is not
2607 # clobbered by the next message.
2608 exec 5>>./config.log
2612 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2613 lt_save_CC="$CC"
2614 lt_save_CFLAGS="$CFLAGS"
2615 AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2616 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2617 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2618 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2619 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2620 deplibs_check_method="$deplibs_check_method" \
2621 file_magic_cmd="$file_magic_cmd" \
2622 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2623 --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2624 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2625 CC="$lt_save_CC"
2626 CFLAGS="$lt_save_CFLAGS"
2628 # Redirect the config.log output again, so that the ltconfig log is not
2629 # clobbered by the next message.
2630 exec 5>>./config.log
2637 subdirs="$DIRLTDL"
2640 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2641 COMPPATH=.
2642 else
2643 COMPPATH=..
2649 if test -d $srcdir/testsuite; then
2650 TESTSUBDIR_TRUE=
2651 TESTSUBDIR_FALSE='#'
2652 else
2653 TESTSUBDIR_TRUE='#'
2654 TESTSUBDIR_FALSE=
2657 # Check whether --enable-fast-character or --disable-fast-character was given.
2658 if test "${enable_fast_character+set}" = set; then
2659 enableval="$enable_fast_character"
2660 # Nothing
2662 else
2663 cat >> confdefs.h <<\EOF
2664 #define COMPACT_CHARACTER 1
2670 # Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2671 if test "${enable_getenv_properties+set}" = set; then
2672 enableval="$enable_getenv_properties"
2677 if test -z "$enable_getenv_properties"; then
2678 enable_getenv_properties=${enable_getenv_properties_default-yes}
2680 if test "$enable_getenv_properties" = no; then
2681 cat >> confdefs.h <<\EOF
2682 #define DISABLE_GETENV_PROPERTIES 1
2688 # Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
2689 if test "${enable_hash_synchronization+set}" = set; then
2690 enableval="$enable_hash_synchronization"
2695 if test -z "$enable_hash_synchronization"; then
2696 enable_hash_synchronization=$enable_hash_synchronization_default
2700 LIBGCJDEBUG="false"
2702 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2703 if test "${enable_libgcj_debug+set}" = set; then
2704 enableval="$enable_libgcj_debug"
2705 if test "$enable_libgcj_debug" = yes; then
2706 cat >> confdefs.h <<\EOF
2707 #define DEBUG 1
2710 LIBGCJDEBUG="true"
2715 # Check whether --enable-interpreter or --disable-interpreter was given.
2716 if test "${enable_interpreter+set}" = set; then
2717 enableval="$enable_interpreter"
2718 if test "$enable_interpreter" = yes; then
2719 # This can also be set in configure.host.
2720 libgcj_interpreter=yes
2721 elif test "$enable_interpreter" = no; then
2722 libgcj_interpreter=no
2727 if test "$libgcj_interpreter" = yes; then
2728 cat >> confdefs.h <<\EOF
2729 #define INTERPRETER 1
2734 echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
2735 echo "configure:2736: checking for exception model to use" >&5
2737 ac_ext=C
2738 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2739 ac_cpp='$CXXCPP $CPPFLAGS'
2740 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2741 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2742 cross_compiling=$ac_cv_prog_cxx_cross
2744 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2745 if test "${enable_sjlj_exceptions+set}" = set; then
2746 enableval="$enable_sjlj_exceptions"
2748 else
2749 cat > conftest.$ac_ext << EOF
2750 #line 2751 "configure"
2751 struct S { ~S(); };
2752 void bar();
2753 void foo()
2755 S s;
2756 bar();
2759 old_CXXFLAGS="$CXXFLAGS"
2760 CXXFLAGS=-S
2761 if { (eval echo configure:2762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2762 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2763 enable_sjlj_exceptions=yes
2764 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
2765 enable_sjlj_exceptions=no
2768 CXXFLAGS="$old_CXXFLAGS"
2769 rm -f conftest*
2772 if test x$enable_sjlj_exceptions = xyes; then
2773 cat >> confdefs.h <<\EOF
2774 #define SJLJ_EXCEPTIONS 1
2777 ac_exception_model_name=sjlj
2778 elif test x$enable_sjlj_exceptions = xno; then
2779 ac_exception_model_name="call frame"
2780 else
2781 { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
2783 ac_ext=c
2784 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2785 ac_cpp='$CPP $CPPFLAGS'
2786 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2787 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2788 cross_compiling=$ac_cv_prog_cc_cross
2790 echo "$ac_t""$ac_exception_model_name" 1>&6
2792 # Check whether --enable-java-net or --disable-java-net was given.
2793 if test "${enable_java_net+set}" = set; then
2794 enableval="$enable_java_net"
2799 if test -z "$enable_java_net"; then
2800 enable_java_net=${enable_java_net_default-yes}
2802 if test "$enable_java_net" = no; then
2803 cat >> confdefs.h <<\EOF
2804 #define DISABLE_JAVA_NET 1
2809 # Check whether --with-libffi or --without-libffi was given.
2810 if test "${with_libffi+set}" = set; then
2811 withval="$with_libffi"
2813 else
2814 with_libffi=${with_libffi_default-yes}
2818 LIBFFI=
2819 LIBFFIINCS=
2820 if test "$with_libffi" != no; then
2821 cat >> confdefs.h <<\EOF
2822 #define USE_LIBFFI 1
2825 LIBFFI=../libffi/libfficonvenience.la
2826 LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include'
2831 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2832 if test "${enable_jvmpi+set}" = set; then
2833 enableval="$enable_jvmpi"
2838 if test "$enable_jvmpi" != no; then
2839 cat >> confdefs.h <<\EOF
2840 #define ENABLE_JVMPI 1
2845 TARGET_ECOS="no"
2846 # Check whether --with-ecos or --without-ecos was given.
2847 if test "${with_ecos+set}" = set; then
2848 withval="$with_ecos"
2849 TARGET_ECOS="$with_ecos"
2854 case "$TARGET_ECOS" in
2856 FILE_DESCRIPTOR=natFileDescriptorPosix.cc
2857 PROCESS=${PROCESS-Posix}
2860 FILE_DESCRIPTOR=natFileDescriptorEcos.cc
2861 PROCESS=Ecos
2862 cat >> confdefs.h <<\EOF
2863 #define ECOS 1
2867 esac
2869 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2870 echo "configure:2871: checking how to run the C preprocessor" >&5
2871 # On Suns, sometimes $CPP names a directory.
2872 if test -n "$CPP" && test -d "$CPP"; then
2873 CPP=
2875 if test -z "$CPP"; then
2876 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2877 echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879 # This must be in double quotes, not single quotes, because CPP may get
2880 # substituted into the Makefile and "${CC-cc}" will confuse make.
2881 CPP="${CC-cc} -E"
2882 # On the NeXT, cc -E runs the code through the compiler's parser,
2883 # not just through cpp.
2884 cat > conftest.$ac_ext <<EOF
2885 #line 2886 "configure"
2886 #include "confdefs.h"
2887 #include <assert.h>
2888 Syntax Error
2890 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2891 { (eval echo configure:2892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2892 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2893 if test -z "$ac_err"; then
2895 else
2896 echo "$ac_err" >&5
2897 echo "configure: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
2899 rm -rf conftest*
2900 CPP="${CC-cc} -E -traditional-cpp"
2901 cat > conftest.$ac_ext <<EOF
2902 #line 2903 "configure"
2903 #include "confdefs.h"
2904 #include <assert.h>
2905 Syntax Error
2907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2908 { (eval echo configure:2909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2910 if test -z "$ac_err"; then
2912 else
2913 echo "$ac_err" >&5
2914 echo "configure: failed program was:" >&5
2915 cat conftest.$ac_ext >&5
2916 rm -rf conftest*
2917 CPP="${CC-cc} -nologo -E"
2918 cat > conftest.$ac_ext <<EOF
2919 #line 2920 "configure"
2920 #include "confdefs.h"
2921 #include <assert.h>
2922 Syntax Error
2924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2925 { (eval echo configure:2926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2927 if test -z "$ac_err"; then
2929 else
2930 echo "$ac_err" >&5
2931 echo "configure: failed program was:" >&5
2932 cat conftest.$ac_ext >&5
2933 rm -rf conftest*
2934 CPP=/lib/cpp
2936 rm -f conftest*
2938 rm -f conftest*
2940 rm -f conftest*
2941 ac_cv_prog_CPP="$CPP"
2943 CPP="$ac_cv_prog_CPP"
2944 else
2945 ac_cv_prog_CPP="$CPP"
2947 echo "$ac_t""$CPP" 1>&6
2949 cat > conftest.$ac_ext <<EOF
2950 #line 2951 "configure"
2951 #include "confdefs.h"
2952 #include <stdint.h>
2954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2955 egrep "uint32_t" >/dev/null 2>&1; then
2956 rm -rf conftest*
2957 cat >> confdefs.h <<\EOF
2958 #define HAVE_INT32_DEFINED 1
2962 rm -f conftest*
2964 cat > conftest.$ac_ext <<EOF
2965 #line 2966 "configure"
2966 #include "confdefs.h"
2967 #include <inttypes.h>
2969 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2970 egrep "uint32_t" >/dev/null 2>&1; then
2971 rm -rf conftest*
2972 cat >> confdefs.h <<\EOF
2973 #define HAVE_INT32_DEFINED 1
2977 rm -f conftest*
2979 cat > conftest.$ac_ext <<EOF
2980 #line 2981 "configure"
2981 #include "confdefs.h"
2982 #include <sys/types.h>
2984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2985 egrep "u_int32_t" >/dev/null 2>&1; then
2986 rm -rf conftest*
2987 cat >> confdefs.h <<\EOF
2988 #define HAVE_BSD_INT32_DEFINED 1
2992 rm -f conftest*
2994 cat > conftest.$ac_ext <<EOF
2995 #line 2996 "configure"
2996 #include "confdefs.h"
2997 #include <sys/config.h>
2999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3000 egrep "u_int32_t" >/dev/null 2>&1; then
3001 rm -rf conftest*
3002 cat >> confdefs.h <<\EOF
3003 #define HAVE_BSD_INT32_DEFINED 1
3007 rm -f conftest*
3011 cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3014 #include <time.h>
3016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3017 egrep "mktime" >/dev/null 2>&1; then
3018 rm -rf conftest*
3019 cat >> confdefs.h <<\EOF
3020 #define HAVE_MKTIME 1
3024 rm -f conftest*
3026 cat > conftest.$ac_ext <<EOF
3027 #line 3028 "configure"
3028 #include "confdefs.h"
3029 #include <time.h>
3031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3032 egrep "localtime" >/dev/null 2>&1; then
3033 rm -rf conftest*
3034 cat >> confdefs.h <<\EOF
3035 #define HAVE_LOCALTIME 1
3039 rm -f conftest*
3042 test -d java || mkdir java
3043 test -d java/io || mkdir java/io
3044 test -d gnu || mkdir gnu
3047 test -d java/lang || mkdir java/lang
3051 SYSTEMSPEC=
3054 LIBGCJTESTSPEC="-L`pwd`/.libs -rpath `pwd`/.libs"
3057 # Check whether --with-system-zlib or --without-system-zlib was given.
3058 if test "${with_system_zlib+set}" = set; then
3059 withval="$with_system_zlib"
3063 ZLIBSPEC=
3065 ZLIBTESTSPEC=
3068 libsubdir=.libs
3070 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
3071 echo "configure:3072: checking for garbage collector to use" >&5
3072 # Check whether --enable-java-gc or --disable-java-gc was given.
3073 if test "${enable_java_gc+set}" = set; then
3074 enableval="$enable_java_gc"
3076 GC=$enableval
3077 else
3078 GC=boehm
3081 GCLIBS=
3082 GCINCS=
3083 GCDEPS=
3084 GCOBJS=
3085 GCSPEC=
3086 JC1GCSPEC=
3087 GCTESTSPEC=
3088 case "$GC" in
3089 boehm)
3090 echo "$ac_t""boehm" 1>&6
3091 GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
3092 # We include the path to the boehm-gc build directory.
3093 # See Makefile.am to understand why.
3094 GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
3095 GCINCS='-I$(top_srcdir)/../boehm-gc/include'
3096 GCSPEC='-lgcjgc'
3097 JC1GCSPEC='-fuse-boehm-gc'
3098 GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
3099 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
3100 GCOBJS=boehm.lo
3101 GCHDR=boehm-gc.h
3102 cat >> confdefs.h <<\EOF
3103 #define HAVE_BOEHM_GC 1
3108 echo "$ac_t""none" 1>&6
3109 GCOBJS=nogc.lo
3110 GCHDR=no-gc.h
3113 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
3115 esac
3126 echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
3127 echo "configure:3128: checking for thread model used by GCC" >&5
3128 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
3129 echo "$ac_t""$THREADS" 1>&6
3131 case "$THREADS" in
3132 no | none | single)
3133 THREADS=none
3135 posix | pthreads)
3136 THREADS=posix
3137 case "$host" in
3138 *-*-linux*)
3139 cat >> confdefs.h <<\EOF
3140 #define LINUX_THREADS 1
3144 esac
3146 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
3147 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
3150 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
3152 esac
3154 THREADLIBS=
3155 THREADINCS=
3156 THREADDEPS=
3157 THREADOBJS=
3158 THREADH=
3159 THREADSPEC=
3160 case "$THREADS" in
3161 posix)
3162 case "$host" in
3163 *-*-cygwin*)
3164 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
3167 *-*-freebsd[1234]*)
3169 # Before FreeBSD 5, it didn't have -lpthread (or any library which
3170 # merely adds pthread_* functions) but it does have a -pthread switch
3171 # which is required at link-time to select -lc_r *instead* of -lc.
3172 THREADLIBS=-pthread
3173 # Don't set THREADSPEC here as might be expected since -pthread is
3174 # not processed when found within a spec file, it must come from
3175 # the command line. For now, the user must provide the -pthread
3176 # switch to link code compiled with gcj. In future, consider adding
3177 # support for weak references to pthread_* functions ala gthr.h API.
3178 THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
3180 *-*-freebsd*)
3181 # FreeBSD 5 implements a model much closer to other modern UNIX
3182 # which support threads. However, it still does not support
3183 # -lpthread.
3184 THREADLIBS=-pthread
3185 THREADSPEC=-lc_r
3188 THREADLIBS=-lpthread
3189 THREADSPEC=-lpthread
3191 esac
3192 THREADOBJS=posix-threads.lo
3193 THREADH=posix-threads.h
3194 # MIT pthreads doesn't seem to have the mutexattr functions.
3195 # But for now we don't check for it. We just assume you aren't
3196 # using MIT pthreads.
3197 cat >> confdefs.h <<\EOF
3198 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3202 # If we're using the Boehm GC, then we happen to know that it
3203 # defines _REENTRANT, so we don't bother. Eww.
3204 if test "$GC" != boehm; then
3205 cat >> confdefs.h <<\EOF
3206 #define _REENTRANT 1
3210 cat >> confdefs.h <<\EOF
3211 #define _POSIX_PTHREAD_SEMANTICS 1
3216 none)
3217 THREADOBJS=no-threads.lo
3218 THREADH=no-threads.h
3220 esac
3228 HASH_SYNC_SPEC=
3229 # Hash synchronization is only useful with posix threads right now.
3230 if test "$enable_hash_synchronization" = yes && test "$THREADS" = "posix"; then
3231 HASH_SYNC_SPEC=-fhash-synchronization
3232 cat >> confdefs.h <<\EOF
3233 #define JV_HASH_SYNCHRONIZATION 1
3242 if test "$GCC" = yes; then
3243 USING_GCC_TRUE=
3244 USING_GCC_FALSE='#'
3245 else
3246 USING_GCC_TRUE='#'
3247 USING_GCC_FALSE=
3250 CANADIAN=no
3251 NULL_TARGET=no
3252 NATIVE=yes
3254 # We're in the tree with gcc, and need to include some of its headers.
3255 GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
3257 if test -n "${with_cross_host}"; then
3258 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
3259 # may not work correctly, because the compiler may not be able to
3260 # link executables.
3262 # We assume newlib. This lets us hard-code the functions we know
3263 # we'll have.
3264 cat >> confdefs.h <<\EOF
3265 #define HAVE_MEMMOVE 1
3268 cat >> confdefs.h <<\EOF
3269 #define HAVE_MEMCPY 1
3272 cat >> confdefs.h <<\EOF
3273 #define HAVE_STRERROR 1
3276 cat >> confdefs.h <<\EOF
3277 #define HAVE_GMTIME_R 1
3280 cat >> confdefs.h <<\EOF
3281 #define HAVE_LOCALTIME_R 1
3284 cat >> confdefs.h <<\EOF
3285 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3288 cat >> confdefs.h <<\EOF
3289 #define HAVE_ALLOCA 1
3293 cat >> confdefs.h <<\EOF
3294 #define NO_GETUID 1
3298 ZLIBSPEC=-lzgcj
3299 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
3301 # If Canadian cross, then don't pick up tools from the build
3302 # directory.
3303 if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
3304 CANADIAN=yes
3305 GCC_UNWIND_INCLUDE=
3306 GCJ="${target_alias}-gcj"
3308 NATIVE=no
3309 else
3310 for ac_func in strerror ioctl select fstat open fsync sleep
3312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3313 echo "configure:3314: checking for $ac_func" >&5
3314 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3315 echo $ac_n "(cached) $ac_c" 1>&6
3316 else
3317 cat > conftest.$ac_ext <<EOF
3318 #line 3319 "configure"
3319 #include "confdefs.h"
3320 /* System header to define __stub macros and hopefully few prototypes,
3321 which can conflict with char $ac_func(); below. */
3322 #include <assert.h>
3323 /* Override any gcc2 internal prototype to avoid an error. */
3324 /* We use char because int might match the return type of a gcc2
3325 builtin and then its argument prototype would still apply. */
3326 char $ac_func();
3328 int main() {
3330 /* The GNU C library defines this for functions which it implements
3331 to always fail with ENOSYS. Some functions are actually named
3332 something starting with __ and the normal name is an alias. */
3333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3334 choke me
3335 #else
3336 $ac_func();
3337 #endif
3339 ; return 0; }
3341 if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3342 rm -rf conftest*
3343 eval "ac_cv_func_$ac_func=yes"
3344 else
3345 echo "configure: failed program was:" >&5
3346 cat conftest.$ac_ext >&5
3347 rm -rf conftest*
3348 eval "ac_cv_func_$ac_func=no"
3350 rm -f conftest*
3353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3354 echo "$ac_t""yes" 1>&6
3355 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3356 cat >> confdefs.h <<EOF
3357 #define $ac_tr_func 1
3360 else
3361 echo "$ac_t""no" 1>&6
3363 done
3365 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
3367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3368 echo "configure:3369: checking for $ac_func" >&5
3369 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3370 echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372 cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 /* System header to define __stub macros and hopefully few prototypes,
3376 which can conflict with char $ac_func(); below. */
3377 #include <assert.h>
3378 /* Override any gcc2 internal prototype to avoid an error. */
3379 /* We use char because int might match the return type of a gcc2
3380 builtin and then its argument prototype would still apply. */
3381 char $ac_func();
3383 int main() {
3385 /* The GNU C library defines this for functions which it implements
3386 to always fail with ENOSYS. Some functions are actually named
3387 something starting with __ and the normal name is an alias. */
3388 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3389 choke me
3390 #else
3391 $ac_func();
3392 #endif
3394 ; return 0; }
3396 if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3397 rm -rf conftest*
3398 eval "ac_cv_func_$ac_func=yes"
3399 else
3400 echo "configure: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3402 rm -rf conftest*
3403 eval "ac_cv_func_$ac_func=no"
3405 rm -f conftest*
3408 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3409 echo "$ac_t""yes" 1>&6
3410 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3411 cat >> confdefs.h <<EOF
3412 #define $ac_tr_func 1
3415 else
3416 echo "$ac_t""no" 1>&6
3418 done
3420 for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
3422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3423 echo "configure:3424: checking for $ac_func" >&5
3424 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3425 echo $ac_n "(cached) $ac_c" 1>&6
3426 else
3427 cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430 /* System header to define __stub macros and hopefully few prototypes,
3431 which can conflict with char $ac_func(); below. */
3432 #include <assert.h>
3433 /* Override any gcc2 internal prototype to avoid an error. */
3434 /* We use char because int might match the return type of a gcc2
3435 builtin and then its argument prototype would still apply. */
3436 char $ac_func();
3438 int main() {
3440 /* The GNU C library defines this for functions which it implements
3441 to always fail with ENOSYS. Some functions are actually named
3442 something starting with __ and the normal name is an alias. */
3443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3444 choke me
3445 #else
3446 $ac_func();
3447 #endif
3449 ; return 0; }
3451 if { (eval echo configure:3452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3452 rm -rf conftest*
3453 eval "ac_cv_func_$ac_func=yes"
3454 else
3455 echo "configure: failed program was:" >&5
3456 cat conftest.$ac_ext >&5
3457 rm -rf conftest*
3458 eval "ac_cv_func_$ac_func=no"
3460 rm -f conftest*
3463 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3464 echo "$ac_t""yes" 1>&6
3465 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3466 cat >> confdefs.h <<EOF
3467 #define $ac_tr_func 1
3470 else
3471 echo "$ac_t""no" 1>&6
3473 done
3475 for ac_func in nl_langinfo setlocale
3477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3478 echo "configure:3479: checking for $ac_func" >&5
3479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3480 echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482 cat > conftest.$ac_ext <<EOF
3483 #line 3484 "configure"
3484 #include "confdefs.h"
3485 /* System header to define __stub macros and hopefully few prototypes,
3486 which can conflict with char $ac_func(); below. */
3487 #include <assert.h>
3488 /* Override any gcc2 internal prototype to avoid an error. */
3489 /* We use char because int might match the return type of a gcc2
3490 builtin and then its argument prototype would still apply. */
3491 char $ac_func();
3493 int main() {
3495 /* The GNU C library defines this for functions which it implements
3496 to always fail with ENOSYS. Some functions are actually named
3497 something starting with __ and the normal name is an alias. */
3498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3499 choke me
3500 #else
3501 $ac_func();
3502 #endif
3504 ; return 0; }
3506 if { (eval echo configure:3507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3507 rm -rf conftest*
3508 eval "ac_cv_func_$ac_func=yes"
3509 else
3510 echo "configure: failed program was:" >&5
3511 cat conftest.$ac_ext >&5
3512 rm -rf conftest*
3513 eval "ac_cv_func_$ac_func=no"
3515 rm -f conftest*
3518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3519 echo "$ac_t""yes" 1>&6
3520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3521 cat >> confdefs.h <<EOF
3522 #define $ac_tr_func 1
3525 else
3526 echo "$ac_t""no" 1>&6
3528 done
3530 for ac_func in inet_aton inet_addr
3532 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3533 echo "configure:3534: checking for $ac_func" >&5
3534 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3535 echo $ac_n "(cached) $ac_c" 1>&6
3536 else
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540 /* System header to define __stub macros and hopefully few prototypes,
3541 which can conflict with char $ac_func(); below. */
3542 #include <assert.h>
3543 /* Override any gcc2 internal prototype to avoid an error. */
3544 /* We use char because int might match the return type of a gcc2
3545 builtin and then its argument prototype would still apply. */
3546 char $ac_func();
3548 int main() {
3550 /* The GNU C library defines this for functions which it implements
3551 to always fail with ENOSYS. Some functions are actually named
3552 something starting with __ and the normal name is an alias. */
3553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3554 choke me
3555 #else
3556 $ac_func();
3557 #endif
3559 ; return 0; }
3561 if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3562 rm -rf conftest*
3563 eval "ac_cv_func_$ac_func=yes"
3564 else
3565 echo "configure: failed program was:" >&5
3566 cat conftest.$ac_ext >&5
3567 rm -rf conftest*
3568 eval "ac_cv_func_$ac_func=no"
3570 rm -f conftest*
3573 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3574 echo "$ac_t""yes" 1>&6
3575 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3576 cat >> confdefs.h <<EOF
3577 #define $ac_tr_func 1
3579 break
3580 else
3581 echo "$ac_t""no" 1>&6
3583 done
3585 for ac_func in inet_pton uname inet_ntoa
3587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3588 echo "configure:3589: checking for $ac_func" >&5
3589 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3590 echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592 cat > conftest.$ac_ext <<EOF
3593 #line 3594 "configure"
3594 #include "confdefs.h"
3595 /* System header to define __stub macros and hopefully few prototypes,
3596 which can conflict with char $ac_func(); below. */
3597 #include <assert.h>
3598 /* Override any gcc2 internal prototype to avoid an error. */
3599 /* We use char because int might match the return type of a gcc2
3600 builtin and then its argument prototype would still apply. */
3601 char $ac_func();
3603 int main() {
3605 /* The GNU C library defines this for functions which it implements
3606 to always fail with ENOSYS. Some functions are actually named
3607 something starting with __ and the normal name is an alias. */
3608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3609 choke me
3610 #else
3611 $ac_func();
3612 #endif
3614 ; return 0; }
3616 if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3617 rm -rf conftest*
3618 eval "ac_cv_func_$ac_func=yes"
3619 else
3620 echo "configure: failed program was:" >&5
3621 cat conftest.$ac_ext >&5
3622 rm -rf conftest*
3623 eval "ac_cv_func_$ac_func=no"
3625 rm -f conftest*
3628 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3629 echo "$ac_t""yes" 1>&6
3630 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3631 cat >> confdefs.h <<EOF
3632 #define $ac_tr_func 1
3635 else
3636 echo "$ac_t""no" 1>&6
3638 done
3640 for ac_func in backtrace fork execvp pipe sigaction
3642 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3643 echo "configure:3644: checking for $ac_func" >&5
3644 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3645 echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647 cat > conftest.$ac_ext <<EOF
3648 #line 3649 "configure"
3649 #include "confdefs.h"
3650 /* System header to define __stub macros and hopefully few prototypes,
3651 which can conflict with char $ac_func(); below. */
3652 #include <assert.h>
3653 /* Override any gcc2 internal prototype to avoid an error. */
3654 /* We use char because int might match the return type of a gcc2
3655 builtin and then its argument prototype would still apply. */
3656 char $ac_func();
3658 int main() {
3660 /* The GNU C library defines this for functions which it implements
3661 to always fail with ENOSYS. Some functions are actually named
3662 something starting with __ and the normal name is an alias. */
3663 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3664 choke me
3665 #else
3666 $ac_func();
3667 #endif
3669 ; return 0; }
3671 if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3672 rm -rf conftest*
3673 eval "ac_cv_func_$ac_func=yes"
3674 else
3675 echo "configure: failed program was:" >&5
3676 cat conftest.$ac_ext >&5
3677 rm -rf conftest*
3678 eval "ac_cv_func_$ac_func=no"
3680 rm -f conftest*
3683 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3684 echo "$ac_t""yes" 1>&6
3685 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3686 cat >> confdefs.h <<EOF
3687 #define $ac_tr_func 1
3690 else
3691 echo "$ac_t""no" 1>&6
3693 done
3695 for ac_hdr in execinfo.h unistd.h dlfcn.h
3697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3699 echo "configure:3700: checking for $ac_hdr" >&5
3700 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3701 echo $ac_n "(cached) $ac_c" 1>&6
3702 else
3703 cat > conftest.$ac_ext <<EOF
3704 #line 3705 "configure"
3705 #include "confdefs.h"
3706 #include <$ac_hdr>
3708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3709 { (eval echo configure:3710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3711 if test -z "$ac_err"; then
3712 rm -rf conftest*
3713 eval "ac_cv_header_$ac_safe=yes"
3714 else
3715 echo "$ac_err" >&5
3716 echo "configure: failed program was:" >&5
3717 cat conftest.$ac_ext >&5
3718 rm -rf conftest*
3719 eval "ac_cv_header_$ac_safe=no"
3721 rm -f conftest*
3723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3724 echo "$ac_t""yes" 1>&6
3725 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3726 cat >> confdefs.h <<EOF
3727 #define $ac_tr_hdr 1
3730 else
3731 echo "$ac_t""no" 1>&6
3733 done
3735 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3736 echo "configure:3737: checking for dladdr in -ldl" >&5
3737 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3738 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3739 echo $ac_n "(cached) $ac_c" 1>&6
3740 else
3741 ac_save_LIBS="$LIBS"
3742 LIBS="-ldl $LIBS"
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 /* Override any gcc2 internal prototype to avoid an error. */
3747 /* We use char because int might match the return type of a gcc2
3748 builtin and then its argument prototype would still apply. */
3749 char dladdr();
3751 int main() {
3752 dladdr()
3753 ; return 0; }
3755 if { (eval echo configure:3756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3756 rm -rf conftest*
3757 eval "ac_cv_lib_$ac_lib_var=yes"
3758 else
3759 echo "configure: failed program was:" >&5
3760 cat conftest.$ac_ext >&5
3761 rm -rf conftest*
3762 eval "ac_cv_lib_$ac_lib_var=no"
3764 rm -f conftest*
3765 LIBS="$ac_save_LIBS"
3768 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3769 echo "$ac_t""yes" 1>&6
3771 cat >> confdefs.h <<\EOF
3772 #define HAVE_DLADDR 1
3775 else
3776 echo "$ac_t""no" 1>&6
3779 for ac_file in /proc/self/exe
3782 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3783 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3784 echo "configure:3785: checking for $ac_file" >&5
3785 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3786 echo $ac_n "(cached) $ac_c" 1>&6
3787 else
3788 if test "$cross_compiling" = yes; then
3789 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3790 else
3791 if test -r $ac_file; then
3792 eval "ac_cv_file_$ac_safe=yes"
3793 else
3794 eval "ac_cv_file_$ac_safe=no"
3798 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3799 echo "$ac_t""yes" 1>&6
3800 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3801 cat >> confdefs.h <<EOF
3802 #define $ac_tr_file 1
3805 cat >> confdefs.h <<\EOF
3806 #define HAVE_PROC_SELF_EXE 1
3809 else
3810 echo "$ac_t""no" 1>&6
3813 done
3818 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
3819 if test "${with_libiconv_prefix+set}" = set; then
3820 withval="$with_libiconv_prefix"
3822 for dir in `echo "$withval" | tr : ' '`; do
3823 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
3824 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
3825 done
3830 echo $ac_n "checking for iconv""... $ac_c" 1>&6
3831 echo "configure:3832: checking for iconv" >&5
3832 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
3833 echo $ac_n "(cached) $ac_c" 1>&6
3834 else
3836 am_cv_func_iconv="no, consider installing GNU libiconv"
3837 am_cv_lib_iconv=no
3838 cat > conftest.$ac_ext <<EOF
3839 #line 3840 "configure"
3840 #include "confdefs.h"
3841 #include <stdlib.h>
3842 #include <iconv.h>
3843 int main() {
3844 iconv_t cd = iconv_open("","");
3845 iconv(cd,NULL,NULL,NULL,NULL);
3846 iconv_close(cd);
3847 ; return 0; }
3849 if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3850 rm -rf conftest*
3851 am_cv_func_iconv=yes
3852 else
3853 echo "configure: failed program was:" >&5
3854 cat conftest.$ac_ext >&5
3856 rm -f conftest*
3857 if test "$am_cv_func_iconv" != yes; then
3858 am_save_LIBS="$LIBS"
3859 LIBS="$LIBS -liconv"
3860 cat > conftest.$ac_ext <<EOF
3861 #line 3862 "configure"
3862 #include "confdefs.h"
3863 #include <stdlib.h>
3864 #include <iconv.h>
3865 int main() {
3866 iconv_t cd = iconv_open("","");
3867 iconv(cd,NULL,NULL,NULL,NULL);
3868 iconv_close(cd);
3869 ; return 0; }
3871 if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3872 rm -rf conftest*
3873 am_cv_lib_iconv=yes
3874 am_cv_func_iconv=yes
3875 else
3876 echo "configure: failed program was:" >&5
3877 cat conftest.$ac_ext >&5
3879 rm -f conftest*
3880 LIBS="$am_save_LIBS"
3885 echo "$ac_t""$am_cv_func_iconv" 1>&6
3886 if test "$am_cv_func_iconv" = yes; then
3887 cat >> confdefs.h <<\EOF
3888 #define HAVE_ICONV 1
3891 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
3892 echo "configure:3893: checking for iconv declaration" >&5
3893 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
3894 echo $ac_n "(cached) $ac_c" 1>&6
3895 else
3897 cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3901 #include <stdlib.h>
3902 #include <iconv.h>
3903 extern
3904 #ifdef __cplusplus
3906 #endif
3907 #if defined(__STDC__) || defined(__cplusplus)
3908 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
3909 #else
3910 size_t iconv();
3911 #endif
3913 int main() {
3915 ; return 0; }
3917 if { (eval echo configure:3918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3918 rm -rf conftest*
3919 am_cv_proto_iconv_arg1=""
3920 else
3921 echo "configure: failed program was:" >&5
3922 cat conftest.$ac_ext >&5
3923 rm -rf conftest*
3924 am_cv_proto_iconv_arg1="const"
3926 rm -f conftest*
3927 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);"
3930 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
3931 echo "$ac_t""${ac_t:-
3932 }$am_cv_proto_iconv" 1>&6
3933 cat >> confdefs.h <<EOF
3934 #define ICONV_CONST $am_cv_proto_iconv_arg1
3938 LIBICONV=
3939 if test "$am_cv_lib_iconv" = yes; then
3940 LIBICONV="-liconv"
3945 for ac_func in gethostbyname_r
3947 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3948 echo "configure:3949: checking for $ac_func" >&5
3949 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 $ac_func(); 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 $ac_func();
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_$ac_func) || defined (__stub___$ac_func)
3969 choke me
3970 #else
3971 $ac_func();
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_$ac_func=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_$ac_func=no"
3985 rm -f conftest*
3988 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3989 echo "$ac_t""yes" 1>&6
3990 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3991 cat >> confdefs.h <<EOF
3992 #define $ac_tr_func 1
3995 cat >> confdefs.h <<\EOF
3996 #define HAVE_GETHOSTBYNAME_R 1
3999 # There are two different kinds of gethostbyname_r.
4000 # We look for the one that returns `int'.
4001 # Hopefully this check is robust enough.
4002 cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4005 #include <netdb.h>
4007 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4008 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
4009 rm -rf conftest*
4011 cat >> confdefs.h <<\EOF
4012 #define GETHOSTBYNAME_R_RETURNS_INT 1
4016 rm -f conftest*
4019 case " $GCINCS " in
4020 *" -D_REENTRANT "*) ;;
4022 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
4023 echo "configure:4024: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
4024 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
4025 echo $ac_n "(cached) $ac_c" 1>&6
4026 else
4028 ac_ext=C
4029 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4030 ac_cpp='$CXXCPP $CPPFLAGS'
4031 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4032 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4033 cross_compiling=$ac_cv_prog_cxx_cross
4035 cat > conftest.$ac_ext <<EOF
4036 #line 4037 "configure"
4037 #include "confdefs.h"
4038 #include <netdb.h>
4039 int main() {
4040 gethostbyname_r("", 0, 0);
4041 ; return 0; }
4043 if { (eval echo configure:4044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4044 rm -rf conftest*
4045 libjava_cv_gethostbyname_r_needs_reentrant=no
4046 else
4047 echo "configure: failed program was:" >&5
4048 cat conftest.$ac_ext >&5
4049 rm -rf conftest*
4050 CPPFLAGS_SAVE="$CPPFLAGS"
4051 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4052 cat > conftest.$ac_ext <<EOF
4053 #line 4054 "configure"
4054 #include "confdefs.h"
4055 #include <netdb.h>
4056 int main() {
4057 gethostbyname_r("", 0, 0);
4058 ; return 0; }
4060 if { (eval echo configure:4061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4061 rm -rf conftest*
4062 libjava_cv_gethostbyname_r_needs_reentrant=yes
4063 else
4064 echo "configure: failed program was:" >&5
4065 cat conftest.$ac_ext >&5
4066 rm -rf conftest*
4067 libjava_cv_gethostbyname_r_needs_reentrant=fail
4069 rm -f conftest*
4070 CPPFLAGS="$CPPFLAGS_SAVE"
4073 rm -f conftest*
4074 ac_ext=c
4075 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4076 ac_cpp='$CPP $CPPFLAGS'
4077 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4078 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4079 cross_compiling=$ac_cv_prog_cc_cross
4084 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
4085 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
4086 cat >> confdefs.h <<\EOF
4087 #define _REENTRANT 1
4092 esac
4094 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
4095 echo "configure:4096: checking for struct hostent_data" >&5
4096 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
4097 echo $ac_n "(cached) $ac_c" 1>&6
4098 else
4099 cat > conftest.$ac_ext <<EOF
4100 #line 4101 "configure"
4101 #include "confdefs.h"
4103 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
4104 # define _REENTRANT 1
4105 #endif
4106 #include <netdb.h>
4107 int main() {
4108 struct hostent_data data;
4109 ; return 0; }
4111 if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4112 rm -rf conftest*
4113 libjava_cv_struct_hostent_data=yes
4114 else
4115 echo "configure: failed program was:" >&5
4116 cat conftest.$ac_ext >&5
4117 rm -rf conftest*
4118 libjava_cv_struct_hostent_data=no
4120 rm -f conftest*
4123 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
4124 if test "x$libjava_cv_struct_hostent_data" = xyes; then
4125 cat >> confdefs.h <<\EOF
4126 #define HAVE_STRUCT_HOSTENT_DATA 1
4131 else
4132 echo "$ac_t""no" 1>&6
4134 done
4137 # FIXME: libjava source code expects to find a prototype for
4138 # gethostbyaddr_r in netdb.h. The outer check ensures that
4139 # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
4140 # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
4141 # linkage check is enough, yet C++ code requires proper prototypes.)
4142 cat > conftest.$ac_ext <<EOF
4143 #line 4144 "configure"
4144 #include "confdefs.h"
4145 #include <netdb.h>
4147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4148 egrep "gethostbyaddr_r" >/dev/null 2>&1; then
4149 rm -rf conftest*
4151 for ac_func in gethostbyaddr_r
4153 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4154 echo "configure:4155: checking for $ac_func" >&5
4155 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4156 echo $ac_n "(cached) $ac_c" 1>&6
4157 else
4158 cat > conftest.$ac_ext <<EOF
4159 #line 4160 "configure"
4160 #include "confdefs.h"
4161 /* System header to define __stub macros and hopefully few prototypes,
4162 which can conflict with char $ac_func(); below. */
4163 #include <assert.h>
4164 /* Override any gcc2 internal prototype to avoid an error. */
4165 /* We use char because int might match the return type of a gcc2
4166 builtin and then its argument prototype would still apply. */
4167 char $ac_func();
4169 int main() {
4171 /* The GNU C library defines this for functions which it implements
4172 to always fail with ENOSYS. Some functions are actually named
4173 something starting with __ and the normal name is an alias. */
4174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4175 choke me
4176 #else
4177 $ac_func();
4178 #endif
4180 ; return 0; }
4182 if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4183 rm -rf conftest*
4184 eval "ac_cv_func_$ac_func=yes"
4185 else
4186 echo "configure: failed program was:" >&5
4187 cat conftest.$ac_ext >&5
4188 rm -rf conftest*
4189 eval "ac_cv_func_$ac_func=no"
4191 rm -f conftest*
4194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4195 echo "$ac_t""yes" 1>&6
4196 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4197 cat >> confdefs.h <<EOF
4198 #define $ac_tr_func 1
4201 cat >> confdefs.h <<\EOF
4202 #define HAVE_GETHOSTBYADDR_R 1
4205 # There are two different kinds of gethostbyaddr_r.
4206 # We look for the one that returns `int'.
4207 # Hopefully this check is robust enough.
4208 cat > conftest.$ac_ext <<EOF
4209 #line 4210 "configure"
4210 #include "confdefs.h"
4211 #include <netdb.h>
4213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4214 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
4215 rm -rf conftest*
4217 cat >> confdefs.h <<\EOF
4218 #define GETHOSTBYADDR_R_RETURNS_INT 1
4222 rm -f conftest*
4224 else
4225 echo "$ac_t""no" 1>&6
4227 done
4230 rm -f conftest*
4233 for ac_func in gethostname
4235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4236 echo "configure:4237: checking for $ac_func" >&5
4237 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4238 echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240 cat > conftest.$ac_ext <<EOF
4241 #line 4242 "configure"
4242 #include "confdefs.h"
4243 /* System header to define __stub macros and hopefully few prototypes,
4244 which can conflict with char $ac_func(); below. */
4245 #include <assert.h>
4246 /* Override any gcc2 internal prototype to avoid an error. */
4247 /* We use char because int might match the return type of a gcc2
4248 builtin and then its argument prototype would still apply. */
4249 char $ac_func();
4251 int main() {
4253 /* The GNU C library defines this for functions which it implements
4254 to always fail with ENOSYS. Some functions are actually named
4255 something starting with __ and the normal name is an alias. */
4256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4257 choke me
4258 #else
4259 $ac_func();
4260 #endif
4262 ; return 0; }
4264 if { (eval echo configure:4265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4265 rm -rf conftest*
4266 eval "ac_cv_func_$ac_func=yes"
4267 else
4268 echo "configure: failed program was:" >&5
4269 cat conftest.$ac_ext >&5
4270 rm -rf conftest*
4271 eval "ac_cv_func_$ac_func=no"
4273 rm -f conftest*
4276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4277 echo "$ac_t""yes" 1>&6
4278 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4279 cat >> confdefs.h <<EOF
4280 #define $ac_tr_func 1
4283 cat >> confdefs.h <<\EOF
4284 #define HAVE_GETHOSTNAME 1
4287 cat > conftest.$ac_ext <<EOF
4288 #line 4289 "configure"
4289 #include "confdefs.h"
4290 #include <unistd.h>
4292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4293 egrep "gethostname" >/dev/null 2>&1; then
4294 rm -rf conftest*
4296 cat >> confdefs.h <<\EOF
4297 #define HAVE_GETHOSTNAME_DECL 1
4301 rm -f conftest*
4303 else
4304 echo "$ac_t""no" 1>&6
4306 done
4309 # Look for these functions in the thread library, but only bother
4310 # if using POSIX threads.
4311 if test "$THREADS" = posix; then
4312 save_LIBS="$LIBS"
4313 LIBS="$LIBS $THREADLIBS"
4314 # Some POSIX thread systems don't have pthread_mutexattr_settype.
4315 # E.g., Solaris.
4316 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
4318 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4319 echo "configure:4320: checking for $ac_func" >&5
4320 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4321 echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323 cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 /* System header to define __stub macros and hopefully few prototypes,
4327 which can conflict with char $ac_func(); below. */
4328 #include <assert.h>
4329 /* Override any gcc2 internal prototype to avoid an error. */
4330 /* We use char because int might match the return type of a gcc2
4331 builtin and then its argument prototype would still apply. */
4332 char $ac_func();
4334 int main() {
4336 /* The GNU C library defines this for functions which it implements
4337 to always fail with ENOSYS. Some functions are actually named
4338 something starting with __ and the normal name is an alias. */
4339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4340 choke me
4341 #else
4342 $ac_func();
4343 #endif
4345 ; return 0; }
4347 if { (eval echo configure:4348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4348 rm -rf conftest*
4349 eval "ac_cv_func_$ac_func=yes"
4350 else
4351 echo "configure: failed program was:" >&5
4352 cat conftest.$ac_ext >&5
4353 rm -rf conftest*
4354 eval "ac_cv_func_$ac_func=no"
4356 rm -f conftest*
4359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4360 echo "$ac_t""yes" 1>&6
4361 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4362 cat >> confdefs.h <<EOF
4363 #define $ac_tr_func 1
4366 else
4367 echo "$ac_t""no" 1>&6
4369 done
4372 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
4373 # Solaris 7 the name librt is preferred.
4374 for ac_func in sched_yield
4376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4377 echo "configure:4378: checking for $ac_func" >&5
4378 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4379 echo $ac_n "(cached) $ac_c" 1>&6
4380 else
4381 cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384 /* System header to define __stub macros and hopefully few prototypes,
4385 which can conflict with char $ac_func(); below. */
4386 #include <assert.h>
4387 /* Override any gcc2 internal prototype to avoid an error. */
4388 /* We use char because int might match the return type of a gcc2
4389 builtin and then its argument prototype would still apply. */
4390 char $ac_func();
4392 int main() {
4394 /* The GNU C library defines this for functions which it implements
4395 to always fail with ENOSYS. Some functions are actually named
4396 something starting with __ and the normal name is an alias. */
4397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4398 choke me
4399 #else
4400 $ac_func();
4401 #endif
4403 ; return 0; }
4405 if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4406 rm -rf conftest*
4407 eval "ac_cv_func_$ac_func=yes"
4408 else
4409 echo "configure: failed program was:" >&5
4410 cat conftest.$ac_ext >&5
4411 rm -rf conftest*
4412 eval "ac_cv_func_$ac_func=no"
4414 rm -f conftest*
4417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4418 echo "$ac_t""yes" 1>&6
4419 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4420 cat >> confdefs.h <<EOF
4421 #define $ac_tr_func 1
4424 else
4425 echo "$ac_t""no" 1>&6
4426 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4427 echo "configure:4428: checking for sched_yield in -lrt" >&5
4428 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4429 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4430 echo $ac_n "(cached) $ac_c" 1>&6
4431 else
4432 ac_save_LIBS="$LIBS"
4433 LIBS="-lrt $LIBS"
4434 cat > conftest.$ac_ext <<EOF
4435 #line 4436 "configure"
4436 #include "confdefs.h"
4437 /* Override any gcc2 internal prototype to avoid an error. */
4438 /* We use char because int might match the return type of a gcc2
4439 builtin and then its argument prototype would still apply. */
4440 char sched_yield();
4442 int main() {
4443 sched_yield()
4444 ; return 0; }
4446 if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4447 rm -rf conftest*
4448 eval "ac_cv_lib_$ac_lib_var=yes"
4449 else
4450 echo "configure: failed program was:" >&5
4451 cat conftest.$ac_ext >&5
4452 rm -rf conftest*
4453 eval "ac_cv_lib_$ac_lib_var=no"
4455 rm -f conftest*
4456 LIBS="$ac_save_LIBS"
4459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4460 echo "$ac_t""yes" 1>&6
4462 cat >> confdefs.h <<\EOF
4463 #define HAVE_SCHED_YIELD 1
4466 THREADLIBS="$THREADLIBS -lrt"
4467 THREADSPEC="$THREADSPEC -lrt"
4468 else
4469 echo "$ac_t""no" 1>&6
4471 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
4472 echo "configure:4473: checking for sched_yield in -lposix4" >&5
4473 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
4474 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4475 echo $ac_n "(cached) $ac_c" 1>&6
4476 else
4477 ac_save_LIBS="$LIBS"
4478 LIBS="-lposix4 $LIBS"
4479 cat > conftest.$ac_ext <<EOF
4480 #line 4481 "configure"
4481 #include "confdefs.h"
4482 /* Override any gcc2 internal prototype to avoid an error. */
4483 /* We use char because int might match the return type of a gcc2
4484 builtin and then its argument prototype would still apply. */
4485 char sched_yield();
4487 int main() {
4488 sched_yield()
4489 ; return 0; }
4491 if { (eval echo configure:4492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4492 rm -rf conftest*
4493 eval "ac_cv_lib_$ac_lib_var=yes"
4494 else
4495 echo "configure: failed program was:" >&5
4496 cat conftest.$ac_ext >&5
4497 rm -rf conftest*
4498 eval "ac_cv_lib_$ac_lib_var=no"
4500 rm -f conftest*
4501 LIBS="$ac_save_LIBS"
4504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4505 echo "$ac_t""yes" 1>&6
4507 cat >> confdefs.h <<\EOF
4508 #define HAVE_SCHED_YIELD 1
4511 THREADLIBS="$THREADLIBS -lposix4"
4512 THREADSPEC="$THREADSPEC -lposix4"
4513 else
4514 echo "$ac_t""no" 1>&6
4520 done
4522 LIBS="$save_LIBS"
4524 # We can save a little space at runtime if the mutex has m_count
4525 # or __m_count. This is a nice hack for Linux.
4526 cat > conftest.$ac_ext <<EOF
4527 #line 4528 "configure"
4528 #include "confdefs.h"
4529 #include <pthread.h>
4530 int main() {
4532 extern pthread_mutex_t *mutex; int q = mutex->m_count;
4534 ; return 0; }
4536 if { (eval echo configure:4537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4537 rm -rf conftest*
4538 cat >> confdefs.h <<\EOF
4539 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
4542 else
4543 echo "configure: failed program was:" >&5
4544 cat conftest.$ac_ext >&5
4545 rm -rf conftest*
4547 cat > conftest.$ac_ext <<EOF
4548 #line 4549 "configure"
4549 #include "confdefs.h"
4550 #include <pthread.h>
4551 int main() {
4553 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
4555 ; return 0; }
4557 if { (eval echo configure:4558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4558 rm -rf conftest*
4559 cat >> confdefs.h <<\EOF
4560 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
4563 else
4564 echo "configure: failed program was:" >&5
4565 cat conftest.$ac_ext >&5
4567 rm -f conftest*
4569 rm -f conftest*
4572 # We require a way to get the time.
4573 time_found=no
4574 for ac_func in gettimeofday time ftime
4576 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4577 echo "configure:4578: checking for $ac_func" >&5
4578 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4579 echo $ac_n "(cached) $ac_c" 1>&6
4580 else
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 /* System header to define __stub macros and hopefully few prototypes,
4585 which can conflict with char $ac_func(); below. */
4586 #include <assert.h>
4587 /* Override any gcc2 internal prototype to avoid an error. */
4588 /* We use char because int might match the return type of a gcc2
4589 builtin and then its argument prototype would still apply. */
4590 char $ac_func();
4592 int main() {
4594 /* The GNU C library defines this for functions which it implements
4595 to always fail with ENOSYS. Some functions are actually named
4596 something starting with __ and the normal name is an alias. */
4597 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4598 choke me
4599 #else
4600 $ac_func();
4601 #endif
4603 ; return 0; }
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606 rm -rf conftest*
4607 eval "ac_cv_func_$ac_func=yes"
4608 else
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4611 rm -rf conftest*
4612 eval "ac_cv_func_$ac_func=no"
4614 rm -f conftest*
4617 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4618 echo "$ac_t""yes" 1>&6
4619 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4620 cat >> confdefs.h <<EOF
4621 #define $ac_tr_func 1
4623 time_found=yes
4624 else
4625 echo "$ac_t""no" 1>&6
4627 done
4629 if test "$time_found" = no; then
4630 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
4633 for ac_func in memmove
4635 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4636 echo "configure:4637: checking for $ac_func" >&5
4637 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4638 echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640 cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 /* System header to define __stub macros and hopefully few prototypes,
4644 which can conflict with char $ac_func(); below. */
4645 #include <assert.h>
4646 /* Override any gcc2 internal prototype to avoid an error. */
4647 /* We use char because int might match the return type of a gcc2
4648 builtin and then its argument prototype would still apply. */
4649 char $ac_func();
4651 int main() {
4653 /* The GNU C library defines this for functions which it implements
4654 to always fail with ENOSYS. Some functions are actually named
4655 something starting with __ and the normal name is an alias. */
4656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4657 choke me
4658 #else
4659 $ac_func();
4660 #endif
4662 ; return 0; }
4664 if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4665 rm -rf conftest*
4666 eval "ac_cv_func_$ac_func=yes"
4667 else
4668 echo "configure: failed program was:" >&5
4669 cat conftest.$ac_ext >&5
4670 rm -rf conftest*
4671 eval "ac_cv_func_$ac_func=no"
4673 rm -f conftest*
4676 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4677 echo "$ac_t""yes" 1>&6
4678 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4679 cat >> confdefs.h <<EOF
4680 #define $ac_tr_func 1
4683 else
4684 echo "$ac_t""no" 1>&6
4686 done
4689 # We require memcpy.
4690 memcpy_found=no
4691 for ac_func in memcpy
4693 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4694 echo "configure:4695: checking for $ac_func" >&5
4695 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4696 echo $ac_n "(cached) $ac_c" 1>&6
4697 else
4698 cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 /* System header to define __stub macros and hopefully few prototypes,
4702 which can conflict with char $ac_func(); below. */
4703 #include <assert.h>
4704 /* Override any gcc2 internal prototype to avoid an error. */
4705 /* We use char because int might match the return type of a gcc2
4706 builtin and then its argument prototype would still apply. */
4707 char $ac_func();
4709 int main() {
4711 /* The GNU C library defines this for functions which it implements
4712 to always fail with ENOSYS. Some functions are actually named
4713 something starting with __ and the normal name is an alias. */
4714 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4715 choke me
4716 #else
4717 $ac_func();
4718 #endif
4720 ; return 0; }
4722 if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4723 rm -rf conftest*
4724 eval "ac_cv_func_$ac_func=yes"
4725 else
4726 echo "configure: failed program was:" >&5
4727 cat conftest.$ac_ext >&5
4728 rm -rf conftest*
4729 eval "ac_cv_func_$ac_func=no"
4731 rm -f conftest*
4734 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4735 echo "$ac_t""yes" 1>&6
4736 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4737 cat >> confdefs.h <<EOF
4738 #define $ac_tr_func 1
4740 memcpy_found=yes
4741 else
4742 echo "$ac_t""no" 1>&6
4744 done
4746 if test "$memcpy_found" = no; then
4747 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
4750 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4751 echo "configure:4752: checking for dlopen in -ldl" >&5
4752 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4753 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4754 echo $ac_n "(cached) $ac_c" 1>&6
4755 else
4756 ac_save_LIBS="$LIBS"
4757 LIBS="-ldl $LIBS"
4758 cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761 /* Override any gcc2 internal prototype to avoid an error. */
4762 /* We use char because int might match the return type of a gcc2
4763 builtin and then its argument prototype would still apply. */
4764 char dlopen();
4766 int main() {
4767 dlopen()
4768 ; return 0; }
4770 if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4771 rm -rf conftest*
4772 eval "ac_cv_lib_$ac_lib_var=yes"
4773 else
4774 echo "configure: failed program was:" >&5
4775 cat conftest.$ac_ext >&5
4776 rm -rf conftest*
4777 eval "ac_cv_lib_$ac_lib_var=no"
4779 rm -f conftest*
4780 LIBS="$ac_save_LIBS"
4783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4784 echo "$ac_t""yes" 1>&6
4785 cat >> confdefs.h <<\EOF
4786 #define HAVE_DLOPEN 1
4789 else
4790 echo "$ac_t""no" 1>&6
4794 # Some library-finding code we stole from Tcl.
4795 #--------------------------------------------------------------------
4796 # Check for the existence of the -lsocket and -lnsl libraries.
4797 # The order here is important, so that they end up in the right
4798 # order in the command line generated by make. Here are some
4799 # special considerations:
4800 # 1. Use "connect" and "accept" to check for -lsocket, and
4801 # "gethostbyname" to check for -lnsl.
4802 # 2. Use each function name only once: can't redo a check because
4803 # autoconf caches the results of the last check and won't redo it.
4804 # 3. Use -lnsl and -lsocket only if they supply procedures that
4805 # aren't already present in the normal libraries. This is because
4806 # IRIX 5.2 has libraries, but they aren't needed and they're
4807 # bogus: they goof up name resolution if used.
4808 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4809 # To get around this problem, check for both libraries together
4810 # if -lsocket doesn't work by itself.
4811 #--------------------------------------------------------------------
4813 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
4814 echo "configure:4815: checking for socket libraries" >&5
4815 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
4816 echo $ac_n "(cached) $ac_c" 1>&6
4817 else
4818 gcj_cv_lib_sockets=
4819 gcj_checkBoth=0
4820 unset ac_cv_func_connect
4821 echo $ac_n "checking for connect""... $ac_c" 1>&6
4822 echo "configure:4823: checking for connect" >&5
4823 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4824 echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826 cat > conftest.$ac_ext <<EOF
4827 #line 4828 "configure"
4828 #include "confdefs.h"
4829 /* System header to define __stub macros and hopefully few prototypes,
4830 which can conflict with char connect(); below. */
4831 #include <assert.h>
4832 /* Override any gcc2 internal prototype to avoid an error. */
4833 /* We use char because int might match the return type of a gcc2
4834 builtin and then its argument prototype would still apply. */
4835 char connect();
4837 int main() {
4839 /* The GNU C library defines this for functions which it implements
4840 to always fail with ENOSYS. Some functions are actually named
4841 something starting with __ and the normal name is an alias. */
4842 #if defined (__stub_connect) || defined (__stub___connect)
4843 choke me
4844 #else
4845 connect();
4846 #endif
4848 ; return 0; }
4850 if { (eval echo configure:4851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4851 rm -rf conftest*
4852 eval "ac_cv_func_connect=yes"
4853 else
4854 echo "configure: failed program was:" >&5
4855 cat conftest.$ac_ext >&5
4856 rm -rf conftest*
4857 eval "ac_cv_func_connect=no"
4859 rm -f conftest*
4862 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4863 echo "$ac_t""yes" 1>&6
4864 gcj_checkSocket=0
4865 else
4866 echo "$ac_t""no" 1>&6
4867 gcj_checkSocket=1
4870 if test "$gcj_checkSocket" = 1; then
4871 unset ac_cv_func_connect
4872 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4873 echo "configure:4874: checking for main in -lsocket" >&5
4874 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4875 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4876 echo $ac_n "(cached) $ac_c" 1>&6
4877 else
4878 ac_save_LIBS="$LIBS"
4879 LIBS="-lsocket $LIBS"
4880 cat > conftest.$ac_ext <<EOF
4881 #line 4882 "configure"
4882 #include "confdefs.h"
4884 int main() {
4885 main()
4886 ; return 0; }
4888 if { (eval echo configure:4889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4889 rm -rf conftest*
4890 eval "ac_cv_lib_$ac_lib_var=yes"
4891 else
4892 echo "configure: failed program was:" >&5
4893 cat conftest.$ac_ext >&5
4894 rm -rf conftest*
4895 eval "ac_cv_lib_$ac_lib_var=no"
4897 rm -f conftest*
4898 LIBS="$ac_save_LIBS"
4901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4902 echo "$ac_t""yes" 1>&6
4903 gcj_cv_lib_sockets="-lsocket"
4904 else
4905 echo "$ac_t""no" 1>&6
4906 gcj_checkBoth=1
4910 if test "$gcj_checkBoth" = 1; then
4911 gcj_oldLibs=$LIBS
4912 LIBS="$LIBS -lsocket -lnsl"
4913 unset ac_cv_func_accept
4914 echo $ac_n "checking for accept""... $ac_c" 1>&6
4915 echo "configure:4916: checking for accept" >&5
4916 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
4917 echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919 cat > conftest.$ac_ext <<EOF
4920 #line 4921 "configure"
4921 #include "confdefs.h"
4922 /* System header to define __stub macros and hopefully few prototypes,
4923 which can conflict with char accept(); below. */
4924 #include <assert.h>
4925 /* Override any gcc2 internal prototype to avoid an error. */
4926 /* We use char because int might match the return type of a gcc2
4927 builtin and then its argument prototype would still apply. */
4928 char accept();
4930 int main() {
4932 /* The GNU C library defines this for functions which it implements
4933 to always fail with ENOSYS. Some functions are actually named
4934 something starting with __ and the normal name is an alias. */
4935 #if defined (__stub_accept) || defined (__stub___accept)
4936 choke me
4937 #else
4938 accept();
4939 #endif
4941 ; return 0; }
4943 if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4944 rm -rf conftest*
4945 eval "ac_cv_func_accept=yes"
4946 else
4947 echo "configure: failed program was:" >&5
4948 cat conftest.$ac_ext >&5
4949 rm -rf conftest*
4950 eval "ac_cv_func_accept=no"
4952 rm -f conftest*
4955 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
4956 echo "$ac_t""yes" 1>&6
4957 gcj_checkNsl=0
4958 gcj_cv_lib_sockets="-lsocket -lnsl"
4959 else
4960 echo "$ac_t""no" 1>&6
4963 unset ac_cv_func_accept
4964 LIBS=$gcj_oldLibs
4966 unset ac_cv_func_gethostbyname
4967 gcj_oldLibs=$LIBS
4968 LIBS="$LIBS $gcj_cv_lib_sockets"
4969 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4970 echo "configure:4971: checking for gethostbyname" >&5
4971 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4972 echo $ac_n "(cached) $ac_c" 1>&6
4973 else
4974 cat > conftest.$ac_ext <<EOF
4975 #line 4976 "configure"
4976 #include "confdefs.h"
4977 /* System header to define __stub macros and hopefully few prototypes,
4978 which can conflict with char gethostbyname(); below. */
4979 #include <assert.h>
4980 /* Override any gcc2 internal prototype to avoid an error. */
4981 /* We use char because int might match the return type of a gcc2
4982 builtin and then its argument prototype would still apply. */
4983 char gethostbyname();
4985 int main() {
4987 /* The GNU C library defines this for functions which it implements
4988 to always fail with ENOSYS. Some functions are actually named
4989 something starting with __ and the normal name is an alias. */
4990 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4991 choke me
4992 #else
4993 gethostbyname();
4994 #endif
4996 ; return 0; }
4998 if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4999 rm -rf conftest*
5000 eval "ac_cv_func_gethostbyname=yes"
5001 else
5002 echo "configure: failed program was:" >&5
5003 cat conftest.$ac_ext >&5
5004 rm -rf conftest*
5005 eval "ac_cv_func_gethostbyname=no"
5007 rm -f conftest*
5010 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5011 echo "$ac_t""yes" 1>&6
5013 else
5014 echo "$ac_t""no" 1>&6
5015 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5016 echo "configure:5017: checking for main in -lnsl" >&5
5017 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
5018 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5019 echo $ac_n "(cached) $ac_c" 1>&6
5020 else
5021 ac_save_LIBS="$LIBS"
5022 LIBS="-lnsl $LIBS"
5023 cat > conftest.$ac_ext <<EOF
5024 #line 5025 "configure"
5025 #include "confdefs.h"
5027 int main() {
5028 main()
5029 ; return 0; }
5031 if { (eval echo configure:5032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5032 rm -rf conftest*
5033 eval "ac_cv_lib_$ac_lib_var=yes"
5034 else
5035 echo "configure: failed program was:" >&5
5036 cat conftest.$ac_ext >&5
5037 rm -rf conftest*
5038 eval "ac_cv_lib_$ac_lib_var=no"
5040 rm -f conftest*
5041 LIBS="$ac_save_LIBS"
5044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5045 echo "$ac_t""yes" 1>&6
5046 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
5047 else
5048 echo "$ac_t""no" 1>&6
5053 unset ac_cv_func_gethostbyname
5054 LIBS=$gcj_oldLIBS
5058 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
5059 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
5061 if test "$with_system_zlib" = yes; then
5062 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
5063 echo "configure:5064: checking for deflate in -lz" >&5
5064 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
5065 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5066 echo $ac_n "(cached) $ac_c" 1>&6
5067 else
5068 ac_save_LIBS="$LIBS"
5069 LIBS="-lz $LIBS"
5070 cat > conftest.$ac_ext <<EOF
5071 #line 5072 "configure"
5072 #include "confdefs.h"
5073 /* Override any gcc2 internal prototype to avoid an error. */
5074 /* We use char because int might match the return type of a gcc2
5075 builtin and then its argument prototype would still apply. */
5076 char deflate();
5078 int main() {
5079 deflate()
5080 ; return 0; }
5082 if { (eval echo configure:5083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5083 rm -rf conftest*
5084 eval "ac_cv_lib_$ac_lib_var=yes"
5085 else
5086 echo "configure: failed program was:" >&5
5087 cat conftest.$ac_ext >&5
5088 rm -rf conftest*
5089 eval "ac_cv_lib_$ac_lib_var=no"
5091 rm -f conftest*
5092 LIBS="$ac_save_LIBS"
5095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5096 echo "$ac_t""yes" 1>&6
5097 ZLIBSPEC=-lz
5098 else
5099 echo "$ac_t""no" 1>&6
5100 ZLIBSPEC=-lzgcj
5103 else
5104 ZLIBSPEC=-lzgcj
5105 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
5108 # On Solaris, and maybe other architectures, the Boehm collector
5109 # requires -ldl.
5110 if test "$GC" = boehm; then
5111 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
5112 echo "configure:5113: checking for main in -ldl" >&5
5113 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
5114 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5115 echo $ac_n "(cached) $ac_c" 1>&6
5116 else
5117 ac_save_LIBS="$LIBS"
5118 LIBS="-ldl $LIBS"
5119 cat > conftest.$ac_ext <<EOF
5120 #line 5121 "configure"
5121 #include "confdefs.h"
5123 int main() {
5124 main()
5125 ; return 0; }
5127 if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5128 rm -rf conftest*
5129 eval "ac_cv_lib_$ac_lib_var=yes"
5130 else
5131 echo "configure: failed program was:" >&5
5132 cat conftest.$ac_ext >&5
5133 rm -rf conftest*
5134 eval "ac_cv_lib_$ac_lib_var=no"
5136 rm -f conftest*
5137 LIBS="$ac_save_LIBS"
5140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5141 echo "$ac_t""yes" 1>&6
5142 SYSTEMSPEC="$SYSTEMSPEC -ldl"
5143 else
5144 echo "$ac_t""no" 1>&6
5149 if test -z "${with_multisubdir}"; then
5150 builddotdot=.
5151 else
5153 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
5156 if test -x "${builddotdot}/../../gcc/gcj"; then
5157 dir="`cd ${builddotdot}/../../gcc && pwd`"
5158 GCJ="$dir/gcj -B`pwd`/ -B$dir/"
5159 else
5160 CANADIAN=yes
5161 NULL_TARGET=yes
5162 GCJ="gcj -B`pwd`/"
5166 # Create it, so that compile/link tests don't fail
5167 test -f libgcj.spec || touch libgcj.spec
5169 # We must search the source tree for java.lang, since we still don't
5170 # have libgcj.jar nor java/lang/*.class
5171 GCJ_SAVE_CPPFLAGS=$CPPFLAGS
5172 CPPFLAGS="$CPPFLAGS -I`pwd` -I`cd $srcdir && pwd`"
5174 # Since some classes depend on this one, we need its source available
5175 # before we can do any GCJ compilation test :-(
5176 if test ! -f gnu/classpath/Configuration.java; then
5177 test -d gnu || mkdir gnu
5178 test -d gnu/classpath || mkdir gnu/classpath
5179 sed 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
5180 < $srcdir/gnu/classpath/Configuration.java.in \
5181 > gnu/classpath/Configuration.java
5182 # We do not want to redirect the output of the grep below to /dev/null,
5183 # but we add /dev/null to the input list so that grep will print the
5184 # filename of Configuration.java in case it finds any matches.
5185 if grep @ gnu/classpath/Configuration.java /dev/null; then
5186 { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
5190 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
5191 set dummy ${ac_tool_prefix}gcj; ac_word=$2
5192 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5193 echo "configure:5194: checking for $ac_word" >&5
5194 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5195 echo $ac_n "(cached) $ac_c" 1>&6
5196 else
5197 if test -n "$GCJ"; then
5198 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5199 else
5200 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5201 ac_dummy="$PATH"
5202 for ac_dir in $ac_dummy; do
5203 test -z "$ac_dir" && ac_dir=.
5204 if test -f $ac_dir/$ac_word; then
5205 ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
5206 break
5208 done
5209 IFS="$ac_save_ifs"
5212 GCJ="$ac_cv_prog_GCJ"
5213 if test -n "$GCJ"; then
5214 echo "$ac_t""$GCJ" 1>&6
5215 else
5216 echo "$ac_t""no" 1>&6
5220 if test -z "$ac_cv_prog_GCJ"; then
5221 if test -n "$ac_tool_prefix"; then
5222 # Extract the first word of "gcj", so it can be a program name with args.
5223 set dummy gcj; ac_word=$2
5224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5225 echo "configure:5226: checking for $ac_word" >&5
5226 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5227 echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229 if test -n "$GCJ"; then
5230 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5231 else
5232 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5233 ac_dummy="$PATH"
5234 for ac_dir in $ac_dummy; do
5235 test -z "$ac_dir" && ac_dir=.
5236 if test -f $ac_dir/$ac_word; then
5237 ac_cv_prog_GCJ="gcj"
5238 break
5240 done
5241 IFS="$ac_save_ifs"
5242 test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
5245 GCJ="$ac_cv_prog_GCJ"
5246 if test -n "$GCJ"; then
5247 echo "$ac_t""$GCJ" 1>&6
5248 else
5249 echo "$ac_t""no" 1>&6
5252 else
5253 GCJ="no"
5257 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5261 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
5262 lt_save_CC="$CC"
5263 lt_save_CFLAGS="$CFLAGS"
5264 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
5265 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
5266 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
5267 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
5268 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
5269 deplibs_check_method="$deplibs_check_method" \
5270 file_magic_cmd="$file_magic_cmd" \
5271 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
5272 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
5273 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
5274 CC="$lt_save_CC"
5275 CFLAGS="$lt_save_CFLAGS"
5277 # Redirect the config.log output again, so that the ltconfig log is not
5278 # clobbered by the next message.
5279 exec 5>>./config.log
5284 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
5286 echo $ac_n "checking size of void *""... $ac_c" 1>&6
5287 echo "configure:5288: checking size of void *" >&5
5288 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
5289 echo $ac_n "(cached) $ac_c" 1>&6
5290 else
5291 if test "$cross_compiling" = yes; then
5292 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5293 else
5294 cat > conftest.$ac_ext <<EOF
5295 #line 5296 "configure"
5296 #include "confdefs.h"
5297 #include <stdio.h>
5298 main()
5300 FILE *f=fopen("conftestval", "w");
5301 if (!f) exit(1);
5302 fprintf(f, "%d\n", sizeof(void *));
5303 exit(0);
5306 if { (eval echo configure:5307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5307 then
5308 ac_cv_sizeof_void_p=`cat conftestval`
5309 else
5310 echo "configure: failed program was:" >&5
5311 cat conftest.$ac_ext >&5
5312 rm -fr conftest*
5313 ac_cv_sizeof_void_p=0
5315 rm -fr conftest*
5319 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
5320 cat >> confdefs.h <<EOF
5321 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
5326 ZLIBS=
5327 ZDEPS=
5328 ZINCS=
5329 if test "x$ZLIBSPEC" = "x-lzgcj"; then
5330 # We include the path to the zlib build directory.
5331 # See Makefile.am to understand why.
5332 ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
5333 ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
5334 ZINCS='-I$(top_srcdir)/../zlib'
5335 else
5336 ZLIBS="$ZLIBSPEC"
5346 if test "$CANADIAN" = yes; then
5347 CANADIAN_TRUE=
5348 CANADIAN_FALSE='#'
5349 else
5350 CANADIAN_TRUE='#'
5351 CANADIAN_FALSE=
5355 if test "$NULL_TARGET" = yes; then
5356 NULL_TARGET_TRUE=
5357 NULL_TARGET_FALSE='#'
5358 else
5359 NULL_TARGET_TRUE='#'
5360 NULL_TARGET_FALSE=
5364 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
5365 NATIVE_TRUE=
5366 NATIVE_FALSE='#'
5367 else
5368 NATIVE_TRUE='#'
5369 NATIVE_FALSE=
5373 if test -z "$with_cross_host"; then
5374 USE_LIBDIR_TRUE=
5375 USE_LIBDIR_FALSE='#'
5376 else
5377 USE_LIBDIR_TRUE='#'
5378 USE_LIBDIR_FALSE=
5382 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
5383 NEEDS_DATA_START_TRUE=
5384 NEEDS_DATA_START_FALSE='#'
5385 else
5386 NEEDS_DATA_START_TRUE='#'
5387 NEEDS_DATA_START_FALSE=
5391 # Determine gcj version number.
5393 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
5395 cat >> confdefs.h <<EOF
5396 #define GCJVERSION "$gcjvers"
5403 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
5404 echo "configure:5405: checking for g++ -ffloat-store bug" >&5
5405 save_CFLAGS="$CFLAGS"
5406 CFLAGS="-x c++ -O2 -ffloat-store"
5407 cat > conftest.$ac_ext <<EOF
5408 #line 5409 "configure"
5409 #include "confdefs.h"
5410 #include <math.h>
5411 int main() {
5413 ; return 0; }
5415 if { (eval echo configure:5416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5416 rm -rf conftest*
5417 echo "$ac_t""no" 1>&6
5418 else
5419 echo "configure: failed program was:" >&5
5420 cat conftest.$ac_ext >&5
5421 rm -rf conftest*
5422 cat >> confdefs.h <<\EOF
5423 #define __NO_MATH_INLINES 1
5426 echo "$ac_t""yes" 1>&6
5428 rm -f conftest*
5429 CFLAGS="$save_CFLAGS"
5431 for ac_hdr in unistd.h bstring.h sys/time.h sys/types.h fcntl.h sys/ioctl.h sys/filio.h sys/stat.h sys/select.h sys/socket.h netinet/in.h arpa/inet.h netdb.h pwd.h sys/config.h inttypes.h stdint.h langinfo.h locale.h
5433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5435 echo "configure:5436: checking for $ac_hdr" >&5
5436 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5437 echo $ac_n "(cached) $ac_c" 1>&6
5438 else
5439 cat > conftest.$ac_ext <<EOF
5440 #line 5441 "configure"
5441 #include "confdefs.h"
5442 #include <$ac_hdr>
5444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5445 { (eval echo configure:5446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5447 if test -z "$ac_err"; then
5448 rm -rf conftest*
5449 eval "ac_cv_header_$ac_safe=yes"
5450 else
5451 echo "$ac_err" >&5
5452 echo "configure: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
5454 rm -rf conftest*
5455 eval "ac_cv_header_$ac_safe=no"
5457 rm -f conftest*
5459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5460 echo "$ac_t""yes" 1>&6
5461 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5462 cat >> confdefs.h <<EOF
5463 #define $ac_tr_hdr 1
5466 else
5467 echo "$ac_t""no" 1>&6
5469 done
5471 for ac_hdr in dirent.h
5473 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5474 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5475 echo "configure:5476: checking for $ac_hdr" >&5
5476 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5477 echo $ac_n "(cached) $ac_c" 1>&6
5478 else
5479 cat > conftest.$ac_ext <<EOF
5480 #line 5481 "configure"
5481 #include "confdefs.h"
5482 #include <$ac_hdr>
5484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5485 { (eval echo configure:5486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5487 if test -z "$ac_err"; then
5488 rm -rf conftest*
5489 eval "ac_cv_header_$ac_safe=yes"
5490 else
5491 echo "$ac_err" >&5
5492 echo "configure: failed program was:" >&5
5493 cat conftest.$ac_ext >&5
5494 rm -rf conftest*
5495 eval "ac_cv_header_$ac_safe=no"
5497 rm -f conftest*
5499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5500 echo "$ac_t""yes" 1>&6
5501 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5502 cat >> confdefs.h <<EOF
5503 #define $ac_tr_hdr 1
5506 else
5507 echo "$ac_t""no" 1>&6
5509 done
5512 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5513 echo "configure:5514: checking for ANSI C header files" >&5
5514 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5515 echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517 cat > conftest.$ac_ext <<EOF
5518 #line 5519 "configure"
5519 #include "confdefs.h"
5520 #include <stdlib.h>
5521 #include <stdarg.h>
5522 #include <string.h>
5523 #include <float.h>
5525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5526 { (eval echo configure:5527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5528 if test -z "$ac_err"; then
5529 rm -rf conftest*
5530 ac_cv_header_stdc=yes
5531 else
5532 echo "$ac_err" >&5
5533 echo "configure: failed program was:" >&5
5534 cat conftest.$ac_ext >&5
5535 rm -rf conftest*
5536 ac_cv_header_stdc=no
5538 rm -f conftest*
5540 if test $ac_cv_header_stdc = yes; then
5541 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5542 cat > conftest.$ac_ext <<EOF
5543 #line 5544 "configure"
5544 #include "confdefs.h"
5545 #include <string.h>
5547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5548 egrep "memchr" >/dev/null 2>&1; then
5550 else
5551 rm -rf conftest*
5552 ac_cv_header_stdc=no
5554 rm -f conftest*
5558 if test $ac_cv_header_stdc = yes; then
5559 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5560 cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 #include <stdlib.h>
5565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5566 egrep "free" >/dev/null 2>&1; then
5568 else
5569 rm -rf conftest*
5570 ac_cv_header_stdc=no
5572 rm -f conftest*
5576 if test $ac_cv_header_stdc = yes; then
5577 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5578 if test "$cross_compiling" = yes; then
5580 else
5581 cat > conftest.$ac_ext <<EOF
5582 #line 5583 "configure"
5583 #include "confdefs.h"
5584 #include <ctype.h>
5585 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5586 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5587 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5588 int main () { int i; for (i = 0; i < 256; i++)
5589 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5590 exit (0); }
5593 if { (eval echo configure:5594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5594 then
5596 else
5597 echo "configure: failed program was:" >&5
5598 cat conftest.$ac_ext >&5
5599 rm -fr conftest*
5600 ac_cv_header_stdc=no
5602 rm -fr conftest*
5608 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5609 if test $ac_cv_header_stdc = yes; then
5610 cat >> confdefs.h <<\EOF
5611 #define STDC_HEADERS 1
5616 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5617 echo "configure:5618: checking for ssize_t" >&5
5618 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5619 echo $ac_n "(cached) $ac_c" 1>&6
5620 else
5621 cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624 #include <sys/types.h>
5625 #if STDC_HEADERS
5626 #include <stdlib.h>
5627 #include <stddef.h>
5628 #endif
5630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5631 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5632 rm -rf conftest*
5633 ac_cv_type_ssize_t=yes
5634 else
5635 rm -rf conftest*
5636 ac_cv_type_ssize_t=no
5638 rm -f conftest*
5641 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5642 if test $ac_cv_type_ssize_t = no; then
5643 cat >> confdefs.h <<\EOF
5644 #define ssize_t int
5650 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
5651 echo "configure:5652: checking for in_addr_t" >&5
5652 cat > conftest.$ac_ext <<EOF
5653 #line 5654 "configure"
5654 #include "confdefs.h"
5655 #include <sys/types.h>
5656 #if STDC_HEADERS
5657 #include <stdlib.h>
5658 #include <stddef.h>
5659 #endif
5660 #if HAVE_NETINET_IN_H
5661 #include <netinet/in.h>
5662 #endif
5663 int main() {
5664 in_addr_t foo;
5665 ; return 0; }
5667 if { (eval echo configure:5668: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5668 rm -rf conftest*
5669 cat >> confdefs.h <<\EOF
5670 #define HAVE_IN_ADDR_T 1
5673 echo "$ac_t""yes" 1>&6
5674 else
5675 echo "configure: failed program was:" >&5
5676 cat conftest.$ac_ext >&5
5677 rm -rf conftest*
5678 echo "$ac_t""no" 1>&6
5680 rm -f conftest*
5682 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
5683 echo "configure:5684: checking whether struct ip_mreq is in netinet/in.h" >&5
5684 cat > conftest.$ac_ext <<EOF
5685 #line 5686 "configure"
5686 #include "confdefs.h"
5687 #include <netinet/in.h>
5688 int main() {
5689 struct ip_mreq mreq;
5690 ; return 0; }
5692 if { (eval echo configure:5693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5693 rm -rf conftest*
5694 cat >> confdefs.h <<\EOF
5695 #define HAVE_STRUCT_IP_MREQ 1
5698 echo "$ac_t""yes" 1>&6
5699 else
5700 echo "configure: failed program was:" >&5
5701 cat conftest.$ac_ext >&5
5702 rm -rf conftest*
5703 echo "$ac_t""no" 1>&6
5705 rm -f conftest*
5707 echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
5708 echo "configure:5709: checking whether struct ipv6_mreq is in netinet/in.h" >&5
5709 cat > conftest.$ac_ext <<EOF
5710 #line 5711 "configure"
5711 #include "confdefs.h"
5712 #include <netinet/in.h>
5713 int main() {
5714 struct ipv6_mreq mreq6;
5715 ; return 0; }
5717 if { (eval echo configure:5718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5718 rm -rf conftest*
5719 cat >> confdefs.h <<\EOF
5720 #define HAVE_STRUCT_IPV6_MREQ 1
5723 echo "$ac_t""yes" 1>&6
5724 else
5725 echo "configure: failed program was:" >&5
5726 cat conftest.$ac_ext >&5
5727 rm -rf conftest*
5728 echo "$ac_t""no" 1>&6
5730 rm -f conftest*
5732 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
5733 echo "configure:5734: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
5734 cat > conftest.$ac_ext <<EOF
5735 #line 5736 "configure"
5736 #include "confdefs.h"
5737 #include <netinet/in.h>
5738 int main() {
5739 struct sockaddr_in6 addr6;
5740 ; return 0; }
5742 if { (eval echo configure:5743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5743 rm -rf conftest*
5744 cat >> confdefs.h <<\EOF
5745 #define HAVE_INET6 1
5748 echo "$ac_t""yes" 1>&6
5749 else
5750 echo "configure: failed program was:" >&5
5751 cat conftest.$ac_ext >&5
5752 rm -rf conftest*
5753 echo "$ac_t""no" 1>&6
5755 rm -f conftest*
5757 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
5758 echo "configure:5759: checking for socklen_t in sys/socket.h" >&5
5759 cat > conftest.$ac_ext <<EOF
5760 #line 5761 "configure"
5761 #include "confdefs.h"
5762 #define _POSIX_PII_SOCKET
5763 #include <sys/types.h>
5764 #include <sys/socket.h>
5765 int main() {
5766 socklen_t x = 5;
5767 ; return 0; }
5769 if { (eval echo configure:5770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5770 rm -rf conftest*
5771 cat >> confdefs.h <<\EOF
5772 #define HAVE_SOCKLEN_T 1
5775 echo "$ac_t""yes" 1>&6
5776 else
5777 echo "configure: failed program was:" >&5
5778 cat conftest.$ac_ext >&5
5779 rm -rf conftest*
5780 echo "$ac_t""no" 1>&6
5782 rm -f conftest*
5784 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
5785 echo "configure:5786: checking for tm_gmtoff in struct tm" >&5
5786 cat > conftest.$ac_ext <<EOF
5787 #line 5788 "configure"
5788 #include "confdefs.h"
5789 #include <time.h>
5790 int main() {
5791 struct tm tim; tim.tm_gmtoff = 0;
5792 ; return 0; }
5794 if { (eval echo configure:5795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5795 rm -rf conftest*
5796 cat >> confdefs.h <<\EOF
5797 #define STRUCT_TM_HAS_GMTOFF 1
5800 echo "$ac_t""yes" 1>&6
5801 else
5802 echo "configure: failed program was:" >&5
5803 cat conftest.$ac_ext >&5
5804 rm -rf conftest*
5805 echo "$ac_t""no" 1>&6
5806 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
5807 echo "configure:5808: checking for global timezone variable" >&5
5808 cat > conftest.$ac_ext <<EOF
5809 #line 5810 "configure"
5810 #include "confdefs.h"
5811 #include <time.h>
5812 int main() {
5813 long z2 = timezone;
5814 ; return 0; }
5816 if { (eval echo configure:5817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5817 rm -rf conftest*
5818 cat >> confdefs.h <<\EOF
5819 #define HAVE_TIMEZONE 1
5822 echo "$ac_t""yes" 1>&6
5823 else
5824 echo "configure: failed program was:" >&5
5825 cat conftest.$ac_ext >&5
5826 rm -rf conftest*
5827 echo "$ac_t""no" 1>&6
5829 rm -f conftest*
5831 rm -f conftest*
5833 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5834 # for constant arguments. Useless!
5835 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5836 echo "configure:5837: checking for working alloca.h" >&5
5837 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5838 echo $ac_n "(cached) $ac_c" 1>&6
5839 else
5840 cat > conftest.$ac_ext <<EOF
5841 #line 5842 "configure"
5842 #include "confdefs.h"
5843 #include <alloca.h>
5844 int main() {
5845 char *p = alloca(2 * sizeof(int));
5846 ; return 0; }
5848 if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5849 rm -rf conftest*
5850 ac_cv_header_alloca_h=yes
5851 else
5852 echo "configure: failed program was:" >&5
5853 cat conftest.$ac_ext >&5
5854 rm -rf conftest*
5855 ac_cv_header_alloca_h=no
5857 rm -f conftest*
5860 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5861 if test $ac_cv_header_alloca_h = yes; then
5862 cat >> confdefs.h <<\EOF
5863 #define HAVE_ALLOCA_H 1
5868 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5869 echo "configure:5870: checking for alloca" >&5
5870 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5871 echo $ac_n "(cached) $ac_c" 1>&6
5872 else
5873 cat > conftest.$ac_ext <<EOF
5874 #line 5875 "configure"
5875 #include "confdefs.h"
5877 #ifdef __GNUC__
5878 # define alloca __builtin_alloca
5879 #else
5880 # ifdef _MSC_VER
5881 # include <malloc.h>
5882 # define alloca _alloca
5883 # else
5884 # if HAVE_ALLOCA_H
5885 # include <alloca.h>
5886 # else
5887 # ifdef _AIX
5888 #pragma alloca
5889 # else
5890 # ifndef alloca /* predefined by HP cc +Olibcalls */
5891 char *alloca ();
5892 # endif
5893 # endif
5894 # endif
5895 # endif
5896 #endif
5898 int main() {
5899 char *p = (char *) alloca(1);
5900 ; return 0; }
5902 if { (eval echo configure:5903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5903 rm -rf conftest*
5904 ac_cv_func_alloca_works=yes
5905 else
5906 echo "configure: failed program was:" >&5
5907 cat conftest.$ac_ext >&5
5908 rm -rf conftest*
5909 ac_cv_func_alloca_works=no
5911 rm -f conftest*
5914 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5915 if test $ac_cv_func_alloca_works = yes; then
5916 cat >> confdefs.h <<\EOF
5917 #define HAVE_ALLOCA 1
5922 if test $ac_cv_func_alloca_works = no; then
5923 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5924 # that cause trouble. Some versions do not even contain alloca or
5925 # contain a buggy version. If you still want to use their alloca,
5926 # use ar to extract alloca.o from them instead of compiling alloca.c.
5927 ALLOCA=alloca.${ac_objext}
5928 cat >> confdefs.h <<\EOF
5929 #define C_ALLOCA 1
5933 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5934 echo "configure:5935: checking whether alloca needs Cray hooks" >&5
5935 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5936 echo $ac_n "(cached) $ac_c" 1>&6
5937 else
5938 cat > conftest.$ac_ext <<EOF
5939 #line 5940 "configure"
5940 #include "confdefs.h"
5941 #if defined(CRAY) && ! defined(CRAY2)
5942 webecray
5943 #else
5944 wenotbecray
5945 #endif
5948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5949 egrep "webecray" >/dev/null 2>&1; then
5950 rm -rf conftest*
5951 ac_cv_os_cray=yes
5952 else
5953 rm -rf conftest*
5954 ac_cv_os_cray=no
5956 rm -f conftest*
5960 echo "$ac_t""$ac_cv_os_cray" 1>&6
5961 if test $ac_cv_os_cray = yes; then
5962 for ac_func in _getb67 GETB67 getb67; do
5963 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5964 echo "configure:5965: checking for $ac_func" >&5
5965 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5966 echo $ac_n "(cached) $ac_c" 1>&6
5967 else
5968 cat > conftest.$ac_ext <<EOF
5969 #line 5970 "configure"
5970 #include "confdefs.h"
5971 /* System header to define __stub macros and hopefully few prototypes,
5972 which can conflict with char $ac_func(); below. */
5973 #include <assert.h>
5974 /* Override any gcc2 internal prototype to avoid an error. */
5975 /* We use char because int might match the return type of a gcc2
5976 builtin and then its argument prototype would still apply. */
5977 char $ac_func();
5979 int main() {
5981 /* The GNU C library defines this for functions which it implements
5982 to always fail with ENOSYS. Some functions are actually named
5983 something starting with __ and the normal name is an alias. */
5984 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5985 choke me
5986 #else
5987 $ac_func();
5988 #endif
5990 ; return 0; }
5992 if { (eval echo configure:5993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5993 rm -rf conftest*
5994 eval "ac_cv_func_$ac_func=yes"
5995 else
5996 echo "configure: failed program was:" >&5
5997 cat conftest.$ac_ext >&5
5998 rm -rf conftest*
5999 eval "ac_cv_func_$ac_func=no"
6001 rm -f conftest*
6004 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6005 echo "$ac_t""yes" 1>&6
6006 cat >> confdefs.h <<EOF
6007 #define CRAY_STACKSEG_END $ac_func
6010 break
6011 else
6012 echo "$ac_t""no" 1>&6
6015 done
6018 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6019 echo "configure:6020: checking stack direction for C alloca" >&5
6020 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6021 echo $ac_n "(cached) $ac_c" 1>&6
6022 else
6023 if test "$cross_compiling" = yes; then
6024 ac_cv_c_stack_direction=0
6025 else
6026 cat > conftest.$ac_ext <<EOF
6027 #line 6028 "configure"
6028 #include "confdefs.h"
6029 find_stack_direction ()
6031 static char *addr = 0;
6032 auto char dummy;
6033 if (addr == 0)
6035 addr = &dummy;
6036 return find_stack_direction ();
6038 else
6039 return (&dummy > addr) ? 1 : -1;
6041 main ()
6043 exit (find_stack_direction() < 0);
6046 if { (eval echo configure:6047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6047 then
6048 ac_cv_c_stack_direction=1
6049 else
6050 echo "configure: failed program was:" >&5
6051 cat conftest.$ac_ext >&5
6052 rm -fr conftest*
6053 ac_cv_c_stack_direction=-1
6055 rm -fr conftest*
6060 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6061 cat >> confdefs.h <<EOF
6062 #define STACK_DIRECTION $ac_cv_c_stack_direction
6068 for ac_prog in perl
6070 # Extract the first word of "$ac_prog", so it can be a program name with args.
6071 set dummy $ac_prog; ac_word=$2
6072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6073 echo "configure:6074: checking for $ac_word" >&5
6074 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
6075 echo $ac_n "(cached) $ac_c" 1>&6
6076 else
6077 if test -n "$PERL"; then
6078 ac_cv_prog_PERL="$PERL" # Let the user override the test.
6079 else
6080 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6081 ac_dummy="$PATH"
6082 for ac_dir in $ac_dummy; do
6083 test -z "$ac_dir" && ac_dir=.
6084 if test -f $ac_dir/$ac_word; then
6085 ac_cv_prog_PERL="$ac_prog"
6086 break
6088 done
6089 IFS="$ac_save_ifs"
6092 PERL="$ac_cv_prog_PERL"
6093 if test -n "$PERL"; then
6094 echo "$ac_t""$PERL" 1>&6
6095 else
6096 echo "$ac_t""no" 1>&6
6099 test -n "$PERL" && break
6100 done
6101 test -n "$PERL" || PERL="false"
6104 SYSDEP_SOURCES=
6106 case "${host}" in
6107 i?86-*-linux*)
6108 SIGNAL_HANDLER=include/i386-signal.h
6110 sparc-sun-solaris*)
6111 SIGNAL_HANDLER=include/sparc-signal.h
6113 # ia64-*)
6114 # SYSDEP_SOURCES=sysdep/ia64.c
6115 # test -d sysdep || mkdir sysdep
6116 # ;;
6117 powerpc-*-linux*)
6118 SIGNAL_HANDLER=include/dwarf2-signal.h
6120 alpha*-*-linux*)
6121 SIGNAL_HANDLER=include/dwarf2-signal.h
6124 SIGNAL_HANDLER=include/default-signal.h
6126 esac
6128 # If we're using sjlj exceptions, forget what we just learned.
6129 if test "$enable_sjlj_exceptions" = yes; then
6130 SIGNAL_HANDLER=include/default-signal.h
6137 if test "${multilib}" = "yes"; then
6138 multilib_arg="--enable-multilib"
6139 else
6140 multilib_arg=
6143 # If we find X, set shell vars x_includes and x_libraries to the
6144 # paths, otherwise set no_x=yes.
6145 # Uses ac_ vars as temps to allow command line to override cache and checks.
6146 # --without-x overrides everything else, but does not touch the cache.
6147 echo $ac_n "checking for X""... $ac_c" 1>&6
6148 echo "configure:6149: checking for X" >&5
6150 # Check whether --with-x or --without-x was given.
6151 if test "${with_x+set}" = set; then
6152 withval="$with_x"
6156 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6157 if test "x$with_x" = xno; then
6158 # The user explicitly disabled X.
6159 have_x=disabled
6160 else
6161 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6162 # Both variables are already set.
6163 have_x=yes
6164 else
6165 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6166 echo $ac_n "(cached) $ac_c" 1>&6
6167 else
6168 # One or both of the vars are not set, and there is no cached value.
6169 ac_x_includes=NO ac_x_libraries=NO
6170 rm -fr conftestdir
6171 if mkdir conftestdir; then
6172 cd conftestdir
6173 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6174 cat > Imakefile <<'EOF'
6175 acfindx:
6176 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6178 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6179 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6180 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6181 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6182 for ac_extension in a so sl; do
6183 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6184 test -f $ac_im_libdir/libX11.$ac_extension; then
6185 ac_im_usrlibdir=$ac_im_libdir; break
6187 done
6188 # Screen out bogus values from the imake configuration. They are
6189 # bogus both because they are the default anyway, and because
6190 # using them would break gcc on systems where it needs fixed includes.
6191 case "$ac_im_incroot" in
6192 /usr/include) ;;
6193 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6194 esac
6195 case "$ac_im_usrlibdir" in
6196 /usr/lib | /lib) ;;
6197 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6198 esac
6200 cd ..
6201 rm -fr conftestdir
6204 if test "$ac_x_includes" = NO; then
6205 # Guess where to find include files, by looking for this one X11 .h file.
6206 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6208 # First, try using that file with no special directory specified.
6209 cat > conftest.$ac_ext <<EOF
6210 #line 6211 "configure"
6211 #include "confdefs.h"
6212 #include <$x_direct_test_include>
6214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6215 { (eval echo configure:6216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6217 if test -z "$ac_err"; then
6218 rm -rf conftest*
6219 # We can compile using X headers with no special include directory.
6220 ac_x_includes=
6221 else
6222 echo "$ac_err" >&5
6223 echo "configure: failed program was:" >&5
6224 cat conftest.$ac_ext >&5
6225 rm -rf conftest*
6226 # Look for the header file in a standard set of common directories.
6227 # Check X11 before X11Rn because it is often a symlink to the current release.
6228 for ac_dir in \
6229 /usr/X11/include \
6230 /usr/X11R6/include \
6231 /usr/X11R5/include \
6232 /usr/X11R4/include \
6234 /usr/include/X11 \
6235 /usr/include/X11R6 \
6236 /usr/include/X11R5 \
6237 /usr/include/X11R4 \
6239 /usr/local/X11/include \
6240 /usr/local/X11R6/include \
6241 /usr/local/X11R5/include \
6242 /usr/local/X11R4/include \
6244 /usr/local/include/X11 \
6245 /usr/local/include/X11R6 \
6246 /usr/local/include/X11R5 \
6247 /usr/local/include/X11R4 \
6249 /usr/X386/include \
6250 /usr/x386/include \
6251 /usr/XFree86/include/X11 \
6253 /usr/include \
6254 /usr/local/include \
6255 /usr/unsupported/include \
6256 /usr/athena/include \
6257 /usr/local/x11r5/include \
6258 /usr/lpp/Xamples/include \
6260 /usr/openwin/include \
6261 /usr/openwin/share/include \
6264 if test -r "$ac_dir/$x_direct_test_include"; then
6265 ac_x_includes=$ac_dir
6266 break
6268 done
6270 rm -f conftest*
6271 fi # $ac_x_includes = NO
6273 if test "$ac_x_libraries" = NO; then
6274 # Check for the libraries.
6276 test -z "$x_direct_test_library" && x_direct_test_library=Xt
6277 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6279 # See if we find them without any special options.
6280 # Don't add to $LIBS permanently.
6281 ac_save_LIBS="$LIBS"
6282 LIBS="-l$x_direct_test_library $LIBS"
6283 cat > conftest.$ac_ext <<EOF
6284 #line 6285 "configure"
6285 #include "confdefs.h"
6287 int main() {
6288 ${x_direct_test_function}()
6289 ; return 0; }
6291 if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6292 rm -rf conftest*
6293 LIBS="$ac_save_LIBS"
6294 # We can link X programs with no special library path.
6295 ac_x_libraries=
6296 else
6297 echo "configure: failed program was:" >&5
6298 cat conftest.$ac_ext >&5
6299 rm -rf conftest*
6300 LIBS="$ac_save_LIBS"
6301 # First see if replacing the include by lib works.
6302 # Check X11 before X11Rn because it is often a symlink to the current release.
6303 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6304 /usr/X11/lib \
6305 /usr/X11R6/lib \
6306 /usr/X11R5/lib \
6307 /usr/X11R4/lib \
6309 /usr/lib/X11 \
6310 /usr/lib/X11R6 \
6311 /usr/lib/X11R5 \
6312 /usr/lib/X11R4 \
6314 /usr/local/X11/lib \
6315 /usr/local/X11R6/lib \
6316 /usr/local/X11R5/lib \
6317 /usr/local/X11R4/lib \
6319 /usr/local/lib/X11 \
6320 /usr/local/lib/X11R6 \
6321 /usr/local/lib/X11R5 \
6322 /usr/local/lib/X11R4 \
6324 /usr/X386/lib \
6325 /usr/x386/lib \
6326 /usr/XFree86/lib/X11 \
6328 /usr/lib \
6329 /usr/local/lib \
6330 /usr/unsupported/lib \
6331 /usr/athena/lib \
6332 /usr/local/x11r5/lib \
6333 /usr/lpp/Xamples/lib \
6334 /lib/usr/lib/X11 \
6336 /usr/openwin/lib \
6337 /usr/openwin/share/lib \
6340 for ac_extension in a so sl; do
6341 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6342 ac_x_libraries=$ac_dir
6343 break 2
6345 done
6346 done
6348 rm -f conftest*
6349 fi # $ac_x_libraries = NO
6351 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6352 # Didn't find X anywhere. Cache the known absence of X.
6353 ac_cv_have_x="have_x=no"
6354 else
6355 # Record where we found X for the cache.
6356 ac_cv_have_x="have_x=yes \
6357 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6361 eval "$ac_cv_have_x"
6362 fi # $with_x != no
6364 if test "$have_x" != yes; then
6365 echo "$ac_t""$have_x" 1>&6
6366 no_x=yes
6367 else
6368 # If each of the values was on the command line, it overrides each guess.
6369 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6370 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6371 # Update the cache value to reflect the command line values.
6372 ac_cv_have_x="have_x=yes \
6373 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6374 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6377 if test "$no_x" = yes; then
6378 # Not all programs may use this symbol, but it does not hurt to define it.
6379 cat >> confdefs.h <<\EOF
6380 #define X_DISPLAY_MISSING 1
6383 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6384 else
6385 if test -n "$x_includes"; then
6386 X_CFLAGS="$X_CFLAGS -I$x_includes"
6389 # It would also be nice to do this for all -L options, not just this one.
6390 if test -n "$x_libraries"; then
6391 X_LIBS="$X_LIBS -L$x_libraries"
6392 # For Solaris; some versions of Sun CC require a space after -R and
6393 # others require no space. Words are not sufficient . . . .
6394 case "`(uname -sr) 2>/dev/null`" in
6395 "SunOS 5"*)
6396 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6397 echo "configure:6398: checking whether -R must be followed by a space" >&5
6398 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6399 cat > conftest.$ac_ext <<EOF
6400 #line 6401 "configure"
6401 #include "confdefs.h"
6403 int main() {
6405 ; return 0; }
6407 if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6408 rm -rf conftest*
6409 ac_R_nospace=yes
6410 else
6411 echo "configure: failed program was:" >&5
6412 cat conftest.$ac_ext >&5
6413 rm -rf conftest*
6414 ac_R_nospace=no
6416 rm -f conftest*
6417 if test $ac_R_nospace = yes; then
6418 echo "$ac_t""no" 1>&6
6419 X_LIBS="$X_LIBS -R$x_libraries"
6420 else
6421 LIBS="$ac_xsave_LIBS -R $x_libraries"
6422 cat > conftest.$ac_ext <<EOF
6423 #line 6424 "configure"
6424 #include "confdefs.h"
6426 int main() {
6428 ; return 0; }
6430 if { (eval echo configure:6431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6431 rm -rf conftest*
6432 ac_R_space=yes
6433 else
6434 echo "configure: failed program was:" >&5
6435 cat conftest.$ac_ext >&5
6436 rm -rf conftest*
6437 ac_R_space=no
6439 rm -f conftest*
6440 if test $ac_R_space = yes; then
6441 echo "$ac_t""yes" 1>&6
6442 X_LIBS="$X_LIBS -R $x_libraries"
6443 else
6444 echo "$ac_t""neither works" 1>&6
6447 LIBS="$ac_xsave_LIBS"
6448 esac
6451 # Check for system-dependent libraries X programs must link with.
6452 # Do this before checking for the system-independent R6 libraries
6453 # (-lICE), since we may need -lsocket or whatever for X linking.
6455 if test "$ISC" = yes; then
6456 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6457 else
6458 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6459 # libraries were built with DECnet support. And karl@cs.umb.edu says
6460 # the Alpha needs dnet_stub (dnet does not exist).
6461 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6462 echo "configure:6463: checking for dnet_ntoa in -ldnet" >&5
6463 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6464 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6465 echo $ac_n "(cached) $ac_c" 1>&6
6466 else
6467 ac_save_LIBS="$LIBS"
6468 LIBS="-ldnet $LIBS"
6469 cat > conftest.$ac_ext <<EOF
6470 #line 6471 "configure"
6471 #include "confdefs.h"
6472 /* Override any gcc2 internal prototype to avoid an error. */
6473 /* We use char because int might match the return type of a gcc2
6474 builtin and then its argument prototype would still apply. */
6475 char dnet_ntoa();
6477 int main() {
6478 dnet_ntoa()
6479 ; return 0; }
6481 if { (eval echo configure:6482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6482 rm -rf conftest*
6483 eval "ac_cv_lib_$ac_lib_var=yes"
6484 else
6485 echo "configure: failed program was:" >&5
6486 cat conftest.$ac_ext >&5
6487 rm -rf conftest*
6488 eval "ac_cv_lib_$ac_lib_var=no"
6490 rm -f conftest*
6491 LIBS="$ac_save_LIBS"
6494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6495 echo "$ac_t""yes" 1>&6
6496 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6497 else
6498 echo "$ac_t""no" 1>&6
6501 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6502 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6503 echo "configure:6504: checking for dnet_ntoa in -ldnet_stub" >&5
6504 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6505 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6506 echo $ac_n "(cached) $ac_c" 1>&6
6507 else
6508 ac_save_LIBS="$LIBS"
6509 LIBS="-ldnet_stub $LIBS"
6510 cat > conftest.$ac_ext <<EOF
6511 #line 6512 "configure"
6512 #include "confdefs.h"
6513 /* Override any gcc2 internal prototype to avoid an error. */
6514 /* We use char because int might match the return type of a gcc2
6515 builtin and then its argument prototype would still apply. */
6516 char dnet_ntoa();
6518 int main() {
6519 dnet_ntoa()
6520 ; return 0; }
6522 if { (eval echo configure:6523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6523 rm -rf conftest*
6524 eval "ac_cv_lib_$ac_lib_var=yes"
6525 else
6526 echo "configure: failed program was:" >&5
6527 cat conftest.$ac_ext >&5
6528 rm -rf conftest*
6529 eval "ac_cv_lib_$ac_lib_var=no"
6531 rm -f conftest*
6532 LIBS="$ac_save_LIBS"
6535 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6536 echo "$ac_t""yes" 1>&6
6537 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6538 else
6539 echo "$ac_t""no" 1>&6
6544 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6545 # to get the SysV transport functions.
6546 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6547 # needs -lnsl.
6548 # The nsl library prevents programs from opening the X display
6549 # on Irix 5.2, according to dickey@clark.net.
6550 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6551 echo "configure:6552: checking for gethostbyname" >&5
6552 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6553 echo $ac_n "(cached) $ac_c" 1>&6
6554 else
6555 cat > conftest.$ac_ext <<EOF
6556 #line 6557 "configure"
6557 #include "confdefs.h"
6558 /* System header to define __stub macros and hopefully few prototypes,
6559 which can conflict with char gethostbyname(); below. */
6560 #include <assert.h>
6561 /* Override any gcc2 internal prototype to avoid an error. */
6562 /* We use char because int might match the return type of a gcc2
6563 builtin and then its argument prototype would still apply. */
6564 char gethostbyname();
6566 int main() {
6568 /* The GNU C library defines this for functions which it implements
6569 to always fail with ENOSYS. Some functions are actually named
6570 something starting with __ and the normal name is an alias. */
6571 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6572 choke me
6573 #else
6574 gethostbyname();
6575 #endif
6577 ; return 0; }
6579 if { (eval echo configure:6580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6580 rm -rf conftest*
6581 eval "ac_cv_func_gethostbyname=yes"
6582 else
6583 echo "configure: failed program was:" >&5
6584 cat conftest.$ac_ext >&5
6585 rm -rf conftest*
6586 eval "ac_cv_func_gethostbyname=no"
6588 rm -f conftest*
6591 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6592 echo "$ac_t""yes" 1>&6
6594 else
6595 echo "$ac_t""no" 1>&6
6598 if test $ac_cv_func_gethostbyname = no; then
6599 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6600 echo "configure:6601: checking for gethostbyname in -lnsl" >&5
6601 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6603 echo $ac_n "(cached) $ac_c" 1>&6
6604 else
6605 ac_save_LIBS="$LIBS"
6606 LIBS="-lnsl $LIBS"
6607 cat > conftest.$ac_ext <<EOF
6608 #line 6609 "configure"
6609 #include "confdefs.h"
6610 /* Override any gcc2 internal prototype to avoid an error. */
6611 /* We use char because int might match the return type of a gcc2
6612 builtin and then its argument prototype would still apply. */
6613 char gethostbyname();
6615 int main() {
6616 gethostbyname()
6617 ; return 0; }
6619 if { (eval echo configure:6620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6620 rm -rf conftest*
6621 eval "ac_cv_lib_$ac_lib_var=yes"
6622 else
6623 echo "configure: failed program was:" >&5
6624 cat conftest.$ac_ext >&5
6625 rm -rf conftest*
6626 eval "ac_cv_lib_$ac_lib_var=no"
6628 rm -f conftest*
6629 LIBS="$ac_save_LIBS"
6632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6633 echo "$ac_t""yes" 1>&6
6634 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6635 else
6636 echo "$ac_t""no" 1>&6
6641 # lieder@skyler.mavd.honeywell.com says without -lsocket,
6642 # socket/setsockopt and other routines are undefined under SCO ODT
6643 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
6644 # on later versions), says simon@lia.di.epfl.ch: it contains
6645 # gethostby* variants that don't use the nameserver (or something).
6646 # -lsocket must be given before -lnsl if both are needed.
6647 # We assume that if connect needs -lnsl, so does gethostbyname.
6648 echo $ac_n "checking for connect""... $ac_c" 1>&6
6649 echo "configure:6650: checking for connect" >&5
6650 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6651 echo $ac_n "(cached) $ac_c" 1>&6
6652 else
6653 cat > conftest.$ac_ext <<EOF
6654 #line 6655 "configure"
6655 #include "confdefs.h"
6656 /* System header to define __stub macros and hopefully few prototypes,
6657 which can conflict with char connect(); below. */
6658 #include <assert.h>
6659 /* Override any gcc2 internal prototype to avoid an error. */
6660 /* We use char because int might match the return type of a gcc2
6661 builtin and then its argument prototype would still apply. */
6662 char connect();
6664 int main() {
6666 /* The GNU C library defines this for functions which it implements
6667 to always fail with ENOSYS. Some functions are actually named
6668 something starting with __ and the normal name is an alias. */
6669 #if defined (__stub_connect) || defined (__stub___connect)
6670 choke me
6671 #else
6672 connect();
6673 #endif
6675 ; return 0; }
6677 if { (eval echo configure:6678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6678 rm -rf conftest*
6679 eval "ac_cv_func_connect=yes"
6680 else
6681 echo "configure: failed program was:" >&5
6682 cat conftest.$ac_ext >&5
6683 rm -rf conftest*
6684 eval "ac_cv_func_connect=no"
6686 rm -f conftest*
6689 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6690 echo "$ac_t""yes" 1>&6
6692 else
6693 echo "$ac_t""no" 1>&6
6696 if test $ac_cv_func_connect = no; then
6697 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6698 echo "configure:6699: checking for connect in -lsocket" >&5
6699 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6700 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6701 echo $ac_n "(cached) $ac_c" 1>&6
6702 else
6703 ac_save_LIBS="$LIBS"
6704 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6705 cat > conftest.$ac_ext <<EOF
6706 #line 6707 "configure"
6707 #include "confdefs.h"
6708 /* Override any gcc2 internal prototype to avoid an error. */
6709 /* We use char because int might match the return type of a gcc2
6710 builtin and then its argument prototype would still apply. */
6711 char connect();
6713 int main() {
6714 connect()
6715 ; return 0; }
6717 if { (eval echo configure:6718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6718 rm -rf conftest*
6719 eval "ac_cv_lib_$ac_lib_var=yes"
6720 else
6721 echo "configure: failed program was:" >&5
6722 cat conftest.$ac_ext >&5
6723 rm -rf conftest*
6724 eval "ac_cv_lib_$ac_lib_var=no"
6726 rm -f conftest*
6727 LIBS="$ac_save_LIBS"
6730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6731 echo "$ac_t""yes" 1>&6
6732 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6733 else
6734 echo "$ac_t""no" 1>&6
6739 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6740 echo $ac_n "checking for remove""... $ac_c" 1>&6
6741 echo "configure:6742: checking for remove" >&5
6742 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
6743 echo $ac_n "(cached) $ac_c" 1>&6
6744 else
6745 cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748 /* System header to define __stub macros and hopefully few prototypes,
6749 which can conflict with char remove(); below. */
6750 #include <assert.h>
6751 /* Override any gcc2 internal prototype to avoid an error. */
6752 /* We use char because int might match the return type of a gcc2
6753 builtin and then its argument prototype would still apply. */
6754 char remove();
6756 int main() {
6758 /* The GNU C library defines this for functions which it implements
6759 to always fail with ENOSYS. Some functions are actually named
6760 something starting with __ and the normal name is an alias. */
6761 #if defined (__stub_remove) || defined (__stub___remove)
6762 choke me
6763 #else
6764 remove();
6765 #endif
6767 ; return 0; }
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770 rm -rf conftest*
6771 eval "ac_cv_func_remove=yes"
6772 else
6773 echo "configure: failed program was:" >&5
6774 cat conftest.$ac_ext >&5
6775 rm -rf conftest*
6776 eval "ac_cv_func_remove=no"
6778 rm -f conftest*
6781 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6782 echo "$ac_t""yes" 1>&6
6784 else
6785 echo "$ac_t""no" 1>&6
6788 if test $ac_cv_func_remove = no; then
6789 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6790 echo "configure:6791: checking for remove in -lposix" >&5
6791 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6793 echo $ac_n "(cached) $ac_c" 1>&6
6794 else
6795 ac_save_LIBS="$LIBS"
6796 LIBS="-lposix $LIBS"
6797 cat > conftest.$ac_ext <<EOF
6798 #line 6799 "configure"
6799 #include "confdefs.h"
6800 /* Override any gcc2 internal prototype to avoid an error. */
6801 /* We use char because int might match the return type of a gcc2
6802 builtin and then its argument prototype would still apply. */
6803 char remove();
6805 int main() {
6806 remove()
6807 ; return 0; }
6809 if { (eval echo configure:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6810 rm -rf conftest*
6811 eval "ac_cv_lib_$ac_lib_var=yes"
6812 else
6813 echo "configure: failed program was:" >&5
6814 cat conftest.$ac_ext >&5
6815 rm -rf conftest*
6816 eval "ac_cv_lib_$ac_lib_var=no"
6818 rm -f conftest*
6819 LIBS="$ac_save_LIBS"
6822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6823 echo "$ac_t""yes" 1>&6
6824 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6825 else
6826 echo "$ac_t""no" 1>&6
6831 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6832 echo $ac_n "checking for shmat""... $ac_c" 1>&6
6833 echo "configure:6834: checking for shmat" >&5
6834 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
6835 echo $ac_n "(cached) $ac_c" 1>&6
6836 else
6837 cat > conftest.$ac_ext <<EOF
6838 #line 6839 "configure"
6839 #include "confdefs.h"
6840 /* System header to define __stub macros and hopefully few prototypes,
6841 which can conflict with char shmat(); below. */
6842 #include <assert.h>
6843 /* Override any gcc2 internal prototype to avoid an error. */
6844 /* We use char because int might match the return type of a gcc2
6845 builtin and then its argument prototype would still apply. */
6846 char shmat();
6848 int main() {
6850 /* The GNU C library defines this for functions which it implements
6851 to always fail with ENOSYS. Some functions are actually named
6852 something starting with __ and the normal name is an alias. */
6853 #if defined (__stub_shmat) || defined (__stub___shmat)
6854 choke me
6855 #else
6856 shmat();
6857 #endif
6859 ; return 0; }
6861 if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6862 rm -rf conftest*
6863 eval "ac_cv_func_shmat=yes"
6864 else
6865 echo "configure: failed program was:" >&5
6866 cat conftest.$ac_ext >&5
6867 rm -rf conftest*
6868 eval "ac_cv_func_shmat=no"
6870 rm -f conftest*
6873 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6874 echo "$ac_t""yes" 1>&6
6876 else
6877 echo "$ac_t""no" 1>&6
6880 if test $ac_cv_func_shmat = no; then
6881 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6882 echo "configure:6883: checking for shmat in -lipc" >&5
6883 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6884 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6885 echo $ac_n "(cached) $ac_c" 1>&6
6886 else
6887 ac_save_LIBS="$LIBS"
6888 LIBS="-lipc $LIBS"
6889 cat > conftest.$ac_ext <<EOF
6890 #line 6891 "configure"
6891 #include "confdefs.h"
6892 /* Override any gcc2 internal prototype to avoid an error. */
6893 /* We use char because int might match the return type of a gcc2
6894 builtin and then its argument prototype would still apply. */
6895 char shmat();
6897 int main() {
6898 shmat()
6899 ; return 0; }
6901 if { (eval echo configure:6902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6902 rm -rf conftest*
6903 eval "ac_cv_lib_$ac_lib_var=yes"
6904 else
6905 echo "configure: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6907 rm -rf conftest*
6908 eval "ac_cv_lib_$ac_lib_var=no"
6910 rm -f conftest*
6911 LIBS="$ac_save_LIBS"
6914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6915 echo "$ac_t""yes" 1>&6
6916 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6917 else
6918 echo "$ac_t""no" 1>&6
6924 # Check for libraries that X11R6 Xt/Xaw programs need.
6925 ac_save_LDFLAGS="$LDFLAGS"
6926 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6927 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6928 # check for ICE first), but we must link in the order -lSM -lICE or
6929 # we get undefined symbols. So assume we have SM if we have ICE.
6930 # These have to be linked with before -lX11, unlike the other
6931 # libraries we check for below, so use a different variable.
6932 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6933 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
6934 echo "configure:6935: checking for IceConnectionNumber in -lICE" >&5
6935 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6936 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6937 echo $ac_n "(cached) $ac_c" 1>&6
6938 else
6939 ac_save_LIBS="$LIBS"
6940 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6941 cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 /* Override any gcc2 internal prototype to avoid an error. */
6945 /* We use char because int might match the return type of a gcc2
6946 builtin and then its argument prototype would still apply. */
6947 char IceConnectionNumber();
6949 int main() {
6950 IceConnectionNumber()
6951 ; return 0; }
6953 if { (eval echo configure:6954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6954 rm -rf conftest*
6955 eval "ac_cv_lib_$ac_lib_var=yes"
6956 else
6957 echo "configure: failed program was:" >&5
6958 cat conftest.$ac_ext >&5
6959 rm -rf conftest*
6960 eval "ac_cv_lib_$ac_lib_var=no"
6962 rm -f conftest*
6963 LIBS="$ac_save_LIBS"
6966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6967 echo "$ac_t""yes" 1>&6
6968 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6969 else
6970 echo "$ac_t""no" 1>&6
6973 LDFLAGS="$ac_save_LDFLAGS"
6978 # Check whether --enable-java-awt or --disable-java-awt was given.
6979 if test "${enable_java_awt+set}" = set; then
6980 enableval="$enable_java_awt"
6985 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
6986 use_xlib_awt=""
6987 use_gtk_awt=""
6989 for peer in $peerlibs ; do
6990 case $peer in
6991 xlib)
6992 if test "$no_x" = yes; then
6993 echo "*** xlib peers requested but no X library available" 1>&2
6994 exit 1
6995 else
6996 use_xlib_awt="yes"
6999 gtk)
7000 # Nothing, yet...
7003 use_xlib_awt=
7004 use_gtk_awt=
7005 break
7008 echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
7009 exit 1
7010 esac
7011 done
7015 if test "$use_xlib_awt" = yes; then
7016 XLIB_AWT_TRUE=
7017 XLIB_AWT_FALSE='#'
7018 else
7019 XLIB_AWT_TRUE='#'
7020 XLIB_AWT_FALSE=
7024 if test "$use_gtk_awt" = yes; then
7025 GTK_AWT_TRUE=
7026 GTK_AWT_FALSE='#'
7027 else
7028 GTK_AWT_TRUE='#'
7029 GTK_AWT_FALSE=
7033 here=`pwd`
7036 # We get this from the environment.
7039 trap '' 1 2 15
7040 cat > confcache <<\EOF
7041 # This file is a shell script that caches the results of configure
7042 # tests run on this system so they can be shared between configure
7043 # scripts and configure runs. It is not useful on other systems.
7044 # If it contains results you don't want to keep, you may remove or edit it.
7046 # By default, configure uses ./config.cache as the cache file,
7047 # creating it if it does not exist already. You can give configure
7048 # the --cache-file=FILE option to use a different cache file; that is
7049 # what configure does when it calls configure scripts in
7050 # subdirectories, so they share the cache.
7051 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7052 # config.status only pays attention to the cache file if you give it the
7053 # --recheck option to rerun configure.
7056 # The following way of writing the cache mishandles newlines in values,
7057 # but we know of no workaround that is simple, portable, and efficient.
7058 # So, don't put newlines in cache variables' values.
7059 # Ultrix sh set writes to stderr and can't be redirected directly,
7060 # and sets the high bit in the cache file unless we assign to the vars.
7061 (set) 2>&1 |
7062 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7063 *ac_space=\ *)
7064 # `set' does not quote correctly, so add quotes (double-quote substitution
7065 # turns \\\\ into \\, and sed turns \\ into \).
7066 sed -n \
7067 -e "s/'/'\\\\''/g" \
7068 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7071 # `set' quotes correctly as required by POSIX, so do not add quotes.
7072 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7074 esac >> confcache
7075 if cmp -s $cache_file confcache; then
7077 else
7078 if test -w $cache_file; then
7079 echo "updating cache $cache_file"
7080 cat confcache > $cache_file
7081 else
7082 echo "not updating unwritable cache $cache_file"
7085 rm -f confcache
7087 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7089 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7090 # Let make expand exec_prefix.
7091 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7093 # Any assignment to VPATH causes Sun make to only execute
7094 # the first set of double-colon rules, so remove it if not needed.
7095 # If there is a colon in the path, we need to keep it.
7096 if test "x$srcdir" = x.; then
7097 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7100 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7102 DEFS=-DHAVE_CONFIG_H
7104 # Without the "./", some shells look in PATH for config.status.
7105 : ${CONFIG_STATUS=./config.status}
7107 echo creating $CONFIG_STATUS
7108 rm -f $CONFIG_STATUS
7109 cat > $CONFIG_STATUS <<EOF
7110 #! /bin/sh
7111 # Generated automatically by configure.
7112 # Run this file to recreate the current configuration.
7113 # This directory was configured as follows,
7114 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7116 # $0 $ac_configure_args
7118 # Compiler output produced by configure, useful for debugging
7119 # configure, is in ./config.log if it exists.
7121 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7122 for ac_option
7124 case "\$ac_option" in
7125 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7126 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7127 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7128 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7129 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7130 exit 0 ;;
7131 -help | --help | --hel | --he | --h)
7132 echo "\$ac_cs_usage"; exit 0 ;;
7133 *) echo "\$ac_cs_usage"; exit 1 ;;
7134 esac
7135 done
7137 ac_given_srcdir=$srcdir
7138 ac_given_INSTALL="$INSTALL"
7140 trap 'rm -fr `echo "Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile include/config.h gcj/libgcj-config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7142 cat >> $CONFIG_STATUS <<EOF
7144 # Protect against being on the right side of a sed subst in config.status.
7145 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7146 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7147 $ac_vpsub
7148 $extrasub
7149 s%@SHELL@%$SHELL%g
7150 s%@CFLAGS@%$CFLAGS%g
7151 s%@CPPFLAGS@%$CPPFLAGS%g
7152 s%@CXXFLAGS@%$CXXFLAGS%g
7153 s%@FFLAGS@%$FFLAGS%g
7154 s%@DEFS@%$DEFS%g
7155 s%@LDFLAGS@%$LDFLAGS%g
7156 s%@LIBS@%$LIBS%g
7157 s%@exec_prefix@%$exec_prefix%g
7158 s%@prefix@%$prefix%g
7159 s%@program_transform_name@%$program_transform_name%g
7160 s%@bindir@%$bindir%g
7161 s%@sbindir@%$sbindir%g
7162 s%@libexecdir@%$libexecdir%g
7163 s%@datadir@%$datadir%g
7164 s%@sysconfdir@%$sysconfdir%g
7165 s%@sharedstatedir@%$sharedstatedir%g
7166 s%@localstatedir@%$localstatedir%g
7167 s%@libdir@%$libdir%g
7168 s%@includedir@%$includedir%g
7169 s%@oldincludedir@%$oldincludedir%g
7170 s%@infodir@%$infodir%g
7171 s%@mandir@%$mandir%g
7172 s%@LN_S@%$LN_S%g
7173 s%@libgcj_basedir@%$libgcj_basedir%g
7174 s%@mkinstalldirs@%$mkinstalldirs%g
7175 s%@host@%$host%g
7176 s%@host_alias@%$host_alias%g
7177 s%@host_cpu@%$host_cpu%g
7178 s%@host_vendor@%$host_vendor%g
7179 s%@host_os@%$host_os%g
7180 s%@target@%$target%g
7181 s%@target_alias@%$target_alias%g
7182 s%@target_cpu@%$target_cpu%g
7183 s%@target_vendor@%$target_vendor%g
7184 s%@target_os@%$target_os%g
7185 s%@build@%$build%g
7186 s%@build_alias@%$build_alias%g
7187 s%@build_cpu@%$build_cpu%g
7188 s%@build_vendor@%$build_vendor%g
7189 s%@build_os@%$build_os%g
7190 s%@CC@%$CC%g
7191 s%@CXX@%$CXX%g
7192 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7193 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7194 s%@INSTALL_DATA@%$INSTALL_DATA%g
7195 s%@PACKAGE@%$PACKAGE%g
7196 s%@VERSION@%$VERSION%g
7197 s%@ACLOCAL@%$ACLOCAL%g
7198 s%@AUTOCONF@%$AUTOCONF%g
7199 s%@AUTOMAKE@%$AUTOMAKE%g
7200 s%@AUTOHEADER@%$AUTOHEADER%g
7201 s%@MAKEINFO@%$MAKEINFO%g
7202 s%@SET_MAKE@%$SET_MAKE%g
7203 s%@AS@%$AS%g
7204 s%@AR@%$AR%g
7205 s%@RANLIB@%$RANLIB%g
7206 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7207 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7208 s%@MAINT@%$MAINT%g
7209 s%@EXEEXT@%$EXEEXT%g
7210 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
7211 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
7212 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
7213 s%@INCLTDL@%$INCLTDL%g
7214 s%@LIBLTDL@%$LIBLTDL%g
7215 s%@DIRLTDL@%$DIRLTDL%g
7216 s%@OBJEXT@%$OBJEXT%g
7217 s%@STRIP@%$STRIP%g
7218 s%@LIBTOOL@%$LIBTOOL%g
7219 s%@CXXCPP@%$CXXCPP%g
7220 s%@subdirs@%$subdirs%g
7221 s%@COMPPATH@%$COMPPATH%g
7222 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
7223 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
7224 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
7225 s%@LIBFFI@%$LIBFFI%g
7226 s%@LIBFFIINCS@%$LIBFFIINCS%g
7227 s%@CPP@%$CPP%g
7228 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
7229 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
7230 s%@ZLIBSPEC@%$ZLIBSPEC%g
7231 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
7232 s%@GCLIBS@%$GCLIBS%g
7233 s%@GCINCS@%$GCINCS%g
7234 s%@GCDEPS@%$GCDEPS%g
7235 s%@GCOBJS@%$GCOBJS%g
7236 s%@GCSPEC@%$GCSPEC%g
7237 s%@JC1GCSPEC@%$JC1GCSPEC%g
7238 s%@GCTESTSPEC@%$GCTESTSPEC%g
7239 s%@THREADLIBS@%$THREADLIBS%g
7240 s%@THREADINCS@%$THREADINCS%g
7241 s%@THREADDEPS@%$THREADDEPS%g
7242 s%@THREADOBJS@%$THREADOBJS%g
7243 s%@THREADSPEC@%$THREADSPEC%g
7244 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
7245 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
7246 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
7247 s%@LIBICONV@%$LIBICONV%g
7248 s%@GCJ@%$GCJ%g
7249 s%@GCJFLAGS@%$GCJFLAGS%g
7250 s%@ZLIBS@%$ZLIBS%g
7251 s%@ZDEPS@%$ZDEPS%g
7252 s%@ZINCS@%$ZINCS%g
7253 s%@DIVIDESPEC@%$DIVIDESPEC%g
7254 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
7255 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
7256 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
7257 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
7258 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
7259 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
7260 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
7261 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
7262 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
7263 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
7264 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
7265 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
7266 s%@GCJVERSION@%$GCJVERSION%g
7267 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
7268 s%@ALLOCA@%$ALLOCA%g
7269 s%@PERL@%$PERL%g
7270 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
7271 s%@X_CFLAGS@%$X_CFLAGS%g
7272 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7273 s%@X_LIBS@%$X_LIBS%g
7274 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7275 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
7276 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
7277 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
7278 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
7279 s%@here@%$here%g
7281 CEOF
7284 cat >> $CONFIG_STATUS <<\EOF
7286 # Split the substitutions into bite-sized pieces for seds with
7287 # small command number limits, like on Digital OSF/1 and HP-UX.
7288 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7289 ac_file=1 # Number of current file.
7290 ac_beg=1 # First line for current file.
7291 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7292 ac_more_lines=:
7293 ac_sed_cmds=""
7294 while $ac_more_lines; do
7295 if test $ac_beg -gt 1; then
7296 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7297 else
7298 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7300 if test ! -s conftest.s$ac_file; then
7301 ac_more_lines=false
7302 rm -f conftest.s$ac_file
7303 else
7304 if test -z "$ac_sed_cmds"; then
7305 ac_sed_cmds="sed -f conftest.s$ac_file"
7306 else
7307 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7309 ac_file=`expr $ac_file + 1`
7310 ac_beg=$ac_end
7311 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7313 done
7314 if test -z "$ac_sed_cmds"; then
7315 ac_sed_cmds=cat
7319 cat >> $CONFIG_STATUS <<EOF
7321 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
7323 cat >> $CONFIG_STATUS <<\EOF
7324 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7325 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7326 case "$ac_file" in
7327 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7328 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7329 *) ac_file_in="${ac_file}.in" ;;
7330 esac
7332 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7334 # Remove last slash and all that follows it. Not all systems have dirname.
7335 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7336 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7337 # The file is in a subdirectory.
7338 test ! -d "$ac_dir" && mkdir "$ac_dir"
7339 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7340 # A "../" for each directory in $ac_dir_suffix.
7341 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7342 else
7343 ac_dir_suffix= ac_dots=
7346 case "$ac_given_srcdir" in
7347 .) srcdir=.
7348 if test -z "$ac_dots"; then top_srcdir=.
7349 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7350 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7351 *) # Relative path.
7352 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7353 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7354 esac
7356 case "$ac_given_INSTALL" in
7357 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7358 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7359 esac
7361 echo creating "$ac_file"
7362 rm -f "$ac_file"
7363 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7364 case "$ac_file" in
7365 *Makefile*) ac_comsub="1i\\
7366 # $configure_input" ;;
7367 *) ac_comsub= ;;
7368 esac
7370 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7371 sed -e "$ac_comsub
7372 s%@configure_input@%$configure_input%g
7373 s%@srcdir@%$srcdir%g
7374 s%@top_srcdir@%$top_srcdir%g
7375 s%@INSTALL@%$INSTALL%g
7376 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7377 fi; done
7378 rm -f conftest.s*
7380 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7381 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7383 # ac_d sets the value in "#define NAME VALUE" lines.
7384 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7385 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7386 ac_dC='\3'
7387 ac_dD='%g'
7388 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7389 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7390 ac_uB='\([ ]\)%\1#\2define\3'
7391 ac_uC=' '
7392 ac_uD='\4%g'
7393 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7394 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7395 ac_eB='$%\1#\2define\3'
7396 ac_eC=' '
7397 ac_eD='%g'
7399 if test "${CONFIG_HEADERS+set}" != set; then
7401 cat >> $CONFIG_STATUS <<EOF
7402 CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
7404 cat >> $CONFIG_STATUS <<\EOF
7406 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7407 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7408 case "$ac_file" in
7409 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7410 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7411 *) ac_file_in="${ac_file}.in" ;;
7412 esac
7414 echo creating $ac_file
7416 rm -f conftest.frag conftest.in conftest.out
7417 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7418 cat $ac_file_inputs > conftest.in
7422 # Transform confdefs.h into a sed script conftest.vals that substitutes
7423 # the proper values into config.h.in to produce config.h. And first:
7424 # Protect against being on the right side of a sed subst in config.status.
7425 # Protect against being in an unquoted here document in config.status.
7426 rm -f conftest.vals
7427 cat > conftest.hdr <<\EOF
7428 s/[\\&%]/\\&/g
7429 s%[\\$`]%\\&%g
7430 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7431 s%ac_d%ac_u%gp
7432 s%ac_u%ac_e%gp
7434 sed -n -f conftest.hdr confdefs.h > conftest.vals
7435 rm -f conftest.hdr
7437 # This sed command replaces #undef with comments. This is necessary, for
7438 # example, in the case of _POSIX_SOURCE, which is predefined and required
7439 # on some systems where configure will not decide to define it.
7440 cat >> conftest.vals <<\EOF
7441 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7444 # Break up conftest.vals because some shells have a limit on
7445 # the size of here documents, and old seds have small limits too.
7447 rm -f conftest.tail
7448 while :
7450 ac_lines=`grep -c . conftest.vals`
7451 # grep -c gives empty output for an empty file on some AIX systems.
7452 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7453 # Write a limited-size here document to conftest.frag.
7454 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7455 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7456 echo 'CEOF
7457 sed -f conftest.frag conftest.in > conftest.out
7458 rm -f conftest.in
7459 mv conftest.out conftest.in
7460 ' >> $CONFIG_STATUS
7461 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7462 rm -f conftest.vals
7463 mv conftest.tail conftest.vals
7464 done
7465 rm -f conftest.vals
7467 cat >> $CONFIG_STATUS <<\EOF
7468 rm -f conftest.frag conftest.h
7469 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7470 cat conftest.in >> conftest.h
7471 rm -f conftest.in
7472 if cmp -s $ac_file conftest.h 2>/dev/null; then
7473 echo "$ac_file is unchanged"
7474 rm -f conftest.h
7475 else
7476 # Remove last slash and all that follows it. Not all systems have dirname.
7477 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7478 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7479 # The file is in a subdirectory.
7480 test ! -d "$ac_dir" && mkdir "$ac_dir"
7482 rm -f $ac_file
7483 mv conftest.h $ac_file
7485 fi; done
7489 cat >> $CONFIG_STATUS <<EOF
7490 ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
7491 ac_dests="java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc include/java-gc.h include/java-threads.h include/java-signal.h"
7494 cat >> $CONFIG_STATUS <<\EOF
7495 srcdir=$ac_given_srcdir
7496 while test -n "$ac_sources"; do
7497 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7498 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7500 echo "linking $srcdir/$ac_source to $ac_dest"
7502 if test ! -r $srcdir/$ac_source; then
7503 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7505 rm -f $ac_dest
7507 # Make relative symlinks.
7508 # Remove last slash and all that follows it. Not all systems have dirname.
7509 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7510 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7511 # The dest file is in a subdirectory.
7512 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7513 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7514 # A "../" for each directory in $ac_dest_dir_suffix.
7515 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7516 else
7517 ac_dest_dir_suffix= ac_dots=
7520 case "$srcdir" in
7521 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7522 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7523 esac
7525 # Make a symlink if possible; otherwise try a hard link.
7526 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7527 ln $srcdir/$ac_source $ac_dest; then :
7528 else
7529 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7531 done
7533 cat >> $CONFIG_STATUS <<EOF
7535 srcdir=${srcdir}
7536 host=${host}
7537 target=${target}
7538 with_multisubdir=${with_multisubdir}
7539 ac_configure_args="${multilib_arg} ${ac_configure_args}"
7540 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7541 libgcj_basedir=${libgcj_basedir}
7542 CC="${CC}"
7543 CXX="${CXX}"
7546 cat >> $CONFIG_STATUS <<\EOF
7547 am_indx=1
7548 for am_file in include/config.h gcj/libgcj-config.h; do
7549 case " $CONFIG_HEADERS " in
7550 *" $am_file "*)
7551 echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
7553 esac
7554 am_indx=`expr "$am_indx" + 1`
7555 done
7556 # Only add multilib support code if we just rebuilt top-level Makefile.
7557 case " $CONFIG_FILES " in
7558 *" Makefile "*)
7559 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
7561 esac
7563 # Make subdirectories and `.d' files. Look in both srcdir and
7564 # builddir for the .java files.
7565 h=`pwd`
7566 : > deps.mk
7567 ( (cd $srcdir && find . -name '*.java' -print) ;
7568 find . -name '*.java' -print) | \
7569 fgrep -v testsuite | \
7570 sed -e 's/\.java/.d/' | \
7571 while read f; do
7572 echo "include $f" >> deps.mk
7573 test -f $f || {
7575 d=`echo $f | sed -e 's,/[^/]*$,,'`
7577 $libgcj_basedir/../mkinstalldirs $d
7578 echo > $f
7580 done
7582 exit 0
7584 chmod +x $CONFIG_STATUS
7585 rm -fr confdefs* $ac_clean_files
7586 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7588 if test "$no_recursion" != yes; then
7590 # Remove --cache-file and --srcdir arguments so they do not pile up.
7591 ac_sub_configure_args=
7592 ac_prev=
7593 for ac_arg in $ac_configure_args; do
7594 if test -n "$ac_prev"; then
7595 ac_prev=
7596 continue
7598 case "$ac_arg" in
7599 -cache-file | --cache-file | --cache-fil | --cache-fi \
7600 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7601 ac_prev=cache_file ;;
7602 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7603 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7605 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7606 ac_prev=srcdir ;;
7607 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7609 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7610 esac
7611 done
7613 for ac_config_dir in $DIRLTDL; do
7615 # Do not complain, so a configure script can configure whichever
7616 # parts of a large source tree are present.
7617 if test ! -d $srcdir/$ac_config_dir; then
7618 continue
7621 echo configuring in $ac_config_dir
7623 case "$srcdir" in
7624 .) ;;
7626 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7627 else
7628 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7631 esac
7633 ac_popdir=`pwd`
7634 cd $ac_config_dir
7636 # A "../" for each directory in /$ac_config_dir.
7637 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7639 case "$srcdir" in
7640 .) # No --srcdir option. We are building in place.
7641 ac_sub_srcdir=$srcdir ;;
7642 /*) # Absolute path.
7643 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7644 *) # Relative path.
7645 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7646 esac
7648 # Check for guested configure; otherwise get Cygnus style configure.
7649 if test -f $ac_sub_srcdir/configure; then
7650 ac_sub_configure=$ac_sub_srcdir/configure
7651 elif test -f $ac_sub_srcdir/configure.in; then
7652 ac_sub_configure=$ac_configure
7653 else
7654 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7655 ac_sub_configure=
7658 # The recursion is here.
7659 if test -n "$ac_sub_configure"; then
7661 # Make the cache file name correct relative to the subdirectory.
7662 case "$cache_file" in
7663 /*) ac_sub_cache_file=$cache_file ;;
7664 *) # Relative path.
7665 ac_sub_cache_file="$ac_dots$cache_file" ;;
7666 esac
7667 case "$ac_given_INSTALL" in
7668 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7669 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7670 esac
7672 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7673 # The eval makes quoting arguments work.
7674 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7675 then :
7676 else
7677 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7681 cd $ac_popdir
7682 done