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