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