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