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