OSDN Git Service

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