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