* Add this nice filesystem testing tool that I've recently
[dragonfly.git] / contrib / lukemftpd / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.17 
4
5
6
7
8
9
10
11
12
13
14 # Guess values for system-dependent variables and create Makefiles.
15 # Generated automatically using autoconf version 2.13 
16 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
17 #
18 # This configure script is free software; the Free Software Foundation
19 # gives unlimited permission to copy, distribute and modify it.
20
21 # Defaults:
22 ac_help=
23 ac_default_prefix=/usr/local
24 # Any additions from configure.in:
25 ac_help="$ac_help
26 \
27   --enable-ipv6           Enable IPv6 support (if your OS supports it).
28   --disable-ipv6          Disable IPv6 support (even if your OS supports it).
29                           [default: enabled]"
30 ac_help="$ac_help
31 \
32   --enable-builtinls      Enable built-in /bin/ls.  [default: enabled]
33   --disable-builtinls     Disable built-in /bin/ls."
34 ac_help="$ac_help
35   --with-socks            Compile with SOCKS firewall traversal support."
36 ac_help="$ac_help
37   --with-socks5[=PATH]    Compile with SOCKS5 firewall traversal support."
38 ac_help="$ac_help
39   --with-socks4[=PATH]    Compile with SOCKS4 firewall traversal support."
40 ac_help="$ac_help
41   --with-skey             Compile with S/Key authentication support."
42
43 # Initialize some variables set by options.
44 # The variables have the same names as the options, with
45 # dashes changed to underlines.
46 build=NONE
47 cache_file=./config.cache
48 exec_prefix=NONE
49 host=NONE
50 no_create=
51 nonopt=NONE
52 no_recursion=
53 prefix=NONE
54 program_prefix=NONE
55 program_suffix=NONE
56 program_transform_name=s,x,x,
57 silent=
58 site=
59 srcdir=
60 target=NONE
61 verbose=
62 x_includes=NONE
63 x_libraries=NONE
64 bindir='${exec_prefix}/bin'
65 sbindir='${exec_prefix}/sbin'
66 libexecdir='${exec_prefix}/libexec'
67 datadir='${prefix}/share'
68 sysconfdir='${prefix}/etc'
69 sharedstatedir='${prefix}/com'
70 localstatedir='${prefix}/var'
71 libdir='${exec_prefix}/lib'
72 includedir='${prefix}/include'
73 oldincludedir='/usr/include'
74 infodir='${prefix}/info'
75 mandir='${prefix}/man'
76
77 # Initialize some other variables.
78 subdirs=
79 MFLAGS= MAKEFLAGS=
80 SHELL=${CONFIG_SHELL-/bin/sh}
81 # Maximum number of lines to put in a shell here document.
82 ac_max_here_lines=12
83
84 ac_prev=
85 for ac_option
86 do
87
88   # If the previous option needs an argument, assign it.
89   if test -n "$ac_prev"; then
90     eval "$ac_prev=\$ac_option"
91     ac_prev=
92     continue
93   fi
94
95   case "$ac_option" in
96   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
97   *) ac_optarg= ;;
98   esac
99
100   # Accept the important Cygnus configure options, so we can diagnose typos.
101
102   case "$ac_option" in
103
104   -bindir | --bindir | --bindi | --bind | --bin | --bi)
105     ac_prev=bindir ;;
106   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
107     bindir="$ac_optarg" ;;
108
109   -build | --build | --buil | --bui | --bu)
110     ac_prev=build ;;
111   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
112     build="$ac_optarg" ;;
113
114   -cache-file | --cache-file | --cache-fil | --cache-fi \
115   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
116     ac_prev=cache_file ;;
117   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
118   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
119     cache_file="$ac_optarg" ;;
120
121   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
122     ac_prev=datadir ;;
123   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
124   | --da=*)
125     datadir="$ac_optarg" ;;
126
127   -disable-* | --disable-*)
128     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
129     # Reject names that are not valid shell variable names.
130     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
131       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
132     fi
133     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
134     eval "enable_${ac_feature}=no" ;;
135
136   -enable-* | --enable-*)
137     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
138     # Reject names that are not valid shell variable names.
139     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
140       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
141     fi
142     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
143     case "$ac_option" in
144       *=*) ;;
145       *) ac_optarg=yes ;;
146     esac
147     eval "enable_${ac_feature}='$ac_optarg'" ;;
148
149   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
150   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
151   | --exec | --exe | --ex)
152     ac_prev=exec_prefix ;;
153   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
154   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
155   | --exec=* | --exe=* | --ex=*)
156     exec_prefix="$ac_optarg" ;;
157
158   -gas | --gas | --ga | --g)
159     # Obsolete; use --with-gas.
160     with_gas=yes ;;
161
162   -help | --help | --hel | --he)
163     # Omit some internal or obsolete options to make the list less imposing.
164     # This message is too long to be a string in the A/UX 3.1 sh.
165     cat << EOF
166 Usage: configure [options] [host]
167 Options: [defaults in brackets after descriptions]
168 Configuration:
169   --cache-file=FILE       cache test results in FILE
170   --help                  print this message
171   --no-create             do not create output files
172   --quiet, --silent       do not print \`checking...' messages
173   --version               print the version of autoconf that created configure
174 Directory and file names:
175   --prefix=PREFIX         install architecture-independent files in PREFIX
176                           [$ac_default_prefix]
177   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
178                           [same as prefix]
179   --bindir=DIR            user executables in DIR [EPREFIX/bin]
180   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
181   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
182   --datadir=DIR           read-only architecture-independent data in DIR
183                           [PREFIX/share]
184   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
185   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
186                           [PREFIX/com]
187   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
188   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
189   --includedir=DIR        C header files in DIR [PREFIX/include]
190   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
191   --infodir=DIR           info documentation in DIR [PREFIX/info]
192   --mandir=DIR            man documentation in DIR [PREFIX/man]
193   --srcdir=DIR            find the sources in DIR [configure dir or ..]
194   --program-prefix=PREFIX prepend PREFIX to installed program names
195   --program-suffix=SUFFIX append SUFFIX to installed program names
196   --program-transform-name=PROGRAM
197                           run sed PROGRAM on installed program names
198 EOF
199     cat << EOF
200 Host type:
201   --build=BUILD           configure for building on BUILD [BUILD=HOST]
202   --host=HOST             configure for HOST [guessed]
203   --target=TARGET         configure for TARGET [TARGET=HOST]
204 Features and packages:
205   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
206   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
207   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
208   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
209   --x-includes=DIR        X include files are in DIR
210   --x-libraries=DIR       X library files are in DIR
211 EOF
212     if test -n "$ac_help"; then
213       echo "--enable and --with options recognized:$ac_help"
214     fi
215     exit 0 ;;
216
217   -host | --host | --hos | --ho)
218     ac_prev=host ;;
219   -host=* | --host=* | --hos=* | --ho=*)
220     host="$ac_optarg" ;;
221
222   -includedir | --includedir | --includedi | --included | --include \
223   | --includ | --inclu | --incl | --inc)
224     ac_prev=includedir ;;
225   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
226   | --includ=* | --inclu=* | --incl=* | --inc=*)
227     includedir="$ac_optarg" ;;
228
229   -infodir | --infodir | --infodi | --infod | --info | --inf)
230     ac_prev=infodir ;;
231   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
232     infodir="$ac_optarg" ;;
233
234   -libdir | --libdir | --libdi | --libd)
235     ac_prev=libdir ;;
236   -libdir=* | --libdir=* | --libdi=* | --libd=*)
237     libdir="$ac_optarg" ;;
238
239   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
240   | --libexe | --libex | --libe)
241     ac_prev=libexecdir ;;
242   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
243   | --libexe=* | --libex=* | --libe=*)
244     libexecdir="$ac_optarg" ;;
245
246   -localstatedir | --localstatedir | --localstatedi | --localstated \
247   | --localstate | --localstat | --localsta | --localst \
248   | --locals | --local | --loca | --loc | --lo)
249     ac_prev=localstatedir ;;
250   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
251   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
252   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
253     localstatedir="$ac_optarg" ;;
254
255   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
256     ac_prev=mandir ;;
257   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
258     mandir="$ac_optarg" ;;
259
260   -nfp | --nfp | --nf)
261     # Obsolete; use --without-fp.
262     with_fp=no ;;
263
264   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
265   | --no-cr | --no-c)
266     no_create=yes ;;
267
268   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
269   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
270     no_recursion=yes ;;
271
272   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
273   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
274   | --oldin | --oldi | --old | --ol | --o)
275     ac_prev=oldincludedir ;;
276   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
277   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
278   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
279     oldincludedir="$ac_optarg" ;;
280
281   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
282     ac_prev=prefix ;;
283   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
284     prefix="$ac_optarg" ;;
285
286   -program-prefix | --program-prefix | --program-prefi | --program-pref \
287   | --program-pre | --program-pr | --program-p)
288     ac_prev=program_prefix ;;
289   -program-prefix=* | --program-prefix=* | --program-prefi=* \
290   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
291     program_prefix="$ac_optarg" ;;
292
293   -program-suffix | --program-suffix | --program-suffi | --program-suff \
294   | --program-suf | --program-su | --program-s)
295     ac_prev=program_suffix ;;
296   -program-suffix=* | --program-suffix=* | --program-suffi=* \
297   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
298     program_suffix="$ac_optarg" ;;
299
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     ac_prev=program_transform_name ;;
308   -program-transform-name=* | --program-transform-name=* \
309   | --program-transform-nam=* | --program-transform-na=* \
310   | --program-transform-n=* | --program-transform-=* \
311   | --program-transform=* | --program-transfor=* \
312   | --program-transfo=* | --program-transf=* \
313   | --program-trans=* | --program-tran=* \
314   | --progr-tra=* | --program-tr=* | --program-t=*)
315     program_transform_name="$ac_optarg" ;;
316
317   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
318   | -silent | --silent | --silen | --sile | --sil)
319     silent=yes ;;
320
321   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
322     ac_prev=sbindir ;;
323   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
324   | --sbi=* | --sb=*)
325     sbindir="$ac_optarg" ;;
326
327   -sharedstatedir | --sharedstatedir | --sharedstatedi \
328   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
329   | --sharedst | --shareds | --shared | --share | --shar \
330   | --sha | --sh)
331     ac_prev=sharedstatedir ;;
332   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
333   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
334   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
335   | --sha=* | --sh=*)
336     sharedstatedir="$ac_optarg" ;;
337
338   -site | --site | --sit)
339     ac_prev=site ;;
340   -site=* | --site=* | --sit=*)
341     site="$ac_optarg" ;;
342
343   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
344     ac_prev=srcdir ;;
345   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
346     srcdir="$ac_optarg" ;;
347
348   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
349   | --syscon | --sysco | --sysc | --sys | --sy)
350     ac_prev=sysconfdir ;;
351   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
352   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
353     sysconfdir="$ac_optarg" ;;
354
355   -target | --target | --targe | --targ | --tar | --ta | --t)
356     ac_prev=target ;;
357   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
358     target="$ac_optarg" ;;
359
360   -v | -verbose | --verbose | --verbos | --verbo | --verb)
361     verbose=yes ;;
362
363   -version | --version | --versio | --versi | --vers)
364     echo "configure generated by autoconf version 2.13"
365     exit 0 ;;
366
367   -with-* | --with-*)
368     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
369     # Reject names that are not valid shell variable names.
370     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
371       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
372     fi
373     ac_package=`echo $ac_package| sed 's/-/_/g'`
374     case "$ac_option" in
375       *=*) ;;
376       *) ac_optarg=yes ;;
377     esac
378     eval "with_${ac_package}='$ac_optarg'" ;;
379
380   -without-* | --without-*)
381     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
382     # Reject names that are not valid shell variable names.
383     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
384       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
385     fi
386     ac_package=`echo $ac_package| sed 's/-/_/g'`
387     eval "with_${ac_package}=no" ;;
388
389   --x)
390     # Obsolete; use --with-x.
391     with_x=yes ;;
392
393   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
394   | --x-incl | --x-inc | --x-in | --x-i)
395     ac_prev=x_includes ;;
396   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
397   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
398     x_includes="$ac_optarg" ;;
399
400   -x-libraries | --x-libraries | --x-librarie | --x-librari \
401   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
402     ac_prev=x_libraries ;;
403   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
404   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
405     x_libraries="$ac_optarg" ;;
406
407   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
408     ;;
409
410   *)
411     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
412       echo "configure: warning: $ac_option: invalid host type" 1>&2
413     fi
414     if test "x$nonopt" != xNONE; then
415       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
416     fi
417     nonopt="$ac_option"
418     ;;
419
420   esac
421 done
422
423 if test -n "$ac_prev"; then
424   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
425 fi
426
427 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
428
429 # File descriptor usage:
430 # 0 standard input
431 # 1 file creation
432 # 2 errors and warnings
433 # 3 some systems may open it to /dev/tty
434 # 4 used on the Kubota Titan
435 # 6 checking for... messages and results
436 # 5 compiler messages saved in config.log
437 if test "$silent" = yes; then
438   exec 6>/dev/null
439 else
440   exec 6>&1
441 fi
442 exec 5>./config.log
443
444 echo "\
445 This file contains any messages produced by compilers while
446 running configure, to aid debugging if configure makes a mistake.
447 " 1>&5
448
449 # Strip out --no-create and --no-recursion so they do not pile up.
450 # Also quote any args containing shell metacharacters.
451 ac_configure_args=
452 for ac_arg
453 do
454   case "$ac_arg" in
455   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
456   | --no-cr | --no-c) ;;
457   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
458   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
459   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
460   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
461   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
462   esac
463 done
464
465 # NLS nuisances.
466 # Only set these to C if already set.  These must not be set unconditionally
467 # because not all systems understand e.g. LANG=C (notably SCO).
468 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
469 # Non-C LC_CTYPE values break the ctype check.
470 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
471 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
472 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
473 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
474
475 # confdefs.h avoids OS command line length limits that DEFS can exceed.
476 rm -rf conftest* confdefs.h
477 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
478 echo > confdefs.h
479
480 # A filename unique to this package, relative to the directory that
481 # configure is in, which we can look for to find out if srcdir is correct.
482 ac_unique_file=lukemftpd.h
483
484 # Find the source files, if location was not specified.
485 if test -z "$srcdir"; then
486   ac_srcdir_defaulted=yes
487   # Try the directory containing this script, then its parent.
488   ac_prog=$0
489   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
490   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
491   srcdir=$ac_confdir
492   if test ! -r $srcdir/$ac_unique_file; then
493     srcdir=..
494   fi
495 else
496   ac_srcdir_defaulted=no
497 fi
498 if test ! -r $srcdir/$ac_unique_file; then
499   if test "$ac_srcdir_defaulted" = yes; then
500     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
501   else
502     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
503   fi
504 fi
505 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
506
507 # Prefer explicitly selected file to automatically selected ones.
508 if test -z "$CONFIG_SITE"; then
509   if test "x$prefix" != xNONE; then
510     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
511   else
512     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
513   fi
514 fi
515 for ac_site_file in $CONFIG_SITE; do
516   if test -r "$ac_site_file"; then
517     echo "loading site script $ac_site_file"
518     . "$ac_site_file"
519   fi
520 done
521
522 if test -r "$cache_file"; then
523   echo "loading cache $cache_file"
524   . $cache_file
525 else
526   echo "creating cache $cache_file"
527   > $cache_file
528 fi
529
530 ac_ext=c
531 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
532 ac_cpp='$CPP $CPPFLAGS'
533 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
534 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
535 cross_compiling=$ac_cv_prog_cc_cross
536
537 ac_exeext=
538 ac_objext=o
539 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
540   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
541   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
542     ac_n= ac_c='
543 ' ac_t='        '
544   else
545     ac_n=-n ac_c= ac_t=
546   fi
547 else
548   ac_n= ac_c='\c' ac_t=
549 fi
550
551
552
553
554 # Check whether --enable-ipv6 or --disable-ipv6 was given.
555 if test "${enable_ipv6+set}" = set; then
556   enableval="$enable_ipv6"
557   opt_ipv6=$enableval
558 else
559   opt_ipv6=yes
560 fi
561
562 # Check whether --enable-builtinls or --disable-builtinls was given.
563 if test "${enable_builtinls+set}" = set; then
564   enableval="$enable_builtinls"
565   opt_builtinls=$enableval
566 else
567   opt_builtinls=yes
568 fi
569
570
571
572 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
573 echo "configure:574: checking whether ${MAKE-make} sets \${MAKE}" >&5
574 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
575 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
576   echo $ac_n "(cached) $ac_c" 1>&6
577 else
578   cat > conftestmake <<\EOF
579 all:
580         @echo 'ac_maketemp="${MAKE}"'
581 EOF
582 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
583 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
584 if test -n "$ac_maketemp"; then
585   eval ac_cv_prog_make_${ac_make}_set=yes
586 else
587   eval ac_cv_prog_make_${ac_make}_set=no
588 fi
589 rm -f conftestmake
590 fi
591 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
592   echo "$ac_t""yes" 1>&6
593   SET_MAKE=
594 else
595   echo "$ac_t""no" 1>&6
596   SET_MAKE="MAKE=${MAKE-make}"
597 fi
598
599 # Extract the first word of "gcc", so it can be a program name with args.
600 set dummy gcc; ac_word=$2
601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
602 echo "configure:603: checking for $ac_word" >&5
603 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
604   echo $ac_n "(cached) $ac_c" 1>&6
605 else
606   if test -n "$CC"; then
607   ac_cv_prog_CC="$CC" # Let the user override the test.
608 else
609   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
610   ac_dummy="$PATH"
611   for ac_dir in $ac_dummy; do
612     test -z "$ac_dir" && ac_dir=.
613     if test -f $ac_dir/$ac_word; then
614       ac_cv_prog_CC="gcc"
615       break
616     fi
617   done
618   IFS="$ac_save_ifs"
619 fi
620 fi
621 CC="$ac_cv_prog_CC"
622 if test -n "$CC"; then
623   echo "$ac_t""$CC" 1>&6
624 else
625   echo "$ac_t""no" 1>&6
626 fi
627
628 if test -z "$CC"; then
629   # Extract the first word of "cc", so it can be a program name with args.
630 set dummy cc; ac_word=$2
631 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
632 echo "configure:633: checking for $ac_word" >&5
633 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
634   echo $ac_n "(cached) $ac_c" 1>&6
635 else
636   if test -n "$CC"; then
637   ac_cv_prog_CC="$CC" # Let the user override the test.
638 else
639   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
640   ac_prog_rejected=no
641   ac_dummy="$PATH"
642   for ac_dir in $ac_dummy; do
643     test -z "$ac_dir" && ac_dir=.
644     if test -f $ac_dir/$ac_word; then
645       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
646         ac_prog_rejected=yes
647         continue
648       fi
649       ac_cv_prog_CC="cc"
650       break
651     fi
652   done
653   IFS="$ac_save_ifs"
654 if test $ac_prog_rejected = yes; then
655   # We found a bogon in the path, so make sure we never use it.
656   set dummy $ac_cv_prog_CC
657   shift
658   if test $# -gt 0; then
659     # We chose a different compiler from the bogus one.
660     # However, it has the same basename, so the bogon will be chosen
661     # first if we set CC to just the basename; use the full file name.
662     shift
663     set dummy "$ac_dir/$ac_word" "$@"
664     shift
665     ac_cv_prog_CC="$@"
666   fi
667 fi
668 fi
669 fi
670 CC="$ac_cv_prog_CC"
671 if test -n "$CC"; then
672   echo "$ac_t""$CC" 1>&6
673 else
674   echo "$ac_t""no" 1>&6
675 fi
676
677   if test -z "$CC"; then
678     case "`uname -s`" in
679     *win32* | *WIN32*)
680       # Extract the first word of "cl", so it can be a program name with args.
681 set dummy cl; ac_word=$2
682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
683 echo "configure:684: checking for $ac_word" >&5
684 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
685   echo $ac_n "(cached) $ac_c" 1>&6
686 else
687   if test -n "$CC"; then
688   ac_cv_prog_CC="$CC" # Let the user override the test.
689 else
690   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
691   ac_dummy="$PATH"
692   for ac_dir in $ac_dummy; do
693     test -z "$ac_dir" && ac_dir=.
694     if test -f $ac_dir/$ac_word; then
695       ac_cv_prog_CC="cl"
696       break
697     fi
698   done
699   IFS="$ac_save_ifs"
700 fi
701 fi
702 CC="$ac_cv_prog_CC"
703 if test -n "$CC"; then
704   echo "$ac_t""$CC" 1>&6
705 else
706   echo "$ac_t""no" 1>&6
707 fi
708  ;;
709     esac
710   fi
711   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
712 fi
713
714 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
715 echo "configure:716: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
716
717 ac_ext=c
718 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
719 ac_cpp='$CPP $CPPFLAGS'
720 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
721 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
722 cross_compiling=$ac_cv_prog_cc_cross
723
724 cat > conftest.$ac_ext << EOF
725
726 #line 727 "configure"
727 #include "confdefs.h"
728
729 main(){return(0);}
730 EOF
731 if { (eval echo configure:732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
732   ac_cv_prog_cc_works=yes
733   # If we can't run a trivial program, we are probably using a cross compiler.
734   if (./conftest; exit) 2>/dev/null; then
735     ac_cv_prog_cc_cross=no
736   else
737     ac_cv_prog_cc_cross=yes
738   fi
739 else
740   echo "configure: failed program was:" >&5
741   cat conftest.$ac_ext >&5
742   ac_cv_prog_cc_works=no
743 fi
744 rm -fr conftest*
745 ac_ext=c
746 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
747 ac_cpp='$CPP $CPPFLAGS'
748 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
749 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
750 cross_compiling=$ac_cv_prog_cc_cross
751
752 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
753 if test $ac_cv_prog_cc_works = no; then
754   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
755 fi
756 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
757 echo "configure:758: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
758 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
759 cross_compiling=$ac_cv_prog_cc_cross
760
761 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
762 echo "configure:763: checking whether we are using GNU C" >&5
763 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
764   echo $ac_n "(cached) $ac_c" 1>&6
765 else
766   cat > conftest.c <<EOF
767 #ifdef __GNUC__
768   yes;
769 #endif
770 EOF
771 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
772   ac_cv_prog_gcc=yes
773 else
774   ac_cv_prog_gcc=no
775 fi
776 fi
777
778 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
779
780 if test $ac_cv_prog_gcc = yes; then
781   GCC=yes
782 else
783   GCC=
784 fi
785
786 ac_test_CFLAGS="${CFLAGS+set}"
787 ac_save_CFLAGS="$CFLAGS"
788 CFLAGS=
789 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
790 echo "configure:791: checking whether ${CC-cc} accepts -g" >&5
791 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
792   echo $ac_n "(cached) $ac_c" 1>&6
793 else
794   echo 'void f(){}' > conftest.c
795 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
796   ac_cv_prog_cc_g=yes
797 else
798   ac_cv_prog_cc_g=no
799 fi
800 rm -f conftest*
801
802 fi
803
804 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
805 if test "$ac_test_CFLAGS" = set; then
806   CFLAGS="$ac_save_CFLAGS"
807 elif test $ac_cv_prog_cc_g = yes; then
808   if test "$GCC" = yes; then
809     CFLAGS="-g -O2"
810   else
811     CFLAGS="-g"
812   fi
813 else
814   if test "$GCC" = yes; then
815     CFLAGS="-O2"
816   else
817     CFLAGS=
818   fi
819 fi
820
821 for ac_prog in mawk gawk nawk awk
822 do
823 # Extract the first word of "$ac_prog", so it can be a program name with args.
824 set dummy $ac_prog; ac_word=$2
825 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
826 echo "configure:827: checking for $ac_word" >&5
827 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
828   echo $ac_n "(cached) $ac_c" 1>&6
829 else
830   if test -n "$AWK"; then
831   ac_cv_prog_AWK="$AWK" # Let the user override the test.
832 else
833   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
834   ac_dummy="$PATH"
835   for ac_dir in $ac_dummy; do
836     test -z "$ac_dir" && ac_dir=.
837     if test -f $ac_dir/$ac_word; then
838       ac_cv_prog_AWK="$ac_prog"
839       break
840     fi
841   done
842   IFS="$ac_save_ifs"
843 fi
844 fi
845 AWK="$ac_cv_prog_AWK"
846 if test -n "$AWK"; then
847   echo "$ac_t""$AWK" 1>&6
848 else
849   echo "$ac_t""no" 1>&6
850 fi
851
852 test -n "$AWK" && break
853 done
854
855 ac_aux_dir=
856 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
857   if test -f $ac_dir/install-sh; then
858     ac_aux_dir=$ac_dir
859     ac_install_sh="$ac_aux_dir/install-sh -c"
860     break
861   elif test -f $ac_dir/install.sh; then
862     ac_aux_dir=$ac_dir
863     ac_install_sh="$ac_aux_dir/install.sh -c"
864     break
865   fi
866 done
867 if test -z "$ac_aux_dir"; then
868   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
869 fi
870 ac_config_guess=$ac_aux_dir/config.guess
871 ac_config_sub=$ac_aux_dir/config.sub
872 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
873
874 # Find a good install program.  We prefer a C program (faster),
875 # so one script is as good as another.  But avoid the broken or
876 # incompatible versions:
877 # SysV /etc/install, /usr/sbin/install
878 # SunOS /usr/etc/install
879 # IRIX /sbin/install
880 # AIX /bin/install
881 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
882 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
883 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
884 # ./install, which can be erroneously created by make from ./install.sh.
885 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
886 echo "configure:887: checking for a BSD compatible install" >&5
887 if test -z "$INSTALL"; then
888 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
889   echo $ac_n "(cached) $ac_c" 1>&6
890 else
891     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
892   for ac_dir in $PATH; do
893     # Account for people who put trailing slashes in PATH elements.
894     case "$ac_dir/" in
895     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
896     *)
897       # OSF1 and SCO ODT 3.0 have their own names for install.
898       # Don't use installbsd from OSF since it installs stuff as root
899       # by default.
900       for ac_prog in ginstall scoinst install; do
901         if test -f $ac_dir/$ac_prog; then
902           if test $ac_prog = install &&
903             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
904             # AIX install.  It has an incompatible calling convention.
905             :
906           else
907             ac_cv_path_install="$ac_dir/$ac_prog -c"
908             break 2
909           fi
910         fi
911       done
912       ;;
913     esac
914   done
915   IFS="$ac_save_IFS"
916
917 fi
918   if test "${ac_cv_path_install+set}" = set; then
919     INSTALL="$ac_cv_path_install"
920   else
921     # As a last resort, use the slow shell script.  We don't cache a
922     # path for INSTALL within a source directory, because that will
923     # break other packages using the cache if that directory is
924     # removed, or if the path is relative.
925     INSTALL="$ac_install_sh"
926   fi
927 fi
928 echo "$ac_t""$INSTALL" 1>&6
929
930 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
931 # It thinks the first close brace ends the variable substitution.
932 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
933
934 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
935
936 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
937
938 # Extract the first word of "ranlib", so it can be a program name with args.
939 set dummy ranlib; ac_word=$2
940 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
941 echo "configure:942: checking for $ac_word" >&5
942 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
943   echo $ac_n "(cached) $ac_c" 1>&6
944 else
945   if test -n "$RANLIB"; then
946   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
947 else
948   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
949   ac_dummy="$PATH"
950   for ac_dir in $ac_dummy; do
951     test -z "$ac_dir" && ac_dir=.
952     if test -f $ac_dir/$ac_word; then
953       ac_cv_prog_RANLIB="ranlib"
954       break
955     fi
956   done
957   IFS="$ac_save_ifs"
958   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
959 fi
960 fi
961 RANLIB="$ac_cv_prog_RANLIB"
962 if test -n "$RANLIB"; then
963   echo "$ac_t""$RANLIB" 1>&6
964 else
965   echo "$ac_t""no" 1>&6
966 fi
967
968 for ac_prog in 'bison -y' byacc
969 do
970 # Extract the first word of "$ac_prog", so it can be a program name with args.
971 set dummy $ac_prog; ac_word=$2
972 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
973 echo "configure:974: checking for $ac_word" >&5
974 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
975   echo $ac_n "(cached) $ac_c" 1>&6
976 else
977   if test -n "$YACC"; then
978   ac_cv_prog_YACC="$YACC" # Let the user override the test.
979 else
980   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
981   ac_dummy="$PATH"
982   for ac_dir in $ac_dummy; do
983     test -z "$ac_dir" && ac_dir=.
984     if test -f $ac_dir/$ac_word; then
985       ac_cv_prog_YACC="$ac_prog"
986       break
987     fi
988   done
989   IFS="$ac_save_ifs"
990 fi
991 fi
992 YACC="$ac_cv_prog_YACC"
993 if test -n "$YACC"; then
994   echo "$ac_t""$YACC" 1>&6
995 else
996   echo "$ac_t""no" 1>&6
997 fi
998
999 test -n "$YACC" && break
1000 done
1001 test -n "$YACC" || YACC="yacc"
1002
1003 for ac_prog in ar
1004 do
1005 # Extract the first word of "$ac_prog", so it can be a program name with args.
1006 set dummy $ac_prog; ac_word=$2
1007 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1008 echo "configure:1009: checking for $ac_word" >&5
1009 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1010   echo $ac_n "(cached) $ac_c" 1>&6
1011 else
1012   if test -n "$AR"; then
1013   ac_cv_prog_AR="$AR" # Let the user override the test.
1014 else
1015   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1016   ac_dummy="$PATH"
1017   for ac_dir in $ac_dummy; do
1018     test -z "$ac_dir" && ac_dir=.
1019     if test -f $ac_dir/$ac_word; then
1020       ac_cv_prog_AR="$ac_prog"
1021       break
1022     fi
1023   done
1024   IFS="$ac_save_ifs"
1025 fi
1026 fi
1027 AR="$ac_cv_prog_AR"
1028 if test -n "$AR"; then
1029   echo "$ac_t""$AR" 1>&6
1030 else
1031   echo "$ac_t""no" 1>&6
1032 fi
1033
1034 test -n "$AR" && break
1035 done
1036
1037
1038
1039 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
1040 echo "configure:1041: checking for crypt in -lcrypt" >&5
1041 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
1042 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1043   echo $ac_n "(cached) $ac_c" 1>&6
1044 else
1045   ac_save_LIBS="$LIBS"
1046 LIBS="-lcrypt  $LIBS"
1047 cat > conftest.$ac_ext <<EOF
1048 #line 1049 "configure"
1049 #include "confdefs.h"
1050 /* Override any gcc2 internal prototype to avoid an error.  */
1051 /* We use char because int might match the return type of a gcc2
1052     builtin and then its argument prototype would still apply.  */
1053 char crypt();
1054
1055 int main() {
1056 crypt()
1057 ; return 0; }
1058 EOF
1059 if { (eval echo configure:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1060   rm -rf conftest*
1061   eval "ac_cv_lib_$ac_lib_var=yes"
1062 else
1063   echo "configure: failed program was:" >&5
1064   cat conftest.$ac_ext >&5
1065   rm -rf conftest*
1066   eval "ac_cv_lib_$ac_lib_var=no"
1067 fi
1068 rm -f conftest*
1069 LIBS="$ac_save_LIBS"
1070
1071 fi
1072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1073   echo "$ac_t""yes" 1>&6
1074     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1075     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1076   cat >> confdefs.h <<EOF
1077 #define $ac_tr_lib 1
1078 EOF
1079
1080   LIBS="-lcrypt $LIBS"
1081
1082 else
1083   echo "$ac_t""no" 1>&6
1084 fi
1085
1086 echo $ac_n "checking for fparseln in -lutil""... $ac_c" 1>&6
1087 echo "configure:1088: checking for fparseln in -lutil" >&5
1088 ac_lib_var=`echo util'_'fparseln | sed 'y%./+-%__p_%'`
1089 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1090   echo $ac_n "(cached) $ac_c" 1>&6
1091 else
1092   ac_save_LIBS="$LIBS"
1093 LIBS="-lutil  $LIBS"
1094 cat > conftest.$ac_ext <<EOF
1095 #line 1096 "configure"
1096 #include "confdefs.h"
1097 /* Override any gcc2 internal prototype to avoid an error.  */
1098 /* We use char because int might match the return type of a gcc2
1099     builtin and then its argument prototype would still apply.  */
1100 char fparseln();
1101
1102 int main() {
1103 fparseln()
1104 ; return 0; }
1105 EOF
1106 if { (eval echo configure:1107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1107   rm -rf conftest*
1108   eval "ac_cv_lib_$ac_lib_var=yes"
1109 else
1110   echo "configure: failed program was:" >&5
1111   cat conftest.$ac_ext >&5
1112   rm -rf conftest*
1113   eval "ac_cv_lib_$ac_lib_var=no"
1114 fi
1115 rm -f conftest*
1116 LIBS="$ac_save_LIBS"
1117
1118 fi
1119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1120   echo "$ac_t""yes" 1>&6
1121     ac_tr_lib=HAVE_LIB`echo util | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1122     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1123   cat >> confdefs.h <<EOF
1124 #define $ac_tr_lib 1
1125 EOF
1126
1127   LIBS="-lutil $LIBS"
1128
1129 else
1130   echo "$ac_t""no" 1>&6
1131 fi
1132
1133 if test $ac_cv_lib_util_fparseln != yes; then
1134         echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
1135 echo "configure:1136: checking for setproctitle in -lutil" >&5
1136 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-%__p_%'`
1137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1138   echo $ac_n "(cached) $ac_c" 1>&6
1139 else
1140   ac_save_LIBS="$LIBS"
1141 LIBS="-lutil  $LIBS"
1142 cat > conftest.$ac_ext <<EOF
1143 #line 1144 "configure"
1144 #include "confdefs.h"
1145 /* Override any gcc2 internal prototype to avoid an error.  */
1146 /* We use char because int might match the return type of a gcc2
1147     builtin and then its argument prototype would still apply.  */
1148 char setproctitle();
1149
1150 int main() {
1151 setproctitle()
1152 ; return 0; }
1153 EOF
1154 if { (eval echo configure:1155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1155   rm -rf conftest*
1156   eval "ac_cv_lib_$ac_lib_var=yes"
1157 else
1158   echo "configure: failed program was:" >&5
1159   cat conftest.$ac_ext >&5
1160   rm -rf conftest*
1161   eval "ac_cv_lib_$ac_lib_var=no"
1162 fi
1163 rm -f conftest*
1164 LIBS="$ac_save_LIBS"
1165
1166 fi
1167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1168   echo "$ac_t""yes" 1>&6
1169     ac_tr_lib=HAVE_LIB`echo util | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1171   cat >> confdefs.h <<EOF
1172 #define $ac_tr_lib 1
1173 EOF
1174
1175   LIBS="-lutil $LIBS"
1176
1177 else
1178   echo "$ac_t""no" 1>&6
1179 fi
1180
1181 fi
1182
1183    # Most operating systems have gethostbyname() in the default searched
1184    # libraries (i.e. libc):
1185    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1186 echo "configure:1187: checking for gethostbyname" >&5
1187 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1188   echo $ac_n "(cached) $ac_c" 1>&6
1189 else
1190   cat > conftest.$ac_ext <<EOF
1191 #line 1192 "configure"
1192 #include "confdefs.h"
1193 /* System header to define __stub macros and hopefully few prototypes,
1194     which can conflict with char gethostbyname(); below.  */
1195 #include <assert.h>
1196 /* Override any gcc2 internal prototype to avoid an error.  */
1197 /* We use char because int might match the return type of a gcc2
1198     builtin and then its argument prototype would still apply.  */
1199 char gethostbyname();
1200
1201 int main() {
1202
1203 /* The GNU C library defines this for functions which it implements
1204     to always fail with ENOSYS.  Some functions are actually named
1205     something starting with __ and the normal name is an alias.  */
1206 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1207 choke me
1208 #else
1209 gethostbyname();
1210 #endif
1211
1212 ; return 0; }
1213 EOF
1214 if { (eval echo configure:1215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1215   rm -rf conftest*
1216   eval "ac_cv_func_gethostbyname=yes"
1217 else
1218   echo "configure: failed program was:" >&5
1219   cat conftest.$ac_ext >&5
1220   rm -rf conftest*
1221   eval "ac_cv_func_gethostbyname=no"
1222 fi
1223 rm -f conftest*
1224 fi
1225
1226 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1227   echo "$ac_t""yes" 1>&6
1228   :
1229 else
1230   echo "$ac_t""no" 1>&6
1231 # Some OSes (eg. Solaris) place it in libnsl:
1232      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1233 echo "configure:1234: checking for gethostbyname in -lnsl" >&5
1234 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1236   echo $ac_n "(cached) $ac_c" 1>&6
1237 else
1238   ac_save_LIBS="$LIBS"
1239 LIBS="-lnsl  $LIBS"
1240 cat > conftest.$ac_ext <<EOF
1241 #line 1242 "configure"
1242 #include "confdefs.h"
1243 /* Override any gcc2 internal prototype to avoid an error.  */
1244 /* We use char because int might match the return type of a gcc2
1245     builtin and then its argument prototype would still apply.  */
1246 char gethostbyname();
1247
1248 int main() {
1249 gethostbyname()
1250 ; return 0; }
1251 EOF
1252 if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1253   rm -rf conftest*
1254   eval "ac_cv_lib_$ac_lib_var=yes"
1255 else
1256   echo "configure: failed program was:" >&5
1257   cat conftest.$ac_ext >&5
1258   rm -rf conftest*
1259   eval "ac_cv_lib_$ac_lib_var=no"
1260 fi
1261 rm -f conftest*
1262 LIBS="$ac_save_LIBS"
1263
1264 fi
1265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1266   echo "$ac_t""yes" 1>&6
1267     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
1268     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1269   cat >> confdefs.h <<EOF
1270 #define $ac_tr_lib 1
1271 EOF
1272
1273   LIBS="-lnsl $LIBS"
1274
1275 else
1276   echo "$ac_t""no" 1>&6
1277 # Some strange OSes (SINIX) have it in libsocket:
1278        echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
1279 echo "configure:1280: checking for gethostbyname in -lsocket" >&5
1280 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
1281 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1282   echo $ac_n "(cached) $ac_c" 1>&6
1283 else
1284   ac_save_LIBS="$LIBS"
1285 LIBS="-lsocket  $LIBS"
1286 cat > conftest.$ac_ext <<EOF
1287 #line 1288 "configure"
1288 #include "confdefs.h"
1289 /* Override any gcc2 internal prototype to avoid an error.  */
1290 /* We use char because int might match the return type of a gcc2
1291     builtin and then its argument prototype would still apply.  */
1292 char gethostbyname();
1293
1294 int main() {
1295 gethostbyname()
1296 ; return 0; }
1297 EOF
1298 if { (eval echo configure:1299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1299   rm -rf conftest*
1300   eval "ac_cv_lib_$ac_lib_var=yes"
1301 else
1302   echo "configure: failed program was:" >&5
1303   cat conftest.$ac_ext >&5
1304   rm -rf conftest*
1305   eval "ac_cv_lib_$ac_lib_var=no"
1306 fi
1307 rm -f conftest*
1308 LIBS="$ac_save_LIBS"
1309
1310 fi
1311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1312   echo "$ac_t""yes" 1>&6
1313     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
1314     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1315   cat >> confdefs.h <<EOF
1316 #define $ac_tr_lib 1
1317 EOF
1318
1319   LIBS="-lsocket $LIBS"
1320
1321 else
1322   echo "$ac_t""no" 1>&6
1323 # Unfortunately libsocket sometimes depends on libnsl.
1324           # AC_CHECK_LIB's API is essentially broken so the following
1325           # ugliness is necessary:
1326           echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
1327 echo "configure:1328: checking for gethostbyname in -lsocket" >&5
1328 ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
1329 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1330   echo $ac_n "(cached) $ac_c" 1>&6
1331 else
1332   ac_save_LIBS="$LIBS"
1333 LIBS="-lsocket -lnsl $LIBS"
1334 cat > conftest.$ac_ext <<EOF
1335 #line 1336 "configure"
1336 #include "confdefs.h"
1337 /* Override any gcc2 internal prototype to avoid an error.  */
1338 /* We use char because int might match the return type of a gcc2
1339     builtin and then its argument prototype would still apply.  */
1340 char gethostbyname();
1341
1342 int main() {
1343 gethostbyname()
1344 ; return 0; }
1345 EOF
1346 if { (eval echo configure:1347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1347   rm -rf conftest*
1348   eval "ac_cv_lib_$ac_lib_var=yes"
1349 else
1350   echo "configure: failed program was:" >&5
1351   cat conftest.$ac_ext >&5
1352   rm -rf conftest*
1353   eval "ac_cv_lib_$ac_lib_var=no"
1354 fi
1355 rm -f conftest*
1356 LIBS="$ac_save_LIBS"
1357
1358 fi
1359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1360   echo "$ac_t""yes" 1>&6
1361   LIBS="-lsocket -lnsl $LIBS"
1362 else
1363   echo "$ac_t""no" 1>&6
1364 echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
1365 echo "configure:1366: checking for gethostbyname in -lresolv" >&5
1366 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
1367 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1368   echo $ac_n "(cached) $ac_c" 1>&6
1369 else
1370   ac_save_LIBS="$LIBS"
1371 LIBS="-lresolv  $LIBS"
1372 cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1375 /* Override any gcc2 internal prototype to avoid an error.  */
1376 /* We use char because int might match the return type of a gcc2
1377     builtin and then its argument prototype would still apply.  */
1378 char gethostbyname();
1379
1380 int main() {
1381 gethostbyname()
1382 ; return 0; }
1383 EOF
1384 if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1385   rm -rf conftest*
1386   eval "ac_cv_lib_$ac_lib_var=yes"
1387 else
1388   echo "configure: failed program was:" >&5
1389   cat conftest.$ac_ext >&5
1390   rm -rf conftest*
1391   eval "ac_cv_lib_$ac_lib_var=no"
1392 fi
1393 rm -f conftest*
1394 LIBS="$ac_save_LIBS"
1395
1396 fi
1397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1398   echo "$ac_t""yes" 1>&6
1399     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
1400     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1401   cat >> confdefs.h <<EOF
1402 #define $ac_tr_lib 1
1403 EOF
1404
1405   LIBS="-lresolv $LIBS"
1406
1407 else
1408   echo "$ac_t""no" 1>&6
1409 fi
1410
1411 fi
1412
1413        
1414 fi
1415
1416      
1417 fi
1418
1419    
1420 fi
1421
1422   echo $ac_n "checking for socket""... $ac_c" 1>&6
1423 echo "configure:1424: checking for socket" >&5
1424 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
1425   echo $ac_n "(cached) $ac_c" 1>&6
1426 else
1427   cat > conftest.$ac_ext <<EOF
1428 #line 1429 "configure"
1429 #include "confdefs.h"
1430 /* System header to define __stub macros and hopefully few prototypes,
1431     which can conflict with char socket(); below.  */
1432 #include <assert.h>
1433 /* Override any gcc2 internal prototype to avoid an error.  */
1434 /* We use char because int might match the return type of a gcc2
1435     builtin and then its argument prototype would still apply.  */
1436 char socket();
1437
1438 int main() {
1439
1440 /* The GNU C library defines this for functions which it implements
1441     to always fail with ENOSYS.  Some functions are actually named
1442     something starting with __ and the normal name is an alias.  */
1443 #if defined (__stub_socket) || defined (__stub___socket)
1444 choke me
1445 #else
1446 socket();
1447 #endif
1448
1449 ; return 0; }
1450 EOF
1451 if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1452   rm -rf conftest*
1453   eval "ac_cv_func_socket=yes"
1454 else
1455   echo "configure: failed program was:" >&5
1456   cat conftest.$ac_ext >&5
1457   rm -rf conftest*
1458   eval "ac_cv_func_socket=no"
1459 fi
1460 rm -f conftest*
1461 fi
1462
1463 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
1464   echo "$ac_t""yes" 1>&6
1465   :
1466 else
1467   echo "$ac_t""no" 1>&6
1468 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1469 echo "configure:1470: checking for socket in -lsocket" >&5
1470 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1471 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1472   echo $ac_n "(cached) $ac_c" 1>&6
1473 else
1474   ac_save_LIBS="$LIBS"
1475 LIBS="-lsocket  $LIBS"
1476 cat > conftest.$ac_ext <<EOF
1477 #line 1478 "configure"
1478 #include "confdefs.h"
1479 /* Override any gcc2 internal prototype to avoid an error.  */
1480 /* We use char because int might match the return type of a gcc2
1481     builtin and then its argument prototype would still apply.  */
1482 char socket();
1483
1484 int main() {
1485 socket()
1486 ; return 0; }
1487 EOF
1488 if { (eval echo configure:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1489   rm -rf conftest*
1490   eval "ac_cv_lib_$ac_lib_var=yes"
1491 else
1492   echo "configure: failed program was:" >&5
1493   cat conftest.$ac_ext >&5
1494   rm -rf conftest*
1495   eval "ac_cv_lib_$ac_lib_var=no"
1496 fi
1497 rm -f conftest*
1498 LIBS="$ac_save_LIBS"
1499
1500 fi
1501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1502   echo "$ac_t""yes" 1>&6
1503     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
1504     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1505   cat >> confdefs.h <<EOF
1506 #define $ac_tr_lib 1
1507 EOF
1508
1509   LIBS="-lsocket $LIBS"
1510
1511 else
1512   echo "$ac_t""no" 1>&6
1513 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1514 echo "configure:1515: checking for socket in -lsocket" >&5
1515 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1516 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1517   echo $ac_n "(cached) $ac_c" 1>&6
1518 else
1519   ac_save_LIBS="$LIBS"
1520 LIBS="-lsocket -lnsl $LIBS"
1521 cat > conftest.$ac_ext <<EOF
1522 #line 1523 "configure"
1523 #include "confdefs.h"
1524 /* Override any gcc2 internal prototype to avoid an error.  */
1525 /* We use char because int might match the return type of a gcc2
1526     builtin and then its argument prototype would still apply.  */
1527 char socket();
1528
1529 int main() {
1530 socket()
1531 ; return 0; }
1532 EOF
1533 if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1534   rm -rf conftest*
1535   eval "ac_cv_lib_$ac_lib_var=yes"
1536 else
1537   echo "configure: failed program was:" >&5
1538   cat conftest.$ac_ext >&5
1539   rm -rf conftest*
1540   eval "ac_cv_lib_$ac_lib_var=no"
1541 fi
1542 rm -f conftest*
1543 LIBS="$ac_save_LIBS"
1544
1545 fi
1546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1547   echo "$ac_t""yes" 1>&6
1548   LIBS="-lsocket -lnsl $LIBS"
1549 else
1550   echo "$ac_t""no" 1>&6
1551 fi
1552
1553 fi
1554
1555 fi
1556
1557   
1558
1559     echo $ac_n "checking whether to support SOCKS""... $ac_c" 1>&6
1560 echo "configure:1561: checking whether to support SOCKS" >&5
1561     # Check whether --with-socks or --without-socks was given.
1562 if test "${with_socks+set}" = set; then
1563   withval="$with_socks"
1564   
1565         case "$withval" in
1566         no)
1567             echo "$ac_t""no" 1>&6
1568             ;;
1569         yes)
1570             echo "$ac_t""yes" 1>&6
1571             echo $ac_n "checking for SOCKSconnect in -lsocks5""... $ac_c" 1>&6
1572 echo "configure:1573: checking for SOCKSconnect in -lsocks5" >&5
1573 ac_lib_var=`echo socks5'_'SOCKSconnect | sed 'y%./+-%__p_%'`
1574 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1575   echo $ac_n "(cached) $ac_c" 1>&6
1576 else
1577   ac_save_LIBS="$LIBS"
1578 LIBS="-lsocks5  $LIBS"
1579 cat > conftest.$ac_ext <<EOF
1580 #line 1581 "configure"
1581 #include "confdefs.h"
1582 /* Override any gcc2 internal prototype to avoid an error.  */
1583 /* We use char because int might match the return type of a gcc2
1584     builtin and then its argument prototype would still apply.  */
1585 char SOCKSconnect();
1586
1587 int main() {
1588 SOCKSconnect()
1589 ; return 0; }
1590 EOF
1591 if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1592   rm -rf conftest*
1593   eval "ac_cv_lib_$ac_lib_var=yes"
1594 else
1595   echo "configure: failed program was:" >&5
1596   cat conftest.$ac_ext >&5
1597   rm -rf conftest*
1598   eval "ac_cv_lib_$ac_lib_var=no"
1599 fi
1600 rm -f conftest*
1601 LIBS="$ac_save_LIBS"
1602
1603 fi
1604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1605   echo "$ac_t""yes" 1>&6
1606   
1607                 socks=5
1608                 LIBS="-lsocks5 $LIBS"
1609 else
1610   echo "$ac_t""no" 1>&6
1611
1612               echo $ac_n "checking for Rconnect in -lsocks""... $ac_c" 1>&6
1613 echo "configure:1614: checking for Rconnect in -lsocks" >&5
1614 ac_lib_var=`echo socks'_'Rconnect | sed 'y%./+-%__p_%'`
1615 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1616   echo $ac_n "(cached) $ac_c" 1>&6
1617 else
1618   ac_save_LIBS="$LIBS"
1619 LIBS="-lsocks  $LIBS"
1620 cat > conftest.$ac_ext <<EOF
1621 #line 1622 "configure"
1622 #include "confdefs.h"
1623 /* Override any gcc2 internal prototype to avoid an error.  */
1624 /* We use char because int might match the return type of a gcc2
1625     builtin and then its argument prototype would still apply.  */
1626 char Rconnect();
1627
1628 int main() {
1629 Rconnect()
1630 ; return 0; }
1631 EOF
1632 if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1633   rm -rf conftest*
1634   eval "ac_cv_lib_$ac_lib_var=yes"
1635 else
1636   echo "configure: failed program was:" >&5
1637   cat conftest.$ac_ext >&5
1638   rm -rf conftest*
1639   eval "ac_cv_lib_$ac_lib_var=no"
1640 fi
1641 rm -f conftest*
1642 LIBS="$ac_save_LIBS"
1643
1644 fi
1645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1646   echo "$ac_t""yes" 1>&6
1647   
1648                 socks=4
1649                 LIBS="-lsocks $LIBS"
1650 else
1651   echo "$ac_t""no" 1>&6
1652
1653                     { echo "configure: error: Could not find socks library.  You must first install socks." 1>&2; exit 1; }  
1654 fi
1655   
1656 fi
1657
1658             ;;
1659         esac
1660     
1661 else
1662   echo "$ac_t""no" 1>&6
1663     
1664 fi
1665
1666
1667     if test "x$socks" = "x"; then
1668         echo $ac_n "checking whether to support SOCKS5""... $ac_c" 1>&6
1669 echo "configure:1670: checking whether to support SOCKS5" >&5
1670         # Check whether --with-socks5 or --without-socks5 was given.
1671 if test "${with_socks5+set}" = set; then
1672   withval="$with_socks5"
1673   
1674             case "$withval" in
1675             no)
1676                 echo "$ac_t""no" 1>&6
1677                 ;;
1678             *)
1679                 echo "$ac_t""yes" 1>&6
1680                 socks=5
1681                 if test "x$withval" = "xyes"; then
1682                     withval="-lsocks5"
1683                 else
1684                     if test -d "$withval"; then
1685                         if test -d "$withval/include"; then
1686                             CFLAGS="$CFLAGS -I$withval/include"
1687                         else
1688                             CFLAGS="$CFLAGS -I$withval"
1689                         fi
1690                         if test -d "$withval/lib"; then
1691                             withval="-L$withval/lib -lsocks5"
1692                         else
1693                             withval="-L$withval -lsocks5"
1694                         fi
1695                     fi
1696                 fi
1697                 LIBS="$withval $LIBS"
1698                 # If Socks was compiled with Kerberos support, we will need
1699                 # to link against kerberos libraries.  Temporarily append
1700                 # to LIBS.  This is harmless if there is no kerberos support.
1701                 TMPLIBS="$LIBS"
1702                 LIBS="$LIBS $KERBEROS_LIBS"
1703                 cat > conftest.$ac_ext <<EOF
1704 #line 1705 "configure"
1705 #include "confdefs.h"
1706
1707 int main() {
1708  SOCKSconnect(); 
1709 ; return 0; }
1710 EOF
1711 if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1712   :
1713 else
1714   echo "configure: failed program was:" >&5
1715   cat conftest.$ac_ext >&5
1716   rm -rf conftest*
1717    { echo "configure: error: Could not find the $withval library.  You must first install socks5." 1>&2; exit 1; } 
1718 fi
1719 rm -f conftest*
1720                 LIBS="$TMPLIBS"
1721                 ;;
1722             esac
1723         
1724 else
1725   echo "$ac_t""no" 1>&6
1726         
1727 fi
1728
1729     fi
1730
1731     if test "x$socks" = "x"; then
1732         echo $ac_n "checking whether to support SOCKS4""... $ac_c" 1>&6
1733 echo "configure:1734: checking whether to support SOCKS4" >&5
1734         # Check whether --with-socks4 or --without-socks4 was given.
1735 if test "${with_socks4+set}" = set; then
1736   withval="$with_socks4"
1737   
1738             case "$withval" in
1739             no)
1740                 echo "$ac_t""no" 1>&6
1741                 ;;
1742             *)
1743                 echo "$ac_t""yes" 1>&6
1744                 socks=4
1745                 if test "x$withval" = "xyes"; then
1746                     withval="-lsocks"
1747                 else
1748                     if test -d "$withval"; then
1749                         withval="-L$withval -lsocks"
1750                     fi
1751                 fi
1752                 LIBS="$withval $LIBS"
1753                 cat > conftest.$ac_ext <<EOF
1754 #line 1755 "configure"
1755 #include "confdefs.h"
1756
1757 int main() {
1758  Rconnect(); 
1759 ; return 0; }
1760 EOF
1761 if { (eval echo configure:1762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1762   :
1763 else
1764   echo "configure: failed program was:" >&5
1765   cat conftest.$ac_ext >&5
1766   rm -rf conftest*
1767    { echo "configure: error: Could not find the $withval library.  You must first install socks." 1>&2; exit 1; } 
1768 fi
1769 rm -f conftest*
1770                 ;;
1771             esac
1772         
1773 else
1774   echo "$ac_t""no" 1>&6
1775         
1776 fi
1777
1778     fi
1779
1780     if test "x$socks" = "x4"; then
1781         cat >> confdefs.h <<\EOF
1782 #define SOCKS 1
1783 EOF
1784
1785         cat >> confdefs.h <<\EOF
1786 #define SOCKS4 1
1787 EOF
1788
1789         cat >> confdefs.h <<\EOF
1790 #define connect Rconnect
1791 EOF
1792
1793         cat >> confdefs.h <<\EOF
1794 #define getsockname Rgetsockname
1795 EOF
1796
1797         cat >> confdefs.h <<\EOF
1798 #define bind Rbind
1799 EOF
1800
1801         cat >> confdefs.h <<\EOF
1802 #define accept Raccept
1803 EOF
1804
1805         cat >> confdefs.h <<\EOF
1806 #define listen Rlisten
1807 EOF
1808
1809         cat >> confdefs.h <<\EOF
1810 #define select Rselect
1811 EOF
1812
1813     fi
1814
1815     if test "x$socks" = "x5"; then
1816         cat >> confdefs.h <<\EOF
1817 #define SOCKS 1
1818 EOF
1819
1820         cat >> confdefs.h <<\EOF
1821 #define SOCKS5 1
1822 EOF
1823
1824         cat >> confdefs.h <<\EOF
1825 #define connect SOCKSconnect
1826 EOF
1827
1828         cat >> confdefs.h <<\EOF
1829 #define getsockname SOCKSgetsockname
1830 EOF
1831
1832         cat >> confdefs.h <<\EOF
1833 #define getpeername SOCKSgetpeername
1834 EOF
1835
1836         cat >> confdefs.h <<\EOF
1837 #define bind SOCKSbind
1838 EOF
1839
1840         cat >> confdefs.h <<\EOF
1841 #define accept SOCKSaccept
1842 EOF
1843
1844         cat >> confdefs.h <<\EOF
1845 #define listen SOCKSlisten
1846 EOF
1847
1848         cat >> confdefs.h <<\EOF
1849 #define select SOCKSselect
1850 EOF
1851
1852         cat >> confdefs.h <<\EOF
1853 #define recvfrom SOCKSrecvfrom
1854 EOF
1855
1856         cat >> confdefs.h <<\EOF
1857 #define sendto SOCKSsendto
1858 EOF
1859
1860         cat >> confdefs.h <<\EOF
1861 #define recv SOCKSrecv
1862 EOF
1863
1864         cat >> confdefs.h <<\EOF
1865 #define send SOCKSsend
1866 EOF
1867
1868         cat >> confdefs.h <<\EOF
1869 #define read SOCKSread
1870 EOF
1871
1872         cat >> confdefs.h <<\EOF
1873 #define write SOCKSwrite
1874 EOF
1875
1876         cat >> confdefs.h <<\EOF
1877 #define rresvport SOCKSrresvport
1878 EOF
1879
1880         cat >> confdefs.h <<\EOF
1881 #define shutdown SOCKSshutdown
1882 EOF
1883
1884         cat >> confdefs.h <<\EOF
1885 #define listen SOCKSlisten
1886 EOF
1887
1888         cat >> confdefs.h <<\EOF
1889 #define close SOCKSclose
1890 EOF
1891
1892         cat >> confdefs.h <<\EOF
1893 #define dup SOCKSdup
1894 EOF
1895
1896         cat >> confdefs.h <<\EOF
1897 #define dup2 SOCKSdup2
1898 EOF
1899
1900         cat >> confdefs.h <<\EOF
1901 #define fclose SOCKSfclose
1902 EOF
1903
1904         cat >> confdefs.h <<\EOF
1905 #define gethostbyname SOCKSgethostbyname
1906 EOF
1907
1908     fi
1909
1910 if test -n "$socks"; then
1911         if test $opt_ipv6 = yes; then
1912                 echo "IPv6 is incompatible with socks, disabling IPv6 support"
1913                 opt_ipv6=no
1914         fi
1915 fi
1916 # Check whether --with-skey or --without-skey was given.
1917 if test "${with_skey+set}" = set; then
1918   withval="$with_skey"
1919         if test $withval = yes; then
1920                 echo $ac_n "checking for skey_haskey in -lskey""... $ac_c" 1>&6
1921 echo "configure:1922: checking for skey_haskey in -lskey" >&5
1922 ac_lib_var=`echo skey'_'skey_haskey | sed 'y%./+-%__p_%'`
1923 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1924   echo $ac_n "(cached) $ac_c" 1>&6
1925 else
1926   ac_save_LIBS="$LIBS"
1927 LIBS="-lskey  $LIBS"
1928 cat > conftest.$ac_ext <<EOF
1929 #line 1930 "configure"
1930 #include "confdefs.h"
1931 /* Override any gcc2 internal prototype to avoid an error.  */
1932 /* We use char because int might match the return type of a gcc2
1933     builtin and then its argument prototype would still apply.  */
1934 char skey_haskey();
1935
1936 int main() {
1937 skey_haskey()
1938 ; return 0; }
1939 EOF
1940 if { (eval echo configure:1941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1941   rm -rf conftest*
1942   eval "ac_cv_lib_$ac_lib_var=yes"
1943 else
1944   echo "configure: failed program was:" >&5
1945   cat conftest.$ac_ext >&5
1946   rm -rf conftest*
1947   eval "ac_cv_lib_$ac_lib_var=no"
1948 fi
1949 rm -f conftest*
1950 LIBS="$ac_save_LIBS"
1951
1952 fi
1953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1954   echo "$ac_t""yes" 1>&6
1955     ac_tr_lib=HAVE_LIB`echo skey | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1956     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1957   cat >> confdefs.h <<EOF
1958 #define $ac_tr_lib 1
1959 EOF
1960
1961   LIBS="-lskey $LIBS"
1962
1963 else
1964   echo "$ac_t""no" 1>&6
1965 fi
1966
1967         fi  
1968 fi
1969
1970 echo $ac_n "checking whether to support S/Key""... $ac_c" 1>&6
1971 echo "configure:1972: checking whether to support S/Key" >&5
1972 if test x"$ac_cv_lib_skey_skey_haskey" = "xyes"; then
1973         echo "$ac_t""yes" 1>&6
1974         cat >> confdefs.h <<\EOF
1975 #define SKEY 1
1976 EOF
1977
1978 else
1979         echo "$ac_t""no" 1>&6
1980 fi
1981
1982
1983
1984 ac_header_dirent=no
1985 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1986 do
1987 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1988 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1989 echo "configure:1990: checking for $ac_hdr that defines DIR" >&5
1990 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1991   echo $ac_n "(cached) $ac_c" 1>&6
1992 else
1993   cat > conftest.$ac_ext <<EOF
1994 #line 1995 "configure"
1995 #include "confdefs.h"
1996 #include <sys/types.h>
1997 #include <$ac_hdr>
1998 int main() {
1999 DIR *dirp = 0;
2000 ; return 0; }
2001 EOF
2002 if { (eval echo configure:2003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2003   rm -rf conftest*
2004   eval "ac_cv_header_dirent_$ac_safe=yes"
2005 else
2006   echo "configure: failed program was:" >&5
2007   cat conftest.$ac_ext >&5
2008   rm -rf conftest*
2009   eval "ac_cv_header_dirent_$ac_safe=no"
2010 fi
2011 rm -f conftest*
2012 fi
2013 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2014   echo "$ac_t""yes" 1>&6
2015     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2016   cat >> confdefs.h <<EOF
2017 #define $ac_tr_hdr 1
2018 EOF
2019  ac_header_dirent=$ac_hdr; break
2020 else
2021   echo "$ac_t""no" 1>&6
2022 fi
2023 done
2024 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2025 if test $ac_header_dirent = dirent.h; then
2026 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2027 echo "configure:2028: checking for opendir in -ldir" >&5
2028 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2029 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2030   echo $ac_n "(cached) $ac_c" 1>&6
2031 else
2032   ac_save_LIBS="$LIBS"
2033 LIBS="-ldir  $LIBS"
2034 cat > conftest.$ac_ext <<EOF
2035 #line 2036 "configure"
2036 #include "confdefs.h"
2037 /* Override any gcc2 internal prototype to avoid an error.  */
2038 /* We use char because int might match the return type of a gcc2
2039     builtin and then its argument prototype would still apply.  */
2040 char opendir();
2041
2042 int main() {
2043 opendir()
2044 ; return 0; }
2045 EOF
2046 if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2047   rm -rf conftest*
2048   eval "ac_cv_lib_$ac_lib_var=yes"
2049 else
2050   echo "configure: failed program was:" >&5
2051   cat conftest.$ac_ext >&5
2052   rm -rf conftest*
2053   eval "ac_cv_lib_$ac_lib_var=no"
2054 fi
2055 rm -f conftest*
2056 LIBS="$ac_save_LIBS"
2057
2058 fi
2059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2060   echo "$ac_t""yes" 1>&6
2061   LIBS="$LIBS -ldir"
2062 else
2063   echo "$ac_t""no" 1>&6
2064 fi
2065
2066 else
2067 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2068 echo "configure:2069: checking for opendir in -lx" >&5
2069 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2070 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2071   echo $ac_n "(cached) $ac_c" 1>&6
2072 else
2073   ac_save_LIBS="$LIBS"
2074 LIBS="-lx  $LIBS"
2075 cat > conftest.$ac_ext <<EOF
2076 #line 2077 "configure"
2077 #include "confdefs.h"
2078 /* Override any gcc2 internal prototype to avoid an error.  */
2079 /* We use char because int might match the return type of a gcc2
2080     builtin and then its argument prototype would still apply.  */
2081 char opendir();
2082
2083 int main() {
2084 opendir()
2085 ; return 0; }
2086 EOF
2087 if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2088   rm -rf conftest*
2089   eval "ac_cv_lib_$ac_lib_var=yes"
2090 else
2091   echo "configure: failed program was:" >&5
2092   cat conftest.$ac_ext >&5
2093   rm -rf conftest*
2094   eval "ac_cv_lib_$ac_lib_var=no"
2095 fi
2096 rm -f conftest*
2097 LIBS="$ac_save_LIBS"
2098
2099 fi
2100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2101   echo "$ac_t""yes" 1>&6
2102   LIBS="$LIBS -lx"
2103 else
2104   echo "$ac_t""no" 1>&6
2105 fi
2106
2107 fi
2108
2109 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2110 echo "configure:2111: checking how to run the C preprocessor" >&5
2111 # On Suns, sometimes $CPP names a directory.
2112 if test -n "$CPP" && test -d "$CPP"; then
2113   CPP=
2114 fi
2115 if test -z "$CPP"; then
2116 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2117   echo $ac_n "(cached) $ac_c" 1>&6
2118 else
2119     # This must be in double quotes, not single quotes, because CPP may get
2120   # substituted into the Makefile and "${CC-cc}" will confuse make.
2121   CPP="${CC-cc} -E"
2122   # On the NeXT, cc -E runs the code through the compiler's parser,
2123   # not just through cpp.
2124   cat > conftest.$ac_ext <<EOF
2125 #line 2126 "configure"
2126 #include "confdefs.h"
2127 #include <assert.h>
2128 Syntax Error
2129 EOF
2130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2131 { (eval echo configure:2132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2133 if test -z "$ac_err"; then
2134   :
2135 else
2136   echo "$ac_err" >&5
2137   echo "configure: failed program was:" >&5
2138   cat conftest.$ac_ext >&5
2139   rm -rf conftest*
2140   CPP="${CC-cc} -E -traditional-cpp"
2141   cat > conftest.$ac_ext <<EOF
2142 #line 2143 "configure"
2143 #include "confdefs.h"
2144 #include <assert.h>
2145 Syntax Error
2146 EOF
2147 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2148 { (eval echo configure:2149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2149 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2150 if test -z "$ac_err"; then
2151   :
2152 else
2153   echo "$ac_err" >&5
2154   echo "configure: failed program was:" >&5
2155   cat conftest.$ac_ext >&5
2156   rm -rf conftest*
2157   CPP="${CC-cc} -nologo -E"
2158   cat > conftest.$ac_ext <<EOF
2159 #line 2160 "configure"
2160 #include "confdefs.h"
2161 #include <assert.h>
2162 Syntax Error
2163 EOF
2164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2165 { (eval echo configure:2166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2167 if test -z "$ac_err"; then
2168   :
2169 else
2170   echo "$ac_err" >&5
2171   echo "configure: failed program was:" >&5
2172   cat conftest.$ac_ext >&5
2173   rm -rf conftest*
2174   CPP=/lib/cpp
2175 fi
2176 rm -f conftest*
2177 fi
2178 rm -f conftest*
2179 fi
2180 rm -f conftest*
2181   ac_cv_prog_CPP="$CPP"
2182 fi
2183   CPP="$ac_cv_prog_CPP"
2184 else
2185   ac_cv_prog_CPP="$CPP"
2186 fi
2187 echo "$ac_t""$CPP" 1>&6
2188
2189 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2190 echo "configure:2191: checking for ANSI C header files" >&5
2191 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2192   echo $ac_n "(cached) $ac_c" 1>&6
2193 else
2194   cat > conftest.$ac_ext <<EOF
2195 #line 2196 "configure"
2196 #include "confdefs.h"
2197 #include <stdlib.h>
2198 #include <stdarg.h>
2199 #include <string.h>
2200 #include <float.h>
2201 EOF
2202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2203 { (eval echo configure:2204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2205 if test -z "$ac_err"; then
2206   rm -rf conftest*
2207   ac_cv_header_stdc=yes
2208 else
2209   echo "$ac_err" >&5
2210   echo "configure: failed program was:" >&5
2211   cat conftest.$ac_ext >&5
2212   rm -rf conftest*
2213   ac_cv_header_stdc=no
2214 fi
2215 rm -f conftest*
2216
2217 if test $ac_cv_header_stdc = yes; then
2218   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2219 cat > conftest.$ac_ext <<EOF
2220 #line 2221 "configure"
2221 #include "confdefs.h"
2222 #include <string.h>
2223 EOF
2224 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2225   egrep "memchr" >/dev/null 2>&1; then
2226   :
2227 else
2228   rm -rf conftest*
2229   ac_cv_header_stdc=no
2230 fi
2231 rm -f conftest*
2232
2233 fi
2234
2235 if test $ac_cv_header_stdc = yes; then
2236   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2237 cat > conftest.$ac_ext <<EOF
2238 #line 2239 "configure"
2239 #include "confdefs.h"
2240 #include <stdlib.h>
2241 EOF
2242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2243   egrep "free" >/dev/null 2>&1; then
2244   :
2245 else
2246   rm -rf conftest*
2247   ac_cv_header_stdc=no
2248 fi
2249 rm -f conftest*
2250
2251 fi
2252
2253 if test $ac_cv_header_stdc = yes; then
2254   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2255 if test "$cross_compiling" = yes; then
2256   :
2257 else
2258   cat > conftest.$ac_ext <<EOF
2259 #line 2260 "configure"
2260 #include "confdefs.h"
2261 #include <ctype.h>
2262 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2263 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2264 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2265 int main () { int i; for (i = 0; i < 256; i++)
2266 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2267 exit (0); }
2268
2269 EOF
2270 if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2271 then
2272   :
2273 else
2274   echo "configure: failed program was:" >&5
2275   cat conftest.$ac_ext >&5
2276   rm -fr conftest*
2277   ac_cv_header_stdc=no
2278 fi
2279 rm -fr conftest*
2280 fi
2281
2282 fi
2283 fi
2284
2285 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2286 if test $ac_cv_header_stdc = yes; then
2287   cat >> confdefs.h <<\EOF
2288 #define STDC_HEADERS 1
2289 EOF
2290
2291 fi
2292
2293 for ac_hdr in arpa/nameser.h err.h fts.h libutil.h paths.h \
2294                 sys/sysmacros.h util.h
2295 do
2296 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2297 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2298 echo "configure:2299: checking for $ac_hdr" >&5
2299 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2300   echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302   cat > conftest.$ac_ext <<EOF
2303 #line 2304 "configure"
2304 #include "confdefs.h"
2305 #include <$ac_hdr>
2306 EOF
2307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2308 { (eval echo configure:2309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2310 if test -z "$ac_err"; then
2311   rm -rf conftest*
2312   eval "ac_cv_header_$ac_safe=yes"
2313 else
2314   echo "$ac_err" >&5
2315   echo "configure: failed program was:" >&5
2316   cat conftest.$ac_ext >&5
2317   rm -rf conftest*
2318   eval "ac_cv_header_$ac_safe=no"
2319 fi
2320 rm -f conftest*
2321 fi
2322 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2323   echo "$ac_t""yes" 1>&6
2324     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2325   cat >> confdefs.h <<EOF
2326 #define $ac_tr_hdr 1
2327 EOF
2328  
2329 else
2330   echo "$ac_t""no" 1>&6
2331 fi
2332 done
2333
2334
2335
2336 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2337 echo "configure:2338: checking whether time.h and sys/time.h may both be included" >&5
2338 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2339   echo $ac_n "(cached) $ac_c" 1>&6
2340 else
2341   cat > conftest.$ac_ext <<EOF
2342 #line 2343 "configure"
2343 #include "confdefs.h"
2344 #include <sys/types.h>
2345 #include <sys/time.h>
2346 #include <time.h>
2347 int main() {
2348 struct tm *tp;
2349 ; return 0; }
2350 EOF
2351 if { (eval echo configure:2352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2352   rm -rf conftest*
2353   ac_cv_header_time=yes
2354 else
2355   echo "configure: failed program was:" >&5
2356   cat conftest.$ac_ext >&5
2357   rm -rf conftest*
2358   ac_cv_header_time=no
2359 fi
2360 rm -f conftest*
2361 fi
2362
2363 echo "$ac_t""$ac_cv_header_time" 1>&6
2364 if test $ac_cv_header_time = yes; then
2365   cat >> confdefs.h <<\EOF
2366 #define TIME_WITH_SYS_TIME 1
2367 EOF
2368
2369 fi
2370
2371 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2372 echo "configure:2373: checking for off_t" >&5
2373 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2374   echo $ac_n "(cached) $ac_c" 1>&6
2375 else
2376   cat > conftest.$ac_ext <<EOF
2377 #line 2378 "configure"
2378 #include "confdefs.h"
2379 #include <sys/types.h>
2380 #if STDC_HEADERS
2381 #include <stdlib.h>
2382 #include <stddef.h>
2383 #endif
2384 EOF
2385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2386   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2387   rm -rf conftest*
2388   ac_cv_type_off_t=yes
2389 else
2390   rm -rf conftest*
2391   ac_cv_type_off_t=no
2392 fi
2393 rm -f conftest*
2394
2395 fi
2396 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2397 if test $ac_cv_type_off_t = no; then
2398   cat >> confdefs.h <<\EOF
2399 #define off_t long
2400 EOF
2401
2402 fi
2403
2404 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
2405 echo "configure:2406: checking size of off_t" >&5
2406 if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2407   echo $ac_n "(cached) $ac_c" 1>&6
2408 else
2409   if test "$cross_compiling" = yes; then
2410   ac_cv_sizeof_off_t=0
2411 else
2412   cat > conftest.$ac_ext <<EOF
2413 #line 2414 "configure"
2414 #include "confdefs.h"
2415 #include <stdio.h>
2416 main()
2417 {
2418   FILE *f=fopen("conftestval", "w");
2419   if (!f) exit(1);
2420   fprintf(f, "%d\n", sizeof(off_t));
2421   exit(0);
2422 }
2423 EOF
2424 if { (eval echo configure:2425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2425 then
2426   ac_cv_sizeof_off_t=`cat conftestval`
2427 else
2428   echo "configure: failed program was:" >&5
2429   cat conftest.$ac_ext >&5
2430   rm -fr conftest*
2431   ac_cv_sizeof_off_t=0
2432 fi
2433 rm -fr conftest*
2434 fi
2435
2436 fi
2437 echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2438 cat >> confdefs.h <<EOF
2439 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2440 EOF
2441
2442
2443
2444         echo $ac_n "checking for long long""... $ac_c" 1>&6
2445 echo "configure:2446: checking for long long" >&5
2446 if eval "test \"`echo '$''{'ftp_cv_HAVE_LONG_LONG'+set}'`\" = set"; then
2447   echo $ac_n "(cached) $ac_c" 1>&6
2448 else
2449   
2450                 cat > conftest.$ac_ext <<EOF
2451 #line 2452 "configure"
2452 #include "confdefs.h"
2453  
2454 #include <sys/types.h>  
2455 int main() {
2456  
2457 long long X = 2, Y = 1, Z;
2458 Z = X / Y; ; 
2459 ; return 0; }
2460 EOF
2461 if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2462   rm -rf conftest*
2463    ftp_cv_HAVE_LONG_LONG=yes 
2464 else
2465   echo "configure: failed program was:" >&5
2466   cat conftest.$ac_ext >&5
2467   rm -rf conftest*
2468    ftp_cv_HAVE_LONG_LONG=no 
2469 fi
2470 rm -f conftest*
2471         
2472 fi
2473
2474 echo "$ac_t""$ftp_cv_HAVE_LONG_LONG" 1>&6
2475         if test "x$ftp_cv_HAVE_LONG_LONG" = "xyes"; then
2476                 
2477 cat >> confdefs.h <<\EOF
2478 #define HAVE_LONG_LONG 1
2479 EOF
2480
2481 have_long_long=yes
2482         else
2483                 have_long_long=no
2484                 :
2485         fi
2486
2487
2488
2489         echo $ac_n "checking for in_port_t""... $ac_c" 1>&6
2490 echo "configure:2491: checking for in_port_t" >&5
2491 if eval "test \"`echo '$''{'ftp_cv_HAVE_IN_PORT_T'+set}'`\" = set"; then
2492   echo $ac_n "(cached) $ac_c" 1>&6
2493 else
2494   
2495                 cat > conftest.$ac_ext <<EOF
2496 #line 2497 "configure"
2497 #include "confdefs.h"
2498  
2499 #include <sys/types.h>
2500 #include <netinet/in.h>  
2501 int main() {
2502   in_port_t X ; 
2503 ; return 0; }
2504 EOF
2505 if { (eval echo configure:2506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2506   rm -rf conftest*
2507    ftp_cv_HAVE_IN_PORT_T=yes 
2508 else
2509   echo "configure: failed program was:" >&5
2510   cat conftest.$ac_ext >&5
2511   rm -rf conftest*
2512    ftp_cv_HAVE_IN_PORT_T=no 
2513 fi
2514 rm -f conftest*
2515         
2516 fi
2517
2518 echo "$ac_t""$ftp_cv_HAVE_IN_PORT_T" 1>&6
2519         if test "x$ftp_cv_HAVE_IN_PORT_T" = "xyes"; then
2520                 cat >> confdefs.h <<\EOF
2521 #define HAVE_IN_PORT_T 1
2522 EOF
2523
2524         else
2525                 
2526                 :
2527         fi
2528
2529
2530
2531         echo $ac_n "checking for sockaddr_in.sin_len""... $ac_c" 1>&6
2532 echo "configure:2533: checking for sockaddr_in.sin_len" >&5
2533 if eval "test \"`echo '$''{'ftp_cv_HAVE_SOCKADDR_SA_LEN'+set}'`\" = set"; then
2534   echo $ac_n "(cached) $ac_c" 1>&6
2535 else
2536   
2537                 cat > conftest.$ac_ext <<EOF
2538 #line 2539 "configure"
2539 #include "confdefs.h"
2540  
2541 #include <sys/types.h>
2542 #include <sys/socket.h>
2543 #include <netinet/in.h>  
2544 int main() {
2545  
2546         struct sockaddr_in sin;
2547         int X = sin.sin_len ; 
2548 ; return 0; }
2549 EOF
2550 if { (eval echo configure:2551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2551   rm -rf conftest*
2552    ftp_cv_HAVE_SOCKADDR_SA_LEN=yes 
2553 else
2554   echo "configure: failed program was:" >&5
2555   cat conftest.$ac_ext >&5
2556   rm -rf conftest*
2557    ftp_cv_HAVE_SOCKADDR_SA_LEN=no 
2558 fi
2559 rm -f conftest*
2560         
2561 fi
2562
2563 echo "$ac_t""$ftp_cv_HAVE_SOCKADDR_SA_LEN" 1>&6
2564         if test "x$ftp_cv_HAVE_SOCKADDR_SA_LEN" = "xyes"; then
2565                 cat >> confdefs.h <<\EOF
2566 #define HAVE_SOCKADDR_SA_LEN 1
2567 EOF
2568
2569         else
2570                 
2571                 :
2572         fi
2573
2574
2575
2576         echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
2577 echo "configure:2578: checking for socklen_t" >&5
2578 if eval "test \"`echo '$''{'ftp_cv_HAVE_SOCKLEN_T'+set}'`\" = set"; then
2579   echo $ac_n "(cached) $ac_c" 1>&6
2580 else
2581   
2582                 cat > conftest.$ac_ext <<EOF
2583 #line 2584 "configure"
2584 #include "confdefs.h"
2585  
2586 #include <sys/types.h>
2587 #include <sys/socket.h>  
2588 int main() {
2589   socklen_t X ; 
2590 ; return 0; }
2591 EOF
2592 if { (eval echo configure:2593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2593   rm -rf conftest*
2594    ftp_cv_HAVE_SOCKLEN_T=yes 
2595 else
2596   echo "configure: failed program was:" >&5
2597   cat conftest.$ac_ext >&5
2598   rm -rf conftest*
2599    ftp_cv_HAVE_SOCKLEN_T=no 
2600 fi
2601 rm -f conftest*
2602         
2603 fi
2604
2605 echo "$ac_t""$ftp_cv_HAVE_SOCKLEN_T" 1>&6
2606         if test "x$ftp_cv_HAVE_SOCKLEN_T" = "xyes"; then
2607                 cat >> confdefs.h <<\EOF
2608 #define HAVE_SOCKLEN_T 1
2609 EOF
2610
2611         else
2612                 
2613                 :
2614         fi
2615
2616
2617 if test $opt_ipv6 = yes; then
2618
2619         
2620         echo $ac_n "checking for AF_INET6""... $ac_c" 1>&6
2621 echo "configure:2622: checking for AF_INET6" >&5
2622 if eval "test \"`echo '$''{'ftp_cv_HAVE_AF_INET6'+set}'`\" = set"; then
2623   echo $ac_n "(cached) $ac_c" 1>&6
2624 else
2625   
2626                 cat > conftest.$ac_ext <<EOF
2627 #line 2628 "configure"
2628 #include "confdefs.h"
2629  
2630 #include <sys/types.h>
2631 #include <sys/socket.h>  
2632 int main() {
2633   int X = AF_INET6 ; 
2634 ; return 0; }
2635 EOF
2636 if { (eval echo configure:2637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2637   rm -rf conftest*
2638    ftp_cv_HAVE_AF_INET6=yes 
2639 else
2640   echo "configure: failed program was:" >&5
2641   cat conftest.$ac_ext >&5
2642   rm -rf conftest*
2643    ftp_cv_HAVE_AF_INET6=no 
2644 fi
2645 rm -f conftest*
2646         
2647 fi
2648
2649 echo "$ac_t""$ftp_cv_HAVE_AF_INET6" 1>&6
2650         if test "x$ftp_cv_HAVE_AF_INET6" = "xyes"; then
2651                 cat >> confdefs.h <<\EOF
2652 #define HAVE_AF_INET6 1
2653 EOF
2654
2655         else
2656                 
2657                 :
2658         fi
2659
2660
2661         
2662         echo $ac_n "checking for struct sockaddr_in6""... $ac_c" 1>&6
2663 echo "configure:2664: checking for struct sockaddr_in6" >&5
2664 if eval "test \"`echo '$''{'ftp_cv_HAVE_SOCKADDR_IN6'+set}'`\" = set"; then
2665   echo $ac_n "(cached) $ac_c" 1>&6
2666 else
2667   
2668                 cat > conftest.$ac_ext <<EOF
2669 #line 2670 "configure"
2670 #include "confdefs.h"
2671  
2672 #include <sys/types.h>
2673 #include <netinet/in.h>  
2674 int main() {
2675   struct sockaddr_in6 X ; 
2676 ; return 0; }
2677 EOF
2678 if { (eval echo configure:2679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2679   rm -rf conftest*
2680    ftp_cv_HAVE_SOCKADDR_IN6=yes 
2681 else
2682   echo "configure: failed program was:" >&5
2683   cat conftest.$ac_ext >&5
2684   rm -rf conftest*
2685    ftp_cv_HAVE_SOCKADDR_IN6=no 
2686 fi
2687 rm -f conftest*
2688         
2689 fi
2690
2691 echo "$ac_t""$ftp_cv_HAVE_SOCKADDR_IN6" 1>&6
2692         if test "x$ftp_cv_HAVE_SOCKADDR_IN6" = "xyes"; then
2693                 cat >> confdefs.h <<\EOF
2694 #define HAVE_SOCKADDR_IN6 1
2695 EOF
2696
2697         else
2698                 
2699                 :
2700         fi
2701
2702
2703 fi
2704
2705
2706         echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6
2707 echo "configure:2708: checking for struct addrinfo" >&5
2708 if eval "test \"`echo '$''{'ftp_cv_HAVE_ADDRINFO'+set}'`\" = set"; then
2709   echo $ac_n "(cached) $ac_c" 1>&6
2710 else
2711   
2712                 cat > conftest.$ac_ext <<EOF
2713 #line 2714 "configure"
2714 #include "confdefs.h"
2715  
2716 #include <sys/types.h>
2717 #include <sys/socket.h>
2718 #include <netdb.h>  
2719 int main() {
2720   struct addrinfo X ; 
2721 ; return 0; }
2722 EOF
2723 if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2724   rm -rf conftest*
2725    ftp_cv_HAVE_ADDRINFO=yes 
2726 else
2727   echo "configure: failed program was:" >&5
2728   cat conftest.$ac_ext >&5
2729   rm -rf conftest*
2730    ftp_cv_HAVE_ADDRINFO=no 
2731 fi
2732 rm -f conftest*
2733         
2734 fi
2735
2736 echo "$ac_t""$ftp_cv_HAVE_ADDRINFO" 1>&6
2737         if test "x$ftp_cv_HAVE_ADDRINFO" = "xyes"; then
2738                 cat >> confdefs.h <<\EOF
2739 #define HAVE_ADDRINFO 1
2740 EOF
2741
2742         else
2743                 
2744                 :
2745         fi
2746
2747
2748
2749         echo $ac_n "checking for d_namlen in struct dirent""... $ac_c" 1>&6
2750 echo "configure:2751: checking for d_namlen in struct dirent" >&5
2751 if eval "test \"`echo '$''{'ftp_cv_HAVE_D_NAMLEN'+set}'`\" = set"; then
2752   echo $ac_n "(cached) $ac_c" 1>&6
2753 else
2754   
2755                 cat > conftest.$ac_ext <<EOF
2756 #line 2757 "configure"
2757 #include "confdefs.h"
2758  
2759 #if HAVE_DIRENT_H
2760 # include <dirent.h>
2761 #else
2762 # define dirent direct
2763 # if HAVE_SYS_NDIR_H
2764 #  include <sys/ndir.h>
2765 # endif
2766 # if HAVE_SYS_DIR_H
2767 #  include <sys/dir.h>
2768 # endif
2769 # if HAVE_NDIR_H
2770 #  include <ndir.h>
2771 # endif
2772 #endif  
2773 int main() {
2774  
2775         struct dirent dp;
2776         int X = dp.d_namlen; ; 
2777 ; return 0; }
2778 EOF
2779 if { (eval echo configure:2780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2780   rm -rf conftest*
2781    ftp_cv_HAVE_D_NAMLEN=yes 
2782 else
2783   echo "configure: failed program was:" >&5
2784   cat conftest.$ac_ext >&5
2785   rm -rf conftest*
2786    ftp_cv_HAVE_D_NAMLEN=no 
2787 fi
2788 rm -f conftest*
2789         
2790 fi
2791
2792 echo "$ac_t""$ftp_cv_HAVE_D_NAMLEN" 1>&6
2793         if test "x$ftp_cv_HAVE_D_NAMLEN" = "xyes"; then
2794                 cat >> confdefs.h <<\EOF
2795 #define HAVE_D_NAMLEN 1
2796 EOF
2797
2798         else
2799                 
2800                 :
2801         fi
2802
2803
2804
2805         echo $ac_n "checking for struct passwd.pw_expire""... $ac_c" 1>&6
2806 echo "configure:2807: checking for struct passwd.pw_expire" >&5
2807 if eval "test \"`echo '$''{'ftp_cv_HAVE_PW_EXPIRE'+set}'`\" = set"; then
2808   echo $ac_n "(cached) $ac_c" 1>&6
2809 else
2810   
2811                 cat > conftest.$ac_ext <<EOF
2812 #line 2813 "configure"
2813 #include "confdefs.h"
2814  
2815 #include <sys/types.h>
2816 #include <pwd.h>  
2817 int main() {
2818   struct passwd pw;
2819               time_t X = pw.pw_expire ; 
2820 ; return 0; }
2821 EOF
2822 if { (eval echo configure:2823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2823   rm -rf conftest*
2824    ftp_cv_HAVE_PW_EXPIRE=yes 
2825 else
2826   echo "configure: failed program was:" >&5
2827   cat conftest.$ac_ext >&5
2828   rm -rf conftest*
2829    ftp_cv_HAVE_PW_EXPIRE=no 
2830 fi
2831 rm -f conftest*
2832         
2833 fi
2834
2835 echo "$ac_t""$ftp_cv_HAVE_PW_EXPIRE" 1>&6
2836         if test "x$ftp_cv_HAVE_PW_EXPIRE" = "xyes"; then
2837                 cat >> confdefs.h <<\EOF
2838 #define HAVE_PW_EXPIRE 1
2839 EOF
2840
2841         else
2842                 
2843                 :
2844         fi
2845
2846
2847 echo $ac_n "checking for working const""... $ac_c" 1>&6
2848 echo "configure:2849: checking for working const" >&5
2849 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2850   echo $ac_n "(cached) $ac_c" 1>&6
2851 else
2852   cat > conftest.$ac_ext <<EOF
2853 #line 2854 "configure"
2854 #include "confdefs.h"
2855
2856 int main() {
2857
2858 /* Ultrix mips cc rejects this.  */
2859 typedef int charset[2]; const charset x;
2860 /* SunOS 4.1.1 cc rejects this.  */
2861 char const *const *ccp;
2862 char **p;
2863 /* NEC SVR4.0.2 mips cc rejects this.  */
2864 struct point {int x, y;};
2865 static struct point const zero = {0,0};
2866 /* AIX XL C 1.02.0.0 rejects this.
2867    It does not let you subtract one const X* pointer from another in an arm
2868    of an if-expression whose if-part is not a constant expression */
2869 const char *g = "string";
2870 ccp = &g + (g ? g-g : 0);
2871 /* HPUX 7.0 cc rejects these. */
2872 ++ccp;
2873 p = (char**) ccp;
2874 ccp = (char const *const *) p;
2875 { /* SCO 3.2v4 cc rejects this.  */
2876   char *t;
2877   char const *s = 0 ? (char *) 0 : (char const *) 0;
2878
2879   *t++ = 0;
2880 }
2881 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2882   int x[] = {25, 17};
2883   const int *foo = &x[0];
2884   ++foo;
2885 }
2886 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2887   typedef const int *iptr;
2888   iptr p = 0;
2889   ++p;
2890 }
2891 { /* AIX XL C 1.02.0.0 rejects this saying
2892      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2893   struct s { int j; const int *ap[3]; };
2894   struct s *b; b->j = 5;
2895 }
2896 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2897   const int foo = 10;
2898 }
2899
2900 ; return 0; }
2901 EOF
2902 if { (eval echo configure:2903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2903   rm -rf conftest*
2904   ac_cv_c_const=yes
2905 else
2906   echo "configure: failed program was:" >&5
2907   cat conftest.$ac_ext >&5
2908   rm -rf conftest*
2909   ac_cv_c_const=no
2910 fi
2911 rm -f conftest*
2912 fi
2913
2914 echo "$ac_t""$ac_cv_c_const" 1>&6
2915 if test $ac_cv_c_const = no; then
2916   cat >> confdefs.h <<\EOF
2917 #define const 
2918 EOF
2919
2920 fi
2921
2922
2923
2924 for ac_func in err fgetln getaddrinfo getgrouplist getnameinfo \
2925                 getusershell inet_net_pton inet_ntop inet_pton mkstemp \
2926                 sl_init snprintf strdup strerror strlcat strlcpy strsep \
2927                 usleep vsyslog
2928 do
2929 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2930 echo "configure:2931: checking for $ac_func" >&5
2931 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2932   echo $ac_n "(cached) $ac_c" 1>&6
2933 else
2934   cat > conftest.$ac_ext <<EOF
2935 #line 2936 "configure"
2936 #include "confdefs.h"
2937 /* System header to define __stub macros and hopefully few prototypes,
2938     which can conflict with char $ac_func(); below.  */
2939 #include <assert.h>
2940 /* Override any gcc2 internal prototype to avoid an error.  */
2941 /* We use char because int might match the return type of a gcc2
2942     builtin and then its argument prototype would still apply.  */
2943 char $ac_func();
2944
2945 int main() {
2946
2947 /* The GNU C library defines this for functions which it implements
2948     to always fail with ENOSYS.  Some functions are actually named
2949     something starting with __ and the normal name is an alias.  */
2950 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2951 choke me
2952 #else
2953 $ac_func();
2954 #endif
2955
2956 ; return 0; }
2957 EOF
2958 if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2959   rm -rf conftest*
2960   eval "ac_cv_func_$ac_func=yes"
2961 else
2962   echo "configure: failed program was:" >&5
2963   cat conftest.$ac_ext >&5
2964   rm -rf conftest*
2965   eval "ac_cv_func_$ac_func=no"
2966 fi
2967 rm -f conftest*
2968 fi
2969
2970 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2971   echo "$ac_t""yes" 1>&6
2972     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2973   cat >> confdefs.h <<EOF
2974 #define $ac_tr_func 1
2975 EOF
2976  
2977 else
2978   echo "$ac_t""no" 1>&6
2979 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2980 fi
2981 done
2982
2983
2984 for ac_func in flock lockf getspnam setlogin setproctitle vfork
2985 do
2986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2987 echo "configure:2988: checking for $ac_func" >&5
2988 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2989   echo $ac_n "(cached) $ac_c" 1>&6
2990 else
2991   cat > conftest.$ac_ext <<EOF
2992 #line 2993 "configure"
2993 #include "confdefs.h"
2994 /* System header to define __stub macros and hopefully few prototypes,
2995     which can conflict with char $ac_func(); below.  */
2996 #include <assert.h>
2997 /* Override any gcc2 internal prototype to avoid an error.  */
2998 /* We use char because int might match the return type of a gcc2
2999     builtin and then its argument prototype would still apply.  */
3000 char $ac_func();
3001
3002 int main() {
3003
3004 /* The GNU C library defines this for functions which it implements
3005     to always fail with ENOSYS.  Some functions are actually named
3006     something starting with __ and the normal name is an alias.  */
3007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3008 choke me
3009 #else
3010 $ac_func();
3011 #endif
3012
3013 ; return 0; }
3014 EOF
3015 if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3016   rm -rf conftest*
3017   eval "ac_cv_func_$ac_func=yes"
3018 else
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   eval "ac_cv_func_$ac_func=no"
3023 fi
3024 rm -f conftest*
3025 fi
3026
3027 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3028   echo "$ac_t""yes" 1>&6
3029     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3030   cat >> confdefs.h <<EOF
3031 #define $ac_tr_func 1
3032 EOF
3033  
3034 else
3035   echo "$ac_t""no" 1>&6
3036 fi
3037 done
3038
3039 if test $ac_cv_lib_util_fparseln != yes; then
3040         for ac_func in fparseln
3041 do
3042 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3043 echo "configure:3044: checking for $ac_func" >&5
3044 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3045   echo $ac_n "(cached) $ac_c" 1>&6
3046 else
3047   cat > conftest.$ac_ext <<EOF
3048 #line 3049 "configure"
3049 #include "confdefs.h"
3050 /* System header to define __stub macros and hopefully few prototypes,
3051     which can conflict with char $ac_func(); below.  */
3052 #include <assert.h>
3053 /* Override any gcc2 internal prototype to avoid an error.  */
3054 /* We use char because int might match the return type of a gcc2
3055     builtin and then its argument prototype would still apply.  */
3056 char $ac_func();
3057
3058 int main() {
3059
3060 /* The GNU C library defines this for functions which it implements
3061     to always fail with ENOSYS.  Some functions are actually named
3062     something starting with __ and the normal name is an alias.  */
3063 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3064 choke me
3065 #else
3066 $ac_func();
3067 #endif
3068
3069 ; return 0; }
3070 EOF
3071 if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3072   rm -rf conftest*
3073   eval "ac_cv_func_$ac_func=yes"
3074 else
3075   echo "configure: failed program was:" >&5
3076   cat conftest.$ac_ext >&5
3077   rm -rf conftest*
3078   eval "ac_cv_func_$ac_func=no"
3079 fi
3080 rm -f conftest*
3081 fi
3082
3083 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3084   echo "$ac_t""yes" 1>&6
3085     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3086   cat >> confdefs.h <<EOF
3087 #define $ac_tr_func 1
3088 EOF
3089  
3090 else
3091   echo "$ac_t""no" 1>&6
3092 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3093 fi
3094 done
3095
3096
3097 fi
3098
3099 LIBOBJS="$LIBOBJS glob.o"
3100
3101
3102         echo $ac_n "checking for crypt() declaration""... $ac_c" 1>&6
3103 echo "configure:3104: checking for crypt() declaration" >&5
3104 if eval "test \"`echo '$''{'ftp_cv_HAVE_CRYPT_D'+set}'`\" = set"; then
3105   echo $ac_n "(cached) $ac_c" 1>&6
3106 else
3107   
3108                 cat > conftest.$ac_ext <<EOF
3109 #line 3110 "configure"
3110 #include "confdefs.h"
3111  
3112 #include <unistd.h>  
3113 int main() {
3114   char *(*X)() = crypt ; 
3115 ; return 0; }
3116 EOF
3117 if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3118   rm -rf conftest*
3119    ftp_cv_HAVE_CRYPT_D=yes 
3120 else
3121   echo "configure: failed program was:" >&5
3122   cat conftest.$ac_ext >&5
3123   rm -rf conftest*
3124    ftp_cv_HAVE_CRYPT_D=no 
3125 fi
3126 rm -f conftest*
3127         
3128 fi
3129
3130 echo "$ac_t""$ftp_cv_HAVE_CRYPT_D" 1>&6
3131         if test "x$ftp_cv_HAVE_CRYPT_D" = "xyes"; then
3132                 cat >> confdefs.h <<\EOF
3133 #define HAVE_CRYPT_D 1
3134 EOF
3135
3136         else
3137                 
3138                 :
3139         fi
3140
3141
3142
3143         echo $ac_n "checking for fclose() declaration""... $ac_c" 1>&6
3144 echo "configure:3145: checking for fclose() declaration" >&5
3145 if eval "test \"`echo '$''{'ftp_cv_HAVE_FCLOSE_D'+set}'`\" = set"; then
3146   echo $ac_n "(cached) $ac_c" 1>&6
3147 else
3148   
3149                 cat > conftest.$ac_ext <<EOF
3150 #line 3151 "configure"
3151 #include "confdefs.h"
3152  
3153 #include <stdio.h>  
3154 int main() {
3155   int (*X)() = fclose ; 
3156 ; return 0; }
3157 EOF
3158 if { (eval echo configure:3159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3159   rm -rf conftest*
3160    ftp_cv_HAVE_FCLOSE_D=yes 
3161 else
3162   echo "configure: failed program was:" >&5
3163   cat conftest.$ac_ext >&5
3164   rm -rf conftest*
3165    ftp_cv_HAVE_FCLOSE_D=no 
3166 fi
3167 rm -f conftest*
3168         
3169 fi
3170
3171 echo "$ac_t""$ftp_cv_HAVE_FCLOSE_D" 1>&6
3172         if test "x$ftp_cv_HAVE_FCLOSE_D" = "xyes"; then
3173                 cat >> confdefs.h <<\EOF
3174 #define HAVE_FCLOSE_D 1
3175 EOF
3176
3177         else
3178                 
3179                 :
3180         fi
3181
3182
3183
3184         echo $ac_n "checking for optarg declaration""... $ac_c" 1>&6
3185 echo "configure:3186: checking for optarg declaration" >&5
3186 if eval "test \"`echo '$''{'ftp_cv_HAVE_OPTARG_D'+set}'`\" = set"; then
3187   echo $ac_n "(cached) $ac_c" 1>&6
3188 else
3189   
3190                 cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193  
3194 #include <stdlib.h>
3195 #include <unistd.h>  
3196 int main() {
3197   char *X = optarg ; 
3198 ; return 0; }
3199 EOF
3200 if { (eval echo configure:3201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3201   rm -rf conftest*
3202    ftp_cv_HAVE_OPTARG_D=yes 
3203 else
3204   echo "configure: failed program was:" >&5
3205   cat conftest.$ac_ext >&5
3206   rm -rf conftest*
3207    ftp_cv_HAVE_OPTARG_D=no 
3208 fi
3209 rm -f conftest*
3210         
3211 fi
3212
3213 echo "$ac_t""$ftp_cv_HAVE_OPTARG_D" 1>&6
3214         if test "x$ftp_cv_HAVE_OPTARG_D" = "xyes"; then
3215                 cat >> confdefs.h <<\EOF
3216 #define HAVE_OPTARG_D 1
3217 EOF
3218
3219         else
3220                 
3221                 :
3222         fi
3223
3224
3225
3226         echo $ac_n "checking for optind declaration""... $ac_c" 1>&6
3227 echo "configure:3228: checking for optind declaration" >&5
3228 if eval "test \"`echo '$''{'ftp_cv_HAVE_OPTIND_D'+set}'`\" = set"; then
3229   echo $ac_n "(cached) $ac_c" 1>&6
3230 else
3231   
3232                 cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235  
3236 #include <stdlib.h>
3237 #include <unistd.h>  
3238 int main() {
3239   int X = optind ; 
3240 ; return 0; }
3241 EOF
3242 if { (eval echo configure:3243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3243   rm -rf conftest*
3244    ftp_cv_HAVE_OPTIND_D=yes 
3245 else
3246   echo "configure: failed program was:" >&5
3247   cat conftest.$ac_ext >&5
3248   rm -rf conftest*
3249    ftp_cv_HAVE_OPTIND_D=no 
3250 fi
3251 rm -f conftest*
3252         
3253 fi
3254
3255 echo "$ac_t""$ftp_cv_HAVE_OPTIND_D" 1>&6
3256         if test "x$ftp_cv_HAVE_OPTIND_D" = "xyes"; then
3257                 cat >> confdefs.h <<\EOF
3258 #define HAVE_OPTIND_D 1
3259 EOF
3260
3261         else
3262                 
3263                 :
3264         fi
3265
3266
3267
3268         echo $ac_n "checking for optreset""... $ac_c" 1>&6
3269 echo "configure:3270: checking for optreset" >&5
3270 if eval "test \"`echo '$''{'ftp_cv_HAVE_OPTRESET'+set}'`\" = set"; then
3271   echo $ac_n "(cached) $ac_c" 1>&6
3272 else
3273   
3274                 cat > conftest.$ac_ext <<EOF
3275 #line 3276 "configure"
3276 #include "confdefs.h"
3277  
3278 #include <stdlib.h>
3279 #include <unistd.h>  
3280 int main() {
3281   int X = optreset ; 
3282 ; return 0; }
3283 EOF
3284 if { (eval echo configure:3285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3285   rm -rf conftest*
3286    ftp_cv_HAVE_OPTRESET=yes 
3287 else
3288   echo "configure: failed program was:" >&5
3289   cat conftest.$ac_ext >&5
3290   rm -rf conftest*
3291    ftp_cv_HAVE_OPTRESET=no 
3292 fi
3293 rm -f conftest*
3294         
3295 fi
3296
3297 echo "$ac_t""$ftp_cv_HAVE_OPTRESET" 1>&6
3298         if test "x$ftp_cv_HAVE_OPTRESET" = "xyes"; then
3299                 cat >> confdefs.h <<\EOF
3300 #define HAVE_OPTRESET 1
3301 EOF
3302
3303         else
3304                 
3305                 :
3306         fi
3307
3308
3309
3310         echo $ac_n "checking for pclose() declaration""... $ac_c" 1>&6
3311 echo "configure:3312: checking for pclose() declaration" >&5
3312 if eval "test \"`echo '$''{'ftp_cv_HAVE_PCLOSE_D'+set}'`\" = set"; then
3313   echo $ac_n "(cached) $ac_c" 1>&6
3314 else
3315   
3316                 cat > conftest.$ac_ext <<EOF
3317 #line 3318 "configure"
3318 #include "confdefs.h"
3319  
3320 #include <stdio.h>  
3321 int main() {
3322   int (*X)() = pclose ; 
3323 ; return 0; }
3324 EOF
3325 if { (eval echo configure:3326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3326   rm -rf conftest*
3327    ftp_cv_HAVE_PCLOSE_D=yes 
3328 else
3329   echo "configure: failed program was:" >&5
3330   cat conftest.$ac_ext >&5
3331   rm -rf conftest*
3332    ftp_cv_HAVE_PCLOSE_D=no 
3333 fi
3334 rm -f conftest*
3335         
3336 fi
3337
3338 echo "$ac_t""$ftp_cv_HAVE_PCLOSE_D" 1>&6
3339         if test "x$ftp_cv_HAVE_PCLOSE_D" = "xyes"; then
3340                 cat >> confdefs.h <<\EOF
3341 #define HAVE_PCLOSE_D 1
3342 EOF
3343
3344         else
3345                 
3346                 :
3347         fi
3348
3349
3350 if test $ac_cv_func_getusershell = yes; then
3351         
3352         echo $ac_n "checking for getusershell() declaration""... $ac_c" 1>&6
3353 echo "configure:3354: checking for getusershell() declaration" >&5
3354 if eval "test \"`echo '$''{'ftp_cv_HAVE_GETUSERSHELL_D'+set}'`\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   
3358                 cat > conftest.$ac_ext <<EOF
3359 #line 3360 "configure"
3360 #include "confdefs.h"
3361  
3362         #include <unistd.h>  
3363 int main() {
3364   char *(*X)() = getusershell ; 
3365 ; return 0; }
3366 EOF
3367 if { (eval echo configure:3368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3368   rm -rf conftest*
3369    ftp_cv_HAVE_GETUSERSHELL_D=yes 
3370 else
3371   echo "configure: failed program was:" >&5
3372   cat conftest.$ac_ext >&5
3373   rm -rf conftest*
3374    ftp_cv_HAVE_GETUSERSHELL_D=no 
3375 fi
3376 rm -f conftest*
3377         
3378 fi
3379
3380 echo "$ac_t""$ftp_cv_HAVE_GETUSERSHELL_D" 1>&6
3381         if test "x$ftp_cv_HAVE_GETUSERSHELL_D" = "xyes"; then
3382                 cat >> confdefs.h <<\EOF
3383 #define HAVE_GETUSERSHELL_D 1
3384 EOF
3385
3386         else
3387                 
3388                 :
3389         fi
3390
3391 fi
3392
3393
3394 if test $have_long_long = yes -a $ac_cv_sizeof_off_t -ge 8; then
3395
3396
3397         echo $ac_n "checking *printf() support for %lld""... $ac_c" 1>&6
3398 echo "configure:3399: checking *printf() support for %lld" >&5
3399         can_printf_longlong=no
3400         if test "$cross_compiling" = yes; then
3401    : 
3402 else
3403   cat > conftest.$ac_ext <<EOF
3404 #line 3405 "configure"
3405 #include "confdefs.h"
3406
3407                 #include <stdio.h>
3408                 int main() {
3409                         char buf[100];
3410                         sprintf(buf, "%lld", 4294967300LL);
3411                         return (strcmp(buf, "4294967300"));
3412                 }
3413         
3414 EOF
3415 if { (eval echo configure:3416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3416 then
3417   
3418                 echo "$ac_t""yes" 1>&6
3419                 can_printf_longlong=yes
3420         
3421 else
3422   echo "configure: failed program was:" >&5
3423   cat conftest.$ac_ext >&5
3424   rm -fr conftest*
3425   
3426                 echo "$ac_t""no" 1>&6
3427         
3428 fi
3429 rm -fr conftest*
3430 fi
3431
3432
3433         if test $can_printf_longlong != yes; then
3434                 echo $ac_n "checking *printf() support for %qd""... $ac_c" 1>&6
3435 echo "configure:3436: checking *printf() support for %qd" >&5
3436                 if test "$cross_compiling" = yes; then
3437    : 
3438 else
3439   cat > conftest.$ac_ext <<EOF
3440 #line 3441 "configure"
3441 #include "confdefs.h"
3442
3443                         #include <stdio.h>
3444                         int main() {
3445                                 char buf[100];
3446                                 sprintf(buf, "%qd", 4294967300LL);
3447                                 return (strcmp(buf, "4294967300"));
3448                         }
3449                 
3450 EOF
3451 if { (eval echo configure:3452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3452 then
3453   
3454                         echo "$ac_t""yes" 1>&6
3455                         can_printf_longlong=yes
3456                         cat >> confdefs.h <<\EOF
3457 #define HAVE_PRINTF_QD 1
3458 EOF
3459
3460                 
3461 else
3462   echo "configure: failed program was:" >&5
3463   cat conftest.$ac_ext >&5
3464   rm -fr conftest*
3465   
3466                         echo "$ac_t""no" 1>&6
3467                 
3468 fi
3469 rm -fr conftest*
3470 fi
3471
3472         fi
3473
3474         if test $can_printf_longlong = yes; then
3475                 cat >> confdefs.h <<\EOF
3476 #define HAVE_QUAD_SUPPORT 1
3477 EOF
3478
3479                 for ac_func in strtoll
3480 do
3481 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3482 echo "configure:3483: checking for $ac_func" >&5
3483 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3484   echo $ac_n "(cached) $ac_c" 1>&6
3485 else
3486   cat > conftest.$ac_ext <<EOF
3487 #line 3488 "configure"
3488 #include "confdefs.h"
3489 /* System header to define __stub macros and hopefully few prototypes,
3490     which can conflict with char $ac_func(); below.  */
3491 #include <assert.h>
3492 /* Override any gcc2 internal prototype to avoid an error.  */
3493 /* We use char because int might match the return type of a gcc2
3494     builtin and then its argument prototype would still apply.  */
3495 char $ac_func();
3496
3497 int main() {
3498
3499 /* The GNU C library defines this for functions which it implements
3500     to always fail with ENOSYS.  Some functions are actually named
3501     something starting with __ and the normal name is an alias.  */
3502 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3503 choke me
3504 #else
3505 $ac_func();
3506 #endif
3507
3508 ; return 0; }
3509 EOF
3510 if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3511   rm -rf conftest*
3512   eval "ac_cv_func_$ac_func=yes"
3513 else
3514   echo "configure: failed program was:" >&5
3515   cat conftest.$ac_ext >&5
3516   rm -rf conftest*
3517   eval "ac_cv_func_$ac_func=no"
3518 fi
3519 rm -f conftest*
3520 fi
3521
3522 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3523   echo "$ac_t""yes" 1>&6
3524     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3525   cat >> confdefs.h <<EOF
3526 #define $ac_tr_func 1
3527 EOF
3528  
3529 else
3530   echo "$ac_t""no" 1>&6
3531 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3532 fi
3533 done
3534
3535
3536         fi
3537
3538 fi
3539
3540
3541 have_rfc2553_netdb=no
3542 if test $ac_cv_func_getaddrinfo = yes -a ! -n "$socks"; then
3543         
3544         echo $ac_n "checking for AI_NUMERICHOST""... $ac_c" 1>&6
3545 echo "configure:3546: checking for AI_NUMERICHOST" >&5
3546 if eval "test \"`echo '$''{'ftp_cv_have_ai_numerichost'+set}'`\" = set"; then
3547   echo $ac_n "(cached) $ac_c" 1>&6
3548 else
3549   
3550                 cat > conftest.$ac_ext <<EOF
3551 #line 3552 "configure"
3552 #include "confdefs.h"
3553  
3554         #include <sys/types.h>
3555         #include <sys/socket.h>
3556         #include <netdb.h>  
3557 int main() {
3558   int X = AI_NUMERICHOST ; 
3559 ; return 0; }
3560 EOF
3561 if { (eval echo configure:3562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3562   rm -rf conftest*
3563    ftp_cv_have_ai_numerichost=yes 
3564 else
3565   echo "configure: failed program was:" >&5
3566   cat conftest.$ac_ext >&5
3567   rm -rf conftest*
3568    ftp_cv_have_ai_numerichost=no 
3569 fi
3570 rm -f conftest*
3571         
3572 fi
3573
3574 echo "$ac_t""$ftp_cv_have_ai_numerichost" 1>&6
3575         if test "x$ftp_cv_have_ai_numerichost" = "xyes"; then
3576                  have_rfc2553_netdb=yes 
3577         else
3578                 
3579                 :
3580         fi
3581
3582 fi
3583 echo $ac_n "checking for working getaddrinfo()""... $ac_c" 1>&6
3584 echo "configure:3585: checking for working getaddrinfo()" >&5
3585 if test $have_rfc2553_netdb = yes; then
3586         cat >> confdefs.h <<\EOF
3587 #define HAVE_RFC2553_NETDB 1
3588 EOF
3589
3590         echo "$ac_t""yes" 1>&6
3591 else
3592         if test $ac_cv_func_getaddrinfo = yes; then
3593                 LIBOBJS="$LIBOBJS getaddrinfo.o"
3594                 echo "$ac_t""no - using local version" 1>&6
3595         else
3596                 echo "$ac_t""using local version" 1>&6
3597         fi
3598 fi
3599
3600 if test $ac_cv_func_sl_init = yes; then
3601         
3602         echo $ac_n "checking if sl_add() returns int""... $ac_c" 1>&6
3603 echo "configure:3604: checking if sl_add() returns int" >&5
3604 if eval "test \"`echo '$''{'ftp_cv_INT_SL_ADD'+set}'`\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   
3608                 cat > conftest.$ac_ext <<EOF
3609 #line 3610 "configure"
3610 #include "confdefs.h"
3611  
3612         #include <stringlist.h>  
3613 int main() {
3614   int f = sl_add((StringList *)0, "foo") ; 
3615 ; return 0; }
3616 EOF
3617 if { (eval echo configure:3618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3618   rm -rf conftest*
3619    ftp_cv_INT_SL_ADD=yes 
3620 else
3621   echo "configure: failed program was:" >&5
3622   cat conftest.$ac_ext >&5
3623   rm -rf conftest*
3624    ftp_cv_INT_SL_ADD=no 
3625 fi
3626 rm -f conftest*
3627         
3628 fi
3629
3630 echo "$ac_t""$ftp_cv_INT_SL_ADD" 1>&6
3631         if test "x$ftp_cv_INT_SL_ADD" = "xyes"; then
3632                 : 
3633         else
3634                 LIBOBJS="$LIBOBJS sl_init.o"
3635                 :
3636         fi
3637
3638 fi
3639
3640
3641
3642 if test $opt_builtinls = yes; then
3643         for ac_func in fts_open strmode user_from_uid
3644 do
3645 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3646 echo "configure:3647: checking for $ac_func" >&5
3647 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3648   echo $ac_n "(cached) $ac_c" 1>&6
3649 else
3650   cat > conftest.$ac_ext <<EOF
3651 #line 3652 "configure"
3652 #include "confdefs.h"
3653 /* System header to define __stub macros and hopefully few prototypes,
3654     which can conflict with char $ac_func(); below.  */
3655 #include <assert.h>
3656 /* Override any gcc2 internal prototype to avoid an error.  */
3657 /* We use char because int might match the return type of a gcc2
3658     builtin and then its argument prototype would still apply.  */
3659 char $ac_func();
3660
3661 int main() {
3662
3663 /* The GNU C library defines this for functions which it implements
3664     to always fail with ENOSYS.  Some functions are actually named
3665     something starting with __ and the normal name is an alias.  */
3666 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3667 choke me
3668 #else
3669 $ac_func();
3670 #endif
3671
3672 ; return 0; }
3673 EOF
3674 if { (eval echo configure:3675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3675   rm -rf conftest*
3676   eval "ac_cv_func_$ac_func=yes"
3677 else
3678   echo "configure: failed program was:" >&5
3679   cat conftest.$ac_ext >&5
3680   rm -rf conftest*
3681   eval "ac_cv_func_$ac_func=no"
3682 fi
3683 rm -f conftest*
3684 fi
3685
3686 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3687   echo "$ac_t""yes" 1>&6
3688     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3689   cat >> confdefs.h <<EOF
3690 #define $ac_tr_func 1
3691 EOF
3692  
3693 else
3694   echo "$ac_t""no" 1>&6
3695 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3696 fi
3697 done
3698
3699
3700         LSOBJS="cmp.o ls.o print.o util.o"
3701 else
3702         cat >> confdefs.h <<\EOF
3703 #define NO_INTERNAL_LS 1
3704 EOF
3705
3706 fi
3707
3708
3709
3710 if test -n "$LIBOBJS"; then
3711         INCLUDES="$INCLUDES -I\${srcdir}/../libukem"
3712         LDFLAGS="$LDFLAGS -L../libukem"
3713         LIBS="$LIBS -lukem"
3714         LIBUKEM=libukem.a
3715         LIBDEPENDS="$LIBDEPENDS ../libukem/libukem.a"
3716 fi
3717
3718
3719
3720
3721
3722
3723
3724
3725 trap '' 1 2 15
3726 cat > confcache <<\EOF
3727 # This file is a shell script that caches the results of configure
3728 # tests run on this system so they can be shared between configure
3729 # scripts and configure runs.  It is not useful on other systems.
3730 # If it contains results you don't want to keep, you may remove or edit it.
3731 #
3732 # By default, configure uses ./config.cache as the cache file,
3733 # creating it if it does not exist already.  You can give configure
3734 # the --cache-file=FILE option to use a different cache file; that is
3735 # what configure does when it calls configure scripts in
3736 # subdirectories, so they share the cache.
3737 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3738 # config.status only pays attention to the cache file if you give it the
3739 # --recheck option to rerun configure.
3740 #
3741 EOF
3742 # The following way of writing the cache mishandles newlines in values,
3743 # but we know of no workaround that is simple, portable, and efficient.
3744 # So, don't put newlines in cache variables' values.
3745 # Ultrix sh set writes to stderr and can't be redirected directly,
3746 # and sets the high bit in the cache file unless we assign to the vars.
3747 (set) 2>&1 |
3748   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3749   *ac_space=\ *)
3750     # `set' does not quote correctly, so add quotes (double-quote substitution
3751     # turns \\\\ into \\, and sed turns \\ into \).
3752     sed -n \
3753       -e "s/'/'\\\\''/g" \
3754       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3755     ;;
3756   *)
3757     # `set' quotes correctly as required by POSIX, so do not add quotes.
3758     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3759     ;;
3760   esac >> confcache
3761 if cmp -s $cache_file confcache; then
3762   :
3763 else
3764   if test -w $cache_file; then
3765     echo "updating cache $cache_file"
3766     cat confcache > $cache_file
3767   else
3768     echo "not updating unwritable cache $cache_file"
3769   fi
3770 fi
3771 rm -f confcache
3772
3773 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3774
3775 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3776 # Let make expand exec_prefix.
3777 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3778
3779 # Any assignment to VPATH causes Sun make to only execute
3780 # the first set of double-colon rules, so remove it if not needed.
3781 # If there is a colon in the path, we need to keep it.
3782 if test "x$srcdir" = x.; then
3783   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3784 fi
3785
3786 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3787
3788 DEFS=-DHAVE_CONFIG_H
3789
3790 # Without the "./", some shells look in PATH for config.status.
3791 : ${CONFIG_STATUS=./config.status}
3792
3793 echo creating $CONFIG_STATUS
3794 rm -f $CONFIG_STATUS
3795 cat > $CONFIG_STATUS <<EOF
3796 #! /bin/sh
3797 # Generated automatically by configure.
3798 # Run this file to recreate the current configuration.
3799 # This directory was configured as follows,
3800 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3801 #
3802 # $0 $ac_configure_args
3803 #
3804 # Compiler output produced by configure, useful for debugging
3805 # configure, is in ./config.log if it exists.
3806
3807 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3808 for ac_option
3809 do
3810   case "\$ac_option" in
3811   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3812     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3813     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3814   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3815     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3816     exit 0 ;;
3817   -help | --help | --hel | --he | --h)
3818     echo "\$ac_cs_usage"; exit 0 ;;
3819   *) echo "\$ac_cs_usage"; exit 1 ;;
3820   esac
3821 done
3822
3823 ac_given_srcdir=$srcdir
3824 ac_given_INSTALL="$INSTALL"
3825
3826 trap 'rm -fr `echo "Makefile libukem/Makefile src/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3827 EOF
3828 cat >> $CONFIG_STATUS <<EOF
3829
3830 # Protect against being on the right side of a sed subst in config.status.
3831 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3832  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3833 $ac_vpsub
3834 $extrasub
3835 s%@SHELL@%$SHELL%g
3836 s%@CFLAGS@%$CFLAGS%g
3837 s%@CPPFLAGS@%$CPPFLAGS%g
3838 s%@CXXFLAGS@%$CXXFLAGS%g
3839 s%@FFLAGS@%$FFLAGS%g
3840 s%@DEFS@%$DEFS%g
3841 s%@LDFLAGS@%$LDFLAGS%g
3842 s%@LIBS@%$LIBS%g
3843 s%@exec_prefix@%$exec_prefix%g
3844 s%@prefix@%$prefix%g
3845 s%@program_transform_name@%$program_transform_name%g
3846 s%@bindir@%$bindir%g
3847 s%@sbindir@%$sbindir%g
3848 s%@libexecdir@%$libexecdir%g
3849 s%@datadir@%$datadir%g
3850 s%@sysconfdir@%$sysconfdir%g
3851 s%@sharedstatedir@%$sharedstatedir%g
3852 s%@localstatedir@%$localstatedir%g
3853 s%@libdir@%$libdir%g
3854 s%@includedir@%$includedir%g
3855 s%@oldincludedir@%$oldincludedir%g
3856 s%@infodir@%$infodir%g
3857 s%@mandir@%$mandir%g
3858 s%@SET_MAKE@%$SET_MAKE%g
3859 s%@CC@%$CC%g
3860 s%@AWK@%$AWK%g
3861 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3862 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3863 s%@INSTALL_DATA@%$INSTALL_DATA%g
3864 s%@RANLIB@%$RANLIB%g
3865 s%@YACC@%$YACC%g
3866 s%@AR@%$AR%g
3867 s%@CPP@%$CPP%g
3868 s%@LIBOBJS@%$LIBOBJS%g
3869 s%@INCLUDES@%$INCLUDES%g
3870 s%@LIBUKEM@%$LIBUKEM%g
3871 s%@LIBDEPENDS@%$LIBDEPENDS%g
3872 s%@LSOBJS@%$LSOBJS%g
3873
3874 CEOF
3875 EOF
3876
3877 cat >> $CONFIG_STATUS <<\EOF
3878
3879 # Split the substitutions into bite-sized pieces for seds with
3880 # small command number limits, like on Digital OSF/1 and HP-UX.
3881 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3882 ac_file=1 # Number of current file.
3883 ac_beg=1 # First line for current file.
3884 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3885 ac_more_lines=:
3886 ac_sed_cmds=""
3887 while $ac_more_lines; do
3888   if test $ac_beg -gt 1; then
3889     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3890   else
3891     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3892   fi
3893   if test ! -s conftest.s$ac_file; then
3894     ac_more_lines=false
3895     rm -f conftest.s$ac_file
3896   else
3897     if test -z "$ac_sed_cmds"; then
3898       ac_sed_cmds="sed -f conftest.s$ac_file"
3899     else
3900       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3901     fi
3902     ac_file=`expr $ac_file + 1`
3903     ac_beg=$ac_end
3904     ac_end=`expr $ac_end + $ac_max_sed_cmds`
3905   fi
3906 done
3907 if test -z "$ac_sed_cmds"; then
3908   ac_sed_cmds=cat
3909 fi
3910 EOF
3911
3912 cat >> $CONFIG_STATUS <<EOF
3913
3914 CONFIG_FILES=\${CONFIG_FILES-"Makefile libukem/Makefile src/Makefile"}
3915 EOF
3916 cat >> $CONFIG_STATUS <<\EOF
3917 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3918   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3919   case "$ac_file" in
3920   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3921        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3922   *) ac_file_in="${ac_file}.in" ;;
3923   esac
3924
3925   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3926
3927   # Remove last slash and all that follows it.  Not all systems have dirname.
3928   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3929   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3930     # The file is in a subdirectory.
3931     test ! -d "$ac_dir" && mkdir "$ac_dir"
3932     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3933     # A "../" for each directory in $ac_dir_suffix.
3934     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3935   else
3936     ac_dir_suffix= ac_dots=
3937   fi
3938
3939   case "$ac_given_srcdir" in
3940   .)  srcdir=.
3941       if test -z "$ac_dots"; then top_srcdir=.
3942       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3943   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3944   *) # Relative path.
3945     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3946     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3947   esac
3948
3949   case "$ac_given_INSTALL" in
3950   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3951   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3952   esac
3953
3954   echo creating "$ac_file"
3955   rm -f "$ac_file"
3956   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3957   case "$ac_file" in
3958   *Makefile*) ac_comsub="1i\\
3959 # $configure_input" ;;
3960   *) ac_comsub= ;;
3961   esac
3962
3963   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3964   sed -e "$ac_comsub
3965 s%@configure_input@%$configure_input%g
3966 s%@srcdir@%$srcdir%g
3967 s%@top_srcdir@%$top_srcdir%g
3968 s%@INSTALL@%$INSTALL%g
3969 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3970 fi; done
3971 rm -f conftest.s*
3972
3973 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3974 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3975 #
3976 # ac_d sets the value in "#define NAME VALUE" lines.
3977 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3978 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3979 ac_dC='\3'
3980 ac_dD='%g'
3981 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3982 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3983 ac_uB='\([      ]\)%\1#\2define\3'
3984 ac_uC=' '
3985 ac_uD='\4%g'
3986 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3987 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3988 ac_eB='$%\1#\2define\3'
3989 ac_eC=' '
3990 ac_eD='%g'
3991
3992 if test "${CONFIG_HEADERS+set}" != set; then
3993 EOF
3994 cat >> $CONFIG_STATUS <<EOF
3995   CONFIG_HEADERS="config.h"
3996 EOF
3997 cat >> $CONFIG_STATUS <<\EOF
3998 fi
3999 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4000   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4001   case "$ac_file" in
4002   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4003        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4004   *) ac_file_in="${ac_file}.in" ;;
4005   esac
4006
4007   echo creating $ac_file
4008
4009   rm -f conftest.frag conftest.in conftest.out
4010   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4011   cat $ac_file_inputs > conftest.in
4012
4013 EOF
4014
4015 # Transform confdefs.h into a sed script conftest.vals that substitutes
4016 # the proper values into config.h.in to produce config.h.  And first:
4017 # Protect against being on the right side of a sed subst in config.status.
4018 # Protect against being in an unquoted here document in config.status.
4019 rm -f conftest.vals
4020 cat > conftest.hdr <<\EOF
4021 s/[\\&%]/\\&/g
4022 s%[\\$`]%\\&%g
4023 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4024 s%ac_d%ac_u%gp
4025 s%ac_u%ac_e%gp
4026 EOF
4027 sed -n -f conftest.hdr confdefs.h > conftest.vals
4028 rm -f conftest.hdr
4029
4030 # This sed command replaces #undef with comments.  This is necessary, for
4031 # example, in the case of _POSIX_SOURCE, which is predefined and required
4032 # on some systems where configure will not decide to define it.
4033 cat >> conftest.vals <<\EOF
4034 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4035 EOF
4036
4037 # Break up conftest.vals because some shells have a limit on
4038 # the size of here documents, and old seds have small limits too.
4039
4040 rm -f conftest.tail
4041 while :
4042 do
4043   ac_lines=`grep -c . conftest.vals`
4044   # grep -c gives empty output for an empty file on some AIX systems.
4045   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4046   # Write a limited-size here document to conftest.frag.
4047   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4048   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4049   echo 'CEOF
4050   sed -f conftest.frag conftest.in > conftest.out
4051   rm -f conftest.in
4052   mv conftest.out conftest.in
4053 ' >> $CONFIG_STATUS
4054   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4055   rm -f conftest.vals
4056   mv conftest.tail conftest.vals
4057 done
4058 rm -f conftest.vals
4059
4060 cat >> $CONFIG_STATUS <<\EOF
4061   rm -f conftest.frag conftest.h
4062   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4063   cat conftest.in >> conftest.h
4064   rm -f conftest.in
4065   if cmp -s $ac_file conftest.h 2>/dev/null; then
4066     echo "$ac_file is unchanged"
4067     rm -f conftest.h
4068   else
4069     # Remove last slash and all that follows it.  Not all systems have dirname.
4070       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4071       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4072       # The file is in a subdirectory.
4073       test ! -d "$ac_dir" && mkdir "$ac_dir"
4074     fi
4075     rm -f $ac_file
4076     mv conftest.h $ac_file
4077   fi
4078 fi; done
4079
4080 EOF
4081 cat >> $CONFIG_STATUS <<EOF
4082
4083 EOF
4084 cat >> $CONFIG_STATUS <<\EOF
4085
4086 exit 0
4087 EOF
4088 chmod +x $CONFIG_STATUS
4089 rm -fr confdefs* $ac_clean_files
4090 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4091