source: vendor/gcc/3.2.2/libjava/configure

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 225.8 KB
Line 
1#! /bin/sh
2
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.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-target-subdir=SUBDIR
16 configuring in a subdirectory"
17ac_help="$ac_help
18 --with-cross-host=HOST configuring with a cross compiler"
19ac_help="$ac_help
20 --enable-multilib build many library versions (default)"
21ac_help="$ac_help
22 --enable-maintainer-mode enable make rules and dependencies not useful
23 (and sometimes confusing) to the casual installer"
24ac_help="$ac_help
25 --enable-shared[=PKGS] build shared libraries [default=yes]"
26ac_help="$ac_help
27 --enable-static[=PKGS] build static libraries [default=yes]"
28ac_help="$ac_help
29 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
30ac_help="$ac_help
31 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
32ac_help="$ac_help
33 --disable-libtool-lock avoid locking (might break parallel builds)"
34ac_help="$ac_help
35 --with-pic try to use only PIC/non-PIC objects [default=use both]"
36ac_help="$ac_help
37 --disable-getenv-properties
38 don't set system properties from GCJ_PROPERTIES"
39ac_help="$ac_help
40 --enable-hash-synchronization
41 Use global hash table for monitor locks"
42ac_help="$ac_help
43 --enable-libgcj-debug enable runtime debugging code"
44ac_help="$ac_help
45 --enable-interpreter enable interpreter"
46ac_help="$ac_help
47 --enable-sjlj-exceptions force use of builtin_setjmp for exceptions"
48ac_help="$ac_help
49 --disable-java-net disable java.net"
50ac_help="$ac_help
51 --without-libffi don't use libffi"
52ac_help="$ac_help
53 --disable-jvmpi disable JVMPI support"
54ac_help="$ac_help
55 --with-ecos enable runtime eCos target support"
56ac_help="$ac_help
57 --with-system-zlib use installed libz"
58ac_help="$ac_help
59 --enable-java-gc=TYPE choose garbage collector [boehm]"
60ac_help="$ac_help
61 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
62ac_help="$ac_help
63 --with-x use the X Window System"
64ac_help="$ac_help
65 --enable-java-awt list of AWT peer implementations to be built"
66
67# Initialize some variables set by options.
68# The variables have the same names as the options, with
69# dashes changed to underlines.
70build=NONE
71cache_file=./config.cache
72exec_prefix=NONE
73host=NONE
74no_create=
75nonopt=NONE
76no_recursion=
77prefix=NONE
78program_prefix=NONE
79program_suffix=NONE
80program_transform_name=s,x,x,
81silent=
82site=
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
197 --version print the version of autoconf that created configure
198Directory and file names:
199 --prefix=PREFIX install architecture-independent files in PREFIX
200 [$ac_default_prefix]
201 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
202 [same as prefix]
203 --bindir=DIR user executables in DIR [EPREFIX/bin]
204 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
205 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
206 --datadir=DIR read-only architecture-independent data in DIR
207 [PREFIX/share]
208 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
209 --sharedstatedir=DIR modifiable architecture-independent data in DIR
210 [PREFIX/com]
211 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
212 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
213 --includedir=DIR C header files in DIR [PREFIX/include]
214 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
215 --infodir=DIR info documentation in DIR [PREFIX/info]
216 --mandir=DIR man documentation in DIR [PREFIX/man]
217 --srcdir=DIR find the sources in DIR [configure dir or ..]
218 --program-prefix=PREFIX prepend PREFIX to installed program names
219 --program-suffix=SUFFIX append SUFFIX to installed program names
220 --program-transform-name=PROGRAM
221 run sed PROGRAM on installed program names
222EOF
223 cat << EOF
224Host type:
225 --build=BUILD configure for building on BUILD [BUILD=HOST]
226 --host=HOST configure for HOST [guessed]
227 --target=TARGET configure for TARGET [TARGET=HOST]
228Features and packages:
229 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
230 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
231 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
232 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
233 --x-includes=DIR X include files are in DIR
234 --x-libraries=DIR X library files are in DIR
235EOF
236 if test -n "$ac_help"; then
237 echo "--enable and --with options recognized:$ac_help"
238 fi
239 exit 0 ;;
240
241 -host | --host | --hos | --ho)
242 ac_prev=host ;;
243 -host=* | --host=* | --hos=* | --ho=*)
244 host="$ac_optarg" ;;
245
246 -includedir | --includedir | --includedi | --included | --include \
247 | --includ | --inclu | --incl | --inc)
248 ac_prev=includedir ;;
249 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
250 | --includ=* | --inclu=* | --incl=* | --inc=*)
251 includedir="$ac_optarg" ;;
252
253 -infodir | --infodir | --infodi | --infod | --info | --inf)
254 ac_prev=infodir ;;
255 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
256 infodir="$ac_optarg" ;;
257
258 -libdir | --libdir | --libdi | --libd)
259 ac_prev=libdir ;;
260 -libdir=* | --libdir=* | --libdi=* | --libd=*)
261 libdir="$ac_optarg" ;;
262
263 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
264 | --libexe | --libex | --libe)
265 ac_prev=libexecdir ;;
266 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
267 | --libexe=* | --libex=* | --libe=*)
268 libexecdir="$ac_optarg" ;;
269
270 -localstatedir | --localstatedir | --localstatedi | --localstated \
271 | --localstate | --localstat | --localsta | --localst \
272 | --locals | --local | --loca | --loc | --lo)
273 ac_prev=localstatedir ;;
274 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
275 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
276 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
277 localstatedir="$ac_optarg" ;;
278
279 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
280 ac_prev=mandir ;;
281 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
282 mandir="$ac_optarg" ;;
283
284 -nfp | --nfp | --nf)
285 # Obsolete; use --without-fp.
286 with_fp=no ;;
287
288 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
289 | --no-cr | --no-c)
290 no_create=yes ;;
291
292 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
293 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
294 no_recursion=yes ;;
295
296 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
297 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
298 | --oldin | --oldi | --old | --ol | --o)
299 ac_prev=oldincludedir ;;
300 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
301 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
302 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
303 oldincludedir="$ac_optarg" ;;
304
305 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
306 ac_prev=prefix ;;
307 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
308 prefix="$ac_optarg" ;;
309
310 -program-prefix | --program-prefix | --program-prefi | --program-pref \
311 | --program-pre | --program-pr | --program-p)
312 ac_prev=program_prefix ;;
313 -program-prefix=* | --program-prefix=* | --program-prefi=* \
314 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
315 program_prefix="$ac_optarg" ;;
316
317 -program-suffix | --program-suffix | --program-suffi | --program-suff \
318 | --program-suf | --program-su | --program-s)
319 ac_prev=program_suffix ;;
320 -program-suffix=* | --program-suffix=* | --program-suffi=* \
321 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
322 program_suffix="$ac_optarg" ;;
323
324 -program-transform-name | --program-transform-name \
325 | --program-transform-nam | --program-transform-na \
326 | --program-transform-n | --program-transform- \
327 | --program-transform | --program-transfor \
328 | --program-transfo | --program-transf \
329 | --program-trans | --program-tran \
330 | --progr-tra | --program-tr | --program-t)
331 ac_prev=program_transform_name ;;
332 -program-transform-name=* | --program-transform-name=* \
333 | --program-transform-nam=* | --program-transform-na=* \
334 | --program-transform-n=* | --program-transform-=* \
335 | --program-transform=* | --program-transfor=* \
336 | --program-transfo=* | --program-transf=* \
337 | --program-trans=* | --program-tran=* \
338 | --progr-tra=* | --program-tr=* | --program-t=*)
339 program_transform_name="$ac_optarg" ;;
340
341 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
342 | -silent | --silent | --silen | --sile | --sil)
343 silent=yes ;;
344
345 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
346 ac_prev=sbindir ;;
347 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
348 | --sbi=* | --sb=*)
349 sbindir="$ac_optarg" ;;
350
351 -sharedstatedir | --sharedstatedir | --sharedstatedi \
352 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
353 | --sharedst | --shareds | --shared | --share | --shar \
354 | --sha | --sh)
355 ac_prev=sharedstatedir ;;
356 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
357 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
358 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
359 | --sha=* | --sh=*)
360 sharedstatedir="$ac_optarg" ;;
361
362 -site | --site | --sit)
363 ac_prev=site ;;
364 -site=* | --site=* | --sit=*)
365 site="$ac_optarg" ;;
366
367 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
368 ac_prev=srcdir ;;
369 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
370 srcdir="$ac_optarg" ;;
371
372 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
373 | --syscon | --sysco | --sysc | --sys | --sy)
374 ac_prev=sysconfdir ;;
375 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
376 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
377 sysconfdir="$ac_optarg" ;;
378
379 -target | --target | --targe | --targ | --tar | --ta | --t)
380 ac_prev=target ;;
381 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
382 target="$ac_optarg" ;;
383
384 -v | -verbose | --verbose | --verbos | --verbo | --verb)
385 verbose=yes ;;
386
387 -version | --version | --versio | --versi | --vers)
388 echo "configure generated by autoconf version 2.13"
389 exit 0 ;;
390
391 -with-* | --with-*)
392 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
393 # Reject names that are not valid shell variable names.
394 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
395 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
396 fi
397 ac_package=`echo $ac_package| sed 's/-/_/g'`
398 case "$ac_option" in
399 *=*) ;;
400 *) ac_optarg=yes ;;
401 esac
402 eval "with_${ac_package}='$ac_optarg'" ;;
403
404 -without-* | --without-*)
405 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
406 # Reject names that are not valid shell variable names.
407 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
408 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
409 fi
410 ac_package=`echo $ac_package| sed 's/-/_/g'`
411 eval "with_${ac_package}=no" ;;
412
413 --x)
414 # Obsolete; use --with-x.
415 with_x=yes ;;
416
417 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
418 | --x-incl | --x-inc | --x-in | --x-i)
419 ac_prev=x_includes ;;
420 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
421 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
422 x_includes="$ac_optarg" ;;
423
424 -x-libraries | --x-libraries | --x-librarie | --x-librari \
425 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
426 ac_prev=x_libraries ;;
427 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
428 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
429 x_libraries="$ac_optarg" ;;
430
431 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
432 ;;
433
434 *)
435 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
436 echo "configure: warning: $ac_option: invalid host type" 1>&2
437 fi
438 if test "x$nonopt" != xNONE; then
439 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
440 fi
441 nonopt="$ac_option"
442 ;;
443
444 esac
445done
446
447if test -n "$ac_prev"; then
448 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
449fi
450
451trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
452
453# File descriptor usage:
454# 0 standard input
455# 1 file creation
456# 2 errors and warnings
457# 3 some systems may open it to /dev/tty
458# 4 used on the Kubota Titan
459# 6 checking for... messages and results
460# 5 compiler messages saved in config.log
461if test "$silent" = yes; then
462 exec 6>/dev/null
463else
464 exec 6>&1
465fi
466exec 5>./config.log
467
468echo "\
469This file contains any messages produced by compilers while
470running configure, to aid debugging if configure makes a mistake.
471" 1>&5
472
473# Strip out --no-create and --no-recursion so they do not pile up.
474# Also quote any args containing shell metacharacters.
475ac_configure_args=
476for ac_arg
477do
478 case "$ac_arg" in
479 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
480 | --no-cr | --no-c) ;;
481 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
482 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
483 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
484 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
485 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
486 esac
487done
488
489# NLS nuisances.
490# Only set these to C if already set. These must not be set unconditionally
491# because not all systems understand e.g. LANG=C (notably SCO).
492# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
493# Non-C LC_CTYPE values break the ctype check.
494if test "${LANG+set}" = set; then LANG=C; export LANG; fi
495if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
496if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
497if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
498
499# confdefs.h avoids OS command line length limits that DEFS can exceed.
500rm -rf conftest* confdefs.h
501# AIX cpp loses on an empty file, so make sure it contains at least a newline.
502echo > confdefs.h
503
504# A filename unique to this package, relative to the directory that
505# configure is in, which we can look for to find out if srcdir is correct.
506ac_unique_file=java/lang/System.java
507
508# Find the source files, if location was not specified.
509if test -z "$srcdir"; then
510 ac_srcdir_defaulted=yes
511 # Try the directory containing this script, then its parent.
512 ac_prog=$0
513 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
514 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
515 srcdir=$ac_confdir
516 if test ! -r $srcdir/$ac_unique_file; then
517 srcdir=..
518 fi
519else
520 ac_srcdir_defaulted=no
521fi
522if test ! -r $srcdir/$ac_unique_file; then
523 if test "$ac_srcdir_defaulted" = yes; then
524 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
525 else
526 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
527 fi
528fi
529srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
530
531# Prefer explicitly selected file to automatically selected ones.
532if test -z "$CONFIG_SITE"; then
533 if test "x$prefix" != xNONE; then
534 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
535 else
536 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
537 fi
538fi
539for ac_site_file in $CONFIG_SITE; do
540 if test -r "$ac_site_file"; then
541 echo "loading site script $ac_site_file"
542 . "$ac_site_file"
543 fi
544done
545
546if test -r "$cache_file"; then
547 echo "loading cache $cache_file"
548 . $cache_file
549else
550 echo "creating cache $cache_file"
551 > $cache_file
552fi
553
554ac_ext=c
555# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
556ac_cpp='$CPP $CPPFLAGS'
557ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
558ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
559cross_compiling=$ac_cv_prog_cc_cross
560
561ac_exeext=
562ac_objext=o
563if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
564 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
565 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
566 ac_n= ac_c='
567' ac_t=' '
568 else
569 ac_n=-n ac_c= ac_t=
570 fi
571else
572 ac_n= ac_c='\c' ac_t=
573fi
574
575
576
577# This works around the fact that libtool configuration may change LD
578# for this particular configuration, but some shells, instead of
579# keeping the changes in LD private, export them just because LD is
580# exported.
581ORIGINAL_LD_FOR_MULTILIBS=$LD
582
583echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
584echo "configure:585: checking whether ln -s works" >&5
585if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
586 echo $ac_n "(cached) $ac_c" 1>&6
587else
588 rm -f conftestdata
589if ln -s X conftestdata 2>/dev/null
590then
591 rm -f conftestdata
592 ac_cv_prog_LN_S="ln -s"
593else
594 ac_cv_prog_LN_S=ln
595fi
596fi
597LN_S="$ac_cv_prog_LN_S"
598if test "$ac_cv_prog_LN_S" = "ln -s"; then
599 echo "$ac_t""yes" 1>&6
600else
601 echo "$ac_t""no" 1>&6
602fi
603
604
605# Check whether --with-target-subdir or --without-target-subdir was given.
606if test "${with_target_subdir+set}" = set; then
607 withval="$with_target_subdir"
608 :
609fi
610
611# Check whether --with-cross-host or --without-cross-host was given.
612if test "${with_cross_host+set}" = set; then
613 withval="$with_cross_host"
614 :
615fi
616
617
618# Find a good install program. We prefer a C program (faster),
619# so one script is as good as another. But avoid the broken or
620# incompatible versions:
621# SysV /etc/install, /usr/sbin/install
622# SunOS /usr/etc/install
623# IRIX /sbin/install
624# AIX /bin/install
625# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
626# AFS /usr/afsws/bin/install, which mishandles nonexistent args
627# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
628# ./install, which can be erroneously created by make from ./install.sh.
629echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
630echo "configure:631: checking for a BSD compatible install" >&5
631if test -z "$INSTALL"; then
632if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
633 echo $ac_n "(cached) $ac_c" 1>&6
634else
635 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
636 for ac_dir in $PATH; do
637 # Account for people who put trailing slashes in PATH elements.
638 case "$ac_dir/" in
639 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
640 *)
641 # OSF1 and SCO ODT 3.0 have their own names for install.
642 # Don't use installbsd from OSF since it installs stuff as root
643 # by default.
644 for ac_prog in ginstall scoinst install; do
645 if test -f $ac_dir/$ac_prog; then
646 if test $ac_prog = install &&
647 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
648 # AIX install. It has an incompatible calling convention.
649 :
650 else
651 ac_cv_path_install="$ac_dir/$ac_prog -c"
652 break 2
653 fi
654 fi
655 done
656 ;;
657 esac
658 done
659 IFS="$ac_save_IFS"
660
661fi
662 if test "${ac_cv_path_install+set}" = set; then
663 INSTALL="$ac_cv_path_install"
664 else
665 # As a last resort, use the slow shell script. We don't cache a
666 # path for INSTALL within a source directory, because that will
667 # break other packages using the cache if that directory is
668 # removed, or if the path is relative.
669 INSTALL="$ac_install_sh"
670 fi
671fi
672echo "$ac_t""$INSTALL" 1>&6
673
674# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
675# It thinks the first close brace ends the variable substitution.
676test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
677
678test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
679
680test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
681
682echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
683echo "configure:684: checking whether build environment is sane" >&5
684# Just in case
685sleep 1
686echo timestamp > conftestfile
687# Do `set' in a subshell so we don't clobber the current shell's
688# arguments. Must try -L first in case configure is actually a
689# symlink; some systems play weird games with the mod time of symlinks
690# (eg FreeBSD returns the mod time of the symlink's containing
691# directory).
692if (
693 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
694 if test "$*" = "X"; then
695 # -L didn't work.
696 set X `ls -t $srcdir/configure conftestfile`
697 fi
698 if test "$*" != "X $srcdir/configure conftestfile" \
699 && test "$*" != "X conftestfile $srcdir/configure"; then
700
701 # If neither matched, then we have a broken ls. This can happen
702 # if, for instance, CONFIG_SHELL is bash and it inherits a
703 # broken ls alias from the environment. This has actually
704 # happened. Such a system could not be considered "sane".
705 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
706alias in your environment" 1>&2; exit 1; }
707 fi
708
709 test "$2" = conftestfile
710 )
711then
712 # Ok.
713 :
714else
715 { echo "configure: error: newly created file is older than distributed files!
716Check your system clock" 1>&2; exit 1; }
717fi
718rm -f conftest*
719echo "$ac_t""yes" 1>&6
720if test "$program_transform_name" = s,x,x,; then
721 program_transform_name=
722else
723 # Double any \ or $. echo might interpret backslashes.
724 cat <<\EOF_SED > conftestsed
725s,\\,\\\\,g; s,\$,$$,g
726EOF_SED
727 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
728 rm -f conftestsed
729fi
730test "$program_prefix" != NONE &&
731 program_transform_name="s,^,${program_prefix},; $program_transform_name"
732# Use a double $ so make ignores it.
733test "$program_suffix" != NONE &&
734 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
735
736# sed with no file args requires a program.
737test "$program_transform_name" = "" && program_transform_name="s,x,x,"
738
739echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
740echo "configure:741: checking whether ${MAKE-make} sets \${MAKE}" >&5
741set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
742if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
743 echo $ac_n "(cached) $ac_c" 1>&6
744else
745 cat > conftestmake <<\EOF
746all:
747 @echo 'ac_maketemp="${MAKE}"'
748EOF
749# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
750eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
751if test -n "$ac_maketemp"; then
752 eval ac_cv_prog_make_${ac_make}_set=yes
753else
754 eval ac_cv_prog_make_${ac_make}_set=no
755fi
756rm -f conftestmake
757fi
758if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
759 echo "$ac_t""yes" 1>&6
760 SET_MAKE=
761else
762 echo "$ac_t""no" 1>&6
763 SET_MAKE="MAKE=${MAKE-make}"
764fi
765
766if test $host != $build; then
767 ac_tool_prefix=${host_alias}-
768else
769 ac_tool_prefix=
770fi
771
772echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
773echo "configure:774: checking for Cygwin environment" >&5
774if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
775 echo $ac_n "(cached) $ac_c" 1>&6
776else
777 cat > conftest.$ac_ext <<EOF
778#line 779 "configure"
779#include "confdefs.h"
780
781int main() {
782
783#ifndef __CYGWIN__
784#define __CYGWIN__ __CYGWIN32__
785#endif
786return __CYGWIN__;
787; return 0; }
788EOF
789if { (eval echo configure:790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
790 rm -rf conftest*
791 ac_cv_cygwin=yes
792else
793 echo "configure: failed program was:" >&5
794 cat conftest.$ac_ext >&5
795 rm -rf conftest*
796 ac_cv_cygwin=no
797fi
798rm -f conftest*
799rm -f conftest*
800fi
801
802echo "$ac_t""$ac_cv_cygwin" 1>&6
803CYGWIN=
804test "$ac_cv_cygwin" = yes && CYGWIN=yes
805echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
806echo "configure:807: checking for mingw32 environment" >&5
807if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
808 echo $ac_n "(cached) $ac_c" 1>&6
809else
810 cat > conftest.$ac_ext <<EOF
811#line 812 "configure"
812#include "confdefs.h"
813
814int main() {
815return __MINGW32__;
816; return 0; }
817EOF
818if { (eval echo configure:819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
819 rm -rf conftest*
820 ac_cv_mingw32=yes
821else
822 echo "configure: failed program was:" >&5
823 cat conftest.$ac_ext >&5
824 rm -rf conftest*
825 ac_cv_mingw32=no
826fi
827rm -f conftest*
828rm -f conftest*
829fi
830
831echo "$ac_t""$ac_cv_mingw32" 1>&6
832MINGW32=
833test "$ac_cv_mingw32" = yes && MINGW32=yes
834
835# Check whether --enable-multilib or --disable-multilib was given.
836if test "${enable_multilib+set}" = set; then
837 enableval="$enable_multilib"
838 case "${enableval}" in
839 yes) multilib=yes ;;
840 no) multilib=no ;;
841 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
842 esac
843else
844 multilib=yes
845fi
846
847
848# When building with srcdir == objdir, links to the source files will
849# be created in directories within the target_subdir. We have to
850# adjust toplevel_srcdir accordingly, so that configure finds
851# install-sh and other auxiliary files that live in the top-level
852# source directory.
853if test "${srcdir}" = "."; then
854 if test -z "${with_target_subdir}"; then
855 toprel=".."
856 else
857 if test "${with_target_subdir}" != "."; then
858 toprel="${with_multisrctop}../.."
859 else
860 toprel="${with_multisrctop}.."
861 fi
862 fi
863else
864 toprel=".."
865fi
866
867libgcj_basedir=$srcdir/$toprel/./libjava
868
869
870ac_aux_dir=
871for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
872 if 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
876 elif test -f $ac_dir/install.sh; then
877 ac_aux_dir=$ac_dir
878 ac_install_sh="$ac_aux_dir/install.sh -c"
879 break
880 fi
881done
882if test -z "$ac_aux_dir"; then
883 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
884fi
885ac_config_guess=$ac_aux_dir/config.guess
886ac_config_sub=$ac_aux_dir/config.sub
887ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
888
889if :; then :; else
890 # This overrides the previous occurrence for automake, but not for
891 # autoconf, which is exactly what we want.
892 ac_aux_dir=
893for ac_dir in .. $srcdir/..; do
894 if test -f $ac_dir/install-sh; then
895 ac_aux_dir=$ac_dir
896 ac_install_sh="$ac_aux_dir/install-sh -c"
897 break
898 elif test -f $ac_dir/install.sh; then
899 ac_aux_dir=$ac_dir
900 ac_install_sh="$ac_aux_dir/install.sh -c"
901 break
902 fi
903done
904if test -z "$ac_aux_dir"; then
905 { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
906fi
907ac_config_guess=$ac_aux_dir/config.guess
908ac_config_sub=$ac_aux_dir/config.sub
909ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
910
911fi
912
913# This works around an automake problem.
914mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
915
916
917
918# Do some error checking and defaulting for the host and target type.
919# The inputs are:
920# configure --host=HOST --target=TARGET --build=BUILD NONOPT
921#
922# The rules are:
923# 1. You are not allowed to specify --host, --target, and nonopt at the
924# same time.
925# 2. Host defaults to nonopt.
926# 3. If nonopt is not specified, then host defaults to the current host,
927# as determined by config.guess.
928# 4. Target and build default to nonopt.
929# 5. If nonopt is not specified, then target and build default to host.
930
931# The aliases save the names the user supplied, while $host etc.
932# will get canonicalized.
933case $host---$target---$nonopt in
934NONE---*---* | *---NONE---* | *---*---NONE) ;;
935*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
936esac
937
938
939# Make sure we can run config.sub.
940if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
941else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
942fi
943
944echo $ac_n "checking host system type""... $ac_c" 1>&6
945echo "configure:946: checking host system type" >&5
946
947host_alias=$host
948case "$host_alias" in
949NONE)
950 case $nonopt in
951 NONE)
952 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
953 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
954 fi ;;
955 *) host_alias=$nonopt ;;
956 esac ;;
957esac
958
959host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
960host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
961host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
962host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
963echo "$ac_t""$host" 1>&6
964
965echo $ac_n "checking target system type""... $ac_c" 1>&6
966echo "configure:967: checking target system type" >&5
967
968target_alias=$target
969case "$target_alias" in
970NONE)
971 case $nonopt in
972 NONE) target_alias=$host_alias ;;
973 *) target_alias=$nonopt ;;
974 esac ;;
975esac
976
977target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
978target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
979target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
980target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
981echo "$ac_t""$target" 1>&6
982
983echo $ac_n "checking build system type""... $ac_c" 1>&6
984echo "configure:985: checking build system type" >&5
985
986build_alias=$build
987case "$build_alias" in
988NONE)
989 case $nonopt in
990 NONE) build_alias=$host_alias ;;
991 *) build_alias=$nonopt ;;
992 esac ;;
993esac
994
995build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
996build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
997build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
998build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
999echo "$ac_t""$build" 1>&6
1000
1001test "$host_alias" != "$target_alias" &&
1002 test "$program_prefix$program_suffix$program_transform_name" = \
1003 NONENONEs,x,x, &&
1004 program_prefix=${target_alias}-
1005
1006
1007
1008
1009
1010# Extract the first word of "gcc", so it can be a program name with args.
1011set dummy gcc; ac_word=$2
1012echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1013echo "configure:1014: checking for $ac_word" >&5
1014if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1015 echo $ac_n "(cached) $ac_c" 1>&6
1016else
1017 if test -n "$CC"; then
1018 ac_cv_prog_CC="$CC" # Let the user override the test.
1019else
1020 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1021 ac_dummy="$PATH"
1022 for ac_dir in $ac_dummy; do
1023 test -z "$ac_dir" && ac_dir=.
1024 if test -f $ac_dir/$ac_word; then
1025 ac_cv_prog_CC="gcc"
1026 break
1027 fi
1028 done
1029 IFS="$ac_save_ifs"
1030fi
1031fi
1032CC="$ac_cv_prog_CC"
1033if test -n "$CC"; then
1034 echo "$ac_t""$CC" 1>&6
1035else
1036 echo "$ac_t""no" 1>&6
1037fi
1038
1039if test -z "$CC"; then
1040 # Extract the first word of "cc", so it can be a program name with args.
1041set dummy cc; ac_word=$2
1042echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1043echo "configure:1044: checking for $ac_word" >&5
1044if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1045 echo $ac_n "(cached) $ac_c" 1>&6
1046else
1047 if test -n "$CC"; then
1048 ac_cv_prog_CC="$CC" # Let the user override the test.
1049else
1050 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1051 ac_prog_rejected=no
1052 ac_dummy="$PATH"
1053 for ac_dir in $ac_dummy; do
1054 test -z "$ac_dir" && ac_dir=.
1055 if test -f $ac_dir/$ac_word; then
1056 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1057 ac_prog_rejected=yes
1058 continue
1059 fi
1060 ac_cv_prog_CC="cc"
1061 break
1062 fi
1063 done
1064 IFS="$ac_save_ifs"
1065if test $ac_prog_rejected = yes; then
1066 # We found a bogon in the path, so make sure we never use it.
1067 set dummy $ac_cv_prog_CC
1068 shift
1069 if test $# -gt 0; then
1070 # We chose a different compiler from the bogus one.
1071 # However, it has the same basename, so the bogon will be chosen
1072 # first if we set CC to just the basename; use the full file name.
1073 shift
1074 set dummy "$ac_dir/$ac_word" "$@"
1075 shift
1076 ac_cv_prog_CC="$@"
1077 fi
1078fi
1079fi
1080fi
1081CC="$ac_cv_prog_CC"
1082if test -n "$CC"; then
1083 echo "$ac_t""$CC" 1>&6
1084else
1085 echo "$ac_t""no" 1>&6
1086fi
1087
1088 if test -z "$CC"; then
1089 case "`uname -s`" in
1090 *win32* | *WIN32*)
1091 # Extract the first word of "cl", so it can be a program name with args.
1092set dummy cl; ac_word=$2
1093echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1094echo "configure:1095: checking for $ac_word" >&5
1095if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1096 echo $ac_n "(cached) $ac_c" 1>&6
1097else
1098 if test -n "$CC"; then
1099 ac_cv_prog_CC="$CC" # Let the user override the test.
1100else
1101 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1102 ac_dummy="$PATH"
1103 for ac_dir in $ac_dummy; do
1104 test -z "$ac_dir" && ac_dir=.
1105 if test -f $ac_dir/$ac_word; then
1106 ac_cv_prog_CC="cl"
1107 break
1108 fi
1109 done
1110 IFS="$ac_save_ifs"
1111fi
1112fi
1113CC="$ac_cv_prog_CC"
1114if test -n "$CC"; then
1115 echo "$ac_t""$CC" 1>&6
1116else
1117 echo "$ac_t""no" 1>&6
1118fi
1119 ;;
1120 esac
1121 fi
1122 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1123fi
1124
1125
1126echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1127echo "configure:1128: checking whether we are using GNU C" >&5
1128if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1129 echo $ac_n "(cached) $ac_c" 1>&6
1130else
1131 cat > conftest.c <<EOF
1132#ifdef __GNUC__
1133 yes;
1134#endif
1135EOF
1136if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1137 ac_cv_prog_gcc=yes
1138else
1139 ac_cv_prog_gcc=no
1140fi
1141fi
1142
1143echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1144
1145if test $ac_cv_prog_gcc = yes; then
1146 GCC=yes
1147else
1148 GCC=
1149fi
1150
1151ac_test_CFLAGS="${CFLAGS+set}"
1152ac_save_CFLAGS="$CFLAGS"
1153CFLAGS=
1154echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1155echo "configure:1156: checking whether ${CC-cc} accepts -g" >&5
1156if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1157 echo $ac_n "(cached) $ac_c" 1>&6
1158else
1159 echo 'void f(){}' > conftest.c
1160if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1161 ac_cv_prog_cc_g=yes
1162else
1163 ac_cv_prog_cc_g=no
1164fi
1165rm -f conftest*
1166
1167fi
1168
1169echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1170if test "$ac_test_CFLAGS" = set; then
1171 CFLAGS="$ac_save_CFLAGS"
1172elif test $ac_cv_prog_cc_g = yes; then
1173 if test "$GCC" = yes; then
1174 CFLAGS="-g -O2"
1175 else
1176 CFLAGS="-g"
1177 fi
1178else
1179 if test "$GCC" = yes; then
1180 CFLAGS="-O2"
1181 else
1182 CFLAGS=
1183 fi
1184fi
1185
1186
1187# We use the libstdc++-v3 version of LIB_AC_PROG_CXX, but use
1188# glibjava_CXX instead of glibcpp_CXX. That's because we're passed a
1189# different definition of CXX than other directories, since we don't
1190# depend on libstdc++-v3 having already been built.
1191
1192
1193
1194# Use glibjava_CXX so that we do not cause CXX to be cached with the
1195# flags that come in CXX while configuring libjava. They're different
1196# from those used for all other target libraries. If CXX is set in
1197# the environment, respect that here.
1198glibjava_CXX=$CXX
1199for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1200do
1201# Extract the first word of "$ac_prog", so it can be a program name with args.
1202set dummy $ac_prog; ac_word=$2
1203echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1204echo "configure:1205: checking for $ac_word" >&5
1205if eval "test \"`echo '$''{'ac_cv_prog_glibjava_CXX'+set}'`\" = set"; then
1206 echo $ac_n "(cached) $ac_c" 1>&6
1207else
1208 if test -n "$glibjava_CXX"; then
1209 ac_cv_prog_glibjava_CXX="$glibjava_CXX" # Let the user override the test.
1210else
1211 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1212 ac_dummy="$PATH"
1213 for ac_dir in $ac_dummy; do
1214 test -z "$ac_dir" && ac_dir=.
1215 if test -f $ac_dir/$ac_word; then
1216 ac_cv_prog_glibjava_CXX="$ac_prog"
1217 break
1218 fi
1219 done
1220 IFS="$ac_save_ifs"
1221fi
1222fi
1223glibjava_CXX="$ac_cv_prog_glibjava_CXX"
1224if test -n "$glibjava_CXX"; then
1225 echo "$ac_t""$glibjava_CXX" 1>&6
1226else
1227 echo "$ac_t""no" 1>&6
1228fi
1229
1230test -n "$glibjava_CXX" && break
1231done
1232test -n "$glibjava_CXX" || glibjava_CXX="gcc"
1233
1234
1235CXX=$glibjava_CXX
1236test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1237
1238echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1239echo "configure:1240: checking whether we are using GNU C++" >&5
1240if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1241 echo $ac_n "(cached) $ac_c" 1>&6
1242else
1243 cat > conftest.C <<EOF
1244#ifdef __GNUC__
1245 yes;
1246#endif
1247EOF
1248if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1249 ac_cv_prog_gxx=yes
1250else
1251 ac_cv_prog_gxx=no
1252fi
1253fi
1254
1255echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1256
1257if test $ac_cv_prog_gxx = yes; then
1258 GXX=yes
1259 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1260 ac_save_CXXFLAGS="$CXXFLAGS"
1261 CXXFLAGS=
1262 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1263echo "configure:1264: checking whether ${CXX-g++} accepts -g" >&5
1264if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1265 echo $ac_n "(cached) $ac_c" 1>&6
1266else
1267 echo 'void f(){}' > conftest.cc
1268if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1269 ac_cv_prog_cxx_g=yes
1270else
1271 ac_cv_prog_cxx_g=no
1272fi
1273rm -f conftest*
1274
1275fi
1276
1277echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1278 if test "$ac_test_CXXFLAGS" = set; then
1279 CXXFLAGS="$ac_save_CXXFLAGS"
1280 elif test $ac_cv_prog_cxx_g = yes; then
1281 CXXFLAGS="-g -O2"
1282 else
1283 CXXFLAGS="-O2"
1284 fi
1285else
1286 GXX=
1287 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1288fi
1289
1290
1291version=0.0.7
1292
1293PACKAGE=libjava
1294
1295VERSION=$version
1296
1297if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1298 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1299fi
1300cat >> confdefs.h <<EOF
1301#define PACKAGE "$PACKAGE"
1302EOF
1303
1304cat >> confdefs.h <<EOF
1305#define VERSION "$VERSION"
1306EOF
1307
1308
1309
1310missing_dir=`cd $ac_aux_dir && pwd`
1311echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1312echo "configure:1313: checking for working aclocal" >&5
1313# Run test in a subshell; some versions of sh will print an error if
1314# an executable is not found, even if stderr is redirected.
1315# Redirect stdin to placate older versions of autoconf. Sigh.
1316if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1317 ACLOCAL=aclocal
1318 echo "$ac_t""found" 1>&6
1319else
1320 ACLOCAL="$missing_dir/missing aclocal"
1321 echo "$ac_t""missing" 1>&6
1322fi
1323
1324echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1325echo "configure:1326: checking for working autoconf" >&5
1326# Run test in a subshell; some versions of sh will print an error if
1327# an executable is not found, even if stderr is redirected.
1328# Redirect stdin to placate older versions of autoconf. Sigh.
1329if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1330 AUTOCONF=autoconf
1331 echo "$ac_t""found" 1>&6
1332else
1333 AUTOCONF="$missing_dir/missing autoconf"
1334 echo "$ac_t""missing" 1>&6
1335fi
1336
1337echo $ac_n "checking for working automake""... $ac_c" 1>&6
1338echo "configure:1339: checking for working automake" >&5
1339# Run test in a subshell; some versions of sh will print an error if
1340# an executable is not found, even if stderr is redirected.
1341# Redirect stdin to placate older versions of autoconf. Sigh.
1342if (automake --version) < /dev/null > /dev/null 2>&1; then
1343 AUTOMAKE=automake
1344 echo "$ac_t""found" 1>&6
1345else
1346 AUTOMAKE="$missing_dir/missing automake"
1347 echo "$ac_t""missing" 1>&6
1348fi
1349
1350echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1351echo "configure:1352: checking for working autoheader" >&5
1352# Run test in a subshell; some versions of sh will print an error if
1353# an executable is not found, even if stderr is redirected.
1354# Redirect stdin to placate older versions of autoconf. Sigh.
1355if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1356 AUTOHEADER=autoheader
1357 echo "$ac_t""found" 1>&6
1358else
1359 AUTOHEADER="$missing_dir/missing autoheader"
1360 echo "$ac_t""missing" 1>&6
1361fi
1362
1363echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1364echo "configure:1365: checking for working makeinfo" >&5
1365# Run test in a subshell; some versions of sh will print an error if
1366# an executable is not found, even if stderr is redirected.
1367# Redirect stdin to placate older versions of autoconf. Sigh.
1368if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1369 MAKEINFO=makeinfo
1370 echo "$ac_t""found" 1>&6
1371else
1372 MAKEINFO="$missing_dir/missing makeinfo"
1373 echo "$ac_t""missing" 1>&6
1374fi
1375
1376
1377
1378# AC_CHECK_TOOL does AC_REQUIRE (AC_CANONICAL_BUILD). If we don't
1379# run it explicitly here, it will be run implicitly before
1380# LIBGCJ_CONFIGURE, which doesn't work because that means that it will
1381# be run before AC_CANONICAL_HOST.
1382echo $ac_n "checking build system type""... $ac_c" 1>&6
1383echo "configure:1384: checking build system type" >&5
1384
1385build_alias=$build
1386case "$build_alias" in
1387NONE)
1388 case $nonopt in
1389 NONE) build_alias=$host_alias ;;
1390 *) build_alias=$nonopt ;;
1391 esac ;;
1392esac
1393
1394build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1395build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1396build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1397build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1398echo "$ac_t""$build" 1>&6
1399
1400
1401# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1402set dummy ${ac_tool_prefix}as; ac_word=$2
1403echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1404echo "configure:1405: checking for $ac_word" >&5
1405if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1406 echo $ac_n "(cached) $ac_c" 1>&6
1407else
1408 if test -n "$AS"; then
1409 ac_cv_prog_AS="$AS" # Let the user override the test.
1410else
1411 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1412 ac_dummy="$PATH"
1413 for ac_dir in $ac_dummy; do
1414 test -z "$ac_dir" && ac_dir=.
1415 if test -f $ac_dir/$ac_word; then
1416 ac_cv_prog_AS="${ac_tool_prefix}as"
1417 break
1418 fi
1419 done
1420 IFS="$ac_save_ifs"
1421 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1422fi
1423fi
1424AS="$ac_cv_prog_AS"
1425if test -n "$AS"; then
1426 echo "$ac_t""$AS" 1>&6
1427else
1428 echo "$ac_t""no" 1>&6
1429fi
1430
1431
1432
1433# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1434set dummy ${ac_tool_prefix}ar; ac_word=$2
1435echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1436echo "configure:1437: checking for $ac_word" >&5
1437if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1438 echo $ac_n "(cached) $ac_c" 1>&6
1439else
1440 if test -n "$AR"; then
1441 ac_cv_prog_AR="$AR" # Let the user override the test.
1442else
1443 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1444 ac_dummy="$PATH"
1445 for ac_dir in $ac_dummy; do
1446 test -z "$ac_dir" && ac_dir=.
1447 if test -f $ac_dir/$ac_word; then
1448 ac_cv_prog_AR="${ac_tool_prefix}ar"
1449 break
1450 fi
1451 done
1452 IFS="$ac_save_ifs"
1453 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1454fi
1455fi
1456AR="$ac_cv_prog_AR"
1457if test -n "$AR"; then
1458 echo "$ac_t""$AR" 1>&6
1459else
1460 echo "$ac_t""no" 1>&6
1461fi
1462
1463
1464
1465# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1466set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1467echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1468echo "configure:1469: checking for $ac_word" >&5
1469if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1471else
1472 if test -n "$RANLIB"; then
1473 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1474else
1475 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1476 ac_dummy="$PATH"
1477 for ac_dir in $ac_dummy; do
1478 test -z "$ac_dir" && ac_dir=.
1479 if test -f $ac_dir/$ac_word; then
1480 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1481 break
1482 fi
1483 done
1484 IFS="$ac_save_ifs"
1485fi
1486fi
1487RANLIB="$ac_cv_prog_RANLIB"
1488if test -n "$RANLIB"; then
1489 echo "$ac_t""$RANLIB" 1>&6
1490else
1491 echo "$ac_t""no" 1>&6
1492fi
1493
1494
1495if test -z "$ac_cv_prog_RANLIB"; then
1496if test -n "$ac_tool_prefix"; then
1497 # Extract the first word of "ranlib", so it can be a program name with args.
1498set dummy ranlib; ac_word=$2
1499echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1500echo "configure:1501: checking for $ac_word" >&5
1501if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1502 echo $ac_n "(cached) $ac_c" 1>&6
1503else
1504 if test -n "$RANLIB"; then
1505 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1506else
1507 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1508 ac_dummy="$PATH"
1509 for ac_dir in $ac_dummy; do
1510 test -z "$ac_dir" && ac_dir=.
1511 if test -f $ac_dir/$ac_word; then
1512 ac_cv_prog_RANLIB="ranlib"
1513 break
1514 fi
1515 done
1516 IFS="$ac_save_ifs"
1517 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1518fi
1519fi
1520RANLIB="$ac_cv_prog_RANLIB"
1521if test -n "$RANLIB"; then
1522 echo "$ac_t""$RANLIB" 1>&6
1523else
1524 echo "$ac_t""no" 1>&6
1525fi
1526
1527else
1528 RANLIB=":"
1529fi
1530fi
1531
1532
1533# Find a good install program. We prefer a C program (faster),
1534# so one script is as good as another. But avoid the broken or
1535# incompatible versions:
1536# SysV /etc/install, /usr/sbin/install
1537# SunOS /usr/etc/install
1538# IRIX /sbin/install
1539# AIX /bin/install
1540# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1541# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1542# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1543# ./install, which can be erroneously created by make from ./install.sh.
1544echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1545echo "configure:1546: checking for a BSD compatible install" >&5
1546if test -z "$INSTALL"; then
1547if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1548 echo $ac_n "(cached) $ac_c" 1>&6
1549else
1550 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1551 for ac_dir in $PATH; do
1552 # Account for people who put trailing slashes in PATH elements.
1553 case "$ac_dir/" in
1554 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1555 *)
1556 # OSF1 and SCO ODT 3.0 have their own names for install.
1557 # Don't use installbsd from OSF since it installs stuff as root
1558 # by default.
1559 for ac_prog in ginstall scoinst install; do
1560 if test -f $ac_dir/$ac_prog; then
1561 if test $ac_prog = install &&
1562 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1563 # AIX install. It has an incompatible calling convention.
1564 :
1565 else
1566 ac_cv_path_install="$ac_dir/$ac_prog -c"
1567 break 2
1568 fi
1569 fi
1570 done
1571 ;;
1572 esac
1573 done
1574 IFS="$ac_save_IFS"
1575
1576fi
1577 if test "${ac_cv_path_install+set}" = set; then
1578 INSTALL="$ac_cv_path_install"
1579 else
1580 # As a last resort, use the slow shell script. We don't cache a
1581 # path for INSTALL within a source directory, because that will
1582 # break other packages using the cache if that directory is
1583 # removed, or if the path is relative.
1584 INSTALL="$ac_install_sh"
1585 fi
1586fi
1587echo "$ac_t""$INSTALL" 1>&6
1588
1589# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1590# It thinks the first close brace ends the variable substitution.
1591test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1592
1593test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1594
1595test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1596
1597
1598echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
1599echo "configure:1600: checking whether to enable maintainer-specific portions of Makefiles" >&5
1600 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
1601if test "${enable_maintainer_mode+set}" = set; then
1602 enableval="$enable_maintainer_mode"
1603 USE_MAINTAINER_MODE=$enableval
1604else
1605 USE_MAINTAINER_MODE=no
1606fi
1607
1608 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1609
1610
1611if test $USE_MAINTAINER_MODE = yes; then
1612 MAINTAINER_MODE_TRUE=
1613 MAINTAINER_MODE_FALSE='#'
1614else
1615 MAINTAINER_MODE_TRUE='#'
1616 MAINTAINER_MODE_FALSE=
1617fi
1618 MAINT=$MAINTAINER_MODE_TRUE
1619
1620
1621
1622# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
1623# at least currently, we never actually build a program, so we never
1624# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
1625# fails, because we are probably configuring with a cross compiler
1626# which cant create executables. So we include AC_EXEEXT to keep
1627# automake happy, but we don't execute it, since we don't care about
1628# the result.
1629if false; then
1630 # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
1631 # to nothing, so nothing would remain between `then' and `fi' if it
1632 # were not for the `:' below.
1633 :
1634
1635
1636echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1637echo "configure:1638: checking for executable suffix" >&5
1638if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1639 echo $ac_n "(cached) $ac_c" 1>&6
1640else
1641 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1642 ac_cv_exeext=.exe
1643else
1644 rm -f conftest*
1645 echo 'int main () { return 0; }' > conftest.$ac_ext
1646 ac_cv_exeext=
1647 if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1648 for file in conftest.*; do
1649 case $file in
1650 *.c | *.o | *.obj) ;;
1651 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1652 esac
1653 done
1654 else
1655 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1656 fi
1657 rm -f conftest*
1658 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1659fi
1660fi
1661
1662EXEEXT=""
1663test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1664echo "$ac_t""${ac_cv_exeext}" 1>&6
1665ac_exeext=$EXEEXT
1666
1667fi
1668
1669# configure.host sets the following important variables
1670# libgcj_cflags - host specific C compiler flags
1671# libgcj_cxxflags - host specific C++ compiler flags
1672# libgcj_javaflags - host specific Java compiler flags
1673
1674libgcj_cflags=
1675libgcj_cxxflags=
1676libgcj_javaflags=
1677
1678. ${srcdir}/configure.host
1679
1680LIBGCJ_CFLAGS="${libgcj_cflags}"
1681LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1682LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692# Only use libltdl for native builds.
1693if test -z "${with_cross_host}"; then
1694 case $enable_ltdl_convenience in
1695 no) { echo "configure: error: this package needs a convenience libltdl" 1>&2; exit 1; } ;;
1696 "") enable_ltdl_convenience=yes
1697 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1698 esac
1699 LIBLTDL='${top_builddir}/''libltdl'/libltdlc.la
1700 INCLTDL='-I${top_srcdir}/''libltdl'
1701
1702
1703 DIRLTDL=libltdl
1704 cat >> confdefs.h <<\EOF
1705#define USE_LTDL 1
1706EOF
1707
1708 # Sigh. Libtool's macro doesn't do the right thing.
1709 INCLTDL="-I\$(top_srcdir)/libltdl $INCLTDL"
1710 # FIXME: this is a hack.
1711 sub_auxdir="`cd $ac_aux_dir && pwd`"
1712 ac_configure_args="$ac_configure_args --with-auxdir=$sub_auxdir"
1713fi
1714
1715
1716
1717# Check whether --enable-shared or --disable-shared was given.
1718if test "${enable_shared+set}" = set; then
1719 enableval="$enable_shared"
1720 p=${PACKAGE-default}
1721case $enableval in
1722yes) enable_shared=yes ;;
1723no) enable_shared=no ;;
1724*)
1725 enable_shared=no
1726 # Look at the argument we got. We use all the common list separators.
1727 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1728 for pkg in $enableval; do
1729 if test "X$pkg" = "X$p"; then
1730 enable_shared=yes
1731 fi
1732 done
1733 IFS="$ac_save_ifs"
1734 ;;
1735esac
1736else
1737 enable_shared=yes
1738fi
1739
1740# Check whether --enable-static or --disable-static was given.
1741if test "${enable_static+set}" = set; then
1742 enableval="$enable_static"
1743 p=${PACKAGE-default}
1744case $enableval in
1745yes) enable_static=yes ;;
1746no) enable_static=no ;;
1747*)
1748 enable_static=no
1749 # Look at the argument we got. We use all the common list separators.
1750 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1751 for pkg in $enableval; do
1752 if test "X$pkg" = "X$p"; then
1753 enable_static=yes
1754 fi
1755 done
1756 IFS="$ac_save_ifs"
1757 ;;
1758esac
1759else
1760 enable_static=yes
1761fi
1762
1763# Check whether --enable-fast-install or --disable-fast-install was given.
1764if test "${enable_fast_install+set}" = set; then
1765 enableval="$enable_fast_install"
1766 p=${PACKAGE-default}
1767case $enableval in
1768yes) enable_fast_install=yes ;;
1769no) enable_fast_install=no ;;
1770*)
1771 enable_fast_install=no
1772 # Look at the argument we got. We use all the common list separators.
1773 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1774 for pkg in $enableval; do
1775 if test "X$pkg" = "X$p"; then
1776 enable_fast_install=yes
1777 fi
1778 done
1779 IFS="$ac_save_ifs"
1780 ;;
1781esac
1782else
1783 enable_fast_install=yes
1784fi
1785
1786# Check whether --with-gnu-ld or --without-gnu-ld was given.
1787if test "${with_gnu_ld+set}" = set; then
1788 withval="$with_gnu_ld"
1789 test "$withval" = no || with_gnu_ld=yes
1790else
1791 with_gnu_ld=no
1792fi
1793
1794ac_prog=ld
1795if test "$GCC" = yes; then
1796 # Check if gcc -print-prog-name=ld gives a path.
1797 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1798echo "configure:1799: checking for ld used by GCC" >&5
1799 case $host in
1800 *-*-mingw*)
1801 # gcc leaves a trailing carriage return which upsets mingw
1802 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1803 *)
1804 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1805 esac
1806 case $ac_prog in
1807 # Accept absolute paths.
1808 [\\/]* | [A-Za-z]:[\\/]*)
1809 re_direlt='/[^/][^/]*/\.\./'
1810 # Canonicalize the path of ld
1811 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1812 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1813 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1814 done
1815 test -z "$LD" && LD="$ac_prog"
1816 ;;
1817 "")
1818 # If it fails, then pretend we aren't using GCC.
1819 ac_prog=ld
1820 ;;
1821 *)
1822 # If it is relative, then search for the first ld in PATH.
1823 with_gnu_ld=unknown
1824 ;;
1825 esac
1826elif test "$with_gnu_ld" = yes; then
1827 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1828echo "configure:1829: checking for GNU ld" >&5
1829else
1830 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1831echo "configure:1832: checking for non-GNU ld" >&5
1832fi
1833if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
1834 echo $ac_n "(cached) $ac_c" 1>&6
1835else
1836 if test -z "$LD"; then
1837 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1838 for ac_dir in $PATH; do
1839 test -z "$ac_dir" && ac_dir=.
1840 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1841 lt_cv_path_LD="$ac_dir/$ac_prog"
1842 # Check to see if the program is GNU ld. I'd rather use --version,
1843 # but apparently some GNU ld's only accept -v.
1844 # Break only if it was the GNU/non-GNU ld that we prefer.
1845 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1846 test "$with_gnu_ld" != no && break
1847 else
1848 test "$with_gnu_ld" != yes && break
1849 fi
1850 fi
1851 done
1852 IFS="$ac_save_ifs"
1853else
1854 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1855fi
1856fi
1857
1858LD="$lt_cv_path_LD"
1859if test -n "$LD"; then
1860 echo "$ac_t""$LD" 1>&6
1861else
1862 echo "$ac_t""no" 1>&6
1863fi
1864test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1865echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1866echo "configure:1867: checking if the linker ($LD) is GNU ld" >&5
1867if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
1868 echo $ac_n "(cached) $ac_c" 1>&6
1869else
1870 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1871if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1872 lt_cv_prog_gnu_ld=yes
1873else
1874 lt_cv_prog_gnu_ld=no
1875fi
1876fi
1877
1878echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1879with_gnu_ld=$lt_cv_prog_gnu_ld
1880
1881
1882echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
1883echo "configure:1884: checking for $LD option to reload object files" >&5
1884if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1885 echo $ac_n "(cached) $ac_c" 1>&6
1886else
1887 lt_cv_ld_reload_flag='-r'
1888fi
1889
1890echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1891reload_flag=$lt_cv_ld_reload_flag
1892test -n "$reload_flag" && reload_flag=" $reload_flag"
1893
1894echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1895echo "configure:1896: checking for BSD-compatible nm" >&5
1896if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
1897 echo $ac_n "(cached) $ac_c" 1>&6
1898else
1899 if test -n "$NM"; then
1900 # Let the user override the test.
1901 lt_cv_path_NM="$NM"
1902else
1903 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1904 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1905 test -z "$ac_dir" && ac_dir=.
1906 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1907 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1908 # Check to see if the nm accepts a BSD-compat flag.
1909 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1910 # nm: unknown option "B" ignored
1911 # Tru64's nm complains that /dev/null is an invalid object file
1912 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
1913 lt_cv_path_NM="$tmp_nm -B"
1914 break
1915 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1916 lt_cv_path_NM="$tmp_nm -p"
1917 break
1918 else
1919 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1920 continue # so that we can try to find one that supports BSD flags
1921 fi
1922 fi
1923 done
1924 IFS="$ac_save_ifs"
1925 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1926fi
1927fi
1928
1929NM="$lt_cv_path_NM"
1930echo "$ac_t""$NM" 1>&6
1931
1932echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
1933echo "configure:1934: checking how to recognise dependant libraries" >&5
1934if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1935 echo $ac_n "(cached) $ac_c" 1>&6
1936else
1937 lt_cv_file_magic_cmd='$MAGIC_CMD'
1938lt_cv_file_magic_test_file=
1939lt_cv_deplibs_check_method='unknown'
1940# Need to set the preceding variable on all platforms that support
1941# interlibrary dependencies.
1942# 'none' -- dependencies not supported.
1943# `unknown' -- same as none, but documents that we really don't know.
1944# 'pass_all' -- all dependencies passed with no checks.
1945# 'test_compile' -- check by making test program.
1946# 'file_magic [regex]' -- check by looking for files in library path
1947# which responds to the $file_magic_cmd with a given egrep regex.
1948# If you have `file' or equivalent on your system and you're not sure
1949# whether `pass_all' will *always* work, you probably want this one.
1950
1951case $host_os in
1952aix*)
1953 lt_cv_deplibs_check_method=pass_all
1954 ;;
1955
1956beos*)
1957 lt_cv_deplibs_check_method=pass_all
1958 ;;
1959
1960bsdi4*)
1961 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1962 lt_cv_file_magic_cmd='/usr/bin/file -L'
1963 lt_cv_file_magic_test_file=/shlib/libc.so
1964 ;;
1965
1966cygwin* | mingw* |pw32*)
1967 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1968 lt_cv_file_magic_cmd='$OBJDUMP -f'
1969 ;;
1970
1971darwin* | rhapsody*)
1972 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1973 lt_cv_file_magic_cmd='/usr/bin/file -L'
1974 case "$host_os" in
1975 rhapsody* | darwin1.012)
1976 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1977 ;;
1978 *) # Darwin 1.3 on
1979 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1980 ;;
1981 esac
1982 ;;
1983
1984freebsd* )
1985 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1986 case $host_cpu in
1987 i*86 )
1988 # Not sure whether the presence of OpenBSD here was a mistake.
1989 # Let's accept both of them until this is cleared up.
1990 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1991 lt_cv_file_magic_cmd=/usr/bin/file
1992 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1993 ;;
1994 esac
1995 else
1996 lt_cv_deplibs_check_method=pass_all
1997 fi
1998 ;;
1999
2000gnu*)
2001 lt_cv_deplibs_check_method=pass_all
2002 ;;
2003
2004hpux10.20*|hpux11*)
2005 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
2006 lt_cv_file_magic_cmd=/usr/bin/file
2007 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2008 ;;
2009
2010irix5* | irix6*)
2011 case $host_os in
2012 irix5*)
2013 # this will be overridden with pass_all, but let us keep it just in case
2014 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2015 ;;
2016 *)
2017 case $LD in
2018 *-32|*"-32 ") libmagic=32-bit;;
2019 *-n32|*"-n32 ") libmagic=N32;;
2020 *-64|*"-64 ") libmagic=64-bit;;
2021 *) libmagic=never-match;;
2022 esac
2023 # this will be overridden with pass_all, but let us keep it just in case
2024 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
2025 ;;
2026 esac
2027 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2028 lt_cv_deplibs_check_method=pass_all
2029 ;;
2030
2031# This must be Linux ELF.
2032linux-gnu*)
2033 case $host_cpu in
2034 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
2035 lt_cv_deplibs_check_method=pass_all ;;
2036 *)
2037 # glibc up to 2.1.1 does not perform some relocations on ARM
2038 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
2039 esac
2040 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2041 ;;
2042
2043netbsd*)
2044 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2045 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
2046 else
2047 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
2048 fi
2049 ;;
2050
2051newsos6)
2052 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
2053 lt_cv_file_magic_cmd=/usr/bin/file
2054 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2055 ;;
2056
2057osf3* | osf4* | osf5*)
2058 # this will be overridden with pass_all, but let us keep it just in case
2059 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2060 lt_cv_file_magic_test_file=/shlib/libc.so
2061 lt_cv_deplibs_check_method=pass_all
2062 ;;
2063
2064sco3.2v5*)
2065 lt_cv_deplibs_check_method=pass_all
2066 ;;
2067
2068solaris*)
2069 lt_cv_deplibs_check_method=pass_all
2070 lt_cv_file_magic_test_file=/lib/libc.so
2071 ;;
2072
2073sysv5uw[78]* | sysv4*uw2*)
2074 lt_cv_deplibs_check_method=pass_all
2075 ;;
2076
2077sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2078 case $host_vendor in
2079 ncr)
2080 lt_cv_deplibs_check_method=pass_all
2081 ;;
2082 motorola)
2083 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
2084 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2085 ;;
2086 esac
2087 ;;
2088esac
2089
2090fi
2091
2092echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
2093file_magic_cmd=$lt_cv_file_magic_cmd
2094deplibs_check_method=$lt_cv_deplibs_check_method
2095
2096echo $ac_n "checking for object suffix""... $ac_c" 1>&6
2097echo "configure:2098: checking for object suffix" >&5
2098if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
2099 echo $ac_n "(cached) $ac_c" 1>&6
2100else
2101 rm -f conftest*
2102echo 'int i = 1;' > conftest.$ac_ext
2103if { (eval echo configure:2104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2104 for ac_file in conftest.*; do
2105 case $ac_file in
2106 *.c) ;;
2107 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
2108 esac
2109 done
2110else
2111 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
2112fi
2113rm -f conftest*
2114fi
2115
2116echo "$ac_t""$ac_cv_objext" 1>&6
2117OBJEXT=$ac_cv_objext
2118ac_objext=$ac_cv_objext
2119
2120# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2121
2122# Only perform the check for file, if the check method requires it
2123case $deplibs_check_method in
2124file_magic*)
2125 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2126 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
2127echo "configure:2128: checking for ${ac_tool_prefix}file" >&5
2128if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2129 echo $ac_n "(cached) $ac_c" 1>&6
2130else
2131 case $MAGIC_CMD in
2132 /*)
2133 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2134 ;;
2135 ?:/*)
2136 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2137 ;;
2138 *)
2139 ac_save_MAGIC_CMD="$MAGIC_CMD"
2140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2141 ac_dummy="/usr/bin:$PATH"
2142 for ac_dir in $ac_dummy; do
2143 test -z "$ac_dir" && ac_dir=.
2144 if test -f $ac_dir/${ac_tool_prefix}file; then
2145 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
2146 if test -n "$file_magic_test_file"; then
2147 case $deplibs_check_method in
2148 "file_magic "*)
2149 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2150 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2151 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2152 egrep "$file_magic_regex" > /dev/null; then
2153 :
2154 else
2155 cat <<EOF 1>&2
2156
2157*** Warning: the command libtool uses to detect shared libraries,
2158*** $file_magic_cmd, produces output that libtool cannot recognize.
2159*** The result is that libtool may fail to recognize shared libraries
2160*** as such. This will affect the creation of libtool libraries that
2161*** depend on shared libraries, but programs linked with such libtool
2162*** libraries will work regardless of this problem. Nevertheless, you
2163*** may want to report the problem to your system manager and/or to
2164*** bug-libtool@gnu.org
2165
2166EOF
2167 fi ;;
2168 esac
2169 fi
2170 break
2171 fi
2172 done
2173 IFS="$ac_save_ifs"
2174 MAGIC_CMD="$ac_save_MAGIC_CMD"
2175 ;;
2176esac
2177fi
2178
2179MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2180if test -n "$MAGIC_CMD"; then
2181 echo "$ac_t""$MAGIC_CMD" 1>&6
2182else
2183 echo "$ac_t""no" 1>&6
2184fi
2185
2186if test -z "$lt_cv_path_MAGIC_CMD"; then
2187 if test -n "$ac_tool_prefix"; then
2188 echo $ac_n "checking for file""... $ac_c" 1>&6
2189echo "configure:2190: checking for file" >&5
2190if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
2191 echo $ac_n "(cached) $ac_c" 1>&6
2192else
2193 case $MAGIC_CMD in
2194 /*)
2195 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2196 ;;
2197 ?:/*)
2198 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2199 ;;
2200 *)
2201 ac_save_MAGIC_CMD="$MAGIC_CMD"
2202 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2203 ac_dummy="/usr/bin:$PATH"
2204 for ac_dir in $ac_dummy; do
2205 test -z "$ac_dir" && ac_dir=.
2206 if test -f $ac_dir/file; then
2207 lt_cv_path_MAGIC_CMD="$ac_dir/file"
2208 if test -n "$file_magic_test_file"; then
2209 case $deplibs_check_method in
2210 "file_magic "*)
2211 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2212 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2213 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2214 egrep "$file_magic_regex" > /dev/null; then
2215 :
2216 else
2217 cat <<EOF 1>&2
2218
2219*** Warning: the command libtool uses to detect shared libraries,
2220*** $file_magic_cmd, produces output that libtool cannot recognize.
2221*** The result is that libtool may fail to recognize shared libraries
2222*** as such. This will affect the creation of libtool libraries that
2223*** depend on shared libraries, but programs linked with such libtool
2224*** libraries will work regardless of this problem. Nevertheless, you
2225*** may want to report the problem to your system manager and/or to
2226*** bug-libtool@gnu.org
2227
2228EOF
2229 fi ;;
2230 esac
2231 fi
2232 break
2233 fi
2234 done
2235 IFS="$ac_save_ifs"
2236 MAGIC_CMD="$ac_save_MAGIC_CMD"
2237 ;;
2238esac
2239fi
2240
2241MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2242if test -n "$MAGIC_CMD"; then
2243 echo "$ac_t""$MAGIC_CMD" 1>&6
2244else
2245 echo "$ac_t""no" 1>&6
2246fi
2247
2248 else
2249 MAGIC_CMD=:
2250 fi
2251fi
2252
2253 fi
2254 ;;
2255esac
2256
2257# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2258set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2259echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2260echo "configure:2261: checking for $ac_word" >&5
2261if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2262 echo $ac_n "(cached) $ac_c" 1>&6
2263else
2264 if test -n "$RANLIB"; then
2265 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2266else
2267 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2268 ac_dummy="$PATH"
2269 for ac_dir in $ac_dummy; do
2270 test -z "$ac_dir" && ac_dir=.
2271 if test -f $ac_dir/$ac_word; then
2272 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2273 break
2274 fi
2275 done
2276 IFS="$ac_save_ifs"
2277fi
2278fi
2279RANLIB="$ac_cv_prog_RANLIB"
2280if test -n "$RANLIB"; then
2281 echo "$ac_t""$RANLIB" 1>&6
2282else
2283 echo "$ac_t""no" 1>&6
2284fi
2285
2286
2287if test -z "$ac_cv_prog_RANLIB"; then
2288if test -n "$ac_tool_prefix"; then
2289 # Extract the first word of "ranlib", so it can be a program name with args.
2290set dummy ranlib; ac_word=$2
2291echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2292echo "configure:2293: checking for $ac_word" >&5
2293if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2294 echo $ac_n "(cached) $ac_c" 1>&6
2295else
2296 if test -n "$RANLIB"; then
2297 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2298else
2299 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2300 ac_dummy="$PATH"
2301 for ac_dir in $ac_dummy; do
2302 test -z "$ac_dir" && ac_dir=.
2303 if test -f $ac_dir/$ac_word; then
2304 ac_cv_prog_RANLIB="ranlib"
2305 break
2306 fi
2307 done
2308 IFS="$ac_save_ifs"
2309 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2310fi
2311fi
2312RANLIB="$ac_cv_prog_RANLIB"
2313if test -n "$RANLIB"; then
2314 echo "$ac_t""$RANLIB" 1>&6
2315else
2316 echo "$ac_t""no" 1>&6
2317fi
2318
2319else
2320 RANLIB=":"
2321fi
2322fi
2323
2324# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2325set dummy ${ac_tool_prefix}strip; ac_word=$2
2326echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2327echo "configure:2328: checking for $ac_word" >&5
2328if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2329 echo $ac_n "(cached) $ac_c" 1>&6
2330else
2331 if test -n "$STRIP"; then
2332 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2333else
2334 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2335 ac_dummy="$PATH"
2336 for ac_dir in $ac_dummy; do
2337 test -z "$ac_dir" && ac_dir=.
2338 if test -f $ac_dir/$ac_word; then
2339 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2340 break
2341 fi
2342 done
2343 IFS="$ac_save_ifs"
2344fi
2345fi
2346STRIP="$ac_cv_prog_STRIP"
2347if test -n "$STRIP"; then
2348 echo "$ac_t""$STRIP" 1>&6
2349else
2350 echo "$ac_t""no" 1>&6
2351fi
2352
2353
2354if test -z "$ac_cv_prog_STRIP"; then
2355if test -n "$ac_tool_prefix"; then
2356 # Extract the first word of "strip", so it can be a program name with args.
2357set dummy strip; ac_word=$2
2358echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2359echo "configure:2360: checking for $ac_word" >&5
2360if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
2361 echo $ac_n "(cached) $ac_c" 1>&6
2362else
2363 if test -n "$STRIP"; then
2364 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2365else
2366 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2367 ac_dummy="$PATH"
2368 for ac_dir in $ac_dummy; do
2369 test -z "$ac_dir" && ac_dir=.
2370 if test -f $ac_dir/$ac_word; then
2371 ac_cv_prog_STRIP="strip"
2372 break
2373 fi
2374 done
2375 IFS="$ac_save_ifs"
2376 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2377fi
2378fi
2379STRIP="$ac_cv_prog_STRIP"
2380if test -n "$STRIP"; then
2381 echo "$ac_t""$STRIP" 1>&6
2382else
2383 echo "$ac_t""no" 1>&6
2384fi
2385
2386else
2387 STRIP=":"
2388fi
2389fi
2390
2391
2392# Check for any special flags to pass to ltconfig.
2393libtool_flags="--cache-file=$cache_file"
2394test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
2395test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
2396test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
2397test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
2398test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2399libtool_flags="$libtool_flags --enable-dlopen"
2400
2401# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
2402if test "${enable_libtool_lock+set}" = set; then
2403 enableval="$enable_libtool_lock"
2404 :
2405fi
2406
2407test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2408test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2409
2410# Check whether --with-pic or --without-pic was given.
2411if test "${with_pic+set}" = set; then
2412 withval="$with_pic"
2413 pic_mode="$withval"
2414else
2415 pic_mode=default
2416fi
2417
2418test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
2419test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
2420
2421# Some flags need to be propagated to the compiler or linker for good
2422# libtool support.
2423case $host in
2424*-*-irix6*)
2425 # Find out which ABI we are using.
2426 echo '#line 2427 "configure"' > conftest.$ac_ext
2427 if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2428 case `/usr/bin/file conftest.$ac_objext` in
2429 *32-bit*)
2430 LD="${LD-ld} -32"
2431 ;;
2432 *N32*)
2433 LD="${LD-ld} -n32"
2434 ;;
2435 *64-bit*)
2436 LD="${LD-ld} -64"
2437 ;;
2438 esac
2439 fi
2440 rm -rf conftest*
2441 ;;
2442
2443*-*-sco3.2v5*)
2444 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2445 SAVE_CFLAGS="$CFLAGS"
2446 CFLAGS="$CFLAGS -belf"
2447 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
2448echo "configure:2449: checking whether the C compiler needs -belf" >&5
2449if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2450 echo $ac_n "(cached) $ac_c" 1>&6
2451else
2452
2453 ac_ext=c
2454# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2455ac_cpp='$CPP $CPPFLAGS'
2456ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2457ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2458cross_compiling=$ac_cv_prog_cc_cross
2459
2460 cat > conftest.$ac_ext <<EOF
2461#line 2462 "configure"
2462#include "confdefs.h"
2463
2464int main() {
2465
2466; return 0; }
2467EOF
2468if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2469 rm -rf conftest*
2470 lt_cv_cc_needs_belf=yes
2471else
2472 echo "configure: failed program was:" >&5
2473 cat conftest.$ac_ext >&5
2474 rm -rf conftest*
2475 lt_cv_cc_needs_belf=no
2476fi
2477rm -f conftest*
2478 ac_ext=c
2479# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2480ac_cpp='$CPP $CPPFLAGS'
2481ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2482ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2483cross_compiling=$ac_cv_prog_cc_cross
2484
2485fi
2486
2487echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2488 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2489 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2490 CFLAGS="$SAVE_CFLAGS"
2491 fi
2492 ;;
2493
2494
2495esac
2496
2497echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
2498echo "configure:2499: checking how to run the C++ preprocessor" >&5
2499if test -z "$CXXCPP"; then
2500if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
2501 echo $ac_n "(cached) $ac_c" 1>&6
2502else
2503 ac_ext=C
2504# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2505ac_cpp='$CXXCPP $CPPFLAGS'
2506ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2507ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2508cross_compiling=$ac_cv_prog_cxx_cross
2509 CXXCPP="${CXX-g++} -E"
2510 cat > conftest.$ac_ext <<EOF
2511#line 2512 "configure"
2512#include "confdefs.h"
2513#include <stdlib.h>
2514EOF
2515ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2516{ (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2517ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2518if test -z "$ac_err"; then
2519 :
2520else
2521 echo "$ac_err" >&5
2522 echo "configure: failed program was:" >&5
2523 cat conftest.$ac_ext >&5
2524 rm -rf conftest*
2525 CXXCPP=/lib/cpp
2526fi
2527rm -f conftest*
2528 ac_cv_prog_CXXCPP="$CXXCPP"
2529ac_ext=c
2530# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2531ac_cpp='$CPP $CPPFLAGS'
2532ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2533ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2534cross_compiling=$ac_cv_prog_cc_cross
2535fi
2536fi
2537CXXCPP="$ac_cv_prog_CXXCPP"
2538echo "$ac_t""$CXXCPP" 1>&6
2539
2540
2541# Save cache, so that ltconfig can load it
2542cat > confcache <<\EOF
2543# This file is a shell script that caches the results of configure
2544# tests run on this system so they can be shared between configure
2545# scripts and configure runs. It is not useful on other systems.
2546# If it contains results you don't want to keep, you may remove or edit it.
2547#
2548# By default, configure uses ./config.cache as the cache file,
2549# creating it if it does not exist already. You can give configure
2550# the --cache-file=FILE option to use a different cache file; that is
2551# what configure does when it calls configure scripts in
2552# subdirectories, so they share the cache.
2553# Giving --cache-file=/dev/null disables caching, for debugging configure.
2554# config.status only pays attention to the cache file if you give it the
2555# --recheck option to rerun configure.
2556#
2557EOF
2558# The following way of writing the cache mishandles newlines in values,
2559# but we know of no workaround that is simple, portable, and efficient.
2560# So, don't put newlines in cache variables' values.
2561# Ultrix sh set writes to stderr and can't be redirected directly,
2562# and sets the high bit in the cache file unless we assign to the vars.
2563(set) 2>&1 |
2564 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2565 *ac_space=\ *)
2566 # `set' does not quote correctly, so add quotes (double-quote substitution
2567 # turns \\\\ into \\, and sed turns \\ into \).
2568 sed -n \
2569 -e "s/'/'\\\\''/g" \
2570 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2571 ;;
2572 *)
2573 # `set' quotes correctly as required by POSIX, so do not add quotes.
2574 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2575 ;;
2576 esac >> confcache
2577if cmp -s $cache_file confcache; then
2578 :
2579else
2580 if test -w $cache_file; then
2581 echo "updating cache $cache_file"
2582 cat confcache > $cache_file
2583 else
2584 echo "not updating unwritable cache $cache_file"
2585 fi
2586fi
2587rm -f confcache
2588
2589
2590# Actually configure libtool. ac_aux_dir is where install-sh is found.
2591AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2592MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2593LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2594AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2595objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2596deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2597${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2598$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2599|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2600
2601# Reload cache, that may have been modified by ltconfig
2602if test -r "$cache_file"; then
2603 echo "loading cache $cache_file"
2604 . $cache_file
2605else
2606 echo "creating cache $cache_file"
2607 > $cache_file
2608fi
2609
2610
2611# This can be used to rebuild libtool when needed
2612LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2613
2614# Always use our own libtool.
2615LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2616
2617# Redirect the config.log output again, so that the ltconfig log is not
2618# clobbered by the next message.
2619exec 5>>./config.log
2620
2621
2622
2623LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
2624lt_save_CC="$CC"
2625lt_save_CFLAGS="$CFLAGS"
2626AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
2627MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2628LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2629AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2630objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2631deplibs_check_method="$deplibs_check_method" \
2632file_magic_cmd="$file_magic_cmd" \
2633${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
2634--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
2635|| { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
2636CC="$lt_save_CC"
2637CFLAGS="$lt_save_CFLAGS"
2638
2639# Redirect the config.log output again, so that the ltconfig log is not
2640# clobbered by the next message.
2641exec 5>>./config.log
2642
2643
2644
2645
2646
2647
2648subdirs="$DIRLTDL"
2649
2650
2651if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2652 COMPPATH=.
2653else
2654 COMPPATH=..
2655fi
2656
2657
2658
2659
2660if test -d $srcdir/testsuite; then
2661 TESTSUBDIR_TRUE=
2662 TESTSUBDIR_FALSE='#'
2663else
2664 TESTSUBDIR_TRUE='#'
2665 TESTSUBDIR_FALSE=
2666fi
2667
2668# Check whether --enable-getenv-properties or --disable-getenv-properties was given.
2669if test "${enable_getenv_properties+set}" = set; then
2670 enableval="$enable_getenv_properties"
2671 :
2672fi
2673
2674
2675if test -z "$enable_getenv_properties"; then
2676 enable_getenv_properties=${enable_getenv_properties_default-yes}
2677fi
2678if test "$enable_getenv_properties" = no; then
2679 cat >> confdefs.h <<\EOF
2680#define DISABLE_GETENV_PROPERTIES 1
2681EOF
2682
2683fi
2684
2685if test -z "$enable_main_args"; then
2686 enable_main_args=${enable_main_args_default-yes}
2687fi
2688if test "$enable_main_args" = no; then
2689 cat >> confdefs.h <<\EOF
2690#define DISABLE_MAIN_ARGS 1
2691EOF
2692
2693fi
2694
2695
2696# Check whether --enable-hash-synchronization or --disable-hash-synchronization was given.
2697if test "${enable_hash_synchronization+set}" = set; then
2698 enableval="$enable_hash_synchronization"
2699 :
2700fi
2701
2702
2703if test -z "$enable_hash_synchronization"; then
2704 enable_hash_synchronization=$enable_hash_synchronization_default
2705fi
2706
2707if test "${slow_pthread_self}" = "yes"; then
2708 cat >> confdefs.h <<\EOF
2709#define SLOW_PTHREAD_SELF 1
2710EOF
2711
2712fi
2713
2714
2715LIBGCJDEBUG="false"
2716
2717# Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2718if test "${enable_libgcj_debug+set}" = set; then
2719 enableval="$enable_libgcj_debug"
2720 if test "$enable_libgcj_debug" = yes; then
2721 cat >> confdefs.h <<\EOF
2722#define DEBUG 1
2723EOF
2724
2725 LIBGCJDEBUG="true"
2726 fi
2727fi
2728
2729
2730# Check whether --enable-interpreter or --disable-interpreter was given.
2731if test "${enable_interpreter+set}" = set; then
2732 enableval="$enable_interpreter"
2733 if test "$enable_interpreter" = yes; then
2734 # This can also be set in configure.host.
2735 libgcj_interpreter=yes
2736 elif test "$enable_interpreter" = no; then
2737 libgcj_interpreter=no
2738 fi
2739fi
2740
2741
2742if test "$libgcj_interpreter" = yes; then
2743 cat >> confdefs.h <<\EOF
2744#define INTERPRETER 1
2745EOF
2746
2747fi
2748
2749echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
2750echo "configure:2751: checking for exception model to use" >&5
2751
2752ac_ext=C
2753# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2754ac_cpp='$CXXCPP $CPPFLAGS'
2755ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2756ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2757cross_compiling=$ac_cv_prog_cxx_cross
2758
2759# Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2760if test "${enable_sjlj_exceptions+set}" = set; then
2761 enableval="$enable_sjlj_exceptions"
2762 :
2763else
2764 cat > conftest.$ac_ext << EOF
2765#line 2766 "configure"
2766struct S { ~S(); };
2767void bar();
2768void foo()
2769{
2770 S s;
2771 bar();
2772}
2773EOF
2774old_CXXFLAGS="$CXXFLAGS"
2775CXXFLAGS=-S
2776if { (eval echo configure:2777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2777 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2778 enable_sjlj_exceptions=yes
2779 elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
2780 enable_sjlj_exceptions=no
2781 fi
2782fi
2783CXXFLAGS="$old_CXXFLAGS"
2784rm -f conftest*
2785fi
2786
2787if test x$enable_sjlj_exceptions = xyes; then
2788 cat >> confdefs.h <<\EOF
2789#define SJLJ_EXCEPTIONS 1
2790EOF
2791
2792 ac_exception_model_name=sjlj
2793elif test x$enable_sjlj_exceptions = xno; then
2794 ac_exception_model_name="call frame"
2795else
2796 { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
2797fi
2798ac_ext=c
2799# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2800ac_cpp='$CPP $CPPFLAGS'
2801ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2802ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2803cross_compiling=$ac_cv_prog_cc_cross
2804
2805echo "$ac_t""$ac_exception_model_name" 1>&6
2806
2807# If we are non using SJLJ exceptions, and this host does not have support
2808# for unwinding from a signal handler, enable checked dereferences and divides.
2809if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
2810 CHECKREFSPEC=-fcheck-references
2811 DIVIDESPEC=-fuse-divide-subroutine
2812 EXCEPTIONSPEC=
2813fi
2814
2815# Check whether --enable-java-net or --disable-java-net was given.
2816if test "${enable_java_net+set}" = set; then
2817 enableval="$enable_java_net"
2818 :
2819fi
2820
2821
2822if test -z "$enable_java_net"; then
2823 enable_java_net=${enable_java_net_default-yes}
2824fi
2825if test "$enable_java_net" = no; then
2826 cat >> confdefs.h <<\EOF
2827#define DISABLE_JAVA_NET 1
2828EOF
2829
2830fi
2831
2832# Check whether --with-libffi or --without-libffi was given.
2833if test "${with_libffi+set}" = set; then
2834 withval="$with_libffi"
2835 :
2836else
2837 with_libffi=${with_libffi_default-yes}
2838fi
2839
2840
2841LIBFFI=
2842LIBFFIINCS=
2843if test "$with_libffi" != no; then
2844 cat >> confdefs.h <<\EOF
2845#define USE_LIBFFI 1
2846EOF
2847
2848 LIBFFI=../libffi/libffi_convenience.la
2849 LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include'
2850fi
2851
2852
2853
2854# Check whether --enable-jvmpi or --disable-jvmpi was given.
2855if test "${enable_jvmpi+set}" = set; then
2856 enableval="$enable_jvmpi"
2857 :
2858fi
2859
2860
2861if test "$enable_jvmpi" != no; then
2862 cat >> confdefs.h <<\EOF
2863#define ENABLE_JVMPI 1
2864EOF
2865
2866fi
2867
2868TARGET_ECOS=${PROCESS-"no"}
2869# Check whether --with-ecos or --without-ecos was given.
2870if test "${with_ecos+set}" = set; then
2871 withval="$with_ecos"
2872 TARGET_ECOS="$with_ecos"
2873
2874fi
2875
2876
2877PLATFORMOBJS=
2878case "$TARGET_ECOS" in
2879 no) case "$host" in
2880 *mingw*)
2881 PLATFORM=Win32
2882 PLATFORMOBJS=win32.lo
2883 PLATFORMH=win32.h
2884 ;;
2885 *)
2886 PLATFORM=Posix
2887 PLATFORMOBJS=posix.lo
2888 PLATFORMH=posix.h
2889 ;;
2890 esac
2891 ;;
2892 *)
2893 PLATFORM=Ecos
2894 cat >> confdefs.h <<\EOF
2895#define ECOS 1
2896EOF
2897
2898 PLATFORMOBJS=posix.lo
2899 PLATFORMH=posix.h
2900 ;;
2901esac
2902
2903
2904
2905echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2906echo "configure:2907: checking how to run the C preprocessor" >&5
2907# On Suns, sometimes $CPP names a directory.
2908if test -n "$CPP" && test -d "$CPP"; then
2909 CPP=
2910fi
2911if test -z "$CPP"; then
2912if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2913 echo $ac_n "(cached) $ac_c" 1>&6
2914else
2915 # This must be in double quotes, not single quotes, because CPP may get
2916 # substituted into the Makefile and "${CC-cc}" will confuse make.
2917 CPP="${CC-cc} -E"
2918 # On the NeXT, cc -E runs the code through the compiler's parser,
2919 # not just through cpp.
2920 cat > conftest.$ac_ext <<EOF
2921#line 2922 "configure"
2922#include "confdefs.h"
2923#include <assert.h>
2924Syntax Error
2925EOF
2926ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2927{ (eval echo configure:2928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2928ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2929if test -z "$ac_err"; then
2930 :
2931else
2932 echo "$ac_err" >&5
2933 echo "configure: failed program was:" >&5
2934 cat conftest.$ac_ext >&5
2935 rm -rf conftest*
2936 CPP="${CC-cc} -E -traditional-cpp"
2937 cat > conftest.$ac_ext <<EOF
2938#line 2939 "configure"
2939#include "confdefs.h"
2940#include <assert.h>
2941Syntax Error
2942EOF
2943ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2944{ (eval echo configure:2945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2945ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2946if test -z "$ac_err"; then
2947 :
2948else
2949 echo "$ac_err" >&5
2950 echo "configure: failed program was:" >&5
2951 cat conftest.$ac_ext >&5
2952 rm -rf conftest*
2953 CPP="${CC-cc} -nologo -E"
2954 cat > conftest.$ac_ext <<EOF
2955#line 2956 "configure"
2956#include "confdefs.h"
2957#include <assert.h>
2958Syntax Error
2959EOF
2960ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2961{ (eval echo configure:2962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2962ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2963if test -z "$ac_err"; then
2964 :
2965else
2966 echo "$ac_err" >&5
2967 echo "configure: failed program was:" >&5
2968 cat conftest.$ac_ext >&5
2969 rm -rf conftest*
2970 CPP=/lib/cpp
2971fi
2972rm -f conftest*
2973fi
2974rm -f conftest*
2975fi
2976rm -f conftest*
2977 ac_cv_prog_CPP="$CPP"
2978fi
2979 CPP="$ac_cv_prog_CPP"
2980else
2981 ac_cv_prog_CPP="$CPP"
2982fi
2983echo "$ac_t""$CPP" 1>&6
2984
2985cat > conftest.$ac_ext <<EOF
2986#line 2987 "configure"
2987#include "confdefs.h"
2988#include <stdint.h>
2989EOF
2990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2991 egrep "uint32_t" >/dev/null 2>&1; then
2992 rm -rf conftest*
2993 cat >> confdefs.h <<\EOF
2994#define HAVE_INT32_DEFINED 1
2995EOF
2996
2997fi
2998rm -f conftest*
2999
3000cat > conftest.$ac_ext <<EOF
3001#line 3002 "configure"
3002#include "confdefs.h"
3003#include <inttypes.h>
3004EOF
3005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3006 egrep "uint32_t" >/dev/null 2>&1; then
3007 rm -rf conftest*
3008 cat >> confdefs.h <<\EOF
3009#define HAVE_INT32_DEFINED 1
3010EOF
3011
3012fi
3013rm -f conftest*
3014
3015cat > conftest.$ac_ext <<EOF
3016#line 3017 "configure"
3017#include "confdefs.h"
3018#include <sys/types.h>
3019EOF
3020if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3021 egrep "u_int32_t" >/dev/null 2>&1; then
3022 rm -rf conftest*
3023 cat >> confdefs.h <<\EOF
3024#define HAVE_BSD_INT32_DEFINED 1
3025EOF
3026
3027fi
3028rm -f conftest*
3029
3030cat > conftest.$ac_ext <<EOF
3031#line 3032 "configure"
3032#include "confdefs.h"
3033#include <sys/config.h>
3034EOF
3035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3036 egrep "u_int32_t" >/dev/null 2>&1; then
3037 rm -rf conftest*
3038 cat >> confdefs.h <<\EOF
3039#define HAVE_BSD_INT32_DEFINED 1
3040EOF
3041
3042fi
3043rm -f conftest*
3044
3045
3046
3047cat > conftest.$ac_ext <<EOF
3048#line 3049 "configure"
3049#include "confdefs.h"
3050#include <time.h>
3051EOF
3052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3053 egrep "mktime" >/dev/null 2>&1; then
3054 rm -rf conftest*
3055 cat >> confdefs.h <<\EOF
3056#define HAVE_MKTIME 1
3057EOF
3058
3059fi
3060rm -f conftest*
3061
3062cat > conftest.$ac_ext <<EOF
3063#line 3064 "configure"
3064#include "confdefs.h"
3065#include <time.h>
3066EOF
3067if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3068 egrep "localtime" >/dev/null 2>&1; then
3069 rm -rf conftest*
3070 cat >> confdefs.h <<\EOF
3071#define HAVE_LOCALTIME 1
3072EOF
3073
3074fi
3075rm -f conftest*
3076
3077
3078test -d java || mkdir java
3079test -d java/io || mkdir java/io
3080test -d gnu || mkdir gnu
3081
3082
3083
3084test -d java/lang || mkdir java/lang
3085
3086
3087
3088case "${host}" in
3089 *mingw*)
3090 SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32"
3091 ;;
3092 *)
3093 SYSTEMSPEC=
3094 ;;
3095esac
3096
3097
3098LIBGCJTESTSPEC="-L`pwd`/.libs -rpath `pwd`/.libs"
3099
3100
3101# Check whether --with-system-zlib or --without-system-zlib was given.
3102if test "${with_system_zlib+set}" = set; then
3103 withval="$with_system_zlib"
3104 :
3105fi
3106
3107ZLIBSPEC=
3108
3109ZLIBTESTSPEC=
3110
3111
3112libsubdir=.libs
3113
3114echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
3115echo "configure:3116: checking for garbage collector to use" >&5
3116# Check whether --enable-java-gc or --disable-java-gc was given.
3117if test "${enable_java_gc+set}" = set; then
3118 enableval="$enable_java_gc"
3119
3120 GC=$enableval
3121else
3122 GC=boehm
3123fi
3124
3125GCLIBS=
3126GCINCS=
3127GCDEPS=
3128GCOBJS=
3129GCSPEC=
3130JC1GCSPEC=
3131GCTESTSPEC=
3132case "$GC" in
3133 boehm)
3134 echo "$ac_t""boehm" 1>&6
3135 GCLIBS=../boehm-gc/libgcjgc_convenience.la
3136 GCINCS='-I$(top_srcdir)/../boehm-gc/include'
3137 JC1GCSPEC='-fuse-boehm-gc'
3138 GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
3139
3140 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
3141 GCOBJS=boehm.lo
3142 GCHDR=boehm-gc.h
3143 cat >> confdefs.h <<\EOF
3144#define HAVE_BOEHM_GC 1
3145EOF
3146
3147 ;;
3148 no)
3149 echo "$ac_t""none" 1>&6
3150 GCOBJS=nogc.lo
3151 GCHDR=no-gc.h
3152 ;;
3153 *)
3154 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
3155 ;;
3156esac
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
3168echo "configure:3169: checking for thread model used by GCC" >&5
3169THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
3170echo "$ac_t""$THREADS" 1>&6
3171
3172case "$THREADS" in
3173 no | none | single)
3174 THREADS=none
3175 ;;
3176 posix | pthreads)
3177 THREADS=posix
3178 case "$host" in
3179 *-*-linux*)
3180 cat >> confdefs.h <<\EOF
3181#define LINUX_THREADS 1
3182EOF
3183
3184 ;;
3185 esac
3186 ;;
3187 win32)
3188 ;;
3189 decosf1 | irix | mach | os2 | solaris | dce | vxworks)
3190 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
3191 ;;
3192 *)
3193 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
3194 ;;
3195esac
3196
3197THREADLDFLAGS=
3198THREADLIBS=
3199THREADINCS=
3200THREADDEPS=
3201THREADOBJS=
3202THREADH=
3203THREADSPEC=
3204case "$THREADS" in
3205 posix)
3206 case "$host" in
3207 *-*-cygwin*)
3208 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
3209 ;;
3210
3211 *-*-freebsd[1234]*)
3212
3213 # Before FreeBSD 5, it didn't have -lpthread (or any library which
3214 # merely adds pthread_* functions) but it does have a -pthread switch
3215 # which is required at link-time to select -lc_r *instead* of -lc.
3216 THREADLDFLAGS=-pthread
3217 # Don't set THREADSPEC here as might be expected since -pthread is
3218 # not processed when found within a spec file, it must come from
3219 # the command line. For now, the user must provide the -pthread
3220 # switch to link code compiled with gcj. In future, consider adding
3221 # support for weak references to pthread_* functions ala gthr.h API.
3222 THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
3223 ;;
3224 *-*-freebsd*)
3225 # FreeBSD 5 implements a model much closer to other modern UNIX
3226 # which support threads. However, it still does not support
3227 # -lpthread.
3228 THREADLDFLAGS=-pthread
3229 THREADSPEC=-lc_r
3230 ;;
3231 *)
3232 THREADLIBS=-lpthread
3233 THREADSPEC=-lpthread
3234 ;;
3235 esac
3236 THREADOBJS=posix-threads.lo
3237 THREADH=posix-threads.h
3238 # MIT pthreads doesn't seem to have the mutexattr functions.
3239 # But for now we don't check for it. We just assume you aren't
3240 # using MIT pthreads.
3241 cat >> confdefs.h <<\EOF
3242#define HAVE_PTHREAD_MUTEXATTR_INIT 1
3243EOF
3244
3245
3246 # If we're using the Boehm GC, then we happen to know that it
3247 # defines _REENTRANT, so we don't bother. Eww.
3248 if test "$GC" != boehm; then
3249 cat >> confdefs.h <<\EOF
3250#define _REENTRANT 1
3251EOF
3252
3253 fi
3254 cat >> confdefs.h <<\EOF
3255#define _POSIX_PTHREAD_SEMANTICS 1
3256EOF
3257
3258 ;;
3259
3260 win32)
3261 THREADOBJS=win32-threads.lo
3262 THREADH=win32-threads.h
3263 ;;
3264
3265 none)
3266 THREADOBJS=no-threads.lo
3267 THREADH=no-threads.h
3268 ;;
3269esac
3270
3271
3272
3273
3274
3275
3276
3277
3278if test -d sysdep; then true; else mkdir sysdep; fi
3279
3280
3281HASH_SYNC_SPEC=
3282# Hash synchronization is only useful with posix threads right now.
3283if test "$enable_hash_synchronization" = yes && test "$THREADS" = "posix"; then
3284 HASH_SYNC_SPEC=-fhash-synchronization
3285 cat >> confdefs.h <<\EOF
3286#define JV_HASH_SYNCHRONIZATION 1
3287EOF
3288
3289fi
3290
3291
3292
3293
3294
3295if test "$GCC" = yes; then
3296 USING_GCC_TRUE=
3297 USING_GCC_FALSE='#'
3298else
3299 USING_GCC_TRUE='#'
3300 USING_GCC_FALSE=
3301fi
3302
3303CANADIAN=no
3304NULL_TARGET=no
3305NATIVE=yes
3306
3307# We're in the tree with gcc, and need to include some of its headers.
3308GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
3309
3310# Figure out where generated headers like libgcj-config.h get installed.
3311gcc_version_trigger=${libgcj_basedir}/../gcc/version.c
3312gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
3313gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
3314tool_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include
3315
3316
3317
3318if test -n "${with_cross_host}"; then
3319 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
3320 # may not work correctly, because the compiler may not be able to
3321 # link executables.
3322
3323 # We assume newlib. This lets us hard-code the functions we know
3324 # we'll have.
3325 cat >> confdefs.h <<\EOF
3326#define HAVE_MEMMOVE 1
3327EOF
3328
3329 cat >> confdefs.h <<\EOF
3330#define HAVE_MEMCPY 1
3331EOF
3332
3333 cat >> confdefs.h <<\EOF
3334#define HAVE_STRERROR 1
3335EOF
3336
3337 cat >> confdefs.h <<\EOF
3338#define HAVE_TIME 1
3339EOF
3340
3341 cat >> confdefs.h <<\EOF
3342#define HAVE_GMTIME_R 1
3343EOF
3344
3345 cat >> confdefs.h <<\EOF
3346#define HAVE_LOCALTIME_R 1
3347EOF
3348
3349 cat >> confdefs.h <<\EOF
3350#define HAVE_PTHREAD_MUTEXATTR_INIT 1
3351EOF
3352
3353 cat >> confdefs.h <<\EOF
3354#define HAVE_ALLOCA 1
3355EOF
3356
3357
3358 cat >> confdefs.h <<\EOF
3359#define NO_GETUID 1
3360EOF
3361
3362
3363 # If Canadian cross, then don't pick up tools from the build
3364 # directory.
3365 if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
3366 CANADIAN=yes
3367 GCC_UNWIND_INCLUDE=
3368 GCJ="${target_alias}-gcj"
3369 fi
3370 NATIVE=no
3371else
3372 for ac_func in strerror ioctl select fstat open fsync sleep opendir
3373do
3374echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3375echo "configure:3376: checking for $ac_func" >&5
3376if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3377 echo $ac_n "(cached) $ac_c" 1>&6
3378else
3379 cat > conftest.$ac_ext <<EOF
3380#line 3381 "configure"
3381#include "confdefs.h"
3382/* System header to define __stub macros and hopefully few prototypes,
3383 which can conflict with char $ac_func(); below. */
3384#include <assert.h>
3385/* Override any gcc2 internal prototype to avoid an error. */
3386/* We use char because int might match the return type of a gcc2
3387 builtin and then its argument prototype would still apply. */
3388char $ac_func();
3389
3390int main() {
3391
3392/* The GNU C library defines this for functions which it implements
3393 to always fail with ENOSYS. Some functions are actually named
3394 something starting with __ and the normal name is an alias. */
3395#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3396choke me
3397#else
3398$ac_func();
3399#endif
3400
3401; return 0; }
3402EOF
3403if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3404 rm -rf conftest*
3405 eval "ac_cv_func_$ac_func=yes"
3406else
3407 echo "configure: failed program was:" >&5
3408 cat conftest.$ac_ext >&5
3409 rm -rf conftest*
3410 eval "ac_cv_func_$ac_func=no"
3411fi
3412rm -f conftest*
3413fi
3414
3415if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3416 echo "$ac_t""yes" 1>&6
3417 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3418 cat >> confdefs.h <<EOF
3419#define $ac_tr_func 1
3420EOF
3421
3422else
3423 echo "$ac_t""no" 1>&6
3424fi
3425done
3426
3427 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
3428do
3429echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3430echo "configure:3431: checking for $ac_func" >&5
3431if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3432 echo $ac_n "(cached) $ac_c" 1>&6
3433else
3434 cat > conftest.$ac_ext <<EOF
3435#line 3436 "configure"
3436#include "confdefs.h"
3437/* System header to define __stub macros and hopefully few prototypes,
3438 which can conflict with char $ac_func(); below. */
3439#include <assert.h>
3440/* Override any gcc2 internal prototype to avoid an error. */
3441/* We use char because int might match the return type of a gcc2
3442 builtin and then its argument prototype would still apply. */
3443char $ac_func();
3444
3445int main() {
3446
3447/* The GNU C library defines this for functions which it implements
3448 to always fail with ENOSYS. Some functions are actually named
3449 something starting with __ and the normal name is an alias. */
3450#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3451choke me
3452#else
3453$ac_func();
3454#endif
3455
3456; return 0; }
3457EOF
3458if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3459 rm -rf conftest*
3460 eval "ac_cv_func_$ac_func=yes"
3461else
3462 echo "configure: failed program was:" >&5
3463 cat conftest.$ac_ext >&5
3464 rm -rf conftest*
3465 eval "ac_cv_func_$ac_func=no"
3466fi
3467rm -f conftest*
3468fi
3469
3470if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3471 echo "$ac_t""yes" 1>&6
3472 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3473 cat >> confdefs.h <<EOF
3474#define $ac_tr_func 1
3475EOF
3476
3477else
3478 echo "$ac_t""no" 1>&6
3479fi
3480done
3481
3482 for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
3483do
3484echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3485echo "configure:3486: checking for $ac_func" >&5
3486if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3487 echo $ac_n "(cached) $ac_c" 1>&6
3488else
3489 cat > conftest.$ac_ext <<EOF
3490#line 3491 "configure"
3491#include "confdefs.h"
3492/* System header to define __stub macros and hopefully few prototypes,
3493 which can conflict with char $ac_func(); below. */
3494#include <assert.h>
3495/* Override any gcc2 internal prototype to avoid an error. */
3496/* We use char because int might match the return type of a gcc2
3497 builtin and then its argument prototype would still apply. */
3498char $ac_func();
3499
3500int main() {
3501
3502/* The GNU C library defines this for functions which it implements
3503 to always fail with ENOSYS. Some functions are actually named
3504 something starting with __ and the normal name is an alias. */
3505#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3506choke me
3507#else
3508$ac_func();
3509#endif
3510
3511; return 0; }
3512EOF
3513if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3514 rm -rf conftest*
3515 eval "ac_cv_func_$ac_func=yes"
3516else
3517 echo "configure: failed program was:" >&5
3518 cat conftest.$ac_ext >&5
3519 rm -rf conftest*
3520 eval "ac_cv_func_$ac_func=no"
3521fi
3522rm -f conftest*
3523fi
3524
3525if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3526 echo "$ac_t""yes" 1>&6
3527 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3528 cat >> confdefs.h <<EOF
3529#define $ac_tr_func 1
3530EOF
3531
3532else
3533 echo "$ac_t""no" 1>&6
3534fi
3535done
3536
3537 for ac_func in nl_langinfo setlocale
3538do
3539echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3540echo "configure:3541: checking for $ac_func" >&5
3541if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3542 echo $ac_n "(cached) $ac_c" 1>&6
3543else
3544 cat > conftest.$ac_ext <<EOF
3545#line 3546 "configure"
3546#include "confdefs.h"
3547/* System header to define __stub macros and hopefully few prototypes,
3548 which can conflict with char $ac_func(); below. */
3549#include <assert.h>
3550/* Override any gcc2 internal prototype to avoid an error. */
3551/* We use char because int might match the return type of a gcc2
3552 builtin and then its argument prototype would still apply. */
3553char $ac_func();
3554
3555int main() {
3556
3557/* The GNU C library defines this for functions which it implements
3558 to always fail with ENOSYS. Some functions are actually named
3559 something starting with __ and the normal name is an alias. */
3560#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3561choke me
3562#else
3563$ac_func();
3564#endif
3565
3566; return 0; }
3567EOF
3568if { (eval echo configure:3569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3569 rm -rf conftest*
3570 eval "ac_cv_func_$ac_func=yes"
3571else
3572 echo "configure: failed program was:" >&5
3573 cat conftest.$ac_ext >&5
3574 rm -rf conftest*
3575 eval "ac_cv_func_$ac_func=no"
3576fi
3577rm -f conftest*
3578fi
3579
3580if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3581 echo "$ac_t""yes" 1>&6
3582 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3583 cat >> confdefs.h <<EOF
3584#define $ac_tr_func 1
3585EOF
3586
3587else
3588 echo "$ac_t""no" 1>&6
3589fi
3590done
3591
3592 for ac_func in inet_aton inet_addr
3593do
3594echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3595echo "configure:3596: checking for $ac_func" >&5
3596if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3597 echo $ac_n "(cached) $ac_c" 1>&6
3598else
3599 cat > conftest.$ac_ext <<EOF
3600#line 3601 "configure"
3601#include "confdefs.h"
3602/* System header to define __stub macros and hopefully few prototypes,
3603 which can conflict with char $ac_func(); below. */
3604#include <assert.h>
3605/* Override any gcc2 internal prototype to avoid an error. */
3606/* We use char because int might match the return type of a gcc2
3607 builtin and then its argument prototype would still apply. */
3608char $ac_func();
3609
3610int main() {
3611
3612/* The GNU C library defines this for functions which it implements
3613 to always fail with ENOSYS. Some functions are actually named
3614 something starting with __ and the normal name is an alias. */
3615#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3616choke me
3617#else
3618$ac_func();
3619#endif
3620
3621; return 0; }
3622EOF
3623if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3624 rm -rf conftest*
3625 eval "ac_cv_func_$ac_func=yes"
3626else
3627 echo "configure: failed program was:" >&5
3628 cat conftest.$ac_ext >&5
3629 rm -rf conftest*
3630 eval "ac_cv_func_$ac_func=no"
3631fi
3632rm -f conftest*
3633fi
3634
3635if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3636 echo "$ac_t""yes" 1>&6
3637 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3638 cat >> confdefs.h <<EOF
3639#define $ac_tr_func 1
3640EOF
3641 break
3642else
3643 echo "$ac_t""no" 1>&6
3644fi
3645done
3646
3647 for ac_func in inet_pton uname inet_ntoa
3648do
3649echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3650echo "configure:3651: checking for $ac_func" >&5
3651if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3652 echo $ac_n "(cached) $ac_c" 1>&6
3653else
3654 cat > conftest.$ac_ext <<EOF
3655#line 3656 "configure"
3656#include "confdefs.h"
3657/* System header to define __stub macros and hopefully few prototypes,
3658 which can conflict with char $ac_func(); below. */
3659#include <assert.h>
3660/* Override any gcc2 internal prototype to avoid an error. */
3661/* We use char because int might match the return type of a gcc2
3662 builtin and then its argument prototype would still apply. */
3663char $ac_func();
3664
3665int main() {
3666
3667/* The GNU C library defines this for functions which it implements
3668 to always fail with ENOSYS. Some functions are actually named
3669 something starting with __ and the normal name is an alias. */
3670#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3671choke me
3672#else
3673$ac_func();
3674#endif
3675
3676; return 0; }
3677EOF
3678if { (eval echo configure:3679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3679 rm -rf conftest*
3680 eval "ac_cv_func_$ac_func=yes"
3681else
3682 echo "configure: failed program was:" >&5
3683 cat conftest.$ac_ext >&5
3684 rm -rf conftest*
3685 eval "ac_cv_func_$ac_func=no"
3686fi
3687rm -f conftest*
3688fi
3689
3690if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3691 echo "$ac_t""yes" 1>&6
3692 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3693 cat >> confdefs.h <<EOF
3694#define $ac_tr_func 1
3695EOF
3696
3697else
3698 echo "$ac_t""no" 1>&6
3699fi
3700done
3701
3702 for ac_func in fork execvp pipe sigaction
3703do
3704echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3705echo "configure:3706: checking for $ac_func" >&5
3706if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3707 echo $ac_n "(cached) $ac_c" 1>&6
3708else
3709 cat > conftest.$ac_ext <<EOF
3710#line 3711 "configure"
3711#include "confdefs.h"
3712/* System header to define __stub macros and hopefully few prototypes,
3713 which can conflict with char $ac_func(); below. */
3714#include <assert.h>
3715/* Override any gcc2 internal prototype to avoid an error. */
3716/* We use char because int might match the return type of a gcc2
3717 builtin and then its argument prototype would still apply. */
3718char $ac_func();
3719
3720int main() {
3721
3722/* The GNU C library defines this for functions which it implements
3723 to always fail with ENOSYS. Some functions are actually named
3724 something starting with __ and the normal name is an alias. */
3725#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3726choke me
3727#else
3728$ac_func();
3729#endif
3730
3731; return 0; }
3732EOF
3733if { (eval echo configure:3734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3734 rm -rf conftest*
3735 eval "ac_cv_func_$ac_func=yes"
3736else
3737 echo "configure: failed program was:" >&5
3738 cat conftest.$ac_ext >&5
3739 rm -rf conftest*
3740 eval "ac_cv_func_$ac_func=no"
3741fi
3742rm -f conftest*
3743fi
3744
3745if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3746 echo "$ac_t""yes" 1>&6
3747 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3748 cat >> confdefs.h <<EOF
3749#define $ac_tr_func 1
3750EOF
3751
3752else
3753 echo "$ac_t""no" 1>&6
3754fi
3755done
3756
3757 for ac_hdr in execinfo.h unistd.h dlfcn.h
3758do
3759ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3760echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3761echo "configure:3762: checking for $ac_hdr" >&5
3762if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3763 echo $ac_n "(cached) $ac_c" 1>&6
3764else
3765 cat > conftest.$ac_ext <<EOF
3766#line 3767 "configure"
3767#include "confdefs.h"
3768#include <$ac_hdr>
3769EOF
3770ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3771{ (eval echo configure:3772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3772ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3773if test -z "$ac_err"; then
3774 rm -rf conftest*
3775 eval "ac_cv_header_$ac_safe=yes"
3776else
3777 echo "$ac_err" >&5
3778 echo "configure: failed program was:" >&5
3779 cat conftest.$ac_ext >&5
3780 rm -rf conftest*
3781 eval "ac_cv_header_$ac_safe=no"
3782fi
3783rm -f conftest*
3784fi
3785if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3786 echo "$ac_t""yes" 1>&6
3787 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3788 cat >> confdefs.h <<EOF
3789#define $ac_tr_hdr 1
3790EOF
3791
3792else
3793 echo "$ac_t""no" 1>&6
3794fi
3795done
3796
3797 echo $ac_n "checking for backtrace""... $ac_c" 1>&6
3798echo "configure:3799: checking for backtrace" >&5
3799if eval "test \"`echo '$''{'ac_cv_func_backtrace'+set}'`\" = set"; then
3800 echo $ac_n "(cached) $ac_c" 1>&6
3801else
3802 cat > conftest.$ac_ext <<EOF
3803#line 3804 "configure"
3804#include "confdefs.h"
3805/* System header to define __stub macros and hopefully few prototypes,
3806 which can conflict with char backtrace(); below. */
3807#include <assert.h>
3808/* Override any gcc2 internal prototype to avoid an error. */
3809/* We use char because int might match the return type of a gcc2
3810 builtin and then its argument prototype would still apply. */
3811char backtrace();
3812
3813int main() {
3814
3815/* The GNU C library defines this for functions which it implements
3816 to always fail with ENOSYS. Some functions are actually named
3817 something starting with __ and the normal name is an alias. */
3818#if defined (__stub_backtrace) || defined (__stub___backtrace)
3819choke me
3820#else
3821backtrace();
3822#endif
3823
3824; return 0; }
3825EOF
3826if { (eval echo configure:3827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3827 rm -rf conftest*
3828 eval "ac_cv_func_backtrace=yes"
3829else
3830 echo "configure: failed program was:" >&5
3831 cat conftest.$ac_ext >&5
3832 rm -rf conftest*
3833 eval "ac_cv_func_backtrace=no"
3834fi
3835rm -f conftest*
3836fi
3837
3838if eval "test \"`echo '$ac_cv_func_'backtrace`\" = yes"; then
3839 echo "$ac_t""yes" 1>&6
3840
3841 case "$host" in
3842 ia64-*-linux*)
3843 # Has broken backtrace()
3844 ;;
3845 *)
3846 cat >> confdefs.h <<\EOF
3847#define HAVE_BACKTRACE 1
3848EOF
3849
3850 ;;
3851 esac
3852
3853else
3854 echo "$ac_t""no" 1>&6
3855fi
3856
3857
3858 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3859echo "configure:3860: checking for dladdr in -ldl" >&5
3860ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3861if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3862 echo $ac_n "(cached) $ac_c" 1>&6
3863else
3864 ac_save_LIBS="$LIBS"
3865LIBS="-ldl $LIBS"
3866cat > conftest.$ac_ext <<EOF
3867#line 3868 "configure"
3868#include "confdefs.h"
3869/* Override any gcc2 internal prototype to avoid an error. */
3870/* We use char because int might match the return type of a gcc2
3871 builtin and then its argument prototype would still apply. */
3872char dladdr();
3873
3874int main() {
3875dladdr()
3876; return 0; }
3877EOF
3878if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3879 rm -rf conftest*
3880 eval "ac_cv_lib_$ac_lib_var=yes"
3881else
3882 echo "configure: failed program was:" >&5
3883 cat conftest.$ac_ext >&5
3884 rm -rf conftest*
3885 eval "ac_cv_lib_$ac_lib_var=no"
3886fi
3887rm -f conftest*
3888LIBS="$ac_save_LIBS"
3889
3890fi
3891if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3892 echo "$ac_t""yes" 1>&6
3893
3894 cat >> confdefs.h <<\EOF
3895#define HAVE_DLADDR 1
3896EOF
3897
3898else
3899 echo "$ac_t""no" 1>&6
3900fi
3901
3902 for ac_file in /proc/self/exe
3903do
3904
3905ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3906echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3907echo "configure:3908: checking for $ac_file" >&5
3908if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3909 echo $ac_n "(cached) $ac_c" 1>&6
3910else
3911 if test "$cross_compiling" = yes; then
3912 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3913else
3914 if test -r $ac_file; then
3915 eval "ac_cv_file_$ac_safe=yes"
3916 else
3917 eval "ac_cv_file_$ac_safe=no"
3918 fi
3919fi
3920fi
3921if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3922 echo "$ac_t""yes" 1>&6
3923 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3924 cat >> confdefs.h <<EOF
3925#define $ac_tr_file 1
3926EOF
3927
3928 cat >> confdefs.h <<\EOF
3929#define HAVE_PROC_SELF_EXE 1
3930EOF
3931
3932else
3933 echo "$ac_t""no" 1>&6
3934
3935fi
3936done
3937
3938
3939
3940
3941 am_cv_lib_iconv_ldpath=
3942 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
3943if test "${with_libiconv_prefix+set}" = set; then
3944 withval="$with_libiconv_prefix"
3945
3946 for dir in `echo "$withval" | tr : ' '`; do
3947 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
3948 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
3949 done
3950
3951fi
3952
3953
3954 echo $ac_n "checking for iconv""... $ac_c" 1>&6
3955echo "configure:3956: checking for iconv" >&5
3956if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
3957 echo $ac_n "(cached) $ac_c" 1>&6
3958else
3959
3960 am_cv_func_iconv="no, consider installing GNU libiconv"
3961 am_cv_lib_iconv=no
3962 cat > conftest.$ac_ext <<EOF
3963#line 3964 "configure"
3964#include "confdefs.h"
3965#include <stdlib.h>
3966#include <iconv.h>
3967int main() {
3968iconv_t cd = iconv_open("","");
3969 iconv(cd,NULL,NULL,NULL,NULL);
3970 iconv_close(cd);
3971; return 0; }
3972EOF
3973if { (eval echo configure:3974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3974 rm -rf conftest*
3975 am_cv_func_iconv=yes
3976else
3977 echo "configure: failed program was:" >&5
3978 cat conftest.$ac_ext >&5
3979fi
3980rm -f conftest*
3981 if test "$am_cv_func_iconv" != yes; then
3982 am_save_LIBS="$LIBS"
3983 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
3984 cat > conftest.$ac_ext <<EOF
3985#line 3986 "configure"
3986#include "confdefs.h"
3987#include <stdlib.h>
3988#include <iconv.h>
3989int main() {
3990iconv_t cd = iconv_open("","");
3991 iconv(cd,NULL,NULL,NULL,NULL);
3992 iconv_close(cd);
3993; return 0; }
3994EOF
3995if { (eval echo configure:3996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3996 rm -rf conftest*
3997 am_cv_lib_iconv=yes
3998 am_cv_func_iconv=yes
3999else
4000 echo "configure: failed program was:" >&5
4001 cat conftest.$ac_ext >&5
4002fi
4003rm -f conftest*
4004 LIBS="$am_save_LIBS"
4005 fi
4006
4007fi
4008
4009echo "$ac_t""$am_cv_func_iconv" 1>&6
4010 if test "$am_cv_func_iconv" = yes; then
4011 cat >> confdefs.h <<\EOF
4012#define HAVE_ICONV 1
4013EOF
4014
4015 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
4016echo "configure:4017: checking for iconv declaration" >&5
4017 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
4018 echo $ac_n "(cached) $ac_c" 1>&6
4019else
4020
4021 cat > conftest.$ac_ext <<EOF
4022#line 4023 "configure"
4023#include "confdefs.h"
4024
4025#include <stdlib.h>
4026#include <iconv.h>
4027extern
4028#ifdef __cplusplus
4029"C"
4030#endif
4031#if defined(__STDC__) || defined(__cplusplus)
4032size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4033#else
4034size_t iconv();
4035#endif
4036
4037int main() {
4038
4039; return 0; }
4040EOF
4041if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4042 rm -rf conftest*
4043 am_cv_proto_iconv_arg1=""
4044else
4045 echo "configure: failed program was:" >&5
4046 cat conftest.$ac_ext >&5
4047 rm -rf conftest*
4048 am_cv_proto_iconv_arg1="const"
4049fi
4050rm -f conftest*
4051 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);"
4052fi
4053
4054 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4055 echo "$ac_t""${ac_t:-
4056 }$am_cv_proto_iconv" 1>&6
4057 cat >> confdefs.h <<EOF
4058#define ICONV_CONST $am_cv_proto_iconv_arg1
4059EOF
4060
4061 fi
4062 LIBICONV=
4063 if test "$am_cv_lib_iconv" = yes; then
4064 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
4065 fi
4066
4067
4068 if test $ac_cv_header_locale_h = yes; then
4069 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4070echo "configure:4071: checking for LC_MESSAGES" >&5
4071if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4072 echo $ac_n "(cached) $ac_c" 1>&6
4073else
4074 cat > conftest.$ac_ext <<EOF
4075#line 4076 "configure"
4076#include "confdefs.h"
4077#include <locale.h>
4078int main() {
4079return LC_MESSAGES
4080; return 0; }
4081EOF
4082if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4083 rm -rf conftest*
4084 am_cv_val_LC_MESSAGES=yes
4085else
4086 echo "configure: failed program was:" >&5
4087 cat conftest.$ac_ext >&5
4088 rm -rf conftest*
4089 am_cv_val_LC_MESSAGES=no
4090fi
4091rm -f conftest*
4092fi
4093
4094echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
4095 if test $am_cv_val_LC_MESSAGES = yes; then
4096 cat >> confdefs.h <<\EOF
4097#define HAVE_LC_MESSAGES 1
4098EOF
4099
4100 fi
4101 fi
4102 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4103echo "configure:4104: checking whether struct tm is in sys/time.h or time.h" >&5
4104if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
4105 echo $ac_n "(cached) $ac_c" 1>&6
4106else
4107 cat > conftest.$ac_ext <<EOF
4108#line 4109 "configure"
4109#include "confdefs.h"
4110#include <sys/types.h>
4111#include <time.h>
4112int main() {
4113struct tm *tp; tp->tm_sec;
4114; return 0; }
4115EOF
4116if { (eval echo configure:4117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4117 rm -rf conftest*
4118 ac_cv_struct_tm=time.h
4119else
4120 echo "configure: failed program was:" >&5
4121 cat conftest.$ac_ext >&5
4122 rm -rf conftest*
4123 ac_cv_struct_tm=sys/time.h
4124fi
4125rm -f conftest*
4126fi
4127
4128echo "$ac_t""$ac_cv_struct_tm" 1>&6
4129if test $ac_cv_struct_tm = sys/time.h; then
4130 cat >> confdefs.h <<\EOF
4131#define TM_IN_SYS_TIME 1
4132EOF
4133
4134fi
4135
4136echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4137echo "configure:4138: checking for tm_zone in struct tm" >&5
4138if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
4139 echo $ac_n "(cached) $ac_c" 1>&6
4140else
4141 cat > conftest.$ac_ext <<EOF
4142#line 4143 "configure"
4143#include "confdefs.h"
4144#include <sys/types.h>
4145#include <$ac_cv_struct_tm>
4146int main() {
4147struct tm tm; tm.tm_zone;
4148; return 0; }
4149EOF
4150if { (eval echo configure:4151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4151 rm -rf conftest*
4152 ac_cv_struct_tm_zone=yes
4153else
4154 echo "configure: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
4156 rm -rf conftest*
4157 ac_cv_struct_tm_zone=no
4158fi
4159rm -f conftest*
4160fi
4161
4162echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4163if test "$ac_cv_struct_tm_zone" = yes; then
4164 cat >> confdefs.h <<\EOF
4165#define HAVE_TM_ZONE 1
4166EOF
4167
4168else
4169 echo $ac_n "checking for tzname""... $ac_c" 1>&6
4170echo "configure:4171: checking for tzname" >&5
4171if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
4172 echo $ac_n "(cached) $ac_c" 1>&6
4173else
4174 cat > conftest.$ac_ext <<EOF
4175#line 4176 "configure"
4176#include "confdefs.h"
4177#include <time.h>
4178#ifndef tzname /* For SGI. */
4179extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4180#endif
4181int main() {
4182atoi(*tzname);
4183; return 0; }
4184EOF
4185if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4186 rm -rf conftest*
4187 ac_cv_var_tzname=yes
4188else
4189 echo "configure: failed program was:" >&5
4190 cat conftest.$ac_ext >&5
4191 rm -rf conftest*
4192 ac_cv_var_tzname=no
4193fi
4194rm -f conftest*
4195fi
4196
4197echo "$ac_t""$ac_cv_var_tzname" 1>&6
4198 if test $ac_cv_var_tzname = yes; then
4199 cat >> confdefs.h <<\EOF
4200#define HAVE_TZNAME 1
4201EOF
4202
4203 fi
4204fi
4205
4206
4207 for ac_func in gethostbyname_r
4208do
4209echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4210echo "configure:4211: checking for $ac_func" >&5
4211if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4212 echo $ac_n "(cached) $ac_c" 1>&6
4213else
4214 cat > conftest.$ac_ext <<EOF
4215#line 4216 "configure"
4216#include "confdefs.h"
4217/* System header to define __stub macros and hopefully few prototypes,
4218 which can conflict with char $ac_func(); below. */
4219#include <assert.h>
4220/* Override any gcc2 internal prototype to avoid an error. */
4221/* We use char because int might match the return type of a gcc2
4222 builtin and then its argument prototype would still apply. */
4223char $ac_func();
4224
4225int main() {
4226
4227/* The GNU C library defines this for functions which it implements
4228 to always fail with ENOSYS. Some functions are actually named
4229 something starting with __ and the normal name is an alias. */
4230#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4231choke me
4232#else
4233$ac_func();
4234#endif
4235
4236; return 0; }
4237EOF
4238if { (eval echo configure:4239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4239 rm -rf conftest*
4240 eval "ac_cv_func_$ac_func=yes"
4241else
4242 echo "configure: failed program was:" >&5
4243 cat conftest.$ac_ext >&5
4244 rm -rf conftest*
4245 eval "ac_cv_func_$ac_func=no"
4246fi
4247rm -f conftest*
4248fi
4249
4250if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4251 echo "$ac_t""yes" 1>&6
4252 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4253 cat >> confdefs.h <<EOF
4254#define $ac_tr_func 1
4255EOF
4256
4257 cat >> confdefs.h <<\EOF
4258#define HAVE_GETHOSTBYNAME_R 1
4259EOF
4260
4261 # There are two different kinds of gethostbyname_r.
4262 # We look for the one that returns `int'.
4263 # Hopefully this check is robust enough.
4264 cat > conftest.$ac_ext <<EOF
4265#line 4266 "configure"
4266#include "confdefs.h"
4267#include <netdb.h>
4268EOF
4269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4270 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
4271 rm -rf conftest*
4272
4273 cat >> confdefs.h <<\EOF
4274#define GETHOSTBYNAME_R_RETURNS_INT 1
4275EOF
4276
4277fi
4278rm -f conftest*
4279
4280
4281 case " $GCINCS " in
4282 *" -D_REENTRANT "*) ;;
4283 *)
4284 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
4285echo "configure:4286: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
4286if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
4287 echo $ac_n "(cached) $ac_c" 1>&6
4288else
4289
4290 ac_ext=C
4291# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4292ac_cpp='$CXXCPP $CPPFLAGS'
4293ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4294ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4295cross_compiling=$ac_cv_prog_cxx_cross
4296
4297 cat > conftest.$ac_ext <<EOF
4298#line 4299 "configure"
4299#include "confdefs.h"
4300#include <netdb.h>
4301int main() {
4302gethostbyname_r("", 0, 0);
4303; return 0; }
4304EOF
4305if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4306 rm -rf conftest*
4307 libjava_cv_gethostbyname_r_needs_reentrant=no
4308else
4309 echo "configure: failed program was:" >&5
4310 cat conftest.$ac_ext >&5
4311 rm -rf conftest*
4312 CPPFLAGS_SAVE="$CPPFLAGS"
4313 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4314 cat > conftest.$ac_ext <<EOF
4315#line 4316 "configure"
4316#include "confdefs.h"
4317#include <netdb.h>
4318int main() {
4319gethostbyname_r("", 0, 0);
4320; return 0; }
4321EOF
4322if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4323 rm -rf conftest*
4324 libjava_cv_gethostbyname_r_needs_reentrant=yes
4325else
4326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
4328 rm -rf conftest*
4329 libjava_cv_gethostbyname_r_needs_reentrant=fail
4330fi
4331rm -f conftest*
4332 CPPFLAGS="$CPPFLAGS_SAVE"
4333
4334fi
4335rm -f conftest*
4336 ac_ext=c
4337# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4338ac_cpp='$CPP $CPPFLAGS'
4339ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4340ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4341cross_compiling=$ac_cv_prog_cc_cross
4342
4343
4344fi
4345
4346echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
4347 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
4348 cat >> confdefs.h <<\EOF
4349#define _REENTRANT 1
4350EOF
4351
4352 fi
4353 ;;
4354 esac
4355
4356 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
4357echo "configure:4358: checking for struct hostent_data" >&5
4358if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
4359 echo $ac_n "(cached) $ac_c" 1>&6
4360else
4361 cat > conftest.$ac_ext <<EOF
4362#line 4363 "configure"
4363#include "confdefs.h"
4364
4365#if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
4366# define _REENTRANT 1
4367#endif
4368#include <netdb.h>
4369int main() {
4370struct hostent_data data;
4371; return 0; }
4372EOF
4373if { (eval echo configure:4374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4374 rm -rf conftest*
4375 libjava_cv_struct_hostent_data=yes
4376else
4377 echo "configure: failed program was:" >&5
4378 cat conftest.$ac_ext >&5
4379 rm -rf conftest*
4380 libjava_cv_struct_hostent_data=no
4381fi
4382rm -f conftest*
4383fi
4384
4385echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
4386 if test "x$libjava_cv_struct_hostent_data" = xyes; then
4387 cat >> confdefs.h <<\EOF
4388#define HAVE_STRUCT_HOSTENT_DATA 1
4389EOF
4390
4391 fi
4392
4393else
4394 echo "$ac_t""no" 1>&6
4395fi
4396done
4397
4398
4399 # FIXME: libjava source code expects to find a prototype for
4400 # gethostbyaddr_r in netdb.h. The outer check ensures that
4401 # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
4402 # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
4403 # linkage check is enough, yet C++ code requires proper prototypes.)
4404 cat > conftest.$ac_ext <<EOF
4405#line 4406 "configure"
4406#include "confdefs.h"
4407#include <netdb.h>
4408EOF
4409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4410 egrep "gethostbyaddr_r" >/dev/null 2>&1; then
4411 rm -rf conftest*
4412
4413 for ac_func in gethostbyaddr_r
4414do
4415echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4416echo "configure:4417: checking for $ac_func" >&5
4417if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4418 echo $ac_n "(cached) $ac_c" 1>&6
4419else
4420 cat > conftest.$ac_ext <<EOF
4421#line 4422 "configure"
4422#include "confdefs.h"
4423/* System header to define __stub macros and hopefully few prototypes,
4424 which can conflict with char $ac_func(); below. */
4425#include <assert.h>
4426/* Override any gcc2 internal prototype to avoid an error. */
4427/* We use char because int might match the return type of a gcc2
4428 builtin and then its argument prototype would still apply. */
4429char $ac_func();
4430
4431int main() {
4432
4433/* The GNU C library defines this for functions which it implements
4434 to always fail with ENOSYS. Some functions are actually named
4435 something starting with __ and the normal name is an alias. */
4436#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4437choke me
4438#else
4439$ac_func();
4440#endif
4441
4442; return 0; }
4443EOF
4444if { (eval echo configure:4445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4445 rm -rf conftest*
4446 eval "ac_cv_func_$ac_func=yes"
4447else
4448 echo "configure: failed program was:" >&5
4449 cat conftest.$ac_ext >&5
4450 rm -rf conftest*
4451 eval "ac_cv_func_$ac_func=no"
4452fi
4453rm -f conftest*
4454fi
4455
4456if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4457 echo "$ac_t""yes" 1>&6
4458 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4459 cat >> confdefs.h <<EOF
4460#define $ac_tr_func 1
4461EOF
4462
4463 cat >> confdefs.h <<\EOF
4464#define HAVE_GETHOSTBYADDR_R 1
4465EOF
4466
4467 # There are two different kinds of gethostbyaddr_r.
4468 # We look for the one that returns `int'.
4469 # Hopefully this check is robust enough.
4470 cat > conftest.$ac_ext <<EOF
4471#line 4472 "configure"
4472#include "confdefs.h"
4473#include <netdb.h>
4474EOF
4475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4476 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
4477 rm -rf conftest*
4478
4479 cat >> confdefs.h <<\EOF
4480#define GETHOSTBYADDR_R_RETURNS_INT 1
4481EOF
4482
4483fi
4484rm -f conftest*
4485
4486else
4487 echo "$ac_t""no" 1>&6
4488fi
4489done
4490
4491fi
4492rm -f conftest*
4493
4494
4495 for ac_func in gethostname
4496do
4497echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4498echo "configure:4499: checking for $ac_func" >&5
4499if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4500 echo $ac_n "(cached) $ac_c" 1>&6
4501else
4502 cat > conftest.$ac_ext <<EOF
4503#line 4504 "configure"
4504#include "confdefs.h"
4505/* System header to define __stub macros and hopefully few prototypes,
4506 which can conflict with char $ac_func(); below. */
4507#include <assert.h>
4508/* Override any gcc2 internal prototype to avoid an error. */
4509/* We use char because int might match the return type of a gcc2
4510 builtin and then its argument prototype would still apply. */
4511char $ac_func();
4512
4513int main() {
4514
4515/* The GNU C library defines this for functions which it implements
4516 to always fail with ENOSYS. Some functions are actually named
4517 something starting with __ and the normal name is an alias. */
4518#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4519choke me
4520#else
4521$ac_func();
4522#endif
4523
4524; return 0; }
4525EOF
4526if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4527 rm -rf conftest*
4528 eval "ac_cv_func_$ac_func=yes"
4529else
4530 echo "configure: failed program was:" >&5
4531 cat conftest.$ac_ext >&5
4532 rm -rf conftest*
4533 eval "ac_cv_func_$ac_func=no"
4534fi
4535rm -f conftest*
4536fi
4537
4538if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4539 echo "$ac_t""yes" 1>&6
4540 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4541 cat >> confdefs.h <<EOF
4542#define $ac_tr_func 1
4543EOF
4544
4545 cat >> confdefs.h <<\EOF
4546#define HAVE_GETHOSTNAME 1
4547EOF
4548
4549 cat > conftest.$ac_ext <<EOF
4550#line 4551 "configure"
4551#include "confdefs.h"
4552#include <unistd.h>
4553EOF
4554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4555 egrep "gethostname" >/dev/null 2>&1; then
4556 rm -rf conftest*
4557
4558 cat >> confdefs.h <<\EOF
4559#define HAVE_GETHOSTNAME_DECL 1
4560EOF
4561
4562fi
4563rm -f conftest*
4564
4565else
4566 echo "$ac_t""no" 1>&6
4567fi
4568done
4569
4570
4571 # Look for these functions in the thread library, but only bother
4572 # if using POSIX threads.
4573 if test "$THREADS" = posix; then
4574 save_LIBS="$LIBS"
4575 LIBS="$LIBS $THREADLIBS"
4576 # Some POSIX thread systems don't have pthread_mutexattr_settype.
4577 # E.g., Solaris.
4578 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
4579do
4580echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4581echo "configure:4582: checking for $ac_func" >&5
4582if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4583 echo $ac_n "(cached) $ac_c" 1>&6
4584else
4585 cat > conftest.$ac_ext <<EOF
4586#line 4587 "configure"
4587#include "confdefs.h"
4588/* System header to define __stub macros and hopefully few prototypes,
4589 which can conflict with char $ac_func(); below. */
4590#include <assert.h>
4591/* Override any gcc2 internal prototype to avoid an error. */
4592/* We use char because int might match the return type of a gcc2
4593 builtin and then its argument prototype would still apply. */
4594char $ac_func();
4595
4596int main() {
4597
4598/* The GNU C library defines this for functions which it implements
4599 to always fail with ENOSYS. Some functions are actually named
4600 something starting with __ and the normal name is an alias. */
4601#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4602choke me
4603#else
4604$ac_func();
4605#endif
4606
4607; return 0; }
4608EOF
4609if { (eval echo configure:4610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4610 rm -rf conftest*
4611 eval "ac_cv_func_$ac_func=yes"
4612else
4613 echo "configure: failed program was:" >&5
4614 cat conftest.$ac_ext >&5
4615 rm -rf conftest*
4616 eval "ac_cv_func_$ac_func=no"
4617fi
4618rm -f conftest*
4619fi
4620
4621if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4622 echo "$ac_t""yes" 1>&6
4623 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4624 cat >> confdefs.h <<EOF
4625#define $ac_tr_func 1
4626EOF
4627
4628else
4629 echo "$ac_t""no" 1>&6
4630fi
4631done
4632
4633
4634 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
4635 # Solaris 7 the name librt is preferred.
4636 for ac_func in sched_yield
4637do
4638echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4639echo "configure:4640: checking for $ac_func" >&5
4640if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4641 echo $ac_n "(cached) $ac_c" 1>&6
4642else
4643 cat > conftest.$ac_ext <<EOF
4644#line 4645 "configure"
4645#include "confdefs.h"
4646/* System header to define __stub macros and hopefully few prototypes,
4647 which can conflict with char $ac_func(); below. */
4648#include <assert.h>
4649/* Override any gcc2 internal prototype to avoid an error. */
4650/* We use char because int might match the return type of a gcc2
4651 builtin and then its argument prototype would still apply. */
4652char $ac_func();
4653
4654int main() {
4655
4656/* The GNU C library defines this for functions which it implements
4657 to always fail with ENOSYS. Some functions are actually named
4658 something starting with __ and the normal name is an alias. */
4659#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4660choke me
4661#else
4662$ac_func();
4663#endif
4664
4665; return 0; }
4666EOF
4667if { (eval echo configure:4668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4668 rm -rf conftest*
4669 eval "ac_cv_func_$ac_func=yes"
4670else
4671 echo "configure: failed program was:" >&5
4672 cat conftest.$ac_ext >&5
4673 rm -rf conftest*
4674 eval "ac_cv_func_$ac_func=no"
4675fi
4676rm -f conftest*
4677fi
4678
4679if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4680 echo "$ac_t""yes" 1>&6
4681 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4682 cat >> confdefs.h <<EOF
4683#define $ac_tr_func 1
4684EOF
4685
4686else
4687 echo "$ac_t""no" 1>&6
4688echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4689echo "configure:4690: checking for sched_yield in -lrt" >&5
4690ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4691if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4692 echo $ac_n "(cached) $ac_c" 1>&6
4693else
4694 ac_save_LIBS="$LIBS"
4695LIBS="-lrt $LIBS"
4696cat > conftest.$ac_ext <<EOF
4697#line 4698 "configure"
4698#include "confdefs.h"
4699/* Override any gcc2 internal prototype to avoid an error. */
4700/* We use char because int might match the return type of a gcc2
4701 builtin and then its argument prototype would still apply. */
4702char sched_yield();
4703
4704int main() {
4705sched_yield()
4706; return 0; }
4707EOF
4708if { (eval echo configure:4709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4709 rm -rf conftest*
4710 eval "ac_cv_lib_$ac_lib_var=yes"
4711else
4712 echo "configure: failed program was:" >&5
4713 cat conftest.$ac_ext >&5
4714 rm -rf conftest*
4715 eval "ac_cv_lib_$ac_lib_var=no"
4716fi
4717rm -f conftest*
4718LIBS="$ac_save_LIBS"
4719
4720fi
4721if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4722 echo "$ac_t""yes" 1>&6
4723
4724 cat >> confdefs.h <<\EOF
4725#define HAVE_SCHED_YIELD 1
4726EOF
4727
4728 THREADLIBS="$THREADLIBS -lrt"
4729 THREADSPEC="$THREADSPEC -lrt"
4730else
4731 echo "$ac_t""no" 1>&6
4732
4733 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
4734echo "configure:4735: checking for sched_yield in -lposix4" >&5
4735ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
4736if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4737 echo $ac_n "(cached) $ac_c" 1>&6
4738else
4739 ac_save_LIBS="$LIBS"
4740LIBS="-lposix4 $LIBS"
4741cat > conftest.$ac_ext <<EOF
4742#line 4743 "configure"
4743#include "confdefs.h"
4744/* Override any gcc2 internal prototype to avoid an error. */
4745/* We use char because int might match the return type of a gcc2
4746 builtin and then its argument prototype would still apply. */
4747char sched_yield();
4748
4749int main() {
4750sched_yield()
4751; return 0; }
4752EOF
4753if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754 rm -rf conftest*
4755 eval "ac_cv_lib_$ac_lib_var=yes"
4756else
4757 echo "configure: failed program was:" >&5
4758 cat conftest.$ac_ext >&5
4759 rm -rf conftest*
4760 eval "ac_cv_lib_$ac_lib_var=no"
4761fi
4762rm -f conftest*
4763LIBS="$ac_save_LIBS"
4764
4765fi
4766if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4767 echo "$ac_t""yes" 1>&6
4768
4769 cat >> confdefs.h <<\EOF
4770#define HAVE_SCHED_YIELD 1
4771EOF
4772
4773 THREADLIBS="$THREADLIBS -lposix4"
4774 THREADSPEC="$THREADSPEC -lposix4"
4775else
4776 echo "$ac_t""no" 1>&6
4777fi
4778
4779fi
4780
4781fi
4782done
4783
4784 LIBS="$save_LIBS"
4785
4786 # We can save a little space at runtime if the mutex has m_count
4787 # or __m_count. This is a nice hack for Linux.
4788 cat > conftest.$ac_ext <<EOF
4789#line 4790 "configure"
4790#include "confdefs.h"
4791#include <pthread.h>
4792int main() {
4793
4794 extern pthread_mutex_t *mutex; int q = mutex->m_count;
4795
4796; return 0; }
4797EOF
4798if { (eval echo configure:4799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4799 rm -rf conftest*
4800 cat >> confdefs.h <<\EOF
4801#define PTHREAD_MUTEX_HAVE_M_COUNT 1
4802EOF
4803
4804else
4805 echo "configure: failed program was:" >&5
4806 cat conftest.$ac_ext >&5
4807 rm -rf conftest*
4808
4809 cat > conftest.$ac_ext <<EOF
4810#line 4811 "configure"
4811#include "confdefs.h"
4812#include <pthread.h>
4813int main() {
4814
4815 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
4816
4817; return 0; }
4818EOF
4819if { (eval echo configure:4820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4820 rm -rf conftest*
4821 cat >> confdefs.h <<\EOF
4822#define PTHREAD_MUTEX_HAVE___M_COUNT 1
4823EOF
4824
4825else
4826 echo "configure: failed program was:" >&5
4827 cat conftest.$ac_ext >&5
4828fi
4829rm -f conftest*
4830fi
4831rm -f conftest*
4832 fi
4833
4834 # We require a way to get the time.
4835 time_found=no
4836 for ac_func in gettimeofday time ftime
4837do
4838echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4839echo "configure:4840: checking for $ac_func" >&5
4840if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4841 echo $ac_n "(cached) $ac_c" 1>&6
4842else
4843 cat > conftest.$ac_ext <<EOF
4844#line 4845 "configure"
4845#include "confdefs.h"
4846/* System header to define __stub macros and hopefully few prototypes,
4847 which can conflict with char $ac_func(); below. */
4848#include <assert.h>
4849/* Override any gcc2 internal prototype to avoid an error. */
4850/* We use char because int might match the return type of a gcc2
4851 builtin and then its argument prototype would still apply. */
4852char $ac_func();
4853
4854int main() {
4855
4856/* The GNU C library defines this for functions which it implements
4857 to always fail with ENOSYS. Some functions are actually named
4858 something starting with __ and the normal name is an alias. */
4859#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4860choke me
4861#else
4862$ac_func();
4863#endif
4864
4865; return 0; }
4866EOF
4867if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4868 rm -rf conftest*
4869 eval "ac_cv_func_$ac_func=yes"
4870else
4871 echo "configure: failed program was:" >&5
4872 cat conftest.$ac_ext >&5
4873 rm -rf conftest*
4874 eval "ac_cv_func_$ac_func=no"
4875fi
4876rm -f conftest*
4877fi
4878
4879if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4880 echo "$ac_t""yes" 1>&6
4881 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4882 cat >> confdefs.h <<EOF
4883#define $ac_tr_func 1
4884EOF
4885 time_found=yes
4886else
4887 echo "$ac_t""no" 1>&6
4888fi
4889done
4890
4891 if test "$time_found" = no; then
4892 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
4893 fi
4894
4895 for ac_func in memmove
4896do
4897echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4898echo "configure:4899: checking for $ac_func" >&5
4899if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4900 echo $ac_n "(cached) $ac_c" 1>&6
4901else
4902 cat > conftest.$ac_ext <<EOF
4903#line 4904 "configure"
4904#include "confdefs.h"
4905/* System header to define __stub macros and hopefully few prototypes,
4906 which can conflict with char $ac_func(); below. */
4907#include <assert.h>
4908/* Override any gcc2 internal prototype to avoid an error. */
4909/* We use char because int might match the return type of a gcc2
4910 builtin and then its argument prototype would still apply. */
4911char $ac_func();
4912
4913int main() {
4914
4915/* The GNU C library defines this for functions which it implements
4916 to always fail with ENOSYS. Some functions are actually named
4917 something starting with __ and the normal name is an alias. */
4918#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4919choke me
4920#else
4921$ac_func();
4922#endif
4923
4924; return 0; }
4925EOF
4926if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927 rm -rf conftest*
4928 eval "ac_cv_func_$ac_func=yes"
4929else
4930 echo "configure: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
4932 rm -rf conftest*
4933 eval "ac_cv_func_$ac_func=no"
4934fi
4935rm -f conftest*
4936fi
4937
4938if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4939 echo "$ac_t""yes" 1>&6
4940 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4941 cat >> confdefs.h <<EOF
4942#define $ac_tr_func 1
4943EOF
4944
4945else
4946 echo "$ac_t""no" 1>&6
4947fi
4948done
4949
4950
4951 # We require memcpy.
4952 memcpy_found=no
4953 for ac_func in memcpy
4954do
4955echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4956echo "configure:4957: checking for $ac_func" >&5
4957if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4958 echo $ac_n "(cached) $ac_c" 1>&6
4959else
4960 cat > conftest.$ac_ext <<EOF
4961#line 4962 "configure"
4962#include "confdefs.h"
4963/* System header to define __stub macros and hopefully few prototypes,
4964 which can conflict with char $ac_func(); below. */
4965#include <assert.h>
4966/* Override any gcc2 internal prototype to avoid an error. */
4967/* We use char because int might match the return type of a gcc2
4968 builtin and then its argument prototype would still apply. */
4969char $ac_func();
4970
4971int main() {
4972
4973/* The GNU C library defines this for functions which it implements
4974 to always fail with ENOSYS. Some functions are actually named
4975 something starting with __ and the normal name is an alias. */
4976#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4977choke me
4978#else
4979$ac_func();
4980#endif
4981
4982; return 0; }
4983EOF
4984if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985 rm -rf conftest*
4986 eval "ac_cv_func_$ac_func=yes"
4987else
4988 echo "configure: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4990 rm -rf conftest*
4991 eval "ac_cv_func_$ac_func=no"
4992fi
4993rm -f conftest*
4994fi
4995
4996if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4997 echo "$ac_t""yes" 1>&6
4998 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4999 cat >> confdefs.h <<EOF
5000#define $ac_tr_func 1
5001EOF
5002 memcpy_found=yes
5003else
5004 echo "$ac_t""no" 1>&6
5005fi
5006done
5007
5008 if test "$memcpy_found" = no; then
5009 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
5010 fi
5011
5012 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
5013echo "configure:5014: checking for dlopen in -ldl" >&5
5014ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
5015if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5016 echo $ac_n "(cached) $ac_c" 1>&6
5017else
5018 ac_save_LIBS="$LIBS"
5019LIBS="-ldl $LIBS"
5020cat > conftest.$ac_ext <<EOF
5021#line 5022 "configure"
5022#include "confdefs.h"
5023/* Override any gcc2 internal prototype to avoid an error. */
5024/* We use char because int might match the return type of a gcc2
5025 builtin and then its argument prototype would still apply. */
5026char dlopen();
5027
5028int main() {
5029dlopen()
5030; return 0; }
5031EOF
5032if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5033 rm -rf conftest*
5034 eval "ac_cv_lib_$ac_lib_var=yes"
5035else
5036 echo "configure: failed program was:" >&5
5037 cat conftest.$ac_ext >&5
5038 rm -rf conftest*
5039 eval "ac_cv_lib_$ac_lib_var=no"
5040fi
5041rm -f conftest*
5042LIBS="$ac_save_LIBS"
5043
5044fi
5045if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5046 echo "$ac_t""yes" 1>&6
5047
5048 cat >> confdefs.h <<\EOF
5049#define HAVE_DLOPEN 1
5050EOF
5051
5052else
5053 echo "$ac_t""no" 1>&6
5054fi
5055
5056
5057 # Some library-finding code we stole from Tcl.
5058 #--------------------------------------------------------------------
5059 # Check for the existence of the -lsocket and -lnsl libraries.
5060 # The order here is important, so that they end up in the right
5061 # order in the command line generated by make. Here are some
5062 # special considerations:
5063 # 1. Use "connect" and "accept" to check for -lsocket, and
5064 # "gethostbyname" to check for -lnsl.
5065 # 2. Use each function name only once: can't redo a check because
5066 # autoconf caches the results of the last check and won't redo it.
5067 # 3. Use -lnsl and -lsocket only if they supply procedures that
5068 # aren't already present in the normal libraries. This is because
5069 # IRIX 5.2 has libraries, but they aren't needed and they're
5070 # bogus: they goof up name resolution if used.
5071 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
5072 # To get around this problem, check for both libraries together
5073 # if -lsocket doesn't work by itself.
5074 #--------------------------------------------------------------------
5075
5076 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
5077echo "configure:5078: checking for socket libraries" >&5
5078if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
5079 echo $ac_n "(cached) $ac_c" 1>&6
5080else
5081 gcj_cv_lib_sockets=
5082 gcj_checkBoth=0
5083 unset ac_cv_func_connect
5084 echo $ac_n "checking for connect""... $ac_c" 1>&6
5085echo "configure:5086: checking for connect" >&5
5086if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5087 echo $ac_n "(cached) $ac_c" 1>&6
5088else
5089 cat > conftest.$ac_ext <<EOF
5090#line 5091 "configure"
5091#include "confdefs.h"
5092/* System header to define __stub macros and hopefully few prototypes,
5093 which can conflict with char connect(); below. */
5094#include <assert.h>
5095/* Override any gcc2 internal prototype to avoid an error. */
5096/* We use char because int might match the return type of a gcc2
5097 builtin and then its argument prototype would still apply. */
5098char connect();
5099
5100int main() {
5101
5102/* The GNU C library defines this for functions which it implements
5103 to always fail with ENOSYS. Some functions are actually named
5104 something starting with __ and the normal name is an alias. */
5105#if defined (__stub_connect) || defined (__stub___connect)
5106choke me
5107#else
5108connect();
5109#endif
5110
5111; return 0; }
5112EOF
5113if { (eval echo configure:5114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5114 rm -rf conftest*
5115 eval "ac_cv_func_connect=yes"
5116else
5117 echo "configure: failed program was:" >&5
5118 cat conftest.$ac_ext >&5
5119 rm -rf conftest*
5120 eval "ac_cv_func_connect=no"
5121fi
5122rm -f conftest*
5123fi
5124
5125if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5126 echo "$ac_t""yes" 1>&6
5127 gcj_checkSocket=0
5128else
5129 echo "$ac_t""no" 1>&6
5130gcj_checkSocket=1
5131fi
5132
5133 if test "$gcj_checkSocket" = 1; then
5134 unset ac_cv_func_connect
5135 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5136echo "configure:5137: checking for main in -lsocket" >&5
5137ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
5138if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5139 echo $ac_n "(cached) $ac_c" 1>&6
5140else
5141 ac_save_LIBS="$LIBS"
5142LIBS="-lsocket $LIBS"
5143cat > conftest.$ac_ext <<EOF
5144#line 5145 "configure"
5145#include "confdefs.h"
5146
5147int main() {
5148main()
5149; return 0; }
5150EOF
5151if { (eval echo configure:5152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5152 rm -rf conftest*
5153 eval "ac_cv_lib_$ac_lib_var=yes"
5154else
5155 echo "configure: failed program was:" >&5
5156 cat conftest.$ac_ext >&5
5157 rm -rf conftest*
5158 eval "ac_cv_lib_$ac_lib_var=no"
5159fi
5160rm -f conftest*
5161LIBS="$ac_save_LIBS"
5162
5163fi
5164if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5165 echo "$ac_t""yes" 1>&6
5166 gcj_cv_lib_sockets="-lsocket"
5167else
5168 echo "$ac_t""no" 1>&6
5169gcj_checkBoth=1
5170fi
5171
5172 fi
5173 if test "$gcj_checkBoth" = 1; then
5174 gcj_oldLibs=$LIBS
5175 LIBS="$LIBS -lsocket -lnsl"
5176 unset ac_cv_func_accept
5177 echo $ac_n "checking for accept""... $ac_c" 1>&6
5178echo "configure:5179: checking for accept" >&5
5179if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
5180 echo $ac_n "(cached) $ac_c" 1>&6
5181else
5182 cat > conftest.$ac_ext <<EOF
5183#line 5184 "configure"
5184#include "confdefs.h"
5185/* System header to define __stub macros and hopefully few prototypes,
5186 which can conflict with char accept(); below. */
5187#include <assert.h>
5188/* Override any gcc2 internal prototype to avoid an error. */
5189/* We use char because int might match the return type of a gcc2
5190 builtin and then its argument prototype would still apply. */
5191char accept();
5192
5193int main() {
5194
5195/* The GNU C library defines this for functions which it implements
5196 to always fail with ENOSYS. Some functions are actually named
5197 something starting with __ and the normal name is an alias. */
5198#if defined (__stub_accept) || defined (__stub___accept)
5199choke me
5200#else
5201accept();
5202#endif
5203
5204; return 0; }
5205EOF
5206if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5207 rm -rf conftest*
5208 eval "ac_cv_func_accept=yes"
5209else
5210 echo "configure: failed program was:" >&5
5211 cat conftest.$ac_ext >&5
5212 rm -rf conftest*
5213 eval "ac_cv_func_accept=no"
5214fi
5215rm -f conftest*
5216fi
5217
5218if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
5219 echo "$ac_t""yes" 1>&6
5220 gcj_checkNsl=0
5221 gcj_cv_lib_sockets="-lsocket -lnsl"
5222else
5223 echo "$ac_t""no" 1>&6
5224fi
5225
5226 unset ac_cv_func_accept
5227 LIBS=$gcj_oldLibs
5228 fi
5229 unset ac_cv_func_gethostbyname
5230 gcj_oldLibs=$LIBS
5231 LIBS="$LIBS $gcj_cv_lib_sockets"
5232 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5233echo "configure:5234: checking for gethostbyname" >&5
5234if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
5235 echo $ac_n "(cached) $ac_c" 1>&6
5236else
5237 cat > conftest.$ac_ext <<EOF
5238#line 5239 "configure"
5239#include "confdefs.h"
5240/* System header to define __stub macros and hopefully few prototypes,
5241 which can conflict with char gethostbyname(); below. */
5242#include <assert.h>
5243/* Override any gcc2 internal prototype to avoid an error. */
5244/* We use char because int might match the return type of a gcc2
5245 builtin and then its argument prototype would still apply. */
5246char gethostbyname();
5247
5248int main() {
5249
5250/* The GNU C library defines this for functions which it implements
5251 to always fail with ENOSYS. Some functions are actually named
5252 something starting with __ and the normal name is an alias. */
5253#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5254choke me
5255#else
5256gethostbyname();
5257#endif
5258
5259; return 0; }
5260EOF
5261if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5262 rm -rf conftest*
5263 eval "ac_cv_func_gethostbyname=yes"
5264else
5265 echo "configure: failed program was:" >&5
5266 cat conftest.$ac_ext >&5
5267 rm -rf conftest*
5268 eval "ac_cv_func_gethostbyname=no"
5269fi
5270rm -f conftest*
5271fi
5272
5273if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5274 echo "$ac_t""yes" 1>&6
5275 :
5276else
5277 echo "$ac_t""no" 1>&6
5278echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5279echo "configure:5280: checking for main in -lnsl" >&5
5280ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
5281if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5282 echo $ac_n "(cached) $ac_c" 1>&6
5283else
5284 ac_save_LIBS="$LIBS"
5285LIBS="-lnsl $LIBS"
5286cat > conftest.$ac_ext <<EOF
5287#line 5288 "configure"
5288#include "confdefs.h"
5289
5290int main() {
5291main()
5292; return 0; }
5293EOF
5294if { (eval echo configure:5295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5295 rm -rf conftest*
5296 eval "ac_cv_lib_$ac_lib_var=yes"
5297else
5298 echo "configure: failed program was:" >&5
5299 cat conftest.$ac_ext >&5
5300 rm -rf conftest*
5301 eval "ac_cv_lib_$ac_lib_var=no"
5302fi
5303rm -f conftest*
5304LIBS="$ac_save_LIBS"
5305
5306fi
5307if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5308 echo "$ac_t""yes" 1>&6
5309 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
5310else
5311 echo "$ac_t""no" 1>&6
5312fi
5313
5314fi
5315
5316 unset ac_cv_func_gethostbyname
5317 LIBS=$gcj_oldLIBS
5318
5319fi
5320
5321echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
5322 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
5323
5324 if test "$with_system_zlib" = yes; then
5325 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
5326echo "configure:5327: checking for deflate in -lz" >&5
5327ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
5328if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5329 echo $ac_n "(cached) $ac_c" 1>&6
5330else
5331 ac_save_LIBS="$LIBS"
5332LIBS="-lz $LIBS"
5333cat > conftest.$ac_ext <<EOF
5334#line 5335 "configure"
5335#include "confdefs.h"
5336/* Override any gcc2 internal prototype to avoid an error. */
5337/* We use char because int might match the return type of a gcc2
5338 builtin and then its argument prototype would still apply. */
5339char deflate();
5340
5341int main() {
5342deflate()
5343; return 0; }
5344EOF
5345if { (eval echo configure:5346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5346 rm -rf conftest*
5347 eval "ac_cv_lib_$ac_lib_var=yes"
5348else
5349 echo "configure: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 rm -rf conftest*
5352 eval "ac_cv_lib_$ac_lib_var=no"
5353fi
5354rm -f conftest*
5355LIBS="$ac_save_LIBS"
5356
5357fi
5358if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5359 echo "$ac_t""yes" 1>&6
5360 ZLIBSPEC=-lz
5361else
5362 echo "$ac_t""no" 1>&6
5363ZLIBSPEC=
5364fi
5365
5366 fi
5367
5368 # On Solaris, and maybe other architectures, the Boehm collector
5369 # requires -ldl.
5370 if test "$GC" = boehm; then
5371 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
5372echo "configure:5373: checking for main in -ldl" >&5
5373ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
5374if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5375 echo $ac_n "(cached) $ac_c" 1>&6
5376else
5377 ac_save_LIBS="$LIBS"
5378LIBS="-ldl $LIBS"
5379cat > conftest.$ac_ext <<EOF
5380#line 5381 "configure"
5381#include "confdefs.h"
5382
5383int main() {
5384main()
5385; return 0; }
5386EOF
5387if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5388 rm -rf conftest*
5389 eval "ac_cv_lib_$ac_lib_var=yes"
5390else
5391 echo "configure: failed program was:" >&5
5392 cat conftest.$ac_ext >&5
5393 rm -rf conftest*
5394 eval "ac_cv_lib_$ac_lib_var=no"
5395fi
5396rm -f conftest*
5397LIBS="$ac_save_LIBS"
5398
5399fi
5400if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5401 echo "$ac_t""yes" 1>&6
5402 SYSTEMSPEC="$SYSTEMSPEC -ldl"
5403else
5404 echo "$ac_t""no" 1>&6
5405fi
5406
5407 fi
5408
5409 if test -z "${with_multisubdir}"; then
5410 builddotdot=.
5411 else
5412
5413 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
5414
5415 fi
5416 if test -x "${builddotdot}/../../gcc/gcj"; then
5417 dir="`cd ${builddotdot}/../../gcc && pwd`"
5418 GCJ="$dir/gcj -B`pwd`/ -B$dir/"
5419 else
5420 CANADIAN=yes
5421 NULL_TARGET=yes
5422 GCJ="gcj -B`pwd`/"
5423 fi
5424fi
5425
5426# Create it, so that compile/link tests don't fail
5427test -f libgcj.spec || touch libgcj.spec
5428
5429# We must search the source tree for java.lang, since we still don't
5430# have libgcj.jar nor java/lang/*.class
5431GCJ_SAVE_CPPFLAGS=$CPPFLAGS
5432CPPFLAGS="$CPPFLAGS -I`pwd` -I`cd $srcdir && pwd`"
5433
5434# Since some classes depend on this one, we need its source available
5435# before we can do any GCJ compilation test :-(
5436if test ! -f gnu/classpath/Configuration.java; then
5437 test -d gnu || mkdir gnu
5438 test -d gnu/classpath || mkdir gnu/classpath
5439 sed 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
5440 < $srcdir/gnu/classpath/Configuration.java.in \
5441 > gnu/classpath/Configuration.java
5442 # We do not want to redirect the output of the grep below to /dev/null,
5443 # but we add /dev/null to the input list so that grep will print the
5444 # filename of Configuration.java in case it finds any matches.
5445 if grep @ gnu/classpath/Configuration.java /dev/null; then
5446 { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
5447 fi
5448fi
5449
5450# Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
5451set dummy ${ac_tool_prefix}gcj; ac_word=$2
5452echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5453echo "configure:5454: checking for $ac_word" >&5
5454if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5455 echo $ac_n "(cached) $ac_c" 1>&6
5456else
5457 if test -n "$GCJ"; then
5458 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5459else
5460 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5461 ac_dummy="$PATH"
5462 for ac_dir in $ac_dummy; do
5463 test -z "$ac_dir" && ac_dir=.
5464 if test -f $ac_dir/$ac_word; then
5465 ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
5466 break
5467 fi
5468 done
5469 IFS="$ac_save_ifs"
5470fi
5471fi
5472GCJ="$ac_cv_prog_GCJ"
5473if test -n "$GCJ"; then
5474 echo "$ac_t""$GCJ" 1>&6
5475else
5476 echo "$ac_t""no" 1>&6
5477fi
5478
5479
5480if test -z "$ac_cv_prog_GCJ"; then
5481if test -n "$ac_tool_prefix"; then
5482 # Extract the first word of "gcj", so it can be a program name with args.
5483set dummy gcj; ac_word=$2
5484echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5485echo "configure:5486: checking for $ac_word" >&5
5486if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5487 echo $ac_n "(cached) $ac_c" 1>&6
5488else
5489 if test -n "$GCJ"; then
5490 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5491else
5492 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5493 ac_dummy="$PATH"
5494 for ac_dir in $ac_dummy; do
5495 test -z "$ac_dir" && ac_dir=.
5496 if test -f $ac_dir/$ac_word; then
5497 ac_cv_prog_GCJ="gcj"
5498 break
5499 fi
5500 done
5501 IFS="$ac_save_ifs"
5502 test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
5503fi
5504fi
5505GCJ="$ac_cv_prog_GCJ"
5506if test -n "$GCJ"; then
5507 echo "$ac_t""$GCJ" 1>&6
5508else
5509 echo "$ac_t""no" 1>&6
5510fi
5511
5512else
5513 GCJ="no"
5514fi
5515fi
5516
5517 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5518
5519
5520
5521LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
5522lt_save_CC="$CC"
5523lt_save_CFLAGS="$CFLAGS"
5524AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
5525MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
5526LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
5527AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
5528objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
5529deplibs_check_method="$deplibs_check_method" \
5530file_magic_cmd="$file_magic_cmd" \
5531${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
5532--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
5533|| { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
5534CC="$lt_save_CC"
5535CFLAGS="$lt_save_CFLAGS"
5536
5537# Redirect the config.log output again, so that the ltconfig log is not
5538# clobbered by the next message.
5539exec 5>>./config.log
5540
5541
5542
5543
5544CPPFLAGS=$GCJ_SAVE_CPPFLAGS
5545
5546echo $ac_n "checking size of void *""... $ac_c" 1>&6
5547echo "configure:5548: checking size of void *" >&5
5548if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
5549 echo $ac_n "(cached) $ac_c" 1>&6
5550else
5551 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
5552 cat > conftest.$ac_ext <<EOF
5553#line 5554 "configure"
5554#include "confdefs.h"
5555#include "confdefs.h"
5556#include <sys/types.h>
5557
5558
5559int main() {
5560switch (0) case 0: case (sizeof (void *) == $ac_size):;
5561; return 0; }
5562EOF
5563if { (eval echo configure:5564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5564 rm -rf conftest*
5565 ac_cv_sizeof_void_p=$ac_size
5566else
5567 echo "configure: failed program was:" >&5
5568 cat conftest.$ac_ext >&5
5569fi
5570rm -f conftest*
5571 if test x$ac_cv_sizeof_void_p != x ; then break; fi
5572done
5573
5574fi
5575
5576if test x$ac_cv_sizeof_void_p = x ; then
5577 { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
5578fi
5579echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
5580cat >> confdefs.h <<EOF
5581#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
5582EOF
5583
5584
5585
5586ZLIBS=
5587SYS_ZLIBS=
5588ZINCS=
5589
5590if test -z "$ZLIBSPEC"; then
5591 # Use zlib from the GCC tree.
5592 ZINCS='-I$(top_srcdir)/../zlib'
5593 ZLIBS=../zlib/libzgcj_convenience.la
5594else
5595 # System's zlib.
5596 SYS_ZLIBS="$ZLIBSPEC"
5597fi
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607if test "$CANADIAN" = yes; then
5608 CANADIAN_TRUE=
5609 CANADIAN_FALSE='#'
5610else
5611 CANADIAN_TRUE='#'
5612 CANADIAN_FALSE=
5613fi
5614
5615
5616if test "$NULL_TARGET" = yes; then
5617 NULL_TARGET_TRUE=
5618 NULL_TARGET_FALSE='#'
5619else
5620 NULL_TARGET_TRUE='#'
5621 NULL_TARGET_FALSE=
5622fi
5623
5624
5625if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
5626 NATIVE_TRUE=
5627 NATIVE_FALSE='#'
5628else
5629 NATIVE_TRUE='#'
5630 NATIVE_FALSE=
5631fi
5632
5633
5634if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
5635 NEEDS_DATA_START_TRUE=
5636 NEEDS_DATA_START_FALSE='#'
5637else
5638 NEEDS_DATA_START_TRUE='#'
5639 NEEDS_DATA_START_FALSE=
5640fi
5641
5642
5643if test -n "$with_cross_host" &&
5644 test x"$with_cross_host" != x"no"; then
5645 toolexecdir='$(exec_prefix)/$(target_alias)'
5646 toolexecmainlibdir='$(toolexecdir)/lib'
5647else
5648 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
5649 toolexecmainlibdir='$(libdir)'
5650fi
5651toolexeclibdir=$toolexecmainlibdir/`$CC -print-multi-os-directory`
5652
5653
5654
5655
5656
5657
5658# Determine gcj version number.
5659
5660gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
5661
5662GCJVERSION=$gcjversion
5663
5664cat >> confdefs.h <<EOF
5665#define GCJVERSION "$GCJVERSION"
5666EOF
5667
5668
5669echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
5670echo "configure:5671: checking for g++ -ffloat-store bug" >&5
5671save_CFLAGS="$CFLAGS"
5672CFLAGS="-x c++ -O2 -ffloat-store"
5673cat > conftest.$ac_ext <<EOF
5674#line 5675 "configure"
5675#include "confdefs.h"
5676#include <math.h>
5677int main() {
5678
5679; return 0; }
5680EOF
5681if { (eval echo configure:5682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5682 rm -rf conftest*
5683 echo "$ac_t""no" 1>&6
5684else
5685 echo "configure: failed program was:" >&5
5686 cat conftest.$ac_ext >&5
5687 rm -rf conftest*
5688 cat >> confdefs.h <<\EOF
5689#define __NO_MATH_INLINES 1
5690EOF
5691
5692 echo "$ac_t""yes" 1>&6
5693fi
5694rm -f conftest*
5695CFLAGS="$save_CFLAGS"
5696
5697for 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 stdint.h langinfo.h locale.h
5698do
5699ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5700echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5701echo "configure:5702: checking for $ac_hdr" >&5
5702if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5703 echo $ac_n "(cached) $ac_c" 1>&6
5704else
5705 cat > conftest.$ac_ext <<EOF
5706#line 5707 "configure"
5707#include "confdefs.h"
5708#include <$ac_hdr>
5709EOF
5710ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5711{ (eval echo configure:5712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5712ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5713if test -z "$ac_err"; then
5714 rm -rf conftest*
5715 eval "ac_cv_header_$ac_safe=yes"
5716else
5717 echo "$ac_err" >&5
5718 echo "configure: failed program was:" >&5
5719 cat conftest.$ac_ext >&5
5720 rm -rf conftest*
5721 eval "ac_cv_header_$ac_safe=no"
5722fi
5723rm -f conftest*
5724fi
5725if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5726 echo "$ac_t""yes" 1>&6
5727 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5728 cat >> confdefs.h <<EOF
5729#define $ac_tr_hdr 1
5730EOF
5731
5732else
5733 echo "$ac_t""no" 1>&6
5734fi
5735done
5736
5737for ac_hdr in dirent.h
5738do
5739ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5740echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5741echo "configure:5742: checking for $ac_hdr" >&5
5742if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5743 echo $ac_n "(cached) $ac_c" 1>&6
5744else
5745 cat > conftest.$ac_ext <<EOF
5746#line 5747 "configure"
5747#include "confdefs.h"
5748#include <$ac_hdr>
5749EOF
5750ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5751{ (eval echo configure:5752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5752ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5753if test -z "$ac_err"; then
5754 rm -rf conftest*
5755 eval "ac_cv_header_$ac_safe=yes"
5756else
5757 echo "$ac_err" >&5
5758 echo "configure: failed program was:" >&5
5759 cat conftest.$ac_ext >&5
5760 rm -rf conftest*
5761 eval "ac_cv_header_$ac_safe=no"
5762fi
5763rm -f conftest*
5764fi
5765if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5766 echo "$ac_t""yes" 1>&6
5767 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5768 cat >> confdefs.h <<EOF
5769#define $ac_tr_hdr 1
5770EOF
5771
5772else
5773 echo "$ac_t""no" 1>&6
5774fi
5775done
5776
5777for ac_hdr in inttypes.h
5778do
5779ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5780echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5781echo "configure:5782: checking for $ac_hdr" >&5
5782if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5783 echo $ac_n "(cached) $ac_c" 1>&6
5784else
5785 cat > conftest.$ac_ext <<EOF
5786#line 5787 "configure"
5787#include "confdefs.h"
5788#include <$ac_hdr>
5789EOF
5790ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5791{ (eval echo configure:5792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5792ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5793if test -z "$ac_err"; then
5794 rm -rf conftest*
5795 eval "ac_cv_header_$ac_safe=yes"
5796else
5797 echo "$ac_err" >&5
5798 echo "configure: failed program was:" >&5
5799 cat conftest.$ac_ext >&5
5800 rm -rf conftest*
5801 eval "ac_cv_header_$ac_safe=no"
5802fi
5803rm -f conftest*
5804fi
5805if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5806 echo "$ac_t""yes" 1>&6
5807 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5808 cat >> confdefs.h <<EOF
5809#define $ac_tr_hdr 1
5810EOF
5811
5812 cat >> confdefs.h <<\EOF
5813#define HAVE_INTTYPES_H 1
5814EOF
5815
5816 cat >> confdefs.h <<\EOF
5817#define JV_HAVE_INTTYPES_H 1
5818EOF
5819
5820
5821else
5822 echo "$ac_t""no" 1>&6
5823fi
5824done
5825
5826echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5827echo "configure:5828: checking for sys/wait.h that is POSIX.1 compatible" >&5
5828if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5829 echo $ac_n "(cached) $ac_c" 1>&6
5830else
5831 cat > conftest.$ac_ext <<EOF
5832#line 5833 "configure"
5833#include "confdefs.h"
5834#include <sys/types.h>
5835#include <sys/wait.h>
5836#ifndef WEXITSTATUS
5837#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5838#endif
5839#ifndef WIFEXITED
5840#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5841#endif
5842int main() {
5843int s;
5844wait (&s);
5845s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5846; return 0; }
5847EOF
5848if { (eval echo configure:5849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5849 rm -rf conftest*
5850 ac_cv_header_sys_wait_h=yes
5851else
5852 echo "configure: failed program was:" >&5
5853 cat conftest.$ac_ext >&5
5854 rm -rf conftest*
5855 ac_cv_header_sys_wait_h=no
5856fi
5857rm -f conftest*
5858fi
5859
5860echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5861if test $ac_cv_header_sys_wait_h = yes; then
5862 cat >> confdefs.h <<\EOF
5863#define HAVE_SYS_WAIT_H 1
5864EOF
5865
5866fi
5867
5868
5869echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5870echo "configure:5871: checking for ANSI C header files" >&5
5871if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5872 echo $ac_n "(cached) $ac_c" 1>&6
5873else
5874 cat > conftest.$ac_ext <<EOF
5875#line 5876 "configure"
5876#include "confdefs.h"
5877#include <stdlib.h>
5878#include <stdarg.h>
5879#include <string.h>
5880#include <float.h>
5881EOF
5882ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5883{ (eval echo configure:5884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5884ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5885if test -z "$ac_err"; then
5886 rm -rf conftest*
5887 ac_cv_header_stdc=yes
5888else
5889 echo "$ac_err" >&5
5890 echo "configure: failed program was:" >&5
5891 cat conftest.$ac_ext >&5
5892 rm -rf conftest*
5893 ac_cv_header_stdc=no
5894fi
5895rm -f conftest*
5896
5897if test $ac_cv_header_stdc = yes; then
5898 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5899cat > conftest.$ac_ext <<EOF
5900#line 5901 "configure"
5901#include "confdefs.h"
5902#include <string.h>
5903EOF
5904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5905 egrep "memchr" >/dev/null 2>&1; then
5906 :
5907else
5908 rm -rf conftest*
5909 ac_cv_header_stdc=no
5910fi
5911rm -f conftest*
5912
5913fi
5914
5915if test $ac_cv_header_stdc = yes; then
5916 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5917cat > conftest.$ac_ext <<EOF
5918#line 5919 "configure"
5919#include "confdefs.h"
5920#include <stdlib.h>
5921EOF
5922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5923 egrep "free" >/dev/null 2>&1; then
5924 :
5925else
5926 rm -rf conftest*
5927 ac_cv_header_stdc=no
5928fi
5929rm -f conftest*
5930
5931fi
5932
5933if test $ac_cv_header_stdc = yes; then
5934 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5935if test "$cross_compiling" = yes; then
5936 :
5937else
5938 cat > conftest.$ac_ext <<EOF
5939#line 5940 "configure"
5940#include "confdefs.h"
5941#include <ctype.h>
5942#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5943#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5944#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5945int main () { int i; for (i = 0; i < 256; i++)
5946if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5947exit (0); }
5948
5949EOF
5950if { (eval echo configure:5951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5951then
5952 :
5953else
5954 echo "configure: failed program was:" >&5
5955 cat conftest.$ac_ext >&5
5956 rm -fr conftest*
5957 ac_cv_header_stdc=no
5958fi
5959rm -fr conftest*
5960fi
5961
5962fi
5963fi
5964
5965echo "$ac_t""$ac_cv_header_stdc" 1>&6
5966if test $ac_cv_header_stdc = yes; then
5967 cat >> confdefs.h <<\EOF
5968#define STDC_HEADERS 1
5969EOF
5970
5971fi
5972
5973echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5974echo "configure:5975: checking for ssize_t" >&5
5975if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5976 echo $ac_n "(cached) $ac_c" 1>&6
5977else
5978 cat > conftest.$ac_ext <<EOF
5979#line 5980 "configure"
5980#include "confdefs.h"
5981#include <sys/types.h>
5982#if STDC_HEADERS
5983#include <stdlib.h>
5984#include <stddef.h>
5985#endif
5986EOF
5987if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5988 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5989 rm -rf conftest*
5990 ac_cv_type_ssize_t=yes
5991else
5992 rm -rf conftest*
5993 ac_cv_type_ssize_t=no
5994fi
5995rm -f conftest*
5996
5997fi
5998echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5999if test $ac_cv_type_ssize_t = no; then
6000 cat >> confdefs.h <<\EOF
6001#define ssize_t int
6002EOF
6003
6004fi
6005
6006
6007echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
6008echo "configure:6009: checking for in_addr_t" >&5
6009cat > conftest.$ac_ext <<EOF
6010#line 6011 "configure"
6011#include "confdefs.h"
6012#include <sys/types.h>
6013#if STDC_HEADERS
6014#include <stdlib.h>
6015#include <stddef.h>
6016#endif
6017#if HAVE_NETINET_IN_H
6018#include <netinet/in.h>
6019#endif
6020int main() {
6021in_addr_t foo;
6022; return 0; }
6023EOF
6024if { (eval echo configure:6025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6025 rm -rf conftest*
6026 cat >> confdefs.h <<\EOF
6027#define HAVE_IN_ADDR_T 1
6028EOF
6029
6030 echo "$ac_t""yes" 1>&6
6031else
6032 echo "configure: failed program was:" >&5
6033 cat conftest.$ac_ext >&5
6034 rm -rf conftest*
6035 echo "$ac_t""no" 1>&6
6036fi
6037rm -f conftest*
6038
6039echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
6040echo "configure:6041: checking whether struct ip_mreq is in netinet/in.h" >&5
6041cat > conftest.$ac_ext <<EOF
6042#line 6043 "configure"
6043#include "confdefs.h"
6044#include <netinet/in.h>
6045int main() {
6046struct ip_mreq mreq;
6047; return 0; }
6048EOF
6049if { (eval echo configure:6050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6050 rm -rf conftest*
6051 cat >> confdefs.h <<\EOF
6052#define HAVE_STRUCT_IP_MREQ 1
6053EOF
6054
6055 echo "$ac_t""yes" 1>&6
6056else
6057 echo "configure: failed program was:" >&5
6058 cat conftest.$ac_ext >&5
6059 rm -rf conftest*
6060 echo "$ac_t""no" 1>&6
6061fi
6062rm -f conftest*
6063
6064echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
6065echo "configure:6066: checking whether struct ipv6_mreq is in netinet/in.h" >&5
6066cat > conftest.$ac_ext <<EOF
6067#line 6068 "configure"
6068#include "confdefs.h"
6069#include <netinet/in.h>
6070int main() {
6071struct ipv6_mreq mreq6;
6072; return 0; }
6073EOF
6074if { (eval echo configure:6075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6075 rm -rf conftest*
6076 cat >> confdefs.h <<\EOF
6077#define HAVE_STRUCT_IPV6_MREQ 1
6078EOF
6079
6080 echo "$ac_t""yes" 1>&6
6081else
6082 echo "configure: failed program was:" >&5
6083 cat conftest.$ac_ext >&5
6084 rm -rf conftest*
6085 echo "$ac_t""no" 1>&6
6086fi
6087rm -f conftest*
6088
6089echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
6090echo "configure:6091: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
6091cat > conftest.$ac_ext <<EOF
6092#line 6093 "configure"
6093#include "confdefs.h"
6094#include <netinet/in.h>
6095int main() {
6096struct sockaddr_in6 addr6;
6097; return 0; }
6098EOF
6099if { (eval echo configure:6100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6100 rm -rf conftest*
6101 cat >> confdefs.h <<\EOF
6102#define HAVE_INET6 1
6103EOF
6104
6105 echo "$ac_t""yes" 1>&6
6106else
6107 echo "configure: failed program was:" >&5
6108 cat conftest.$ac_ext >&5
6109 rm -rf conftest*
6110 echo "$ac_t""no" 1>&6
6111fi
6112rm -f conftest*
6113
6114echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
6115echo "configure:6116: checking for socklen_t in sys/socket.h" >&5
6116cat > conftest.$ac_ext <<EOF
6117#line 6118 "configure"
6118#include "confdefs.h"
6119#define _POSIX_PII_SOCKET
6120#include <sys/types.h>
6121#include <sys/socket.h>
6122int main() {
6123socklen_t x = 5;
6124; return 0; }
6125EOF
6126if { (eval echo configure:6127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6127 rm -rf conftest*
6128 cat >> confdefs.h <<\EOF
6129#define HAVE_SOCKLEN_T 1
6130EOF
6131
6132 echo "$ac_t""yes" 1>&6
6133else
6134 echo "configure: failed program was:" >&5
6135 cat conftest.$ac_ext >&5
6136 rm -rf conftest*
6137 echo "$ac_t""no" 1>&6
6138fi
6139rm -f conftest*
6140
6141echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
6142echo "configure:6143: checking for tm_gmtoff in struct tm" >&5
6143cat > conftest.$ac_ext <<EOF
6144#line 6145 "configure"
6145#include "confdefs.h"
6146#include <time.h>
6147int main() {
6148struct tm tim; tim.tm_gmtoff = 0;
6149; return 0; }
6150EOF
6151if { (eval echo configure:6152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6152 rm -rf conftest*
6153 cat >> confdefs.h <<\EOF
6154#define STRUCT_TM_HAS_GMTOFF 1
6155EOF
6156
6157 echo "$ac_t""yes" 1>&6
6158else
6159 echo "configure: failed program was:" >&5
6160 cat conftest.$ac_ext >&5
6161 rm -rf conftest*
6162 echo "$ac_t""no" 1>&6
6163 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
6164echo "configure:6165: checking for global timezone variable" >&5
6165 cat > conftest.$ac_ext <<EOF
6166#line 6167 "configure"
6167#include "confdefs.h"
6168#include <time.h>
6169int main() {
6170long z2 = timezone;
6171; return 0; }
6172EOF
6173if { (eval echo configure:6174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6174 rm -rf conftest*
6175 cat >> confdefs.h <<\EOF
6176#define HAVE_TIMEZONE 1
6177EOF
6178
6179 echo "$ac_t""yes" 1>&6
6180else
6181 echo "configure: failed program was:" >&5
6182 cat conftest.$ac_ext >&5
6183 rm -rf conftest*
6184 echo "$ac_t""no" 1>&6
6185fi
6186rm -f conftest*
6187fi
6188rm -f conftest*
6189
6190# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6191# for constant arguments. Useless!
6192echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6193echo "configure:6194: checking for working alloca.h" >&5
6194if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6195 echo $ac_n "(cached) $ac_c" 1>&6
6196else
6197 cat > conftest.$ac_ext <<EOF
6198#line 6199 "configure"
6199#include "confdefs.h"
6200#include <alloca.h>
6201int main() {
6202char *p = alloca(2 * sizeof(int));
6203; return 0; }
6204EOF
6205if { (eval echo configure:6206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6206 rm -rf conftest*
6207 ac_cv_header_alloca_h=yes
6208else
6209 echo "configure: failed program was:" >&5
6210 cat conftest.$ac_ext >&5
6211 rm -rf conftest*
6212 ac_cv_header_alloca_h=no
6213fi
6214rm -f conftest*
6215fi
6216
6217echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6218if test $ac_cv_header_alloca_h = yes; then
6219 cat >> confdefs.h <<\EOF
6220#define HAVE_ALLOCA_H 1
6221EOF
6222
6223fi
6224
6225echo $ac_n "checking for alloca""... $ac_c" 1>&6
6226echo "configure:6227: checking for alloca" >&5
6227if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6228 echo $ac_n "(cached) $ac_c" 1>&6
6229else
6230 cat > conftest.$ac_ext <<EOF
6231#line 6232 "configure"
6232#include "confdefs.h"
6233
6234#ifdef __GNUC__
6235# define alloca __builtin_alloca
6236#else
6237# ifdef _MSC_VER
6238# include <malloc.h>
6239# define alloca _alloca
6240# else
6241# if HAVE_ALLOCA_H
6242# include <alloca.h>
6243# else
6244# ifdef _AIX
6245 #pragma alloca
6246# else
6247# ifndef alloca /* predefined by HP cc +Olibcalls */
6248char *alloca ();
6249# endif
6250# endif
6251# endif
6252# endif
6253#endif
6254
6255int main() {
6256char *p = (char *) alloca(1);
6257; return 0; }
6258EOF
6259if { (eval echo configure:6260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6260 rm -rf conftest*
6261 ac_cv_func_alloca_works=yes
6262else
6263 echo "configure: failed program was:" >&5
6264 cat conftest.$ac_ext >&5
6265 rm -rf conftest*
6266 ac_cv_func_alloca_works=no
6267fi
6268rm -f conftest*
6269fi
6270
6271echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6272if test $ac_cv_func_alloca_works = yes; then
6273 cat >> confdefs.h <<\EOF
6274#define HAVE_ALLOCA 1
6275EOF
6276
6277fi
6278
6279if test $ac_cv_func_alloca_works = no; then
6280 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6281 # that cause trouble. Some versions do not even contain alloca or
6282 # contain a buggy version. If you still want to use their alloca,
6283 # use ar to extract alloca.o from them instead of compiling alloca.c.
6284 ALLOCA=alloca.${ac_objext}
6285 cat >> confdefs.h <<\EOF
6286#define C_ALLOCA 1
6287EOF
6288
6289
6290echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6291echo "configure:6292: checking whether alloca needs Cray hooks" >&5
6292if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6293 echo $ac_n "(cached) $ac_c" 1>&6
6294else
6295 cat > conftest.$ac_ext <<EOF
6296#line 6297 "configure"
6297#include "confdefs.h"
6298#if defined(CRAY) && ! defined(CRAY2)
6299webecray
6300#else
6301wenotbecray
6302#endif
6303
6304EOF
6305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6306 egrep "webecray" >/dev/null 2>&1; then
6307 rm -rf conftest*
6308 ac_cv_os_cray=yes
6309else
6310 rm -rf conftest*
6311 ac_cv_os_cray=no
6312fi
6313rm -f conftest*
6314
6315fi
6316
6317echo "$ac_t""$ac_cv_os_cray" 1>&6
6318if test $ac_cv_os_cray = yes; then
6319for ac_func in _getb67 GETB67 getb67; do
6320 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6321echo "configure:6322: checking for $ac_func" >&5
6322if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6323 echo $ac_n "(cached) $ac_c" 1>&6
6324else
6325 cat > conftest.$ac_ext <<EOF
6326#line 6327 "configure"
6327#include "confdefs.h"
6328/* System header to define __stub macros and hopefully few prototypes,
6329 which can conflict with char $ac_func(); below. */
6330#include <assert.h>
6331/* Override any gcc2 internal prototype to avoid an error. */
6332/* We use char because int might match the return type of a gcc2
6333 builtin and then its argument prototype would still apply. */
6334char $ac_func();
6335
6336int main() {
6337
6338/* The GNU C library defines this for functions which it implements
6339 to always fail with ENOSYS. Some functions are actually named
6340 something starting with __ and the normal name is an alias. */
6341#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6342choke me
6343#else
6344$ac_func();
6345#endif
6346
6347; return 0; }
6348EOF
6349if { (eval echo configure:6350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6350 rm -rf conftest*
6351 eval "ac_cv_func_$ac_func=yes"
6352else
6353 echo "configure: failed program was:" >&5
6354 cat conftest.$ac_ext >&5
6355 rm -rf conftest*
6356 eval "ac_cv_func_$ac_func=no"
6357fi
6358rm -f conftest*
6359fi
6360
6361if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6362 echo "$ac_t""yes" 1>&6
6363 cat >> confdefs.h <<EOF
6364#define CRAY_STACKSEG_END $ac_func
6365EOF
6366
6367 break
6368else
6369 echo "$ac_t""no" 1>&6
6370fi
6371
6372done
6373fi
6374
6375echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6376echo "configure:6377: checking stack direction for C alloca" >&5
6377if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6378 echo $ac_n "(cached) $ac_c" 1>&6
6379else
6380 if test "$cross_compiling" = yes; then
6381 ac_cv_c_stack_direction=0
6382else
6383 cat > conftest.$ac_ext <<EOF
6384#line 6385 "configure"
6385#include "confdefs.h"
6386find_stack_direction ()
6387{
6388 static char *addr = 0;
6389 auto char dummy;
6390 if (addr == 0)
6391 {
6392 addr = &dummy;
6393 return find_stack_direction ();
6394 }
6395 else
6396 return (&dummy > addr) ? 1 : -1;
6397}
6398main ()
6399{
6400 exit (find_stack_direction() < 0);
6401}
6402EOF
6403if { (eval echo configure:6404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6404then
6405 ac_cv_c_stack_direction=1
6406else
6407 echo "configure: failed program was:" >&5
6408 cat conftest.$ac_ext >&5
6409 rm -fr conftest*
6410 ac_cv_c_stack_direction=-1
6411fi
6412rm -fr conftest*
6413fi
6414
6415fi
6416
6417echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6418cat >> confdefs.h <<EOF
6419#define STACK_DIRECTION $ac_cv_c_stack_direction
6420EOF
6421
6422fi
6423
6424
6425for ac_prog in perl
6426do
6427# Extract the first word of "$ac_prog", so it can be a program name with args.
6428set dummy $ac_prog; ac_word=$2
6429echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6430echo "configure:6431: checking for $ac_word" >&5
6431if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
6432 echo $ac_n "(cached) $ac_c" 1>&6
6433else
6434 if test -n "$PERL"; then
6435 ac_cv_prog_PERL="$PERL" # Let the user override the test.
6436else
6437 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6438 ac_dummy="$PATH"
6439 for ac_dir in $ac_dummy; do
6440 test -z "$ac_dir" && ac_dir=.
6441 if test -f $ac_dir/$ac_word; then
6442 ac_cv_prog_PERL="$ac_prog"
6443 break
6444 fi
6445 done
6446 IFS="$ac_save_ifs"
6447fi
6448fi
6449PERL="$ac_cv_prog_PERL"
6450if test -n "$PERL"; then
6451 echo "$ac_t""$PERL" 1>&6
6452else
6453 echo "$ac_t""no" 1>&6
6454fi
6455
6456test -n "$PERL" && break
6457done
6458test -n "$PERL" || PERL="false"
6459
6460
6461SYSDEP_SOURCES=
6462
6463case "${host}" in
6464 i?86-*-linux*)
6465 SIGNAL_HANDLER=include/i386-signal.h
6466 ;;
6467 sparc*-sun-solaris*)
6468 SIGNAL_HANDLER=include/sparc-signal.h
6469 ;;
6470# ia64-*)
6471# SYSDEP_SOURCES=sysdep/ia64.c
6472# test -d sysdep || mkdir sysdep
6473# ;;
6474 ia64-*-linux*)
6475 SIGNAL_HANDLER=include/dwarf2-signal.h
6476 ;;
6477 powerpc-*-linux*)
6478 SIGNAL_HANDLER=include/dwarf2-signal.h
6479 ;;
6480 alpha*-*-linux*)
6481 SIGNAL_HANDLER=include/dwarf2-signal.h
6482 ;;
6483 sparc*-*-linux*)
6484 SIGNAL_HANDLER=include/dwarf2-signal.h
6485 ;;
6486 *mingw*)
6487 SIGNAL_HANDLER=include/win32-signal.h
6488 ;;
6489 *)
6490 SIGNAL_HANDLER=include/default-signal.h
6491 ;;
6492esac
6493
6494# If we're using sjlj exceptions, forget what we just learned.
6495if test "$enable_sjlj_exceptions" = yes; then
6496 SIGNAL_HANDLER=include/default-signal.h
6497fi
6498
6499
6500
6501
6502
6503if test "${multilib}" = "yes"; then
6504 multilib_arg="--enable-multilib"
6505else
6506 multilib_arg=
6507fi
6508
6509# If we find X, set shell vars x_includes and x_libraries to the
6510# paths, otherwise set no_x=yes.
6511# Uses ac_ vars as temps to allow command line to override cache and checks.
6512# --without-x overrides everything else, but does not touch the cache.
6513echo $ac_n "checking for X""... $ac_c" 1>&6
6514echo "configure:6515: checking for X" >&5
6515
6516# Check whether --with-x or --without-x was given.
6517if test "${with_x+set}" = set; then
6518 withval="$with_x"
6519 :
6520fi
6521
6522# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6523if test "x$with_x" = xno; then
6524 # The user explicitly disabled X.
6525 have_x=disabled
6526else
6527 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6528 # Both variables are already set.
6529 have_x=yes
6530 else
6531if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6532 echo $ac_n "(cached) $ac_c" 1>&6
6533else
6534 # One or both of the vars are not set, and there is no cached value.
6535ac_x_includes=NO ac_x_libraries=NO
6536rm -fr conftestdir
6537if mkdir conftestdir; then
6538 cd conftestdir
6539 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6540 cat > Imakefile <<'EOF'
6541acfindx:
6542 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6543EOF
6544 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6545 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6546 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6547 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6548 for ac_extension in a so sl; do
6549 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6550 test -f $ac_im_libdir/libX11.$ac_extension; then
6551 ac_im_usrlibdir=$ac_im_libdir; break
6552 fi
6553 done
6554 # Screen out bogus values from the imake configuration. They are
6555 # bogus both because they are the default anyway, and because
6556 # using them would break gcc on systems where it needs fixed includes.
6557 case "$ac_im_incroot" in
6558 /usr/include) ;;
6559 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6560 esac
6561 case "$ac_im_usrlibdir" in
6562 /usr/lib | /lib) ;;
6563 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6564 esac
6565 fi
6566 cd ..
6567 rm -fr conftestdir
6568fi
6569
6570if test "$ac_x_includes" = NO; then
6571 # Guess where to find include files, by looking for this one X11 .h file.
6572 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6573
6574 # First, try using that file with no special directory specified.
6575cat > conftest.$ac_ext <<EOF
6576#line 6577 "configure"
6577#include "confdefs.h"
6578#include <$x_direct_test_include>
6579EOF
6580ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6581{ (eval echo configure:6582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6582ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6583if test -z "$ac_err"; then
6584 rm -rf conftest*
6585 # We can compile using X headers with no special include directory.
6586ac_x_includes=
6587else
6588 echo "$ac_err" >&5
6589 echo "configure: failed program was:" >&5
6590 cat conftest.$ac_ext >&5
6591 rm -rf conftest*
6592 # Look for the header file in a standard set of common directories.
6593# Check X11 before X11Rn because it is often a symlink to the current release.
6594 for ac_dir in \
6595 /usr/X11/include \
6596 /usr/X11R6/include \
6597 /usr/X11R5/include \
6598 /usr/X11R4/include \
6599 \
6600 /usr/include/X11 \
6601 /usr/include/X11R6 \
6602 /usr/include/X11R5 \
6603 /usr/include/X11R4 \
6604 \
6605 /usr/local/X11/include \
6606 /usr/local/X11R6/include \
6607 /usr/local/X11R5/include \
6608 /usr/local/X11R4/include \
6609 \
6610 /usr/local/include/X11 \
6611 /usr/local/include/X11R6 \
6612 /usr/local/include/X11R5 \
6613 /usr/local/include/X11R4 \
6614 \
6615 /usr/X386/include \
6616 /usr/x386/include \
6617 /usr/XFree86/include/X11 \
6618 \
6619 /usr/include \
6620 /usr/local/include \
6621 /usr/unsupported/include \
6622 /usr/athena/include \
6623 /usr/local/x11r5/include \
6624 /usr/lpp/Xamples/include \
6625 \
6626 /usr/openwin/include \
6627 /usr/openwin/share/include \
6628 ; \
6629 do
6630 if test -r "$ac_dir/$x_direct_test_include"; then
6631 ac_x_includes=$ac_dir
6632 break
6633 fi
6634 done
6635fi
6636rm -f conftest*
6637fi # $ac_x_includes = NO
6638
6639if test "$ac_x_libraries" = NO; then
6640 # Check for the libraries.
6641
6642 test -z "$x_direct_test_library" && x_direct_test_library=Xt
6643 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6644
6645 # See if we find them without any special options.
6646 # Don't add to $LIBS permanently.
6647 ac_save_LIBS="$LIBS"
6648 LIBS="-l$x_direct_test_library $LIBS"
6649cat > conftest.$ac_ext <<EOF
6650#line 6651 "configure"
6651#include "confdefs.h"
6652
6653int main() {
6654${x_direct_test_function}()
6655; return 0; }
6656EOF
6657if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6658 rm -rf conftest*
6659 LIBS="$ac_save_LIBS"
6660# We can link X programs with no special library path.
6661ac_x_libraries=
6662else
6663 echo "configure: failed program was:" >&5
6664 cat conftest.$ac_ext >&5
6665 rm -rf conftest*
6666 LIBS="$ac_save_LIBS"
6667# First see if replacing the include by lib works.
6668# Check X11 before X11Rn because it is often a symlink to the current release.
6669for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6670 /usr/X11/lib \
6671 /usr/X11R6/lib \
6672 /usr/X11R5/lib \
6673 /usr/X11R4/lib \
6674 \
6675 /usr/lib/X11 \
6676 /usr/lib/X11R6 \
6677 /usr/lib/X11R5 \
6678 /usr/lib/X11R4 \
6679 \
6680 /usr/local/X11/lib \
6681 /usr/local/X11R6/lib \
6682 /usr/local/X11R5/lib \
6683 /usr/local/X11R4/lib \
6684 \
6685 /usr/local/lib/X11 \
6686 /usr/local/lib/X11R6 \
6687 /usr/local/lib/X11R5 \
6688 /usr/local/lib/X11R4 \
6689 \
6690 /usr/X386/lib \
6691 /usr/x386/lib \
6692 /usr/XFree86/lib/X11 \
6693 \
6694 /usr/lib \
6695 /usr/local/lib \
6696 /usr/unsupported/lib \
6697 /usr/athena/lib \
6698 /usr/local/x11r5/lib \
6699 /usr/lpp/Xamples/lib \
6700 /lib/usr/lib/X11 \
6701 \
6702 /usr/openwin/lib \
6703 /usr/openwin/share/lib \
6704 ; \
6705do
6706 for ac_extension in a so sl; do
6707 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6708 ac_x_libraries=$ac_dir
6709 break 2
6710 fi
6711 done
6712done
6713fi
6714rm -f conftest*
6715fi # $ac_x_libraries = NO
6716
6717if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6718 # Didn't find X anywhere. Cache the known absence of X.
6719 ac_cv_have_x="have_x=no"
6720else
6721 # Record where we found X for the cache.
6722 ac_cv_have_x="have_x=yes \
6723 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6724fi
6725fi
6726 fi
6727 eval "$ac_cv_have_x"
6728fi # $with_x != no
6729
6730if test "$have_x" != yes; then
6731 echo "$ac_t""$have_x" 1>&6
6732 no_x=yes
6733else
6734 # If each of the values was on the command line, it overrides each guess.
6735 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6736 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6737 # Update the cache value to reflect the command line values.
6738 ac_cv_have_x="have_x=yes \
6739 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6740 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6741fi
6742
6743if test "$no_x" = yes; then
6744 # Not all programs may use this symbol, but it does not hurt to define it.
6745 cat >> confdefs.h <<\EOF
6746#define X_DISPLAY_MISSING 1
6747EOF
6748
6749 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6750else
6751 if test -n "$x_includes"; then
6752 X_CFLAGS="$X_CFLAGS -I$x_includes"
6753 fi
6754
6755 # It would also be nice to do this for all -L options, not just this one.
6756 if test -n "$x_libraries"; then
6757 X_LIBS="$X_LIBS -L$x_libraries"
6758 # For Solaris; some versions of Sun CC require a space after -R and
6759 # others require no space. Words are not sufficient . . . .
6760 case "`(uname -sr) 2>/dev/null`" in
6761 "SunOS 5"*)
6762 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6763echo "configure:6764: checking whether -R must be followed by a space" >&5
6764 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6765 cat > conftest.$ac_ext <<EOF
6766#line 6767 "configure"
6767#include "confdefs.h"
6768
6769int main() {
6770
6771; return 0; }
6772EOF
6773if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6774 rm -rf conftest*
6775 ac_R_nospace=yes
6776else
6777 echo "configure: failed program was:" >&5
6778 cat conftest.$ac_ext >&5
6779 rm -rf conftest*
6780 ac_R_nospace=no
6781fi
6782rm -f conftest*
6783 if test $ac_R_nospace = yes; then
6784 echo "$ac_t""no" 1>&6
6785 X_LIBS="$X_LIBS -R$x_libraries"
6786 else
6787 LIBS="$ac_xsave_LIBS -R $x_libraries"
6788 cat > conftest.$ac_ext <<EOF
6789#line 6790 "configure"
6790#include "confdefs.h"
6791
6792int main() {
6793
6794; return 0; }
6795EOF
6796if { (eval echo configure:6797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6797 rm -rf conftest*
6798 ac_R_space=yes
6799else
6800 echo "configure: failed program was:" >&5
6801 cat conftest.$ac_ext >&5
6802 rm -rf conftest*
6803 ac_R_space=no
6804fi
6805rm -f conftest*
6806 if test $ac_R_space = yes; then
6807 echo "$ac_t""yes" 1>&6
6808 X_LIBS="$X_LIBS -R $x_libraries"
6809 else
6810 echo "$ac_t""neither works" 1>&6
6811 fi
6812 fi
6813 LIBS="$ac_xsave_LIBS"
6814 esac
6815 fi
6816
6817 # Check for system-dependent libraries X programs must link with.
6818 # Do this before checking for the system-independent R6 libraries
6819 # (-lICE), since we may need -lsocket or whatever for X linking.
6820
6821 if test "$ISC" = yes; then
6822 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6823 else
6824 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6825 # libraries were built with DECnet support. And karl@cs.umb.edu says
6826 # the Alpha needs dnet_stub (dnet does not exist).
6827 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6828echo "configure:6829: checking for dnet_ntoa in -ldnet" >&5
6829ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6830if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6831 echo $ac_n "(cached) $ac_c" 1>&6
6832else
6833 ac_save_LIBS="$LIBS"
6834LIBS="-ldnet $LIBS"
6835cat > conftest.$ac_ext <<EOF
6836#line 6837 "configure"
6837#include "confdefs.h"
6838/* Override any gcc2 internal prototype to avoid an error. */
6839/* We use char because int might match the return type of a gcc2
6840 builtin and then its argument prototype would still apply. */
6841char dnet_ntoa();
6842
6843int main() {
6844dnet_ntoa()
6845; return 0; }
6846EOF
6847if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6848 rm -rf conftest*
6849 eval "ac_cv_lib_$ac_lib_var=yes"
6850else
6851 echo "configure: failed program was:" >&5
6852 cat conftest.$ac_ext >&5
6853 rm -rf conftest*
6854 eval "ac_cv_lib_$ac_lib_var=no"
6855fi
6856rm -f conftest*
6857LIBS="$ac_save_LIBS"
6858
6859fi
6860if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6861 echo "$ac_t""yes" 1>&6
6862 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6863else
6864 echo "$ac_t""no" 1>&6
6865fi
6866
6867 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6868 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6869echo "configure:6870: checking for dnet_ntoa in -ldnet_stub" >&5
6870ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6871if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6872 echo $ac_n "(cached) $ac_c" 1>&6
6873else
6874 ac_save_LIBS="$LIBS"
6875LIBS="-ldnet_stub $LIBS"
6876cat > conftest.$ac_ext <<EOF
6877#line 6878 "configure"
6878#include "confdefs.h"
6879/* Override any gcc2 internal prototype to avoid an error. */
6880/* We use char because int might match the return type of a gcc2
6881 builtin and then its argument prototype would still apply. */
6882char dnet_ntoa();
6883
6884int main() {
6885dnet_ntoa()
6886; return 0; }
6887EOF
6888if { (eval echo configure:6889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6889 rm -rf conftest*
6890 eval "ac_cv_lib_$ac_lib_var=yes"
6891else
6892 echo "configure: failed program was:" >&5
6893 cat conftest.$ac_ext >&5
6894 rm -rf conftest*
6895 eval "ac_cv_lib_$ac_lib_var=no"
6896fi
6897rm -f conftest*
6898LIBS="$ac_save_LIBS"
6899
6900fi
6901if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6902 echo "$ac_t""yes" 1>&6
6903 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6904else
6905 echo "$ac_t""no" 1>&6
6906fi
6907
6908 fi
6909
6910 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6911 # to get the SysV transport functions.
6912 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6913 # needs -lnsl.
6914 # The nsl library prevents programs from opening the X display
6915 # on Irix 5.2, according to dickey@clark.net.
6916 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6917echo "configure:6918: checking for gethostbyname" >&5
6918if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6919 echo $ac_n "(cached) $ac_c" 1>&6
6920else
6921 cat > conftest.$ac_ext <<EOF
6922#line 6923 "configure"
6923#include "confdefs.h"
6924/* System header to define __stub macros and hopefully few prototypes,
6925 which can conflict with char gethostbyname(); below. */
6926#include <assert.h>
6927/* Override any gcc2 internal prototype to avoid an error. */
6928/* We use char because int might match the return type of a gcc2
6929 builtin and then its argument prototype would still apply. */
6930char gethostbyname();
6931
6932int main() {
6933
6934/* The GNU C library defines this for functions which it implements
6935 to always fail with ENOSYS. Some functions are actually named
6936 something starting with __ and the normal name is an alias. */
6937#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6938choke me
6939#else
6940gethostbyname();
6941#endif
6942
6943; return 0; }
6944EOF
6945if { (eval echo configure:6946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6946 rm -rf conftest*
6947 eval "ac_cv_func_gethostbyname=yes"
6948else
6949 echo "configure: failed program was:" >&5
6950 cat conftest.$ac_ext >&5
6951 rm -rf conftest*
6952 eval "ac_cv_func_gethostbyname=no"
6953fi
6954rm -f conftest*
6955fi
6956
6957if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6958 echo "$ac_t""yes" 1>&6
6959 :
6960else
6961 echo "$ac_t""no" 1>&6
6962fi
6963
6964 if test $ac_cv_func_gethostbyname = no; then
6965 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6966echo "configure:6967: checking for gethostbyname in -lnsl" >&5
6967ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6968if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6969 echo $ac_n "(cached) $ac_c" 1>&6
6970else
6971 ac_save_LIBS="$LIBS"
6972LIBS="-lnsl $LIBS"
6973cat > conftest.$ac_ext <<EOF
6974#line 6975 "configure"
6975#include "confdefs.h"
6976/* Override any gcc2 internal prototype to avoid an error. */
6977/* We use char because int might match the return type of a gcc2
6978 builtin and then its argument prototype would still apply. */
6979char gethostbyname();
6980
6981int main() {
6982gethostbyname()
6983; return 0; }
6984EOF
6985if { (eval echo configure:6986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6986 rm -rf conftest*
6987 eval "ac_cv_lib_$ac_lib_var=yes"
6988else
6989 echo "configure: failed program was:" >&5
6990 cat conftest.$ac_ext >&5
6991 rm -rf conftest*
6992 eval "ac_cv_lib_$ac_lib_var=no"
6993fi
6994rm -f conftest*
6995LIBS="$ac_save_LIBS"
6996
6997fi
6998if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6999 echo "$ac_t""yes" 1>&6
7000 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7001else
7002 echo "$ac_t""no" 1>&6
7003fi
7004
7005 fi
7006
7007 # lieder@skyler.mavd.honeywell.com says without -lsocket,
7008 # socket/setsockopt and other routines are undefined under SCO ODT
7009 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
7010 # on later versions), says simon@lia.di.epfl.ch: it contains
7011 # gethostby* variants that don't use the nameserver (or something).
7012 # -lsocket must be given before -lnsl if both are needed.
7013 # We assume that if connect needs -lnsl, so does gethostbyname.
7014 echo $ac_n "checking for connect""... $ac_c" 1>&6
7015echo "configure:7016: checking for connect" >&5
7016if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
7017 echo $ac_n "(cached) $ac_c" 1>&6
7018else
7019 cat > conftest.$ac_ext <<EOF
7020#line 7021 "configure"
7021#include "confdefs.h"
7022/* System header to define __stub macros and hopefully few prototypes,
7023 which can conflict with char connect(); below. */
7024#include <assert.h>
7025/* Override any gcc2 internal prototype to avoid an error. */
7026/* We use char because int might match the return type of a gcc2
7027 builtin and then its argument prototype would still apply. */
7028char connect();
7029
7030int main() {
7031
7032/* The GNU C library defines this for functions which it implements
7033 to always fail with ENOSYS. Some functions are actually named
7034 something starting with __ and the normal name is an alias. */
7035#if defined (__stub_connect) || defined (__stub___connect)
7036choke me
7037#else
7038connect();
7039#endif
7040
7041; return 0; }
7042EOF
7043if { (eval echo configure:7044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7044 rm -rf conftest*
7045 eval "ac_cv_func_connect=yes"
7046else
7047 echo "configure: failed program was:" >&5
7048 cat conftest.$ac_ext >&5
7049 rm -rf conftest*
7050 eval "ac_cv_func_connect=no"
7051fi
7052rm -f conftest*
7053fi
7054
7055if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
7056 echo "$ac_t""yes" 1>&6
7057 :
7058else
7059 echo "$ac_t""no" 1>&6
7060fi
7061
7062 if test $ac_cv_func_connect = no; then
7063 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
7064echo "configure:7065: checking for connect in -lsocket" >&5
7065ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
7066if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7067 echo $ac_n "(cached) $ac_c" 1>&6
7068else
7069 ac_save_LIBS="$LIBS"
7070LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7071cat > conftest.$ac_ext <<EOF
7072#line 7073 "configure"
7073#include "confdefs.h"
7074/* Override any gcc2 internal prototype to avoid an error. */
7075/* We use char because int might match the return type of a gcc2
7076 builtin and then its argument prototype would still apply. */
7077char connect();
7078
7079int main() {
7080connect()
7081; return 0; }
7082EOF
7083if { (eval echo configure:7084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7084 rm -rf conftest*
7085 eval "ac_cv_lib_$ac_lib_var=yes"
7086else
7087 echo "configure: failed program was:" >&5
7088 cat conftest.$ac_ext >&5
7089 rm -rf conftest*
7090 eval "ac_cv_lib_$ac_lib_var=no"
7091fi
7092rm -f conftest*
7093LIBS="$ac_save_LIBS"
7094
7095fi
7096if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7097 echo "$ac_t""yes" 1>&6
7098 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7099else
7100 echo "$ac_t""no" 1>&6
7101fi
7102
7103 fi
7104
7105 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
7106 echo $ac_n "checking for remove""... $ac_c" 1>&6
7107echo "configure:7108: checking for remove" >&5
7108if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
7109 echo $ac_n "(cached) $ac_c" 1>&6
7110else
7111 cat > conftest.$ac_ext <<EOF
7112#line 7113 "configure"
7113#include "confdefs.h"
7114/* System header to define __stub macros and hopefully few prototypes,
7115 which can conflict with char remove(); below. */
7116#include <assert.h>
7117/* Override any gcc2 internal prototype to avoid an error. */
7118/* We use char because int might match the return type of a gcc2
7119 builtin and then its argument prototype would still apply. */
7120char remove();
7121
7122int main() {
7123
7124/* The GNU C library defines this for functions which it implements
7125 to always fail with ENOSYS. Some functions are actually named
7126 something starting with __ and the normal name is an alias. */
7127#if defined (__stub_remove) || defined (__stub___remove)
7128choke me
7129#else
7130remove();
7131#endif
7132
7133; return 0; }
7134EOF
7135if { (eval echo configure:7136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7136 rm -rf conftest*
7137 eval "ac_cv_func_remove=yes"
7138else
7139 echo "configure: failed program was:" >&5
7140 cat conftest.$ac_ext >&5
7141 rm -rf conftest*
7142 eval "ac_cv_func_remove=no"
7143fi
7144rm -f conftest*
7145fi
7146
7147if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
7148 echo "$ac_t""yes" 1>&6
7149 :
7150else
7151 echo "$ac_t""no" 1>&6
7152fi
7153
7154 if test $ac_cv_func_remove = no; then
7155 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
7156echo "configure:7157: checking for remove in -lposix" >&5
7157ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
7158if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7159 echo $ac_n "(cached) $ac_c" 1>&6
7160else
7161 ac_save_LIBS="$LIBS"
7162LIBS="-lposix $LIBS"
7163cat > conftest.$ac_ext <<EOF
7164#line 7165 "configure"
7165#include "confdefs.h"
7166/* Override any gcc2 internal prototype to avoid an error. */
7167/* We use char because int might match the return type of a gcc2
7168 builtin and then its argument prototype would still apply. */
7169char remove();
7170
7171int main() {
7172remove()
7173; return 0; }
7174EOF
7175if { (eval echo configure:7176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7176 rm -rf conftest*
7177 eval "ac_cv_lib_$ac_lib_var=yes"
7178else
7179 echo "configure: failed program was:" >&5
7180 cat conftest.$ac_ext >&5
7181 rm -rf conftest*
7182 eval "ac_cv_lib_$ac_lib_var=no"
7183fi
7184rm -f conftest*
7185LIBS="$ac_save_LIBS"
7186
7187fi
7188if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7189 echo "$ac_t""yes" 1>&6
7190 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7191else
7192 echo "$ac_t""no" 1>&6
7193fi
7194
7195 fi
7196
7197 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7198 echo $ac_n "checking for shmat""... $ac_c" 1>&6
7199echo "configure:7200: checking for shmat" >&5
7200if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
7201 echo $ac_n "(cached) $ac_c" 1>&6
7202else
7203 cat > conftest.$ac_ext <<EOF
7204#line 7205 "configure"
7205#include "confdefs.h"
7206/* System header to define __stub macros and hopefully few prototypes,
7207 which can conflict with char shmat(); below. */
7208#include <assert.h>
7209/* Override any gcc2 internal prototype to avoid an error. */
7210/* We use char because int might match the return type of a gcc2
7211 builtin and then its argument prototype would still apply. */
7212char shmat();
7213
7214int main() {
7215
7216/* The GNU C library defines this for functions which it implements
7217 to always fail with ENOSYS. Some functions are actually named
7218 something starting with __ and the normal name is an alias. */
7219#if defined (__stub_shmat) || defined (__stub___shmat)
7220choke me
7221#else
7222shmat();
7223#endif
7224
7225; return 0; }
7226EOF
7227if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7228 rm -rf conftest*
7229 eval "ac_cv_func_shmat=yes"
7230else
7231 echo "configure: failed program was:" >&5
7232 cat conftest.$ac_ext >&5
7233 rm -rf conftest*
7234 eval "ac_cv_func_shmat=no"
7235fi
7236rm -f conftest*
7237fi
7238
7239if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
7240 echo "$ac_t""yes" 1>&6
7241 :
7242else
7243 echo "$ac_t""no" 1>&6
7244fi
7245
7246 if test $ac_cv_func_shmat = no; then
7247 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
7248echo "configure:7249: checking for shmat in -lipc" >&5
7249ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
7250if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7251 echo $ac_n "(cached) $ac_c" 1>&6
7252else
7253 ac_save_LIBS="$LIBS"
7254LIBS="-lipc $LIBS"
7255cat > conftest.$ac_ext <<EOF
7256#line 7257 "configure"
7257#include "confdefs.h"
7258/* Override any gcc2 internal prototype to avoid an error. */
7259/* We use char because int might match the return type of a gcc2
7260 builtin and then its argument prototype would still apply. */
7261char shmat();
7262
7263int main() {
7264shmat()
7265; return 0; }
7266EOF
7267if { (eval echo configure:7268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7268 rm -rf conftest*
7269 eval "ac_cv_lib_$ac_lib_var=yes"
7270else
7271 echo "configure: failed program was:" >&5
7272 cat conftest.$ac_ext >&5
7273 rm -rf conftest*
7274 eval "ac_cv_lib_$ac_lib_var=no"
7275fi
7276rm -f conftest*
7277LIBS="$ac_save_LIBS"
7278
7279fi
7280if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7281 echo "$ac_t""yes" 1>&6
7282 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7283else
7284 echo "$ac_t""no" 1>&6
7285fi
7286
7287 fi
7288 fi
7289
7290 # Check for libraries that X11R6 Xt/Xaw programs need.
7291 ac_save_LDFLAGS="$LDFLAGS"
7292 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7293 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7294 # check for ICE first), but we must link in the order -lSM -lICE or
7295 # we get undefined symbols. So assume we have SM if we have ICE.
7296 # These have to be linked with before -lX11, unlike the other
7297 # libraries we check for below, so use a different variable.
7298 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
7299 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
7300echo "configure:7301: checking for IceConnectionNumber in -lICE" >&5
7301ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
7302if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7303 echo $ac_n "(cached) $ac_c" 1>&6
7304else
7305 ac_save_LIBS="$LIBS"
7306LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7307cat > conftest.$ac_ext <<EOF
7308#line 7309 "configure"
7309#include "confdefs.h"
7310/* Override any gcc2 internal prototype to avoid an error. */
7311/* We use char because int might match the return type of a gcc2
7312 builtin and then its argument prototype would still apply. */
7313char IceConnectionNumber();
7314
7315int main() {
7316IceConnectionNumber()
7317; return 0; }
7318EOF
7319if { (eval echo configure:7320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7320 rm -rf conftest*
7321 eval "ac_cv_lib_$ac_lib_var=yes"
7322else
7323 echo "configure: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325 rm -rf conftest*
7326 eval "ac_cv_lib_$ac_lib_var=no"
7327fi
7328rm -f conftest*
7329LIBS="$ac_save_LIBS"
7330
7331fi
7332if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7333 echo "$ac_t""yes" 1>&6
7334 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7335else
7336 echo "$ac_t""no" 1>&6
7337fi
7338
7339 LDFLAGS="$ac_save_LDFLAGS"
7340
7341fi
7342
7343
7344# Check whether --enable-java-awt or --disable-java-awt was given.
7345if test "${enable_java_awt+set}" = set; then
7346 enableval="$enable_java_awt"
7347 :
7348fi
7349
7350
7351peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
7352use_xlib_awt=""
7353use_gtk_awt=""
7354
7355for peer in $peerlibs ; do
7356 case $peer in
7357 xlib)
7358 if test "$no_x" = yes; then
7359 echo "*** xlib peers requested but no X library available" 1>&2
7360 exit 1
7361 else
7362 use_xlib_awt="yes"
7363 fi
7364 ;;
7365 gtk)
7366 # Nothing, yet...
7367 ;;
7368 no)
7369 use_xlib_awt=
7370 use_gtk_awt=
7371 break
7372 ;;
7373 *)
7374 echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
7375 exit 1
7376 esac
7377done
7378
7379
7380
7381if test "$use_xlib_awt" = yes; then
7382 XLIB_AWT_TRUE=
7383 XLIB_AWT_FALSE='#'
7384else
7385 XLIB_AWT_TRUE='#'
7386 XLIB_AWT_FALSE=
7387fi
7388
7389
7390if test "$use_gtk_awt" = yes; then
7391 GTK_AWT_TRUE=
7392 GTK_AWT_FALSE='#'
7393else
7394 GTK_AWT_TRUE='#'
7395 GTK_AWT_FALSE=
7396fi
7397
7398
7399here=`pwd`
7400
7401
7402# We get this from the environment.
7403
7404
7405trap '' 1 2 15
7406cat > confcache <<\EOF
7407# This file is a shell script that caches the results of configure
7408# tests run on this system so they can be shared between configure
7409# scripts and configure runs. It is not useful on other systems.
7410# If it contains results you don't want to keep, you may remove or edit it.
7411#
7412# By default, configure uses ./config.cache as the cache file,
7413# creating it if it does not exist already. You can give configure
7414# the --cache-file=FILE option to use a different cache file; that is
7415# what configure does when it calls configure scripts in
7416# subdirectories, so they share the cache.
7417# Giving --cache-file=/dev/null disables caching, for debugging configure.
7418# config.status only pays attention to the cache file if you give it the
7419# --recheck option to rerun configure.
7420#
7421EOF
7422# The following way of writing the cache mishandles newlines in values,
7423# but we know of no workaround that is simple, portable, and efficient.
7424# So, don't put newlines in cache variables' values.
7425# Ultrix sh set writes to stderr and can't be redirected directly,
7426# and sets the high bit in the cache file unless we assign to the vars.
7427(set) 2>&1 |
7428 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7429 *ac_space=\ *)
7430 # `set' does not quote correctly, so add quotes (double-quote substitution
7431 # turns \\\\ into \\, and sed turns \\ into \).
7432 sed -n \
7433 -e "s/'/'\\\\''/g" \
7434 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7435 ;;
7436 *)
7437 # `set' quotes correctly as required by POSIX, so do not add quotes.
7438 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7439 ;;
7440 esac >> confcache
7441if cmp -s $cache_file confcache; then
7442 :
7443else
7444 if test -w $cache_file; then
7445 echo "updating cache $cache_file"
7446 cat confcache > $cache_file
7447 else
7448 echo "not updating unwritable cache $cache_file"
7449 fi
7450fi
7451rm -f confcache
7452
7453trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7454
7455test "x$prefix" = xNONE && prefix=$ac_default_prefix
7456# Let make expand exec_prefix.
7457test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7458
7459# Any assignment to VPATH causes Sun make to only execute
7460# the first set of double-colon rules, so remove it if not needed.
7461# If there is a colon in the path, we need to keep it.
7462if test "x$srcdir" = x.; then
7463 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7464fi
7465
7466trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7467
7468DEFS=-DHAVE_CONFIG_H
7469
7470# Without the "./", some shells look in PATH for config.status.
7471: ${CONFIG_STATUS=./config.status}
7472
7473echo creating $CONFIG_STATUS
7474rm -f $CONFIG_STATUS
7475cat > $CONFIG_STATUS <<EOF
7476#! /bin/sh
7477# Generated automatically by configure.
7478# Run this file to recreate the current configuration.
7479# This directory was configured as follows,
7480# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7481#
7482# $0 $ac_configure_args
7483#
7484# Compiler output produced by configure, useful for debugging
7485# configure, is in ./config.log if it exists.
7486
7487ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7488for ac_option
7489do
7490 case "\$ac_option" in
7491 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7492 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7493 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7494 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7495 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7496 exit 0 ;;
7497 -help | --help | --hel | --he | --h)
7498 echo "\$ac_cs_usage"; exit 0 ;;
7499 *) echo "\$ac_cs_usage"; exit 1 ;;
7500 esac
7501done
7502
7503ac_given_srcdir=$srcdir
7504ac_given_INSTALL="$INSTALL"
7505
7506trap '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
7507EOF
7508cat >> $CONFIG_STATUS <<EOF
7509
7510# Protect against being on the right side of a sed subst in config.status.
7511sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7512 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7513$ac_vpsub
7514$extrasub
7515s%@SHELL@%$SHELL%g
7516s%@CFLAGS@%$CFLAGS%g
7517s%@CPPFLAGS@%$CPPFLAGS%g
7518s%@CXXFLAGS@%$CXXFLAGS%g
7519s%@FFLAGS@%$FFLAGS%g
7520s%@DEFS@%$DEFS%g
7521s%@LDFLAGS@%$LDFLAGS%g
7522s%@LIBS@%$LIBS%g
7523s%@exec_prefix@%$exec_prefix%g
7524s%@prefix@%$prefix%g
7525s%@program_transform_name@%$program_transform_name%g
7526s%@bindir@%$bindir%g
7527s%@sbindir@%$sbindir%g
7528s%@libexecdir@%$libexecdir%g
7529s%@datadir@%$datadir%g
7530s%@sysconfdir@%$sysconfdir%g
7531s%@sharedstatedir@%$sharedstatedir%g
7532s%@localstatedir@%$localstatedir%g
7533s%@libdir@%$libdir%g
7534s%@includedir@%$includedir%g
7535s%@oldincludedir@%$oldincludedir%g
7536s%@infodir@%$infodir%g
7537s%@mandir@%$mandir%g
7538s%@LN_S@%$LN_S%g
7539s%@libgcj_basedir@%$libgcj_basedir%g
7540s%@mkinstalldirs@%$mkinstalldirs%g
7541s%@host@%$host%g
7542s%@host_alias@%$host_alias%g
7543s%@host_cpu@%$host_cpu%g
7544s%@host_vendor@%$host_vendor%g
7545s%@host_os@%$host_os%g
7546s%@target@%$target%g
7547s%@target_alias@%$target_alias%g
7548s%@target_cpu@%$target_cpu%g
7549s%@target_vendor@%$target_vendor%g
7550s%@target_os@%$target_os%g
7551s%@build@%$build%g
7552s%@build_alias@%$build_alias%g
7553s%@build_cpu@%$build_cpu%g
7554s%@build_vendor@%$build_vendor%g
7555s%@build_os@%$build_os%g
7556s%@CC@%$CC%g
7557s%@glibjava_CXX@%$glibjava_CXX%g
7558s%@CXX@%$CXX%g
7559s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7560s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7561s%@INSTALL_DATA@%$INSTALL_DATA%g
7562s%@PACKAGE@%$PACKAGE%g
7563s%@VERSION@%$VERSION%g
7564s%@ACLOCAL@%$ACLOCAL%g
7565s%@AUTOCONF@%$AUTOCONF%g
7566s%@AUTOMAKE@%$AUTOMAKE%g
7567s%@AUTOHEADER@%$AUTOHEADER%g
7568s%@MAKEINFO@%$MAKEINFO%g
7569s%@SET_MAKE@%$SET_MAKE%g
7570s%@AS@%$AS%g
7571s%@AR@%$AR%g
7572s%@RANLIB@%$RANLIB%g
7573s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7574s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7575s%@MAINT@%$MAINT%g
7576s%@EXEEXT@%$EXEEXT%g
7577s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
7578s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
7579s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
7580s%@INCLTDL@%$INCLTDL%g
7581s%@LIBLTDL@%$LIBLTDL%g
7582s%@DIRLTDL@%$DIRLTDL%g
7583s%@OBJEXT@%$OBJEXT%g
7584s%@STRIP@%$STRIP%g
7585s%@LIBTOOL@%$LIBTOOL%g
7586s%@CXXCPP@%$CXXCPP%g
7587s%@subdirs@%$subdirs%g
7588s%@COMPPATH@%$COMPPATH%g
7589s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
7590s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
7591s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
7592s%@LIBFFI@%$LIBFFI%g
7593s%@LIBFFIINCS@%$LIBFFIINCS%g
7594s%@PLATFORMOBJS@%$PLATFORMOBJS%g
7595s%@CPP@%$CPP%g
7596s%@SYSTEMSPEC@%$SYSTEMSPEC%g
7597s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
7598s%@ZLIBSPEC@%$ZLIBSPEC%g
7599s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
7600s%@GCLIBS@%$GCLIBS%g
7601s%@GCINCS@%$GCINCS%g
7602s%@GCDEPS@%$GCDEPS%g
7603s%@GCOBJS@%$GCOBJS%g
7604s%@GCSPEC@%$GCSPEC%g
7605s%@JC1GCSPEC@%$JC1GCSPEC%g
7606s%@GCTESTSPEC@%$GCTESTSPEC%g
7607s%@THREADLIBS@%$THREADLIBS%g
7608s%@THREADINCS@%$THREADINCS%g
7609s%@THREADDEPS@%$THREADDEPS%g
7610s%@THREADOBJS@%$THREADOBJS%g
7611s%@THREADSPEC@%$THREADSPEC%g
7612s%@THREADLDFLAGS@%$THREADLDFLAGS%g
7613s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
7614s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
7615s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
7616s%@tool_include_dir@%$tool_include_dir%g
7617s%@gcc_version@%$gcc_version%g
7618s%@LIBICONV@%$LIBICONV%g
7619s%@GCJ@%$GCJ%g
7620s%@GCJFLAGS@%$GCJFLAGS%g
7621s%@ZLIBS@%$ZLIBS%g
7622s%@SYS_ZLIBS@%$SYS_ZLIBS%g
7623s%@ZINCS@%$ZINCS%g
7624s%@DIVIDESPEC@%$DIVIDESPEC%g
7625s%@CHECKREFSPEC@%$CHECKREFSPEC%g
7626s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
7627s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
7628s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
7629s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
7630s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
7631s%@NATIVE_TRUE@%$NATIVE_TRUE%g
7632s%@NATIVE_FALSE@%$NATIVE_FALSE%g
7633s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
7634s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
7635s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
7636s%@toolexecdir@%$toolexecdir%g
7637s%@toolexecmainlibdir@%$toolexecmainlibdir%g
7638s%@toolexeclibdir@%$toolexeclibdir%g
7639s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
7640s%@GCJVERSION@%$GCJVERSION%g
7641s%@ALLOCA@%$ALLOCA%g
7642s%@PERL@%$PERL%g
7643s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
7644s%@X_CFLAGS@%$X_CFLAGS%g
7645s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7646s%@X_LIBS@%$X_LIBS%g
7647s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7648s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
7649s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
7650s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
7651s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
7652s%@here@%$here%g
7653
7654CEOF
7655EOF
7656
7657cat >> $CONFIG_STATUS <<\EOF
7658
7659# Split the substitutions into bite-sized pieces for seds with
7660# small command number limits, like on Digital OSF/1 and HP-UX.
7661ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7662ac_file=1 # Number of current file.
7663ac_beg=1 # First line for current file.
7664ac_end=$ac_max_sed_cmds # Line after last line for current file.
7665ac_more_lines=:
7666ac_sed_cmds=""
7667while $ac_more_lines; do
7668 if test $ac_beg -gt 1; then
7669 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7670 else
7671 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7672 fi
7673 if test ! -s conftest.s$ac_file; then
7674 ac_more_lines=false
7675 rm -f conftest.s$ac_file
7676 else
7677 if test -z "$ac_sed_cmds"; then
7678 ac_sed_cmds="sed -f conftest.s$ac_file"
7679 else
7680 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7681 fi
7682 ac_file=`expr $ac_file + 1`
7683 ac_beg=$ac_end
7684 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7685 fi
7686done
7687if test -z "$ac_sed_cmds"; then
7688 ac_sed_cmds=cat
7689fi
7690EOF
7691
7692cat >> $CONFIG_STATUS <<EOF
7693
7694CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
7695EOF
7696cat >> $CONFIG_STATUS <<\EOF
7697for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7698 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7699 case "$ac_file" in
7700 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7701 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7702 *) ac_file_in="${ac_file}.in" ;;
7703 esac
7704
7705 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7706
7707 # Remove last slash and all that follows it. Not all systems have dirname.
7708 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7709 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7710 # The file is in a subdirectory.
7711 test ! -d "$ac_dir" && mkdir "$ac_dir"
7712 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7713 # A "../" for each directory in $ac_dir_suffix.
7714 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7715 else
7716 ac_dir_suffix= ac_dots=
7717 fi
7718
7719 case "$ac_given_srcdir" in
7720 .) srcdir=.
7721 if test -z "$ac_dots"; then top_srcdir=.
7722 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7723 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7724 *) # Relative path.
7725 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7726 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7727 esac
7728
7729 case "$ac_given_INSTALL" in
7730 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7731 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7732 esac
7733
7734 echo creating "$ac_file"
7735 rm -f "$ac_file"
7736 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7737 case "$ac_file" in
7738 *Makefile*) ac_comsub="1i\\
7739# $configure_input" ;;
7740 *) ac_comsub= ;;
7741 esac
7742
7743 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7744 sed -e "$ac_comsub
7745s%@configure_input@%$configure_input%g
7746s%@srcdir@%$srcdir%g
7747s%@top_srcdir@%$top_srcdir%g
7748s%@INSTALL@%$INSTALL%g
7749" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7750fi; done
7751rm -f conftest.s*
7752
7753# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7754# NAME is the cpp macro being defined and VALUE is the value it is being given.
7755#
7756# ac_d sets the value in "#define NAME VALUE" lines.
7757ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7758ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7759ac_dC='\3'
7760ac_dD='%g'
7761# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7762ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7763ac_uB='\([ ]\)%\1#\2define\3'
7764ac_uC=' '
7765ac_uD='\4%g'
7766# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7767ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7768ac_eB='$%\1#\2define\3'
7769ac_eC=' '
7770ac_eD='%g'
7771
7772if test "${CONFIG_HEADERS+set}" != set; then
7773EOF
7774cat >> $CONFIG_STATUS <<EOF
7775 CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
7776EOF
7777cat >> $CONFIG_STATUS <<\EOF
7778fi
7779for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7780 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7781 case "$ac_file" in
7782 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7783 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7784 *) ac_file_in="${ac_file}.in" ;;
7785 esac
7786
7787 echo creating $ac_file
7788
7789 rm -f conftest.frag conftest.in conftest.out
7790 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7791 cat $ac_file_inputs > conftest.in
7792
7793EOF
7794
7795# Transform confdefs.h into a sed script conftest.vals that substitutes
7796# the proper values into config.h.in to produce config.h. And first:
7797# Protect against being on the right side of a sed subst in config.status.
7798# Protect against being in an unquoted here document in config.status.
7799rm -f conftest.vals
7800cat > conftest.hdr <<\EOF
7801s/[\\&%]/\\&/g
7802s%[\\$`]%\\&%g
7803s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7804s%ac_d%ac_u%gp
7805s%ac_u%ac_e%gp
7806EOF
7807sed -n -f conftest.hdr confdefs.h > conftest.vals
7808rm -f conftest.hdr
7809
7810# This sed command replaces #undef with comments. This is necessary, for
7811# example, in the case of _POSIX_SOURCE, which is predefined and required
7812# on some systems where configure will not decide to define it.
7813cat >> conftest.vals <<\EOF
7814s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7815EOF
7816
7817# Break up conftest.vals because some shells have a limit on
7818# the size of here documents, and old seds have small limits too.
7819
7820rm -f conftest.tail
7821while :
7822do
7823 ac_lines=`grep -c . conftest.vals`
7824 # grep -c gives empty output for an empty file on some AIX systems.
7825 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7826 # Write a limited-size here document to conftest.frag.
7827 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7828 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7829 echo 'CEOF
7830 sed -f conftest.frag conftest.in > conftest.out
7831 rm -f conftest.in
7832 mv conftest.out conftest.in
7833' >> $CONFIG_STATUS
7834 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7835 rm -f conftest.vals
7836 mv conftest.tail conftest.vals
7837done
7838rm -f conftest.vals
7839
7840cat >> $CONFIG_STATUS <<\EOF
7841 rm -f conftest.frag conftest.h
7842 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7843 cat conftest.in >> conftest.h
7844 rm -f conftest.in
7845 if cmp -s $ac_file conftest.h 2>/dev/null; then
7846 echo "$ac_file is unchanged"
7847 rm -f conftest.h
7848 else
7849 # Remove last slash and all that follows it. Not all systems have dirname.
7850 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7851 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7852 # The file is in a subdirectory.
7853 test ! -d "$ac_dir" && mkdir "$ac_dir"
7854 fi
7855 rm -f $ac_file
7856 mv conftest.h $ac_file
7857 fi
7858fi; done
7859
7860EOF
7861
7862cat >> $CONFIG_STATUS <<EOF
7863ac_sources="include/$PLATFORMH java/io/natFile${FILE-${PLATFORM}}.cc java/io/natFileDescriptor${FILE-${PLATFORM}}.cc java/lang/${PLATFORM}Process.java java/lang/nat${PLATFORM}Process.cc include/$GCHDR include/$THREADH sysdep/$sysdeps_dir/locks.h $SIGNAL_HANDLER"
7864ac_dests="include/platform.h java/io/natFile.cc java/io/natFileDescriptor.cc java/lang/ConcreteProcess.java java/lang/natConcreteProcess.cc include/java-gc.h include/java-threads.h sysdep/locks.h include/java-signal.h"
7865EOF
7866
7867cat >> $CONFIG_STATUS <<\EOF
7868srcdir=$ac_given_srcdir
7869while test -n "$ac_sources"; do
7870 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7871 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7872
7873 echo "linking $srcdir/$ac_source to $ac_dest"
7874
7875 if test ! -r $srcdir/$ac_source; then
7876 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7877 fi
7878 rm -f $ac_dest
7879
7880 # Make relative symlinks.
7881 # Remove last slash and all that follows it. Not all systems have dirname.
7882 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7883 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7884 # The dest file is in a subdirectory.
7885 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7886 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7887 # A "../" for each directory in $ac_dest_dir_suffix.
7888 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7889 else
7890 ac_dest_dir_suffix= ac_dots=
7891 fi
7892
7893 case "$srcdir" in
7894 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7895 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7896 esac
7897
7898 # Make a symlink if possible; otherwise try a hard link.
7899 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7900 ln $srcdir/$ac_source $ac_dest; then :
7901 else
7902 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7903 fi
7904done
7905EOF
7906cat >> $CONFIG_STATUS <<EOF
7907
7908srcdir=${srcdir}
7909host=${host}
7910target=${target}
7911with_multisubdir=${with_multisubdir}
7912ac_configure_args="${multilib_arg} ${ac_configure_args}"
7913CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7914libgcj_basedir=${libgcj_basedir}
7915CC="${CC}"
7916CXX="${CXX}"
7917
7918EOF
7919cat >> $CONFIG_STATUS <<\EOF
7920am_indx=1
7921for am_file in include/config.h gcj/libgcj-config.h; do
7922 case " $CONFIG_HEADERS " in
7923 *" $am_file "*)
7924 echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
7925 ;;
7926 esac
7927 am_indx=`expr "$am_indx" + 1`
7928done
7929# Only add multilib support code if we just rebuilt top-level Makefile.
7930case " $CONFIG_FILES " in
7931 *" Makefile "*)
7932 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
7933 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
7934 ;;
7935esac
7936
7937# Make subdirectories and `.d' files. Look in both srcdir and
7938# builddir for the .java files.
7939h=`pwd`
7940: > deps.mk
7941( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' \) -print) ;
7942 find . \( -name '*.java' -o -name '*.cc' \) -print) | \
7943 fgrep -v testsuite | \
7944 sed -e 's/\.java/.d/'\;'s/\.cc/.d/' | \
7945 while read f; do
7946 echo "include $f" >> deps.mk
7947 test -f $f || {
7948
7949 d=`echo $f | sed -e 's,/[^/]*$,,'`
7950
7951 if test ! -d $d; then
7952 $libgcj_basedir/../mkinstalldirs $d
7953 fi;
7954 echo > $f
7955 }
7956 done
7957
7958exit 0
7959EOF
7960chmod +x $CONFIG_STATUS
7961rm -fr confdefs* $ac_clean_files
7962test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7963
7964if test "$no_recursion" != yes; then
7965
7966 # Remove --cache-file and --srcdir arguments so they do not pile up.
7967 ac_sub_configure_args=
7968 ac_prev=
7969 for ac_arg in $ac_configure_args; do
7970 if test -n "$ac_prev"; then
7971 ac_prev=
7972 continue
7973 fi
7974 case "$ac_arg" in
7975 -cache-file | --cache-file | --cache-fil | --cache-fi \
7976 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7977 ac_prev=cache_file ;;
7978 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7979 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7980 ;;
7981 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7982 ac_prev=srcdir ;;
7983 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7984 ;;
7985 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7986 esac
7987 done
7988
7989 for ac_config_dir in $DIRLTDL; do
7990
7991 # Do not complain, so a configure script can configure whichever
7992 # parts of a large source tree are present.
7993 if test ! -d $srcdir/$ac_config_dir; then
7994 continue
7995 fi
7996
7997 echo configuring in $ac_config_dir
7998
7999 case "$srcdir" in
8000 .) ;;
8001 *)
8002 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
8003 else
8004 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
8005 fi
8006 ;;
8007 esac
8008
8009 ac_popdir=`pwd`
8010 cd $ac_config_dir
8011
8012 # A "../" for each directory in /$ac_config_dir.
8013 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
8014
8015 case "$srcdir" in
8016 .) # No --srcdir option. We are building in place.
8017 ac_sub_srcdir=$srcdir ;;
8018 /*) # Absolute path.
8019 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
8020 *) # Relative path.
8021 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
8022 esac
8023
8024 # Check for guested configure; otherwise get Cygnus style configure.
8025 if test -f $ac_sub_srcdir/configure; then
8026 ac_sub_configure=$ac_sub_srcdir/configure
8027 elif test -f $ac_sub_srcdir/configure.in; then
8028 ac_sub_configure=$ac_configure
8029 else
8030 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
8031 ac_sub_configure=
8032 fi
8033
8034 # The recursion is here.
8035 if test -n "$ac_sub_configure"; then
8036
8037 # Make the cache file name correct relative to the subdirectory.
8038 case "$cache_file" in
8039 /*) ac_sub_cache_file=$cache_file ;;
8040 *) # Relative path.
8041 ac_sub_cache_file="$ac_dots$cache_file" ;;
8042 esac
8043 case "$ac_given_INSTALL" in
8044 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8045 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8046 esac
8047
8048 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
8049 # The eval makes quoting arguments work.
8050 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
8051 then :
8052 else
8053 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
8054 fi
8055 fi
8056
8057 cd $ac_popdir
8058 done
8059fi
8060
Note: See TracBrowser for help on using the repository browser.