OSDN Git Service

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