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