OSDN Git Service

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