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