OSDN Git Service

* aclocal.m4, configure: Rebuilt for new libtool.
[pf3gnuchains/gcc-fork.git] / zlib / 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   --enable-maintainer-mode enable make rules and dependencies not useful
16                           (and sometimes confusing) to the casual installer"
17 ac_help="$ac_help
18   --with-target-subdir=SUBDIR      Configuring in a subdirectory"
19 ac_help="$ac_help
20   --with-cross-host=HOST           Configuring with a cross compiler"
21 ac_help="$ac_help
22   --enable-multilib         build many library versions (default)"
23 ac_help="$ac_help
24   --with-system-zlib               Use installed libz"
25 ac_help="$ac_help
26   --enable-shared[=PKGS]  build shared libraries [default=yes]"
27 ac_help="$ac_help
28   --enable-static[=PKGS]  build static libraries [default=yes]"
29 ac_help="$ac_help
30   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
31 ac_help="$ac_help
32   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
33 ac_help="$ac_help
34   --disable-libtool-lock  avoid locking (might break parallel builds)"
35
36 # Initialize some variables set by options.
37 # The variables have the same names as the options, with
38 # dashes changed to underlines.
39 build=NONE
40 cache_file=./config.cache
41 exec_prefix=NONE
42 host=NONE
43 no_create=
44 nonopt=NONE
45 no_recursion=
46 prefix=NONE
47 program_prefix=NONE
48 program_suffix=NONE
49 program_transform_name=s,x,x,
50 silent=
51 site=
52 srcdir=
53 target=NONE
54 verbose=
55 x_includes=NONE
56 x_libraries=NONE
57 bindir='${exec_prefix}/bin'
58 sbindir='${exec_prefix}/sbin'
59 libexecdir='${exec_prefix}/libexec'
60 datadir='${prefix}/share'
61 sysconfdir='${prefix}/etc'
62 sharedstatedir='${prefix}/com'
63 localstatedir='${prefix}/var'
64 libdir='${exec_prefix}/lib'
65 includedir='${prefix}/include'
66 oldincludedir='/usr/include'
67 infodir='${prefix}/info'
68 mandir='${prefix}/man'
69
70 # Initialize some other variables.
71 subdirs=
72 MFLAGS= MAKEFLAGS=
73 SHELL=${CONFIG_SHELL-/bin/sh}
74 # Maximum number of lines to put in a shell here document.
75 ac_max_here_lines=12
76
77 ac_prev=
78 for ac_option
79 do
80
81   # If the previous option needs an argument, assign it.
82   if test -n "$ac_prev"; then
83     eval "$ac_prev=\$ac_option"
84     ac_prev=
85     continue
86   fi
87
88   case "$ac_option" in
89   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
90   *) ac_optarg= ;;
91   esac
92
93   # Accept the important Cygnus configure options, so we can diagnose typos.
94
95   case "$ac_option" in
96
97   -bindir | --bindir | --bindi | --bind | --bin | --bi)
98     ac_prev=bindir ;;
99   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
100     bindir="$ac_optarg" ;;
101
102   -build | --build | --buil | --bui | --bu)
103     ac_prev=build ;;
104   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
105     build="$ac_optarg" ;;
106
107   -cache-file | --cache-file | --cache-fil | --cache-fi \
108   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
109     ac_prev=cache_file ;;
110   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
111   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
112     cache_file="$ac_optarg" ;;
113
114   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
115     ac_prev=datadir ;;
116   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
117   | --da=*)
118     datadir="$ac_optarg" ;;
119
120   -disable-* | --disable-*)
121     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
122     # Reject names that are not valid shell variable names.
123     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
124       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125     fi
126     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127     eval "enable_${ac_feature}=no" ;;
128
129   -enable-* | --enable-*)
130     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
131     # Reject names that are not valid shell variable names.
132     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
133       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
134     fi
135     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136     case "$ac_option" in
137       *=*) ;;
138       *) ac_optarg=yes ;;
139     esac
140     eval "enable_${ac_feature}='$ac_optarg'" ;;
141
142   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
143   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
144   | --exec | --exe | --ex)
145     ac_prev=exec_prefix ;;
146   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
147   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
148   | --exec=* | --exe=* | --ex=*)
149     exec_prefix="$ac_optarg" ;;
150
151   -gas | --gas | --ga | --g)
152     # Obsolete; use --with-gas.
153     with_gas=yes ;;
154
155   -help | --help | --hel | --he)
156     # Omit some internal or obsolete options to make the list less imposing.
157     # This message is too long to be a string in the A/UX 3.1 sh.
158     cat << EOF
159 Usage: configure [options] [host]
160 Options: [defaults in brackets after descriptions]
161 Configuration:
162   --cache-file=FILE       cache test results in FILE
163   --help                  print this message
164   --no-create             do not create output files
165   --quiet, --silent       do not print \`checking...' messages
166   --version               print the version of autoconf that created configure
167 Directory and file names:
168   --prefix=PREFIX         install architecture-independent files in PREFIX
169                           [$ac_default_prefix]
170   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
171                           [same as prefix]
172   --bindir=DIR            user executables in DIR [EPREFIX/bin]
173   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
174   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
175   --datadir=DIR           read-only architecture-independent data in DIR
176                           [PREFIX/share]
177   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
178   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
179                           [PREFIX/com]
180   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
181   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
182   --includedir=DIR        C header files in DIR [PREFIX/include]
183   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
184   --infodir=DIR           info documentation in DIR [PREFIX/info]
185   --mandir=DIR            man documentation in DIR [PREFIX/man]
186   --srcdir=DIR            find the sources in DIR [configure dir or ..]
187   --program-prefix=PREFIX prepend PREFIX to installed program names
188   --program-suffix=SUFFIX append SUFFIX to installed program names
189   --program-transform-name=PROGRAM
190                           run sed PROGRAM on installed program names
191 EOF
192     cat << EOF
193 Host type:
194   --build=BUILD           configure for building on BUILD [BUILD=HOST]
195   --host=HOST             configure for HOST [guessed]
196   --target=TARGET         configure for TARGET [TARGET=HOST]
197 Features and packages:
198   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
199   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
200   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
201   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
202   --x-includes=DIR        X include files are in DIR
203   --x-libraries=DIR       X library files are in DIR
204 EOF
205     if test -n "$ac_help"; then
206       echo "--enable and --with options recognized:$ac_help"
207     fi
208     exit 0 ;;
209
210   -host | --host | --hos | --ho)
211     ac_prev=host ;;
212   -host=* | --host=* | --hos=* | --ho=*)
213     host="$ac_optarg" ;;
214
215   -includedir | --includedir | --includedi | --included | --include \
216   | --includ | --inclu | --incl | --inc)
217     ac_prev=includedir ;;
218   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
219   | --includ=* | --inclu=* | --incl=* | --inc=*)
220     includedir="$ac_optarg" ;;
221
222   -infodir | --infodir | --infodi | --infod | --info | --inf)
223     ac_prev=infodir ;;
224   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
225     infodir="$ac_optarg" ;;
226
227   -libdir | --libdir | --libdi | --libd)
228     ac_prev=libdir ;;
229   -libdir=* | --libdir=* | --libdi=* | --libd=*)
230     libdir="$ac_optarg" ;;
231
232   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
233   | --libexe | --libex | --libe)
234     ac_prev=libexecdir ;;
235   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
236   | --libexe=* | --libex=* | --libe=*)
237     libexecdir="$ac_optarg" ;;
238
239   -localstatedir | --localstatedir | --localstatedi | --localstated \
240   | --localstate | --localstat | --localsta | --localst \
241   | --locals | --local | --loca | --loc | --lo)
242     ac_prev=localstatedir ;;
243   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
244   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
245   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
246     localstatedir="$ac_optarg" ;;
247
248   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
249     ac_prev=mandir ;;
250   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
251     mandir="$ac_optarg" ;;
252
253   -nfp | --nfp | --nf)
254     # Obsolete; use --without-fp.
255     with_fp=no ;;
256
257   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
258   | --no-cr | --no-c)
259     no_create=yes ;;
260
261   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
262   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
263     no_recursion=yes ;;
264
265   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
266   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
267   | --oldin | --oldi | --old | --ol | --o)
268     ac_prev=oldincludedir ;;
269   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
270   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
271   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
272     oldincludedir="$ac_optarg" ;;
273
274   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
275     ac_prev=prefix ;;
276   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
277     prefix="$ac_optarg" ;;
278
279   -program-prefix | --program-prefix | --program-prefi | --program-pref \
280   | --program-pre | --program-pr | --program-p)
281     ac_prev=program_prefix ;;
282   -program-prefix=* | --program-prefix=* | --program-prefi=* \
283   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
284     program_prefix="$ac_optarg" ;;
285
286   -program-suffix | --program-suffix | --program-suffi | --program-suff \
287   | --program-suf | --program-su | --program-s)
288     ac_prev=program_suffix ;;
289   -program-suffix=* | --program-suffix=* | --program-suffi=* \
290   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
291     program_suffix="$ac_optarg" ;;
292
293   -program-transform-name | --program-transform-name \
294   | --program-transform-nam | --program-transform-na \
295   | --program-transform-n | --program-transform- \
296   | --program-transform | --program-transfor \
297   | --program-transfo | --program-transf \
298   | --program-trans | --program-tran \
299   | --progr-tra | --program-tr | --program-t)
300     ac_prev=program_transform_name ;;
301   -program-transform-name=* | --program-transform-name=* \
302   | --program-transform-nam=* | --program-transform-na=* \
303   | --program-transform-n=* | --program-transform-=* \
304   | --program-transform=* | --program-transfor=* \
305   | --program-transfo=* | --program-transf=* \
306   | --program-trans=* | --program-tran=* \
307   | --progr-tra=* | --program-tr=* | --program-t=*)
308     program_transform_name="$ac_optarg" ;;
309
310   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
311   | -silent | --silent | --silen | --sile | --sil)
312     silent=yes ;;
313
314   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
315     ac_prev=sbindir ;;
316   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
317   | --sbi=* | --sb=*)
318     sbindir="$ac_optarg" ;;
319
320   -sharedstatedir | --sharedstatedir | --sharedstatedi \
321   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
322   | --sharedst | --shareds | --shared | --share | --shar \
323   | --sha | --sh)
324     ac_prev=sharedstatedir ;;
325   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
326   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
327   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
328   | --sha=* | --sh=*)
329     sharedstatedir="$ac_optarg" ;;
330
331   -site | --site | --sit)
332     ac_prev=site ;;
333   -site=* | --site=* | --sit=*)
334     site="$ac_optarg" ;;
335
336   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
337     ac_prev=srcdir ;;
338   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
339     srcdir="$ac_optarg" ;;
340
341   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
342   | --syscon | --sysco | --sysc | --sys | --sy)
343     ac_prev=sysconfdir ;;
344   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
345   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
346     sysconfdir="$ac_optarg" ;;
347
348   -target | --target | --targe | --targ | --tar | --ta | --t)
349     ac_prev=target ;;
350   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
351     target="$ac_optarg" ;;
352
353   -v | -verbose | --verbose | --verbos | --verbo | --verb)
354     verbose=yes ;;
355
356   -version | --version | --versio | --versi | --vers)
357     echo "configure generated by autoconf version 2.13"
358     exit 0 ;;
359
360   -with-* | --with-*)
361     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
362     # Reject names that are not valid shell variable names.
363     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
364       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
365     fi
366     ac_package=`echo $ac_package| sed 's/-/_/g'`
367     case "$ac_option" in
368       *=*) ;;
369       *) ac_optarg=yes ;;
370     esac
371     eval "with_${ac_package}='$ac_optarg'" ;;
372
373   -without-* | --without-*)
374     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
375     # Reject names that are not valid shell variable names.
376     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
377       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
378     fi
379     ac_package=`echo $ac_package| sed 's/-/_/g'`
380     eval "with_${ac_package}=no" ;;
381
382   --x)
383     # Obsolete; use --with-x.
384     with_x=yes ;;
385
386   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
387   | --x-incl | --x-inc | --x-in | --x-i)
388     ac_prev=x_includes ;;
389   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
390   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
391     x_includes="$ac_optarg" ;;
392
393   -x-libraries | --x-libraries | --x-librarie | --x-librari \
394   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
395     ac_prev=x_libraries ;;
396   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
397   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
398     x_libraries="$ac_optarg" ;;
399
400   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
401     ;;
402
403   *)
404     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
405       echo "configure: warning: $ac_option: invalid host type" 1>&2
406     fi
407     if test "x$nonopt" != xNONE; then
408       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
409     fi
410     nonopt="$ac_option"
411     ;;
412
413   esac
414 done
415
416 if test -n "$ac_prev"; then
417   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
418 fi
419
420 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
421
422 # File descriptor usage:
423 # 0 standard input
424 # 1 file creation
425 # 2 errors and warnings
426 # 3 some systems may open it to /dev/tty
427 # 4 used on the Kubota Titan
428 # 6 checking for... messages and results
429 # 5 compiler messages saved in config.log
430 if test "$silent" = yes; then
431   exec 6>/dev/null
432 else
433   exec 6>&1
434 fi
435 exec 5>./config.log
436
437 echo "\
438 This file contains any messages produced by compilers while
439 running configure, to aid debugging if configure makes a mistake.
440 " 1>&5
441
442 # Strip out --no-create and --no-recursion so they do not pile up.
443 # Also quote any args containing shell metacharacters.
444 ac_configure_args=
445 for ac_arg
446 do
447   case "$ac_arg" in
448   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
449   | --no-cr | --no-c) ;;
450   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
451   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
452   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
453   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
454   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
455   esac
456 done
457
458 # NLS nuisances.
459 # Only set these to C if already set.  These must not be set unconditionally
460 # because not all systems understand e.g. LANG=C (notably SCO).
461 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
462 # Non-C LC_CTYPE values break the ctype check.
463 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
464 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
465 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
466 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
467
468 # confdefs.h avoids OS command line length limits that DEFS can exceed.
469 rm -rf conftest* confdefs.h
470 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
471 echo > confdefs.h
472
473 # A filename unique to this package, relative to the directory that
474 # configure is in, which we can look for to find out if srcdir is correct.
475 ac_unique_file=zlib.h
476
477 # Find the source files, if location was not specified.
478 if test -z "$srcdir"; then
479   ac_srcdir_defaulted=yes
480   # Try the directory containing this script, then its parent.
481   ac_prog=$0
482   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
483   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
484   srcdir=$ac_confdir
485   if test ! -r $srcdir/$ac_unique_file; then
486     srcdir=..
487   fi
488 else
489   ac_srcdir_defaulted=no
490 fi
491 if test ! -r $srcdir/$ac_unique_file; then
492   if test "$ac_srcdir_defaulted" = yes; then
493     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
494   else
495     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
496   fi
497 fi
498 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
499
500 # Prefer explicitly selected file to automatically selected ones.
501 if test -z "$CONFIG_SITE"; then
502   if test "x$prefix" != xNONE; then
503     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
504   else
505     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
506   fi
507 fi
508 for ac_site_file in $CONFIG_SITE; do
509   if test -r "$ac_site_file"; then
510     echo "loading site script $ac_site_file"
511     . "$ac_site_file"
512   fi
513 done
514
515 if test -r "$cache_file"; then
516   echo "loading cache $cache_file"
517   . $cache_file
518 else
519   echo "creating cache $cache_file"
520   > $cache_file
521 fi
522
523 ac_ext=c
524 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
525 ac_cpp='$CPP $CPPFLAGS'
526 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
527 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
528 cross_compiling=$ac_cv_prog_cc_cross
529
530 ac_exeext=
531 ac_objext=o
532 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
533   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
534   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
535     ac_n= ac_c='
536 ' ac_t='        '
537   else
538     ac_n=-n ac_c= ac_t=
539   fi
540 else
541   ac_n= ac_c='\c' ac_t=
542 fi
543
544
545 ac_aux_dir=
546 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
547   if test -f $ac_dir/install-sh; then
548     ac_aux_dir=$ac_dir
549     ac_install_sh="$ac_aux_dir/install-sh -c"
550     break
551   elif test -f $ac_dir/install.sh; then
552     ac_aux_dir=$ac_dir
553     ac_install_sh="$ac_aux_dir/install.sh -c"
554     break
555   fi
556 done
557 if test -z "$ac_aux_dir"; then
558   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
559 fi
560 ac_config_guess=$ac_aux_dir/config.guess
561 ac_config_sub=$ac_aux_dir/config.sub
562 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
563
564
565 # Do some error checking and defaulting for the host and target type.
566 # The inputs are:
567 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
568 #
569 # The rules are:
570 # 1. You are not allowed to specify --host, --target, and nonopt at the
571 #    same time.
572 # 2. Host defaults to nonopt.
573 # 3. If nonopt is not specified, then host defaults to the current host,
574 #    as determined by config.guess.
575 # 4. Target and build default to nonopt.
576 # 5. If nonopt is not specified, then target and build default to host.
577
578 # The aliases save the names the user supplied, while $host etc.
579 # will get canonicalized.
580 case $host---$target---$nonopt in
581 NONE---*---* | *---NONE---* | *---*---NONE) ;;
582 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
583 esac
584
585
586 # Make sure we can run config.sub.
587 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
588 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
589 fi
590
591 echo $ac_n "checking host system type""... $ac_c" 1>&6
592 echo "configure:593: checking host system type" >&5
593
594 host_alias=$host
595 case "$host_alias" in
596 NONE)
597   case $nonopt in
598   NONE)
599     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
600     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
601     fi ;;
602   *) host_alias=$nonopt ;;
603   esac ;;
604 esac
605
606 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
607 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
608 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
609 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
610 echo "$ac_t""$host" 1>&6
611
612 echo $ac_n "checking target system type""... $ac_c" 1>&6
613 echo "configure:614: checking target system type" >&5
614
615 target_alias=$target
616 case "$target_alias" in
617 NONE)
618   case $nonopt in
619   NONE) target_alias=$host_alias ;;
620   *) target_alias=$nonopt ;;
621   esac ;;
622 esac
623
624 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
625 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
626 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
627 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
628 echo "$ac_t""$target" 1>&6
629
630 echo $ac_n "checking build system type""... $ac_c" 1>&6
631 echo "configure:632: checking build system type" >&5
632
633 build_alias=$build
634 case "$build_alias" in
635 NONE)
636   case $nonopt in
637   NONE) build_alias=$host_alias ;;
638   *) build_alias=$nonopt ;;
639   esac ;;
640 esac
641
642 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
643 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
644 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
645 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
646 echo "$ac_t""$build" 1>&6
647
648 test "$host_alias" != "$target_alias" &&
649   test "$program_prefix$program_suffix$program_transform_name" = \
650     NONENONEs,x,x, &&
651   program_prefix=${target_alias}-
652
653 # Find a good install program.  We prefer a C program (faster),
654 # so one script is as good as another.  But avoid the broken or
655 # incompatible versions:
656 # SysV /etc/install, /usr/sbin/install
657 # SunOS /usr/etc/install
658 # IRIX /sbin/install
659 # AIX /bin/install
660 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
661 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
662 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
663 # ./install, which can be erroneously created by make from ./install.sh.
664 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
665 echo "configure:666: checking for a BSD compatible install" >&5
666 if test -z "$INSTALL"; then
667 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
668   echo $ac_n "(cached) $ac_c" 1>&6
669 else
670     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
671   for ac_dir in $PATH; do
672     # Account for people who put trailing slashes in PATH elements.
673     case "$ac_dir/" in
674     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
675     *)
676       # OSF1 and SCO ODT 3.0 have their own names for install.
677       # Don't use installbsd from OSF since it installs stuff as root
678       # by default.
679       for ac_prog in ginstall scoinst install; do
680         if test -f $ac_dir/$ac_prog; then
681           if test $ac_prog = install &&
682             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
683             # AIX install.  It has an incompatible calling convention.
684             :
685           else
686             ac_cv_path_install="$ac_dir/$ac_prog -c"
687             break 2
688           fi
689         fi
690       done
691       ;;
692     esac
693   done
694   IFS="$ac_save_IFS"
695
696 fi
697   if test "${ac_cv_path_install+set}" = set; then
698     INSTALL="$ac_cv_path_install"
699   else
700     # As a last resort, use the slow shell script.  We don't cache a
701     # path for INSTALL within a source directory, because that will
702     # break other packages using the cache if that directory is
703     # removed, or if the path is relative.
704     INSTALL="$ac_install_sh"
705   fi
706 fi
707 echo "$ac_t""$INSTALL" 1>&6
708
709 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
710 # It thinks the first close brace ends the variable substitution.
711 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
712
713 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
714
715 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
716
717 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
718 echo "configure:719: checking whether build environment is sane" >&5
719 # Just in case
720 sleep 1
721 echo timestamp > conftestfile
722 # Do `set' in a subshell so we don't clobber the current shell's
723 # arguments.  Must try -L first in case configure is actually a
724 # symlink; some systems play weird games with the mod time of symlinks
725 # (eg FreeBSD returns the mod time of the symlink's containing
726 # directory).
727 if (
728    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
729    if test "$*" = "X"; then
730       # -L didn't work.
731       set X `ls -t $srcdir/configure conftestfile`
732    fi
733    if test "$*" != "X $srcdir/configure conftestfile" \
734       && test "$*" != "X conftestfile $srcdir/configure"; then
735
736       # If neither matched, then we have a broken ls.  This can happen
737       # if, for instance, CONFIG_SHELL is bash and it inherits a
738       # broken ls alias from the environment.  This has actually
739       # happened.  Such a system could not be considered "sane".
740       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
741 alias in your environment" 1>&2; exit 1; }
742    fi
743
744    test "$2" = conftestfile
745    )
746 then
747    # Ok.
748    :
749 else
750    { echo "configure: error: newly created file is older than distributed files!
751 Check your system clock" 1>&2; exit 1; }
752 fi
753 rm -f conftest*
754 echo "$ac_t""yes" 1>&6
755 if test "$program_transform_name" = s,x,x,; then
756   program_transform_name=
757 else
758   # Double any \ or $.  echo might interpret backslashes.
759   cat <<\EOF_SED > conftestsed
760 s,\\,\\\\,g; s,\$,$$,g
761 EOF_SED
762   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
763   rm -f conftestsed
764 fi
765 test "$program_prefix" != NONE &&
766   program_transform_name="s,^,${program_prefix},; $program_transform_name"
767 # Use a double $ so make ignores it.
768 test "$program_suffix" != NONE &&
769   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
770
771 # sed with no file args requires a program.
772 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
773
774 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
775 echo "configure:776: checking whether ${MAKE-make} sets \${MAKE}" >&5
776 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
777 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
778   echo $ac_n "(cached) $ac_c" 1>&6
779 else
780   cat > conftestmake <<\EOF
781 all:
782         @echo 'ac_maketemp="${MAKE}"'
783 EOF
784 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
785 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
786 if test -n "$ac_maketemp"; then
787   eval ac_cv_prog_make_${ac_make}_set=yes
788 else
789   eval ac_cv_prog_make_${ac_make}_set=no
790 fi
791 rm -f conftestmake
792 fi
793 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
794   echo "$ac_t""yes" 1>&6
795   SET_MAKE=
796 else
797   echo "$ac_t""no" 1>&6
798   SET_MAKE="MAKE=${MAKE-make}"
799 fi
800
801
802 PACKAGE=zlib
803
804 VERSION=1.1.3
805
806 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
807   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
808 fi
809 cat >> confdefs.h <<EOF
810 #define PACKAGE "$PACKAGE"
811 EOF
812
813 cat >> confdefs.h <<EOF
814 #define VERSION "$VERSION"
815 EOF
816
817
818
819 missing_dir=`cd $ac_aux_dir && pwd`
820 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
821 echo "configure:822: checking for working aclocal" >&5
822 # Run test in a subshell; some versions of sh will print an error if
823 # an executable is not found, even if stderr is redirected.
824 # Redirect stdin to placate older versions of autoconf.  Sigh.
825 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
826    ACLOCAL=aclocal
827    echo "$ac_t""found" 1>&6
828 else
829    ACLOCAL="$missing_dir/missing aclocal"
830    echo "$ac_t""missing" 1>&6
831 fi
832
833 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
834 echo "configure:835: checking for working autoconf" >&5
835 # Run test in a subshell; some versions of sh will print an error if
836 # an executable is not found, even if stderr is redirected.
837 # Redirect stdin to placate older versions of autoconf.  Sigh.
838 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
839    AUTOCONF=autoconf
840    echo "$ac_t""found" 1>&6
841 else
842    AUTOCONF="$missing_dir/missing autoconf"
843    echo "$ac_t""missing" 1>&6
844 fi
845
846 echo $ac_n "checking for working automake""... $ac_c" 1>&6
847 echo "configure:848: checking for working automake" >&5
848 # Run test in a subshell; some versions of sh will print an error if
849 # an executable is not found, even if stderr is redirected.
850 # Redirect stdin to placate older versions of autoconf.  Sigh.
851 if (automake --version) < /dev/null > /dev/null 2>&1; then
852    AUTOMAKE=automake
853    echo "$ac_t""found" 1>&6
854 else
855    AUTOMAKE="$missing_dir/missing automake"
856    echo "$ac_t""missing" 1>&6
857 fi
858
859 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
860 echo "configure:861: checking for working autoheader" >&5
861 # Run test in a subshell; some versions of sh will print an error if
862 # an executable is not found, even if stderr is redirected.
863 # Redirect stdin to placate older versions of autoconf.  Sigh.
864 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
865    AUTOHEADER=autoheader
866    echo "$ac_t""found" 1>&6
867 else
868    AUTOHEADER="$missing_dir/missing autoheader"
869    echo "$ac_t""missing" 1>&6
870 fi
871
872 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
873 echo "configure:874: checking for working makeinfo" >&5
874 # Run test in a subshell; some versions of sh will print an error if
875 # an executable is not found, even if stderr is redirected.
876 # Redirect stdin to placate older versions of autoconf.  Sigh.
877 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
878    MAKEINFO=makeinfo
879    echo "$ac_t""found" 1>&6
880 else
881    MAKEINFO="$missing_dir/missing makeinfo"
882    echo "$ac_t""missing" 1>&6
883 fi
884
885
886
887 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
888 echo "configure:889: checking whether to enable maintainer-specific portions of Makefiles" >&5
889     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
890 if test "${enable_maintainer_mode+set}" = set; then
891   enableval="$enable_maintainer_mode"
892   USE_MAINTAINER_MODE=$enableval
893 else
894   USE_MAINTAINER_MODE=no
895 fi
896
897   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
898   
899
900 if test $USE_MAINTAINER_MODE = yes; then
901   MAINTAINER_MODE_TRUE=
902   MAINTAINER_MODE_FALSE='#'
903 else
904   MAINTAINER_MODE_TRUE='#'
905   MAINTAINER_MODE_FALSE=
906 fi
907   MAINT=$MAINTAINER_MODE_TRUE
908   
909
910 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
911 echo "configure:912: checking for Cygwin environment" >&5
912 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
913   echo $ac_n "(cached) $ac_c" 1>&6
914 else
915   cat > conftest.$ac_ext <<EOF
916 #line 917 "configure"
917 #include "confdefs.h"
918
919 int main() {
920
921 #ifndef __CYGWIN__
922 #define __CYGWIN__ __CYGWIN32__
923 #endif
924 return __CYGWIN__;
925 ; return 0; }
926 EOF
927 if { (eval echo configure:928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
928   rm -rf conftest*
929   ac_cv_cygwin=yes
930 else
931   echo "configure: failed program was:" >&5
932   cat conftest.$ac_ext >&5
933   rm -rf conftest*
934   ac_cv_cygwin=no
935 fi
936 rm -f conftest*
937 rm -f conftest*
938 fi
939
940 echo "$ac_t""$ac_cv_cygwin" 1>&6
941 CYGWIN=
942 test "$ac_cv_cygwin" = yes && CYGWIN=yes
943 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
944 echo "configure:945: checking for mingw32 environment" >&5
945 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
946   echo $ac_n "(cached) $ac_c" 1>&6
947 else
948   cat > conftest.$ac_ext <<EOF
949 #line 950 "configure"
950 #include "confdefs.h"
951
952 int main() {
953 return __MINGW32__;
954 ; return 0; }
955 EOF
956 if { (eval echo configure:957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
957   rm -rf conftest*
958   ac_cv_mingw32=yes
959 else
960   echo "configure: failed program was:" >&5
961   cat conftest.$ac_ext >&5
962   rm -rf conftest*
963   ac_cv_mingw32=no
964 fi
965 rm -f conftest*
966 rm -f conftest*
967 fi
968
969 echo "$ac_t""$ac_cv_mingw32" 1>&6
970 MINGW32=
971 test "$ac_cv_mingw32" = yes && MINGW32=yes
972
973
974 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
975 echo "configure:976: checking for executable suffix" >&5
976 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
977   echo $ac_n "(cached) $ac_c" 1>&6
978 else
979   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
980   ac_cv_exeext=.exe
981 else
982   rm -f conftest*
983   echo 'int main () { return 0; }' > conftest.$ac_ext
984   ac_cv_exeext=
985   if { (eval echo configure:986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
986     for file in conftest.*; do
987       case $file in
988       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
989       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
990       esac
991     done
992   else
993     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
994   fi
995   rm -f conftest*
996   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
997 fi
998 fi
999
1000 EXEEXT=""
1001 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1002 echo "$ac_t""${ac_cv_exeext}" 1>&6
1003 ac_exeext=$EXEEXT
1004
1005
1006 ac_aux_dir=
1007 for ac_dir in .. $srcdir/..; do
1008   if test -f $ac_dir/install-sh; then
1009     ac_aux_dir=$ac_dir
1010     ac_install_sh="$ac_aux_dir/install-sh -c"
1011     break
1012   elif test -f $ac_dir/install.sh; then
1013     ac_aux_dir=$ac_dir
1014     ac_install_sh="$ac_aux_dir/install.sh -c"
1015     break
1016   fi
1017 done
1018 if test -z "$ac_aux_dir"; then
1019   { echo "configure: error: can not find install-sh or install.sh in .. $srcdir/.." 1>&2; exit 1; }
1020 fi
1021 ac_config_guess=$ac_aux_dir/config.guess
1022 ac_config_sub=$ac_aux_dir/config.sub
1023 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1024
1025
1026 # Check whether --with-target-subdir or --without-target-subdir was given.
1027 if test "${with_target_subdir+set}" = set; then
1028   withval="$with_target_subdir"
1029   :
1030 fi
1031
1032 # Check whether --with-cross-host or --without-cross-host was given.
1033 if test "${with_cross_host+set}" = set; then
1034   withval="$with_cross_host"
1035   :
1036 fi
1037
1038
1039 # Check whether --enable-multilib or --disable-multilib was given.
1040 if test "${enable_multilib+set}" = set; then
1041   enableval="$enable_multilib"
1042   case "${enableval}" in
1043   yes) multilib=yes ;;
1044   no)  multilib=no ;;
1045   *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
1046  esac
1047 else
1048   multilib=yes
1049 fi
1050
1051
1052 if test "${srcdir}" = "."; then
1053   if test "${with_target_subdir}" != "."; then
1054     zlib_basedir="${srcdir}/${with_multisrctop}../"
1055   else
1056     zlib_basedir="${srcdir}/${with_multisrctop}"
1057   fi
1058 else
1059   zlib_basedir="${srcdir}/"
1060 fi
1061
1062
1063 # Check whether --with-system-zlib or --without-system-zlib was given.
1064 if test "${with_system_zlib+set}" = set; then
1065   withval="$with_system_zlib"
1066   :
1067 fi
1068
1069
1070 # Extract the first word of "gcc", so it can be a program name with args.
1071 set dummy gcc; ac_word=$2
1072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1073 echo "configure:1074: checking for $ac_word" >&5
1074 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1075   echo $ac_n "(cached) $ac_c" 1>&6
1076 else
1077   if test -n "$CC"; then
1078   ac_cv_prog_CC="$CC" # Let the user override the test.
1079 else
1080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1081   ac_dummy="$PATH"
1082   for ac_dir in $ac_dummy; do
1083     test -z "$ac_dir" && ac_dir=.
1084     if test -f $ac_dir/$ac_word; then
1085       ac_cv_prog_CC="gcc"
1086       break
1087     fi
1088   done
1089   IFS="$ac_save_ifs"
1090 fi
1091 fi
1092 CC="$ac_cv_prog_CC"
1093 if test -n "$CC"; then
1094   echo "$ac_t""$CC" 1>&6
1095 else
1096   echo "$ac_t""no" 1>&6
1097 fi
1098
1099 if test -z "$CC"; then
1100   # Extract the first word of "cc", so it can be a program name with args.
1101 set dummy cc; ac_word=$2
1102 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1103 echo "configure:1104: checking for $ac_word" >&5
1104 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1105   echo $ac_n "(cached) $ac_c" 1>&6
1106 else
1107   if test -n "$CC"; then
1108   ac_cv_prog_CC="$CC" # Let the user override the test.
1109 else
1110   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1111   ac_prog_rejected=no
1112   ac_dummy="$PATH"
1113   for ac_dir in $ac_dummy; do
1114     test -z "$ac_dir" && ac_dir=.
1115     if test -f $ac_dir/$ac_word; then
1116       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1117         ac_prog_rejected=yes
1118         continue
1119       fi
1120       ac_cv_prog_CC="cc"
1121       break
1122     fi
1123   done
1124   IFS="$ac_save_ifs"
1125 if test $ac_prog_rejected = yes; then
1126   # We found a bogon in the path, so make sure we never use it.
1127   set dummy $ac_cv_prog_CC
1128   shift
1129   if test $# -gt 0; then
1130     # We chose a different compiler from the bogus one.
1131     # However, it has the same basename, so the bogon will be chosen
1132     # first if we set CC to just the basename; use the full file name.
1133     shift
1134     set dummy "$ac_dir/$ac_word" "$@"
1135     shift
1136     ac_cv_prog_CC="$@"
1137   fi
1138 fi
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   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1149 fi
1150
1151 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1152 echo "configure:1153: checking whether we are using GNU C" >&5
1153 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1154   echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156   cat > conftest.c <<EOF
1157 #ifdef __GNUC__
1158   yes;
1159 #endif
1160 EOF
1161 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1162   ac_cv_prog_gcc=yes
1163 else
1164   ac_cv_prog_gcc=no
1165 fi
1166 fi
1167
1168 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1169
1170 if test $ac_cv_prog_gcc = yes; then
1171   GCC=yes
1172   ac_test_CFLAGS="${CFLAGS+set}"
1173   ac_save_CFLAGS="$CFLAGS"
1174   CFLAGS=
1175   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1176 echo "configure:1177: checking whether ${CC-cc} accepts -g" >&5
1177 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1178   echo $ac_n "(cached) $ac_c" 1>&6
1179 else
1180   echo 'void f(){}' > conftest.c
1181 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1182   ac_cv_prog_cc_g=yes
1183 else
1184   ac_cv_prog_cc_g=no
1185 fi
1186 rm -f conftest*
1187
1188 fi
1189
1190 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1191   if test "$ac_test_CFLAGS" = set; then
1192     CFLAGS="$ac_save_CFLAGS"
1193   elif test $ac_cv_prog_cc_g = yes; then
1194     CFLAGS="-g -O2"
1195   else
1196     CFLAGS="-O2"
1197   fi
1198 else
1199   GCC=
1200   test "${CFLAGS+set}" = set || CFLAGS="-g"
1201 fi
1202
1203 # Check whether --enable-shared or --disable-shared was given.
1204 if test "${enable_shared+set}" = set; then
1205   enableval="$enable_shared"
1206   p=${PACKAGE-default}
1207 case "$enableval" in
1208 yes) enable_shared=yes ;;
1209 no) enable_shared=no ;;
1210 *)
1211   enable_shared=no
1212   # Look at the argument we got.  We use all the common list separators.
1213   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1214   for pkg in $enableval; do
1215     if test "X$pkg" = "X$p"; then
1216       enable_shared=yes
1217     fi
1218   done
1219   IFS="$ac_save_ifs"
1220   ;;
1221 esac
1222 else
1223   enable_shared=yes
1224 fi
1225
1226 # Check whether --enable-static or --disable-static was given.
1227 if test "${enable_static+set}" = set; then
1228   enableval="$enable_static"
1229   p=${PACKAGE-default}
1230 case "$enableval" in
1231 yes) enable_static=yes ;;
1232 no) enable_static=no ;;
1233 *)
1234   enable_static=no
1235   # Look at the argument we got.  We use all the common list separators.
1236   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1237   for pkg in $enableval; do
1238     if test "X$pkg" = "X$p"; then
1239       enable_static=yes
1240     fi
1241   done
1242   IFS="$ac_save_ifs"
1243   ;;
1244 esac
1245 else
1246   enable_static=yes
1247 fi
1248
1249 # Check whether --enable-fast-install or --disable-fast-install was given.
1250 if test "${enable_fast_install+set}" = set; then
1251   enableval="$enable_fast_install"
1252   p=${PACKAGE-default}
1253 case "$enableval" in
1254 yes) enable_fast_install=yes ;;
1255 no) enable_fast_install=no ;;
1256 *)
1257   enable_fast_install=no
1258   # Look at the argument we got.  We use all the common list separators.
1259   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1260   for pkg in $enableval; do
1261     if test "X$pkg" = "X$p"; then
1262       enable_fast_install=yes
1263     fi
1264   done
1265   IFS="$ac_save_ifs"
1266   ;;
1267 esac
1268 else
1269   enable_fast_install=yes
1270 fi
1271
1272 # Extract the first word of "ranlib", so it can be a program name with args.
1273 set dummy ranlib; ac_word=$2
1274 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1275 echo "configure:1276: checking for $ac_word" >&5
1276 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1277   echo $ac_n "(cached) $ac_c" 1>&6
1278 else
1279   if test -n "$RANLIB"; then
1280   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1281 else
1282   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1283   ac_dummy="$PATH"
1284   for ac_dir in $ac_dummy; do
1285     test -z "$ac_dir" && ac_dir=.
1286     if test -f $ac_dir/$ac_word; then
1287       ac_cv_prog_RANLIB="ranlib"
1288       break
1289     fi
1290   done
1291   IFS="$ac_save_ifs"
1292   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1293 fi
1294 fi
1295 RANLIB="$ac_cv_prog_RANLIB"
1296 if test -n "$RANLIB"; then
1297   echo "$ac_t""$RANLIB" 1>&6
1298 else
1299   echo "$ac_t""no" 1>&6
1300 fi
1301
1302 # Extract the first word of "gcc", so it can be a program name with args.
1303 set dummy gcc; ac_word=$2
1304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1305 echo "configure:1306: checking for $ac_word" >&5
1306 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1307   echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309   if test -n "$CC"; then
1310   ac_cv_prog_CC="$CC" # Let the user override the test.
1311 else
1312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1313   ac_dummy="$PATH"
1314   for ac_dir in $ac_dummy; do
1315     test -z "$ac_dir" && ac_dir=.
1316     if test -f $ac_dir/$ac_word; then
1317       ac_cv_prog_CC="gcc"
1318       break
1319     fi
1320   done
1321   IFS="$ac_save_ifs"
1322 fi
1323 fi
1324 CC="$ac_cv_prog_CC"
1325 if test -n "$CC"; then
1326   echo "$ac_t""$CC" 1>&6
1327 else
1328   echo "$ac_t""no" 1>&6
1329 fi
1330
1331 if test -z "$CC"; then
1332   # Extract the first word of "cc", so it can be a program name with args.
1333 set dummy cc; ac_word=$2
1334 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1335 echo "configure:1336: checking for $ac_word" >&5
1336 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1337   echo $ac_n "(cached) $ac_c" 1>&6
1338 else
1339   if test -n "$CC"; then
1340   ac_cv_prog_CC="$CC" # Let the user override the test.
1341 else
1342   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1343   ac_prog_rejected=no
1344   ac_dummy="$PATH"
1345   for ac_dir in $ac_dummy; do
1346     test -z "$ac_dir" && ac_dir=.
1347     if test -f $ac_dir/$ac_word; then
1348       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1349         ac_prog_rejected=yes
1350         continue
1351       fi
1352       ac_cv_prog_CC="cc"
1353       break
1354     fi
1355   done
1356   IFS="$ac_save_ifs"
1357 if test $ac_prog_rejected = yes; then
1358   # We found a bogon in the path, so make sure we never use it.
1359   set dummy $ac_cv_prog_CC
1360   shift
1361   if test $# -gt 0; then
1362     # We chose a different compiler from the bogus one.
1363     # However, it has the same basename, so the bogon will be chosen
1364     # first if we set CC to just the basename; use the full file name.
1365     shift
1366     set dummy "$ac_dir/$ac_word" "$@"
1367     shift
1368     ac_cv_prog_CC="$@"
1369   fi
1370 fi
1371 fi
1372 fi
1373 CC="$ac_cv_prog_CC"
1374 if test -n "$CC"; then
1375   echo "$ac_t""$CC" 1>&6
1376 else
1377   echo "$ac_t""no" 1>&6
1378 fi
1379
1380   if test -z "$CC"; then
1381     case "`uname -s`" in
1382     *win32* | *WIN32*)
1383       # Extract the first word of "cl", so it can be a program name with args.
1384 set dummy cl; ac_word=$2
1385 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1386 echo "configure:1387: checking for $ac_word" >&5
1387 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1388   echo $ac_n "(cached) $ac_c" 1>&6
1389 else
1390   if test -n "$CC"; then
1391   ac_cv_prog_CC="$CC" # Let the user override the test.
1392 else
1393   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1394   ac_dummy="$PATH"
1395   for ac_dir in $ac_dummy; do
1396     test -z "$ac_dir" && ac_dir=.
1397     if test -f $ac_dir/$ac_word; then
1398       ac_cv_prog_CC="cl"
1399       break
1400     fi
1401   done
1402   IFS="$ac_save_ifs"
1403 fi
1404 fi
1405 CC="$ac_cv_prog_CC"
1406 if test -n "$CC"; then
1407   echo "$ac_t""$CC" 1>&6
1408 else
1409   echo "$ac_t""no" 1>&6
1410 fi
1411  ;;
1412     esac
1413   fi
1414   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1415 fi
1416
1417 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1418 echo "configure:1419: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1419
1420 ac_ext=c
1421 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1422 ac_cpp='$CPP $CPPFLAGS'
1423 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1424 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1425 cross_compiling=$ac_cv_prog_cc_cross
1426
1427 cat > conftest.$ac_ext << EOF
1428
1429 #line 1430 "configure"
1430 #include "confdefs.h"
1431
1432 main(){return(0);}
1433 EOF
1434 if { (eval echo configure:1435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1435   ac_cv_prog_cc_works=yes
1436   # If we can't run a trivial program, we are probably using a cross compiler.
1437   if (./conftest; exit) 2>/dev/null; then
1438     ac_cv_prog_cc_cross=no
1439   else
1440     ac_cv_prog_cc_cross=yes
1441   fi
1442 else
1443   echo "configure: failed program was:" >&5
1444   cat conftest.$ac_ext >&5
1445   ac_cv_prog_cc_works=no
1446 fi
1447 rm -fr conftest*
1448 ac_ext=c
1449 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1450 ac_cpp='$CPP $CPPFLAGS'
1451 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1452 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1453 cross_compiling=$ac_cv_prog_cc_cross
1454
1455 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1456 if test $ac_cv_prog_cc_works = no; then
1457   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1458 fi
1459 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1460 echo "configure:1461: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1461 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1462 cross_compiling=$ac_cv_prog_cc_cross
1463
1464 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1465 echo "configure:1466: checking whether we are using GNU C" >&5
1466 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1467   echo $ac_n "(cached) $ac_c" 1>&6
1468 else
1469   cat > conftest.c <<EOF
1470 #ifdef __GNUC__
1471   yes;
1472 #endif
1473 EOF
1474 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1475   ac_cv_prog_gcc=yes
1476 else
1477   ac_cv_prog_gcc=no
1478 fi
1479 fi
1480
1481 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1482
1483 if test $ac_cv_prog_gcc = yes; then
1484   GCC=yes
1485 else
1486   GCC=
1487 fi
1488
1489 ac_test_CFLAGS="${CFLAGS+set}"
1490 ac_save_CFLAGS="$CFLAGS"
1491 CFLAGS=
1492 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1493 echo "configure:1494: checking whether ${CC-cc} accepts -g" >&5
1494 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1495   echo $ac_n "(cached) $ac_c" 1>&6
1496 else
1497   echo 'void f(){}' > conftest.c
1498 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1499   ac_cv_prog_cc_g=yes
1500 else
1501   ac_cv_prog_cc_g=no
1502 fi
1503 rm -f conftest*
1504
1505 fi
1506
1507 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1508 if test "$ac_test_CFLAGS" = set; then
1509   CFLAGS="$ac_save_CFLAGS"
1510 elif test $ac_cv_prog_cc_g = yes; then
1511   if test "$GCC" = yes; then
1512     CFLAGS="-g -O2"
1513   else
1514     CFLAGS="-g"
1515   fi
1516 else
1517   if test "$GCC" = yes; then
1518     CFLAGS="-O2"
1519   else
1520     CFLAGS=
1521   fi
1522 fi
1523
1524 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1525 if test "${with_gnu_ld+set}" = set; then
1526   withval="$with_gnu_ld"
1527   test "$withval" = no || with_gnu_ld=yes
1528 else
1529   with_gnu_ld=no
1530 fi
1531
1532 ac_prog=ld
1533 if test "$ac_cv_prog_gcc" = yes; then
1534   # Check if gcc -print-prog-name=ld gives a path.
1535   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1536 echo "configure:1537: checking for ld used by GCC" >&5
1537   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1538   case "$ac_prog" in
1539     # Accept absolute paths.
1540     [\\/]* | [A-Za-z]:[\\/]*)
1541       re_direlt='/[^/][^/]*/\.\./'
1542       # Canonicalize the path of ld
1543       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1544       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1545         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1546       done
1547       test -z "$LD" && LD="$ac_prog"
1548       ;;
1549   "")
1550     # If it fails, then pretend we aren't using GCC.
1551     ac_prog=ld
1552     ;;
1553   *)
1554     # If it is relative, then search for the first ld in PATH.
1555     with_gnu_ld=unknown
1556     ;;
1557   esac
1558 elif test "$with_gnu_ld" = yes; then
1559   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1560 echo "configure:1561: checking for GNU ld" >&5
1561 else
1562   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1563 echo "configure:1564: checking for non-GNU ld" >&5
1564 fi
1565 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1566   echo $ac_n "(cached) $ac_c" 1>&6
1567 else
1568   if test -z "$LD"; then
1569   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1570   for ac_dir in $PATH; do
1571     test -z "$ac_dir" && ac_dir=.
1572     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1573       ac_cv_path_LD="$ac_dir/$ac_prog"
1574       # Check to see if the program is GNU ld.  I'd rather use --version,
1575       # but apparently some GNU ld's only accept -v.
1576       # Break only if it was the GNU/non-GNU ld that we prefer.
1577       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1578         test "$with_gnu_ld" != no && break
1579       else
1580         test "$with_gnu_ld" != yes && break
1581       fi
1582     fi
1583   done
1584   IFS="$ac_save_ifs"
1585 else
1586   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1587 fi
1588 fi
1589
1590 LD="$ac_cv_path_LD"
1591 if test -n "$LD"; then
1592   echo "$ac_t""$LD" 1>&6
1593 else
1594   echo "$ac_t""no" 1>&6
1595 fi
1596 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1597
1598 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1599 echo "configure:1600: checking if the linker ($LD) is GNU ld" >&5
1600 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1601   echo $ac_n "(cached) $ac_c" 1>&6
1602 else
1603   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1604 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1605   ac_cv_prog_gnu_ld=yes
1606 else
1607   ac_cv_prog_gnu_ld=no
1608 fi
1609 fi
1610
1611 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1612
1613
1614 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1615 echo "configure:1616: checking for BSD-compatible nm" >&5
1616 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1617   echo $ac_n "(cached) $ac_c" 1>&6
1618 else
1619   if test -n "$NM"; then
1620   # Let the user override the test.
1621   ac_cv_path_NM="$NM"
1622 else
1623   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1624   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1625     test -z "$ac_dir" && ac_dir=.
1626     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1627       # Check to see if the nm accepts a BSD-compat flag.
1628       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1629       #   nm: unknown option "B" ignored
1630       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1631         ac_cv_path_NM="$ac_dir/nm -B"
1632         break
1633       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1634         ac_cv_path_NM="$ac_dir/nm -p"
1635         break
1636       else
1637         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1638         continue # so that we can try to find one that supports BSD flags
1639       fi
1640     fi
1641   done
1642   IFS="$ac_save_ifs"
1643   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1644 fi
1645 fi
1646
1647 NM="$ac_cv_path_NM"
1648 echo "$ac_t""$NM" 1>&6
1649
1650
1651 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1652 echo "configure:1653: checking whether ln -s works" >&5
1653 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1654   echo $ac_n "(cached) $ac_c" 1>&6
1655 else
1656   rm -f conftestdata
1657 if ln -s X conftestdata 2>/dev/null
1658 then
1659   rm -f conftestdata
1660   ac_cv_prog_LN_S="ln -s"
1661 else
1662   ac_cv_prog_LN_S=ln
1663 fi
1664 fi
1665 LN_S="$ac_cv_prog_LN_S"
1666 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1667   echo "$ac_t""yes" 1>&6
1668 else
1669   echo "$ac_t""no" 1>&6
1670 fi
1671
1672
1673 # Check for any special flags to pass to ltconfig.
1674 libtool_flags="--cache-file=$cache_file"
1675 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1676 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1677 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1678 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1679 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1680
1681
1682 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1683 if test "${enable_libtool_lock+set}" = set; then
1684   enableval="$enable_libtool_lock"
1685   :
1686 fi
1687
1688 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1689 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1690
1691 # Some flags need to be propagated to the compiler or linker for good
1692 # libtool support.
1693 case "$host" in
1694 *-*-irix6*)
1695   # Find out which ABI we are using.
1696   echo '#line 1697 "configure"' > conftest.$ac_ext
1697   if { (eval echo configure:1698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1698     case "`/usr/bin/file conftest.o`" in
1699     *32-bit*)
1700       LD="${LD-ld} -32"
1701       ;;
1702     *N32*)
1703       LD="${LD-ld} -n32"
1704       ;;
1705     *64-bit*)
1706       LD="${LD-ld} -64"
1707       ;;
1708     esac
1709   fi
1710   rm -rf conftest*
1711   ;;
1712
1713 *-*-sco3.2v5*)
1714   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1715   SAVE_CFLAGS="$CFLAGS"
1716   CFLAGS="$CFLAGS -belf"
1717   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1718 echo "configure:1719: checking whether the C compiler needs -belf" >&5
1719 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1720   echo $ac_n "(cached) $ac_c" 1>&6
1721 else
1722   cat > conftest.$ac_ext <<EOF
1723 #line 1724 "configure"
1724 #include "confdefs.h"
1725
1726 int main() {
1727
1728 ; return 0; }
1729 EOF
1730 if { (eval echo configure:1731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1731   rm -rf conftest*
1732   lt_cv_cc_needs_belf=yes
1733 else
1734   echo "configure: failed program was:" >&5
1735   cat conftest.$ac_ext >&5
1736   rm -rf conftest*
1737   lt_cv_cc_needs_belf=no
1738 fi
1739 rm -f conftest*
1740 fi
1741
1742 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1743   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1744     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1745     CFLAGS="$SAVE_CFLAGS"
1746   fi
1747   ;;
1748
1749
1750 esac
1751
1752
1753 # Save cache, so that ltconfig can load it
1754 cat > confcache <<\EOF
1755 # This file is a shell script that caches the results of configure
1756 # tests run on this system so they can be shared between configure
1757 # scripts and configure runs.  It is not useful on other systems.
1758 # If it contains results you don't want to keep, you may remove or edit it.
1759 #
1760 # By default, configure uses ./config.cache as the cache file,
1761 # creating it if it does not exist already.  You can give configure
1762 # the --cache-file=FILE option to use a different cache file; that is
1763 # what configure does when it calls configure scripts in
1764 # subdirectories, so they share the cache.
1765 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1766 # config.status only pays attention to the cache file if you give it the
1767 # --recheck option to rerun configure.
1768 #
1769 EOF
1770 # The following way of writing the cache mishandles newlines in values,
1771 # but we know of no workaround that is simple, portable, and efficient.
1772 # So, don't put newlines in cache variables' values.
1773 # Ultrix sh set writes to stderr and can't be redirected directly,
1774 # and sets the high bit in the cache file unless we assign to the vars.
1775 (set) 2>&1 |
1776   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1777   *ac_space=\ *)
1778     # `set' does not quote correctly, so add quotes (double-quote substitution
1779     # turns \\\\ into \\, and sed turns \\ into \).
1780     sed -n \
1781       -e "s/'/'\\\\''/g" \
1782       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1783     ;;
1784   *)
1785     # `set' quotes correctly as required by POSIX, so do not add quotes.
1786     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1787     ;;
1788   esac >> confcache
1789 if cmp -s $cache_file confcache; then
1790   :
1791 else
1792   if test -w $cache_file; then
1793     echo "updating cache $cache_file"
1794     cat confcache > $cache_file
1795   else
1796     echo "not updating unwritable cache $cache_file"
1797   fi
1798 fi
1799 rm -f confcache
1800
1801
1802 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1803 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1804 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1805 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1806 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1807 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1808 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1809 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1810
1811 # Reload cache, that may have been modified by ltconfig
1812 if test -r "$cache_file"; then
1813   echo "loading cache $cache_file"
1814   . $cache_file
1815 else
1816   echo "creating cache $cache_file"
1817   > $cache_file
1818 fi
1819
1820
1821 # This can be used to rebuild libtool when needed
1822 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1823
1824 # Always use our own libtool.
1825 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1826
1827 # Redirect the config.log output again, so that the ltconfig log is not
1828 # clobbered by the next message.
1829 exec 5>>./config.log
1830
1831
1832 if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
1833    COMPPATH=.
1834 else
1835    COMPPATH=..
1836 fi
1837
1838
1839
1840 if test -n "$with_cross_host"; then
1841    # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
1842    # may not work correctly, because the compiler may not be able to
1843    # link executables.
1844
1845    # We assume newlib.  This lets us hard-code the functions we know
1846    # we'll have.
1847    cat >> confdefs.h <<\EOF
1848 #define HAVE_MEMCPY 1
1849 EOF
1850
1851    cat >> confdefs.h <<\EOF
1852 #define HAVE_STRERROR 1
1853 EOF
1854
1855
1856    # We ignore --with-system-zlib in this case.
1857    target_all=libzgcj.la
1858 else
1859    echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1860 echo "configure:1861: checking how to run the C preprocessor" >&5
1861 # On Suns, sometimes $CPP names a directory.
1862 if test -n "$CPP" && test -d "$CPP"; then
1863   CPP=
1864 fi
1865 if test -z "$CPP"; then
1866 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1867   echo $ac_n "(cached) $ac_c" 1>&6
1868 else
1869     # This must be in double quotes, not single quotes, because CPP may get
1870   # substituted into the Makefile and "${CC-cc}" will confuse make.
1871   CPP="${CC-cc} -E"
1872   # On the NeXT, cc -E runs the code through the compiler's parser,
1873   # not just through cpp.
1874   cat > conftest.$ac_ext <<EOF
1875 #line 1876 "configure"
1876 #include "confdefs.h"
1877 #include <assert.h>
1878 Syntax Error
1879 EOF
1880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1881 { (eval echo configure:1882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1883 if test -z "$ac_err"; then
1884   :
1885 else
1886   echo "$ac_err" >&5
1887   echo "configure: failed program was:" >&5
1888   cat conftest.$ac_ext >&5
1889   rm -rf conftest*
1890   CPP="${CC-cc} -E -traditional-cpp"
1891   cat > conftest.$ac_ext <<EOF
1892 #line 1893 "configure"
1893 #include "confdefs.h"
1894 #include <assert.h>
1895 Syntax Error
1896 EOF
1897 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1898 { (eval echo configure:1899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1899 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1900 if test -z "$ac_err"; then
1901   :
1902 else
1903   echo "$ac_err" >&5
1904   echo "configure: failed program was:" >&5
1905   cat conftest.$ac_ext >&5
1906   rm -rf conftest*
1907   CPP="${CC-cc} -nologo -E"
1908   cat > conftest.$ac_ext <<EOF
1909 #line 1910 "configure"
1910 #include "confdefs.h"
1911 #include <assert.h>
1912 Syntax Error
1913 EOF
1914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1915 { (eval echo configure:1916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1917 if test -z "$ac_err"; then
1918   :
1919 else
1920   echo "$ac_err" >&5
1921   echo "configure: failed program was:" >&5
1922   cat conftest.$ac_ext >&5
1923   rm -rf conftest*
1924   CPP=/lib/cpp
1925 fi
1926 rm -f conftest*
1927 fi
1928 rm -f conftest*
1929 fi
1930 rm -f conftest*
1931   ac_cv_prog_CPP="$CPP"
1932 fi
1933   CPP="$ac_cv_prog_CPP"
1934 else
1935   ac_cv_prog_CPP="$CPP"
1936 fi
1937 echo "$ac_t""$CPP" 1>&6
1938
1939 for ac_hdr in unistd.h
1940 do
1941 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1942 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1943 echo "configure:1944: checking for $ac_hdr" >&5
1944 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1945   echo $ac_n "(cached) $ac_c" 1>&6
1946 else
1947   cat > conftest.$ac_ext <<EOF
1948 #line 1949 "configure"
1949 #include "confdefs.h"
1950 #include <$ac_hdr>
1951 EOF
1952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1953 { (eval echo configure:1954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1955 if test -z "$ac_err"; then
1956   rm -rf conftest*
1957   eval "ac_cv_header_$ac_safe=yes"
1958 else
1959   echo "$ac_err" >&5
1960   echo "configure: failed program was:" >&5
1961   cat conftest.$ac_ext >&5
1962   rm -rf conftest*
1963   eval "ac_cv_header_$ac_safe=no"
1964 fi
1965 rm -f conftest*
1966 fi
1967 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1968   echo "$ac_t""yes" 1>&6
1969     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1970   cat >> confdefs.h <<EOF
1971 #define $ac_tr_hdr 1
1972 EOF
1973  
1974 else
1975   echo "$ac_t""no" 1>&6
1976 fi
1977 done
1978
1979 for ac_func in getpagesize
1980 do
1981 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1982 echo "configure:1983: checking for $ac_func" >&5
1983 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1984   echo $ac_n "(cached) $ac_c" 1>&6
1985 else
1986   cat > conftest.$ac_ext <<EOF
1987 #line 1988 "configure"
1988 #include "confdefs.h"
1989 /* System header to define __stub macros and hopefully few prototypes,
1990     which can conflict with char $ac_func(); below.  */
1991 #include <assert.h>
1992 /* Override any gcc2 internal prototype to avoid an error.  */
1993 /* We use char because int might match the return type of a gcc2
1994     builtin and then its argument prototype would still apply.  */
1995 char $ac_func();
1996
1997 int main() {
1998
1999 /* The GNU C library defines this for functions which it implements
2000     to always fail with ENOSYS.  Some functions are actually named
2001     something starting with __ and the normal name is an alias.  */
2002 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2003 choke me
2004 #else
2005 $ac_func();
2006 #endif
2007
2008 ; return 0; }
2009 EOF
2010 if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2011   rm -rf conftest*
2012   eval "ac_cv_func_$ac_func=yes"
2013 else
2014   echo "configure: failed program was:" >&5
2015   cat conftest.$ac_ext >&5
2016   rm -rf conftest*
2017   eval "ac_cv_func_$ac_func=no"
2018 fi
2019 rm -f conftest*
2020 fi
2021
2022 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2023   echo "$ac_t""yes" 1>&6
2024     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2025   cat >> confdefs.h <<EOF
2026 #define $ac_tr_func 1
2027 EOF
2028  
2029 else
2030   echo "$ac_t""no" 1>&6
2031 fi
2032 done
2033
2034 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2035 echo "configure:2036: checking for working mmap" >&5
2036 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2037   echo $ac_n "(cached) $ac_c" 1>&6
2038 else
2039   if test "$cross_compiling" = yes; then
2040   ac_cv_func_mmap_fixed_mapped=no
2041 else
2042   cat > conftest.$ac_ext <<EOF
2043 #line 2044 "configure"
2044 #include "confdefs.h"
2045
2046 /* Thanks to Mike Haertel and Jim Avera for this test.
2047    Here is a matrix of mmap possibilities:
2048         mmap private not fixed
2049         mmap private fixed at somewhere currently unmapped
2050         mmap private fixed at somewhere already mapped
2051         mmap shared not fixed
2052         mmap shared fixed at somewhere currently unmapped
2053         mmap shared fixed at somewhere already mapped
2054    For private mappings, we should verify that changes cannot be read()
2055    back from the file, nor mmap's back from the file at a different
2056    address.  (There have been systems where private was not correctly
2057    implemented like the infamous i386 svr4.0, and systems where the
2058    VM page cache was not coherent with the filesystem buffer cache
2059    like early versions of FreeBSD and possibly contemporary NetBSD.)
2060    For shared mappings, we should conversely verify that changes get
2061    propogated back to all the places they're supposed to be.
2062
2063    Grep wants private fixed already mapped.
2064    The main things grep needs to know about mmap are:
2065    * does it exist and is it safe to write into the mmap'd area
2066    * how to use it (BSD variants)  */
2067 #include <sys/types.h>
2068 #include <fcntl.h>
2069 #include <sys/mman.h>
2070
2071 /* This mess was copied from the GNU getpagesize.h.  */
2072 #ifndef HAVE_GETPAGESIZE
2073 # ifdef HAVE_UNISTD_H
2074 #  include <unistd.h>
2075 # endif
2076
2077 /* Assume that all systems that can run configure have sys/param.h.  */
2078 # ifndef HAVE_SYS_PARAM_H
2079 #  define HAVE_SYS_PARAM_H 1
2080 # endif
2081
2082 # ifdef _SC_PAGESIZE
2083 #  define getpagesize() sysconf(_SC_PAGESIZE)
2084 # else /* no _SC_PAGESIZE */
2085 #  ifdef HAVE_SYS_PARAM_H
2086 #   include <sys/param.h>
2087 #   ifdef EXEC_PAGESIZE
2088 #    define getpagesize() EXEC_PAGESIZE
2089 #   else /* no EXEC_PAGESIZE */
2090 #    ifdef NBPG
2091 #     define getpagesize() NBPG * CLSIZE
2092 #     ifndef CLSIZE
2093 #      define CLSIZE 1
2094 #     endif /* no CLSIZE */
2095 #    else /* no NBPG */
2096 #     ifdef NBPC
2097 #      define getpagesize() NBPC
2098 #     else /* no NBPC */
2099 #      ifdef PAGESIZE
2100 #       define getpagesize() PAGESIZE
2101 #      endif /* PAGESIZE */
2102 #     endif /* no NBPC */
2103 #    endif /* no NBPG */
2104 #   endif /* no EXEC_PAGESIZE */
2105 #  else /* no HAVE_SYS_PARAM_H */
2106 #   define getpagesize() 8192   /* punt totally */
2107 #  endif /* no HAVE_SYS_PARAM_H */
2108 # endif /* no _SC_PAGESIZE */
2109
2110 #endif /* no HAVE_GETPAGESIZE */
2111
2112 #ifdef __cplusplus
2113 extern "C" { void *malloc(unsigned); }
2114 #else
2115 char *malloc();
2116 #endif
2117
2118 int
2119 main()
2120 {
2121         char *data, *data2, *data3;
2122         int i, pagesize;
2123         int fd;
2124
2125         pagesize = getpagesize();
2126
2127         /*
2128          * First, make a file with some known garbage in it.
2129          */
2130         data = malloc(pagesize);
2131         if (!data)
2132                 exit(1);
2133         for (i = 0; i < pagesize; ++i)
2134                 *(data + i) = rand();
2135         umask(0);
2136         fd = creat("conftestmmap", 0600);
2137         if (fd < 0)
2138                 exit(1);
2139         if (write(fd, data, pagesize) != pagesize)
2140                 exit(1);
2141         close(fd);
2142
2143         /*
2144          * Next, try to mmap the file at a fixed address which
2145          * already has something else allocated at it.  If we can,
2146          * also make sure that we see the same garbage.
2147          */
2148         fd = open("conftestmmap", O_RDWR);
2149         if (fd < 0)
2150                 exit(1);
2151         data2 = malloc(2 * pagesize);
2152         if (!data2)
2153                 exit(1);
2154         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2155         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2156             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2157                 exit(1);
2158         for (i = 0; i < pagesize; ++i)
2159                 if (*(data + i) != *(data2 + i))
2160                         exit(1);
2161
2162         /*
2163          * Finally, make sure that changes to the mapped area
2164          * do not percolate back to the file as seen by read().
2165          * (This is a bug on some variants of i386 svr4.0.)
2166          */
2167         for (i = 0; i < pagesize; ++i)
2168                 *(data2 + i) = *(data2 + i) + 1;
2169         data3 = malloc(pagesize);
2170         if (!data3)
2171                 exit(1);
2172         if (read(fd, data3, pagesize) != pagesize)
2173                 exit(1);
2174         for (i = 0; i < pagesize; ++i)
2175                 if (*(data + i) != *(data3 + i))
2176                         exit(1);
2177         close(fd);
2178         unlink("conftestmmap");
2179         exit(0);
2180 }
2181
2182 EOF
2183 if { (eval echo configure:2184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2184 then
2185   ac_cv_func_mmap_fixed_mapped=yes
2186 else
2187   echo "configure: failed program was:" >&5
2188   cat conftest.$ac_ext >&5
2189   rm -fr conftest*
2190   ac_cv_func_mmap_fixed_mapped=no
2191 fi
2192 rm -fr conftest*
2193 fi
2194
2195 fi
2196
2197 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2198 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2199   cat >> confdefs.h <<\EOF
2200 #define HAVE_MMAP 1
2201 EOF
2202
2203 fi
2204
2205    for ac_func in memcpy strerror
2206 do
2207 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2208 echo "configure:2209: checking for $ac_func" >&5
2209 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2210   echo $ac_n "(cached) $ac_c" 1>&6
2211 else
2212   cat > conftest.$ac_ext <<EOF
2213 #line 2214 "configure"
2214 #include "confdefs.h"
2215 /* System header to define __stub macros and hopefully few prototypes,
2216     which can conflict with char $ac_func(); below.  */
2217 #include <assert.h>
2218 /* Override any gcc2 internal prototype to avoid an error.  */
2219 /* We use char because int might match the return type of a gcc2
2220     builtin and then its argument prototype would still apply.  */
2221 char $ac_func();
2222
2223 int main() {
2224
2225 /* The GNU C library defines this for functions which it implements
2226     to always fail with ENOSYS.  Some functions are actually named
2227     something starting with __ and the normal name is an alias.  */
2228 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2229 choke me
2230 #else
2231 $ac_func();
2232 #endif
2233
2234 ; return 0; }
2235 EOF
2236 if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2237   rm -rf conftest*
2238   eval "ac_cv_func_$ac_func=yes"
2239 else
2240   echo "configure: failed program was:" >&5
2241   cat conftest.$ac_ext >&5
2242   rm -rf conftest*
2243   eval "ac_cv_func_$ac_func=no"
2244 fi
2245 rm -f conftest*
2246 fi
2247
2248 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2249   echo "$ac_t""yes" 1>&6
2250     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2251   cat >> confdefs.h <<EOF
2252 #define $ac_tr_func 1
2253 EOF
2254  
2255 else
2256   echo "$ac_t""no" 1>&6
2257 fi
2258 done
2259
2260
2261    if test "$with_system_zlib" = yes; then
2262       echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
2263 echo "configure:2264: checking for deflate in -lz" >&5
2264 ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
2265 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2266   echo $ac_n "(cached) $ac_c" 1>&6
2267 else
2268   ac_save_LIBS="$LIBS"
2269 LIBS="-lz  $LIBS"
2270 cat > conftest.$ac_ext <<EOF
2271 #line 2272 "configure"
2272 #include "confdefs.h"
2273 /* Override any gcc2 internal prototype to avoid an error.  */
2274 /* We use char because int might match the return type of a gcc2
2275     builtin and then its argument prototype would still apply.  */
2276 char deflate();
2277
2278 int main() {
2279 deflate()
2280 ; return 0; }
2281 EOF
2282 if { (eval echo configure:2283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2283   rm -rf conftest*
2284   eval "ac_cv_lib_$ac_lib_var=yes"
2285 else
2286   echo "configure: failed program was:" >&5
2287   cat conftest.$ac_ext >&5
2288   rm -rf conftest*
2289   eval "ac_cv_lib_$ac_lib_var=no"
2290 fi
2291 rm -f conftest*
2292 LIBS="$ac_save_LIBS"
2293
2294 fi
2295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2296   echo "$ac_t""yes" 1>&6
2297   target_all=
2298 else
2299   echo "$ac_t""no" 1>&6
2300 target_all=libzgcj.la
2301 fi
2302
2303    else
2304       target_all=libzgcj.la
2305    fi
2306 fi
2307
2308
2309
2310 for ac_hdr in unistd.h
2311 do
2312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2314 echo "configure:2315: checking for $ac_hdr" >&5
2315 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316   echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318   cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2321 #include <$ac_hdr>
2322 EOF
2323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2324 { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326 if test -z "$ac_err"; then
2327   rm -rf conftest*
2328   eval "ac_cv_header_$ac_safe=yes"
2329 else
2330   echo "$ac_err" >&5
2331   echo "configure: failed program was:" >&5
2332   cat conftest.$ac_ext >&5
2333   rm -rf conftest*
2334   eval "ac_cv_header_$ac_safe=no"
2335 fi
2336 rm -f conftest*
2337 fi
2338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339   echo "$ac_t""yes" 1>&6
2340     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2341   cat >> confdefs.h <<EOF
2342 #define $ac_tr_hdr 1
2343 EOF
2344  
2345 else
2346   echo "$ac_t""no" 1>&6
2347 fi
2348 done
2349
2350
2351
2352
2353 if test -z "$with_cross_host"; then
2354   USE_LIBDIR_TRUE=
2355   USE_LIBDIR_FALSE='#'
2356 else
2357   USE_LIBDIR_TRUE='#'
2358   USE_LIBDIR_FALSE=
2359 fi
2360
2361 if test "${multilib}" = "yes"; then
2362   multilib_arg="--enable-multilib"
2363 else
2364   multilib_arg=
2365 fi
2366
2367 trap '' 1 2 15
2368 cat > confcache <<\EOF
2369 # This file is a shell script that caches the results of configure
2370 # tests run on this system so they can be shared between configure
2371 # scripts and configure runs.  It is not useful on other systems.
2372 # If it contains results you don't want to keep, you may remove or edit it.
2373 #
2374 # By default, configure uses ./config.cache as the cache file,
2375 # creating it if it does not exist already.  You can give configure
2376 # the --cache-file=FILE option to use a different cache file; that is
2377 # what configure does when it calls configure scripts in
2378 # subdirectories, so they share the cache.
2379 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2380 # config.status only pays attention to the cache file if you give it the
2381 # --recheck option to rerun configure.
2382 #
2383 EOF
2384 # The following way of writing the cache mishandles newlines in values,
2385 # but we know of no workaround that is simple, portable, and efficient.
2386 # So, don't put newlines in cache variables' values.
2387 # Ultrix sh set writes to stderr and can't be redirected directly,
2388 # and sets the high bit in the cache file unless we assign to the vars.
2389 (set) 2>&1 |
2390   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2391   *ac_space=\ *)
2392     # `set' does not quote correctly, so add quotes (double-quote substitution
2393     # turns \\\\ into \\, and sed turns \\ into \).
2394     sed -n \
2395       -e "s/'/'\\\\''/g" \
2396       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2397     ;;
2398   *)
2399     # `set' quotes correctly as required by POSIX, so do not add quotes.
2400     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2401     ;;
2402   esac >> confcache
2403 if cmp -s $cache_file confcache; then
2404   :
2405 else
2406   if test -w $cache_file; then
2407     echo "updating cache $cache_file"
2408     cat confcache > $cache_file
2409   else
2410     echo "not updating unwritable cache $cache_file"
2411   fi
2412 fi
2413 rm -f confcache
2414
2415 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2416
2417 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2418 # Let make expand exec_prefix.
2419 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2420
2421 # Any assignment to VPATH causes Sun make to only execute
2422 # the first set of double-colon rules, so remove it if not needed.
2423 # If there is a colon in the path, we need to keep it.
2424 if test "x$srcdir" = x.; then
2425   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2426 fi
2427
2428 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2429
2430 # Transform confdefs.h into DEFS.
2431 # Protect against shell expansion while executing Makefile rules.
2432 # Protect against Makefile macro expansion.
2433 cat > conftest.defs <<\EOF
2434 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2435 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2436 s%\[%\\&%g
2437 s%\]%\\&%g
2438 s%\$%$$%g
2439 EOF
2440 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2441 rm -f conftest.defs
2442
2443
2444 # Without the "./", some shells look in PATH for config.status.
2445 : ${CONFIG_STATUS=./config.status}
2446
2447 echo creating $CONFIG_STATUS
2448 rm -f $CONFIG_STATUS
2449 cat > $CONFIG_STATUS <<EOF
2450 #! /bin/sh
2451 # Generated automatically by configure.
2452 # Run this file to recreate the current configuration.
2453 # This directory was configured as follows,
2454 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2455 #
2456 # $0 $ac_configure_args
2457 #
2458 # Compiler output produced by configure, useful for debugging
2459 # configure, is in ./config.log if it exists.
2460
2461 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2462 for ac_option
2463 do
2464   case "\$ac_option" in
2465   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2466     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2467     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2468   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2469     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2470     exit 0 ;;
2471   -help | --help | --hel | --he | --h)
2472     echo "\$ac_cs_usage"; exit 0 ;;
2473   *) echo "\$ac_cs_usage"; exit 1 ;;
2474   esac
2475 done
2476
2477 ac_given_srcdir=$srcdir
2478 ac_given_INSTALL="$INSTALL"
2479
2480 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2481 EOF
2482 cat >> $CONFIG_STATUS <<EOF
2483
2484 # Protect against being on the right side of a sed subst in config.status.
2485 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2486  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2487 $ac_vpsub
2488 $extrasub
2489 s%@SHELL@%$SHELL%g
2490 s%@CFLAGS@%$CFLAGS%g
2491 s%@CPPFLAGS@%$CPPFLAGS%g
2492 s%@CXXFLAGS@%$CXXFLAGS%g
2493 s%@FFLAGS@%$FFLAGS%g
2494 s%@DEFS@%$DEFS%g
2495 s%@LDFLAGS@%$LDFLAGS%g
2496 s%@LIBS@%$LIBS%g
2497 s%@exec_prefix@%$exec_prefix%g
2498 s%@prefix@%$prefix%g
2499 s%@program_transform_name@%$program_transform_name%g
2500 s%@bindir@%$bindir%g
2501 s%@sbindir@%$sbindir%g
2502 s%@libexecdir@%$libexecdir%g
2503 s%@datadir@%$datadir%g
2504 s%@sysconfdir@%$sysconfdir%g
2505 s%@sharedstatedir@%$sharedstatedir%g
2506 s%@localstatedir@%$localstatedir%g
2507 s%@libdir@%$libdir%g
2508 s%@includedir@%$includedir%g
2509 s%@oldincludedir@%$oldincludedir%g
2510 s%@infodir@%$infodir%g
2511 s%@mandir@%$mandir%g
2512 s%@host@%$host%g
2513 s%@host_alias@%$host_alias%g
2514 s%@host_cpu@%$host_cpu%g
2515 s%@host_vendor@%$host_vendor%g
2516 s%@host_os@%$host_os%g
2517 s%@target@%$target%g
2518 s%@target_alias@%$target_alias%g
2519 s%@target_cpu@%$target_cpu%g
2520 s%@target_vendor@%$target_vendor%g
2521 s%@target_os@%$target_os%g
2522 s%@build@%$build%g
2523 s%@build_alias@%$build_alias%g
2524 s%@build_cpu@%$build_cpu%g
2525 s%@build_vendor@%$build_vendor%g
2526 s%@build_os@%$build_os%g
2527 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2528 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2529 s%@INSTALL_DATA@%$INSTALL_DATA%g
2530 s%@PACKAGE@%$PACKAGE%g
2531 s%@VERSION@%$VERSION%g
2532 s%@ACLOCAL@%$ACLOCAL%g
2533 s%@AUTOCONF@%$AUTOCONF%g
2534 s%@AUTOMAKE@%$AUTOMAKE%g
2535 s%@AUTOHEADER@%$AUTOHEADER%g
2536 s%@MAKEINFO@%$MAKEINFO%g
2537 s%@SET_MAKE@%$SET_MAKE%g
2538 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
2539 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
2540 s%@MAINT@%$MAINT%g
2541 s%@EXEEXT@%$EXEEXT%g
2542 s%@zlib_basedir@%$zlib_basedir%g
2543 s%@CC@%$CC%g
2544 s%@RANLIB@%$RANLIB%g
2545 s%@LD@%$LD%g
2546 s%@NM@%$NM%g
2547 s%@LN_S@%$LN_S%g
2548 s%@LIBTOOL@%$LIBTOOL%g
2549 s%@COMPPATH@%$COMPPATH%g
2550 s%@CPP@%$CPP%g
2551 s%@target_all@%$target_all%g
2552 s%@USE_LIBDIR_TRUE@%$USE_LIBDIR_TRUE%g
2553 s%@USE_LIBDIR_FALSE@%$USE_LIBDIR_FALSE%g
2554
2555 CEOF
2556 EOF
2557
2558 cat >> $CONFIG_STATUS <<\EOF
2559
2560 # Split the substitutions into bite-sized pieces for seds with
2561 # small command number limits, like on Digital OSF/1 and HP-UX.
2562 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2563 ac_file=1 # Number of current file.
2564 ac_beg=1 # First line for current file.
2565 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2566 ac_more_lines=:
2567 ac_sed_cmds=""
2568 while $ac_more_lines; do
2569   if test $ac_beg -gt 1; then
2570     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2571   else
2572     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2573   fi
2574   if test ! -s conftest.s$ac_file; then
2575     ac_more_lines=false
2576     rm -f conftest.s$ac_file
2577   else
2578     if test -z "$ac_sed_cmds"; then
2579       ac_sed_cmds="sed -f conftest.s$ac_file"
2580     else
2581       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2582     fi
2583     ac_file=`expr $ac_file + 1`
2584     ac_beg=$ac_end
2585     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2586   fi
2587 done
2588 if test -z "$ac_sed_cmds"; then
2589   ac_sed_cmds=cat
2590 fi
2591 EOF
2592
2593 cat >> $CONFIG_STATUS <<EOF
2594
2595 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2596 EOF
2597 cat >> $CONFIG_STATUS <<\EOF
2598 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2599   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2600   case "$ac_file" in
2601   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2602        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2603   *) ac_file_in="${ac_file}.in" ;;
2604   esac
2605
2606   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2607
2608   # Remove last slash and all that follows it.  Not all systems have dirname.
2609   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2610   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2611     # The file is in a subdirectory.
2612     test ! -d "$ac_dir" && mkdir "$ac_dir"
2613     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2614     # A "../" for each directory in $ac_dir_suffix.
2615     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2616   else
2617     ac_dir_suffix= ac_dots=
2618   fi
2619
2620   case "$ac_given_srcdir" in
2621   .)  srcdir=.
2622       if test -z "$ac_dots"; then top_srcdir=.
2623       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2624   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2625   *) # Relative path.
2626     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2627     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2628   esac
2629
2630   case "$ac_given_INSTALL" in
2631   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2632   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2633   esac
2634
2635   echo creating "$ac_file"
2636   rm -f "$ac_file"
2637   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2638   case "$ac_file" in
2639   *Makefile*) ac_comsub="1i\\
2640 # $configure_input" ;;
2641   *) ac_comsub= ;;
2642   esac
2643
2644   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2645   sed -e "$ac_comsub
2646 s%@configure_input@%$configure_input%g
2647 s%@srcdir@%$srcdir%g
2648 s%@top_srcdir@%$top_srcdir%g
2649 s%@INSTALL@%$INSTALL%g
2650 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2651 fi; done
2652 rm -f conftest.s*
2653
2654 EOF
2655 cat >> $CONFIG_STATUS <<EOF
2656 srcdir=${srcdir}
2657 host=${host}
2658 target=${target}
2659 with_multisubdir=${with_multisubdir}
2660 ac_configure_args="${multilib_arg} ${ac_configure_args}"
2661 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2662 zlib_basedir=${zlib_basedir}
2663 CC="${CC}"
2664 CXX="${CXX}"
2665
2666 EOF
2667 cat >> $CONFIG_STATUS <<\EOF
2668 if test -n "$CONFIG_FILES"; then
2669   ac_file=Makefile . ${zlib_basedir}/../config-ml.in
2670 fi
2671 exit 0
2672 EOF
2673 chmod +x $CONFIG_STATUS
2674 rm -fr confdefs* $ac_clean_files
2675 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2676