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