OSDN Git Service

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