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