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