OSDN Git Service

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