encodings.pl: Added `ASCII' alias.
[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 # Check whether --enable-libgcj-debug or --disable-libgcj-debug was given.
2660 if test "${enable_libgcj_debug+set}" = set; then
2661 enableval="$enable_libgcj_debug"
2662 if test "$enable_libgcj_debug" = yes; then
2663 cat >> confdefs.h <<\EOF
2664 #define DEBUG 1
2665 EOF
2666
2667 fi
2668 fi
2669
2670
2671 # Check whether --enable-interpreter or --disable-interpreter was given.
2672 if test "${enable_interpreter+set}" = set; then
2673 enableval="$enable_interpreter"
2674 if test "$enable_interpreter" = yes; then
2675 # This can also be set in configure.host.
2676 libgcj_interpreter=yes
2677 elif test "$enable_interpreter" = no; then
2678 libgcj_interpreter=no
2679 fi
2680 fi
2681
2682
2683 if test "$libgcj_interpreter" = yes; then
2684 cat >> confdefs.h <<\EOF
2685 #define INTERPRETER 1
2686 EOF
2687
2688 fi
2689
2690 EXCEPTIONSPEC=
2691 # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
2692 if test "${enable_sjlj_exceptions+set}" = set; then
2693 enableval="$enable_sjlj_exceptions"
2694 if test "$enable_sjlj_exceptions" = yes; then
2695 # This can be set in configure.host.
2696 libgcj_sjlj=yes
2697 fi
2698 fi
2699
2700
2701 if test "$libgcj_sjlj" = yes; then
2702 EXCEPTIONSPEC="-fsjlj-exceptions"
2703 cat >> confdefs.h <<\EOF
2704 #define SJLJ_EXCEPTIONS 1
2705 EOF
2706
2707 fi
2708
2709 FORCELIBGCCSPEC=
2710 if test "$ac_cv_prog_gnu_ld" = yes; then
2711 FORCELIBGCCSPEC="-u __rethrow -u __frame_state_for -lgcc"
2712 fi
2713
2714 echo $ac_n "checking for data_start""... $ac_c" 1>&6
2715 echo "configure:2716: checking for data_start" >&5
2716 LIBDATASTARTSPEC=
2717 NEEDS_DATA_START=
2718 cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721 extern int data_start;
2722 int main() {
2723 return ((int) &data_start);
2724 ; return 0; }
2725 EOF
2726 if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2727 rm -rf conftest*
2728 echo "$ac_t""found it" 1>&6
2729 else
2730 echo "configure: failed program was:" >&5
2731 cat conftest.$ac_ext >&5
2732 rm -rf conftest*
2733 LIBDATASTARTSPEC="-u data_start libgcjdata.a%s"
2734 NEEDS_DATA_START=yes
2735 echo "$ac_t""missing" 1>&6
2736 fi
2737 rm -f conftest*
2738
2739
2740 # Check whether --enable-java-net or --disable-java-net was given.
2741 if test "${enable_java_net+set}" = set; then
2742 enableval="$enable_java_net"
2743 :
2744 fi
2745
2746
2747 if test -n "$enable_java_net"; then
2748 enable_java_net=${enable_java_net_default-yes}
2749 fi
2750 if test "$enable_java_net" = no; then
2751 cat >> confdefs.h <<\EOF
2752 #define DISABLE_JAVA_NET 1
2753 EOF
2754
2755 fi
2756
2757 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2758 if test "${enable_jvmpi+set}" = set; then
2759 enableval="$enable_jvmpi"
2760 :
2761 fi
2762
2763
2764 if test "$enable_jvmpi" != no; then
2765 cat >> confdefs.h <<\EOF
2766 #define ENABLE_JVMPI 1
2767 EOF
2768
2769 fi
2770
2771 TARGET_ECOS="no"
2772 # Check whether --with-ecos or --without-ecos was given.
2773 if test "${with_ecos+set}" = set; then
2774 withval="$with_ecos"
2775 TARGET_ECOS="$with_ecos"
2776
2777 fi
2778
2779
2780 case "$TARGET_ECOS" in
2781 no)
2782 FILE_DESCRIPTOR=natFileDescriptorPosix.cc
2783 PROCESS=${PROCESS-Posix}
2784 ;;
2785 *)
2786 FILE_DESCRIPTOR=natFileDescriptorEcos.cc
2787 PROCESS=Ecos
2788 cat >> confdefs.h <<\EOF
2789 #define ECOS 1
2790 EOF
2791
2792 ;;
2793 esac
2794
2795 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2796 echo "configure:2797: checking how to run the C preprocessor" >&5
2797 # On Suns, sometimes $CPP names a directory.
2798 if test -n "$CPP" && test -d "$CPP"; then
2799 CPP=
2800 fi
2801 if test -z "$CPP"; then
2802 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2803 echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805 # This must be in double quotes, not single quotes, because CPP may get
2806 # substituted into the Makefile and "${CC-cc}" will confuse make.
2807 CPP="${CC-cc} -E"
2808 # On the NeXT, cc -E runs the code through the compiler's parser,
2809 # not just through cpp.
2810 cat > conftest.$ac_ext <<EOF
2811 #line 2812 "configure"
2812 #include "confdefs.h"
2813 #include <assert.h>
2814 Syntax Error
2815 EOF
2816 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2817 { (eval echo configure:2818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2818 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2819 if test -z "$ac_err"; then
2820 :
2821 else
2822 echo "$ac_err" >&5
2823 echo "configure: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2825 rm -rf conftest*
2826 CPP="${CC-cc} -E -traditional-cpp"
2827 cat > conftest.$ac_ext <<EOF
2828 #line 2829 "configure"
2829 #include "confdefs.h"
2830 #include <assert.h>
2831 Syntax Error
2832 EOF
2833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2834 { (eval echo configure:2835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2836 if test -z "$ac_err"; then
2837 :
2838 else
2839 echo "$ac_err" >&5
2840 echo "configure: failed program was:" >&5
2841 cat conftest.$ac_ext >&5
2842 rm -rf conftest*
2843 CPP="${CC-cc} -nologo -E"
2844 cat > conftest.$ac_ext <<EOF
2845 #line 2846 "configure"
2846 #include "confdefs.h"
2847 #include <assert.h>
2848 Syntax Error
2849 EOF
2850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2851 { (eval echo configure:2852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2853 if test -z "$ac_err"; then
2854 :
2855 else
2856 echo "$ac_err" >&5
2857 echo "configure: failed program was:" >&5
2858 cat conftest.$ac_ext >&5
2859 rm -rf conftest*
2860 CPP=/lib/cpp
2861 fi
2862 rm -f conftest*
2863 fi
2864 rm -f conftest*
2865 fi
2866 rm -f conftest*
2867 ac_cv_prog_CPP="$CPP"
2868 fi
2869 CPP="$ac_cv_prog_CPP"
2870 else
2871 ac_cv_prog_CPP="$CPP"
2872 fi
2873 echo "$ac_t""$CPP" 1>&6
2874
2875 cat > conftest.$ac_ext <<EOF
2876 #line 2877 "configure"
2877 #include "confdefs.h"
2878 #include <stdint.h>
2879 EOF
2880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2881 egrep "uint32_t" >/dev/null 2>&1; then
2882 rm -rf conftest*
2883 cat >> confdefs.h <<\EOF
2884 #define HAVE_INT32_DEFINED 1
2885 EOF
2886
2887 fi
2888 rm -f conftest*
2889
2890 cat > conftest.$ac_ext <<EOF
2891 #line 2892 "configure"
2892 #include "confdefs.h"
2893 #include <inttypes.h>
2894 EOF
2895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2896 egrep "uint32_t" >/dev/null 2>&1; then
2897 rm -rf conftest*
2898 cat >> confdefs.h <<\EOF
2899 #define HAVE_INT32_DEFINED 1
2900 EOF
2901
2902 fi
2903 rm -f conftest*
2904
2905 cat > conftest.$ac_ext <<EOF
2906 #line 2907 "configure"
2907 #include "confdefs.h"
2908 #include <sys/types.h>
2909 EOF
2910 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2911 egrep "u_int32_t" >/dev/null 2>&1; then
2912 rm -rf conftest*
2913 cat >> confdefs.h <<\EOF
2914 #define HAVE_BSD_INT32_DEFINED 1
2915 EOF
2916
2917 fi
2918 rm -f conftest*
2919
2920 cat > conftest.$ac_ext <<EOF
2921 #line 2922 "configure"
2922 #include "confdefs.h"
2923 #include <sys/config.h>
2924 EOF
2925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2926 egrep "u_int32_t" >/dev/null 2>&1; then
2927 rm -rf conftest*
2928 cat >> confdefs.h <<\EOF
2929 #define HAVE_BSD_INT32_DEFINED 1
2930 EOF
2931
2932 fi
2933 rm -f conftest*
2934
2935
2936
2937 cat > conftest.$ac_ext <<EOF
2938 #line 2939 "configure"
2939 #include "confdefs.h"
2940 #include <time.h>
2941 EOF
2942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2943 egrep "mktime" >/dev/null 2>&1; then
2944 rm -rf conftest*
2945 cat >> confdefs.h <<\EOF
2946 #define HAVE_MKTIME 1
2947 EOF
2948
2949 fi
2950 rm -f conftest*
2951
2952 cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 #include <time.h>
2956 EOF
2957 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2958 egrep "localtime" >/dev/null 2>&1; then
2959 rm -rf conftest*
2960 cat >> confdefs.h <<\EOF
2961 #define HAVE_LOCALTIME 1
2962 EOF
2963
2964 fi
2965 rm -f conftest*
2966
2967
2968 test -d java || mkdir java
2969 test -d java/io || mkdir java/io
2970
2971
2972 test -d java/lang || mkdir java/lang
2973
2974
2975
2976 SYSTEMSPEC=
2977
2978
2979 LIBGCJTESTSPEC="-L`pwd`/.libs -rpath `pwd`/.libs"
2980
2981
2982 # Check whether --with-system-zlib or --without-system-zlib was given.
2983 if test "${with_system_zlib+set}" = set; then
2984 withval="$with_system_zlib"
2985 :
2986 fi
2987
2988 ZLIBSPEC=
2989
2990 ZLIBTESTSPEC=
2991
2992
2993 libsubdir=.libs
2994
2995 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
2996 echo "configure:2997: checking for garbage collector to use" >&5
2997 # Check whether --enable-java-gc or --disable-java-gc was given.
2998 if test "${enable_java_gc+set}" = set; then
2999 enableval="$enable_java_gc"
3000
3001 GC=$enableval
3002 else
3003 GC=boehm
3004 fi
3005
3006 GCLIBS=
3007 GCINCS=
3008 GCDEPS=
3009 GCOBJS=
3010 GCSPEC=
3011 JC1GCSPEC=
3012 GCTESTSPEC=
3013 case "$GC" in
3014 boehm)
3015 echo "$ac_t""boehm" 1>&6
3016 GCDEPS='$(top_builddir)/../boehm-gc/libgcjgc.la'
3017 # We include the path to the boehm-gc build directory.
3018 # See Makefile.am to understand why.
3019 GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
3020 GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
3021 GCSPEC='-lgcjgc'
3022 JC1GCSPEC='-fuse-boehm-gc'
3023 GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
3024 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
3025 GCOBJS=boehm.lo
3026 GCHDR=boehm-gc.h
3027 cat >> confdefs.h <<\EOF
3028 #define HAVE_BOEHM_GC 1
3029 EOF
3030
3031 ;;
3032 no)
3033 echo "$ac_t""none" 1>&6
3034 GCOBJS=nogc.lo
3035 GCHDR=no-gc.h
3036 ;;
3037 *)
3038 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
3039 ;;
3040 esac
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051 echo $ac_n "checking for threads package to use""... $ac_c" 1>&6
3052 echo "configure:3053: checking for threads package to use" >&5
3053 # Check whether --enable-threads or --disable-threads was given.
3054 if test "${enable_threads+set}" = set; then
3055 enableval="$enable_threads"
3056 THREADS=$enableval
3057 else
3058 THREADS=no
3059 fi
3060
3061
3062 if test "$THREADS" = yes; then
3063 case "$host" in
3064 *-*-vxworks*)
3065 THREADS=vxworks
3066 ;;
3067 *-*-linux*)
3068 # FIXME: this isn't correct in all cases.
3069 THREADS=posix
3070 ;;
3071 *-*-win*)
3072 THREADS=win32
3073 ;;
3074 *-*-irix*)
3075 # FIXME: for now, choose POSIX, because we implement that.
3076 # Later, choose irix threads.
3077 THREADS=posix
3078 ;;
3079 *-*-solaris*)
3080 # FIXME: for now, choose POSIX, because we implement that.
3081 # Later, choose solaris threads.
3082 THREADS=posix
3083 ;;
3084 *)
3085 # For now.
3086 THREADS=none
3087 ;;
3088 esac
3089 fi
3090
3091 case "$THREADS" in
3092 no | none | single)
3093 THREADS=none
3094 ;;
3095 posix | pthreads)
3096 THREADS=posix
3097 case "$host" in
3098 *-*-linux*)
3099 cat >> confdefs.h <<\EOF
3100 #define LINUX_THREADS 1
3101 EOF
3102
3103 ;;
3104 esac
3105 ;;
3106 decosf1 | irix | mach | os2 | solaris | win32 | dce | vxworks)
3107 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
3108 ;;
3109 *)
3110 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
3111 ;;
3112 esac
3113 echo "$ac_t""$THREADS" 1>&6
3114
3115 THREADLIBS=
3116 THREADINCS=
3117 THREADDEPS=
3118 THREADOBJS=
3119 THREADH=
3120 THREADSPEC=
3121 case "$THREADS" in
3122 posix)
3123 THREADLIBS=-lpthread
3124 THREADSPEC=-lpthread
3125 THREADOBJS=posix-threads.lo
3126 THREADH=posix-threads.h
3127 # MIT pthreads doesn't seem to have the mutexattr functions.
3128 # But for now we don't check for it. We just assume you aren't
3129 # using MIT pthreads.
3130 cat >> confdefs.h <<\EOF
3131 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3132 EOF
3133
3134
3135 # If we're using the Boehm GC, then we happen to know that it
3136 # defines _REENTRANT, so we don't bother. Eww.
3137 if test "$GC" != boehm; then
3138 cat >> confdefs.h <<\EOF
3139 #define _REENTRANT 1
3140 EOF
3141
3142 fi
3143 cat >> confdefs.h <<\EOF
3144 #define _POSIX_PTHREAD_SEMANTICS 1
3145 EOF
3146
3147 ;;
3148
3149 none)
3150 THREADOBJS=no-threads.lo
3151 THREADH=no-threads.h
3152 ;;
3153 esac
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163 if test "$GCC" = yes; then
3164 USING_GCC_TRUE=
3165 USING_GCC_FALSE='#'
3166 else
3167 USING_GCC_TRUE='#'
3168 USING_GCC_FALSE=
3169 fi
3170
3171 CANADIAN=no
3172 NULL_TARGET=no
3173 NATIVE=yes
3174
3175 # Find eh-common.h and support headers. If we're in the tree with
3176 # gcc, then look there. Otherwise look in compat-include. If all else
3177 # fails, just hope the user has set things up somehow.
3178 if test -r $srcdir/../gcc/eh-common.h; then
3179 EH_COMMON_INCLUDE='-I$(top_srcdir)/../gcc -I$(top_srcdir)/../include'
3180 else
3181 if test -d $srcdir/../compat-include; then
3182 EH_COMMON_INCLUDE='-I$(top_srcdir)/../compat-include'
3183 else
3184 EH_COMMON_INCLUDE=
3185 fi
3186 fi
3187
3188 if test -n "${with_cross_host}"; then
3189 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
3190 # may not work correctly, because the compiler may not be able to
3191 # link executables.
3192
3193 # We assume newlib. This lets us hard-code the functions we know
3194 # we'll have.
3195 cat >> confdefs.h <<\EOF
3196 #define HAVE_MEMMOVE 1
3197 EOF
3198
3199 cat >> confdefs.h <<\EOF
3200 #define HAVE_MEMCPY 1
3201 EOF
3202
3203 cat >> confdefs.h <<\EOF
3204 #define HAVE_STRERROR 1
3205 EOF
3206
3207 cat >> confdefs.h <<\EOF
3208 #define HAVE_GMTIME_R 1
3209 EOF
3210
3211 cat >> confdefs.h <<\EOF
3212 #define HAVE_LOCALTIME_R 1
3213 EOF
3214
3215 cat >> confdefs.h <<\EOF
3216 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3217 EOF
3218
3219 cat >> confdefs.h <<\EOF
3220 #define HAVE_ALLOCA 1
3221 EOF
3222
3223
3224 cat >> confdefs.h <<\EOF
3225 #define NO_GETUID 1
3226 EOF
3227
3228
3229 ZLIBSPEC=-lzgcj
3230 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
3231
3232 # If Canadian cross, then don't pick up tools from the build
3233 # directory.
3234 if test "$build" != "$with_cross_host"; then
3235 CANADIAN=yes
3236 EH_COMMON_INCLUDE=
3237 GCJ="${target_alias}-gcj"
3238 else
3239 GCJ=
3240 fi
3241 NATIVE=no
3242 else
3243 for ac_func in strerror ioctl select fstat open fsync sleep
3244 do
3245 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3246 echo "configure:3247: checking for $ac_func" >&5
3247 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3248 echo $ac_n "(cached) $ac_c" 1>&6
3249 else
3250 cat > conftest.$ac_ext <<EOF
3251 #line 3252 "configure"
3252 #include "confdefs.h"
3253 /* System header to define __stub macros and hopefully few prototypes,
3254 which can conflict with char $ac_func(); below. */
3255 #include <assert.h>
3256 /* Override any gcc2 internal prototype to avoid an error. */
3257 /* We use char because int might match the return type of a gcc2
3258 builtin and then its argument prototype would still apply. */
3259 char $ac_func();
3260
3261 int main() {
3262
3263 /* The GNU C library defines this for functions which it implements
3264 to always fail with ENOSYS. Some functions are actually named
3265 something starting with __ and the normal name is an alias. */
3266 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3267 choke me
3268 #else
3269 $ac_func();
3270 #endif
3271
3272 ; return 0; }
3273 EOF
3274 if { (eval echo configure:3275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3275 rm -rf conftest*
3276 eval "ac_cv_func_$ac_func=yes"
3277 else
3278 echo "configure: failed program was:" >&5
3279 cat conftest.$ac_ext >&5
3280 rm -rf conftest*
3281 eval "ac_cv_func_$ac_func=no"
3282 fi
3283 rm -f conftest*
3284 fi
3285
3286 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3287 echo "$ac_t""yes" 1>&6
3288 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3289 cat >> confdefs.h <<EOF
3290 #define $ac_tr_func 1
3291 EOF
3292
3293 else
3294 echo "$ac_t""no" 1>&6
3295 fi
3296 done
3297
3298 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
3299 do
3300 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3301 echo "configure:3302: checking for $ac_func" >&5
3302 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3303 echo $ac_n "(cached) $ac_c" 1>&6
3304 else
3305 cat > conftest.$ac_ext <<EOF
3306 #line 3307 "configure"
3307 #include "confdefs.h"
3308 /* System header to define __stub macros and hopefully few prototypes,
3309 which can conflict with char $ac_func(); below. */
3310 #include <assert.h>
3311 /* Override any gcc2 internal prototype to avoid an error. */
3312 /* We use char because int might match the return type of a gcc2
3313 builtin and then its argument prototype would still apply. */
3314 char $ac_func();
3315
3316 int main() {
3317
3318 /* The GNU C library defines this for functions which it implements
3319 to always fail with ENOSYS. Some functions are actually named
3320 something starting with __ and the normal name is an alias. */
3321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3322 choke me
3323 #else
3324 $ac_func();
3325 #endif
3326
3327 ; return 0; }
3328 EOF
3329 if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3330 rm -rf conftest*
3331 eval "ac_cv_func_$ac_func=yes"
3332 else
3333 echo "configure: failed program was:" >&5
3334 cat conftest.$ac_ext >&5
3335 rm -rf conftest*
3336 eval "ac_cv_func_$ac_func=no"
3337 fi
3338 rm -f conftest*
3339 fi
3340
3341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3342 echo "$ac_t""yes" 1>&6
3343 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3344 cat >> confdefs.h <<EOF
3345 #define $ac_tr_func 1
3346 EOF
3347
3348 else
3349 echo "$ac_t""no" 1>&6
3350 fi
3351 done
3352
3353 for ac_func in access stat mkdir rename rmdir unlink realpath
3354 do
3355 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3356 echo "configure:3357: checking for $ac_func" >&5
3357 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3358 echo $ac_n "(cached) $ac_c" 1>&6
3359 else
3360 cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363 /* System header to define __stub macros and hopefully few prototypes,
3364 which can conflict with char $ac_func(); below. */
3365 #include <assert.h>
3366 /* Override any gcc2 internal prototype to avoid an error. */
3367 /* We use char because int might match the return type of a gcc2
3368 builtin and then its argument prototype would still apply. */
3369 char $ac_func();
3370
3371 int main() {
3372
3373 /* The GNU C library defines this for functions which it implements
3374 to always fail with ENOSYS. Some functions are actually named
3375 something starting with __ and the normal name is an alias. */
3376 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3377 choke me
3378 #else
3379 $ac_func();
3380 #endif
3381
3382 ; return 0; }
3383 EOF
3384 if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3385 rm -rf conftest*
3386 eval "ac_cv_func_$ac_func=yes"
3387 else
3388 echo "configure: failed program was:" >&5
3389 cat conftest.$ac_ext >&5
3390 rm -rf conftest*
3391 eval "ac_cv_func_$ac_func=no"
3392 fi
3393 rm -f conftest*
3394 fi
3395
3396 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3397 echo "$ac_t""yes" 1>&6
3398 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3399 cat >> confdefs.h <<EOF
3400 #define $ac_tr_func 1
3401 EOF
3402
3403 else
3404 echo "$ac_t""no" 1>&6
3405 fi
3406 done
3407
3408 for ac_func in iconv nl_langinfo
3409 do
3410 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3411 echo "configure:3412: checking for $ac_func" >&5
3412 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3413 echo $ac_n "(cached) $ac_c" 1>&6
3414 else
3415 cat > conftest.$ac_ext <<EOF
3416 #line 3417 "configure"
3417 #include "confdefs.h"
3418 /* System header to define __stub macros and hopefully few prototypes,
3419 which can conflict with char $ac_func(); below. */
3420 #include <assert.h>
3421 /* Override any gcc2 internal prototype to avoid an error. */
3422 /* We use char because int might match the return type of a gcc2
3423 builtin and then its argument prototype would still apply. */
3424 char $ac_func();
3425
3426 int main() {
3427
3428 /* The GNU C library defines this for functions which it implements
3429 to always fail with ENOSYS. Some functions are actually named
3430 something starting with __ and the normal name is an alias. */
3431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3432 choke me
3433 #else
3434 $ac_func();
3435 #endif
3436
3437 ; return 0; }
3438 EOF
3439 if { (eval echo configure:3440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3440 rm -rf conftest*
3441 eval "ac_cv_func_$ac_func=yes"
3442 else
3443 echo "configure: failed program was:" >&5
3444 cat conftest.$ac_ext >&5
3445 rm -rf conftest*
3446 eval "ac_cv_func_$ac_func=no"
3447 fi
3448 rm -f conftest*
3449 fi
3450
3451 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3452 echo "$ac_t""yes" 1>&6
3453 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3454 cat >> confdefs.h <<EOF
3455 #define $ac_tr_func 1
3456 EOF
3457
3458 else
3459 echo "$ac_t""no" 1>&6
3460 fi
3461 done
3462
3463 for ac_func in inet_aton inet_addr
3464 do
3465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3466 echo "configure:3467: checking for $ac_func" >&5
3467 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3468 echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470 cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473 /* System header to define __stub macros and hopefully few prototypes,
3474 which can conflict with char $ac_func(); below. */
3475 #include <assert.h>
3476 /* Override any gcc2 internal prototype to avoid an error. */
3477 /* We use char because int might match the return type of a gcc2
3478 builtin and then its argument prototype would still apply. */
3479 char $ac_func();
3480
3481 int main() {
3482
3483 /* The GNU C library defines this for functions which it implements
3484 to always fail with ENOSYS. Some functions are actually named
3485 something starting with __ and the normal name is an alias. */
3486 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3487 choke me
3488 #else
3489 $ac_func();
3490 #endif
3491
3492 ; return 0; }
3493 EOF
3494 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3495 rm -rf conftest*
3496 eval "ac_cv_func_$ac_func=yes"
3497 else
3498 echo "configure: failed program was:" >&5
3499 cat conftest.$ac_ext >&5
3500 rm -rf conftest*
3501 eval "ac_cv_func_$ac_func=no"
3502 fi
3503 rm -f conftest*
3504 fi
3505
3506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3507 echo "$ac_t""yes" 1>&6
3508 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3509 cat >> confdefs.h <<EOF
3510 #define $ac_tr_func 1
3511 EOF
3512 break
3513 else
3514 echo "$ac_t""no" 1>&6
3515 fi
3516 done
3517
3518 for ac_func in inet_pton uname inet_ntoa
3519 do
3520 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3521 echo "configure:3522: checking for $ac_func" >&5
3522 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3523 echo $ac_n "(cached) $ac_c" 1>&6
3524 else
3525 cat > conftest.$ac_ext <<EOF
3526 #line 3527 "configure"
3527 #include "confdefs.h"
3528 /* System header to define __stub macros and hopefully few prototypes,
3529 which can conflict with char $ac_func(); below. */
3530 #include <assert.h>
3531 /* Override any gcc2 internal prototype to avoid an error. */
3532 /* We use char because int might match the return type of a gcc2
3533 builtin and then its argument prototype would still apply. */
3534 char $ac_func();
3535
3536 int main() {
3537
3538 /* The GNU C library defines this for functions which it implements
3539 to always fail with ENOSYS. Some functions are actually named
3540 something starting with __ and the normal name is an alias. */
3541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3542 choke me
3543 #else
3544 $ac_func();
3545 #endif
3546
3547 ; return 0; }
3548 EOF
3549 if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3550 rm -rf conftest*
3551 eval "ac_cv_func_$ac_func=yes"
3552 else
3553 echo "configure: failed program was:" >&5
3554 cat conftest.$ac_ext >&5
3555 rm -rf conftest*
3556 eval "ac_cv_func_$ac_func=no"
3557 fi
3558 rm -f conftest*
3559 fi
3560
3561 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3562 echo "$ac_t""yes" 1>&6
3563 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3564 cat >> confdefs.h <<EOF
3565 #define $ac_tr_func 1
3566 EOF
3567
3568 else
3569 echo "$ac_t""no" 1>&6
3570 fi
3571 done
3572
3573 for ac_func in backtrace fork execvp pipe
3574 do
3575 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3576 echo "configure:3577: checking for $ac_func" >&5
3577 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3578 echo $ac_n "(cached) $ac_c" 1>&6
3579 else
3580 cat > conftest.$ac_ext <<EOF
3581 #line 3582 "configure"
3582 #include "confdefs.h"
3583 /* System header to define __stub macros and hopefully few prototypes,
3584 which can conflict with char $ac_func(); below. */
3585 #include <assert.h>
3586 /* Override any gcc2 internal prototype to avoid an error. */
3587 /* We use char because int might match the return type of a gcc2
3588 builtin and then its argument prototype would still apply. */
3589 char $ac_func();
3590
3591 int main() {
3592
3593 /* The GNU C library defines this for functions which it implements
3594 to always fail with ENOSYS. Some functions are actually named
3595 something starting with __ and the normal name is an alias. */
3596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3597 choke me
3598 #else
3599 $ac_func();
3600 #endif
3601
3602 ; return 0; }
3603 EOF
3604 if { (eval echo configure:3605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3605 rm -rf conftest*
3606 eval "ac_cv_func_$ac_func=yes"
3607 else
3608 echo "configure: failed program was:" >&5
3609 cat conftest.$ac_ext >&5
3610 rm -rf conftest*
3611 eval "ac_cv_func_$ac_func=no"
3612 fi
3613 rm -f conftest*
3614 fi
3615
3616 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3617 echo "$ac_t""yes" 1>&6
3618 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3619 cat >> confdefs.h <<EOF
3620 #define $ac_tr_func 1
3621 EOF
3622
3623 else
3624 echo "$ac_t""no" 1>&6
3625 fi
3626 done
3627
3628 for ac_hdr in execinfo.h unistd.h dlfcn.h
3629 do
3630 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3631 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3632 echo "configure:3633: checking for $ac_hdr" >&5
3633 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3634 echo $ac_n "(cached) $ac_c" 1>&6
3635 else
3636 cat > conftest.$ac_ext <<EOF
3637 #line 3638 "configure"
3638 #include "confdefs.h"
3639 #include <$ac_hdr>
3640 EOF
3641 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3642 { (eval echo configure:3643: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3643 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3644 if test -z "$ac_err"; then
3645 rm -rf conftest*
3646 eval "ac_cv_header_$ac_safe=yes"
3647 else
3648 echo "$ac_err" >&5
3649 echo "configure: failed program was:" >&5
3650 cat conftest.$ac_ext >&5
3651 rm -rf conftest*
3652 eval "ac_cv_header_$ac_safe=no"
3653 fi
3654 rm -f conftest*
3655 fi
3656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3657 echo "$ac_t""yes" 1>&6
3658 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3659 cat >> confdefs.h <<EOF
3660 #define $ac_tr_hdr 1
3661 EOF
3662
3663 else
3664 echo "$ac_t""no" 1>&6
3665 fi
3666 done
3667
3668 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3669 echo "configure:3670: checking for dladdr in -ldl" >&5
3670 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3671 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3672 echo $ac_n "(cached) $ac_c" 1>&6
3673 else
3674 ac_save_LIBS="$LIBS"
3675 LIBS="-ldl $LIBS"
3676 cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 /* Override any gcc2 internal prototype to avoid an error. */
3680 /* We use char because int might match the return type of a gcc2
3681 builtin and then its argument prototype would still apply. */
3682 char dladdr();
3683
3684 int main() {
3685 dladdr()
3686 ; return 0; }
3687 EOF
3688 if { (eval echo configure:3689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3689 rm -rf conftest*
3690 eval "ac_cv_lib_$ac_lib_var=yes"
3691 else
3692 echo "configure: failed program was:" >&5
3693 cat conftest.$ac_ext >&5
3694 rm -rf conftest*
3695 eval "ac_cv_lib_$ac_lib_var=no"
3696 fi
3697 rm -f conftest*
3698 LIBS="$ac_save_LIBS"
3699
3700 fi
3701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3702 echo "$ac_t""yes" 1>&6
3703
3704 cat >> confdefs.h <<\EOF
3705 #define HAVE_DLADDR 1
3706 EOF
3707
3708 else
3709 echo "$ac_t""no" 1>&6
3710 fi
3711
3712 for ac_file in /proc/self/exe
3713 do
3714
3715 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3716 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3717 echo "configure:3718: checking for $ac_file" >&5
3718 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3719 echo $ac_n "(cached) $ac_c" 1>&6
3720 else
3721 if test "$cross_compiling" = yes; then
3722 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3723 else
3724 if test -r $ac_file; then
3725 eval "ac_cv_file_$ac_safe=yes"
3726 else
3727 eval "ac_cv_file_$ac_safe=no"
3728 fi
3729 fi
3730 fi
3731 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3732 echo "$ac_t""yes" 1>&6
3733 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3734 cat >> confdefs.h <<EOF
3735 #define $ac_tr_file 1
3736 EOF
3737
3738 cat >> confdefs.h <<\EOF
3739 #define HAVE_PROC_SELF_EXE 1
3740 EOF
3741
3742 else
3743 echo "$ac_t""no" 1>&6
3744
3745 fi
3746 done
3747
3748
3749 for ac_func in gethostbyname_r
3750 do
3751 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3752 echo "configure:3753: checking for $ac_func" >&5
3753 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3754 echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756 cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3759 /* System header to define __stub macros and hopefully few prototypes,
3760 which can conflict with char $ac_func(); below. */
3761 #include <assert.h>
3762 /* Override any gcc2 internal prototype to avoid an error. */
3763 /* We use char because int might match the return type of a gcc2
3764 builtin and then its argument prototype would still apply. */
3765 char $ac_func();
3766
3767 int main() {
3768
3769 /* The GNU C library defines this for functions which it implements
3770 to always fail with ENOSYS. Some functions are actually named
3771 something starting with __ and the normal name is an alias. */
3772 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3773 choke me
3774 #else
3775 $ac_func();
3776 #endif
3777
3778 ; return 0; }
3779 EOF
3780 if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3781 rm -rf conftest*
3782 eval "ac_cv_func_$ac_func=yes"
3783 else
3784 echo "configure: failed program was:" >&5
3785 cat conftest.$ac_ext >&5
3786 rm -rf conftest*
3787 eval "ac_cv_func_$ac_func=no"
3788 fi
3789 rm -f conftest*
3790 fi
3791
3792 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3793 echo "$ac_t""yes" 1>&6
3794 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3795 cat >> confdefs.h <<EOF
3796 #define $ac_tr_func 1
3797 EOF
3798
3799 cat >> confdefs.h <<\EOF
3800 #define HAVE_GETHOSTBYNAME_R 1
3801 EOF
3802
3803 # There are two different kinds of gethostbyname_r.
3804 # We look for the one that returns `int'.
3805 # Hopefully this check is robust enough.
3806 cat > conftest.$ac_ext <<EOF
3807 #line 3808 "configure"
3808 #include "confdefs.h"
3809 #include <netdb.h>
3810 EOF
3811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3812 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
3813 rm -rf conftest*
3814
3815 cat >> confdefs.h <<\EOF
3816 #define GETHOSTBYNAME_R_RETURNS_INT 1
3817 EOF
3818
3819 fi
3820 rm -f conftest*
3821
3822
3823 case " $GCINCS " in
3824 *" -D_REENTRANT "*) ;;
3825 *)
3826 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
3827 echo "configure:3828: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
3828 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
3829 echo $ac_n "(cached) $ac_c" 1>&6
3830 else
3831
3832 ac_ext=C
3833 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3834 ac_cpp='$CXXCPP $CPPFLAGS'
3835 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3836 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3837 cross_compiling=$ac_cv_prog_cxx_cross
3838
3839 cat > conftest.$ac_ext <<EOF
3840 #line 3841 "configure"
3841 #include "confdefs.h"
3842 #include <netdb.h>
3843 int main() {
3844 gethostbyname_r("", 0, 0);
3845 ; return 0; }
3846 EOF
3847 if { (eval echo configure:3848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3848 rm -rf conftest*
3849 libjava_cv_gethostbyname_r_needs_reentrant=no
3850 else
3851 echo "configure: failed program was:" >&5
3852 cat conftest.$ac_ext >&5
3853 rm -rf conftest*
3854 CPPFLAGS_SAVE="$CPPFLAGS"
3855 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
3856 cat > conftest.$ac_ext <<EOF
3857 #line 3858 "configure"
3858 #include "confdefs.h"
3859 #include <netdb.h>
3860 int main() {
3861 gethostbyname_r("", 0, 0);
3862 ; return 0; }
3863 EOF
3864 if { (eval echo configure:3865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3865 rm -rf conftest*
3866 libjava_cv_gethostbyname_r_needs_reentrant=yes
3867 else
3868 echo "configure: failed program was:" >&5
3869 cat conftest.$ac_ext >&5
3870 rm -rf conftest*
3871 libjava_cv_gethostbyname_r_needs_reentrant=fail
3872 fi
3873 rm -f conftest*
3874 CPPFLAGS="$CPPFLAGS_SAVE"
3875
3876 fi
3877 rm -f conftest*
3878 ac_ext=c
3879 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3880 ac_cpp='$CPP $CPPFLAGS'
3881 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3882 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3883 cross_compiling=$ac_cv_prog_cc_cross
3884
3885
3886 fi
3887
3888 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
3889 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
3890 cat >> confdefs.h <<\EOF
3891 #define _REENTRANT 1
3892 EOF
3893
3894 fi
3895 ;;
3896 esac
3897
3898 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
3899 echo "configure:3900: checking for struct hostent_data" >&5
3900 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
3901 echo $ac_n "(cached) $ac_c" 1>&6
3902 else
3903 cat > conftest.$ac_ext <<EOF
3904 #line 3905 "configure"
3905 #include "confdefs.h"
3906
3907 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
3908 # define _REENTRANT 1
3909 #endif
3910 #include <netdb.h>
3911 int main() {
3912 struct hostent_data data;
3913 ; return 0; }
3914 EOF
3915 if { (eval echo configure:3916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3916 rm -rf conftest*
3917 libjava_cv_struct_hostent_data=yes
3918 else
3919 echo "configure: failed program was:" >&5
3920 cat conftest.$ac_ext >&5
3921 rm -rf conftest*
3922 libjava_cv_struct_hostent_data=no
3923 fi
3924 rm -f conftest*
3925 fi
3926
3927 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
3928 if test "x$libjava_cv_struct_hostent_data" = xyes; then
3929 cat >> confdefs.h <<\EOF
3930 #define HAVE_STRUCT_HOSTENT_DATA 1
3931 EOF
3932
3933 fi
3934
3935 else
3936 echo "$ac_t""no" 1>&6
3937 fi
3938 done
3939
3940
3941 for ac_func in gethostbyaddr_r
3942 do
3943 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3944 echo "configure:3945: checking for $ac_func" >&5
3945 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3946 echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948 cat > conftest.$ac_ext <<EOF
3949 #line 3950 "configure"
3950 #include "confdefs.h"
3951 /* System header to define __stub macros and hopefully few prototypes,
3952 which can conflict with char $ac_func(); below. */
3953 #include <assert.h>
3954 /* Override any gcc2 internal prototype to avoid an error. */
3955 /* We use char because int might match the return type of a gcc2
3956 builtin and then its argument prototype would still apply. */
3957 char $ac_func();
3958
3959 int main() {
3960
3961 /* The GNU C library defines this for functions which it implements
3962 to always fail with ENOSYS. Some functions are actually named
3963 something starting with __ and the normal name is an alias. */
3964 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3965 choke me
3966 #else
3967 $ac_func();
3968 #endif
3969
3970 ; return 0; }
3971 EOF
3972 if { (eval echo configure:3973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3973 rm -rf conftest*
3974 eval "ac_cv_func_$ac_func=yes"
3975 else
3976 echo "configure: failed program was:" >&5
3977 cat conftest.$ac_ext >&5
3978 rm -rf conftest*
3979 eval "ac_cv_func_$ac_func=no"
3980 fi
3981 rm -f conftest*
3982 fi
3983
3984 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3985 echo "$ac_t""yes" 1>&6
3986 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3987 cat >> confdefs.h <<EOF
3988 #define $ac_tr_func 1
3989 EOF
3990
3991 cat >> confdefs.h <<\EOF
3992 #define HAVE_GETHOSTBYADDR_R 1
3993 EOF
3994
3995 # There are two different kinds of gethostbyaddr_r.
3996 # We look for the one that returns `int'.
3997 # Hopefully this check is robust enough.
3998 cat > conftest.$ac_ext <<EOF
3999 #line 4000 "configure"
4000 #include "confdefs.h"
4001 #include <netdb.h>
4002 EOF
4003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4004 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
4005 rm -rf conftest*
4006
4007 cat >> confdefs.h <<\EOF
4008 #define GETHOSTBYADDR_R_RETURNS_INT 1
4009 EOF
4010
4011 fi
4012 rm -f conftest*
4013
4014 else
4015 echo "$ac_t""no" 1>&6
4016 fi
4017 done
4018
4019
4020 for ac_func in gethostname
4021 do
4022 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4023 echo "configure:4024: checking for $ac_func" >&5
4024 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4025 echo $ac_n "(cached) $ac_c" 1>&6
4026 else
4027 cat > conftest.$ac_ext <<EOF
4028 #line 4029 "configure"
4029 #include "confdefs.h"
4030 /* System header to define __stub macros and hopefully few prototypes,
4031 which can conflict with char $ac_func(); below. */
4032 #include <assert.h>
4033 /* Override any gcc2 internal prototype to avoid an error. */
4034 /* We use char because int might match the return type of a gcc2
4035 builtin and then its argument prototype would still apply. */
4036 char $ac_func();
4037
4038 int main() {
4039
4040 /* The GNU C library defines this for functions which it implements
4041 to always fail with ENOSYS. Some functions are actually named
4042 something starting with __ and the normal name is an alias. */
4043 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4044 choke me
4045 #else
4046 $ac_func();
4047 #endif
4048
4049 ; return 0; }
4050 EOF
4051 if { (eval echo configure:4052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4052 rm -rf conftest*
4053 eval "ac_cv_func_$ac_func=yes"
4054 else
4055 echo "configure: failed program was:" >&5
4056 cat conftest.$ac_ext >&5
4057 rm -rf conftest*
4058 eval "ac_cv_func_$ac_func=no"
4059 fi
4060 rm -f conftest*
4061 fi
4062
4063 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4064 echo "$ac_t""yes" 1>&6
4065 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4066 cat >> confdefs.h <<EOF
4067 #define $ac_tr_func 1
4068 EOF
4069
4070 cat >> confdefs.h <<\EOF
4071 #define HAVE_GETHOSTNAME 1
4072 EOF
4073
4074 cat > conftest.$ac_ext <<EOF
4075 #line 4076 "configure"
4076 #include "confdefs.h"
4077 #include <unistd.h>
4078 EOF
4079 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4080 egrep "gethostname" >/dev/null 2>&1; then
4081 rm -rf conftest*
4082
4083 cat >> confdefs.h <<\EOF
4084 #define HAVE_GETHOSTNAME_DECL 1
4085 EOF
4086
4087 fi
4088 rm -f conftest*
4089
4090 else
4091 echo "$ac_t""no" 1>&6
4092 fi
4093 done
4094
4095
4096 # Look for these functions in the thread library, but only bother
4097 # if using POSIX threads.
4098 if test "$THREADS" = posix; then
4099 save_LIBS="$LIBS"
4100 LIBS="$LIBS $THREADLIBS"
4101 # Some POSIX thread systems don't have pthread_mutexattr_settype.
4102 # E.g., Solaris.
4103 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
4104 do
4105 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4106 echo "configure:4107: checking for $ac_func" >&5
4107 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4108 echo $ac_n "(cached) $ac_c" 1>&6
4109 else
4110 cat > conftest.$ac_ext <<EOF
4111 #line 4112 "configure"
4112 #include "confdefs.h"
4113 /* System header to define __stub macros and hopefully few prototypes,
4114 which can conflict with char $ac_func(); below. */
4115 #include <assert.h>
4116 /* Override any gcc2 internal prototype to avoid an error. */
4117 /* We use char because int might match the return type of a gcc2
4118 builtin and then its argument prototype would still apply. */
4119 char $ac_func();
4120
4121 int main() {
4122
4123 /* The GNU C library defines this for functions which it implements
4124 to always fail with ENOSYS. Some functions are actually named
4125 something starting with __ and the normal name is an alias. */
4126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4127 choke me
4128 #else
4129 $ac_func();
4130 #endif
4131
4132 ; return 0; }
4133 EOF
4134 if { (eval echo configure:4135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4135 rm -rf conftest*
4136 eval "ac_cv_func_$ac_func=yes"
4137 else
4138 echo "configure: failed program was:" >&5
4139 cat conftest.$ac_ext >&5
4140 rm -rf conftest*
4141 eval "ac_cv_func_$ac_func=no"
4142 fi
4143 rm -f conftest*
4144 fi
4145
4146 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4147 echo "$ac_t""yes" 1>&6
4148 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4149 cat >> confdefs.h <<EOF
4150 #define $ac_tr_func 1
4151 EOF
4152
4153 else
4154 echo "$ac_t""no" 1>&6
4155 fi
4156 done
4157
4158
4159 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
4160 # Solaris 7 the name librt is preferred.
4161 for ac_func in sched_yield
4162 do
4163 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4164 echo "configure:4165: checking for $ac_func" >&5
4165 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4166 echo $ac_n "(cached) $ac_c" 1>&6
4167 else
4168 cat > conftest.$ac_ext <<EOF
4169 #line 4170 "configure"
4170 #include "confdefs.h"
4171 /* System header to define __stub macros and hopefully few prototypes,
4172 which can conflict with char $ac_func(); below. */
4173 #include <assert.h>
4174 /* Override any gcc2 internal prototype to avoid an error. */
4175 /* We use char because int might match the return type of a gcc2
4176 builtin and then its argument prototype would still apply. */
4177 char $ac_func();
4178
4179 int main() {
4180
4181 /* The GNU C library defines this for functions which it implements
4182 to always fail with ENOSYS. Some functions are actually named
4183 something starting with __ and the normal name is an alias. */
4184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4185 choke me
4186 #else
4187 $ac_func();
4188 #endif
4189
4190 ; return 0; }
4191 EOF
4192 if { (eval echo configure:4193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4193 rm -rf conftest*
4194 eval "ac_cv_func_$ac_func=yes"
4195 else
4196 echo "configure: failed program was:" >&5
4197 cat conftest.$ac_ext >&5
4198 rm -rf conftest*
4199 eval "ac_cv_func_$ac_func=no"
4200 fi
4201 rm -f conftest*
4202 fi
4203
4204 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4205 echo "$ac_t""yes" 1>&6
4206 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4207 cat >> confdefs.h <<EOF
4208 #define $ac_tr_func 1
4209 EOF
4210
4211 else
4212 echo "$ac_t""no" 1>&6
4213 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4214 echo "configure:4215: checking for sched_yield in -lrt" >&5
4215 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4216 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4217 echo $ac_n "(cached) $ac_c" 1>&6
4218 else
4219 ac_save_LIBS="$LIBS"
4220 LIBS="-lrt $LIBS"
4221 cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 /* Override any gcc2 internal prototype to avoid an error. */
4225 /* We use char because int might match the return type of a gcc2
4226 builtin and then its argument prototype would still apply. */
4227 char sched_yield();
4228
4229 int main() {
4230 sched_yield()
4231 ; return 0; }
4232 EOF
4233 if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4234 rm -rf conftest*
4235 eval "ac_cv_lib_$ac_lib_var=yes"
4236 else
4237 echo "configure: failed program was:" >&5
4238 cat conftest.$ac_ext >&5
4239 rm -rf conftest*
4240 eval "ac_cv_lib_$ac_lib_var=no"
4241 fi
4242 rm -f conftest*
4243 LIBS="$ac_save_LIBS"
4244
4245 fi
4246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4247 echo "$ac_t""yes" 1>&6
4248
4249 cat >> confdefs.h <<\EOF
4250 #define HAVE_SCHED_YIELD 1
4251 EOF
4252
4253 THREADLIBS="$THREADLIBS -lrt"
4254 THREADSPEC="$THREADSPEC -lrt"
4255 else
4256 echo "$ac_t""no" 1>&6
4257
4258 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
4259 echo "configure:4260: checking for sched_yield in -lposix4" >&5
4260 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
4261 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4262 echo $ac_n "(cached) $ac_c" 1>&6
4263 else
4264 ac_save_LIBS="$LIBS"
4265 LIBS="-lposix4 $LIBS"
4266 cat > conftest.$ac_ext <<EOF
4267 #line 4268 "configure"
4268 #include "confdefs.h"
4269 /* Override any gcc2 internal prototype to avoid an error. */
4270 /* We use char because int might match the return type of a gcc2
4271 builtin and then its argument prototype would still apply. */
4272 char sched_yield();
4273
4274 int main() {
4275 sched_yield()
4276 ; return 0; }
4277 EOF
4278 if { (eval echo configure:4279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4279 rm -rf conftest*
4280 eval "ac_cv_lib_$ac_lib_var=yes"
4281 else
4282 echo "configure: failed program was:" >&5
4283 cat conftest.$ac_ext >&5
4284 rm -rf conftest*
4285 eval "ac_cv_lib_$ac_lib_var=no"
4286 fi
4287 rm -f conftest*
4288 LIBS="$ac_save_LIBS"
4289
4290 fi
4291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4292 echo "$ac_t""yes" 1>&6
4293
4294 cat >> confdefs.h <<\EOF
4295 #define HAVE_SCHED_YIELD 1
4296 EOF
4297
4298 THREADLIBS="$THREADLIBS -lposix4"
4299 THREADSPEC="$THREADSPEC -lposix4"
4300 else
4301 echo "$ac_t""no" 1>&6
4302 fi
4303
4304 fi
4305
4306 fi
4307 done
4308
4309 LIBS="$save_LIBS"
4310
4311 # We can save a little space at runtime if the mutex has m_count
4312 # or __m_count. This is a nice hack for Linux.
4313 cat > conftest.$ac_ext <<EOF
4314 #line 4315 "configure"
4315 #include "confdefs.h"
4316 #include <pthread.h>
4317 int main() {
4318
4319 extern pthread_mutex_t *mutex; int q = mutex->m_count;
4320
4321 ; return 0; }
4322 EOF
4323 if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4324 rm -rf conftest*
4325 cat >> confdefs.h <<\EOF
4326 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
4327 EOF
4328
4329 else
4330 echo "configure: failed program was:" >&5
4331 cat conftest.$ac_ext >&5
4332 rm -rf conftest*
4333
4334 cat > conftest.$ac_ext <<EOF
4335 #line 4336 "configure"
4336 #include "confdefs.h"
4337 #include <pthread.h>
4338 int main() {
4339
4340 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
4341
4342 ; return 0; }
4343 EOF
4344 if { (eval echo configure:4345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4345 rm -rf conftest*
4346 cat >> confdefs.h <<\EOF
4347 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
4348 EOF
4349
4350 else
4351 echo "configure: failed program was:" >&5
4352 cat conftest.$ac_ext >&5
4353 fi
4354 rm -f conftest*
4355 fi
4356 rm -f conftest*
4357 fi
4358
4359 # We require a way to get the time.
4360 time_found=no
4361 for ac_func in gettimeofday time ftime
4362 do
4363 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4364 echo "configure:4365: checking for $ac_func" >&5
4365 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4366 echo $ac_n "(cached) $ac_c" 1>&6
4367 else
4368 cat > conftest.$ac_ext <<EOF
4369 #line 4370 "configure"
4370 #include "confdefs.h"
4371 /* System header to define __stub macros and hopefully few prototypes,
4372 which can conflict with char $ac_func(); below. */
4373 #include <assert.h>
4374 /* Override any gcc2 internal prototype to avoid an error. */
4375 /* We use char because int might match the return type of a gcc2
4376 builtin and then its argument prototype would still apply. */
4377 char $ac_func();
4378
4379 int main() {
4380
4381 /* The GNU C library defines this for functions which it implements
4382 to always fail with ENOSYS. Some functions are actually named
4383 something starting with __ and the normal name is an alias. */
4384 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4385 choke me
4386 #else
4387 $ac_func();
4388 #endif
4389
4390 ; return 0; }
4391 EOF
4392 if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4393 rm -rf conftest*
4394 eval "ac_cv_func_$ac_func=yes"
4395 else
4396 echo "configure: failed program was:" >&5
4397 cat conftest.$ac_ext >&5
4398 rm -rf conftest*
4399 eval "ac_cv_func_$ac_func=no"
4400 fi
4401 rm -f conftest*
4402 fi
4403
4404 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4405 echo "$ac_t""yes" 1>&6
4406 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4407 cat >> confdefs.h <<EOF
4408 #define $ac_tr_func 1
4409 EOF
4410 time_found=yes
4411 else
4412 echo "$ac_t""no" 1>&6
4413 fi
4414 done
4415
4416 if test "$time_found" = no; then
4417 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
4418 fi
4419
4420 for ac_func in memmove
4421 do
4422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4423 echo "configure:4424: checking for $ac_func" >&5
4424 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4425 echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 /* System header to define __stub macros and hopefully few prototypes,
4431 which can conflict with char $ac_func(); below. */
4432 #include <assert.h>
4433 /* Override any gcc2 internal prototype to avoid an error. */
4434 /* We use char because int might match the return type of a gcc2
4435 builtin and then its argument prototype would still apply. */
4436 char $ac_func();
4437
4438 int main() {
4439
4440 /* The GNU C library defines this for functions which it implements
4441 to always fail with ENOSYS. Some functions are actually named
4442 something starting with __ and the normal name is an alias. */
4443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4444 choke me
4445 #else
4446 $ac_func();
4447 #endif
4448
4449 ; return 0; }
4450 EOF
4451 if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4452 rm -rf conftest*
4453 eval "ac_cv_func_$ac_func=yes"
4454 else
4455 echo "configure: failed program was:" >&5
4456 cat conftest.$ac_ext >&5
4457 rm -rf conftest*
4458 eval "ac_cv_func_$ac_func=no"
4459 fi
4460 rm -f conftest*
4461 fi
4462
4463 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4464 echo "$ac_t""yes" 1>&6
4465 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4466 cat >> confdefs.h <<EOF
4467 #define $ac_tr_func 1
4468 EOF
4469
4470 else
4471 echo "$ac_t""no" 1>&6
4472 fi
4473 done
4474
4475
4476 # We require memcpy.
4477 memcpy_found=no
4478 for ac_func in memcpy
4479 do
4480 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4481 echo "configure:4482: checking for $ac_func" >&5
4482 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4483 echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485 cat > conftest.$ac_ext <<EOF
4486 #line 4487 "configure"
4487 #include "confdefs.h"
4488 /* System header to define __stub macros and hopefully few prototypes,
4489 which can conflict with char $ac_func(); below. */
4490 #include <assert.h>
4491 /* Override any gcc2 internal prototype to avoid an error. */
4492 /* We use char because int might match the return type of a gcc2
4493 builtin and then its argument prototype would still apply. */
4494 char $ac_func();
4495
4496 int main() {
4497
4498 /* The GNU C library defines this for functions which it implements
4499 to always fail with ENOSYS. Some functions are actually named
4500 something starting with __ and the normal name is an alias. */
4501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4502 choke me
4503 #else
4504 $ac_func();
4505 #endif
4506
4507 ; return 0; }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510 rm -rf conftest*
4511 eval "ac_cv_func_$ac_func=yes"
4512 else
4513 echo "configure: failed program was:" >&5
4514 cat conftest.$ac_ext >&5
4515 rm -rf conftest*
4516 eval "ac_cv_func_$ac_func=no"
4517 fi
4518 rm -f conftest*
4519 fi
4520
4521 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4522 echo "$ac_t""yes" 1>&6
4523 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4524 cat >> confdefs.h <<EOF
4525 #define $ac_tr_func 1
4526 EOF
4527 memcpy_found=yes
4528 else
4529 echo "$ac_t""no" 1>&6
4530 fi
4531 done
4532
4533 if test "$memcpy_found" = no; then
4534 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
4535 fi
4536
4537 # Some library-finding code we stole from Tcl.
4538 #--------------------------------------------------------------------
4539 # Check for the existence of the -lsocket and -lnsl libraries.
4540 # The order here is important, so that they end up in the right
4541 # order in the command line generated by make. Here are some
4542 # special considerations:
4543 # 1. Use "connect" and "accept" to check for -lsocket, and
4544 # "gethostbyname" to check for -lnsl.
4545 # 2. Use each function name only once: can't redo a check because
4546 # autoconf caches the results of the last check and won't redo it.
4547 # 3. Use -lnsl and -lsocket only if they supply procedures that
4548 # aren't already present in the normal libraries. This is because
4549 # IRIX 5.2 has libraries, but they aren't needed and they're
4550 # bogus: they goof up name resolution if used.
4551 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4552 # To get around this problem, check for both libraries together
4553 # if -lsocket doesn't work by itself.
4554 #--------------------------------------------------------------------
4555
4556 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
4557 echo "configure:4558: checking for socket libraries" >&5
4558 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
4559 echo $ac_n "(cached) $ac_c" 1>&6
4560 else
4561 gcj_cv_lib_sockets=
4562 gcj_checkBoth=0
4563 unset ac_cv_func_connect
4564 echo $ac_n "checking for connect""... $ac_c" 1>&6
4565 echo "configure:4566: checking for connect" >&5
4566 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4567 echo $ac_n "(cached) $ac_c" 1>&6
4568 else
4569 cat > conftest.$ac_ext <<EOF
4570 #line 4571 "configure"
4571 #include "confdefs.h"
4572 /* System header to define __stub macros and hopefully few prototypes,
4573 which can conflict with char connect(); below. */
4574 #include <assert.h>
4575 /* Override any gcc2 internal prototype to avoid an error. */
4576 /* We use char because int might match the return type of a gcc2
4577 builtin and then its argument prototype would still apply. */
4578 char connect();
4579
4580 int main() {
4581
4582 /* The GNU C library defines this for functions which it implements
4583 to always fail with ENOSYS. Some functions are actually named
4584 something starting with __ and the normal name is an alias. */
4585 #if defined (__stub_connect) || defined (__stub___connect)
4586 choke me
4587 #else
4588 connect();
4589 #endif
4590
4591 ; return 0; }
4592 EOF
4593 if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4594 rm -rf conftest*
4595 eval "ac_cv_func_connect=yes"
4596 else
4597 echo "configure: failed program was:" >&5
4598 cat conftest.$ac_ext >&5
4599 rm -rf conftest*
4600 eval "ac_cv_func_connect=no"
4601 fi
4602 rm -f conftest*
4603 fi
4604
4605 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4606 echo "$ac_t""yes" 1>&6
4607 gcj_checkSocket=0
4608 else
4609 echo "$ac_t""no" 1>&6
4610 gcj_checkSocket=1
4611 fi
4612
4613 if test "$gcj_checkSocket" = 1; then
4614 unset ac_cv_func_connect
4615 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
4616 echo "configure:4617: checking for main in -lsocket" >&5
4617 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
4618 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4619 echo $ac_n "(cached) $ac_c" 1>&6
4620 else
4621 ac_save_LIBS="$LIBS"
4622 LIBS="-lsocket $LIBS"
4623 cat > conftest.$ac_ext <<EOF
4624 #line 4625 "configure"
4625 #include "confdefs.h"
4626
4627 int main() {
4628 main()
4629 ; return 0; }
4630 EOF
4631 if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4632 rm -rf conftest*
4633 eval "ac_cv_lib_$ac_lib_var=yes"
4634 else
4635 echo "configure: failed program was:" >&5
4636 cat conftest.$ac_ext >&5
4637 rm -rf conftest*
4638 eval "ac_cv_lib_$ac_lib_var=no"
4639 fi
4640 rm -f conftest*
4641 LIBS="$ac_save_LIBS"
4642
4643 fi
4644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4645 echo "$ac_t""yes" 1>&6
4646 gcj_cv_lib_sockets="-lsocket"
4647 else
4648 echo "$ac_t""no" 1>&6
4649 gcj_checkBoth=1
4650 fi
4651
4652 fi
4653 if test "$gcj_checkBoth" = 1; then
4654 gcj_oldLibs=$LIBS
4655 LIBS="$LIBS -lsocket -lnsl"
4656 unset ac_cv_func_accept
4657 echo $ac_n "checking for accept""... $ac_c" 1>&6
4658 echo "configure:4659: checking for accept" >&5
4659 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
4660 echo $ac_n "(cached) $ac_c" 1>&6
4661 else
4662 cat > conftest.$ac_ext <<EOF
4663 #line 4664 "configure"
4664 #include "confdefs.h"
4665 /* System header to define __stub macros and hopefully few prototypes,
4666 which can conflict with char accept(); below. */
4667 #include <assert.h>
4668 /* Override any gcc2 internal prototype to avoid an error. */
4669 /* We use char because int might match the return type of a gcc2
4670 builtin and then its argument prototype would still apply. */
4671 char accept();
4672
4673 int main() {
4674
4675 /* The GNU C library defines this for functions which it implements
4676 to always fail with ENOSYS. Some functions are actually named
4677 something starting with __ and the normal name is an alias. */
4678 #if defined (__stub_accept) || defined (__stub___accept)
4679 choke me
4680 #else
4681 accept();
4682 #endif
4683
4684 ; return 0; }
4685 EOF
4686 if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4687 rm -rf conftest*
4688 eval "ac_cv_func_accept=yes"
4689 else
4690 echo "configure: failed program was:" >&5
4691 cat conftest.$ac_ext >&5
4692 rm -rf conftest*
4693 eval "ac_cv_func_accept=no"
4694 fi
4695 rm -f conftest*
4696 fi
4697
4698 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
4699 echo "$ac_t""yes" 1>&6
4700 gcj_checkNsl=0
4701 gcj_cv_lib_sockets="-lsocket -lnsl"
4702 else
4703 echo "$ac_t""no" 1>&6
4704 fi
4705
4706 unset ac_cv_func_accept
4707 LIBS=$gcj_oldLibs
4708 fi
4709 unset ac_cv_func_gethostbyname
4710 gcj_oldLibs=$LIBS
4711 LIBS="$LIBS $gcj_cv_lib_sockets"
4712 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4713 echo "configure:4714: checking for gethostbyname" >&5
4714 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4715 echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717 cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 /* System header to define __stub macros and hopefully few prototypes,
4721 which can conflict with char gethostbyname(); below. */
4722 #include <assert.h>
4723 /* Override any gcc2 internal prototype to avoid an error. */
4724 /* We use char because int might match the return type of a gcc2
4725 builtin and then its argument prototype would still apply. */
4726 char gethostbyname();
4727
4728 int main() {
4729
4730 /* The GNU C library defines this for functions which it implements
4731 to always fail with ENOSYS. Some functions are actually named
4732 something starting with __ and the normal name is an alias. */
4733 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4734 choke me
4735 #else
4736 gethostbyname();
4737 #endif
4738
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742 rm -rf conftest*
4743 eval "ac_cv_func_gethostbyname=yes"
4744 else
4745 echo "configure: failed program was:" >&5
4746 cat conftest.$ac_ext >&5
4747 rm -rf conftest*
4748 eval "ac_cv_func_gethostbyname=no"
4749 fi
4750 rm -f conftest*
4751 fi
4752
4753 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4754 echo "$ac_t""yes" 1>&6
4755 :
4756 else
4757 echo "$ac_t""no" 1>&6
4758 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
4759 echo "configure:4760: checking for main in -lnsl" >&5
4760 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
4761 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4762 echo $ac_n "(cached) $ac_c" 1>&6
4763 else
4764 ac_save_LIBS="$LIBS"
4765 LIBS="-lnsl $LIBS"
4766 cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769
4770 int main() {
4771 main()
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775 rm -rf conftest*
4776 eval "ac_cv_lib_$ac_lib_var=yes"
4777 else
4778 echo "configure: failed program was:" >&5
4779 cat conftest.$ac_ext >&5
4780 rm -rf conftest*
4781 eval "ac_cv_lib_$ac_lib_var=no"
4782 fi
4783 rm -f conftest*
4784 LIBS="$ac_save_LIBS"
4785
4786 fi
4787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4788 echo "$ac_t""yes" 1>&6
4789 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
4790 else
4791 echo "$ac_t""no" 1>&6
4792 fi
4793
4794 fi
4795
4796 unset ac_cv_func_gethostbyname
4797 LIBS=$gcj_oldLIBS
4798
4799 fi
4800
4801 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
4802 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
4803
4804 if test "$with_system_zlib" = yes; then
4805 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
4806 echo "configure:4807: checking for deflate in -lz" >&5
4807 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
4808 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4809 echo $ac_n "(cached) $ac_c" 1>&6
4810 else
4811 ac_save_LIBS="$LIBS"
4812 LIBS="-lz $LIBS"
4813 cat > conftest.$ac_ext <<EOF
4814 #line 4815 "configure"
4815 #include "confdefs.h"
4816 /* Override any gcc2 internal prototype to avoid an error. */
4817 /* We use char because int might match the return type of a gcc2
4818 builtin and then its argument prototype would still apply. */
4819 char deflate();
4820
4821 int main() {
4822 deflate()
4823 ; return 0; }
4824 EOF
4825 if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4826 rm -rf conftest*
4827 eval "ac_cv_lib_$ac_lib_var=yes"
4828 else
4829 echo "configure: failed program was:" >&5
4830 cat conftest.$ac_ext >&5
4831 rm -rf conftest*
4832 eval "ac_cv_lib_$ac_lib_var=no"
4833 fi
4834 rm -f conftest*
4835 LIBS="$ac_save_LIBS"
4836
4837 fi
4838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4839 echo "$ac_t""yes" 1>&6
4840 ZLIBSPEC=-lz
4841 else
4842 echo "$ac_t""no" 1>&6
4843 ZLIBSPEC=-lzgcj
4844 fi
4845
4846 else
4847 ZLIBSPEC=-lzgcj
4848 ZLIBTESTSPEC="-L`pwd`/../zlib/.libs -rpath `pwd`/../zlib/.libs"
4849 fi
4850
4851 # On Solaris, and maybe other architectures, the Boehm collector
4852 # requires -ldl.
4853 if test "$GC" = boehm; then
4854 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
4855 echo "configure:4856: checking for main in -ldl" >&5
4856 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
4857 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4858 echo $ac_n "(cached) $ac_c" 1>&6
4859 else
4860 ac_save_LIBS="$LIBS"
4861 LIBS="-ldl $LIBS"
4862 cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865
4866 int main() {
4867 main()
4868 ; return 0; }
4869 EOF
4870 if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4871 rm -rf conftest*
4872 eval "ac_cv_lib_$ac_lib_var=yes"
4873 else
4874 echo "configure: failed program was:" >&5
4875 cat conftest.$ac_ext >&5
4876 rm -rf conftest*
4877 eval "ac_cv_lib_$ac_lib_var=no"
4878 fi
4879 rm -f conftest*
4880 LIBS="$ac_save_LIBS"
4881
4882 fi
4883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4884 echo "$ac_t""yes" 1>&6
4885 SYSTEMSPEC="$SYSTEMSPEC -ldl"
4886 else
4887 echo "$ac_t""no" 1>&6
4888 fi
4889
4890 fi
4891
4892 if test -z "${with_multisubdir}"; then
4893 builddotdot=.
4894 else
4895
4896 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
4897
4898 fi
4899 if test -x "${builddotdot}/../../gcc/gcj"; then
4900 dir="`cd ${builddotdot}/../../gcc && pwd`"
4901 GCJ="$dir/gcj -B`pwd`/ -B$dir/"
4902 else
4903 CANADIAN=yes
4904 NULL_TARGET=yes
4905 GCJ="gcj -B`pwd`/"
4906 fi
4907 fi
4908
4909 # Create it, so that compile/link tests don't fail
4910 test -f libgcj.spec || touch libgcj.spec
4911
4912
4913 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
4914 set dummy ${ac_tool_prefix}gcj; ac_word=$2
4915 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4916 echo "configure:4917: checking for $ac_word" >&5
4917 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
4918 echo $ac_n "(cached) $ac_c" 1>&6
4919 else
4920 if test -n "$GCJ"; then
4921 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
4922 else
4923 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4924 ac_dummy="$PATH"
4925 for ac_dir in $ac_dummy; do
4926 test -z "$ac_dir" && ac_dir=.
4927 if test -f $ac_dir/$ac_word; then
4928 ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
4929 break
4930 fi
4931 done
4932 IFS="$ac_save_ifs"
4933 fi
4934 fi
4935 GCJ="$ac_cv_prog_GCJ"
4936 if test -n "$GCJ"; then
4937 echo "$ac_t""$GCJ" 1>&6
4938 else
4939 echo "$ac_t""no" 1>&6
4940 fi
4941
4942
4943 if test -z "$ac_cv_prog_GCJ"; then
4944 if test -n "$ac_tool_prefix"; then
4945 # Extract the first word of "gcj", so it can be a program name with args.
4946 set dummy gcj; ac_word=$2
4947 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4948 echo "configure:4949: checking for $ac_word" >&5
4949 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
4950 echo $ac_n "(cached) $ac_c" 1>&6
4951 else
4952 if test -n "$GCJ"; then
4953 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
4954 else
4955 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4956 ac_dummy="$PATH"
4957 for ac_dir in $ac_dummy; do
4958 test -z "$ac_dir" && ac_dir=.
4959 if test -f $ac_dir/$ac_word; then
4960 ac_cv_prog_GCJ="gcj"
4961 break
4962 fi
4963 done
4964 IFS="$ac_save_ifs"
4965 test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
4966 fi
4967 fi
4968 GCJ="$ac_cv_prog_GCJ"
4969 if test -n "$GCJ"; then
4970 echo "$ac_t""$GCJ" 1>&6
4971 else
4972 echo "$ac_t""no" 1>&6
4973 fi
4974
4975 else
4976 GCJ="no"
4977 fi
4978 fi
4979
4980 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
4981
4982
4983
4984 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
4985 lt_save_CC="$CC"
4986 lt_save_CFLAGS="$CFLAGS"
4987 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="" \
4988 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
4989 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
4990 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
4991 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
4992 deplibs_check_method="$deplibs_check_method" \
4993 file_magic_cmd="$file_magic_cmd" \
4994 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
4995 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
4996 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
4997 CC="$lt_save_CC"
4998 CFLAGS="$lt_save_CFLAGS"
4999
5000 # Redirect the config.log output again, so that the ltconfig log is not
5001 # clobbered by the next message.
5002 exec 5>>./config.log
5003
5004
5005
5006
5007 echo $ac_n "checking size of void *""... $ac_c" 1>&6
5008 echo "configure:5009: checking size of void *" >&5
5009 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
5010 echo $ac_n "(cached) $ac_c" 1>&6
5011 else
5012 if test "$cross_compiling" = yes; then
5013 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5014 else
5015 cat > conftest.$ac_ext <<EOF
5016 #line 5017 "configure"
5017 #include "confdefs.h"
5018 #include <stdio.h>
5019 main()
5020 {
5021 FILE *f=fopen("conftestval", "w");
5022 if (!f) exit(1);
5023 fprintf(f, "%d\n", sizeof(void *));
5024 exit(0);
5025 }
5026 EOF
5027 if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5028 then
5029 ac_cv_sizeof_void_p=`cat conftestval`
5030 else
5031 echo "configure: failed program was:" >&5
5032 cat conftest.$ac_ext >&5
5033 rm -fr conftest*
5034 ac_cv_sizeof_void_p=0
5035 fi
5036 rm -fr conftest*
5037 fi
5038
5039 fi
5040 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
5041 cat >> confdefs.h <<EOF
5042 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
5043 EOF
5044
5045
5046
5047 ZLIBS=
5048 ZDEPS=
5049 ZINCS=
5050 if test "x$ZLIBSPEC" = "x-lzgcj"; then
5051 # We include the path to the zlib build directory.
5052 # See Makefile.am to understand why.
5053 ZDEPS='$(top_builddir)/../zlib/libzgcj.la'
5054 ZLIBS="$ZDEPS -L\$(here)/../zlib/$libsubdir"
5055 ZINCS='-I$(top_srcdir)/../zlib'
5056 else
5057 ZLIBS="$ZLIBSPEC"
5058 fi
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068 if test "$CANADIAN" = yes; then
5069 CANADIAN_TRUE=
5070 CANADIAN_FALSE='#'
5071 else
5072 CANADIAN_TRUE='#'
5073 CANADIAN_FALSE=
5074 fi
5075
5076
5077 if test "$NULL_TARGET" = yes; then
5078 NULL_TARGET_TRUE=
5079 NULL_TARGET_FALSE='#'
5080 else
5081 NULL_TARGET_TRUE='#'
5082 NULL_TARGET_FALSE=
5083 fi
5084
5085
5086 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
5087 NATIVE_TRUE=
5088 NATIVE_FALSE='#'
5089 else
5090 NATIVE_TRUE='#'
5091 NATIVE_FALSE=
5092 fi
5093
5094
5095 if test -z "$with_cross_host"; then
5096 USE_LIBDIR_TRUE=
5097 USE_LIBDIR_FALSE='#'
5098 else
5099 USE_LIBDIR_TRUE='#'
5100 USE_LIBDIR_FALSE=
5101 fi
5102
5103
5104 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
5105 NEEDS_DATA_START_TRUE=
5106 NEEDS_DATA_START_FALSE='#'
5107 else
5108 NEEDS_DATA_START_TRUE='#'
5109 NEEDS_DATA_START_FALSE=
5110 fi
5111
5112
5113 # Determine gcj version number.
5114
5115 gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
5116
5117 cat >> confdefs.h <<EOF
5118 #define GCJVERSION "$gcjvers"
5119 EOF
5120
5121
5122 # See if gcj supports -fuse-divide-subroutine. gcc 2.95 does not, and
5123 # we want to continue to support that version.
5124 echo $ac_n "checking whether gcj supports -fuse-divide-subroutine""... $ac_c" 1>&6
5125 echo "configure:5126: checking whether gcj supports -fuse-divide-subroutine" >&5
5126 cat > conftest.java << 'END'
5127 public class conftest { }
5128 END
5129 use_fuse=yes
5130 $GCJ -classpath $srcdir -fuse-divide-subroutine -fsyntax-only \
5131 conftest.java > /dev/null 2>&1 \
5132 || use_fuse=no
5133 rm -f conftest.java
5134 if test "$use_fuse" = no; then
5135 DIVIDESPEC=
5136 fi
5137 echo "$ac_t""$use_fuse" 1>&6
5138
5139
5140
5141 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
5142 echo "configure:5143: checking for g++ -ffloat-store bug" >&5
5143 save_CFLAGS="$CFLAGS"
5144 CFLAGS="-x c++ -O2 -ffloat-store"
5145 cat > conftest.$ac_ext <<EOF
5146 #line 5147 "configure"
5147 #include "confdefs.h"
5148 #include <math.h>
5149 int main() {
5150
5151 ; return 0; }
5152 EOF
5153 if { (eval echo configure:5154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5154 rm -rf conftest*
5155 echo "$ac_t""no" 1>&6
5156 else
5157 echo "configure: failed program was:" >&5
5158 cat conftest.$ac_ext >&5
5159 rm -rf conftest*
5160 cat >> confdefs.h <<\EOF
5161 #define __NO_MATH_INLINES 1
5162 EOF
5163
5164 echo "$ac_t""yes" 1>&6
5165 fi
5166 rm -f conftest*
5167 CFLAGS="$save_CFLAGS"
5168
5169 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
5170 do
5171 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5172 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5173 echo "configure:5174: checking for $ac_hdr" >&5
5174 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5175 echo $ac_n "(cached) $ac_c" 1>&6
5176 else
5177 cat > conftest.$ac_ext <<EOF
5178 #line 5179 "configure"
5179 #include "confdefs.h"
5180 #include <$ac_hdr>
5181 EOF
5182 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5183 { (eval echo configure:5184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5184 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5185 if test -z "$ac_err"; then
5186 rm -rf conftest*
5187 eval "ac_cv_header_$ac_safe=yes"
5188 else
5189 echo "$ac_err" >&5
5190 echo "configure: failed program was:" >&5
5191 cat conftest.$ac_ext >&5
5192 rm -rf conftest*
5193 eval "ac_cv_header_$ac_safe=no"
5194 fi
5195 rm -f conftest*
5196 fi
5197 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5198 echo "$ac_t""yes" 1>&6
5199 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5200 cat >> confdefs.h <<EOF
5201 #define $ac_tr_hdr 1
5202 EOF
5203
5204 else
5205 echo "$ac_t""no" 1>&6
5206 fi
5207 done
5208
5209 for ac_hdr in dirent.h
5210 do
5211 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5212 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5213 echo "configure:5214: checking for $ac_hdr" >&5
5214 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5215 echo $ac_n "(cached) $ac_c" 1>&6
5216 else
5217 cat > conftest.$ac_ext <<EOF
5218 #line 5219 "configure"
5219 #include "confdefs.h"
5220 #include <$ac_hdr>
5221 EOF
5222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5223 { (eval echo configure:5224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5225 if test -z "$ac_err"; then
5226 rm -rf conftest*
5227 eval "ac_cv_header_$ac_safe=yes"
5228 else
5229 echo "$ac_err" >&5
5230 echo "configure: failed program was:" >&5
5231 cat conftest.$ac_ext >&5
5232 rm -rf conftest*
5233 eval "ac_cv_header_$ac_safe=no"
5234 fi
5235 rm -f conftest*
5236 fi
5237 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5238 echo "$ac_t""yes" 1>&6
5239 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5240 cat >> confdefs.h <<EOF
5241 #define $ac_tr_hdr 1
5242 EOF
5243
5244 else
5245 echo "$ac_t""no" 1>&6
5246 fi
5247 done
5248
5249
5250 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5251 echo "configure:5252: checking for ANSI C header files" >&5
5252 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5253 echo $ac_n "(cached) $ac_c" 1>&6
5254 else
5255 cat > conftest.$ac_ext <<EOF
5256 #line 5257 "configure"
5257 #include "confdefs.h"
5258 #include <stdlib.h>
5259 #include <stdarg.h>
5260 #include <string.h>
5261 #include <float.h>
5262 EOF
5263 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5264 { (eval echo configure:5265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5265 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5266 if test -z "$ac_err"; then
5267 rm -rf conftest*
5268 ac_cv_header_stdc=yes
5269 else
5270 echo "$ac_err" >&5
5271 echo "configure: failed program was:" >&5
5272 cat conftest.$ac_ext >&5
5273 rm -rf conftest*
5274 ac_cv_header_stdc=no
5275 fi
5276 rm -f conftest*
5277
5278 if test $ac_cv_header_stdc = yes; then
5279 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5280 cat > conftest.$ac_ext <<EOF
5281 #line 5282 "configure"
5282 #include "confdefs.h"
5283 #include <string.h>
5284 EOF
5285 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5286 egrep "memchr" >/dev/null 2>&1; then
5287 :
5288 else
5289 rm -rf conftest*
5290 ac_cv_header_stdc=no
5291 fi
5292 rm -f conftest*
5293
5294 fi
5295
5296 if test $ac_cv_header_stdc = yes; then
5297 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5298 cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301 #include <stdlib.h>
5302 EOF
5303 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5304 egrep "free" >/dev/null 2>&1; then
5305 :
5306 else
5307 rm -rf conftest*
5308 ac_cv_header_stdc=no
5309 fi
5310 rm -f conftest*
5311
5312 fi
5313
5314 if test $ac_cv_header_stdc = yes; then
5315 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5316 if test "$cross_compiling" = yes; then
5317 :
5318 else
5319 cat > conftest.$ac_ext <<EOF
5320 #line 5321 "configure"
5321 #include "confdefs.h"
5322 #include <ctype.h>
5323 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5324 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5325 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5326 int main () { int i; for (i = 0; i < 256; i++)
5327 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5328 exit (0); }
5329
5330 EOF
5331 if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5332 then
5333 :
5334 else
5335 echo "configure: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5337 rm -fr conftest*
5338 ac_cv_header_stdc=no
5339 fi
5340 rm -fr conftest*
5341 fi
5342
5343 fi
5344 fi
5345
5346 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5347 if test $ac_cv_header_stdc = yes; then
5348 cat >> confdefs.h <<\EOF
5349 #define STDC_HEADERS 1
5350 EOF
5351
5352 fi
5353
5354 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5355 echo "configure:5356: checking for ssize_t" >&5
5356 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5357 echo $ac_n "(cached) $ac_c" 1>&6
5358 else
5359 cat > conftest.$ac_ext <<EOF
5360 #line 5361 "configure"
5361 #include "confdefs.h"
5362 #include <sys/types.h>
5363 #if STDC_HEADERS
5364 #include <stdlib.h>
5365 #include <stddef.h>
5366 #endif
5367 EOF
5368 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5369 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5370 rm -rf conftest*
5371 ac_cv_type_ssize_t=yes
5372 else
5373 rm -rf conftest*
5374 ac_cv_type_ssize_t=no
5375 fi
5376 rm -f conftest*
5377
5378 fi
5379 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5380 if test $ac_cv_type_ssize_t = no; then
5381 cat >> confdefs.h <<\EOF
5382 #define ssize_t int
5383 EOF
5384
5385 fi
5386
5387
5388 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
5389 echo "configure:5390: checking for in_addr_t" >&5
5390 cat > conftest.$ac_ext <<EOF
5391 #line 5392 "configure"
5392 #include "confdefs.h"
5393 #include <sys/types.h>
5394 #if STDC_HEADERS
5395 #include <stdlib.h>
5396 #include <stddef.h>
5397 #endif
5398 #if HAVE_NETINET_IN_H
5399 #include <netinet/in.h>
5400 #endif
5401 int main() {
5402 in_addr_t foo;
5403 ; return 0; }
5404 EOF
5405 if { (eval echo configure:5406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5406 rm -rf conftest*
5407 cat >> confdefs.h <<\EOF
5408 #define HAVE_IN_ADDR_T 1
5409 EOF
5410
5411 echo "$ac_t""yes" 1>&6
5412 else
5413 echo "configure: failed program was:" >&5
5414 cat conftest.$ac_ext >&5
5415 rm -rf conftest*
5416 echo "$ac_t""no" 1>&6
5417 fi
5418 rm -f conftest*
5419
5420 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
5421 echo "configure:5422: checking whether struct ip_mreq is in netinet/in.h" >&5
5422 cat > conftest.$ac_ext <<EOF
5423 #line 5424 "configure"
5424 #include "confdefs.h"
5425 #include <netinet/in.h>
5426 int main() {
5427 struct ip_mreq mreq;
5428 ; return 0; }
5429 EOF
5430 if { (eval echo configure:5431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5431 rm -rf conftest*
5432 cat >> confdefs.h <<\EOF
5433 #define HAVE_STRUCT_IP_MREQ 1
5434 EOF
5435
5436 echo "$ac_t""yes" 1>&6
5437 else
5438 echo "configure: failed program was:" >&5
5439 cat conftest.$ac_ext >&5
5440 rm -rf conftest*
5441 echo "$ac_t""no" 1>&6
5442 fi
5443 rm -f conftest*
5444
5445 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
5446 echo "configure:5447: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
5447 cat > conftest.$ac_ext <<EOF
5448 #line 5449 "configure"
5449 #include "confdefs.h"
5450 #include <netinet/in.h>
5451 int main() {
5452 struct sockaddr_in6 addr6;
5453 ; return 0; }
5454 EOF
5455 if { (eval echo configure:5456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5456 rm -rf conftest*
5457 cat >> confdefs.h <<\EOF
5458 #define HAVE_INET6 1
5459 EOF
5460
5461 echo "$ac_t""yes" 1>&6
5462 else
5463 echo "configure: failed program was:" >&5
5464 cat conftest.$ac_ext >&5
5465 rm -rf conftest*
5466 echo "$ac_t""no" 1>&6
5467 fi
5468 rm -f conftest*
5469
5470 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
5471 echo "configure:5472: checking for socklen_t in sys/socket.h" >&5
5472 cat > conftest.$ac_ext <<EOF
5473 #line 5474 "configure"
5474 #include "confdefs.h"
5475 #include <sys/types.h>
5476 #include <sys/socket.h>
5477 int main() {
5478 socklen_t x = 5;
5479 ; return 0; }
5480 EOF
5481 if { (eval echo configure:5482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5482 rm -rf conftest*
5483 cat >> confdefs.h <<\EOF
5484 #define HAVE_SOCKLEN_T 1
5485 EOF
5486
5487 echo "$ac_t""yes" 1>&6
5488 else
5489 echo "configure: failed program was:" >&5
5490 cat conftest.$ac_ext >&5
5491 rm -rf conftest*
5492 echo "$ac_t""no" 1>&6
5493 fi
5494 rm -f conftest*
5495
5496 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
5497 echo "configure:5498: checking for tm_gmtoff in struct tm" >&5
5498 cat > conftest.$ac_ext <<EOF
5499 #line 5500 "configure"
5500 #include "confdefs.h"
5501 #include <time.h>
5502 int main() {
5503 struct tm tim; tim.tm_gmtoff = 0;
5504 ; return 0; }
5505 EOF
5506 if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5507 rm -rf conftest*
5508 cat >> confdefs.h <<\EOF
5509 #define STRUCT_TM_HAS_GMTOFF 1
5510 EOF
5511
5512 echo "$ac_t""yes" 1>&6
5513 else
5514 echo "configure: failed program was:" >&5
5515 cat conftest.$ac_ext >&5
5516 rm -rf conftest*
5517 echo "$ac_t""no" 1>&6
5518 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
5519 echo "configure:5520: checking for global timezone variable" >&5
5520 cat > conftest.$ac_ext <<EOF
5521 #line 5522 "configure"
5522 #include "confdefs.h"
5523 #include <time.h>
5524 int main() {
5525 long z2 = timezone;
5526 ; return 0; }
5527 EOF
5528 if { (eval echo configure:5529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5529 rm -rf conftest*
5530 cat >> confdefs.h <<\EOF
5531 #define HAVE_TIMEZONE 1
5532 EOF
5533
5534 echo "$ac_t""yes" 1>&6
5535 else
5536 echo "configure: failed program was:" >&5
5537 cat conftest.$ac_ext >&5
5538 rm -rf conftest*
5539 echo "$ac_t""no" 1>&6
5540 fi
5541 rm -f conftest*
5542 fi
5543 rm -f conftest*
5544
5545 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5546 # for constant arguments. Useless!
5547 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5548 echo "configure:5549: checking for working alloca.h" >&5
5549 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5550 echo $ac_n "(cached) $ac_c" 1>&6
5551 else
5552 cat > conftest.$ac_ext <<EOF
5553 #line 5554 "configure"
5554 #include "confdefs.h"
5555 #include <alloca.h>
5556 int main() {
5557 char *p = alloca(2 * sizeof(int));
5558 ; return 0; }
5559 EOF
5560 if { (eval echo configure:5561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5561 rm -rf conftest*
5562 ac_cv_header_alloca_h=yes
5563 else
5564 echo "configure: failed program was:" >&5
5565 cat conftest.$ac_ext >&5
5566 rm -rf conftest*
5567 ac_cv_header_alloca_h=no
5568 fi
5569 rm -f conftest*
5570 fi
5571
5572 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5573 if test $ac_cv_header_alloca_h = yes; then
5574 cat >> confdefs.h <<\EOF
5575 #define HAVE_ALLOCA_H 1
5576 EOF
5577
5578 fi
5579
5580 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5581 echo "configure:5582: checking for alloca" >&5
5582 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5583 echo $ac_n "(cached) $ac_c" 1>&6
5584 else
5585 cat > conftest.$ac_ext <<EOF
5586 #line 5587 "configure"
5587 #include "confdefs.h"
5588
5589 #ifdef __GNUC__
5590 # define alloca __builtin_alloca
5591 #else
5592 # ifdef _MSC_VER
5593 # include <malloc.h>
5594 # define alloca _alloca
5595 # else
5596 # if HAVE_ALLOCA_H
5597 # include <alloca.h>
5598 # else
5599 # ifdef _AIX
5600 #pragma alloca
5601 # else
5602 # ifndef alloca /* predefined by HP cc +Olibcalls */
5603 char *alloca ();
5604 # endif
5605 # endif
5606 # endif
5607 # endif
5608 #endif
5609
5610 int main() {
5611 char *p = (char *) alloca(1);
5612 ; return 0; }
5613 EOF
5614 if { (eval echo configure:5615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5615 rm -rf conftest*
5616 ac_cv_func_alloca_works=yes
5617 else
5618 echo "configure: failed program was:" >&5
5619 cat conftest.$ac_ext >&5
5620 rm -rf conftest*
5621 ac_cv_func_alloca_works=no
5622 fi
5623 rm -f conftest*
5624 fi
5625
5626 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5627 if test $ac_cv_func_alloca_works = yes; then
5628 cat >> confdefs.h <<\EOF
5629 #define HAVE_ALLOCA 1
5630 EOF
5631
5632 fi
5633
5634 if test $ac_cv_func_alloca_works = no; then
5635 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5636 # that cause trouble. Some versions do not even contain alloca or
5637 # contain a buggy version. If you still want to use their alloca,
5638 # use ar to extract alloca.o from them instead of compiling alloca.c.
5639 ALLOCA=alloca.${ac_objext}
5640 cat >> confdefs.h <<\EOF
5641 #define C_ALLOCA 1
5642 EOF
5643
5644
5645 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5646 echo "configure:5647: checking whether alloca needs Cray hooks" >&5
5647 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5648 echo $ac_n "(cached) $ac_c" 1>&6
5649 else
5650 cat > conftest.$ac_ext <<EOF
5651 #line 5652 "configure"
5652 #include "confdefs.h"
5653 #if defined(CRAY) && ! defined(CRAY2)
5654 webecray
5655 #else
5656 wenotbecray
5657 #endif
5658
5659 EOF
5660 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5661 egrep "webecray" >/dev/null 2>&1; then
5662 rm -rf conftest*
5663 ac_cv_os_cray=yes
5664 else
5665 rm -rf conftest*
5666 ac_cv_os_cray=no
5667 fi
5668 rm -f conftest*
5669
5670 fi
5671
5672 echo "$ac_t""$ac_cv_os_cray" 1>&6
5673 if test $ac_cv_os_cray = yes; then
5674 for ac_func in _getb67 GETB67 getb67; do
5675 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5676 echo "configure:5677: checking for $ac_func" >&5
5677 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5678 echo $ac_n "(cached) $ac_c" 1>&6
5679 else
5680 cat > conftest.$ac_ext <<EOF
5681 #line 5682 "configure"
5682 #include "confdefs.h"
5683 /* System header to define __stub macros and hopefully few prototypes,
5684 which can conflict with char $ac_func(); below. */
5685 #include <assert.h>
5686 /* Override any gcc2 internal prototype to avoid an error. */
5687 /* We use char because int might match the return type of a gcc2
5688 builtin and then its argument prototype would still apply. */
5689 char $ac_func();
5690
5691 int main() {
5692
5693 /* The GNU C library defines this for functions which it implements
5694 to always fail with ENOSYS. Some functions are actually named
5695 something starting with __ and the normal name is an alias. */
5696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5697 choke me
5698 #else
5699 $ac_func();
5700 #endif
5701
5702 ; return 0; }
5703 EOF
5704 if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5705 rm -rf conftest*
5706 eval "ac_cv_func_$ac_func=yes"
5707 else
5708 echo "configure: failed program was:" >&5
5709 cat conftest.$ac_ext >&5
5710 rm -rf conftest*
5711 eval "ac_cv_func_$ac_func=no"
5712 fi
5713 rm -f conftest*
5714 fi
5715
5716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5717 echo "$ac_t""yes" 1>&6
5718 cat >> confdefs.h <<EOF
5719 #define CRAY_STACKSEG_END $ac_func
5720 EOF
5721
5722 break
5723 else
5724 echo "$ac_t""no" 1>&6
5725 fi
5726
5727 done
5728 fi
5729
5730 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5731 echo "configure:5732: checking stack direction for C alloca" >&5
5732 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5733 echo $ac_n "(cached) $ac_c" 1>&6
5734 else
5735 if test "$cross_compiling" = yes; then
5736 ac_cv_c_stack_direction=0
5737 else
5738 cat > conftest.$ac_ext <<EOF
5739 #line 5740 "configure"
5740 #include "confdefs.h"
5741 find_stack_direction ()
5742 {
5743 static char *addr = 0;
5744 auto char dummy;
5745 if (addr == 0)
5746 {
5747 addr = &dummy;
5748 return find_stack_direction ();
5749 }
5750 else
5751 return (&dummy > addr) ? 1 : -1;
5752 }
5753 main ()
5754 {
5755 exit (find_stack_direction() < 0);
5756 }
5757 EOF
5758 if { (eval echo configure:5759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5759 then
5760 ac_cv_c_stack_direction=1
5761 else
5762 echo "configure: failed program was:" >&5
5763 cat conftest.$ac_ext >&5
5764 rm -fr conftest*
5765 ac_cv_c_stack_direction=-1
5766 fi
5767 rm -fr conftest*
5768 fi
5769
5770 fi
5771
5772 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5773 cat >> confdefs.h <<EOF
5774 #define STACK_DIRECTION $ac_cv_c_stack_direction
5775 EOF
5776
5777 fi
5778
5779
5780 for ac_prog in perl
5781 do
5782 # Extract the first word of "$ac_prog", so it can be a program name with args.
5783 set dummy $ac_prog; ac_word=$2
5784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5785 echo "configure:5786: checking for $ac_word" >&5
5786 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
5787 echo $ac_n "(cached) $ac_c" 1>&6
5788 else
5789 if test -n "$PERL"; then
5790 ac_cv_prog_PERL="$PERL" # Let the user override the test.
5791 else
5792 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5793 ac_dummy="$PATH"
5794 for ac_dir in $ac_dummy; do
5795 test -z "$ac_dir" && ac_dir=.
5796 if test -f $ac_dir/$ac_word; then
5797 ac_cv_prog_PERL="$ac_prog"
5798 break
5799 fi
5800 done
5801 IFS="$ac_save_ifs"
5802 fi
5803 fi
5804 PERL="$ac_cv_prog_PERL"
5805 if test -n "$PERL"; then
5806 echo "$ac_t""$PERL" 1>&6
5807 else
5808 echo "$ac_t""no" 1>&6
5809 fi
5810
5811 test -n "$PERL" && break
5812 done
5813 test -n "$PERL" || PERL="false"
5814
5815
5816 SYSDEP_SOURCES=
5817
5818 case "${host}" in
5819 i?86-*-linux*)
5820 SIGNAL_HANDLER=include/i386-signal.h
5821 ;;
5822 sparc-sun-solaris*)
5823 SIGNAL_HANDLER=include/sparc-signal.h
5824 ;;
5825 ia64-*)
5826 SYSDEP_SOURCES=sysdep/ia64.c
5827 test -d sysdep || mkdir sysdep
5828 ;;
5829 *)
5830 SIGNAL_HANDLER=include/default-signal.h
5831 ;;
5832 esac
5833
5834 # If we're using sjlj exceptions, forget what we just learned.
5835 if test "$libgcj_sjlj" = yes; then
5836 SIGNAL_HANDLER=include/default-signal.h
5837 fi
5838
5839
5840
5841
5842
5843 if test "${multilib}" = "yes"; then
5844 multilib_arg="--enable-multilib"
5845 else
5846 multilib_arg=
5847 fi
5848
5849 # If we find X, set shell vars x_includes and x_libraries to the
5850 # paths, otherwise set no_x=yes.
5851 # Uses ac_ vars as temps to allow command line to override cache and checks.
5852 # --without-x overrides everything else, but does not touch the cache.
5853 echo $ac_n "checking for X""... $ac_c" 1>&6
5854 echo "configure:5855: checking for X" >&5
5855
5856 # Check whether --with-x or --without-x was given.
5857 if test "${with_x+set}" = set; then
5858 withval="$with_x"
5859 :
5860 fi
5861
5862 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5863 if test "x$with_x" = xno; then
5864 # The user explicitly disabled X.
5865 have_x=disabled
5866 else
5867 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5868 # Both variables are already set.
5869 have_x=yes
5870 else
5871 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
5872 echo $ac_n "(cached) $ac_c" 1>&6
5873 else
5874 # One or both of the vars are not set, and there is no cached value.
5875 ac_x_includes=NO ac_x_libraries=NO
5876 rm -fr conftestdir
5877 if mkdir conftestdir; then
5878 cd conftestdir
5879 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5880 cat > Imakefile <<'EOF'
5881 acfindx:
5882 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5883 EOF
5884 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5885 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5886 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5887 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5888 for ac_extension in a so sl; do
5889 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5890 test -f $ac_im_libdir/libX11.$ac_extension; then
5891 ac_im_usrlibdir=$ac_im_libdir; break
5892 fi
5893 done
5894 # Screen out bogus values from the imake configuration. They are
5895 # bogus both because they are the default anyway, and because
5896 # using them would break gcc on systems where it needs fixed includes.
5897 case "$ac_im_incroot" in
5898 /usr/include) ;;
5899 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5900 esac
5901 case "$ac_im_usrlibdir" in
5902 /usr/lib | /lib) ;;
5903 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5904 esac
5905 fi
5906 cd ..
5907 rm -fr conftestdir
5908 fi
5909
5910 if test "$ac_x_includes" = NO; then
5911 # Guess where to find include files, by looking for this one X11 .h file.
5912 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5913
5914 # First, try using that file with no special directory specified.
5915 cat > conftest.$ac_ext <<EOF
5916 #line 5917 "configure"
5917 #include "confdefs.h"
5918 #include <$x_direct_test_include>
5919 EOF
5920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5921 { (eval echo configure:5922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5923 if test -z "$ac_err"; then
5924 rm -rf conftest*
5925 # We can compile using X headers with no special include directory.
5926 ac_x_includes=
5927 else
5928 echo "$ac_err" >&5
5929 echo "configure: failed program was:" >&5
5930 cat conftest.$ac_ext >&5
5931 rm -rf conftest*
5932 # Look for the header file in a standard set of common directories.
5933 # Check X11 before X11Rn because it is often a symlink to the current release.
5934 for ac_dir in \
5935 /usr/X11/include \
5936 /usr/X11R6/include \
5937 /usr/X11R5/include \
5938 /usr/X11R4/include \
5939 \
5940 /usr/include/X11 \
5941 /usr/include/X11R6 \
5942 /usr/include/X11R5 \
5943 /usr/include/X11R4 \
5944 \
5945 /usr/local/X11/include \
5946 /usr/local/X11R6/include \
5947 /usr/local/X11R5/include \
5948 /usr/local/X11R4/include \
5949 \
5950 /usr/local/include/X11 \
5951 /usr/local/include/X11R6 \
5952 /usr/local/include/X11R5 \
5953 /usr/local/include/X11R4 \
5954 \
5955 /usr/X386/include \
5956 /usr/x386/include \
5957 /usr/XFree86/include/X11 \
5958 \
5959 /usr/include \
5960 /usr/local/include \
5961 /usr/unsupported/include \
5962 /usr/athena/include \
5963 /usr/local/x11r5/include \
5964 /usr/lpp/Xamples/include \
5965 \
5966 /usr/openwin/include \
5967 /usr/openwin/share/include \
5968 ; \
5969 do
5970 if test -r "$ac_dir/$x_direct_test_include"; then
5971 ac_x_includes=$ac_dir
5972 break
5973 fi
5974 done
5975 fi
5976 rm -f conftest*
5977 fi # $ac_x_includes = NO
5978
5979 if test "$ac_x_libraries" = NO; then
5980 # Check for the libraries.
5981
5982 test -z "$x_direct_test_library" && x_direct_test_library=Xt
5983 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5984
5985 # See if we find them without any special options.
5986 # Don't add to $LIBS permanently.
5987 ac_save_LIBS="$LIBS"
5988 LIBS="-l$x_direct_test_library $LIBS"
5989 cat > conftest.$ac_ext <<EOF
5990 #line 5991 "configure"
5991 #include "confdefs.h"
5992
5993 int main() {
5994 ${x_direct_test_function}()
5995 ; return 0; }
5996 EOF
5997 if { (eval echo configure:5998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5998 rm -rf conftest*
5999 LIBS="$ac_save_LIBS"
6000 # We can link X programs with no special library path.
6001 ac_x_libraries=
6002 else
6003 echo "configure: failed program was:" >&5
6004 cat conftest.$ac_ext >&5
6005 rm -rf conftest*
6006 LIBS="$ac_save_LIBS"
6007 # First see if replacing the include by lib works.
6008 # Check X11 before X11Rn because it is often a symlink to the current release.
6009 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6010 /usr/X11/lib \
6011 /usr/X11R6/lib \
6012 /usr/X11R5/lib \
6013 /usr/X11R4/lib \
6014 \
6015 /usr/lib/X11 \
6016 /usr/lib/X11R6 \
6017 /usr/lib/X11R5 \
6018 /usr/lib/X11R4 \
6019 \
6020 /usr/local/X11/lib \
6021 /usr/local/X11R6/lib \
6022 /usr/local/X11R5/lib \
6023 /usr/local/X11R4/lib \
6024 \
6025 /usr/local/lib/X11 \
6026 /usr/local/lib/X11R6 \
6027 /usr/local/lib/X11R5 \
6028 /usr/local/lib/X11R4 \
6029 \
6030 /usr/X386/lib \
6031 /usr/x386/lib \
6032 /usr/XFree86/lib/X11 \
6033 \
6034 /usr/lib \
6035 /usr/local/lib \
6036 /usr/unsupported/lib \
6037 /usr/athena/lib \
6038 /usr/local/x11r5/lib \
6039 /usr/lpp/Xamples/lib \
6040 /lib/usr/lib/X11 \
6041 \
6042 /usr/openwin/lib \
6043 /usr/openwin/share/lib \
6044 ; \
6045 do
6046 for ac_extension in a so sl; do
6047 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6048 ac_x_libraries=$ac_dir
6049 break 2
6050 fi
6051 done
6052 done
6053 fi
6054 rm -f conftest*
6055 fi # $ac_x_libraries = NO
6056
6057 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6058 # Didn't find X anywhere. Cache the known absence of X.
6059 ac_cv_have_x="have_x=no"
6060 else
6061 # Record where we found X for the cache.
6062 ac_cv_have_x="have_x=yes \
6063 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6064 fi
6065 fi
6066 fi
6067 eval "$ac_cv_have_x"
6068 fi # $with_x != no
6069
6070 if test "$have_x" != yes; then
6071 echo "$ac_t""$have_x" 1>&6
6072 no_x=yes
6073 else
6074 # If each of the values was on the command line, it overrides each guess.
6075 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6076 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6077 # Update the cache value to reflect the command line values.
6078 ac_cv_have_x="have_x=yes \
6079 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6080 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6081 fi
6082
6083 if test "$no_x" = yes; then
6084 # Not all programs may use this symbol, but it does not hurt to define it.
6085 cat >> confdefs.h <<\EOF
6086 #define X_DISPLAY_MISSING 1
6087 EOF
6088
6089 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6090 else
6091 if test -n "$x_includes"; then
6092 X_CFLAGS="$X_CFLAGS -I$x_includes"
6093 fi
6094
6095 # It would also be nice to do this for all -L options, not just this one.
6096 if test -n "$x_libraries"; then
6097 X_LIBS="$X_LIBS -L$x_libraries"
6098 # For Solaris; some versions of Sun CC require a space after -R and
6099 # others require no space. Words are not sufficient . . . .
6100 case "`(uname -sr) 2>/dev/null`" in
6101 "SunOS 5"*)
6102 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6103 echo "configure:6104: checking whether -R must be followed by a space" >&5
6104 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6105 cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108
6109 int main() {
6110
6111 ; return 0; }
6112 EOF
6113 if { (eval echo configure:6114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6114 rm -rf conftest*
6115 ac_R_nospace=yes
6116 else
6117 echo "configure: failed program was:" >&5
6118 cat conftest.$ac_ext >&5
6119 rm -rf conftest*
6120 ac_R_nospace=no
6121 fi
6122 rm -f conftest*
6123 if test $ac_R_nospace = yes; then
6124 echo "$ac_t""no" 1>&6
6125 X_LIBS="$X_LIBS -R$x_libraries"
6126 else
6127 LIBS="$ac_xsave_LIBS -R $x_libraries"
6128 cat > conftest.$ac_ext <<EOF
6129 #line 6130 "configure"
6130 #include "confdefs.h"
6131
6132 int main() {
6133
6134 ; return 0; }
6135 EOF
6136 if { (eval echo configure:6137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6137 rm -rf conftest*
6138 ac_R_space=yes
6139 else
6140 echo "configure: failed program was:" >&5
6141 cat conftest.$ac_ext >&5
6142 rm -rf conftest*
6143 ac_R_space=no
6144 fi
6145 rm -f conftest*
6146 if test $ac_R_space = yes; then
6147 echo "$ac_t""yes" 1>&6
6148 X_LIBS="$X_LIBS -R $x_libraries"
6149 else
6150 echo "$ac_t""neither works" 1>&6
6151 fi
6152 fi
6153 LIBS="$ac_xsave_LIBS"
6154 esac
6155 fi
6156
6157 # Check for system-dependent libraries X programs must link with.
6158 # Do this before checking for the system-independent R6 libraries
6159 # (-lICE), since we may need -lsocket or whatever for X linking.
6160
6161 if test "$ISC" = yes; then
6162 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6163 else
6164 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6165 # libraries were built with DECnet support. And karl@cs.umb.edu says
6166 # the Alpha needs dnet_stub (dnet does not exist).
6167 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6168 echo "configure:6169: checking for dnet_ntoa in -ldnet" >&5
6169 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6170 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6171 echo $ac_n "(cached) $ac_c" 1>&6
6172 else
6173 ac_save_LIBS="$LIBS"
6174 LIBS="-ldnet $LIBS"
6175 cat > conftest.$ac_ext <<EOF
6176 #line 6177 "configure"
6177 #include "confdefs.h"
6178 /* Override any gcc2 internal prototype to avoid an error. */
6179 /* We use char because int might match the return type of a gcc2
6180 builtin and then its argument prototype would still apply. */
6181 char dnet_ntoa();
6182
6183 int main() {
6184 dnet_ntoa()
6185 ; return 0; }
6186 EOF
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188 rm -rf conftest*
6189 eval "ac_cv_lib_$ac_lib_var=yes"
6190 else
6191 echo "configure: failed program was:" >&5
6192 cat conftest.$ac_ext >&5
6193 rm -rf conftest*
6194 eval "ac_cv_lib_$ac_lib_var=no"
6195 fi
6196 rm -f conftest*
6197 LIBS="$ac_save_LIBS"
6198
6199 fi
6200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6201 echo "$ac_t""yes" 1>&6
6202 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6203 else
6204 echo "$ac_t""no" 1>&6
6205 fi
6206
6207 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6208 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6209 echo "configure:6210: checking for dnet_ntoa in -ldnet_stub" >&5
6210 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6211 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6212 echo $ac_n "(cached) $ac_c" 1>&6
6213 else
6214 ac_save_LIBS="$LIBS"
6215 LIBS="-ldnet_stub $LIBS"
6216 cat > conftest.$ac_ext <<EOF
6217 #line 6218 "configure"
6218 #include "confdefs.h"
6219 /* Override any gcc2 internal prototype to avoid an error. */
6220 /* We use char because int might match the return type of a gcc2
6221 builtin and then its argument prototype would still apply. */
6222 char dnet_ntoa();
6223
6224 int main() {
6225 dnet_ntoa()
6226 ; return 0; }
6227 EOF
6228 if { (eval echo configure:6229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6229 rm -rf conftest*
6230 eval "ac_cv_lib_$ac_lib_var=yes"
6231 else
6232 echo "configure: failed program was:" >&5
6233 cat conftest.$ac_ext >&5
6234 rm -rf conftest*
6235 eval "ac_cv_lib_$ac_lib_var=no"
6236 fi
6237 rm -f conftest*
6238 LIBS="$ac_save_LIBS"
6239
6240 fi
6241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6242 echo "$ac_t""yes" 1>&6
6243 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6244 else
6245 echo "$ac_t""no" 1>&6
6246 fi
6247
6248 fi
6249
6250 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6251 # to get the SysV transport functions.
6252 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6253 # needs -lnsl.
6254 # The nsl library prevents programs from opening the X display
6255 # on Irix 5.2, according to dickey@clark.net.
6256 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6257 echo "configure:6258: checking for gethostbyname" >&5
6258 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6259 echo $ac_n "(cached) $ac_c" 1>&6
6260 else
6261 cat > conftest.$ac_ext <<EOF
6262 #line 6263 "configure"
6263 #include "confdefs.h"
6264 /* System header to define __stub macros and hopefully few prototypes,
6265 which can conflict with char gethostbyname(); below. */
6266 #include <assert.h>
6267 /* Override any gcc2 internal prototype to avoid an error. */
6268 /* We use char because int might match the return type of a gcc2
6269 builtin and then its argument prototype would still apply. */
6270 char gethostbyname();
6271
6272 int main() {
6273
6274 /* The GNU C library defines this for functions which it implements
6275 to always fail with ENOSYS. Some functions are actually named
6276 something starting with __ and the normal name is an alias. */
6277 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6278 choke me
6279 #else
6280 gethostbyname();
6281 #endif
6282
6283 ; return 0; }
6284 EOF
6285 if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6286 rm -rf conftest*
6287 eval "ac_cv_func_gethostbyname=yes"
6288 else
6289 echo "configure: failed program was:" >&5
6290 cat conftest.$ac_ext >&5
6291 rm -rf conftest*
6292 eval "ac_cv_func_gethostbyname=no"
6293 fi
6294 rm -f conftest*
6295 fi
6296
6297 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6298 echo "$ac_t""yes" 1>&6
6299 :
6300 else
6301 echo "$ac_t""no" 1>&6
6302 fi
6303
6304 if test $ac_cv_func_gethostbyname = no; then
6305 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6306 echo "configure:6307: checking for gethostbyname in -lnsl" >&5
6307 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6309 echo $ac_n "(cached) $ac_c" 1>&6
6310 else
6311 ac_save_LIBS="$LIBS"
6312 LIBS="-lnsl $LIBS"
6313 cat > conftest.$ac_ext <<EOF
6314 #line 6315 "configure"
6315 #include "confdefs.h"
6316 /* Override any gcc2 internal prototype to avoid an error. */
6317 /* We use char because int might match the return type of a gcc2
6318 builtin and then its argument prototype would still apply. */
6319 char gethostbyname();
6320
6321 int main() {
6322 gethostbyname()
6323 ; return 0; }
6324 EOF
6325 if { (eval echo configure:6326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6326 rm -rf conftest*
6327 eval "ac_cv_lib_$ac_lib_var=yes"
6328 else
6329 echo "configure: failed program was:" >&5
6330 cat conftest.$ac_ext >&5
6331 rm -rf conftest*
6332 eval "ac_cv_lib_$ac_lib_var=no"
6333 fi
6334 rm -f conftest*
6335 LIBS="$ac_save_LIBS"
6336
6337 fi
6338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6339 echo "$ac_t""yes" 1>&6
6340 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6341 else
6342 echo "$ac_t""no" 1>&6
6343 fi
6344
6345 fi
6346
6347 # lieder@skyler.mavd.honeywell.com says without -lsocket,
6348 # socket/setsockopt and other routines are undefined under SCO ODT
6349 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
6350 # on later versions), says simon@lia.di.epfl.ch: it contains
6351 # gethostby* variants that don't use the nameserver (or something).
6352 # -lsocket must be given before -lnsl if both are needed.
6353 # We assume that if connect needs -lnsl, so does gethostbyname.
6354 echo $ac_n "checking for connect""... $ac_c" 1>&6
6355 echo "configure:6356: checking for connect" >&5
6356 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6357 echo $ac_n "(cached) $ac_c" 1>&6
6358 else
6359 cat > conftest.$ac_ext <<EOF
6360 #line 6361 "configure"
6361 #include "confdefs.h"
6362 /* System header to define __stub macros and hopefully few prototypes,
6363 which can conflict with char connect(); below. */
6364 #include <assert.h>
6365 /* Override any gcc2 internal prototype to avoid an error. */
6366 /* We use char because int might match the return type of a gcc2
6367 builtin and then its argument prototype would still apply. */
6368 char connect();
6369
6370 int main() {
6371
6372 /* The GNU C library defines this for functions which it implements
6373 to always fail with ENOSYS. Some functions are actually named
6374 something starting with __ and the normal name is an alias. */
6375 #if defined (__stub_connect) || defined (__stub___connect)
6376 choke me
6377 #else
6378 connect();
6379 #endif
6380
6381 ; return 0; }
6382 EOF
6383 if { (eval echo configure:6384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6384 rm -rf conftest*
6385 eval "ac_cv_func_connect=yes"
6386 else
6387 echo "configure: failed program was:" >&5
6388 cat conftest.$ac_ext >&5
6389 rm -rf conftest*
6390 eval "ac_cv_func_connect=no"
6391 fi
6392 rm -f conftest*
6393 fi
6394
6395 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6396 echo "$ac_t""yes" 1>&6
6397 :
6398 else
6399 echo "$ac_t""no" 1>&6
6400 fi
6401
6402 if test $ac_cv_func_connect = no; then
6403 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6404 echo "configure:6405: checking for connect in -lsocket" >&5
6405 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6406 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6407 echo $ac_n "(cached) $ac_c" 1>&6
6408 else
6409 ac_save_LIBS="$LIBS"
6410 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6411 cat > conftest.$ac_ext <<EOF
6412 #line 6413 "configure"
6413 #include "confdefs.h"
6414 /* Override any gcc2 internal prototype to avoid an error. */
6415 /* We use char because int might match the return type of a gcc2
6416 builtin and then its argument prototype would still apply. */
6417 char connect();
6418
6419 int main() {
6420 connect()
6421 ; return 0; }
6422 EOF
6423 if { (eval echo configure:6424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6424 rm -rf conftest*
6425 eval "ac_cv_lib_$ac_lib_var=yes"
6426 else
6427 echo "configure: failed program was:" >&5
6428 cat conftest.$ac_ext >&5
6429 rm -rf conftest*
6430 eval "ac_cv_lib_$ac_lib_var=no"
6431 fi
6432 rm -f conftest*
6433 LIBS="$ac_save_LIBS"
6434
6435 fi
6436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6437 echo "$ac_t""yes" 1>&6
6438 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6439 else
6440 echo "$ac_t""no" 1>&6
6441 fi
6442
6443 fi
6444
6445 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6446 echo $ac_n "checking for remove""... $ac_c" 1>&6
6447 echo "configure:6448: checking for remove" >&5
6448 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
6449 echo $ac_n "(cached) $ac_c" 1>&6
6450 else
6451 cat > conftest.$ac_ext <<EOF
6452 #line 6453 "configure"
6453 #include "confdefs.h"
6454 /* System header to define __stub macros and hopefully few prototypes,
6455 which can conflict with char remove(); below. */
6456 #include <assert.h>
6457 /* Override any gcc2 internal prototype to avoid an error. */
6458 /* We use char because int might match the return type of a gcc2
6459 builtin and then its argument prototype would still apply. */
6460 char remove();
6461
6462 int main() {
6463
6464 /* The GNU C library defines this for functions which it implements
6465 to always fail with ENOSYS. Some functions are actually named
6466 something starting with __ and the normal name is an alias. */
6467 #if defined (__stub_remove) || defined (__stub___remove)
6468 choke me
6469 #else
6470 remove();
6471 #endif
6472
6473 ; return 0; }
6474 EOF
6475 if { (eval echo configure:6476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6476 rm -rf conftest*
6477 eval "ac_cv_func_remove=yes"
6478 else
6479 echo "configure: failed program was:" >&5
6480 cat conftest.$ac_ext >&5
6481 rm -rf conftest*
6482 eval "ac_cv_func_remove=no"
6483 fi
6484 rm -f conftest*
6485 fi
6486
6487 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6488 echo "$ac_t""yes" 1>&6
6489 :
6490 else
6491 echo "$ac_t""no" 1>&6
6492 fi
6493
6494 if test $ac_cv_func_remove = no; then
6495 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6496 echo "configure:6497: checking for remove in -lposix" >&5
6497 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6498 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6499 echo $ac_n "(cached) $ac_c" 1>&6
6500 else
6501 ac_save_LIBS="$LIBS"
6502 LIBS="-lposix $LIBS"
6503 cat > conftest.$ac_ext <<EOF
6504 #line 6505 "configure"
6505 #include "confdefs.h"
6506 /* Override any gcc2 internal prototype to avoid an error. */
6507 /* We use char because int might match the return type of a gcc2
6508 builtin and then its argument prototype would still apply. */
6509 char remove();
6510
6511 int main() {
6512 remove()
6513 ; return 0; }
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6516 rm -rf conftest*
6517 eval "ac_cv_lib_$ac_lib_var=yes"
6518 else
6519 echo "configure: failed program was:" >&5
6520 cat conftest.$ac_ext >&5
6521 rm -rf conftest*
6522 eval "ac_cv_lib_$ac_lib_var=no"
6523 fi
6524 rm -f conftest*
6525 LIBS="$ac_save_LIBS"
6526
6527 fi
6528 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6529 echo "$ac_t""yes" 1>&6
6530 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6531 else
6532 echo "$ac_t""no" 1>&6
6533 fi
6534
6535 fi
6536
6537 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6538 echo $ac_n "checking for shmat""... $ac_c" 1>&6
6539 echo "configure:6540: checking for shmat" >&5
6540 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
6541 echo $ac_n "(cached) $ac_c" 1>&6
6542 else
6543 cat > conftest.$ac_ext <<EOF
6544 #line 6545 "configure"
6545 #include "confdefs.h"
6546 /* System header to define __stub macros and hopefully few prototypes,
6547 which can conflict with char shmat(); below. */
6548 #include <assert.h>
6549 /* Override any gcc2 internal prototype to avoid an error. */
6550 /* We use char because int might match the return type of a gcc2
6551 builtin and then its argument prototype would still apply. */
6552 char shmat();
6553
6554 int main() {
6555
6556 /* The GNU C library defines this for functions which it implements
6557 to always fail with ENOSYS. Some functions are actually named
6558 something starting with __ and the normal name is an alias. */
6559 #if defined (__stub_shmat) || defined (__stub___shmat)
6560 choke me
6561 #else
6562 shmat();
6563 #endif
6564
6565 ; return 0; }
6566 EOF
6567 if { (eval echo configure:6568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6568 rm -rf conftest*
6569 eval "ac_cv_func_shmat=yes"
6570 else
6571 echo "configure: failed program was:" >&5
6572 cat conftest.$ac_ext >&5
6573 rm -rf conftest*
6574 eval "ac_cv_func_shmat=no"
6575 fi
6576 rm -f conftest*
6577 fi
6578
6579 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6580 echo "$ac_t""yes" 1>&6
6581 :
6582 else
6583 echo "$ac_t""no" 1>&6
6584 fi
6585
6586 if test $ac_cv_func_shmat = no; then
6587 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6588 echo "configure:6589: checking for shmat in -lipc" >&5
6589 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6590 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6591 echo $ac_n "(cached) $ac_c" 1>&6
6592 else
6593 ac_save_LIBS="$LIBS"
6594 LIBS="-lipc $LIBS"
6595 cat > conftest.$ac_ext <<EOF
6596 #line 6597 "configure"
6597 #include "confdefs.h"
6598 /* Override any gcc2 internal prototype to avoid an error. */
6599 /* We use char because int might match the return type of a gcc2
6600 builtin and then its argument prototype would still apply. */
6601 char shmat();
6602
6603 int main() {
6604 shmat()
6605 ; return 0; }
6606 EOF
6607 if { (eval echo configure:6608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6608 rm -rf conftest*
6609 eval "ac_cv_lib_$ac_lib_var=yes"
6610 else
6611 echo "configure: failed program was:" >&5
6612 cat conftest.$ac_ext >&5
6613 rm -rf conftest*
6614 eval "ac_cv_lib_$ac_lib_var=no"
6615 fi
6616 rm -f conftest*
6617 LIBS="$ac_save_LIBS"
6618
6619 fi
6620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6621 echo "$ac_t""yes" 1>&6
6622 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6623 else
6624 echo "$ac_t""no" 1>&6
6625 fi
6626
6627 fi
6628 fi
6629
6630 # Check for libraries that X11R6 Xt/Xaw programs need.
6631 ac_save_LDFLAGS="$LDFLAGS"
6632 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6633 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6634 # check for ICE first), but we must link in the order -lSM -lICE or
6635 # we get undefined symbols. So assume we have SM if we have ICE.
6636 # These have to be linked with before -lX11, unlike the other
6637 # libraries we check for below, so use a different variable.
6638 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6639 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
6640 echo "configure:6641: checking for IceConnectionNumber in -lICE" >&5
6641 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6642 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6643 echo $ac_n "(cached) $ac_c" 1>&6
6644 else
6645 ac_save_LIBS="$LIBS"
6646 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6647 cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650 /* Override any gcc2 internal prototype to avoid an error. */
6651 /* We use char because int might match the return type of a gcc2
6652 builtin and then its argument prototype would still apply. */
6653 char IceConnectionNumber();
6654
6655 int main() {
6656 IceConnectionNumber()
6657 ; return 0; }
6658 EOF
6659 if { (eval echo configure:6660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6660 rm -rf conftest*
6661 eval "ac_cv_lib_$ac_lib_var=yes"
6662 else
6663 echo "configure: failed program was:" >&5
6664 cat conftest.$ac_ext >&5
6665 rm -rf conftest*
6666 eval "ac_cv_lib_$ac_lib_var=no"
6667 fi
6668 rm -f conftest*
6669 LIBS="$ac_save_LIBS"
6670
6671 fi
6672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6673 echo "$ac_t""yes" 1>&6
6674 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6675 else
6676 echo "$ac_t""no" 1>&6
6677 fi
6678
6679 LDFLAGS="$ac_save_LDFLAGS"
6680
6681 fi
6682
6683
6684
6685
6686 if test "$no_x" = yes; then
6687 NO_X_TRUE=
6688 NO_X_FALSE='#'
6689 else
6690 NO_X_TRUE='#'
6691 NO_X_FALSE=
6692 fi
6693
6694 here=`pwd`
6695
6696
6697
6698 trap '' 1 2 15
6699 cat > confcache <<\EOF
6700 # This file is a shell script that caches the results of configure
6701 # tests run on this system so they can be shared between configure
6702 # scripts and configure runs. It is not useful on other systems.
6703 # If it contains results you don't want to keep, you may remove or edit it.
6704 #
6705 # By default, configure uses ./config.cache as the cache file,
6706 # creating it if it does not exist already. You can give configure
6707 # the --cache-file=FILE option to use a different cache file; that is
6708 # what configure does when it calls configure scripts in
6709 # subdirectories, so they share the cache.
6710 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6711 # config.status only pays attention to the cache file if you give it the
6712 # --recheck option to rerun configure.
6713 #
6714 EOF
6715 # The following way of writing the cache mishandles newlines in values,
6716 # but we know of no workaround that is simple, portable, and efficient.
6717 # So, don't put newlines in cache variables' values.
6718 # Ultrix sh set writes to stderr and can't be redirected directly,
6719 # and sets the high bit in the cache file unless we assign to the vars.
6720 (set) 2>&1 |
6721 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6722 *ac_space=\ *)
6723 # `set' does not quote correctly, so add quotes (double-quote substitution
6724 # turns \\\\ into \\, and sed turns \\ into \).
6725 sed -n \
6726 -e "s/'/'\\\\''/g" \
6727 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6728 ;;
6729 *)
6730 # `set' quotes correctly as required by POSIX, so do not add quotes.
6731 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6732 ;;
6733 esac >> confcache
6734 if cmp -s $cache_file confcache; then
6735 :
6736 else
6737 if test -w $cache_file; then
6738 echo "updating cache $cache_file"
6739 cat confcache > $cache_file
6740 else
6741 echo "not updating unwritable cache $cache_file"
6742 fi
6743 fi
6744 rm -f confcache
6745
6746 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6747
6748 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6749 # Let make expand exec_prefix.
6750 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6751
6752 # Any assignment to VPATH causes Sun make to only execute
6753 # the first set of double-colon rules, so remove it if not needed.
6754 # If there is a colon in the path, we need to keep it.
6755 if test "x$srcdir" = x.; then
6756 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6757 fi
6758
6759 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6760
6761 DEFS=-DHAVE_CONFIG_H
6762
6763 # Without the "./", some shells look in PATH for config.status.
6764 : ${CONFIG_STATUS=./config.status}
6765
6766 echo creating $CONFIG_STATUS
6767 rm -f $CONFIG_STATUS
6768 cat > $CONFIG_STATUS <<EOF
6769 #! /bin/sh
6770 # Generated automatically by configure.
6771 # Run this file to recreate the current configuration.
6772 # This directory was configured as follows,
6773 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6774 #
6775 # $0 $ac_configure_args
6776 #
6777 # Compiler output produced by configure, useful for debugging
6778 # configure, is in ./config.log if it exists.
6779
6780 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6781 for ac_option
6782 do
6783 case "\$ac_option" in
6784 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6785 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6786 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6787 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6788 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6789 exit 0 ;;
6790 -help | --help | --hel | --he | --h)
6791 echo "\$ac_cs_usage"; exit 0 ;;
6792 *) echo "\$ac_cs_usage"; exit 1 ;;
6793 esac
6794 done
6795
6796 ac_given_srcdir=$srcdir
6797 ac_given_INSTALL="$INSTALL"
6798
6799 trap 'rm -fr `echo "Makefile libgcj.spec libgcj-test.spec gcj/Makefile include/Makefile testsuite/Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6800 EOF
6801 cat >> $CONFIG_STATUS <<EOF
6802
6803 # Protect against being on the right side of a sed subst in config.status.
6804 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6805 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6806 $ac_vpsub
6807 $extrasub
6808 s%@SHELL@%$SHELL%g
6809 s%@CFLAGS@%$CFLAGS%g
6810 s%@CPPFLAGS@%$CPPFLAGS%g
6811 s%@CXXFLAGS@%$CXXFLAGS%g
6812 s%@FFLAGS@%$FFLAGS%g
6813 s%@DEFS@%$DEFS%g
6814 s%@LDFLAGS@%$LDFLAGS%g
6815 s%@LIBS@%$LIBS%g
6816 s%@exec_prefix@%$exec_prefix%g
6817 s%@prefix@%$prefix%g
6818 s%@program_transform_name@%$program_transform_name%g
6819 s%@bindir@%$bindir%g
6820 s%@sbindir@%$sbindir%g
6821 s%@libexecdir@%$libexecdir%g
6822 s%@datadir@%$datadir%g
6823 s%@sysconfdir@%$sysconfdir%g
6824 s%@sharedstatedir@%$sharedstatedir%g
6825 s%@localstatedir@%$localstatedir%g
6826 s%@libdir@%$libdir%g
6827 s%@includedir@%$includedir%g
6828 s%@oldincludedir@%$oldincludedir%g
6829 s%@infodir@%$infodir%g
6830 s%@mandir@%$mandir%g
6831 s%@host@%$host%g
6832 s%@host_alias@%$host_alias%g
6833 s%@host_cpu@%$host_cpu%g
6834 s%@host_vendor@%$host_vendor%g
6835 s%@host_os@%$host_os%g
6836 s%@target@%$target%g
6837 s%@target_alias@%$target_alias%g
6838 s%@target_cpu@%$target_cpu%g
6839 s%@target_vendor@%$target_vendor%g
6840 s%@target_os@%$target_os%g
6841 s%@build@%$build%g
6842 s%@build_alias@%$build_alias%g
6843 s%@build_cpu@%$build_cpu%g
6844 s%@build_vendor@%$build_vendor%g
6845 s%@build_os@%$build_os%g
6846 s%@LN_S@%$LN_S%g
6847 s%@libgcj_basedir@%$libgcj_basedir%g
6848 s%@CC@%$CC%g
6849 s%@CXX@%$CXX%g
6850 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6851 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6852 s%@INSTALL_DATA@%$INSTALL_DATA%g
6853 s%@PACKAGE@%$PACKAGE%g
6854 s%@VERSION@%$VERSION%g
6855 s%@ACLOCAL@%$ACLOCAL%g
6856 s%@AUTOCONF@%$AUTOCONF%g
6857 s%@AUTOMAKE@%$AUTOMAKE%g
6858 s%@AUTOHEADER@%$AUTOHEADER%g
6859 s%@MAKEINFO@%$MAKEINFO%g
6860 s%@SET_MAKE@%$SET_MAKE%g
6861 s%@AS@%$AS%g
6862 s%@AR@%$AR%g
6863 s%@RANLIB@%$RANLIB%g
6864 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
6865 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
6866 s%@MAINT@%$MAINT%g
6867 s%@EXEEXT@%$EXEEXT%g
6868 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
6869 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
6870 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
6871 s%@INCLTDL@%$INCLTDL%g
6872 s%@LIBLTDL@%$LIBLTDL%g
6873 s%@DIRLTDL@%$DIRLTDL%g
6874 s%@OBJEXT@%$OBJEXT%g
6875 s%@STRIP@%$STRIP%g
6876 s%@LIBTOOL@%$LIBTOOL%g
6877 s%@CXXCPP@%$CXXCPP%g
6878 s%@subdirs@%$subdirs%g
6879 s%@COMPPATH@%$COMPPATH%g
6880 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
6881 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
6882 s%@LIBDATASTARTSPEC@%$LIBDATASTARTSPEC%g
6883 s%@CPP@%$CPP%g
6884 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
6885 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
6886 s%@ZLIBSPEC@%$ZLIBSPEC%g
6887 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
6888 s%@GCLIBS@%$GCLIBS%g
6889 s%@GCINCS@%$GCINCS%g
6890 s%@GCDEPS@%$GCDEPS%g
6891 s%@GCOBJS@%$GCOBJS%g
6892 s%@GCSPEC@%$GCSPEC%g
6893 s%@JC1GCSPEC@%$JC1GCSPEC%g
6894 s%@GCTESTSPEC@%$GCTESTSPEC%g
6895 s%@THREADLIBS@%$THREADLIBS%g
6896 s%@THREADINCS@%$THREADINCS%g
6897 s%@THREADDEPS@%$THREADDEPS%g
6898 s%@THREADOBJS@%$THREADOBJS%g
6899 s%@THREADSPEC@%$THREADSPEC%g
6900 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
6901 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
6902 s%@GCJ@%$GCJ%g
6903 s%@GCJFLAGS@%$GCJFLAGS%g
6904 s%@ZLIBS@%$ZLIBS%g
6905 s%@ZDEPS@%$ZDEPS%g
6906 s%@ZINCS@%$ZINCS%g
6907 s%@DIVIDESPEC@%$DIVIDESPEC%g
6908 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
6909 s%@FORCELIBGCCSPEC@%$FORCELIBGCCSPEC%g
6910 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
6911 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
6912 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
6913 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
6914 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
6915 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
6916 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
6917 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
6918 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
6919 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
6920 s%@EH_COMMON_INCLUDE@%$EH_COMMON_INCLUDE%g
6921 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
6922 s%@ALLOCA@%$ALLOCA%g
6923 s%@PERL@%$PERL%g
6924 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
6925 s%@X_CFLAGS@%$X_CFLAGS%g
6926 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
6927 s%@X_LIBS@%$X_LIBS%g
6928 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
6929 s%@NO_X_TRUE@%$NO_X_TRUE%g
6930 s%@NO_X_FALSE@%$NO_X_FALSE%g
6931 s%@here@%$here%g
6932
6933 CEOF
6934 EOF
6935
6936 cat >> $CONFIG_STATUS <<\EOF
6937
6938 # Split the substitutions into bite-sized pieces for seds with
6939 # small command number limits, like on Digital OSF/1 and HP-UX.
6940 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6941 ac_file=1 # Number of current file.
6942 ac_beg=1 # First line for current file.
6943 ac_end=$ac_max_sed_cmds # Line after last line for current file.
6944 ac_more_lines=:
6945 ac_sed_cmds=""
6946 while $ac_more_lines; do
6947 if test $ac_beg -gt 1; then
6948 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6949 else
6950 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6951 fi
6952 if test ! -s conftest.s$ac_file; then
6953 ac_more_lines=false
6954 rm -f conftest.s$ac_file
6955 else
6956 if test -z "$ac_sed_cmds"; then
6957 ac_sed_cmds="sed -f conftest.s$ac_file"
6958 else
6959 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6960 fi
6961 ac_file=`expr $ac_file + 1`
6962 ac_beg=$ac_end
6963 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6964 fi
6965 done
6966 if test -z "$ac_sed_cmds"; then
6967 ac_sed_cmds=cat
6968 fi
6969 EOF
6970
6971 cat >> $CONFIG_STATUS <<EOF
6972
6973 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gcj/Makefile include/Makefile testsuite/Makefile"}
6974 EOF
6975 cat >> $CONFIG_STATUS <<\EOF
6976 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6977 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
6978 case "$ac_file" in
6979 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
6980 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6981 *) ac_file_in="${ac_file}.in" ;;
6982 esac
6983
6984 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
6985
6986 # Remove last slash and all that follows it. Not all systems have dirname.
6987 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6988 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6989 # The file is in a subdirectory.
6990 test ! -d "$ac_dir" && mkdir "$ac_dir"
6991 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
6992 # A "../" for each directory in $ac_dir_suffix.
6993 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6994 else
6995 ac_dir_suffix= ac_dots=
6996 fi
6997
6998 case "$ac_given_srcdir" in
6999 .) srcdir=.
7000 if test -z "$ac_dots"; then top_srcdir=.
7001 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7002 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7003 *) # Relative path.
7004 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7005 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7006 esac
7007
7008 case "$ac_given_INSTALL" in
7009 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7010 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7011 esac
7012
7013 echo creating "$ac_file"
7014 rm -f "$ac_file"
7015 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7016 case "$ac_file" in
7017 *Makefile*) ac_comsub="1i\\
7018 # $configure_input" ;;
7019 *) ac_comsub= ;;
7020 esac
7021
7022 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7023 sed -e "$ac_comsub
7024 s%@configure_input@%$configure_input%g
7025 s%@srcdir@%$srcdir%g
7026 s%@top_srcdir@%$top_srcdir%g
7027 s%@INSTALL@%$INSTALL%g
7028 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7029 fi; done
7030 rm -f conftest.s*
7031
7032 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7033 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7034 #
7035 # ac_d sets the value in "#define NAME VALUE" lines.
7036 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7037 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7038 ac_dC='\3'
7039 ac_dD='%g'
7040 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7041 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7042 ac_uB='\([ ]\)%\1#\2define\3'
7043 ac_uC=' '
7044 ac_uD='\4%g'
7045 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7046 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7047 ac_eB='$%\1#\2define\3'
7048 ac_eC=' '
7049 ac_eD='%g'
7050
7051 if test "${CONFIG_HEADERS+set}" != set; then
7052 EOF
7053 cat >> $CONFIG_STATUS <<EOF
7054 CONFIG_HEADERS="include/config.h"
7055 EOF
7056 cat >> $CONFIG_STATUS <<\EOF
7057 fi
7058 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7059 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7060 case "$ac_file" in
7061 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7062 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7063 *) ac_file_in="${ac_file}.in" ;;
7064 esac
7065
7066 echo creating $ac_file
7067
7068 rm -f conftest.frag conftest.in conftest.out
7069 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7070 cat $ac_file_inputs > conftest.in
7071
7072 EOF
7073
7074 # Transform confdefs.h into a sed script conftest.vals that substitutes
7075 # the proper values into config.h.in to produce config.h. And first:
7076 # Protect against being on the right side of a sed subst in config.status.
7077 # Protect against being in an unquoted here document in config.status.
7078 rm -f conftest.vals
7079 cat > conftest.hdr <<\EOF
7080 s/[\\&%]/\\&/g
7081 s%[\\$`]%\\&%g
7082 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7083 s%ac_d%ac_u%gp
7084 s%ac_u%ac_e%gp
7085 EOF
7086 sed -n -f conftest.hdr confdefs.h > conftest.vals
7087 rm -f conftest.hdr
7088
7089 # This sed command replaces #undef with comments. This is necessary, for
7090 # example, in the case of _POSIX_SOURCE, which is predefined and required
7091 # on some systems where configure will not decide to define it.
7092 cat >> conftest.vals <<\EOF
7093 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7094 EOF
7095
7096 # Break up conftest.vals because some shells have a limit on
7097 # the size of here documents, and old seds have small limits too.
7098
7099 rm -f conftest.tail
7100 while :
7101 do
7102 ac_lines=`grep -c . conftest.vals`
7103 # grep -c gives empty output for an empty file on some AIX systems.
7104 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7105 # Write a limited-size here document to conftest.frag.
7106 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7107 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7108 echo 'CEOF
7109 sed -f conftest.frag conftest.in > conftest.out
7110 rm -f conftest.in
7111 mv conftest.out conftest.in
7112 ' >> $CONFIG_STATUS
7113 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7114 rm -f conftest.vals
7115 mv conftest.tail conftest.vals
7116 done
7117 rm -f conftest.vals
7118
7119 cat >> $CONFIG_STATUS <<\EOF
7120 rm -f conftest.frag conftest.h
7121 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7122 cat conftest.in >> conftest.h
7123 rm -f conftest.in
7124 if cmp -s $ac_file conftest.h 2>/dev/null; then
7125 echo "$ac_file is unchanged"
7126 rm -f conftest.h
7127 else
7128 # Remove last slash and all that follows it. Not all systems have dirname.
7129 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7130 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7131 # The file is in a subdirectory.
7132 test ! -d "$ac_dir" && mkdir "$ac_dir"
7133 fi
7134 rm -f $ac_file
7135 mv conftest.h $ac_file
7136 fi
7137 fi; done
7138
7139 EOF
7140
7141 cat >> $CONFIG_STATUS <<EOF
7142 ac_sources="java/io/$FILE_DESCRIPTOR java/lang/${PROCESS}Process.java java/lang/nat${PROCESS}Process.cc include/$GCHDR include/$THREADH $SIGNAL_HANDLER"
7143 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"
7144 EOF
7145
7146 cat >> $CONFIG_STATUS <<\EOF
7147 srcdir=$ac_given_srcdir
7148 while test -n "$ac_sources"; do
7149 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7150 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7151
7152 echo "linking $srcdir/$ac_source to $ac_dest"
7153
7154 if test ! -r $srcdir/$ac_source; then
7155 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7156 fi
7157 rm -f $ac_dest
7158
7159 # Make relative symlinks.
7160 # Remove last slash and all that follows it. Not all systems have dirname.
7161 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7162 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7163 # The dest file is in a subdirectory.
7164 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7165 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7166 # A "../" for each directory in $ac_dest_dir_suffix.
7167 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7168 else
7169 ac_dest_dir_suffix= ac_dots=
7170 fi
7171
7172 case "$srcdir" in
7173 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7174 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7175 esac
7176
7177 # Make a symlink if possible; otherwise try a hard link.
7178 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7179 ln $srcdir/$ac_source $ac_dest; then :
7180 else
7181 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7182 fi
7183 done
7184 EOF
7185 cat >> $CONFIG_STATUS <<EOF
7186
7187 srcdir=${srcdir}
7188 host=${host}
7189 target=${target}
7190 with_multisubdir=${with_multisubdir}
7191 ac_configure_args="${multilib_arg} ${ac_configure_args}"
7192 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7193 libgcj_basedir=${libgcj_basedir}
7194 CC="${CC}"
7195 CXX="${CXX}"
7196
7197 EOF
7198 cat >> $CONFIG_STATUS <<\EOF
7199 test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
7200 if test -n "$CONFIG_FILES"; then
7201 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
7202 fi
7203
7204 # Make subdirectories and `.d' files. Look in both srcdir and
7205 # builddir for the .java files.
7206 h=`pwd`
7207 : > deps.mk
7208 ( (cd $srcdir && find . -name '*.java' -print) ;
7209 find . -name '*.java' -print) | \
7210 fgrep -v testsuite | \
7211 sed -e 's/\.java/.d/' | \
7212 while read f; do
7213 echo "include $f" >> deps.mk
7214 test -f $f || {
7215
7216 d=`echo $f | sed -e 's,/[^/]*$,,'`
7217
7218 $srcdir/../mkinstalldirs $d
7219 : > $f
7220 }
7221 done
7222
7223 exit 0
7224 EOF
7225 chmod +x $CONFIG_STATUS
7226 rm -fr confdefs* $ac_clean_files
7227 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7228
7229 if test "$no_recursion" != yes; then
7230
7231 # Remove --cache-file and --srcdir arguments so they do not pile up.
7232 ac_sub_configure_args=
7233 ac_prev=
7234 for ac_arg in $ac_configure_args; do
7235 if test -n "$ac_prev"; then
7236 ac_prev=
7237 continue
7238 fi
7239 case "$ac_arg" in
7240 -cache-file | --cache-file | --cache-fil | --cache-fi \
7241 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7242 ac_prev=cache_file ;;
7243 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7244 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7245 ;;
7246 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7247 ac_prev=srcdir ;;
7248 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7249 ;;
7250 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7251 esac
7252 done
7253
7254 for ac_config_dir in $DIRLTDL; do
7255
7256 # Do not complain, so a configure script can configure whichever
7257 # parts of a large source tree are present.
7258 if test ! -d $srcdir/$ac_config_dir; then
7259 continue
7260 fi
7261
7262 echo configuring in $ac_config_dir
7263
7264 case "$srcdir" in
7265 .) ;;
7266 *)
7267 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7268 else
7269 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7270 fi
7271 ;;
7272 esac
7273
7274 ac_popdir=`pwd`
7275 cd $ac_config_dir
7276
7277 # A "../" for each directory in /$ac_config_dir.
7278 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7279
7280 case "$srcdir" in
7281 .) # No --srcdir option. We are building in place.
7282 ac_sub_srcdir=$srcdir ;;
7283 /*) # Absolute path.
7284 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7285 *) # Relative path.
7286 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7287 esac
7288
7289 # Check for guested configure; otherwise get Cygnus style configure.
7290 if test -f $ac_sub_srcdir/configure; then
7291 ac_sub_configure=$ac_sub_srcdir/configure
7292 elif test -f $ac_sub_srcdir/configure.in; then
7293 ac_sub_configure=$ac_configure
7294 else
7295 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7296 ac_sub_configure=
7297 fi
7298
7299 # The recursion is here.
7300 if test -n "$ac_sub_configure"; then
7301
7302 # Make the cache file name correct relative to the subdirectory.
7303 case "$cache_file" in
7304 /*) ac_sub_cache_file=$cache_file ;;
7305 *) # Relative path.
7306 ac_sub_cache_file="$ac_dots$cache_file" ;;
7307 esac
7308 case "$ac_given_INSTALL" in
7309 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7310 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7311 esac
7312
7313 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7314 # The eval makes quoting arguments work.
7315 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7316 then :
7317 else
7318 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7319 fi
7320 fi
7321
7322 cd $ac_popdir
7323 done
7324 fi
7325