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