OSDN Git Service

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