OSDN Git Service

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