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