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