Install libgcj.jar as libgcj-VERSION.jar.
[gcc.git] / libjava / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --with-target-subdir=SUBDIR
16 configuring in a subdirectory"
17 ac_help="$ac_help
18 --with-cross-host=HOST configuring with a cross compiler"
19 ac_help="$ac_help
20 --enable-multilib build many library versions (default)"
21 ac_help="$ac_help
22 --enable-maintainer-mode enable make rules and dependencies not useful
23 (and sometimes confusing) to the casual installer"
24 ac_help="$ac_help
25 --enable-shared[=PKGS] build shared libraries [default=yes]"
26 ac_help="$ac_help
27 --enable-static[=PKGS] build static libraries [default=yes]"
28 ac_help="$ac_help
29 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
30 ac_help="$ac_help
31 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
32 ac_help="$ac_help
33 --disable-libtool-lock avoid locking (might break parallel builds)"
34 ac_help="$ac_help
35 --with-pic try to use only PIC/non-PIC objects [default=use both]"
36 ac_help="$ac_help
37 --disable-getenv-properties
38 don't set system properties from GCJ_PROPERTIES"
39 ac_help="$ac_help
40 --enable-hash-synchronization
41 Use global hash table for monitor locks"
42 ac_help="$ac_help
43 --enable-libgcj-debug enable runtime debugging code"
44 ac_help="$ac_help
45 --enable-interpreter enable interpreter"
46 ac_help="$ac_help
47 --enable-sjlj-exceptions force use of builtin_setjmp for exceptions"
48 ac_help="$ac_help
49 --disable-java-net disable java.net"
50 ac_help="$ac_help
51 --without-libffi don't use libffi"
52 ac_help="$ac_help
53 --disable-jvmpi disable JVMPI support"
54 ac_help="$ac_help
55 --with-ecos enable runtime eCos target support"
56 ac_help="$ac_help
57 --with-system-zlib use installed libz"
58 ac_help="$ac_help
59 --enable-java-gc=TYPE choose garbage collector [boehm]"
60 ac_help="$ac_help
61 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
62 ac_help="$ac_help
63 --with-x use the X Window System"
64 ac_help="$ac_help
65 --enable-java-awt list of AWT peer implementations to be built"
66
67 # Initialize some variables set by options.
68 # The variables have the same names as the options, with
69 # dashes changed to underlines.
70 build=NONE
71 cache_file=./config.cache
72 exec_prefix=NONE
73 host=NONE
74 no_create=
75 nonopt=NONE
76 no_recursion=
77 prefix=NONE
78 program_prefix=NONE
79 program_suffix=NONE
80 program_transform_name=s,x,x,
81 silent=
82 site=
83 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'
100
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
107
108 ac_prev=
109 for ac_option
110 do
111
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
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
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" ;;
144
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" ;;
150
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; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
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; }
165 fi
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'" ;;
172
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" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
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
222 EOF
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
235 EOF
236 if test -n "$ac_help"; then
237 echo "--enable and --with options recognized:$ac_help"
238 fi
239 exit 0 ;;
240
241 -host | --host | --hos | --ho)
242 ac_prev=host ;;
243 -host=* | --host=* | --hos=* | --ho=*)
244 host="$ac_optarg" ;;
245
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" ;;
252
253 -infodir | --infodir | --infodi | --infod | --info | --inf)
254 ac_prev=infodir ;;
255 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
256 infodir="$ac_optarg" ;;
257
258 -libdir | --libdir | --libdi | --libd)
259 ac_prev=libdir ;;
260 -libdir=* | --libdir=* | --libdi=* | --libd=*)
261 libdir="$ac_optarg" ;;
262
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" ;;
269
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" ;;
278
279 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
280 ac_prev=mandir ;;
281 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
282 mandir="$ac_optarg" ;;
283
284 -nfp | --nfp | --nf)
285 # Obsolete; use --without-fp.
286 with_fp=no ;;
287
288 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
289 | --no-cr | --no-c)
290 no_create=yes ;;
291
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 ;;
295
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" ;;
304
305 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
306 ac_prev=prefix ;;
307 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
308 prefix="$ac_optarg" ;;
309
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" ;;
316
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" ;;
323
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" ;;
340
341 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
342 | -silent | --silent | --silen | --sile | --sil)
343 silent=yes ;;
344
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" ;;
350
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" ;;
361
362 -site | --site | --sit)
363 ac_prev=site ;;
364 -site=* | --site=* | --sit=*)
365 site="$ac_optarg" ;;
366
367 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
368 ac_prev=srcdir ;;
369 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
370 srcdir="$ac_optarg" ;;
371
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" ;;
378
379 -target | --target | --targe | --targ | --tar | --ta | --t)
380 ac_prev=target ;;
381 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
382 target="$ac_optarg" ;;
383
384 -v | -verbose | --verbose | --verbos | --verbo | --verb)
385 verbose=yes ;;
386
387 -version | --version | --versio | --versi | --vers)
388 echo "configure generated by autoconf version 2.13"
389 exit 0 ;;
390
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; }
396 fi
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'" ;;
403
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; }
409 fi
410 ac_package=`echo $ac_package| sed 's/-/_/g'`
411 eval "with_${ac_package}=no" ;;
412
413 --x)
414 # Obsolete; use --with-x.
415 with_x=yes ;;
416
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" ;;
423
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" ;;
430
431 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
432 ;;
433
434 *)
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
437 fi
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; }
440 fi
441 nonopt="$ac_option"
442 ;;
443
444 esac
445 done
446
447 if test -n "$ac_prev"; then
448 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
449 fi
450
451 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
452
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
465 fi
466 exec 5>./config.log
467
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
472
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
477 do
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
488
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
498
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
503
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
507
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=..
518 fi
519 else
520 ac_srcdir_defaulted=no
521 fi
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; }
527 fi
528 fi
529 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
530
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"
537 fi
538 fi
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"
543 fi
544 done
545
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
552 fi
553
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
560
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=
570 fi
571 else
572 ac_n= ac_c='\c' ac_t=
573 fi
574
575
576
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
589 fi
590 fi
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
596 fi
597
598
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"
602 :
603 fi
604
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"
608 :
609 fi
610
611
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/*) ;;
634 *)
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.
643 :
644 else
645 ac_cv_path_install="$ac_dir/$ac_prog -c"
646 break 2
647 fi
648 fi
649 done
650 ;;
651 esac
652 done
653 IFS="$ac_save_IFS"
654
655 fi
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"
664 fi
665 fi
666 echo "$ac_t""$INSTALL" 1>&6
667
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}'
671
672 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
673
674 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
675
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`
691 fi
692 if test "$*" != "X $srcdir/configure conftestfile" \
693 && test "$*" != "X conftestfile $srcdir/configure"; then
694
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; }
701 fi
702
703 test "$2" = conftestfile
704 )
705 then
706 # Ok.
707 :
708 else
709 { echo "configure: error: newly created file is older than distributed files!
710 Check your system clock" 1>&2; exit 1; }
711 fi
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
723 fi
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"
729
730 # sed with no file args requires a program.
731 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
732
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}"'
742 EOF
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
749 fi
750 rm -f conftestmake
751 fi
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}"
758 fi
759
760 if test $host != $build; then
761 ac_tool_prefix=${host_alias}-
762 else
763 ac_tool_prefix=
764 fi
765
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"
774
775 int main() {
776
777 #ifndef __CYGWIN__
778 #define __CYGWIN__ __CYGWIN32__
779 #endif
780 return __CYGWIN__;
781 ; return 0; }
782 EOF
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
791 fi
792 rm -f conftest*
793 rm -f conftest*
794 fi
795
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"
807
808 int main() {
809 return __MINGW32__;
810 ; return 0; }
811 EOF
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
820 fi
821 rm -f conftest*
822 rm -f conftest*
823 fi
824
825 echo "$ac_t""$ac_cv_mingw32" 1>&6
826 MINGW32=
827 test "$ac_cv_mingw32" = yes && MINGW32=yes
828
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
839 fi
840
841
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}.."
855 fi
856 fi
857 else
858 toprel=".."
859 fi
860
861 libgcj_basedir=$srcdir/$toprel/./libjava
862
863
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
874 fi
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; }
878 fi
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.
882
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
896 fi
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; }
900 fi
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.
904
905 fi
906
907 # This works around an automake problem.
908 mkinstalldirs="`cd $ac_aux_dir && pwd`/mkinstalldirs"
909
910
911
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
915 #
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.
924
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
931
932
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; }
936 fi
937
938 echo $ac_n "checking host system type""... $ac_c" 1>&6
939 echo "configure:940: checking host system type" >&5
940
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
952
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
958
959 echo $ac_n "checking target system type""... $ac_c" 1>&6
960 echo "configure:961: checking target system type" >&5
961
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
970
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
976
977 echo $ac_n "checking build system type""... $ac_c" 1>&6
978 echo "configure:979: checking build system type" >&5
979
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
988
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
994
995 test "$host_alias" != "$target_alias" &&
996 test "$program_prefix$program_suffix$program_transform_name" = \
997 NONENONEs,x,x, &&
998 program_prefix=${target_alias}-
999
1000
1001
1002
1003
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
1021 fi
1022 done
1023 IFS="$ac_save_ifs"
1024 fi
1025 fi
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
1031 fi
1032
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
1053 fi
1054 ac_cv_prog_CC="cc"
1055 break
1056 fi
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="$@"
1071 fi
1072 fi
1073 fi
1074 fi
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
1080 fi
1081
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
1102 fi
1103 done
1104 IFS="$ac_save_ifs"
1105 fi
1106 fi
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
1112 fi
1113 ;;
1114 esac
1115 fi
1116 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1117 fi
1118
1119
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
1129 EOF
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
1134 fi
1135 fi
1136
1137 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1138
1139 if test $ac_cv_prog_gcc = yes; then
1140 GCC=yes
1141 else
1142 GCC=
1143 fi
1144
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
1158 fi
1159 rm -f conftest*
1160
1161 fi
1162
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"
1171 fi
1172 else
1173 if test "$GCC" = yes; then
1174 CFLAGS="-O2"
1175 else
1176 CFLAGS=
1177 fi
1178 fi
1179
1180
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.
1185
1186
1187
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++
1194 do
1195 # Extract the first word of "$ac_prog", so it can be a program name with args.
1196 set dummy $ac_prog; ac_word=$2
1197 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1198 echo "configure:1199: checking for $ac_word" >&5
1199 if eval "test \"`echo '$''{'ac_cv_prog_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
1212 fi
1213 done
1214 IFS="$ac_save_ifs"
1215 fi
1216 fi
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
1222 fi
1223
1224 test -n "$glibjava_CXX" && break
1225 done
1226 test -n "$glibjava_CXX" || glibjava_CXX="gcc"
1227
1228
1229 CXX=$glibjava_CXX
1230 test -z "$glibjava_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
1231
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
1241 EOF
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
1246 fi
1247 fi
1248
1249 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1250
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
1266 fi
1267 rm -f conftest*
1268
1269 fi
1270
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"
1278 fi
1279 else
1280 GXX=
1281 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1282 fi
1283
1284
1285 version=0.0.7
1286
1287 PACKAGE=libjava
1288
1289 VERSION=$version
1290
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; }
1293 fi
1294 cat >> confdefs.h <<EOF
1295 #define PACKAGE "$PACKAGE"
1296 EOF
1297
1298 cat >> confdefs.h <<EOF
1299 #define VERSION "$VERSION"
1300 EOF
1301
1302
1303
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
1316 fi
1317
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
1329 fi
1330
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
1342 fi
1343
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
1355 fi
1356
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
1368 fi
1369
1370
1371
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
1378
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
1387
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
1393
1394
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
1412 fi
1413 done
1414 IFS="$ac_save_ifs"
1415 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1416 fi
1417 fi
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
1423 fi
1424
1425
1426
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
1444 fi
1445 done
1446 IFS="$ac_save_ifs"
1447 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1448 fi
1449 fi
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
1455 fi
1456
1457
1458
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
1476 fi
1477 done
1478 IFS="$ac_save_ifs"
1479 fi
1480 fi
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
1486 fi
1487
1488
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
1508 fi
1509 done
1510 IFS="$ac_save_ifs"
1511 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1512 fi
1513 fi
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
1519 fi
1520
1521 else
1522 RANLIB=":"
1523 fi
1524 fi
1525
1526
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/*) ;;
1549 *)
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.
1558 :
1559 else
1560 ac_cv_path_install="$ac_dir/$ac_prog -c"
1561 break 2
1562 fi
1563 fi
1564 done
1565 ;;
1566 esac
1567 done
1568 IFS="$ac_save_IFS"
1569
1570 fi
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"
1579 fi
1580 fi
1581 echo "$ac_t""$INSTALL" 1>&6
1582
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}'
1586
1587 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1588
1589 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1590
1591
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
1600 fi
1601
1602 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
1603
1604
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=
1611 fi
1612 MAINT=$MAINTAINER_MODE_TRUE
1613
1614
1615
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.
1627 :
1628
1629
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; }
1650 fi
1651 rm -f conftest*
1652 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1653 fi
1654 fi
1655
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
1660
1661 fi
1662
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
1667
1668 libgcj_cflags=
1669 libgcj_cxxflags=
1670 libgcj_javaflags=
1671
1672 . ${srcdir}/configure.host
1673
1674 LIBGCJ_CFLAGS="${libgcj_cflags}"
1675 LIBGCJ_CXXFLAGS="${libgcj_cxxflags}"
1676 LIBGCJ_JAVAFLAGS="${libgcj_javaflags}"
1677
1678
1679
1680
1681
1682
1683
1684
1685
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'
1695
1696
1697 DIRLTDL=libltdl
1698 cat >> confdefs.h <<\EOF
1699 #define USE_LTDL 1
1700 EOF
1701
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"
1707 fi
1708
1709
1710
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 ;;
1718 *)
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
1725 fi
1726 done
1727 IFS="$ac_save_ifs"
1728 ;;
1729 esac
1730 else
1731 enable_shared=yes
1732 fi
1733
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 ;;
1741 *)
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
1748 fi
1749 done
1750 IFS="$ac_save_ifs"
1751 ;;
1752 esac
1753 else
1754 enable_static=yes
1755 fi
1756
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 ;;
1764 *)
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
1771 fi
1772 done
1773 IFS="$ac_save_ifs"
1774 ;;
1775 esac
1776 else
1777 enable_fast_install=yes
1778 fi
1779
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
1786 fi
1787
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'` ;;
1797 *)
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"
1810 ;;
1811 "")
1812 # If it fails, then pretend we aren't using GCC.
1813 ac_prog=ld
1814 ;;
1815 *)
1816 # If it is relative, then search for the first ld in PATH.
1817 with_gnu_ld=unknown
1818 ;;
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
1826 fi
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
1843 fi
1844 fi
1845 done
1846 IFS="$ac_save_ifs"
1847 else
1848 lt_cv_path_LD="$LD" # Let the user override the test with a path.
1849 fi
1850 fi
1851
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
1857 fi
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
1869 fi
1870 fi
1871
1872 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1873 with_gnu_ld=$lt_cv_prog_gnu_ld
1874
1875
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'
1882 fi
1883
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"
1887
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
1915 fi
1916 fi
1917 done
1918 IFS="$ac_save_ifs"
1919 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1920 fi
1921 fi
1922
1923 NM="$lt_cv_path_NM"
1924 echo "$ac_t""$NM" 1>&6
1925
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.
1944
1945 case $host_os in
1946 aix*)
1947 lt_cv_deplibs_check_method=pass_all
1948 ;;
1949
1950 beos*)
1951 lt_cv_deplibs_check_method=pass_all
1952 ;;
1953
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
1958 ;;
1959
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'
1963 ;;
1964
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'
1971 ;;
1972 *) # Darwin 1.3 on
1973 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1974 ;;
1975 esac
1976 ;;
1977
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.*`
1987 ;;
1988 esac
1989 else
1990 lt_cv_deplibs_check_method=pass_all
1991 fi
1992 ;;
1993
1994 gnu*)
1995 lt_cv_deplibs_check_method=pass_all
1996 ;;
1997
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
2002 ;;
2003
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"
2009 ;;
2010 *)
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"
2019 ;;
2020 esac
2021 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2022 lt_cv_deplibs_check_method=pass_all
2023 ;;
2024
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 ;;
2030 *)
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`
2035 ;;
2036
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$'
2042 fi
2043 ;;
2044
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
2049 ;;
2050
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
2056 ;;
2057
2058 sco3.2v5*)
2059 lt_cv_deplibs_check_method=pass_all
2060 ;;
2061
2062 solaris*)
2063 lt_cv_deplibs_check_method=pass_all
2064 lt_cv_file_magic_test_file=/lib/libc.so
2065 ;;
2066
2067 sysv5uw[78]* | sysv4*uw2*)
2068 lt_cv_deplibs_check_method=pass_all
2069 ;;
2070
2071 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2072 case $host_vendor in
2073 ncr)
2074 lt_cv_deplibs_check_method=pass_all
2075 ;;
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*`
2079 ;;
2080 esac
2081 ;;
2082 esac
2083
2084 fi
2085
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
2089
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; }
2106 fi
2107 rm -f conftest*
2108 fi
2109
2110 echo "$ac_t""$ac_cv_objext" 1>&6
2111 OBJEXT=$ac_cv_objext
2112 ac_objext=$ac_cv_objext
2113
2114 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
2115
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
2126 /*)
2127 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2128 ;;
2129 ?:/*)
2130 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2131 ;;
2132 *)
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
2147 :
2148 else
2149 cat <<EOF 1>&2
2150
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
2159
2160 EOF
2161 fi ;;
2162 esac
2163 fi
2164 break
2165 fi
2166 done
2167 IFS="$ac_save_ifs"
2168 MAGIC_CMD="$ac_save_MAGIC_CMD"
2169 ;;
2170 esac
2171 fi
2172
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
2178 fi
2179
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
2188 /*)
2189 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2190 ;;
2191 ?:/*)
2192 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2193 ;;
2194 *)
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
2209 :
2210 else
2211 cat <<EOF 1>&2
2212
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
2221
2222 EOF
2223 fi ;;
2224 esac
2225 fi
2226 break
2227 fi
2228 done
2229 IFS="$ac_save_ifs"
2230 MAGIC_CMD="$ac_save_MAGIC_CMD"
2231 ;;
2232 esac
2233 fi
2234
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
2240 fi
2241
2242 else
2243 MAGIC_CMD=:
2244 fi
2245 fi
2246
2247 fi
2248 ;;
2249 esac
2250
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
2268 fi
2269 done
2270 IFS="$ac_save_ifs"
2271 fi
2272 fi
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
2278 fi
2279
2280
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
2300 fi
2301 done
2302 IFS="$ac_save_ifs"
2303 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2304 fi
2305 fi
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
2311 fi
2312
2313 else
2314 RANLIB=":"
2315 fi
2316 fi
2317
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
2335 fi
2336 done
2337 IFS="$ac_save_ifs"
2338 fi
2339 fi
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
2345 fi
2346
2347
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
2367 fi
2368 done
2369 IFS="$ac_save_ifs"
2370 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
2371 fi
2372 fi
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
2378 fi
2379
2380 else
2381 STRIP=":"
2382 fi
2383 fi
2384
2385
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"
2394
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"
2398 :
2399 fi
2400
2401 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
2402 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
2403
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
2410 fi
2411
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"
2414
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"
2425 ;;
2426 *N32*)
2427 LD="${LD-ld} -n32"
2428 ;;
2429 *64-bit*)
2430 LD="${LD-ld} -64"
2431 ;;
2432 esac
2433 fi
2434 rm -rf conftest*
2435 ;;
2436
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
2446
2447 ac_ext=c
2448 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2449 ac_cpp='$CPP $CPPFLAGS'
2450 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2451 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2452 cross_compiling=$ac_cv_prog_cc_cross
2453
2454 cat > conftest.$ac_ext <<EOF
2455 #line 2456 "configure"
2456 #include "confdefs.h"
2457
2458 int main() {
2459
2460 ; return 0; }
2461 EOF
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
2470 fi
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
2478
2479 fi
2480
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"
2485 fi
2486 ;;
2487
2488
2489 esac
2490
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>
2508 EOF
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
2513 :
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
2520 fi
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
2529 fi
2530 fi
2531 CXXCPP="$ac_cv_prog_CXXCPP"
2532 echo "$ac_t""$CXXCPP" 1>&6
2533
2534
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.
2541 #
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.
2550 #
2551 EOF
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"
2565 ;;
2566 *)
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'
2569 ;;
2570 esac >> confcache
2571 if cmp -s $cache_file confcache; then
2572 :
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"
2579 fi
2580 fi
2581 rm -f confcache
2582
2583
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; }
2594
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
2602 fi
2603
2604
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"
2607
2608 # Always use our own libtool.
2609 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2610
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
2614
2615
2616
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"
2632
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
2636
2637
2638
2639
2640
2641
2642 subdirs="$DIRLTDL"
2643
2644
2645 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
2646 COMPPATH=.
2647 else
2648 COMPPATH=..
2649 fi
2650
2651
2652
2653
2654 if test -d $srcdir/testsuite; then
2655 TESTSUBDIR_TRUE=
2656 TESTSUBDIR_FALSE='#'
2657 else
2658 TESTSUBDIR_TRUE='#'
2659 TESTSUBDIR_FALSE=
2660 fi
2661
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"
2665 :
2666 fi
2667
2668
2669 if test -z "$enable_getenv_properties"; then
2670 enable_getenv_properties=${enable_getenv_properties_default-yes}
2671 fi
2672 if test "$enable_getenv_properties" = no; then
2673 cat >> confdefs.h <<\EOF
2674 #define DISABLE_GETENV_PROPERTIES 1
2675 EOF
2676
2677 fi
2678
2679 if test -z "$enable_main_args"; then
2680 enable_main_args=${enable_main_args_default-yes}
2681 fi
2682 if test "$enable_main_args" = no; then
2683 cat >> confdefs.h <<\EOF
2684 #define DISABLE_MAIN_ARGS 1
2685 EOF
2686
2687 fi
2688
2689
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"
2693 :
2694 fi
2695
2696
2697 if test -z "$enable_hash_synchronization"; then
2698 enable_hash_synchronization=$enable_hash_synchronization_default
2699 fi
2700
2701 if test "${slow_pthread_self}" = "yes"; then
2702 cat >> confdefs.h <<\EOF
2703 #define SLOW_PTHREAD_SELF 1
2704 EOF
2705
2706 fi
2707
2708
2709 LIBGCJDEBUG="false"
2710
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
2717 EOF
2718
2719 LIBGCJDEBUG="true"
2720 fi
2721 fi
2722
2723
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
2732 fi
2733 fi
2734
2735
2736 if test "$libgcj_interpreter" = yes; then
2737 cat >> confdefs.h <<\EOF
2738 #define INTERPRETER 1
2739 EOF
2740
2741 fi
2742
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
2745
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
2752
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"
2756 :
2757 else
2758 cat > conftest.$ac_ext << EOF
2759 #line 2760 "configure"
2760 struct S { ~S(); };
2761 void bar();
2762 void foo()
2763 {
2764 S s;
2765 bar();
2766 }
2767 EOF
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
2775 fi
2776 fi
2777 CXXFLAGS="$old_CXXFLAGS"
2778 rm -f conftest*
2779 fi
2780
2781 if test x$enable_sjlj_exceptions = xyes; then
2782 cat >> confdefs.h <<\EOF
2783 #define SJLJ_EXCEPTIONS 1
2784 EOF
2785
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; }
2791 fi
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
2798
2799 echo "$ac_t""$ac_exception_model_name" 1>&6
2800
2801 # If we are non using SJLJ exceptions, and this host does not have support
2802 # for unwinding from a signal handler, enable checked dereferences and divides.
2803 if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
2804 CHECKREFSPEC=-fcheck-references
2805 DIVIDESPEC=-fuse-divide-subroutine
2806 EXCEPTIONSPEC=
2807 fi
2808
2809 # Check whether --enable-java-net or --disable-java-net was given.
2810 if test "${enable_java_net+set}" = set; then
2811 enableval="$enable_java_net"
2812 :
2813 fi
2814
2815
2816 if test -z "$enable_java_net"; then
2817 enable_java_net=${enable_java_net_default-yes}
2818 fi
2819 if test "$enable_java_net" = no; then
2820 cat >> confdefs.h <<\EOF
2821 #define DISABLE_JAVA_NET 1
2822 EOF
2823
2824 fi
2825
2826 # Check whether --with-libffi or --without-libffi was given.
2827 if test "${with_libffi+set}" = set; then
2828 withval="$with_libffi"
2829 :
2830 else
2831 with_libffi=${with_libffi_default-yes}
2832 fi
2833
2834
2835 LIBFFI=
2836 LIBFFIINCS=
2837 if test "$with_libffi" != no; then
2838 cat >> confdefs.h <<\EOF
2839 #define USE_LIBFFI 1
2840 EOF
2841
2842 LIBFFI=../libffi/libffi_convenience.la
2843 LIBFFIINCS='-I$(top_srcdir)/../libffi/include -I$(MULTIBUILDTOP)../libffi/include'
2844 fi
2845
2846
2847
2848 # Check whether --enable-jvmpi or --disable-jvmpi was given.
2849 if test "${enable_jvmpi+set}" = set; then
2850 enableval="$enable_jvmpi"
2851 :
2852 fi
2853
2854
2855 if test "$enable_jvmpi" != no; then
2856 cat >> confdefs.h <<\EOF
2857 #define ENABLE_JVMPI 1
2858 EOF
2859
2860 fi
2861
2862 TARGET_ECOS=${PROCESS-"no"}
2863 # Check whether --with-ecos or --without-ecos was given.
2864 if test "${with_ecos+set}" = set; then
2865 withval="$with_ecos"
2866 TARGET_ECOS="$with_ecos"
2867
2868 fi
2869
2870
2871 PLATFORMOBJS=
2872 case "$TARGET_ECOS" in
2873 no) case "$host" in
2874 *mingw*)
2875 PLATFORM=Win32
2876 PLATFORMOBJS=win32.lo
2877 PLATFORMH=win32.h
2878 ;;
2879 *)
2880 PLATFORM=Posix
2881 PLATFORMOBJS=posix.lo
2882 PLATFORMH=posix.h
2883 ;;
2884 esac
2885 ;;
2886 *)
2887 PLATFORM=Ecos
2888 cat >> confdefs.h <<\EOF
2889 #define ECOS 1
2890 EOF
2891
2892 PLATFORMOBJS=posix.lo
2893 PLATFORMH=posix.h
2894 ;;
2895 esac
2896
2897
2898
2899 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2900 echo "configure:2901: checking how to run the C preprocessor" >&5
2901 # On Suns, sometimes $CPP names a directory.
2902 if test -n "$CPP" && test -d "$CPP"; then
2903 CPP=
2904 fi
2905 if test -z "$CPP"; then
2906 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2907 echo $ac_n "(cached) $ac_c" 1>&6
2908 else
2909 # This must be in double quotes, not single quotes, because CPP may get
2910 # substituted into the Makefile and "${CC-cc}" will confuse make.
2911 CPP="${CC-cc} -E"
2912 # On the NeXT, cc -E runs the code through the compiler's parser,
2913 # not just through cpp.
2914 cat > conftest.$ac_ext <<EOF
2915 #line 2916 "configure"
2916 #include "confdefs.h"
2917 #include <assert.h>
2918 Syntax Error
2919 EOF
2920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2921 { (eval echo configure:2922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2923 if test -z "$ac_err"; then
2924 :
2925 else
2926 echo "$ac_err" >&5
2927 echo "configure: failed program was:" >&5
2928 cat conftest.$ac_ext >&5
2929 rm -rf conftest*
2930 CPP="${CC-cc} -E -traditional-cpp"
2931 cat > conftest.$ac_ext <<EOF
2932 #line 2933 "configure"
2933 #include "confdefs.h"
2934 #include <assert.h>
2935 Syntax Error
2936 EOF
2937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2938 { (eval echo configure:2939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2940 if test -z "$ac_err"; then
2941 :
2942 else
2943 echo "$ac_err" >&5
2944 echo "configure: failed program was:" >&5
2945 cat conftest.$ac_ext >&5
2946 rm -rf conftest*
2947 CPP="${CC-cc} -nologo -E"
2948 cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2951 #include <assert.h>
2952 Syntax Error
2953 EOF
2954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2955 { (eval echo configure:2956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2957 if test -z "$ac_err"; then
2958 :
2959 else
2960 echo "$ac_err" >&5
2961 echo "configure: failed program was:" >&5
2962 cat conftest.$ac_ext >&5
2963 rm -rf conftest*
2964 CPP=/lib/cpp
2965 fi
2966 rm -f conftest*
2967 fi
2968 rm -f conftest*
2969 fi
2970 rm -f conftest*
2971 ac_cv_prog_CPP="$CPP"
2972 fi
2973 CPP="$ac_cv_prog_CPP"
2974 else
2975 ac_cv_prog_CPP="$CPP"
2976 fi
2977 echo "$ac_t""$CPP" 1>&6
2978
2979 cat > conftest.$ac_ext <<EOF
2980 #line 2981 "configure"
2981 #include "confdefs.h"
2982 #include <stdint.h>
2983 EOF
2984 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2985 egrep "uint32_t" >/dev/null 2>&1; then
2986 rm -rf conftest*
2987 cat >> confdefs.h <<\EOF
2988 #define HAVE_INT32_DEFINED 1
2989 EOF
2990
2991 fi
2992 rm -f conftest*
2993
2994 cat > conftest.$ac_ext <<EOF
2995 #line 2996 "configure"
2996 #include "confdefs.h"
2997 #include <inttypes.h>
2998 EOF
2999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3000 egrep "uint32_t" >/dev/null 2>&1; then
3001 rm -rf conftest*
3002 cat >> confdefs.h <<\EOF
3003 #define HAVE_INT32_DEFINED 1
3004 EOF
3005
3006 fi
3007 rm -f conftest*
3008
3009 cat > conftest.$ac_ext <<EOF
3010 #line 3011 "configure"
3011 #include "confdefs.h"
3012 #include <sys/types.h>
3013 EOF
3014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3015 egrep "u_int32_t" >/dev/null 2>&1; then
3016 rm -rf conftest*
3017 cat >> confdefs.h <<\EOF
3018 #define HAVE_BSD_INT32_DEFINED 1
3019 EOF
3020
3021 fi
3022 rm -f conftest*
3023
3024 cat > conftest.$ac_ext <<EOF
3025 #line 3026 "configure"
3026 #include "confdefs.h"
3027 #include <sys/config.h>
3028 EOF
3029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3030 egrep "u_int32_t" >/dev/null 2>&1; then
3031 rm -rf conftest*
3032 cat >> confdefs.h <<\EOF
3033 #define HAVE_BSD_INT32_DEFINED 1
3034 EOF
3035
3036 fi
3037 rm -f conftest*
3038
3039
3040
3041 cat > conftest.$ac_ext <<EOF
3042 #line 3043 "configure"
3043 #include "confdefs.h"
3044 #include <time.h>
3045 EOF
3046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3047 egrep "mktime" >/dev/null 2>&1; then
3048 rm -rf conftest*
3049 cat >> confdefs.h <<\EOF
3050 #define HAVE_MKTIME 1
3051 EOF
3052
3053 fi
3054 rm -f conftest*
3055
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 #include <time.h>
3060 EOF
3061 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3062 egrep "localtime" >/dev/null 2>&1; then
3063 rm -rf conftest*
3064 cat >> confdefs.h <<\EOF
3065 #define HAVE_LOCALTIME 1
3066 EOF
3067
3068 fi
3069 rm -f conftest*
3070
3071
3072 test -d java || mkdir java
3073 test -d java/io || mkdir java/io
3074 test -d gnu || mkdir gnu
3075
3076
3077
3078 test -d java/lang || mkdir java/lang
3079
3080
3081
3082 case "${host}" in
3083 *mingw*)
3084 SYSTEMSPEC="-lgdi32 -lwsock32 -lws2_32"
3085 ;;
3086 *)
3087 SYSTEMSPEC=
3088 ;;
3089 esac
3090
3091
3092 LIBGCJTESTSPEC="-L`pwd`/.libs -rpath `pwd`/.libs"
3093
3094
3095 # Check whether --with-system-zlib or --without-system-zlib was given.
3096 if test "${with_system_zlib+set}" = set; then
3097 withval="$with_system_zlib"
3098 :
3099 fi
3100
3101 ZLIBSPEC=
3102
3103 ZLIBTESTSPEC=
3104
3105
3106 libsubdir=.libs
3107
3108 echo $ac_n "checking for garbage collector to use""... $ac_c" 1>&6
3109 echo "configure:3110: checking for garbage collector to use" >&5
3110 # Check whether --enable-java-gc or --disable-java-gc was given.
3111 if test "${enable_java_gc+set}" = set; then
3112 enableval="$enable_java_gc"
3113
3114 GC=$enableval
3115 else
3116 GC=boehm
3117 fi
3118
3119 GCLIBS=
3120 GCINCS=
3121 GCDEPS=
3122 GCOBJS=
3123 GCSPEC=
3124 JC1GCSPEC=
3125 GCTESTSPEC=
3126 case "$GC" in
3127 boehm)
3128 echo "$ac_t""boehm" 1>&6
3129 GCLIBS=../boehm-gc/libgcjgc_convenience.la
3130 GCINCS='-I$(top_srcdir)/../boehm-gc/include'
3131 JC1GCSPEC='-fuse-boehm-gc'
3132 GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
3133
3134 GCINCS="$GCINCS `cat ../boehm-gc/boehm-cflags`"
3135 GCOBJS=boehm.lo
3136 GCHDR=boehm-gc.h
3137 cat >> confdefs.h <<\EOF
3138 #define HAVE_BOEHM_GC 1
3139 EOF
3140
3141 ;;
3142 no)
3143 echo "$ac_t""none" 1>&6
3144 GCOBJS=nogc.lo
3145 GCHDR=no-gc.h
3146 ;;
3147 *)
3148 { echo "configure: error: unrecognized collector \"$GC\"" 1>&2; exit 1; }
3149 ;;
3150 esac
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161 echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
3162 echo "configure:3163: checking for thread model used by GCC" >&5
3163 THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
3164 echo "$ac_t""$THREADS" 1>&6
3165
3166 case "$THREADS" in
3167 no | none | single)
3168 THREADS=none
3169 ;;
3170 posix | pthreads)
3171 THREADS=posix
3172 case "$host" in
3173 *-*-linux*)
3174 cat >> confdefs.h <<\EOF
3175 #define LINUX_THREADS 1
3176 EOF
3177
3178 ;;
3179 esac
3180 ;;
3181 win32)
3182 ;;
3183 decosf1 | irix | mach | os2 | solaris | dce | vxworks)
3184 { echo "configure: error: thread package $THREADS not yet supported" 1>&2; exit 1; }
3185 ;;
3186 *)
3187 { echo "configure: error: $THREADS is an unknown thread package" 1>&2; exit 1; }
3188 ;;
3189 esac
3190
3191 THREADLDFLAGS=
3192 THREADLIBS=
3193 THREADINCS=
3194 THREADDEPS=
3195 THREADOBJS=
3196 THREADH=
3197 THREADSPEC=
3198 case "$THREADS" in
3199 posix)
3200 case "$host" in
3201 *-*-cygwin*)
3202 # Don't set THREADLIBS here. Cygwin doesn't have -lpthread.
3203 ;;
3204
3205 *-*-freebsd[1234]*)
3206
3207 # Before FreeBSD 5, it didn't have -lpthread (or any library which
3208 # merely adds pthread_* functions) but it does have a -pthread switch
3209 # which is required at link-time to select -lc_r *instead* of -lc.
3210 THREADLDFLAGS=-pthread
3211 # Don't set THREADSPEC here as might be expected since -pthread is
3212 # not processed when found within a spec file, it must come from
3213 # the command line. For now, the user must provide the -pthread
3214 # switch to link code compiled with gcj. In future, consider adding
3215 # support for weak references to pthread_* functions ala gthr.h API.
3216 THREADSPEC='%{!pthread: %eUnder this configuration, the user must provide -pthread when linking.}'
3217 ;;
3218 *-*-freebsd*)
3219 # FreeBSD 5 implements a model much closer to other modern UNIX
3220 # which support threads. However, it still does not support
3221 # -lpthread.
3222 THREADLDFLAGS=-pthread
3223 THREADSPEC=-lc_r
3224 ;;
3225 *)
3226 THREADLIBS=-lpthread
3227 THREADSPEC=-lpthread
3228 ;;
3229 esac
3230 THREADOBJS=posix-threads.lo
3231 THREADH=posix-threads.h
3232 # MIT pthreads doesn't seem to have the mutexattr functions.
3233 # But for now we don't check for it. We just assume you aren't
3234 # using MIT pthreads.
3235 cat >> confdefs.h <<\EOF
3236 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3237 EOF
3238
3239
3240 # If we're using the Boehm GC, then we happen to know that it
3241 # defines _REENTRANT, so we don't bother. Eww.
3242 if test "$GC" != boehm; then
3243 cat >> confdefs.h <<\EOF
3244 #define _REENTRANT 1
3245 EOF
3246
3247 fi
3248 cat >> confdefs.h <<\EOF
3249 #define _POSIX_PTHREAD_SEMANTICS 1
3250 EOF
3251
3252 ;;
3253
3254 win32)
3255 THREADOBJS=win32-threads.lo
3256 THREADH=win32-threads.h
3257 ;;
3258
3259 none)
3260 THREADOBJS=no-threads.lo
3261 THREADH=no-threads.h
3262 ;;
3263 esac
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274 HASH_SYNC_SPEC=
3275 # Hash synchronization is only useful with posix threads right now.
3276 if test "$enable_hash_synchronization" = yes && test "$THREADS" = "posix"; then
3277 HASH_SYNC_SPEC=-fhash-synchronization
3278 cat >> confdefs.h <<\EOF
3279 #define JV_HASH_SYNCHRONIZATION 1
3280 EOF
3281
3282 fi
3283
3284
3285
3286
3287
3288 if test "$GCC" = yes; then
3289 USING_GCC_TRUE=
3290 USING_GCC_FALSE='#'
3291 else
3292 USING_GCC_TRUE='#'
3293 USING_GCC_FALSE=
3294 fi
3295
3296 CANADIAN=no
3297 NULL_TARGET=no
3298 NATIVE=yes
3299
3300 # We're in the tree with gcc, and need to include some of its headers.
3301 GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
3302
3303 # Figure out where generated headers like libgcj-config.h get installed.
3304 gcc_version_trigger=${srcdir}/../gcc/version.c
3305 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
3306 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
3307 tool_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include
3308
3309
3310
3311 if test -n "${with_cross_host}"; then
3312 # We are being configured with a cross compiler. AC_REPLACE_FUNCS
3313 # may not work correctly, because the compiler may not be able to
3314 # link executables.
3315
3316 # We assume newlib. This lets us hard-code the functions we know
3317 # we'll have.
3318 cat >> confdefs.h <<\EOF
3319 #define HAVE_MEMMOVE 1
3320 EOF
3321
3322 cat >> confdefs.h <<\EOF
3323 #define HAVE_MEMCPY 1
3324 EOF
3325
3326 cat >> confdefs.h <<\EOF
3327 #define HAVE_STRERROR 1
3328 EOF
3329
3330 cat >> confdefs.h <<\EOF
3331 #define HAVE_TIME 1
3332 EOF
3333
3334 cat >> confdefs.h <<\EOF
3335 #define HAVE_GMTIME_R 1
3336 EOF
3337
3338 cat >> confdefs.h <<\EOF
3339 #define HAVE_LOCALTIME_R 1
3340 EOF
3341
3342 cat >> confdefs.h <<\EOF
3343 #define HAVE_PTHREAD_MUTEXATTR_INIT 1
3344 EOF
3345
3346 cat >> confdefs.h <<\EOF
3347 #define HAVE_ALLOCA 1
3348 EOF
3349
3350
3351 cat >> confdefs.h <<\EOF
3352 #define NO_GETUID 1
3353 EOF
3354
3355
3356 # If Canadian cross, then don't pick up tools from the build
3357 # directory.
3358 if test x"$build" != x"$with_cross_host" && x"$build" != x"$target"; then
3359 CANADIAN=yes
3360 GCC_UNWIND_INCLUDE=
3361 GCJ="${target_alias}-gcj"
3362 fi
3363 NATIVE=no
3364 else
3365 for ac_func in strerror ioctl select fstat open fsync sleep opendir
3366 do
3367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3368 echo "configure:3369: checking for $ac_func" >&5
3369 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3370 echo $ac_n "(cached) $ac_c" 1>&6
3371 else
3372 cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 /* System header to define __stub macros and hopefully few prototypes,
3376 which can conflict with char $ac_func(); below. */
3377 #include <assert.h>
3378 /* Override any gcc2 internal prototype to avoid an error. */
3379 /* We use char because int might match the return type of a gcc2
3380 builtin and then its argument prototype would still apply. */
3381 char $ac_func();
3382
3383 int main() {
3384
3385 /* The GNU C library defines this for functions which it implements
3386 to always fail with ENOSYS. Some functions are actually named
3387 something starting with __ and the normal name is an alias. */
3388 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3389 choke me
3390 #else
3391 $ac_func();
3392 #endif
3393
3394 ; return 0; }
3395 EOF
3396 if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3397 rm -rf conftest*
3398 eval "ac_cv_func_$ac_func=yes"
3399 else
3400 echo "configure: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3402 rm -rf conftest*
3403 eval "ac_cv_func_$ac_func=no"
3404 fi
3405 rm -f conftest*
3406 fi
3407
3408 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3409 echo "$ac_t""yes" 1>&6
3410 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3411 cat >> confdefs.h <<EOF
3412 #define $ac_tr_func 1
3413 EOF
3414
3415 else
3416 echo "$ac_t""no" 1>&6
3417 fi
3418 done
3419
3420 for ac_func in gmtime_r localtime_r readdir_r getpwuid_r getcwd
3421 do
3422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3423 echo "configure:3424: checking for $ac_func" >&5
3424 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3425 echo $ac_n "(cached) $ac_c" 1>&6
3426 else
3427 cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430 /* System header to define __stub macros and hopefully few prototypes,
3431 which can conflict with char $ac_func(); below. */
3432 #include <assert.h>
3433 /* Override any gcc2 internal prototype to avoid an error. */
3434 /* We use char because int might match the return type of a gcc2
3435 builtin and then its argument prototype would still apply. */
3436 char $ac_func();
3437
3438 int main() {
3439
3440 /* The GNU C library defines this for functions which it implements
3441 to always fail with ENOSYS. Some functions are actually named
3442 something starting with __ and the normal name is an alias. */
3443 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3444 choke me
3445 #else
3446 $ac_func();
3447 #endif
3448
3449 ; return 0; }
3450 EOF
3451 if { (eval echo configure:3452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3452 rm -rf conftest*
3453 eval "ac_cv_func_$ac_func=yes"
3454 else
3455 echo "configure: failed program was:" >&5
3456 cat conftest.$ac_ext >&5
3457 rm -rf conftest*
3458 eval "ac_cv_func_$ac_func=no"
3459 fi
3460 rm -f conftest*
3461 fi
3462
3463 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3464 echo "$ac_t""yes" 1>&6
3465 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3466 cat >> confdefs.h <<EOF
3467 #define $ac_tr_func 1
3468 EOF
3469
3470 else
3471 echo "$ac_t""no" 1>&6
3472 fi
3473 done
3474
3475 for ac_func in access stat mkdir rename rmdir unlink realpath utime chmod
3476 do
3477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3478 echo "configure:3479: checking for $ac_func" >&5
3479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3480 echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482 cat > conftest.$ac_ext <<EOF
3483 #line 3484 "configure"
3484 #include "confdefs.h"
3485 /* System header to define __stub macros and hopefully few prototypes,
3486 which can conflict with char $ac_func(); below. */
3487 #include <assert.h>
3488 /* Override any gcc2 internal prototype to avoid an error. */
3489 /* We use char because int might match the return type of a gcc2
3490 builtin and then its argument prototype would still apply. */
3491 char $ac_func();
3492
3493 int main() {
3494
3495 /* The GNU C library defines this for functions which it implements
3496 to always fail with ENOSYS. Some functions are actually named
3497 something starting with __ and the normal name is an alias. */
3498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3499 choke me
3500 #else
3501 $ac_func();
3502 #endif
3503
3504 ; return 0; }
3505 EOF
3506 if { (eval echo configure:3507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3507 rm -rf conftest*
3508 eval "ac_cv_func_$ac_func=yes"
3509 else
3510 echo "configure: failed program was:" >&5
3511 cat conftest.$ac_ext >&5
3512 rm -rf conftest*
3513 eval "ac_cv_func_$ac_func=no"
3514 fi
3515 rm -f conftest*
3516 fi
3517
3518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3519 echo "$ac_t""yes" 1>&6
3520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3521 cat >> confdefs.h <<EOF
3522 #define $ac_tr_func 1
3523 EOF
3524
3525 else
3526 echo "$ac_t""no" 1>&6
3527 fi
3528 done
3529
3530 for ac_func in nl_langinfo setlocale
3531 do
3532 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3533 echo "configure:3534: checking for $ac_func" >&5
3534 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3535 echo $ac_n "(cached) $ac_c" 1>&6
3536 else
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3540 /* System header to define __stub macros and hopefully few prototypes,
3541 which can conflict with char $ac_func(); below. */
3542 #include <assert.h>
3543 /* Override any gcc2 internal prototype to avoid an error. */
3544 /* We use char because int might match the return type of a gcc2
3545 builtin and then its argument prototype would still apply. */
3546 char $ac_func();
3547
3548 int main() {
3549
3550 /* The GNU C library defines this for functions which it implements
3551 to always fail with ENOSYS. Some functions are actually named
3552 something starting with __ and the normal name is an alias. */
3553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3554 choke me
3555 #else
3556 $ac_func();
3557 #endif
3558
3559 ; return 0; }
3560 EOF
3561 if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3562 rm -rf conftest*
3563 eval "ac_cv_func_$ac_func=yes"
3564 else
3565 echo "configure: failed program was:" >&5
3566 cat conftest.$ac_ext >&5
3567 rm -rf conftest*
3568 eval "ac_cv_func_$ac_func=no"
3569 fi
3570 rm -f conftest*
3571 fi
3572
3573 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3574 echo "$ac_t""yes" 1>&6
3575 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3576 cat >> confdefs.h <<EOF
3577 #define $ac_tr_func 1
3578 EOF
3579
3580 else
3581 echo "$ac_t""no" 1>&6
3582 fi
3583 done
3584
3585 for ac_func in inet_aton inet_addr
3586 do
3587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3588 echo "configure:3589: checking for $ac_func" >&5
3589 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3590 echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592 cat > conftest.$ac_ext <<EOF
3593 #line 3594 "configure"
3594 #include "confdefs.h"
3595 /* System header to define __stub macros and hopefully few prototypes,
3596 which can conflict with char $ac_func(); below. */
3597 #include <assert.h>
3598 /* Override any gcc2 internal prototype to avoid an error. */
3599 /* We use char because int might match the return type of a gcc2
3600 builtin and then its argument prototype would still apply. */
3601 char $ac_func();
3602
3603 int main() {
3604
3605 /* The GNU C library defines this for functions which it implements
3606 to always fail with ENOSYS. Some functions are actually named
3607 something starting with __ and the normal name is an alias. */
3608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3609 choke me
3610 #else
3611 $ac_func();
3612 #endif
3613
3614 ; return 0; }
3615 EOF
3616 if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3617 rm -rf conftest*
3618 eval "ac_cv_func_$ac_func=yes"
3619 else
3620 echo "configure: failed program was:" >&5
3621 cat conftest.$ac_ext >&5
3622 rm -rf conftest*
3623 eval "ac_cv_func_$ac_func=no"
3624 fi
3625 rm -f conftest*
3626 fi
3627
3628 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3629 echo "$ac_t""yes" 1>&6
3630 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3631 cat >> confdefs.h <<EOF
3632 #define $ac_tr_func 1
3633 EOF
3634 break
3635 else
3636 echo "$ac_t""no" 1>&6
3637 fi
3638 done
3639
3640 for ac_func in inet_pton uname inet_ntoa
3641 do
3642 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3643 echo "configure:3644: checking for $ac_func" >&5
3644 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3645 echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647 cat > conftest.$ac_ext <<EOF
3648 #line 3649 "configure"
3649 #include "confdefs.h"
3650 /* System header to define __stub macros and hopefully few prototypes,
3651 which can conflict with char $ac_func(); below. */
3652 #include <assert.h>
3653 /* Override any gcc2 internal prototype to avoid an error. */
3654 /* We use char because int might match the return type of a gcc2
3655 builtin and then its argument prototype would still apply. */
3656 char $ac_func();
3657
3658 int main() {
3659
3660 /* The GNU C library defines this for functions which it implements
3661 to always fail with ENOSYS. Some functions are actually named
3662 something starting with __ and the normal name is an alias. */
3663 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3664 choke me
3665 #else
3666 $ac_func();
3667 #endif
3668
3669 ; return 0; }
3670 EOF
3671 if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3672 rm -rf conftest*
3673 eval "ac_cv_func_$ac_func=yes"
3674 else
3675 echo "configure: failed program was:" >&5
3676 cat conftest.$ac_ext >&5
3677 rm -rf conftest*
3678 eval "ac_cv_func_$ac_func=no"
3679 fi
3680 rm -f conftest*
3681 fi
3682
3683 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3684 echo "$ac_t""yes" 1>&6
3685 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3686 cat >> confdefs.h <<EOF
3687 #define $ac_tr_func 1
3688 EOF
3689
3690 else
3691 echo "$ac_t""no" 1>&6
3692 fi
3693 done
3694
3695 for ac_func in backtrace fork execvp pipe sigaction
3696 do
3697 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3698 echo "configure:3699: checking for $ac_func" >&5
3699 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3700 echo $ac_n "(cached) $ac_c" 1>&6
3701 else
3702 cat > conftest.$ac_ext <<EOF
3703 #line 3704 "configure"
3704 #include "confdefs.h"
3705 /* System header to define __stub macros and hopefully few prototypes,
3706 which can conflict with char $ac_func(); below. */
3707 #include <assert.h>
3708 /* Override any gcc2 internal prototype to avoid an error. */
3709 /* We use char because int might match the return type of a gcc2
3710 builtin and then its argument prototype would still apply. */
3711 char $ac_func();
3712
3713 int main() {
3714
3715 /* The GNU C library defines this for functions which it implements
3716 to always fail with ENOSYS. Some functions are actually named
3717 something starting with __ and the normal name is an alias. */
3718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3719 choke me
3720 #else
3721 $ac_func();
3722 #endif
3723
3724 ; return 0; }
3725 EOF
3726 if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3727 rm -rf conftest*
3728 eval "ac_cv_func_$ac_func=yes"
3729 else
3730 echo "configure: failed program was:" >&5
3731 cat conftest.$ac_ext >&5
3732 rm -rf conftest*
3733 eval "ac_cv_func_$ac_func=no"
3734 fi
3735 rm -f conftest*
3736 fi
3737
3738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3739 echo "$ac_t""yes" 1>&6
3740 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3741 cat >> confdefs.h <<EOF
3742 #define $ac_tr_func 1
3743 EOF
3744
3745 else
3746 echo "$ac_t""no" 1>&6
3747 fi
3748 done
3749
3750 for ac_hdr in execinfo.h unistd.h dlfcn.h
3751 do
3752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3754 echo "configure:3755: checking for $ac_hdr" >&5
3755 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3756 echo $ac_n "(cached) $ac_c" 1>&6
3757 else
3758 cat > conftest.$ac_ext <<EOF
3759 #line 3760 "configure"
3760 #include "confdefs.h"
3761 #include <$ac_hdr>
3762 EOF
3763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3764 { (eval echo configure:3765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3766 if test -z "$ac_err"; then
3767 rm -rf conftest*
3768 eval "ac_cv_header_$ac_safe=yes"
3769 else
3770 echo "$ac_err" >&5
3771 echo "configure: failed program was:" >&5
3772 cat conftest.$ac_ext >&5
3773 rm -rf conftest*
3774 eval "ac_cv_header_$ac_safe=no"
3775 fi
3776 rm -f conftest*
3777 fi
3778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3779 echo "$ac_t""yes" 1>&6
3780 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3781 cat >> confdefs.h <<EOF
3782 #define $ac_tr_hdr 1
3783 EOF
3784
3785 else
3786 echo "$ac_t""no" 1>&6
3787 fi
3788 done
3789
3790 echo $ac_n "checking for dladdr in -ldl""... $ac_c" 1>&6
3791 echo "configure:3792: checking for dladdr in -ldl" >&5
3792 ac_lib_var=`echo dl'_'dladdr | sed 'y%./+-%__p_%'`
3793 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3794 echo $ac_n "(cached) $ac_c" 1>&6
3795 else
3796 ac_save_LIBS="$LIBS"
3797 LIBS="-ldl $LIBS"
3798 cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801 /* Override any gcc2 internal prototype to avoid an error. */
3802 /* We use char because int might match the return type of a gcc2
3803 builtin and then its argument prototype would still apply. */
3804 char dladdr();
3805
3806 int main() {
3807 dladdr()
3808 ; return 0; }
3809 EOF
3810 if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3811 rm -rf conftest*
3812 eval "ac_cv_lib_$ac_lib_var=yes"
3813 else
3814 echo "configure: failed program was:" >&5
3815 cat conftest.$ac_ext >&5
3816 rm -rf conftest*
3817 eval "ac_cv_lib_$ac_lib_var=no"
3818 fi
3819 rm -f conftest*
3820 LIBS="$ac_save_LIBS"
3821
3822 fi
3823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3824 echo "$ac_t""yes" 1>&6
3825
3826 cat >> confdefs.h <<\EOF
3827 #define HAVE_DLADDR 1
3828 EOF
3829
3830 else
3831 echo "$ac_t""no" 1>&6
3832 fi
3833
3834 for ac_file in /proc/self/exe
3835 do
3836
3837 ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
3838 echo $ac_n "checking for $ac_file""... $ac_c" 1>&6
3839 echo "configure:3840: checking for $ac_file" >&5
3840 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
3841 echo $ac_n "(cached) $ac_c" 1>&6
3842 else
3843 if test "$cross_compiling" = yes; then
3844 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
3845 else
3846 if test -r $ac_file; then
3847 eval "ac_cv_file_$ac_safe=yes"
3848 else
3849 eval "ac_cv_file_$ac_safe=no"
3850 fi
3851 fi
3852 fi
3853 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
3854 echo "$ac_t""yes" 1>&6
3855 ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3856 cat >> confdefs.h <<EOF
3857 #define $ac_tr_file 1
3858 EOF
3859
3860 cat >> confdefs.h <<\EOF
3861 #define HAVE_PROC_SELF_EXE 1
3862 EOF
3863
3864 else
3865 echo "$ac_t""no" 1>&6
3866
3867 fi
3868 done
3869
3870
3871
3872
3873 am_cv_lib_iconv_ldpath=
3874 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
3875 if test "${with_libiconv_prefix+set}" = set; then
3876 withval="$with_libiconv_prefix"
3877
3878 for dir in `echo "$withval" | tr : ' '`; do
3879 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
3880 if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
3881 done
3882
3883 fi
3884
3885
3886 echo $ac_n "checking for iconv""... $ac_c" 1>&6
3887 echo "configure:3888: checking for iconv" >&5
3888 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
3889 echo $ac_n "(cached) $ac_c" 1>&6
3890 else
3891
3892 am_cv_func_iconv="no, consider installing GNU libiconv"
3893 am_cv_lib_iconv=no
3894 cat > conftest.$ac_ext <<EOF
3895 #line 3896 "configure"
3896 #include "confdefs.h"
3897 #include <stdlib.h>
3898 #include <iconv.h>
3899 int main() {
3900 iconv_t cd = iconv_open("","");
3901 iconv(cd,NULL,NULL,NULL,NULL);
3902 iconv_close(cd);
3903 ; return 0; }
3904 EOF
3905 if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3906 rm -rf conftest*
3907 am_cv_func_iconv=yes
3908 else
3909 echo "configure: failed program was:" >&5
3910 cat conftest.$ac_ext >&5
3911 fi
3912 rm -f conftest*
3913 if test "$am_cv_func_iconv" != yes; then
3914 am_save_LIBS="$LIBS"
3915 LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
3916 cat > conftest.$ac_ext <<EOF
3917 #line 3918 "configure"
3918 #include "confdefs.h"
3919 #include <stdlib.h>
3920 #include <iconv.h>
3921 int main() {
3922 iconv_t cd = iconv_open("","");
3923 iconv(cd,NULL,NULL,NULL,NULL);
3924 iconv_close(cd);
3925 ; return 0; }
3926 EOF
3927 if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3928 rm -rf conftest*
3929 am_cv_lib_iconv=yes
3930 am_cv_func_iconv=yes
3931 else
3932 echo "configure: failed program was:" >&5
3933 cat conftest.$ac_ext >&5
3934 fi
3935 rm -f conftest*
3936 LIBS="$am_save_LIBS"
3937 fi
3938
3939 fi
3940
3941 echo "$ac_t""$am_cv_func_iconv" 1>&6
3942 if test "$am_cv_func_iconv" = yes; then
3943 cat >> confdefs.h <<\EOF
3944 #define HAVE_ICONV 1
3945 EOF
3946
3947 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
3948 echo "configure:3949: checking for iconv declaration" >&5
3949 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
3950 echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952
3953 cat > conftest.$ac_ext <<EOF
3954 #line 3955 "configure"
3955 #include "confdefs.h"
3956
3957 #include <stdlib.h>
3958 #include <iconv.h>
3959 extern
3960 #ifdef __cplusplus
3961 "C"
3962 #endif
3963 #if defined(__STDC__) || defined(__cplusplus)
3964 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
3965 #else
3966 size_t iconv();
3967 #endif
3968
3969 int main() {
3970
3971 ; return 0; }
3972 EOF
3973 if { (eval echo configure:3974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3974 rm -rf conftest*
3975 am_cv_proto_iconv_arg1=""
3976 else
3977 echo "configure: failed program was:" >&5
3978 cat conftest.$ac_ext >&5
3979 rm -rf conftest*
3980 am_cv_proto_iconv_arg1="const"
3981 fi
3982 rm -f conftest*
3983 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);"
3984 fi
3985
3986 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
3987 echo "$ac_t""${ac_t:-
3988 }$am_cv_proto_iconv" 1>&6
3989 cat >> confdefs.h <<EOF
3990 #define ICONV_CONST $am_cv_proto_iconv_arg1
3991 EOF
3992
3993 fi
3994 LIBICONV=
3995 if test "$am_cv_lib_iconv" = yes; then
3996 LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
3997 fi
3998
3999
4000 if test $ac_cv_header_locale_h = yes; then
4001 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
4002 echo "configure:4003: checking for LC_MESSAGES" >&5
4003 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
4004 echo $ac_n "(cached) $ac_c" 1>&6
4005 else
4006 cat > conftest.$ac_ext <<EOF
4007 #line 4008 "configure"
4008 #include "confdefs.h"
4009 #include <locale.h>
4010 int main() {
4011 return LC_MESSAGES
4012 ; return 0; }
4013 EOF
4014 if { (eval echo configure:4015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4015 rm -rf conftest*
4016 am_cv_val_LC_MESSAGES=yes
4017 else
4018 echo "configure: failed program was:" >&5
4019 cat conftest.$ac_ext >&5
4020 rm -rf conftest*
4021 am_cv_val_LC_MESSAGES=no
4022 fi
4023 rm -f conftest*
4024 fi
4025
4026 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
4027 if test $am_cv_val_LC_MESSAGES = yes; then
4028 cat >> confdefs.h <<\EOF
4029 #define HAVE_LC_MESSAGES 1
4030 EOF
4031
4032 fi
4033 fi
4034 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4035 echo "configure:4036: checking whether struct tm is in sys/time.h or time.h" >&5
4036 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
4037 echo $ac_n "(cached) $ac_c" 1>&6
4038 else
4039 cat > conftest.$ac_ext <<EOF
4040 #line 4041 "configure"
4041 #include "confdefs.h"
4042 #include <sys/types.h>
4043 #include <time.h>
4044 int main() {
4045 struct tm *tp; tp->tm_sec;
4046 ; return 0; }
4047 EOF
4048 if { (eval echo configure:4049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4049 rm -rf conftest*
4050 ac_cv_struct_tm=time.h
4051 else
4052 echo "configure: failed program was:" >&5
4053 cat conftest.$ac_ext >&5
4054 rm -rf conftest*
4055 ac_cv_struct_tm=sys/time.h
4056 fi
4057 rm -f conftest*
4058 fi
4059
4060 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4061 if test $ac_cv_struct_tm = sys/time.h; then
4062 cat >> confdefs.h <<\EOF
4063 #define TM_IN_SYS_TIME 1
4064 EOF
4065
4066 fi
4067
4068 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4069 echo "configure:4070: checking for tm_zone in struct tm" >&5
4070 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
4071 echo $ac_n "(cached) $ac_c" 1>&6
4072 else
4073 cat > conftest.$ac_ext <<EOF
4074 #line 4075 "configure"
4075 #include "confdefs.h"
4076 #include <sys/types.h>
4077 #include <$ac_cv_struct_tm>
4078 int main() {
4079 struct tm tm; tm.tm_zone;
4080 ; return 0; }
4081 EOF
4082 if { (eval echo configure:4083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4083 rm -rf conftest*
4084 ac_cv_struct_tm_zone=yes
4085 else
4086 echo "configure: failed program was:" >&5
4087 cat conftest.$ac_ext >&5
4088 rm -rf conftest*
4089 ac_cv_struct_tm_zone=no
4090 fi
4091 rm -f conftest*
4092 fi
4093
4094 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4095 if test "$ac_cv_struct_tm_zone" = yes; then
4096 cat >> confdefs.h <<\EOF
4097 #define HAVE_TM_ZONE 1
4098 EOF
4099
4100 else
4101 echo $ac_n "checking for tzname""... $ac_c" 1>&6
4102 echo "configure:4103: checking for tzname" >&5
4103 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
4104 echo $ac_n "(cached) $ac_c" 1>&6
4105 else
4106 cat > conftest.$ac_ext <<EOF
4107 #line 4108 "configure"
4108 #include "confdefs.h"
4109 #include <time.h>
4110 #ifndef tzname /* For SGI. */
4111 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
4112 #endif
4113 int main() {
4114 atoi(*tzname);
4115 ; return 0; }
4116 EOF
4117 if { (eval echo configure:4118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4118 rm -rf conftest*
4119 ac_cv_var_tzname=yes
4120 else
4121 echo "configure: failed program was:" >&5
4122 cat conftest.$ac_ext >&5
4123 rm -rf conftest*
4124 ac_cv_var_tzname=no
4125 fi
4126 rm -f conftest*
4127 fi
4128
4129 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4130 if test $ac_cv_var_tzname = yes; then
4131 cat >> confdefs.h <<\EOF
4132 #define HAVE_TZNAME 1
4133 EOF
4134
4135 fi
4136 fi
4137
4138
4139 for ac_func in gethostbyname_r
4140 do
4141 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4142 echo "configure:4143: checking for $ac_func" >&5
4143 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4144 echo $ac_n "(cached) $ac_c" 1>&6
4145 else
4146 cat > conftest.$ac_ext <<EOF
4147 #line 4148 "configure"
4148 #include "confdefs.h"
4149 /* System header to define __stub macros and hopefully few prototypes,
4150 which can conflict with char $ac_func(); below. */
4151 #include <assert.h>
4152 /* Override any gcc2 internal prototype to avoid an error. */
4153 /* We use char because int might match the return type of a gcc2
4154 builtin and then its argument prototype would still apply. */
4155 char $ac_func();
4156
4157 int main() {
4158
4159 /* The GNU C library defines this for functions which it implements
4160 to always fail with ENOSYS. Some functions are actually named
4161 something starting with __ and the normal name is an alias. */
4162 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4163 choke me
4164 #else
4165 $ac_func();
4166 #endif
4167
4168 ; return 0; }
4169 EOF
4170 if { (eval echo configure:4171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4171 rm -rf conftest*
4172 eval "ac_cv_func_$ac_func=yes"
4173 else
4174 echo "configure: failed program was:" >&5
4175 cat conftest.$ac_ext >&5
4176 rm -rf conftest*
4177 eval "ac_cv_func_$ac_func=no"
4178 fi
4179 rm -f conftest*
4180 fi
4181
4182 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4183 echo "$ac_t""yes" 1>&6
4184 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4185 cat >> confdefs.h <<EOF
4186 #define $ac_tr_func 1
4187 EOF
4188
4189 cat >> confdefs.h <<\EOF
4190 #define HAVE_GETHOSTBYNAME_R 1
4191 EOF
4192
4193 # There are two different kinds of gethostbyname_r.
4194 # We look for the one that returns `int'.
4195 # Hopefully this check is robust enough.
4196 cat > conftest.$ac_ext <<EOF
4197 #line 4198 "configure"
4198 #include "confdefs.h"
4199 #include <netdb.h>
4200 EOF
4201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4202 egrep "int.*gethostbyname_r" >/dev/null 2>&1; then
4203 rm -rf conftest*
4204
4205 cat >> confdefs.h <<\EOF
4206 #define GETHOSTBYNAME_R_RETURNS_INT 1
4207 EOF
4208
4209 fi
4210 rm -f conftest*
4211
4212
4213 case " $GCINCS " in
4214 *" -D_REENTRANT "*) ;;
4215 *)
4216 echo $ac_n "checking whether gethostbyname_r declaration requires -D_REENTRANT""... $ac_c" 1>&6
4217 echo "configure:4218: checking whether gethostbyname_r declaration requires -D_REENTRANT" >&5
4218 if eval "test \"`echo '$''{'libjava_cv_gethostbyname_r_needs_reentrant'+set}'`\" = set"; then
4219 echo $ac_n "(cached) $ac_c" 1>&6
4220 else
4221
4222 ac_ext=C
4223 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4224 ac_cpp='$CXXCPP $CPPFLAGS'
4225 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4226 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4227 cross_compiling=$ac_cv_prog_cxx_cross
4228
4229 cat > conftest.$ac_ext <<EOF
4230 #line 4231 "configure"
4231 #include "confdefs.h"
4232 #include <netdb.h>
4233 int main() {
4234 gethostbyname_r("", 0, 0);
4235 ; return 0; }
4236 EOF
4237 if { (eval echo configure:4238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4238 rm -rf conftest*
4239 libjava_cv_gethostbyname_r_needs_reentrant=no
4240 else
4241 echo "configure: failed program was:" >&5
4242 cat conftest.$ac_ext >&5
4243 rm -rf conftest*
4244 CPPFLAGS_SAVE="$CPPFLAGS"
4245 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
4246 cat > conftest.$ac_ext <<EOF
4247 #line 4248 "configure"
4248 #include "confdefs.h"
4249 #include <netdb.h>
4250 int main() {
4251 gethostbyname_r("", 0, 0);
4252 ; return 0; }
4253 EOF
4254 if { (eval echo configure:4255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4255 rm -rf conftest*
4256 libjava_cv_gethostbyname_r_needs_reentrant=yes
4257 else
4258 echo "configure: failed program was:" >&5
4259 cat conftest.$ac_ext >&5
4260 rm -rf conftest*
4261 libjava_cv_gethostbyname_r_needs_reentrant=fail
4262 fi
4263 rm -f conftest*
4264 CPPFLAGS="$CPPFLAGS_SAVE"
4265
4266 fi
4267 rm -f conftest*
4268 ac_ext=c
4269 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4270 ac_cpp='$CPP $CPPFLAGS'
4271 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4272 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4273 cross_compiling=$ac_cv_prog_cc_cross
4274
4275
4276 fi
4277
4278 echo "$ac_t""$libjava_cv_gethostbyname_r_needs_reentrant" 1>&6
4279 if test "x$libjava_cv_gethostbyname_r_needs_reentrant" = xyes; then
4280 cat >> confdefs.h <<\EOF
4281 #define _REENTRANT 1
4282 EOF
4283
4284 fi
4285 ;;
4286 esac
4287
4288 echo $ac_n "checking for struct hostent_data""... $ac_c" 1>&6
4289 echo "configure:4290: checking for struct hostent_data" >&5
4290 if eval "test \"`echo '$''{'libjava_cv_struct_hostent_data'+set}'`\" = set"; then
4291 echo $ac_n "(cached) $ac_c" 1>&6
4292 else
4293 cat > conftest.$ac_ext <<EOF
4294 #line 4295 "configure"
4295 #include "confdefs.h"
4296
4297 #if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
4298 # define _REENTRANT 1
4299 #endif
4300 #include <netdb.h>
4301 int main() {
4302 struct hostent_data data;
4303 ; return 0; }
4304 EOF
4305 if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4306 rm -rf conftest*
4307 libjava_cv_struct_hostent_data=yes
4308 else
4309 echo "configure: failed program was:" >&5
4310 cat conftest.$ac_ext >&5
4311 rm -rf conftest*
4312 libjava_cv_struct_hostent_data=no
4313 fi
4314 rm -f conftest*
4315 fi
4316
4317 echo "$ac_t""$libjava_cv_struct_hostent_data" 1>&6
4318 if test "x$libjava_cv_struct_hostent_data" = xyes; then
4319 cat >> confdefs.h <<\EOF
4320 #define HAVE_STRUCT_HOSTENT_DATA 1
4321 EOF
4322
4323 fi
4324
4325 else
4326 echo "$ac_t""no" 1>&6
4327 fi
4328 done
4329
4330
4331 # FIXME: libjava source code expects to find a prototype for
4332 # gethostbyaddr_r in netdb.h. The outer check ensures that
4333 # HAVE_GETHOSTBYADDR_R will not be defined if the prototype fails
4334 # to exist where expected. (The root issue: AC_CHECK_FUNCS assumes C
4335 # linkage check is enough, yet C++ code requires proper prototypes.)
4336 cat > conftest.$ac_ext <<EOF
4337 #line 4338 "configure"
4338 #include "confdefs.h"
4339 #include <netdb.h>
4340 EOF
4341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4342 egrep "gethostbyaddr_r" >/dev/null 2>&1; then
4343 rm -rf conftest*
4344
4345 for ac_func in gethostbyaddr_r
4346 do
4347 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4348 echo "configure:4349: checking for $ac_func" >&5
4349 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4350 echo $ac_n "(cached) $ac_c" 1>&6
4351 else
4352 cat > conftest.$ac_ext <<EOF
4353 #line 4354 "configure"
4354 #include "confdefs.h"
4355 /* System header to define __stub macros and hopefully few prototypes,
4356 which can conflict with char $ac_func(); below. */
4357 #include <assert.h>
4358 /* Override any gcc2 internal prototype to avoid an error. */
4359 /* We use char because int might match the return type of a gcc2
4360 builtin and then its argument prototype would still apply. */
4361 char $ac_func();
4362
4363 int main() {
4364
4365 /* The GNU C library defines this for functions which it implements
4366 to always fail with ENOSYS. Some functions are actually named
4367 something starting with __ and the normal name is an alias. */
4368 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4369 choke me
4370 #else
4371 $ac_func();
4372 #endif
4373
4374 ; return 0; }
4375 EOF
4376 if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4377 rm -rf conftest*
4378 eval "ac_cv_func_$ac_func=yes"
4379 else
4380 echo "configure: failed program was:" >&5
4381 cat conftest.$ac_ext >&5
4382 rm -rf conftest*
4383 eval "ac_cv_func_$ac_func=no"
4384 fi
4385 rm -f conftest*
4386 fi
4387
4388 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4389 echo "$ac_t""yes" 1>&6
4390 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4391 cat >> confdefs.h <<EOF
4392 #define $ac_tr_func 1
4393 EOF
4394
4395 cat >> confdefs.h <<\EOF
4396 #define HAVE_GETHOSTBYADDR_R 1
4397 EOF
4398
4399 # There are two different kinds of gethostbyaddr_r.
4400 # We look for the one that returns `int'.
4401 # Hopefully this check is robust enough.
4402 cat > conftest.$ac_ext <<EOF
4403 #line 4404 "configure"
4404 #include "confdefs.h"
4405 #include <netdb.h>
4406 EOF
4407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4408 egrep "int.*gethostbyaddr_r" >/dev/null 2>&1; then
4409 rm -rf conftest*
4410
4411 cat >> confdefs.h <<\EOF
4412 #define GETHOSTBYADDR_R_RETURNS_INT 1
4413 EOF
4414
4415 fi
4416 rm -f conftest*
4417
4418 else
4419 echo "$ac_t""no" 1>&6
4420 fi
4421 done
4422
4423 fi
4424 rm -f conftest*
4425
4426
4427 for ac_func in gethostname
4428 do
4429 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4430 echo "configure:4431: checking for $ac_func" >&5
4431 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4432 echo $ac_n "(cached) $ac_c" 1>&6
4433 else
4434 cat > conftest.$ac_ext <<EOF
4435 #line 4436 "configure"
4436 #include "confdefs.h"
4437 /* System header to define __stub macros and hopefully few prototypes,
4438 which can conflict with char $ac_func(); below. */
4439 #include <assert.h>
4440 /* Override any gcc2 internal prototype to avoid an error. */
4441 /* We use char because int might match the return type of a gcc2
4442 builtin and then its argument prototype would still apply. */
4443 char $ac_func();
4444
4445 int main() {
4446
4447 /* The GNU C library defines this for functions which it implements
4448 to always fail with ENOSYS. Some functions are actually named
4449 something starting with __ and the normal name is an alias. */
4450 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4451 choke me
4452 #else
4453 $ac_func();
4454 #endif
4455
4456 ; return 0; }
4457 EOF
4458 if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4459 rm -rf conftest*
4460 eval "ac_cv_func_$ac_func=yes"
4461 else
4462 echo "configure: failed program was:" >&5
4463 cat conftest.$ac_ext >&5
4464 rm -rf conftest*
4465 eval "ac_cv_func_$ac_func=no"
4466 fi
4467 rm -f conftest*
4468 fi
4469
4470 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4471 echo "$ac_t""yes" 1>&6
4472 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4473 cat >> confdefs.h <<EOF
4474 #define $ac_tr_func 1
4475 EOF
4476
4477 cat >> confdefs.h <<\EOF
4478 #define HAVE_GETHOSTNAME 1
4479 EOF
4480
4481 cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484 #include <unistd.h>
4485 EOF
4486 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4487 egrep "gethostname" >/dev/null 2>&1; then
4488 rm -rf conftest*
4489
4490 cat >> confdefs.h <<\EOF
4491 #define HAVE_GETHOSTNAME_DECL 1
4492 EOF
4493
4494 fi
4495 rm -f conftest*
4496
4497 else
4498 echo "$ac_t""no" 1>&6
4499 fi
4500 done
4501
4502
4503 # Look for these functions in the thread library, but only bother
4504 # if using POSIX threads.
4505 if test "$THREADS" = posix; then
4506 save_LIBS="$LIBS"
4507 LIBS="$LIBS $THREADLIBS"
4508 # Some POSIX thread systems don't have pthread_mutexattr_settype.
4509 # E.g., Solaris.
4510 for ac_func in pthread_mutexattr_settype pthread_mutexattr_setkind_np
4511 do
4512 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4513 echo "configure:4514: checking for $ac_func" >&5
4514 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4515 echo $ac_n "(cached) $ac_c" 1>&6
4516 else
4517 cat > conftest.$ac_ext <<EOF
4518 #line 4519 "configure"
4519 #include "confdefs.h"
4520 /* System header to define __stub macros and hopefully few prototypes,
4521 which can conflict with char $ac_func(); below. */
4522 #include <assert.h>
4523 /* Override any gcc2 internal prototype to avoid an error. */
4524 /* We use char because int might match the return type of a gcc2
4525 builtin and then its argument prototype would still apply. */
4526 char $ac_func();
4527
4528 int main() {
4529
4530 /* The GNU C library defines this for functions which it implements
4531 to always fail with ENOSYS. Some functions are actually named
4532 something starting with __ and the normal name is an alias. */
4533 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4534 choke me
4535 #else
4536 $ac_func();
4537 #endif
4538
4539 ; return 0; }
4540 EOF
4541 if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4542 rm -rf conftest*
4543 eval "ac_cv_func_$ac_func=yes"
4544 else
4545 echo "configure: failed program was:" >&5
4546 cat conftest.$ac_ext >&5
4547 rm -rf conftest*
4548 eval "ac_cv_func_$ac_func=no"
4549 fi
4550 rm -f conftest*
4551 fi
4552
4553 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4554 echo "$ac_t""yes" 1>&6
4555 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4556 cat >> confdefs.h <<EOF
4557 #define $ac_tr_func 1
4558 EOF
4559
4560 else
4561 echo "$ac_t""no" 1>&6
4562 fi
4563 done
4564
4565
4566 # Look for sched_yield. Up to Solaris 2.6, it is in libposix4, since
4567 # Solaris 7 the name librt is preferred.
4568 for ac_func in sched_yield
4569 do
4570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4571 echo "configure:4572: checking for $ac_func" >&5
4572 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4573 echo $ac_n "(cached) $ac_c" 1>&6
4574 else
4575 cat > conftest.$ac_ext <<EOF
4576 #line 4577 "configure"
4577 #include "confdefs.h"
4578 /* System header to define __stub macros and hopefully few prototypes,
4579 which can conflict with char $ac_func(); below. */
4580 #include <assert.h>
4581 /* Override any gcc2 internal prototype to avoid an error. */
4582 /* We use char because int might match the return type of a gcc2
4583 builtin and then its argument prototype would still apply. */
4584 char $ac_func();
4585
4586 int main() {
4587
4588 /* The GNU C library defines this for functions which it implements
4589 to always fail with ENOSYS. Some functions are actually named
4590 something starting with __ and the normal name is an alias. */
4591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4592 choke me
4593 #else
4594 $ac_func();
4595 #endif
4596
4597 ; return 0; }
4598 EOF
4599 if { (eval echo configure:4600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4600 rm -rf conftest*
4601 eval "ac_cv_func_$ac_func=yes"
4602 else
4603 echo "configure: failed program was:" >&5
4604 cat conftest.$ac_ext >&5
4605 rm -rf conftest*
4606 eval "ac_cv_func_$ac_func=no"
4607 fi
4608 rm -f conftest*
4609 fi
4610
4611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4612 echo "$ac_t""yes" 1>&6
4613 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4614 cat >> confdefs.h <<EOF
4615 #define $ac_tr_func 1
4616 EOF
4617
4618 else
4619 echo "$ac_t""no" 1>&6
4620 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
4621 echo "configure:4622: checking for sched_yield in -lrt" >&5
4622 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-%__p_%'`
4623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4624 echo $ac_n "(cached) $ac_c" 1>&6
4625 else
4626 ac_save_LIBS="$LIBS"
4627 LIBS="-lrt $LIBS"
4628 cat > conftest.$ac_ext <<EOF
4629 #line 4630 "configure"
4630 #include "confdefs.h"
4631 /* Override any gcc2 internal prototype to avoid an error. */
4632 /* We use char because int might match the return type of a gcc2
4633 builtin and then its argument prototype would still apply. */
4634 char sched_yield();
4635
4636 int main() {
4637 sched_yield()
4638 ; return 0; }
4639 EOF
4640 if { (eval echo configure:4641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4641 rm -rf conftest*
4642 eval "ac_cv_lib_$ac_lib_var=yes"
4643 else
4644 echo "configure: failed program was:" >&5
4645 cat conftest.$ac_ext >&5
4646 rm -rf conftest*
4647 eval "ac_cv_lib_$ac_lib_var=no"
4648 fi
4649 rm -f conftest*
4650 LIBS="$ac_save_LIBS"
4651
4652 fi
4653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4654 echo "$ac_t""yes" 1>&6
4655
4656 cat >> confdefs.h <<\EOF
4657 #define HAVE_SCHED_YIELD 1
4658 EOF
4659
4660 THREADLIBS="$THREADLIBS -lrt"
4661 THREADSPEC="$THREADSPEC -lrt"
4662 else
4663 echo "$ac_t""no" 1>&6
4664
4665 echo $ac_n "checking for sched_yield in -lposix4""... $ac_c" 1>&6
4666 echo "configure:4667: checking for sched_yield in -lposix4" >&5
4667 ac_lib_var=`echo posix4'_'sched_yield | sed 'y%./+-%__p_%'`
4668 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4669 echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671 ac_save_LIBS="$LIBS"
4672 LIBS="-lposix4 $LIBS"
4673 cat > conftest.$ac_ext <<EOF
4674 #line 4675 "configure"
4675 #include "confdefs.h"
4676 /* Override any gcc2 internal prototype to avoid an error. */
4677 /* We use char because int might match the return type of a gcc2
4678 builtin and then its argument prototype would still apply. */
4679 char sched_yield();
4680
4681 int main() {
4682 sched_yield()
4683 ; return 0; }
4684 EOF
4685 if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4686 rm -rf conftest*
4687 eval "ac_cv_lib_$ac_lib_var=yes"
4688 else
4689 echo "configure: failed program was:" >&5
4690 cat conftest.$ac_ext >&5
4691 rm -rf conftest*
4692 eval "ac_cv_lib_$ac_lib_var=no"
4693 fi
4694 rm -f conftest*
4695 LIBS="$ac_save_LIBS"
4696
4697 fi
4698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4699 echo "$ac_t""yes" 1>&6
4700
4701 cat >> confdefs.h <<\EOF
4702 #define HAVE_SCHED_YIELD 1
4703 EOF
4704
4705 THREADLIBS="$THREADLIBS -lposix4"
4706 THREADSPEC="$THREADSPEC -lposix4"
4707 else
4708 echo "$ac_t""no" 1>&6
4709 fi
4710
4711 fi
4712
4713 fi
4714 done
4715
4716 LIBS="$save_LIBS"
4717
4718 # We can save a little space at runtime if the mutex has m_count
4719 # or __m_count. This is a nice hack for Linux.
4720 cat > conftest.$ac_ext <<EOF
4721 #line 4722 "configure"
4722 #include "confdefs.h"
4723 #include <pthread.h>
4724 int main() {
4725
4726 extern pthread_mutex_t *mutex; int q = mutex->m_count;
4727
4728 ; return 0; }
4729 EOF
4730 if { (eval echo configure:4731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4731 rm -rf conftest*
4732 cat >> confdefs.h <<\EOF
4733 #define PTHREAD_MUTEX_HAVE_M_COUNT 1
4734 EOF
4735
4736 else
4737 echo "configure: failed program was:" >&5
4738 cat conftest.$ac_ext >&5
4739 rm -rf conftest*
4740
4741 cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 #include <pthread.h>
4745 int main() {
4746
4747 extern pthread_mutex_t *mutex; int q = mutex->__m_count;
4748
4749 ; return 0; }
4750 EOF
4751 if { (eval echo configure:4752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4752 rm -rf conftest*
4753 cat >> confdefs.h <<\EOF
4754 #define PTHREAD_MUTEX_HAVE___M_COUNT 1
4755 EOF
4756
4757 else
4758 echo "configure: failed program was:" >&5
4759 cat conftest.$ac_ext >&5
4760 fi
4761 rm -f conftest*
4762 fi
4763 rm -f conftest*
4764 fi
4765
4766 # We require a way to get the time.
4767 time_found=no
4768 for ac_func in gettimeofday time ftime
4769 do
4770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4771 echo "configure:4772: checking for $ac_func" >&5
4772 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4773 echo $ac_n "(cached) $ac_c" 1>&6
4774 else
4775 cat > conftest.$ac_ext <<EOF
4776 #line 4777 "configure"
4777 #include "confdefs.h"
4778 /* System header to define __stub macros and hopefully few prototypes,
4779 which can conflict with char $ac_func(); below. */
4780 #include <assert.h>
4781 /* Override any gcc2 internal prototype to avoid an error. */
4782 /* We use char because int might match the return type of a gcc2
4783 builtin and then its argument prototype would still apply. */
4784 char $ac_func();
4785
4786 int main() {
4787
4788 /* The GNU C library defines this for functions which it implements
4789 to always fail with ENOSYS. Some functions are actually named
4790 something starting with __ and the normal name is an alias. */
4791 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4792 choke me
4793 #else
4794 $ac_func();
4795 #endif
4796
4797 ; return 0; }
4798 EOF
4799 if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4800 rm -rf conftest*
4801 eval "ac_cv_func_$ac_func=yes"
4802 else
4803 echo "configure: failed program was:" >&5
4804 cat conftest.$ac_ext >&5
4805 rm -rf conftest*
4806 eval "ac_cv_func_$ac_func=no"
4807 fi
4808 rm -f conftest*
4809 fi
4810
4811 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4812 echo "$ac_t""yes" 1>&6
4813 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4814 cat >> confdefs.h <<EOF
4815 #define $ac_tr_func 1
4816 EOF
4817 time_found=yes
4818 else
4819 echo "$ac_t""no" 1>&6
4820 fi
4821 done
4822
4823 if test "$time_found" = no; then
4824 { echo "configure: error: no function found to get the time" 1>&2; exit 1; }
4825 fi
4826
4827 for ac_func in memmove
4828 do
4829 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4830 echo "configure:4831: checking for $ac_func" >&5
4831 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4832 echo $ac_n "(cached) $ac_c" 1>&6
4833 else
4834 cat > conftest.$ac_ext <<EOF
4835 #line 4836 "configure"
4836 #include "confdefs.h"
4837 /* System header to define __stub macros and hopefully few prototypes,
4838 which can conflict with char $ac_func(); below. */
4839 #include <assert.h>
4840 /* Override any gcc2 internal prototype to avoid an error. */
4841 /* We use char because int might match the return type of a gcc2
4842 builtin and then its argument prototype would still apply. */
4843 char $ac_func();
4844
4845 int main() {
4846
4847 /* The GNU C library defines this for functions which it implements
4848 to always fail with ENOSYS. Some functions are actually named
4849 something starting with __ and the normal name is an alias. */
4850 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4851 choke me
4852 #else
4853 $ac_func();
4854 #endif
4855
4856 ; return 0; }
4857 EOF
4858 if { (eval echo configure:4859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4859 rm -rf conftest*
4860 eval "ac_cv_func_$ac_func=yes"
4861 else
4862 echo "configure: failed program was:" >&5
4863 cat conftest.$ac_ext >&5
4864 rm -rf conftest*
4865 eval "ac_cv_func_$ac_func=no"
4866 fi
4867 rm -f conftest*
4868 fi
4869
4870 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4871 echo "$ac_t""yes" 1>&6
4872 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4873 cat >> confdefs.h <<EOF
4874 #define $ac_tr_func 1
4875 EOF
4876
4877 else
4878 echo "$ac_t""no" 1>&6
4879 fi
4880 done
4881
4882
4883 # We require memcpy.
4884 memcpy_found=no
4885 for ac_func in memcpy
4886 do
4887 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4888 echo "configure:4889: checking for $ac_func" >&5
4889 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4890 echo $ac_n "(cached) $ac_c" 1>&6
4891 else
4892 cat > conftest.$ac_ext <<EOF
4893 #line 4894 "configure"
4894 #include "confdefs.h"
4895 /* System header to define __stub macros and hopefully few prototypes,
4896 which can conflict with char $ac_func(); below. */
4897 #include <assert.h>
4898 /* Override any gcc2 internal prototype to avoid an error. */
4899 /* We use char because int might match the return type of a gcc2
4900 builtin and then its argument prototype would still apply. */
4901 char $ac_func();
4902
4903 int main() {
4904
4905 /* The GNU C library defines this for functions which it implements
4906 to always fail with ENOSYS. Some functions are actually named
4907 something starting with __ and the normal name is an alias. */
4908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4909 choke me
4910 #else
4911 $ac_func();
4912 #endif
4913
4914 ; return 0; }
4915 EOF
4916 if { (eval echo configure:4917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4917 rm -rf conftest*
4918 eval "ac_cv_func_$ac_func=yes"
4919 else
4920 echo "configure: failed program was:" >&5
4921 cat conftest.$ac_ext >&5
4922 rm -rf conftest*
4923 eval "ac_cv_func_$ac_func=no"
4924 fi
4925 rm -f conftest*
4926 fi
4927
4928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4929 echo "$ac_t""yes" 1>&6
4930 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4931 cat >> confdefs.h <<EOF
4932 #define $ac_tr_func 1
4933 EOF
4934 memcpy_found=yes
4935 else
4936 echo "$ac_t""no" 1>&6
4937 fi
4938 done
4939
4940 if test "$memcpy_found" = no; then
4941 { echo "configure: error: memcpy is required" 1>&2; exit 1; }
4942 fi
4943
4944 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4945 echo "configure:4946: checking for dlopen in -ldl" >&5
4946 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4947 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4948 echo $ac_n "(cached) $ac_c" 1>&6
4949 else
4950 ac_save_LIBS="$LIBS"
4951 LIBS="-ldl $LIBS"
4952 cat > conftest.$ac_ext <<EOF
4953 #line 4954 "configure"
4954 #include "confdefs.h"
4955 /* Override any gcc2 internal prototype to avoid an error. */
4956 /* We use char because int might match the return type of a gcc2
4957 builtin and then its argument prototype would still apply. */
4958 char dlopen();
4959
4960 int main() {
4961 dlopen()
4962 ; return 0; }
4963 EOF
4964 if { (eval echo configure:4965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4965 rm -rf conftest*
4966 eval "ac_cv_lib_$ac_lib_var=yes"
4967 else
4968 echo "configure: failed program was:" >&5
4969 cat conftest.$ac_ext >&5
4970 rm -rf conftest*
4971 eval "ac_cv_lib_$ac_lib_var=no"
4972 fi
4973 rm -f conftest*
4974 LIBS="$ac_save_LIBS"
4975
4976 fi
4977 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4978 echo "$ac_t""yes" 1>&6
4979
4980 cat >> confdefs.h <<\EOF
4981 #define HAVE_DLOPEN 1
4982 EOF
4983
4984 else
4985 echo "$ac_t""no" 1>&6
4986 fi
4987
4988
4989 # Some library-finding code we stole from Tcl.
4990 #--------------------------------------------------------------------
4991 # Check for the existence of the -lsocket and -lnsl libraries.
4992 # The order here is important, so that they end up in the right
4993 # order in the command line generated by make. Here are some
4994 # special considerations:
4995 # 1. Use "connect" and "accept" to check for -lsocket, and
4996 # "gethostbyname" to check for -lnsl.
4997 # 2. Use each function name only once: can't redo a check because
4998 # autoconf caches the results of the last check and won't redo it.
4999 # 3. Use -lnsl and -lsocket only if they supply procedures that
5000 # aren't already present in the normal libraries. This is because
5001 # IRIX 5.2 has libraries, but they aren't needed and they're
5002 # bogus: they goof up name resolution if used.
5003 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
5004 # To get around this problem, check for both libraries together
5005 # if -lsocket doesn't work by itself.
5006 #--------------------------------------------------------------------
5007
5008 echo $ac_n "checking for socket libraries""... $ac_c" 1>&6
5009 echo "configure:5010: checking for socket libraries" >&5
5010 if eval "test \"`echo '$''{'gcj_cv_lib_sockets'+set}'`\" = set"; then
5011 echo $ac_n "(cached) $ac_c" 1>&6
5012 else
5013 gcj_cv_lib_sockets=
5014 gcj_checkBoth=0
5015 unset ac_cv_func_connect
5016 echo $ac_n "checking for connect""... $ac_c" 1>&6
5017 echo "configure:5018: checking for connect" >&5
5018 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5019 echo $ac_n "(cached) $ac_c" 1>&6
5020 else
5021 cat > conftest.$ac_ext <<EOF
5022 #line 5023 "configure"
5023 #include "confdefs.h"
5024 /* System header to define __stub macros and hopefully few prototypes,
5025 which can conflict with char connect(); below. */
5026 #include <assert.h>
5027 /* Override any gcc2 internal prototype to avoid an error. */
5028 /* We use char because int might match the return type of a gcc2
5029 builtin and then its argument prototype would still apply. */
5030 char connect();
5031
5032 int main() {
5033
5034 /* The GNU C library defines this for functions which it implements
5035 to always fail with ENOSYS. Some functions are actually named
5036 something starting with __ and the normal name is an alias. */
5037 #if defined (__stub_connect) || defined (__stub___connect)
5038 choke me
5039 #else
5040 connect();
5041 #endif
5042
5043 ; return 0; }
5044 EOF
5045 if { (eval echo configure:5046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5046 rm -rf conftest*
5047 eval "ac_cv_func_connect=yes"
5048 else
5049 echo "configure: failed program was:" >&5
5050 cat conftest.$ac_ext >&5
5051 rm -rf conftest*
5052 eval "ac_cv_func_connect=no"
5053 fi
5054 rm -f conftest*
5055 fi
5056
5057 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5058 echo "$ac_t""yes" 1>&6
5059 gcj_checkSocket=0
5060 else
5061 echo "$ac_t""no" 1>&6
5062 gcj_checkSocket=1
5063 fi
5064
5065 if test "$gcj_checkSocket" = 1; then
5066 unset ac_cv_func_connect
5067 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
5068 echo "configure:5069: checking for main in -lsocket" >&5
5069 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
5070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5071 echo $ac_n "(cached) $ac_c" 1>&6
5072 else
5073 ac_save_LIBS="$LIBS"
5074 LIBS="-lsocket $LIBS"
5075 cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078
5079 int main() {
5080 main()
5081 ; return 0; }
5082 EOF
5083 if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5084 rm -rf conftest*
5085 eval "ac_cv_lib_$ac_lib_var=yes"
5086 else
5087 echo "configure: failed program was:" >&5
5088 cat conftest.$ac_ext >&5
5089 rm -rf conftest*
5090 eval "ac_cv_lib_$ac_lib_var=no"
5091 fi
5092 rm -f conftest*
5093 LIBS="$ac_save_LIBS"
5094
5095 fi
5096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5097 echo "$ac_t""yes" 1>&6
5098 gcj_cv_lib_sockets="-lsocket"
5099 else
5100 echo "$ac_t""no" 1>&6
5101 gcj_checkBoth=1
5102 fi
5103
5104 fi
5105 if test "$gcj_checkBoth" = 1; then
5106 gcj_oldLibs=$LIBS
5107 LIBS="$LIBS -lsocket -lnsl"
5108 unset ac_cv_func_accept
5109 echo $ac_n "checking for accept""... $ac_c" 1>&6
5110 echo "configure:5111: checking for accept" >&5
5111 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
5112 echo $ac_n "(cached) $ac_c" 1>&6
5113 else
5114 cat > conftest.$ac_ext <<EOF
5115 #line 5116 "configure"
5116 #include "confdefs.h"
5117 /* System header to define __stub macros and hopefully few prototypes,
5118 which can conflict with char accept(); below. */
5119 #include <assert.h>
5120 /* Override any gcc2 internal prototype to avoid an error. */
5121 /* We use char because int might match the return type of a gcc2
5122 builtin and then its argument prototype would still apply. */
5123 char accept();
5124
5125 int main() {
5126
5127 /* The GNU C library defines this for functions which it implements
5128 to always fail with ENOSYS. Some functions are actually named
5129 something starting with __ and the normal name is an alias. */
5130 #if defined (__stub_accept) || defined (__stub___accept)
5131 choke me
5132 #else
5133 accept();
5134 #endif
5135
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5139 rm -rf conftest*
5140 eval "ac_cv_func_accept=yes"
5141 else
5142 echo "configure: failed program was:" >&5
5143 cat conftest.$ac_ext >&5
5144 rm -rf conftest*
5145 eval "ac_cv_func_accept=no"
5146 fi
5147 rm -f conftest*
5148 fi
5149
5150 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
5151 echo "$ac_t""yes" 1>&6
5152 gcj_checkNsl=0
5153 gcj_cv_lib_sockets="-lsocket -lnsl"
5154 else
5155 echo "$ac_t""no" 1>&6
5156 fi
5157
5158 unset ac_cv_func_accept
5159 LIBS=$gcj_oldLibs
5160 fi
5161 unset ac_cv_func_gethostbyname
5162 gcj_oldLibs=$LIBS
5163 LIBS="$LIBS $gcj_cv_lib_sockets"
5164 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5165 echo "configure:5166: checking for gethostbyname" >&5
5166 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
5167 echo $ac_n "(cached) $ac_c" 1>&6
5168 else
5169 cat > conftest.$ac_ext <<EOF
5170 #line 5171 "configure"
5171 #include "confdefs.h"
5172 /* System header to define __stub macros and hopefully few prototypes,
5173 which can conflict with char gethostbyname(); below. */
5174 #include <assert.h>
5175 /* Override any gcc2 internal prototype to avoid an error. */
5176 /* We use char because int might match the return type of a gcc2
5177 builtin and then its argument prototype would still apply. */
5178 char gethostbyname();
5179
5180 int main() {
5181
5182 /* The GNU C library defines this for functions which it implements
5183 to always fail with ENOSYS. Some functions are actually named
5184 something starting with __ and the normal name is an alias. */
5185 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5186 choke me
5187 #else
5188 gethostbyname();
5189 #endif
5190
5191 ; return 0; }
5192 EOF
5193 if { (eval echo configure:5194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5194 rm -rf conftest*
5195 eval "ac_cv_func_gethostbyname=yes"
5196 else
5197 echo "configure: failed program was:" >&5
5198 cat conftest.$ac_ext >&5
5199 rm -rf conftest*
5200 eval "ac_cv_func_gethostbyname=no"
5201 fi
5202 rm -f conftest*
5203 fi
5204
5205 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5206 echo "$ac_t""yes" 1>&6
5207 :
5208 else
5209 echo "$ac_t""no" 1>&6
5210 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
5211 echo "configure:5212: checking for main in -lnsl" >&5
5212 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
5213 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5214 echo $ac_n "(cached) $ac_c" 1>&6
5215 else
5216 ac_save_LIBS="$LIBS"
5217 LIBS="-lnsl $LIBS"
5218 cat > conftest.$ac_ext <<EOF
5219 #line 5220 "configure"
5220 #include "confdefs.h"
5221
5222 int main() {
5223 main()
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5227 rm -rf conftest*
5228 eval "ac_cv_lib_$ac_lib_var=yes"
5229 else
5230 echo "configure: failed program was:" >&5
5231 cat conftest.$ac_ext >&5
5232 rm -rf conftest*
5233 eval "ac_cv_lib_$ac_lib_var=no"
5234 fi
5235 rm -f conftest*
5236 LIBS="$ac_save_LIBS"
5237
5238 fi
5239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5240 echo "$ac_t""yes" 1>&6
5241 gcj_cv_lib_sockets="$gcj_cv_lib_sockets -lnsl"
5242 else
5243 echo "$ac_t""no" 1>&6
5244 fi
5245
5246 fi
5247
5248 unset ac_cv_func_gethostbyname
5249 LIBS=$gcj_oldLIBS
5250
5251 fi
5252
5253 echo "$ac_t""$gcj_cv_lib_sockets" 1>&6
5254 SYSTEMSPEC="$SYSTEMSPEC $gcj_cv_lib_sockets"
5255
5256 if test "$with_system_zlib" = yes; then
5257 echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
5258 echo "configure:5259: checking for deflate in -lz" >&5
5259 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
5260 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5261 echo $ac_n "(cached) $ac_c" 1>&6
5262 else
5263 ac_save_LIBS="$LIBS"
5264 LIBS="-lz $LIBS"
5265 cat > conftest.$ac_ext <<EOF
5266 #line 5267 "configure"
5267 #include "confdefs.h"
5268 /* Override any gcc2 internal prototype to avoid an error. */
5269 /* We use char because int might match the return type of a gcc2
5270 builtin and then its argument prototype would still apply. */
5271 char deflate();
5272
5273 int main() {
5274 deflate()
5275 ; return 0; }
5276 EOF
5277 if { (eval echo configure:5278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5278 rm -rf conftest*
5279 eval "ac_cv_lib_$ac_lib_var=yes"
5280 else
5281 echo "configure: failed program was:" >&5
5282 cat conftest.$ac_ext >&5
5283 rm -rf conftest*
5284 eval "ac_cv_lib_$ac_lib_var=no"
5285 fi
5286 rm -f conftest*
5287 LIBS="$ac_save_LIBS"
5288
5289 fi
5290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5291 echo "$ac_t""yes" 1>&6
5292 ZLIBSPEC=-lz
5293 else
5294 echo "$ac_t""no" 1>&6
5295 ZLIBSPEC=
5296 fi
5297
5298 fi
5299
5300 # On Solaris, and maybe other architectures, the Boehm collector
5301 # requires -ldl.
5302 if test "$GC" = boehm; then
5303 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
5304 echo "configure:5305: checking for main in -ldl" >&5
5305 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
5306 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5307 echo $ac_n "(cached) $ac_c" 1>&6
5308 else
5309 ac_save_LIBS="$LIBS"
5310 LIBS="-ldl $LIBS"
5311 cat > conftest.$ac_ext <<EOF
5312 #line 5313 "configure"
5313 #include "confdefs.h"
5314
5315 int main() {
5316 main()
5317 ; return 0; }
5318 EOF
5319 if { (eval echo configure:5320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5320 rm -rf conftest*
5321 eval "ac_cv_lib_$ac_lib_var=yes"
5322 else
5323 echo "configure: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5325 rm -rf conftest*
5326 eval "ac_cv_lib_$ac_lib_var=no"
5327 fi
5328 rm -f conftest*
5329 LIBS="$ac_save_LIBS"
5330
5331 fi
5332 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5333 echo "$ac_t""yes" 1>&6
5334 SYSTEMSPEC="$SYSTEMSPEC -ldl"
5335 else
5336 echo "$ac_t""no" 1>&6
5337 fi
5338
5339 fi
5340
5341 if test -z "${with_multisubdir}"; then
5342 builddotdot=.
5343 else
5344
5345 builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
5346
5347 fi
5348 if test -x "${builddotdot}/../../gcc/gcj"; then
5349 dir="`cd ${builddotdot}/../../gcc && pwd`"
5350 GCJ="$dir/gcj -B`pwd`/ -B$dir/"
5351 else
5352 CANADIAN=yes
5353 NULL_TARGET=yes
5354 GCJ="gcj -B`pwd`/"
5355 fi
5356 fi
5357
5358 # Create it, so that compile/link tests don't fail
5359 test -f libgcj.spec || touch libgcj.spec
5360
5361 # We must search the source tree for java.lang, since we still don't
5362 # have libgcj.jar nor java/lang/*.class
5363 GCJ_SAVE_CPPFLAGS=$CPPFLAGS
5364 CPPFLAGS="$CPPFLAGS -I`pwd` -I`cd $srcdir && pwd`"
5365
5366 # Since some classes depend on this one, we need its source available
5367 # before we can do any GCJ compilation test :-(
5368 if test ! -f gnu/classpath/Configuration.java; then
5369 test -d gnu || mkdir gnu
5370 test -d gnu/classpath || mkdir gnu/classpath
5371 sed 's,@LIBGCJDEBUG@,$LIBGCJDEBUG,' \
5372 < $srcdir/gnu/classpath/Configuration.java.in \
5373 > gnu/classpath/Configuration.java
5374 # We do not want to redirect the output of the grep below to /dev/null,
5375 # but we add /dev/null to the input list so that grep will print the
5376 # filename of Configuration.java in case it finds any matches.
5377 if grep @ gnu/classpath/Configuration.java /dev/null; then
5378 { echo "configure: error: configure.in is missing the substitutions above" 1>&2; exit 1; }
5379 fi
5380 fi
5381
5382 # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args.
5383 set dummy ${ac_tool_prefix}gcj; ac_word=$2
5384 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5385 echo "configure:5386: checking for $ac_word" >&5
5386 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5387 echo $ac_n "(cached) $ac_c" 1>&6
5388 else
5389 if test -n "$GCJ"; then
5390 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5391 else
5392 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5393 ac_dummy="$PATH"
5394 for ac_dir in $ac_dummy; do
5395 test -z "$ac_dir" && ac_dir=.
5396 if test -f $ac_dir/$ac_word; then
5397 ac_cv_prog_GCJ="${ac_tool_prefix}gcj"
5398 break
5399 fi
5400 done
5401 IFS="$ac_save_ifs"
5402 fi
5403 fi
5404 GCJ="$ac_cv_prog_GCJ"
5405 if test -n "$GCJ"; then
5406 echo "$ac_t""$GCJ" 1>&6
5407 else
5408 echo "$ac_t""no" 1>&6
5409 fi
5410
5411
5412 if test -z "$ac_cv_prog_GCJ"; then
5413 if test -n "$ac_tool_prefix"; then
5414 # Extract the first word of "gcj", so it can be a program name with args.
5415 set dummy gcj; ac_word=$2
5416 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5417 echo "configure:5418: checking for $ac_word" >&5
5418 if eval "test \"`echo '$''{'ac_cv_prog_GCJ'+set}'`\" = set"; then
5419 echo $ac_n "(cached) $ac_c" 1>&6
5420 else
5421 if test -n "$GCJ"; then
5422 ac_cv_prog_GCJ="$GCJ" # Let the user override the test.
5423 else
5424 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5425 ac_dummy="$PATH"
5426 for ac_dir in $ac_dummy; do
5427 test -z "$ac_dir" && ac_dir=.
5428 if test -f $ac_dir/$ac_word; then
5429 ac_cv_prog_GCJ="gcj"
5430 break
5431 fi
5432 done
5433 IFS="$ac_save_ifs"
5434 test -z "$ac_cv_prog_GCJ" && ac_cv_prog_GCJ="no"
5435 fi
5436 fi
5437 GCJ="$ac_cv_prog_GCJ"
5438 if test -n "$GCJ"; then
5439 echo "$ac_t""$GCJ" 1>&6
5440 else
5441 echo "$ac_t""no" 1>&6
5442 fi
5443
5444 else
5445 GCJ="no"
5446 fi
5447 fi
5448
5449 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5450
5451
5452
5453 LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
5454 lt_save_CC="$CC"
5455 lt_save_CFLAGS="$CFLAGS"
5456 AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
5457 MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
5458 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
5459 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
5460 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
5461 deplibs_check_method="$deplibs_check_method" \
5462 file_magic_cmd="$file_magic_cmd" \
5463 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
5464 --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
5465 || { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
5466 CC="$lt_save_CC"
5467 CFLAGS="$lt_save_CFLAGS"
5468
5469 # Redirect the config.log output again, so that the ltconfig log is not
5470 # clobbered by the next message.
5471 exec 5>>./config.log
5472
5473
5474
5475
5476 CPPFLAGS=$GCJ_SAVE_CPPFLAGS
5477
5478 echo $ac_n "checking size of void *""... $ac_c" 1>&6
5479 echo "configure:5480: checking size of void *" >&5
5480 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
5481 echo $ac_n "(cached) $ac_c" 1>&6
5482 else
5483 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
5484 cat > conftest.$ac_ext <<EOF
5485 #line 5486 "configure"
5486 #include "confdefs.h"
5487 #include "confdefs.h"
5488 #include <sys/types.h>
5489
5490
5491 int main() {
5492 switch (0) case 0: case (sizeof (void *) == $ac_size):;
5493 ; return 0; }
5494 EOF
5495 if { (eval echo configure:5496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5496 rm -rf conftest*
5497 ac_cv_sizeof_void_p=$ac_size
5498 else
5499 echo "configure: failed program was:" >&5
5500 cat conftest.$ac_ext >&5
5501 fi
5502 rm -f conftest*
5503 if test x$ac_cv_sizeof_void_p != x ; then break; fi
5504 done
5505
5506 fi
5507
5508 if test x$ac_cv_sizeof_void_p = x ; then
5509 { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
5510 fi
5511 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
5512 cat >> confdefs.h <<EOF
5513 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
5514 EOF
5515
5516
5517
5518 ZLIBS=
5519 SYS_ZLIBS=
5520 ZINCS=
5521
5522 if test -z "$ZLIBSPEC"; then
5523 # Use zlib from the GCC tree.
5524 ZINCS='-I$(top_srcdir)/../zlib'
5525 ZLIBS=../zlib/libzgcj_convenience.la
5526 else
5527 # System's zlib.
5528 SYS_ZLIBS="$ZLIBSPEC"
5529 fi
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539 if test "$CANADIAN" = yes; then
5540 CANADIAN_TRUE=
5541 CANADIAN_FALSE='#'
5542 else
5543 CANADIAN_TRUE='#'
5544 CANADIAN_FALSE=
5545 fi
5546
5547
5548 if test "$NULL_TARGET" = yes; then
5549 NULL_TARGET_TRUE=
5550 NULL_TARGET_FALSE='#'
5551 else
5552 NULL_TARGET_TRUE='#'
5553 NULL_TARGET_FALSE=
5554 fi
5555
5556
5557 if test "$NATIVE" = yes || test "$NULL_TARGET" = yes; then
5558 NATIVE_TRUE=
5559 NATIVE_FALSE='#'
5560 else
5561 NATIVE_TRUE='#'
5562 NATIVE_FALSE=
5563 fi
5564
5565
5566 if test -z "$with_cross_host"; then
5567 USE_LIBDIR_TRUE=
5568 USE_LIBDIR_FALSE='#'
5569 else
5570 USE_LIBDIR_TRUE='#'
5571 USE_LIBDIR_FALSE=
5572 fi
5573
5574
5575 if test "$NEEDS_DATA_START" = yes && test "$NATIVE" = yes; then
5576 NEEDS_DATA_START_TRUE=
5577 NEEDS_DATA_START_FALSE='#'
5578 else
5579 NEEDS_DATA_START_TRUE='#'
5580 NEEDS_DATA_START_FALSE=
5581 fi
5582
5583
5584
5585
5586 # Determine gcj version number.
5587
5588 gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`
5589
5590 GCJVERSION=$gcjversion
5591
5592 cat >> confdefs.h <<EOF
5593 #define GCJVERSION "$GCJVERSION"
5594 EOF
5595
5596
5597 echo $ac_n "checking for g++ -ffloat-store bug""... $ac_c" 1>&6
5598 echo "configure:5599: checking for g++ -ffloat-store bug" >&5
5599 save_CFLAGS="$CFLAGS"
5600 CFLAGS="-x c++ -O2 -ffloat-store"
5601 cat > conftest.$ac_ext <<EOF
5602 #line 5603 "configure"
5603 #include "confdefs.h"
5604 #include <math.h>
5605 int main() {
5606
5607 ; return 0; }
5608 EOF
5609 if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5610 rm -rf conftest*
5611 echo "$ac_t""no" 1>&6
5612 else
5613 echo "configure: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 rm -rf conftest*
5616 cat >> confdefs.h <<\EOF
5617 #define __NO_MATH_INLINES 1
5618 EOF
5619
5620 echo "$ac_t""yes" 1>&6
5621 fi
5622 rm -f conftest*
5623 CFLAGS="$save_CFLAGS"
5624
5625 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
5626 do
5627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5629 echo "configure:5630: checking for $ac_hdr" >&5
5630 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5631 echo $ac_n "(cached) $ac_c" 1>&6
5632 else
5633 cat > conftest.$ac_ext <<EOF
5634 #line 5635 "configure"
5635 #include "confdefs.h"
5636 #include <$ac_hdr>
5637 EOF
5638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5639 { (eval echo configure:5640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5641 if test -z "$ac_err"; then
5642 rm -rf conftest*
5643 eval "ac_cv_header_$ac_safe=yes"
5644 else
5645 echo "$ac_err" >&5
5646 echo "configure: failed program was:" >&5
5647 cat conftest.$ac_ext >&5
5648 rm -rf conftest*
5649 eval "ac_cv_header_$ac_safe=no"
5650 fi
5651 rm -f conftest*
5652 fi
5653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5654 echo "$ac_t""yes" 1>&6
5655 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5656 cat >> confdefs.h <<EOF
5657 #define $ac_tr_hdr 1
5658 EOF
5659
5660 else
5661 echo "$ac_t""no" 1>&6
5662 fi
5663 done
5664
5665 for ac_hdr in dirent.h
5666 do
5667 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5668 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5669 echo "configure:5670: checking for $ac_hdr" >&5
5670 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5671 echo $ac_n "(cached) $ac_c" 1>&6
5672 else
5673 cat > conftest.$ac_ext <<EOF
5674 #line 5675 "configure"
5675 #include "confdefs.h"
5676 #include <$ac_hdr>
5677 EOF
5678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5679 { (eval echo configure:5680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5681 if test -z "$ac_err"; then
5682 rm -rf conftest*
5683 eval "ac_cv_header_$ac_safe=yes"
5684 else
5685 echo "$ac_err" >&5
5686 echo "configure: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5688 rm -rf conftest*
5689 eval "ac_cv_header_$ac_safe=no"
5690 fi
5691 rm -f conftest*
5692 fi
5693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5694 echo "$ac_t""yes" 1>&6
5695 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5696 cat >> confdefs.h <<EOF
5697 #define $ac_tr_hdr 1
5698 EOF
5699
5700 else
5701 echo "$ac_t""no" 1>&6
5702 fi
5703 done
5704
5705 for ac_hdr in inttypes.h
5706 do
5707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5709 echo "configure:5710: checking for $ac_hdr" >&5
5710 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5711 echo $ac_n "(cached) $ac_c" 1>&6
5712 else
5713 cat > conftest.$ac_ext <<EOF
5714 #line 5715 "configure"
5715 #include "confdefs.h"
5716 #include <$ac_hdr>
5717 EOF
5718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5719 { (eval echo configure:5720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5721 if test -z "$ac_err"; then
5722 rm -rf conftest*
5723 eval "ac_cv_header_$ac_safe=yes"
5724 else
5725 echo "$ac_err" >&5
5726 echo "configure: failed program was:" >&5
5727 cat conftest.$ac_ext >&5
5728 rm -rf conftest*
5729 eval "ac_cv_header_$ac_safe=no"
5730 fi
5731 rm -f conftest*
5732 fi
5733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5734 echo "$ac_t""yes" 1>&6
5735 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5736 cat >> confdefs.h <<EOF
5737 #define $ac_tr_hdr 1
5738 EOF
5739
5740 cat >> confdefs.h <<\EOF
5741 #define HAVE_INTTYPES_H 1
5742 EOF
5743
5744 cat >> confdefs.h <<\EOF
5745 #define JV_HAVE_INTTYPES_H 1
5746 EOF
5747
5748
5749 else
5750 echo "$ac_t""no" 1>&6
5751 fi
5752 done
5753
5754 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
5755 echo "configure:5756: checking for sys/wait.h that is POSIX.1 compatible" >&5
5756 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
5757 echo $ac_n "(cached) $ac_c" 1>&6
5758 else
5759 cat > conftest.$ac_ext <<EOF
5760 #line 5761 "configure"
5761 #include "confdefs.h"
5762 #include <sys/types.h>
5763 #include <sys/wait.h>
5764 #ifndef WEXITSTATUS
5765 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
5766 #endif
5767 #ifndef WIFEXITED
5768 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
5769 #endif
5770 int main() {
5771 int s;
5772 wait (&s);
5773 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
5774 ; return 0; }
5775 EOF
5776 if { (eval echo configure:5777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5777 rm -rf conftest*
5778 ac_cv_header_sys_wait_h=yes
5779 else
5780 echo "configure: failed program was:" >&5
5781 cat conftest.$ac_ext >&5
5782 rm -rf conftest*
5783 ac_cv_header_sys_wait_h=no
5784 fi
5785 rm -f conftest*
5786 fi
5787
5788 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
5789 if test $ac_cv_header_sys_wait_h = yes; then
5790 cat >> confdefs.h <<\EOF
5791 #define HAVE_SYS_WAIT_H 1
5792 EOF
5793
5794 fi
5795
5796
5797 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5798 echo "configure:5799: checking for ANSI C header files" >&5
5799 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
5800 echo $ac_n "(cached) $ac_c" 1>&6
5801 else
5802 cat > conftest.$ac_ext <<EOF
5803 #line 5804 "configure"
5804 #include "confdefs.h"
5805 #include <stdlib.h>
5806 #include <stdarg.h>
5807 #include <string.h>
5808 #include <float.h>
5809 EOF
5810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5811 { (eval echo configure:5812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5813 if test -z "$ac_err"; then
5814 rm -rf conftest*
5815 ac_cv_header_stdc=yes
5816 else
5817 echo "$ac_err" >&5
5818 echo "configure: failed program was:" >&5
5819 cat conftest.$ac_ext >&5
5820 rm -rf conftest*
5821 ac_cv_header_stdc=no
5822 fi
5823 rm -f conftest*
5824
5825 if test $ac_cv_header_stdc = yes; then
5826 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5827 cat > conftest.$ac_ext <<EOF
5828 #line 5829 "configure"
5829 #include "confdefs.h"
5830 #include <string.h>
5831 EOF
5832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5833 egrep "memchr" >/dev/null 2>&1; then
5834 :
5835 else
5836 rm -rf conftest*
5837 ac_cv_header_stdc=no
5838 fi
5839 rm -f conftest*
5840
5841 fi
5842
5843 if test $ac_cv_header_stdc = yes; then
5844 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5845 cat > conftest.$ac_ext <<EOF
5846 #line 5847 "configure"
5847 #include "confdefs.h"
5848 #include <stdlib.h>
5849 EOF
5850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5851 egrep "free" >/dev/null 2>&1; then
5852 :
5853 else
5854 rm -rf conftest*
5855 ac_cv_header_stdc=no
5856 fi
5857 rm -f conftest*
5858
5859 fi
5860
5861 if test $ac_cv_header_stdc = yes; then
5862 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5863 if test "$cross_compiling" = yes; then
5864 :
5865 else
5866 cat > conftest.$ac_ext <<EOF
5867 #line 5868 "configure"
5868 #include "confdefs.h"
5869 #include <ctype.h>
5870 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5871 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5872 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5873 int main () { int i; for (i = 0; i < 256; i++)
5874 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5875 exit (0); }
5876
5877 EOF
5878 if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5879 then
5880 :
5881 else
5882 echo "configure: failed program was:" >&5
5883 cat conftest.$ac_ext >&5
5884 rm -fr conftest*
5885 ac_cv_header_stdc=no
5886 fi
5887 rm -fr conftest*
5888 fi
5889
5890 fi
5891 fi
5892
5893 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5894 if test $ac_cv_header_stdc = yes; then
5895 cat >> confdefs.h <<\EOF
5896 #define STDC_HEADERS 1
5897 EOF
5898
5899 fi
5900
5901 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
5902 echo "configure:5903: checking for ssize_t" >&5
5903 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
5904 echo $ac_n "(cached) $ac_c" 1>&6
5905 else
5906 cat > conftest.$ac_ext <<EOF
5907 #line 5908 "configure"
5908 #include "confdefs.h"
5909 #include <sys/types.h>
5910 #if STDC_HEADERS
5911 #include <stdlib.h>
5912 #include <stddef.h>
5913 #endif
5914 EOF
5915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5916 egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5917 rm -rf conftest*
5918 ac_cv_type_ssize_t=yes
5919 else
5920 rm -rf conftest*
5921 ac_cv_type_ssize_t=no
5922 fi
5923 rm -f conftest*
5924
5925 fi
5926 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
5927 if test $ac_cv_type_ssize_t = no; then
5928 cat >> confdefs.h <<\EOF
5929 #define ssize_t int
5930 EOF
5931
5932 fi
5933
5934
5935 echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
5936 echo "configure:5937: checking for in_addr_t" >&5
5937 cat > conftest.$ac_ext <<EOF
5938 #line 5939 "configure"
5939 #include "confdefs.h"
5940 #include <sys/types.h>
5941 #if STDC_HEADERS
5942 #include <stdlib.h>
5943 #include <stddef.h>
5944 #endif
5945 #if HAVE_NETINET_IN_H
5946 #include <netinet/in.h>
5947 #endif
5948 int main() {
5949 in_addr_t foo;
5950 ; return 0; }
5951 EOF
5952 if { (eval echo configure:5953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5953 rm -rf conftest*
5954 cat >> confdefs.h <<\EOF
5955 #define HAVE_IN_ADDR_T 1
5956 EOF
5957
5958 echo "$ac_t""yes" 1>&6
5959 else
5960 echo "configure: failed program was:" >&5
5961 cat conftest.$ac_ext >&5
5962 rm -rf conftest*
5963 echo "$ac_t""no" 1>&6
5964 fi
5965 rm -f conftest*
5966
5967 echo $ac_n "checking whether struct ip_mreq is in netinet/in.h""... $ac_c" 1>&6
5968 echo "configure:5969: checking whether struct ip_mreq is in netinet/in.h" >&5
5969 cat > conftest.$ac_ext <<EOF
5970 #line 5971 "configure"
5971 #include "confdefs.h"
5972 #include <netinet/in.h>
5973 int main() {
5974 struct ip_mreq mreq;
5975 ; return 0; }
5976 EOF
5977 if { (eval echo configure:5978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5978 rm -rf conftest*
5979 cat >> confdefs.h <<\EOF
5980 #define HAVE_STRUCT_IP_MREQ 1
5981 EOF
5982
5983 echo "$ac_t""yes" 1>&6
5984 else
5985 echo "configure: failed program was:" >&5
5986 cat conftest.$ac_ext >&5
5987 rm -rf conftest*
5988 echo "$ac_t""no" 1>&6
5989 fi
5990 rm -f conftest*
5991
5992 echo $ac_n "checking whether struct ipv6_mreq is in netinet/in.h""... $ac_c" 1>&6
5993 echo "configure:5994: checking whether struct ipv6_mreq is in netinet/in.h" >&5
5994 cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 #include <netinet/in.h>
5998 int main() {
5999 struct ipv6_mreq mreq6;
6000 ; return 0; }
6001 EOF
6002 if { (eval echo configure:6003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6003 rm -rf conftest*
6004 cat >> confdefs.h <<\EOF
6005 #define HAVE_STRUCT_IPV6_MREQ 1
6006 EOF
6007
6008 echo "$ac_t""yes" 1>&6
6009 else
6010 echo "configure: failed program was:" >&5
6011 cat conftest.$ac_ext >&5
6012 rm -rf conftest*
6013 echo "$ac_t""no" 1>&6
6014 fi
6015 rm -f conftest*
6016
6017 echo $ac_n "checking whether struct sockaddr_in6 is in netinet/in.h""... $ac_c" 1>&6
6018 echo "configure:6019: checking whether struct sockaddr_in6 is in netinet/in.h" >&5
6019 cat > conftest.$ac_ext <<EOF
6020 #line 6021 "configure"
6021 #include "confdefs.h"
6022 #include <netinet/in.h>
6023 int main() {
6024 struct sockaddr_in6 addr6;
6025 ; return 0; }
6026 EOF
6027 if { (eval echo configure:6028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6028 rm -rf conftest*
6029 cat >> confdefs.h <<\EOF
6030 #define HAVE_INET6 1
6031 EOF
6032
6033 echo "$ac_t""yes" 1>&6
6034 else
6035 echo "configure: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6037 rm -rf conftest*
6038 echo "$ac_t""no" 1>&6
6039 fi
6040 rm -f conftest*
6041
6042 echo $ac_n "checking for socklen_t in sys/socket.h""... $ac_c" 1>&6
6043 echo "configure:6044: checking for socklen_t in sys/socket.h" >&5
6044 cat > conftest.$ac_ext <<EOF
6045 #line 6046 "configure"
6046 #include "confdefs.h"
6047 #define _POSIX_PII_SOCKET
6048 #include <sys/types.h>
6049 #include <sys/socket.h>
6050 int main() {
6051 socklen_t x = 5;
6052 ; return 0; }
6053 EOF
6054 if { (eval echo configure:6055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6055 rm -rf conftest*
6056 cat >> confdefs.h <<\EOF
6057 #define HAVE_SOCKLEN_T 1
6058 EOF
6059
6060 echo "$ac_t""yes" 1>&6
6061 else
6062 echo "configure: failed program was:" >&5
6063 cat conftest.$ac_ext >&5
6064 rm -rf conftest*
6065 echo "$ac_t""no" 1>&6
6066 fi
6067 rm -f conftest*
6068
6069 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
6070 echo "configure:6071: checking for tm_gmtoff in struct tm" >&5
6071 cat > conftest.$ac_ext <<EOF
6072 #line 6073 "configure"
6073 #include "confdefs.h"
6074 #include <time.h>
6075 int main() {
6076 struct tm tim; tim.tm_gmtoff = 0;
6077 ; return 0; }
6078 EOF
6079 if { (eval echo configure:6080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6080 rm -rf conftest*
6081 cat >> confdefs.h <<\EOF
6082 #define STRUCT_TM_HAS_GMTOFF 1
6083 EOF
6084
6085 echo "$ac_t""yes" 1>&6
6086 else
6087 echo "configure: failed program was:" >&5
6088 cat conftest.$ac_ext >&5
6089 rm -rf conftest*
6090 echo "$ac_t""no" 1>&6
6091 echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
6092 echo "configure:6093: checking for global timezone variable" >&5
6093 cat > conftest.$ac_ext <<EOF
6094 #line 6095 "configure"
6095 #include "confdefs.h"
6096 #include <time.h>
6097 int main() {
6098 long z2 = timezone;
6099 ; return 0; }
6100 EOF
6101 if { (eval echo configure:6102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6102 rm -rf conftest*
6103 cat >> confdefs.h <<\EOF
6104 #define HAVE_TIMEZONE 1
6105 EOF
6106
6107 echo "$ac_t""yes" 1>&6
6108 else
6109 echo "configure: failed program was:" >&5
6110 cat conftest.$ac_ext >&5
6111 rm -rf conftest*
6112 echo "$ac_t""no" 1>&6
6113 fi
6114 rm -f conftest*
6115 fi
6116 rm -f conftest*
6117
6118 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6119 # for constant arguments. Useless!
6120 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6121 echo "configure:6122: checking for working alloca.h" >&5
6122 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6123 echo $ac_n "(cached) $ac_c" 1>&6
6124 else
6125 cat > conftest.$ac_ext <<EOF
6126 #line 6127 "configure"
6127 #include "confdefs.h"
6128 #include <alloca.h>
6129 int main() {
6130 char *p = alloca(2 * sizeof(int));
6131 ; return 0; }
6132 EOF
6133 if { (eval echo configure:6134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6134 rm -rf conftest*
6135 ac_cv_header_alloca_h=yes
6136 else
6137 echo "configure: failed program was:" >&5
6138 cat conftest.$ac_ext >&5
6139 rm -rf conftest*
6140 ac_cv_header_alloca_h=no
6141 fi
6142 rm -f conftest*
6143 fi
6144
6145 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6146 if test $ac_cv_header_alloca_h = yes; then
6147 cat >> confdefs.h <<\EOF
6148 #define HAVE_ALLOCA_H 1
6149 EOF
6150
6151 fi
6152
6153 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6154 echo "configure:6155: checking for alloca" >&5
6155 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6156 echo $ac_n "(cached) $ac_c" 1>&6
6157 else
6158 cat > conftest.$ac_ext <<EOF
6159 #line 6160 "configure"
6160 #include "confdefs.h"
6161
6162 #ifdef __GNUC__
6163 # define alloca __builtin_alloca
6164 #else
6165 # ifdef _MSC_VER
6166 # include <malloc.h>
6167 # define alloca _alloca
6168 # else
6169 # if HAVE_ALLOCA_H
6170 # include <alloca.h>
6171 # else
6172 # ifdef _AIX
6173 #pragma alloca
6174 # else
6175 # ifndef alloca /* predefined by HP cc +Olibcalls */
6176 char *alloca ();
6177 # endif
6178 # endif
6179 # endif
6180 # endif
6181 #endif
6182
6183 int main() {
6184 char *p = (char *) alloca(1);
6185 ; return 0; }
6186 EOF
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188 rm -rf conftest*
6189 ac_cv_func_alloca_works=yes
6190 else
6191 echo "configure: failed program was:" >&5
6192 cat conftest.$ac_ext >&5
6193 rm -rf conftest*
6194 ac_cv_func_alloca_works=no
6195 fi
6196 rm -f conftest*
6197 fi
6198
6199 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6200 if test $ac_cv_func_alloca_works = yes; then
6201 cat >> confdefs.h <<\EOF
6202 #define HAVE_ALLOCA 1
6203 EOF
6204
6205 fi
6206
6207 if test $ac_cv_func_alloca_works = no; then
6208 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6209 # that cause trouble. Some versions do not even contain alloca or
6210 # contain a buggy version. If you still want to use their alloca,
6211 # use ar to extract alloca.o from them instead of compiling alloca.c.
6212 ALLOCA=alloca.${ac_objext}
6213 cat >> confdefs.h <<\EOF
6214 #define C_ALLOCA 1
6215 EOF
6216
6217
6218 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6219 echo "configure:6220: checking whether alloca needs Cray hooks" >&5
6220 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6221 echo $ac_n "(cached) $ac_c" 1>&6
6222 else
6223 cat > conftest.$ac_ext <<EOF
6224 #line 6225 "configure"
6225 #include "confdefs.h"
6226 #if defined(CRAY) && ! defined(CRAY2)
6227 webecray
6228 #else
6229 wenotbecray
6230 #endif
6231
6232 EOF
6233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6234 egrep "webecray" >/dev/null 2>&1; then
6235 rm -rf conftest*
6236 ac_cv_os_cray=yes
6237 else
6238 rm -rf conftest*
6239 ac_cv_os_cray=no
6240 fi
6241 rm -f conftest*
6242
6243 fi
6244
6245 echo "$ac_t""$ac_cv_os_cray" 1>&6
6246 if test $ac_cv_os_cray = yes; then
6247 for ac_func in _getb67 GETB67 getb67; do
6248 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6249 echo "configure:6250: checking for $ac_func" >&5
6250 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6251 echo $ac_n "(cached) $ac_c" 1>&6
6252 else
6253 cat > conftest.$ac_ext <<EOF
6254 #line 6255 "configure"
6255 #include "confdefs.h"
6256 /* System header to define __stub macros and hopefully few prototypes,
6257 which can conflict with char $ac_func(); below. */
6258 #include <assert.h>
6259 /* Override any gcc2 internal prototype to avoid an error. */
6260 /* We use char because int might match the return type of a gcc2
6261 builtin and then its argument prototype would still apply. */
6262 char $ac_func();
6263
6264 int main() {
6265
6266 /* The GNU C library defines this for functions which it implements
6267 to always fail with ENOSYS. Some functions are actually named
6268 something starting with __ and the normal name is an alias. */
6269 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6270 choke me
6271 #else
6272 $ac_func();
6273 #endif
6274
6275 ; return 0; }
6276 EOF
6277 if { (eval echo configure:6278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6278 rm -rf conftest*
6279 eval "ac_cv_func_$ac_func=yes"
6280 else
6281 echo "configure: failed program was:" >&5
6282 cat conftest.$ac_ext >&5
6283 rm -rf conftest*
6284 eval "ac_cv_func_$ac_func=no"
6285 fi
6286 rm -f conftest*
6287 fi
6288
6289 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6290 echo "$ac_t""yes" 1>&6
6291 cat >> confdefs.h <<EOF
6292 #define CRAY_STACKSEG_END $ac_func
6293 EOF
6294
6295 break
6296 else
6297 echo "$ac_t""no" 1>&6
6298 fi
6299
6300 done
6301 fi
6302
6303 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6304 echo "configure:6305: checking stack direction for C alloca" >&5
6305 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6306 echo $ac_n "(cached) $ac_c" 1>&6
6307 else
6308 if test "$cross_compiling" = yes; then
6309 ac_cv_c_stack_direction=0
6310 else
6311 cat > conftest.$ac_ext <<EOF
6312 #line 6313 "configure"
6313 #include "confdefs.h"
6314 find_stack_direction ()
6315 {
6316 static char *addr = 0;
6317 auto char dummy;
6318 if (addr == 0)
6319 {
6320 addr = &dummy;
6321 return find_stack_direction ();
6322 }
6323 else
6324 return (&dummy > addr) ? 1 : -1;
6325 }
6326 main ()
6327 {
6328 exit (find_stack_direction() < 0);
6329 }
6330 EOF
6331 if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6332 then
6333 ac_cv_c_stack_direction=1
6334 else
6335 echo "configure: failed program was:" >&5
6336 cat conftest.$ac_ext >&5
6337 rm -fr conftest*
6338 ac_cv_c_stack_direction=-1
6339 fi
6340 rm -fr conftest*
6341 fi
6342
6343 fi
6344
6345 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6346 cat >> confdefs.h <<EOF
6347 #define STACK_DIRECTION $ac_cv_c_stack_direction
6348 EOF
6349
6350 fi
6351
6352
6353 for ac_prog in perl
6354 do
6355 # Extract the first word of "$ac_prog", so it can be a program name with args.
6356 set dummy $ac_prog; ac_word=$2
6357 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6358 echo "configure:6359: checking for $ac_word" >&5
6359 if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
6360 echo $ac_n "(cached) $ac_c" 1>&6
6361 else
6362 if test -n "$PERL"; then
6363 ac_cv_prog_PERL="$PERL" # Let the user override the test.
6364 else
6365 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6366 ac_dummy="$PATH"
6367 for ac_dir in $ac_dummy; do
6368 test -z "$ac_dir" && ac_dir=.
6369 if test -f $ac_dir/$ac_word; then
6370 ac_cv_prog_PERL="$ac_prog"
6371 break
6372 fi
6373 done
6374 IFS="$ac_save_ifs"
6375 fi
6376 fi
6377 PERL="$ac_cv_prog_PERL"
6378 if test -n "$PERL"; then
6379 echo "$ac_t""$PERL" 1>&6
6380 else
6381 echo "$ac_t""no" 1>&6
6382 fi
6383
6384 test -n "$PERL" && break
6385 done
6386 test -n "$PERL" || PERL="false"
6387
6388
6389 SYSDEP_SOURCES=
6390
6391 case "${host}" in
6392 i?86-*-linux*)
6393 SIGNAL_HANDLER=include/i386-signal.h
6394 ;;
6395 sparc-sun-solaris*)
6396 SIGNAL_HANDLER=include/sparc-signal.h
6397 ;;
6398 # ia64-*)
6399 # SYSDEP_SOURCES=sysdep/ia64.c
6400 # test -d sysdep || mkdir sysdep
6401 # ;;
6402 ia64-*-linux*)
6403 SIGNAL_HANDLER=include/dwarf2-signal.h
6404 ;;
6405 powerpc-*-linux*)
6406 SIGNAL_HANDLER=include/dwarf2-signal.h
6407 ;;
6408 alpha*-*-linux*)
6409 SIGNAL_HANDLER=include/dwarf2-signal.h
6410 ;;
6411 *mingw*)
6412 SIGNAL_HANDLER=include/win32-signal.h
6413 ;;
6414 *)
6415 SIGNAL_HANDLER=include/default-signal.h
6416 ;;
6417 esac
6418
6419 # If we're using sjlj exceptions, forget what we just learned.
6420 if test "$enable_sjlj_exceptions" = yes; then
6421 SIGNAL_HANDLER=include/default-signal.h
6422 fi
6423
6424
6425
6426
6427
6428 if test "${multilib}" = "yes"; then
6429 multilib_arg="--enable-multilib"
6430 else
6431 multilib_arg=
6432 fi
6433
6434 # If we find X, set shell vars x_includes and x_libraries to the
6435 # paths, otherwise set no_x=yes.
6436 # Uses ac_ vars as temps to allow command line to override cache and checks.
6437 # --without-x overrides everything else, but does not touch the cache.
6438 echo $ac_n "checking for X""... $ac_c" 1>&6
6439 echo "configure:6440: checking for X" >&5
6440
6441 # Check whether --with-x or --without-x was given.
6442 if test "${with_x+set}" = set; then
6443 withval="$with_x"
6444 :
6445 fi
6446
6447 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6448 if test "x$with_x" = xno; then
6449 # The user explicitly disabled X.
6450 have_x=disabled
6451 else
6452 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6453 # Both variables are already set.
6454 have_x=yes
6455 else
6456 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6457 echo $ac_n "(cached) $ac_c" 1>&6
6458 else
6459 # One or both of the vars are not set, and there is no cached value.
6460 ac_x_includes=NO ac_x_libraries=NO
6461 rm -fr conftestdir
6462 if mkdir conftestdir; then
6463 cd conftestdir
6464 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6465 cat > Imakefile <<'EOF'
6466 acfindx:
6467 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6468 EOF
6469 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6470 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6471 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6472 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6473 for ac_extension in a so sl; do
6474 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6475 test -f $ac_im_libdir/libX11.$ac_extension; then
6476 ac_im_usrlibdir=$ac_im_libdir; break
6477 fi
6478 done
6479 # Screen out bogus values from the imake configuration. They are
6480 # bogus both because they are the default anyway, and because
6481 # using them would break gcc on systems where it needs fixed includes.
6482 case "$ac_im_incroot" in
6483 /usr/include) ;;
6484 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6485 esac
6486 case "$ac_im_usrlibdir" in
6487 /usr/lib | /lib) ;;
6488 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6489 esac
6490 fi
6491 cd ..
6492 rm -fr conftestdir
6493 fi
6494
6495 if test "$ac_x_includes" = NO; then
6496 # Guess where to find include files, by looking for this one X11 .h file.
6497 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6498
6499 # First, try using that file with no special directory specified.
6500 cat > conftest.$ac_ext <<EOF
6501 #line 6502 "configure"
6502 #include "confdefs.h"
6503 #include <$x_direct_test_include>
6504 EOF
6505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6506 { (eval echo configure:6507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6508 if test -z "$ac_err"; then
6509 rm -rf conftest*
6510 # We can compile using X headers with no special include directory.
6511 ac_x_includes=
6512 else
6513 echo "$ac_err" >&5
6514 echo "configure: failed program was:" >&5
6515 cat conftest.$ac_ext >&5
6516 rm -rf conftest*
6517 # Look for the header file in a standard set of common directories.
6518 # Check X11 before X11Rn because it is often a symlink to the current release.
6519 for ac_dir in \
6520 /usr/X11/include \
6521 /usr/X11R6/include \
6522 /usr/X11R5/include \
6523 /usr/X11R4/include \
6524 \
6525 /usr/include/X11 \
6526 /usr/include/X11R6 \
6527 /usr/include/X11R5 \
6528 /usr/include/X11R4 \
6529 \
6530 /usr/local/X11/include \
6531 /usr/local/X11R6/include \
6532 /usr/local/X11R5/include \
6533 /usr/local/X11R4/include \
6534 \
6535 /usr/local/include/X11 \
6536 /usr/local/include/X11R6 \
6537 /usr/local/include/X11R5 \
6538 /usr/local/include/X11R4 \
6539 \
6540 /usr/X386/include \
6541 /usr/x386/include \
6542 /usr/XFree86/include/X11 \
6543 \
6544 /usr/include \
6545 /usr/local/include \
6546 /usr/unsupported/include \
6547 /usr/athena/include \
6548 /usr/local/x11r5/include \
6549 /usr/lpp/Xamples/include \
6550 \
6551 /usr/openwin/include \
6552 /usr/openwin/share/include \
6553 ; \
6554 do
6555 if test -r "$ac_dir/$x_direct_test_include"; then
6556 ac_x_includes=$ac_dir
6557 break
6558 fi
6559 done
6560 fi
6561 rm -f conftest*
6562 fi # $ac_x_includes = NO
6563
6564 if test "$ac_x_libraries" = NO; then
6565 # Check for the libraries.
6566
6567 test -z "$x_direct_test_library" && x_direct_test_library=Xt
6568 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6569
6570 # See if we find them without any special options.
6571 # Don't add to $LIBS permanently.
6572 ac_save_LIBS="$LIBS"
6573 LIBS="-l$x_direct_test_library $LIBS"
6574 cat > conftest.$ac_ext <<EOF
6575 #line 6576 "configure"
6576 #include "confdefs.h"
6577
6578 int main() {
6579 ${x_direct_test_function}()
6580 ; return 0; }
6581 EOF
6582 if { (eval echo configure:6583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6583 rm -rf conftest*
6584 LIBS="$ac_save_LIBS"
6585 # We can link X programs with no special library path.
6586 ac_x_libraries=
6587 else
6588 echo "configure: failed program was:" >&5
6589 cat conftest.$ac_ext >&5
6590 rm -rf conftest*
6591 LIBS="$ac_save_LIBS"
6592 # First see if replacing the include by lib works.
6593 # Check X11 before X11Rn because it is often a symlink to the current release.
6594 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6595 /usr/X11/lib \
6596 /usr/X11R6/lib \
6597 /usr/X11R5/lib \
6598 /usr/X11R4/lib \
6599 \
6600 /usr/lib/X11 \
6601 /usr/lib/X11R6 \
6602 /usr/lib/X11R5 \
6603 /usr/lib/X11R4 \
6604 \
6605 /usr/local/X11/lib \
6606 /usr/local/X11R6/lib \
6607 /usr/local/X11R5/lib \
6608 /usr/local/X11R4/lib \
6609 \
6610 /usr/local/lib/X11 \
6611 /usr/local/lib/X11R6 \
6612 /usr/local/lib/X11R5 \
6613 /usr/local/lib/X11R4 \
6614 \
6615 /usr/X386/lib \
6616 /usr/x386/lib \
6617 /usr/XFree86/lib/X11 \
6618 \
6619 /usr/lib \
6620 /usr/local/lib \
6621 /usr/unsupported/lib \
6622 /usr/athena/lib \
6623 /usr/local/x11r5/lib \
6624 /usr/lpp/Xamples/lib \
6625 /lib/usr/lib/X11 \
6626 \
6627 /usr/openwin/lib \
6628 /usr/openwin/share/lib \
6629 ; \
6630 do
6631 for ac_extension in a so sl; do
6632 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6633 ac_x_libraries=$ac_dir
6634 break 2
6635 fi
6636 done
6637 done
6638 fi
6639 rm -f conftest*
6640 fi # $ac_x_libraries = NO
6641
6642 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6643 # Didn't find X anywhere. Cache the known absence of X.
6644 ac_cv_have_x="have_x=no"
6645 else
6646 # Record where we found X for the cache.
6647 ac_cv_have_x="have_x=yes \
6648 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6649 fi
6650 fi
6651 fi
6652 eval "$ac_cv_have_x"
6653 fi # $with_x != no
6654
6655 if test "$have_x" != yes; then
6656 echo "$ac_t""$have_x" 1>&6
6657 no_x=yes
6658 else
6659 # If each of the values was on the command line, it overrides each guess.
6660 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6661 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6662 # Update the cache value to reflect the command line values.
6663 ac_cv_have_x="have_x=yes \
6664 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6665 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6666 fi
6667
6668 if test "$no_x" = yes; then
6669 # Not all programs may use this symbol, but it does not hurt to define it.
6670 cat >> confdefs.h <<\EOF
6671 #define X_DISPLAY_MISSING 1
6672 EOF
6673
6674 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6675 else
6676 if test -n "$x_includes"; then
6677 X_CFLAGS="$X_CFLAGS -I$x_includes"
6678 fi
6679
6680 # It would also be nice to do this for all -L options, not just this one.
6681 if test -n "$x_libraries"; then
6682 X_LIBS="$X_LIBS -L$x_libraries"
6683 # For Solaris; some versions of Sun CC require a space after -R and
6684 # others require no space. Words are not sufficient . . . .
6685 case "`(uname -sr) 2>/dev/null`" in
6686 "SunOS 5"*)
6687 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6688 echo "configure:6689: checking whether -R must be followed by a space" >&5
6689 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6690 cat > conftest.$ac_ext <<EOF
6691 #line 6692 "configure"
6692 #include "confdefs.h"
6693
6694 int main() {
6695
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6699 rm -rf conftest*
6700 ac_R_nospace=yes
6701 else
6702 echo "configure: failed program was:" >&5
6703 cat conftest.$ac_ext >&5
6704 rm -rf conftest*
6705 ac_R_nospace=no
6706 fi
6707 rm -f conftest*
6708 if test $ac_R_nospace = yes; then
6709 echo "$ac_t""no" 1>&6
6710 X_LIBS="$X_LIBS -R$x_libraries"
6711 else
6712 LIBS="$ac_xsave_LIBS -R $x_libraries"
6713 cat > conftest.$ac_ext <<EOF
6714 #line 6715 "configure"
6715 #include "confdefs.h"
6716
6717 int main() {
6718
6719 ; return 0; }
6720 EOF
6721 if { (eval echo configure:6722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6722 rm -rf conftest*
6723 ac_R_space=yes
6724 else
6725 echo "configure: failed program was:" >&5
6726 cat conftest.$ac_ext >&5
6727 rm -rf conftest*
6728 ac_R_space=no
6729 fi
6730 rm -f conftest*
6731 if test $ac_R_space = yes; then
6732 echo "$ac_t""yes" 1>&6
6733 X_LIBS="$X_LIBS -R $x_libraries"
6734 else
6735 echo "$ac_t""neither works" 1>&6
6736 fi
6737 fi
6738 LIBS="$ac_xsave_LIBS"
6739 esac
6740 fi
6741
6742 # Check for system-dependent libraries X programs must link with.
6743 # Do this before checking for the system-independent R6 libraries
6744 # (-lICE), since we may need -lsocket or whatever for X linking.
6745
6746 if test "$ISC" = yes; then
6747 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6748 else
6749 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6750 # libraries were built with DECnet support. And karl@cs.umb.edu says
6751 # the Alpha needs dnet_stub (dnet does not exist).
6752 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6753 echo "configure:6754: checking for dnet_ntoa in -ldnet" >&5
6754 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6756 echo $ac_n "(cached) $ac_c" 1>&6
6757 else
6758 ac_save_LIBS="$LIBS"
6759 LIBS="-ldnet $LIBS"
6760 cat > conftest.$ac_ext <<EOF
6761 #line 6762 "configure"
6762 #include "confdefs.h"
6763 /* Override any gcc2 internal prototype to avoid an error. */
6764 /* We use char because int might match the return type of a gcc2
6765 builtin and then its argument prototype would still apply. */
6766 char dnet_ntoa();
6767
6768 int main() {
6769 dnet_ntoa()
6770 ; return 0; }
6771 EOF
6772 if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6773 rm -rf conftest*
6774 eval "ac_cv_lib_$ac_lib_var=yes"
6775 else
6776 echo "configure: failed program was:" >&5
6777 cat conftest.$ac_ext >&5
6778 rm -rf conftest*
6779 eval "ac_cv_lib_$ac_lib_var=no"
6780 fi
6781 rm -f conftest*
6782 LIBS="$ac_save_LIBS"
6783
6784 fi
6785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6786 echo "$ac_t""yes" 1>&6
6787 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6788 else
6789 echo "$ac_t""no" 1>&6
6790 fi
6791
6792 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6793 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6794 echo "configure:6795: checking for dnet_ntoa in -ldnet_stub" >&5
6795 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6796 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6797 echo $ac_n "(cached) $ac_c" 1>&6
6798 else
6799 ac_save_LIBS="$LIBS"
6800 LIBS="-ldnet_stub $LIBS"
6801 cat > conftest.$ac_ext <<EOF
6802 #line 6803 "configure"
6803 #include "confdefs.h"
6804 /* Override any gcc2 internal prototype to avoid an error. */
6805 /* We use char because int might match the return type of a gcc2
6806 builtin and then its argument prototype would still apply. */
6807 char dnet_ntoa();
6808
6809 int main() {
6810 dnet_ntoa()
6811 ; return 0; }
6812 EOF
6813 if { (eval echo configure:6814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6814 rm -rf conftest*
6815 eval "ac_cv_lib_$ac_lib_var=yes"
6816 else
6817 echo "configure: failed program was:" >&5
6818 cat conftest.$ac_ext >&5
6819 rm -rf conftest*
6820 eval "ac_cv_lib_$ac_lib_var=no"
6821 fi
6822 rm -f conftest*
6823 LIBS="$ac_save_LIBS"
6824
6825 fi
6826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6827 echo "$ac_t""yes" 1>&6
6828 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6829 else
6830 echo "$ac_t""no" 1>&6
6831 fi
6832
6833 fi
6834
6835 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6836 # to get the SysV transport functions.
6837 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6838 # needs -lnsl.
6839 # The nsl library prevents programs from opening the X display
6840 # on Irix 5.2, according to dickey@clark.net.
6841 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6842 echo "configure:6843: checking for gethostbyname" >&5
6843 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6844 echo $ac_n "(cached) $ac_c" 1>&6
6845 else
6846 cat > conftest.$ac_ext <<EOF
6847 #line 6848 "configure"
6848 #include "confdefs.h"
6849 /* System header to define __stub macros and hopefully few prototypes,
6850 which can conflict with char gethostbyname(); below. */
6851 #include <assert.h>
6852 /* Override any gcc2 internal prototype to avoid an error. */
6853 /* We use char because int might match the return type of a gcc2
6854 builtin and then its argument prototype would still apply. */
6855 char gethostbyname();
6856
6857 int main() {
6858
6859 /* The GNU C library defines this for functions which it implements
6860 to always fail with ENOSYS. Some functions are actually named
6861 something starting with __ and the normal name is an alias. */
6862 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6863 choke me
6864 #else
6865 gethostbyname();
6866 #endif
6867
6868 ; return 0; }
6869 EOF
6870 if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6871 rm -rf conftest*
6872 eval "ac_cv_func_gethostbyname=yes"
6873 else
6874 echo "configure: failed program was:" >&5
6875 cat conftest.$ac_ext >&5
6876 rm -rf conftest*
6877 eval "ac_cv_func_gethostbyname=no"
6878 fi
6879 rm -f conftest*
6880 fi
6881
6882 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6883 echo "$ac_t""yes" 1>&6
6884 :
6885 else
6886 echo "$ac_t""no" 1>&6
6887 fi
6888
6889 if test $ac_cv_func_gethostbyname = no; then
6890 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6891 echo "configure:6892: checking for gethostbyname in -lnsl" >&5
6892 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6893 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6894 echo $ac_n "(cached) $ac_c" 1>&6
6895 else
6896 ac_save_LIBS="$LIBS"
6897 LIBS="-lnsl $LIBS"
6898 cat > conftest.$ac_ext <<EOF
6899 #line 6900 "configure"
6900 #include "confdefs.h"
6901 /* Override any gcc2 internal prototype to avoid an error. */
6902 /* We use char because int might match the return type of a gcc2
6903 builtin and then its argument prototype would still apply. */
6904 char gethostbyname();
6905
6906 int main() {
6907 gethostbyname()
6908 ; return 0; }
6909 EOF
6910 if { (eval echo configure:6911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6911 rm -rf conftest*
6912 eval "ac_cv_lib_$ac_lib_var=yes"
6913 else
6914 echo "configure: failed program was:" >&5
6915 cat conftest.$ac_ext >&5
6916 rm -rf conftest*
6917 eval "ac_cv_lib_$ac_lib_var=no"
6918 fi
6919 rm -f conftest*
6920 LIBS="$ac_save_LIBS"
6921
6922 fi
6923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6924 echo "$ac_t""yes" 1>&6
6925 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6926 else
6927 echo "$ac_t""no" 1>&6
6928 fi
6929
6930 fi
6931
6932 # lieder@skyler.mavd.honeywell.com says without -lsocket,
6933 # socket/setsockopt and other routines are undefined under SCO ODT
6934 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
6935 # on later versions), says simon@lia.di.epfl.ch: it contains
6936 # gethostby* variants that don't use the nameserver (or something).
6937 # -lsocket must be given before -lnsl if both are needed.
6938 # We assume that if connect needs -lnsl, so does gethostbyname.
6939 echo $ac_n "checking for connect""... $ac_c" 1>&6
6940 echo "configure:6941: checking for connect" >&5
6941 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6942 echo $ac_n "(cached) $ac_c" 1>&6
6943 else
6944 cat > conftest.$ac_ext <<EOF
6945 #line 6946 "configure"
6946 #include "confdefs.h"
6947 /* System header to define __stub macros and hopefully few prototypes,
6948 which can conflict with char connect(); below. */
6949 #include <assert.h>
6950 /* Override any gcc2 internal prototype to avoid an error. */
6951 /* We use char because int might match the return type of a gcc2
6952 builtin and then its argument prototype would still apply. */
6953 char connect();
6954
6955 int main() {
6956
6957 /* The GNU C library defines this for functions which it implements
6958 to always fail with ENOSYS. Some functions are actually named
6959 something starting with __ and the normal name is an alias. */
6960 #if defined (__stub_connect) || defined (__stub___connect)
6961 choke me
6962 #else
6963 connect();
6964 #endif
6965
6966 ; return 0; }
6967 EOF
6968 if { (eval echo configure:6969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6969 rm -rf conftest*
6970 eval "ac_cv_func_connect=yes"
6971 else
6972 echo "configure: failed program was:" >&5
6973 cat conftest.$ac_ext >&5
6974 rm -rf conftest*
6975 eval "ac_cv_func_connect=no"
6976 fi
6977 rm -f conftest*
6978 fi
6979
6980 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6981 echo "$ac_t""yes" 1>&6
6982 :
6983 else
6984 echo "$ac_t""no" 1>&6
6985 fi
6986
6987 if test $ac_cv_func_connect = no; then
6988 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6989 echo "configure:6990: checking for connect in -lsocket" >&5
6990 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6991 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6992 echo $ac_n "(cached) $ac_c" 1>&6
6993 else
6994 ac_save_LIBS="$LIBS"
6995 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6996 cat > conftest.$ac_ext <<EOF
6997 #line 6998 "configure"
6998 #include "confdefs.h"
6999 /* Override any gcc2 internal prototype to avoid an error. */
7000 /* We use char because int might match the return type of a gcc2
7001 builtin and then its argument prototype would still apply. */
7002 char connect();
7003
7004 int main() {
7005 connect()
7006 ; return 0; }
7007 EOF
7008 if { (eval echo configure:7009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7009 rm -rf conftest*
7010 eval "ac_cv_lib_$ac_lib_var=yes"
7011 else
7012 echo "configure: failed program was:" >&5
7013 cat conftest.$ac_ext >&5
7014 rm -rf conftest*
7015 eval "ac_cv_lib_$ac_lib_var=no"
7016 fi
7017 rm -f conftest*
7018 LIBS="$ac_save_LIBS"
7019
7020 fi
7021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7022 echo "$ac_t""yes" 1>&6
7023 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7024 else
7025 echo "$ac_t""no" 1>&6
7026 fi
7027
7028 fi
7029
7030 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
7031 echo $ac_n "checking for remove""... $ac_c" 1>&6
7032 echo "configure:7033: checking for remove" >&5
7033 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
7034 echo $ac_n "(cached) $ac_c" 1>&6
7035 else
7036 cat > conftest.$ac_ext <<EOF
7037 #line 7038 "configure"
7038 #include "confdefs.h"
7039 /* System header to define __stub macros and hopefully few prototypes,
7040 which can conflict with char remove(); below. */
7041 #include <assert.h>
7042 /* Override any gcc2 internal prototype to avoid an error. */
7043 /* We use char because int might match the return type of a gcc2
7044 builtin and then its argument prototype would still apply. */
7045 char remove();
7046
7047 int main() {
7048
7049 /* The GNU C library defines this for functions which it implements
7050 to always fail with ENOSYS. Some functions are actually named
7051 something starting with __ and the normal name is an alias. */
7052 #if defined (__stub_remove) || defined (__stub___remove)
7053 choke me
7054 #else
7055 remove();
7056 #endif
7057
7058 ; return 0; }
7059 EOF
7060 if { (eval echo configure:7061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7061 rm -rf conftest*
7062 eval "ac_cv_func_remove=yes"
7063 else
7064 echo "configure: failed program was:" >&5
7065 cat conftest.$ac_ext >&5
7066 rm -rf conftest*
7067 eval "ac_cv_func_remove=no"
7068 fi
7069 rm -f conftest*
7070 fi
7071
7072 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
7073 echo "$ac_t""yes" 1>&6
7074 :
7075 else
7076 echo "$ac_t""no" 1>&6
7077 fi
7078
7079 if test $ac_cv_func_remove = no; then
7080 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
7081 echo "configure:7082: checking for remove in -lposix" >&5
7082 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
7083 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7084 echo $ac_n "(cached) $ac_c" 1>&6
7085 else
7086 ac_save_LIBS="$LIBS"
7087 LIBS="-lposix $LIBS"
7088 cat > conftest.$ac_ext <<EOF
7089 #line 7090 "configure"
7090 #include "confdefs.h"
7091 /* Override any gcc2 internal prototype to avoid an error. */
7092 /* We use char because int might match the return type of a gcc2
7093 builtin and then its argument prototype would still apply. */
7094 char remove();
7095
7096 int main() {
7097 remove()
7098 ; return 0; }
7099 EOF
7100 if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7101 rm -rf conftest*
7102 eval "ac_cv_lib_$ac_lib_var=yes"
7103 else
7104 echo "configure: failed program was:" >&5
7105 cat conftest.$ac_ext >&5
7106 rm -rf conftest*
7107 eval "ac_cv_lib_$ac_lib_var=no"
7108 fi
7109 rm -f conftest*
7110 LIBS="$ac_save_LIBS"
7111
7112 fi
7113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7114 echo "$ac_t""yes" 1>&6
7115 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7116 else
7117 echo "$ac_t""no" 1>&6
7118 fi
7119
7120 fi
7121
7122 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7123 echo $ac_n "checking for shmat""... $ac_c" 1>&6
7124 echo "configure:7125: checking for shmat" >&5
7125 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
7126 echo $ac_n "(cached) $ac_c" 1>&6
7127 else
7128 cat > conftest.$ac_ext <<EOF
7129 #line 7130 "configure"
7130 #include "confdefs.h"
7131 /* System header to define __stub macros and hopefully few prototypes,
7132 which can conflict with char shmat(); below. */
7133 #include <assert.h>
7134 /* Override any gcc2 internal prototype to avoid an error. */
7135 /* We use char because int might match the return type of a gcc2
7136 builtin and then its argument prototype would still apply. */
7137 char shmat();
7138
7139 int main() {
7140
7141 /* The GNU C library defines this for functions which it implements
7142 to always fail with ENOSYS. Some functions are actually named
7143 something starting with __ and the normal name is an alias. */
7144 #if defined (__stub_shmat) || defined (__stub___shmat)
7145 choke me
7146 #else
7147 shmat();
7148 #endif
7149
7150 ; return 0; }
7151 EOF
7152 if { (eval echo configure:7153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7153 rm -rf conftest*
7154 eval "ac_cv_func_shmat=yes"
7155 else
7156 echo "configure: failed program was:" >&5
7157 cat conftest.$ac_ext >&5
7158 rm -rf conftest*
7159 eval "ac_cv_func_shmat=no"
7160 fi
7161 rm -f conftest*
7162 fi
7163
7164 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
7165 echo "$ac_t""yes" 1>&6
7166 :
7167 else
7168 echo "$ac_t""no" 1>&6
7169 fi
7170
7171 if test $ac_cv_func_shmat = no; then
7172 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
7173 echo "configure:7174: checking for shmat in -lipc" >&5
7174 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
7175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7176 echo $ac_n "(cached) $ac_c" 1>&6
7177 else
7178 ac_save_LIBS="$LIBS"
7179 LIBS="-lipc $LIBS"
7180 cat > conftest.$ac_ext <<EOF
7181 #line 7182 "configure"
7182 #include "confdefs.h"
7183 /* Override any gcc2 internal prototype to avoid an error. */
7184 /* We use char because int might match the return type of a gcc2
7185 builtin and then its argument prototype would still apply. */
7186 char shmat();
7187
7188 int main() {
7189 shmat()
7190 ; return 0; }
7191 EOF
7192 if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7193 rm -rf conftest*
7194 eval "ac_cv_lib_$ac_lib_var=yes"
7195 else
7196 echo "configure: failed program was:" >&5
7197 cat conftest.$ac_ext >&5
7198 rm -rf conftest*
7199 eval "ac_cv_lib_$ac_lib_var=no"
7200 fi
7201 rm -f conftest*
7202 LIBS="$ac_save_LIBS"
7203
7204 fi
7205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7206 echo "$ac_t""yes" 1>&6
7207 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7208 else
7209 echo "$ac_t""no" 1>&6
7210 fi
7211
7212 fi
7213 fi
7214
7215 # Check for libraries that X11R6 Xt/Xaw programs need.
7216 ac_save_LDFLAGS="$LDFLAGS"
7217 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7218 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7219 # check for ICE first), but we must link in the order -lSM -lICE or
7220 # we get undefined symbols. So assume we have SM if we have ICE.
7221 # These have to be linked with before -lX11, unlike the other
7222 # libraries we check for below, so use a different variable.
7223 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
7224 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
7225 echo "configure:7226: checking for IceConnectionNumber in -lICE" >&5
7226 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
7227 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7228 echo $ac_n "(cached) $ac_c" 1>&6
7229 else
7230 ac_save_LIBS="$LIBS"
7231 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7232 cat > conftest.$ac_ext <<EOF
7233 #line 7234 "configure"
7234 #include "confdefs.h"
7235 /* Override any gcc2 internal prototype to avoid an error. */
7236 /* We use char because int might match the return type of a gcc2
7237 builtin and then its argument prototype would still apply. */
7238 char IceConnectionNumber();
7239
7240 int main() {
7241 IceConnectionNumber()
7242 ; return 0; }
7243 EOF
7244 if { (eval echo configure:7245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7245 rm -rf conftest*
7246 eval "ac_cv_lib_$ac_lib_var=yes"
7247 else
7248 echo "configure: failed program was:" >&5
7249 cat conftest.$ac_ext >&5
7250 rm -rf conftest*
7251 eval "ac_cv_lib_$ac_lib_var=no"
7252 fi
7253 rm -f conftest*
7254 LIBS="$ac_save_LIBS"
7255
7256 fi
7257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7258 echo "$ac_t""yes" 1>&6
7259 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7260 else
7261 echo "$ac_t""no" 1>&6
7262 fi
7263
7264 LDFLAGS="$ac_save_LDFLAGS"
7265
7266 fi
7267
7268
7269 # Check whether --enable-java-awt or --disable-java-awt was given.
7270 if test "${enable_java_awt+set}" = set; then
7271 enableval="$enable_java_awt"
7272 :
7273 fi
7274
7275
7276 peerlibs="`echo ${enable_java_awt} | tr ',' ' '`"
7277 use_xlib_awt=""
7278 use_gtk_awt=""
7279
7280 for peer in $peerlibs ; do
7281 case $peer in
7282 xlib)
7283 if test "$no_x" = yes; then
7284 echo "*** xlib peers requested but no X library available" 1>&2
7285 exit 1
7286 else
7287 use_xlib_awt="yes"
7288 fi
7289 ;;
7290 gtk)
7291 # Nothing, yet...
7292 ;;
7293 no)
7294 use_xlib_awt=
7295 use_gtk_awt=
7296 break
7297 ;;
7298 *)
7299 echo "*** unrecognised argument \"${peer}\" for --enable-java-awt" 1>&2
7300 exit 1
7301 esac
7302 done
7303
7304
7305
7306 if test "$use_xlib_awt" = yes; then
7307 XLIB_AWT_TRUE=
7308 XLIB_AWT_FALSE='#'
7309 else
7310 XLIB_AWT_TRUE='#'
7311 XLIB_AWT_FALSE=
7312 fi
7313
7314
7315 if test "$use_gtk_awt" = yes; then
7316 GTK_AWT_TRUE=
7317 GTK_AWT_FALSE='#'
7318 else
7319 GTK_AWT_TRUE='#'
7320 GTK_AWT_FALSE=
7321 fi
7322
7323
7324 here=`pwd`
7325
7326
7327 # We get this from the environment.
7328
7329
7330 trap '' 1 2 15
7331 cat > confcache <<\EOF
7332 # This file is a shell script that caches the results of configure
7333 # tests run on this system so they can be shared between configure
7334 # scripts and configure runs. It is not useful on other systems.
7335 # If it contains results you don't want to keep, you may remove or edit it.
7336 #
7337 # By default, configure uses ./config.cache as the cache file,
7338 # creating it if it does not exist already. You can give configure
7339 # the --cache-file=FILE option to use a different cache file; that is
7340 # what configure does when it calls configure scripts in
7341 # subdirectories, so they share the cache.
7342 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7343 # config.status only pays attention to the cache file if you give it the
7344 # --recheck option to rerun configure.
7345 #
7346 EOF
7347 # The following way of writing the cache mishandles newlines in values,
7348 # but we know of no workaround that is simple, portable, and efficient.
7349 # So, don't put newlines in cache variables' values.
7350 # Ultrix sh set writes to stderr and can't be redirected directly,
7351 # and sets the high bit in the cache file unless we assign to the vars.
7352 (set) 2>&1 |
7353 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7354 *ac_space=\ *)
7355 # `set' does not quote correctly, so add quotes (double-quote substitution
7356 # turns \\\\ into \\, and sed turns \\ into \).
7357 sed -n \
7358 -e "s/'/'\\\\''/g" \
7359 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7360 ;;
7361 *)
7362 # `set' quotes correctly as required by POSIX, so do not add quotes.
7363 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7364 ;;
7365 esac >> confcache
7366 if cmp -s $cache_file confcache; then
7367 :
7368 else
7369 if test -w $cache_file; then
7370 echo "updating cache $cache_file"
7371 cat confcache > $cache_file
7372 else
7373 echo "not updating unwritable cache $cache_file"
7374 fi
7375 fi
7376 rm -f confcache
7377
7378 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7379
7380 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7381 # Let make expand exec_prefix.
7382 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7383
7384 # Any assignment to VPATH causes Sun make to only execute
7385 # the first set of double-colon rules, so remove it if not needed.
7386 # If there is a colon in the path, we need to keep it.
7387 if test "x$srcdir" = x.; then
7388 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7389 fi
7390
7391 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7392
7393 DEFS=-DHAVE_CONFIG_H
7394
7395 # Without the "./", some shells look in PATH for config.status.
7396 : ${CONFIG_STATUS=./config.status}
7397
7398 echo creating $CONFIG_STATUS
7399 rm -f $CONFIG_STATUS
7400 cat > $CONFIG_STATUS <<EOF
7401 #! /bin/sh
7402 # Generated automatically by configure.
7403 # Run this file to recreate the current configuration.
7404 # This directory was configured as follows,
7405 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7406 #
7407 # $0 $ac_configure_args
7408 #
7409 # Compiler output produced by configure, useful for debugging
7410 # configure, is in ./config.log if it exists.
7411
7412 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7413 for ac_option
7414 do
7415 case "\$ac_option" in
7416 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7417 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7418 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7419 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7420 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7421 exit 0 ;;
7422 -help | --help | --hel | --he | --h)
7423 echo "\$ac_cs_usage"; exit 0 ;;
7424 *) echo "\$ac_cs_usage"; exit 1 ;;
7425 esac
7426 done
7427
7428 ac_given_srcdir=$srcdir
7429 ac_given_INSTALL="$INSTALL"
7430
7431 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
7432 EOF
7433 cat >> $CONFIG_STATUS <<EOF
7434
7435 # Protect against being on the right side of a sed subst in config.status.
7436 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7437 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7438 $ac_vpsub
7439 $extrasub
7440 s%@SHELL@%$SHELL%g
7441 s%@CFLAGS@%$CFLAGS%g
7442 s%@CPPFLAGS@%$CPPFLAGS%g
7443 s%@CXXFLAGS@%$CXXFLAGS%g
7444 s%@FFLAGS@%$FFLAGS%g
7445 s%@DEFS@%$DEFS%g
7446 s%@LDFLAGS@%$LDFLAGS%g
7447 s%@LIBS@%$LIBS%g
7448 s%@exec_prefix@%$exec_prefix%g
7449 s%@prefix@%$prefix%g
7450 s%@program_transform_name@%$program_transform_name%g
7451 s%@bindir@%$bindir%g
7452 s%@sbindir@%$sbindir%g
7453 s%@libexecdir@%$libexecdir%g
7454 s%@datadir@%$datadir%g
7455 s%@sysconfdir@%$sysconfdir%g
7456 s%@sharedstatedir@%$sharedstatedir%g
7457 s%@localstatedir@%$localstatedir%g
7458 s%@libdir@%$libdir%g
7459 s%@includedir@%$includedir%g
7460 s%@oldincludedir@%$oldincludedir%g
7461 s%@infodir@%$infodir%g
7462 s%@mandir@%$mandir%g
7463 s%@LN_S@%$LN_S%g
7464 s%@libgcj_basedir@%$libgcj_basedir%g
7465 s%@mkinstalldirs@%$mkinstalldirs%g
7466 s%@host@%$host%g
7467 s%@host_alias@%$host_alias%g
7468 s%@host_cpu@%$host_cpu%g
7469 s%@host_vendor@%$host_vendor%g
7470 s%@host_os@%$host_os%g
7471 s%@target@%$target%g
7472 s%@target_alias@%$target_alias%g
7473 s%@target_cpu@%$target_cpu%g
7474 s%@target_vendor@%$target_vendor%g
7475 s%@target_os@%$target_os%g
7476 s%@build@%$build%g
7477 s%@build_alias@%$build_alias%g
7478 s%@build_cpu@%$build_cpu%g
7479 s%@build_vendor@%$build_vendor%g
7480 s%@build_os@%$build_os%g
7481 s%@CC@%$CC%g
7482 s%@glibjava_CXX@%$glibjava_CXX%g
7483 s%@CXX@%$CXX%g
7484 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7485 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7486 s%@INSTALL_DATA@%$INSTALL_DATA%g
7487 s%@PACKAGE@%$PACKAGE%g
7488 s%@VERSION@%$VERSION%g
7489 s%@ACLOCAL@%$ACLOCAL%g
7490 s%@AUTOCONF@%$AUTOCONF%g
7491 s%@AUTOMAKE@%$AUTOMAKE%g
7492 s%@AUTOHEADER@%$AUTOHEADER%g
7493 s%@MAKEINFO@%$MAKEINFO%g
7494 s%@SET_MAKE@%$SET_MAKE%g
7495 s%@AS@%$AS%g
7496 s%@AR@%$AR%g
7497 s%@RANLIB@%$RANLIB%g
7498 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
7499 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
7500 s%@MAINT@%$MAINT%g
7501 s%@EXEEXT@%$EXEEXT%g
7502 s%@LIBGCJ_CFLAGS@%$LIBGCJ_CFLAGS%g
7503 s%@LIBGCJ_CXXFLAGS@%$LIBGCJ_CXXFLAGS%g
7504 s%@LIBGCJ_JAVAFLAGS@%$LIBGCJ_JAVAFLAGS%g
7505 s%@INCLTDL@%$INCLTDL%g
7506 s%@LIBLTDL@%$LIBLTDL%g
7507 s%@DIRLTDL@%$DIRLTDL%g
7508 s%@OBJEXT@%$OBJEXT%g
7509 s%@STRIP@%$STRIP%g
7510 s%@LIBTOOL@%$LIBTOOL%g
7511 s%@CXXCPP@%$CXXCPP%g
7512 s%@subdirs@%$subdirs%g
7513 s%@COMPPATH@%$COMPPATH%g
7514 s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
7515 s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
7516 s%@LIBGCJDEBUG@%$LIBGCJDEBUG%g
7517 s%@LIBFFI@%$LIBFFI%g
7518 s%@LIBFFIINCS@%$LIBFFIINCS%g
7519 s%@PLATFORMOBJS@%$PLATFORMOBJS%g
7520 s%@CPP@%$CPP%g
7521 s%@SYSTEMSPEC@%$SYSTEMSPEC%g
7522 s%@LIBGCJTESTSPEC@%$LIBGCJTESTSPEC%g
7523 s%@ZLIBSPEC@%$ZLIBSPEC%g
7524 s%@ZLIBTESTSPEC@%$ZLIBTESTSPEC%g
7525 s%@GCLIBS@%$GCLIBS%g
7526 s%@GCINCS@%$GCINCS%g
7527 s%@GCDEPS@%$GCDEPS%g
7528 s%@GCOBJS@%$GCOBJS%g
7529 s%@GCSPEC@%$GCSPEC%g
7530 s%@JC1GCSPEC@%$JC1GCSPEC%g
7531 s%@GCTESTSPEC@%$GCTESTSPEC%g
7532 s%@THREADLIBS@%$THREADLIBS%g
7533 s%@THREADINCS@%$THREADINCS%g
7534 s%@THREADDEPS@%$THREADDEPS%g
7535 s%@THREADOBJS@%$THREADOBJS%g
7536 s%@THREADSPEC@%$THREADSPEC%g
7537 s%@THREADLDFLAGS@%$THREADLDFLAGS%g
7538 s%@HASH_SYNC_SPEC@%$HASH_SYNC_SPEC%g
7539 s%@USING_GCC_TRUE@%$USING_GCC_TRUE%g
7540 s%@USING_GCC_FALSE@%$USING_GCC_FALSE%g
7541 s%@tool_include_dir@%$tool_include_dir%g
7542 s%@gcc_version@%$gcc_version%g
7543 s%@LIBICONV@%$LIBICONV%g
7544 s%@GCJ@%$GCJ%g
7545 s%@GCJFLAGS@%$GCJFLAGS%g
7546 s%@ZLIBS@%$ZLIBS%g
7547 s%@SYS_ZLIBS@%$SYS_ZLIBS%g
7548 s%@ZINCS@%$ZINCS%g
7549 s%@DIVIDESPEC@%$DIVIDESPEC%g
7550 s%@CHECKREFSPEC@%$CHECKREFSPEC%g
7551 s%@EXCEPTIONSPEC@%$EXCEPTIONSPEC%g
7552 s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
7553 s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
7554 s%@NULL_TARGET_TRUE@%$NULL_TARGET_TRUE%g
7555 s%@NULL_TARGET_FALSE@%$NULL_TARGET_FALSE%g
7556 s%@NATIVE_TRUE@%$NATIVE_TRUE%g
7557 s%@NATIVE_FALSE@%$NATIVE_FALSE%g
7558 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
7559 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
7560 s%@NEEDS_DATA_START_TRUE@%$NEEDS_DATA_START_TRUE%g
7561 s%@NEEDS_DATA_START_FALSE@%$NEEDS_DATA_START_FALSE%g
7562 s%@GCC_UNWIND_INCLUDE@%$GCC_UNWIND_INCLUDE%g
7563 s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
7564 s%@GCJVERSION@%$GCJVERSION%g
7565 s%@ALLOCA@%$ALLOCA%g
7566 s%@PERL@%$PERL%g
7567 s%@SYSDEP_SOURCES@%$SYSDEP_SOURCES%g
7568 s%@X_CFLAGS@%$X_CFLAGS%g
7569 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7570 s%@X_LIBS@%$X_LIBS%g
7571 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7572 s%@XLIB_AWT_TRUE@%$XLIB_AWT_TRUE%g
7573 s%@XLIB_AWT_FALSE@%$XLIB_AWT_FALSE%g
7574 s%@GTK_AWT_TRUE@%$GTK_AWT_TRUE%g
7575 s%@GTK_AWT_FALSE@%$GTK_AWT_FALSE%g
7576 s%@here@%$here%g
7577
7578 CEOF
7579 EOF
7580
7581 cat >> $CONFIG_STATUS <<\EOF
7582
7583 # Split the substitutions into bite-sized pieces for seds with
7584 # small command number limits, like on Digital OSF/1 and HP-UX.
7585 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7586 ac_file=1 # Number of current file.
7587 ac_beg=1 # First line for current file.
7588 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7589 ac_more_lines=:
7590 ac_sed_cmds=""
7591 while $ac_more_lines; do
7592 if test $ac_beg -gt 1; then
7593 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7594 else
7595 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7596 fi
7597 if test ! -s conftest.s$ac_file; then
7598 ac_more_lines=false
7599 rm -f conftest.s$ac_file
7600 else
7601 if test -z "$ac_sed_cmds"; then
7602 ac_sed_cmds="sed -f conftest.s$ac_file"
7603 else
7604 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7605 fi
7606 ac_file=`expr $ac_file + 1`
7607 ac_beg=$ac_end
7608 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7609 fi
7610 done
7611 if test -z "$ac_sed_cmds"; then
7612 ac_sed_cmds=cat
7613 fi
7614 EOF
7615
7616 cat >> $CONFIG_STATUS <<EOF
7617
7618 CONFIG_FILES=\${CONFIG_FILES-"Makefile libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"}
7619 EOF
7620 cat >> $CONFIG_STATUS <<\EOF
7621 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7622 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7623 case "$ac_file" in
7624 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7625 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7626 *) ac_file_in="${ac_file}.in" ;;
7627 esac
7628
7629 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7630
7631 # Remove last slash and all that follows it. Not all systems have dirname.
7632 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7633 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7634 # The file is in a subdirectory.
7635 test ! -d "$ac_dir" && mkdir "$ac_dir"
7636 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7637 # A "../" for each directory in $ac_dir_suffix.
7638 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7639 else
7640 ac_dir_suffix= ac_dots=
7641 fi
7642
7643 case "$ac_given_srcdir" in
7644 .) srcdir=.
7645 if test -z "$ac_dots"; then top_srcdir=.
7646 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7647 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7648 *) # Relative path.
7649 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7650 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7651 esac
7652
7653 case "$ac_given_INSTALL" in
7654 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7655 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7656 esac
7657
7658 echo creating "$ac_file"
7659 rm -f "$ac_file"
7660 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7661 case "$ac_file" in
7662 *Makefile*) ac_comsub="1i\\
7663 # $configure_input" ;;
7664 *) ac_comsub= ;;
7665 esac
7666
7667 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7668 sed -e "$ac_comsub
7669 s%@configure_input@%$configure_input%g
7670 s%@srcdir@%$srcdir%g
7671 s%@top_srcdir@%$top_srcdir%g
7672 s%@INSTALL@%$INSTALL%g
7673 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7674 fi; done
7675 rm -f conftest.s*
7676
7677 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7678 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7679 #
7680 # ac_d sets the value in "#define NAME VALUE" lines.
7681 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7682 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7683 ac_dC='\3'
7684 ac_dD='%g'
7685 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7686 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7687 ac_uB='\([ ]\)%\1#\2define\3'
7688 ac_uC=' '
7689 ac_uD='\4%g'
7690 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7691 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7692 ac_eB='$%\1#\2define\3'
7693 ac_eC=' '
7694 ac_eD='%g'
7695
7696 if test "${CONFIG_HEADERS+set}" != set; then
7697 EOF
7698 cat >> $CONFIG_STATUS <<EOF
7699 CONFIG_HEADERS="include/config.h gcj/libgcj-config.h"
7700 EOF
7701 cat >> $CONFIG_STATUS <<\EOF
7702 fi
7703 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7704 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7705 case "$ac_file" in
7706 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7707 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7708 *) ac_file_in="${ac_file}.in" ;;
7709 esac
7710
7711 echo creating $ac_file
7712
7713 rm -f conftest.frag conftest.in conftest.out
7714 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7715 cat $ac_file_inputs > conftest.in
7716
7717 EOF
7718
7719 # Transform confdefs.h into a sed script conftest.vals that substitutes
7720 # the proper values into config.h.in to produce config.h. And first:
7721 # Protect against being on the right side of a sed subst in config.status.
7722 # Protect against being in an unquoted here document in config.status.
7723 rm -f conftest.vals
7724 cat > conftest.hdr <<\EOF
7725 s/[\\&%]/\\&/g
7726 s%[\\$`]%\\&%g
7727 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7728 s%ac_d%ac_u%gp
7729 s%ac_u%ac_e%gp
7730 EOF
7731 sed -n -f conftest.hdr confdefs.h > conftest.vals
7732 rm -f conftest.hdr
7733
7734 # This sed command replaces #undef with comments. This is necessary, for
7735 # example, in the case of _POSIX_SOURCE, which is predefined and required
7736 # on some systems where configure will not decide to define it.
7737 cat >> conftest.vals <<\EOF
7738 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7739 EOF
7740
7741 # Break up conftest.vals because some shells have a limit on
7742 # the size of here documents, and old seds have small limits too.
7743
7744 rm -f conftest.tail
7745 while :
7746 do
7747 ac_lines=`grep -c . conftest.vals`
7748 # grep -c gives empty output for an empty file on some AIX systems.
7749 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7750 # Write a limited-size here document to conftest.frag.
7751 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7752 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7753 echo 'CEOF
7754 sed -f conftest.frag conftest.in > conftest.out
7755 rm -f conftest.in
7756 mv conftest.out conftest.in
7757 ' >> $CONFIG_STATUS
7758 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7759 rm -f conftest.vals
7760 mv conftest.tail conftest.vals
7761 done
7762 rm -f conftest.vals
7763
7764 cat >> $CONFIG_STATUS <<\EOF
7765 rm -f conftest.frag conftest.h
7766 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7767 cat conftest.in >> conftest.h
7768 rm -f conftest.in
7769 if cmp -s $ac_file conftest.h 2>/dev/null; then
7770 echo "$ac_file is unchanged"
7771 rm -f conftest.h
7772 else
7773 # Remove last slash and all that follows it. Not all systems have dirname.
7774 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7775 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7776 # The file is in a subdirectory.
7777 test ! -d "$ac_dir" && mkdir "$ac_dir"
7778 fi
7779 rm -f $ac_file
7780 mv conftest.h $ac_file
7781 fi
7782 fi; done
7783
7784 EOF
7785
7786 cat >> $CONFIG_STATUS <<EOF
7787 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"
7788 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"
7789 EOF
7790
7791 cat >> $CONFIG_STATUS <<\EOF
7792 srcdir=$ac_given_srcdir
7793 while test -n "$ac_sources"; do
7794 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7795 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7796
7797 echo "linking $srcdir/$ac_source to $ac_dest"
7798
7799 if test ! -r $srcdir/$ac_source; then
7800 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7801 fi
7802 rm -f $ac_dest
7803
7804 # Make relative symlinks.
7805 # Remove last slash and all that follows it. Not all systems have dirname.
7806 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7807 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7808 # The dest file is in a subdirectory.
7809 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7810 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7811 # A "../" for each directory in $ac_dest_dir_suffix.
7812 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7813 else
7814 ac_dest_dir_suffix= ac_dots=
7815 fi
7816
7817 case "$srcdir" in
7818 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7819 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7820 esac
7821
7822 # Make a symlink if possible; otherwise try a hard link.
7823 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7824 ln $srcdir/$ac_source $ac_dest; then :
7825 else
7826 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7827 fi
7828 done
7829 EOF
7830 cat >> $CONFIG_STATUS <<EOF
7831
7832 srcdir=${srcdir}
7833 host=${host}
7834 target=${target}
7835 with_multisubdir=${with_multisubdir}
7836 ac_configure_args="${multilib_arg} ${ac_configure_args}"
7837 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
7838 libgcj_basedir=${libgcj_basedir}
7839 CC="${CC}"
7840 CXX="${CXX}"
7841
7842 EOF
7843 cat >> $CONFIG_STATUS <<\EOF
7844 am_indx=1
7845 for am_file in include/config.h gcj/libgcj-config.h; do
7846 case " $CONFIG_HEADERS " in
7847 *" $am_file "*)
7848 echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
7849 ;;
7850 esac
7851 am_indx=`expr "$am_indx" + 1`
7852 done
7853 # Only add multilib support code if we just rebuilt top-level Makefile.
7854 case " $CONFIG_FILES " in
7855 *" Makefile "*)
7856 ac_file=Makefile . ${libgcj_basedir}/../config-ml.in
7857 ;;
7858 esac
7859
7860 # Make subdirectories and `.d' files. Look in both srcdir and
7861 # builddir for the .java files.
7862 h=`pwd`
7863 : > deps.mk
7864 ( (cd $srcdir && find . \( -name '*.java' -o -name '*.cc' \) -print) ;
7865 find . \( -name '*.java' -o -name '*.cc' \) -print) | \
7866 fgrep -v testsuite | \
7867 sed -e 's/\.java/.d/'\;'s/\.cc/.d/' | \
7868 while read f; do
7869 echo "include $f" >> deps.mk
7870 test -f $f || {
7871
7872 d=`echo $f | sed -e 's,/[^/]*$,,'`
7873
7874 if test ! -d $d; then
7875 $libgcj_basedir/../mkinstalldirs $d
7876 fi;
7877 echo > $f
7878 }
7879 done
7880
7881 exit 0
7882 EOF
7883 chmod +x $CONFIG_STATUS
7884 rm -fr confdefs* $ac_clean_files
7885 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7886
7887 if test "$no_recursion" != yes; then
7888
7889 # Remove --cache-file and --srcdir arguments so they do not pile up.
7890 ac_sub_configure_args=
7891 ac_prev=
7892 for ac_arg in $ac_configure_args; do
7893 if test -n "$ac_prev"; then
7894 ac_prev=
7895 continue
7896 fi
7897 case "$ac_arg" in
7898 -cache-file | --cache-file | --cache-fil | --cache-fi \
7899 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7900 ac_prev=cache_file ;;
7901 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7902 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7903 ;;
7904 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7905 ac_prev=srcdir ;;
7906 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7907 ;;
7908 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7909 esac
7910 done
7911
7912 for ac_config_dir in $DIRLTDL; do
7913
7914 # Do not complain, so a configure script can configure whichever
7915 # parts of a large source tree are present.
7916 if test ! -d $srcdir/$ac_config_dir; then
7917 continue
7918 fi
7919
7920 echo configuring in $ac_config_dir
7921
7922 case "$srcdir" in
7923 .) ;;
7924 *)
7925 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7926 else
7927 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7928 fi
7929 ;;
7930 esac
7931
7932 ac_popdir=`pwd`
7933 cd $ac_config_dir
7934
7935 # A "../" for each directory in /$ac_config_dir.
7936 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7937
7938 case "$srcdir" in
7939 .) # No --srcdir option. We are building in place.
7940 ac_sub_srcdir=$srcdir ;;
7941 /*) # Absolute path.
7942 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7943 *) # Relative path.
7944 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7945 esac
7946
7947 # Check for guested configure; otherwise get Cygnus style configure.
7948 if test -f $ac_sub_srcdir/configure; then
7949 ac_sub_configure=$ac_sub_srcdir/configure
7950 elif test -f $ac_sub_srcdir/configure.in; then
7951 ac_sub_configure=$ac_configure
7952 else
7953 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7954 ac_sub_configure=
7955 fi
7956
7957 # The recursion is here.
7958 if test -n "$ac_sub_configure"; then
7959
7960 # Make the cache file name correct relative to the subdirectory.
7961 case "$cache_file" in
7962 /*) ac_sub_cache_file=$cache_file ;;
7963 *) # Relative path.
7964 ac_sub_cache_file="$ac_dots$cache_file" ;;
7965 esac
7966 case "$ac_given_INSTALL" in
7967 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7968 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7969 esac
7970
7971 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7972 # The eval makes quoting arguments work.
7973 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7974 then :
7975 else
7976 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7977 fi
7978 fi
7979
7980 cd $ac_popdir
7981 done
7982 fi
7983