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