OSDN Git Service

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