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