OSDN Git Service

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