OSDN Git Service

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