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