OSDN Git Service

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