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