OSDN Git Service

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