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