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