OSDN Git Service

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