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