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