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