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