OSDN Git Service

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