OSDN Git Service

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