source: trunk/src/gcc/libjava/configure@ 547

Last change on this file since 547 was 80, checked in by bird, 22 years ago

Regenerated configure on OS/2.

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