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