]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/lukemftp/configure
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / contrib / lukemftp / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.37 
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 if test -n "$socks"; then
2152         if test $opt_ipv6 = yes; then
2153                 echo "IPv6 is incompatible with socks, disabling IPv6 support"
2154                 opt_ipv6=no
2155         fi
2156 fi
2157
2158
2159
2160 ac_header_dirent=no
2161 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2162 do
2163 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2164 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2165 echo "configure:2166: checking for $ac_hdr that defines DIR" >&5
2166 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2167   echo $ac_n "(cached) $ac_c" 1>&6
2168 else
2169   cat > conftest.$ac_ext <<EOF
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2172 #include <sys/types.h>
2173 #include <$ac_hdr>
2174 int main() {
2175 DIR *dirp = 0;
2176 ; return 0; }
2177 EOF
2178 if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2179   rm -rf conftest*
2180   eval "ac_cv_header_dirent_$ac_safe=yes"
2181 else
2182   echo "configure: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   rm -rf conftest*
2185   eval "ac_cv_header_dirent_$ac_safe=no"
2186 fi
2187 rm -f conftest*
2188 fi
2189 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2190   echo "$ac_t""yes" 1>&6
2191     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2192   cat >> confdefs.h <<EOF
2193 #define $ac_tr_hdr 1
2194 EOF
2195  ac_header_dirent=$ac_hdr; break
2196 else
2197   echo "$ac_t""no" 1>&6
2198 fi
2199 done
2200 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2201 if test $ac_header_dirent = dirent.h; then
2202 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2203 echo "configure:2204: checking for opendir in -ldir" >&5
2204 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2205 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2206   echo $ac_n "(cached) $ac_c" 1>&6
2207 else
2208   ac_save_LIBS="$LIBS"
2209 LIBS="-ldir  $LIBS"
2210 cat > conftest.$ac_ext <<EOF
2211 #line 2212 "configure"
2212 #include "confdefs.h"
2213 /* Override any gcc2 internal prototype to avoid an error.  */
2214 /* We use char because int might match the return type of a gcc2
2215     builtin and then its argument prototype would still apply.  */
2216 char opendir();
2217
2218 int main() {
2219 opendir()
2220 ; return 0; }
2221 EOF
2222 if { (eval echo configure:2223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2223   rm -rf conftest*
2224   eval "ac_cv_lib_$ac_lib_var=yes"
2225 else
2226   echo "configure: failed program was:" >&5
2227   cat conftest.$ac_ext >&5
2228   rm -rf conftest*
2229   eval "ac_cv_lib_$ac_lib_var=no"
2230 fi
2231 rm -f conftest*
2232 LIBS="$ac_save_LIBS"
2233
2234 fi
2235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2236   echo "$ac_t""yes" 1>&6
2237   LIBS="$LIBS -ldir"
2238 else
2239   echo "$ac_t""no" 1>&6
2240 fi
2241
2242 else
2243 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2244 echo "configure:2245: checking for opendir in -lx" >&5
2245 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2246 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2247   echo $ac_n "(cached) $ac_c" 1>&6
2248 else
2249   ac_save_LIBS="$LIBS"
2250 LIBS="-lx  $LIBS"
2251 cat > conftest.$ac_ext <<EOF
2252 #line 2253 "configure"
2253 #include "confdefs.h"
2254 /* Override any gcc2 internal prototype to avoid an error.  */
2255 /* We use char because int might match the return type of a gcc2
2256     builtin and then its argument prototype would still apply.  */
2257 char opendir();
2258
2259 int main() {
2260 opendir()
2261 ; return 0; }
2262 EOF
2263 if { (eval echo configure:2264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2264   rm -rf conftest*
2265   eval "ac_cv_lib_$ac_lib_var=yes"
2266 else
2267   echo "configure: failed program was:" >&5
2268   cat conftest.$ac_ext >&5
2269   rm -rf conftest*
2270   eval "ac_cv_lib_$ac_lib_var=no"
2271 fi
2272 rm -f conftest*
2273 LIBS="$ac_save_LIBS"
2274
2275 fi
2276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2277   echo "$ac_t""yes" 1>&6
2278   LIBS="$LIBS -lx"
2279 else
2280   echo "$ac_t""no" 1>&6
2281 fi
2282
2283 fi
2284
2285 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2286 echo "configure:2287: checking for ANSI C header files" >&5
2287 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2288   echo $ac_n "(cached) $ac_c" 1>&6
2289 else
2290   cat > conftest.$ac_ext <<EOF
2291 #line 2292 "configure"
2292 #include "confdefs.h"
2293 #include <stdlib.h>
2294 #include <stdarg.h>
2295 #include <string.h>
2296 #include <float.h>
2297 EOF
2298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2299 { (eval echo configure:2300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2301 if test -z "$ac_err"; then
2302   rm -rf conftest*
2303   ac_cv_header_stdc=yes
2304 else
2305   echo "$ac_err" >&5
2306   echo "configure: failed program was:" >&5
2307   cat conftest.$ac_ext >&5
2308   rm -rf conftest*
2309   ac_cv_header_stdc=no
2310 fi
2311 rm -f conftest*
2312
2313 if test $ac_cv_header_stdc = yes; then
2314   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2315 cat > conftest.$ac_ext <<EOF
2316 #line 2317 "configure"
2317 #include "confdefs.h"
2318 #include <string.h>
2319 EOF
2320 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2321   egrep "memchr" >/dev/null 2>&1; then
2322   :
2323 else
2324   rm -rf conftest*
2325   ac_cv_header_stdc=no
2326 fi
2327 rm -f conftest*
2328
2329 fi
2330
2331 if test $ac_cv_header_stdc = yes; then
2332   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2333 cat > conftest.$ac_ext <<EOF
2334 #line 2335 "configure"
2335 #include "confdefs.h"
2336 #include <stdlib.h>
2337 EOF
2338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2339   egrep "free" >/dev/null 2>&1; then
2340   :
2341 else
2342   rm -rf conftest*
2343   ac_cv_header_stdc=no
2344 fi
2345 rm -f conftest*
2346
2347 fi
2348
2349 if test $ac_cv_header_stdc = yes; then
2350   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2351 if test "$cross_compiling" = yes; then
2352   :
2353 else
2354   cat > conftest.$ac_ext <<EOF
2355 #line 2356 "configure"
2356 #include "confdefs.h"
2357 #include <ctype.h>
2358 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2359 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2360 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2361 int main () { int i; for (i = 0; i < 256; i++)
2362 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2363 exit (0); }
2364
2365 EOF
2366 if { (eval echo configure:2367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2367 then
2368   :
2369 else
2370   echo "configure: failed program was:" >&5
2371   cat conftest.$ac_ext >&5
2372   rm -fr conftest*
2373   ac_cv_header_stdc=no
2374 fi
2375 rm -fr conftest*
2376 fi
2377
2378 fi
2379 fi
2380
2381 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2382 if test $ac_cv_header_stdc = yes; then
2383   cat >> confdefs.h <<\EOF
2384 #define STDC_HEADERS 1
2385 EOF
2386
2387 fi
2388
2389 for ac_hdr in arpa/nameser.h err.h regex.h paths.h poll.h sys/poll.h \
2390                 termcap.h util.h libutil.h vis.h
2391 do
2392 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2393 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2394 echo "configure:2395: checking for $ac_hdr" >&5
2395 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2396   echo $ac_n "(cached) $ac_c" 1>&6
2397 else
2398   cat > conftest.$ac_ext <<EOF
2399 #line 2400 "configure"
2400 #include "confdefs.h"
2401 #include <$ac_hdr>
2402 EOF
2403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2404 { (eval echo configure:2405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2406 if test -z "$ac_err"; then
2407   rm -rf conftest*
2408   eval "ac_cv_header_$ac_safe=yes"
2409 else
2410   echo "$ac_err" >&5
2411   echo "configure: failed program was:" >&5
2412   cat conftest.$ac_ext >&5
2413   rm -rf conftest*
2414   eval "ac_cv_header_$ac_safe=no"
2415 fi
2416 rm -f conftest*
2417 fi
2418 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2419   echo "$ac_t""yes" 1>&6
2420     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2421   cat >> confdefs.h <<EOF
2422 #define $ac_tr_hdr 1
2423 EOF
2424  
2425 else
2426   echo "$ac_t""no" 1>&6
2427 fi
2428 done
2429
2430
2431
2432 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2433 echo "configure:2434: checking whether time.h and sys/time.h may both be included" >&5
2434 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2435   echo $ac_n "(cached) $ac_c" 1>&6
2436 else
2437   cat > conftest.$ac_ext <<EOF
2438 #line 2439 "configure"
2439 #include "confdefs.h"
2440 #include <sys/types.h>
2441 #include <sys/time.h>
2442 #include <time.h>
2443 int main() {
2444 struct tm *tp;
2445 ; return 0; }
2446 EOF
2447 if { (eval echo configure:2448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2448   rm -rf conftest*
2449   ac_cv_header_time=yes
2450 else
2451   echo "configure: failed program was:" >&5
2452   cat conftest.$ac_ext >&5
2453   rm -rf conftest*
2454   ac_cv_header_time=no
2455 fi
2456 rm -f conftest*
2457 fi
2458
2459 echo "$ac_t""$ac_cv_header_time" 1>&6
2460 if test $ac_cv_header_time = yes; then
2461   cat >> confdefs.h <<\EOF
2462 #define TIME_WITH_SYS_TIME 1
2463 EOF
2464
2465 fi
2466
2467 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2468 echo "configure:2469: checking for off_t" >&5
2469 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   cat > conftest.$ac_ext <<EOF
2473 #line 2474 "configure"
2474 #include "confdefs.h"
2475 #include <sys/types.h>
2476 #if STDC_HEADERS
2477 #include <stdlib.h>
2478 #include <stddef.h>
2479 #endif
2480 EOF
2481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2482   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2483   rm -rf conftest*
2484   ac_cv_type_off_t=yes
2485 else
2486   rm -rf conftest*
2487   ac_cv_type_off_t=no
2488 fi
2489 rm -f conftest*
2490
2491 fi
2492 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2493 if test $ac_cv_type_off_t = no; then
2494   cat >> confdefs.h <<\EOF
2495 #define off_t long
2496 EOF
2497
2498 fi
2499
2500 echo $ac_n "checking size of off_t""... $ac_c" 1>&6
2501 echo "configure:2502: checking size of off_t" >&5
2502 if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2503   echo $ac_n "(cached) $ac_c" 1>&6
2504 else
2505   if test "$cross_compiling" = yes; then
2506   ac_cv_sizeof_off_t=0
2507 else
2508   cat > conftest.$ac_ext <<EOF
2509 #line 2510 "configure"
2510 #include "confdefs.h"
2511 #include <stdio.h>
2512 main()
2513 {
2514   FILE *f=fopen("conftestval", "w");
2515   if (!f) exit(1);
2516   fprintf(f, "%d\n", sizeof(off_t));
2517   exit(0);
2518 }
2519 EOF
2520 if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2521 then
2522   ac_cv_sizeof_off_t=`cat conftestval`
2523 else
2524   echo "configure: failed program was:" >&5
2525   cat conftest.$ac_ext >&5
2526   rm -fr conftest*
2527   ac_cv_sizeof_off_t=0
2528 fi
2529 rm -fr conftest*
2530 fi
2531
2532 fi
2533 echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2534 cat >> confdefs.h <<EOF
2535 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2536 EOF
2537
2538
2539
2540         echo $ac_n "checking for long long""... $ac_c" 1>&6
2541 echo "configure:2542: checking for long long" >&5
2542 if eval "test \"`echo '$''{'ftp_cv_HAVE_LONG_LONG'+set}'`\" = set"; then
2543   echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545   
2546                 cat > conftest.$ac_ext <<EOF
2547 #line 2548 "configure"
2548 #include "confdefs.h"
2549  
2550 #include <sys/types.h>  
2551 int main() {
2552  
2553 long long X = 2, Y = 1, Z;
2554 Z = X / Y; ; 
2555 ; return 0; }
2556 EOF
2557 if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2558   rm -rf conftest*
2559    ftp_cv_HAVE_LONG_LONG=yes 
2560 else
2561   echo "configure: failed program was:" >&5
2562   cat conftest.$ac_ext >&5
2563   rm -rf conftest*
2564    ftp_cv_HAVE_LONG_LONG=no 
2565 fi
2566 rm -f conftest*
2567         
2568 fi
2569
2570 echo "$ac_t""$ftp_cv_HAVE_LONG_LONG" 1>&6
2571         if test "x$ftp_cv_HAVE_LONG_LONG" = "xyes"; then
2572                 
2573 cat >> confdefs.h <<\EOF
2574 #define HAVE_LONG_LONG 1
2575 EOF
2576
2577 have_long_long=yes
2578         else
2579                 have_long_long=no
2580                 :
2581         fi
2582
2583
2584
2585         echo $ac_n "checking for in_port_t""... $ac_c" 1>&6
2586 echo "configure:2587: checking for in_port_t" >&5
2587 if eval "test \"`echo '$''{'ftp_cv_HAVE_IN_PORT_T'+set}'`\" = set"; then
2588   echo $ac_n "(cached) $ac_c" 1>&6
2589 else
2590   
2591                 cat > conftest.$ac_ext <<EOF
2592 #line 2593 "configure"
2593 #include "confdefs.h"
2594  
2595 #include <sys/types.h>
2596 #include <netinet/in.h>  
2597 int main() {
2598   in_port_t X ; 
2599 ; return 0; }
2600 EOF
2601 if { (eval echo configure:2602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2602   rm -rf conftest*
2603    ftp_cv_HAVE_IN_PORT_T=yes 
2604 else
2605   echo "configure: failed program was:" >&5
2606   cat conftest.$ac_ext >&5
2607   rm -rf conftest*
2608    ftp_cv_HAVE_IN_PORT_T=no 
2609 fi
2610 rm -f conftest*
2611         
2612 fi
2613
2614 echo "$ac_t""$ftp_cv_HAVE_IN_PORT_T" 1>&6
2615         if test "x$ftp_cv_HAVE_IN_PORT_T" = "xyes"; then
2616                 cat >> confdefs.h <<\EOF
2617 #define HAVE_IN_PORT_T 1
2618 EOF
2619
2620         else
2621                 
2622                 :
2623         fi
2624
2625
2626
2627         echo $ac_n "checking for sa_family_t""... $ac_c" 1>&6
2628 echo "configure:2629: checking for sa_family_t" >&5
2629 if eval "test \"`echo '$''{'ftp_cv_HAVE_SA_FAMILY_T'+set}'`\" = set"; then
2630   echo $ac_n "(cached) $ac_c" 1>&6
2631 else
2632   
2633                 cat > conftest.$ac_ext <<EOF
2634 #line 2635 "configure"
2635 #include "confdefs.h"
2636  
2637 #include <sys/types.h>
2638 #include <sys/socket.h>  
2639 int main() {
2640   sa_family_t X ; 
2641 ; return 0; }
2642 EOF
2643 if { (eval echo configure:2644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2644   rm -rf conftest*
2645    ftp_cv_HAVE_SA_FAMILY_T=yes 
2646 else
2647   echo "configure: failed program was:" >&5
2648   cat conftest.$ac_ext >&5
2649   rm -rf conftest*
2650    ftp_cv_HAVE_SA_FAMILY_T=no 
2651 fi
2652 rm -f conftest*
2653         
2654 fi
2655
2656 echo "$ac_t""$ftp_cv_HAVE_SA_FAMILY_T" 1>&6
2657         if test "x$ftp_cv_HAVE_SA_FAMILY_T" = "xyes"; then
2658                 cat >> confdefs.h <<\EOF
2659 #define HAVE_SA_FAMILY_T 1
2660 EOF
2661
2662         else
2663                 
2664                 :
2665         fi
2666
2667
2668
2669         echo $ac_n "checking for sockaddr_in.sin_len""... $ac_c" 1>&6
2670 echo "configure:2671: checking for sockaddr_in.sin_len" >&5
2671 if eval "test \"`echo '$''{'ftp_cv_HAVE_SOCKADDR_SA_LEN'+set}'`\" = set"; then
2672   echo $ac_n "(cached) $ac_c" 1>&6
2673 else
2674   
2675                 cat > conftest.$ac_ext <<EOF
2676 #line 2677 "configure"
2677 #include "confdefs.h"
2678  
2679 #include <sys/types.h>
2680 #include <sys/socket.h>
2681 #include <netinet/in.h>  
2682 int main() {
2683  
2684         struct sockaddr_in sin;
2685         int X = sin.sin_len ; 
2686 ; return 0; }
2687 EOF
2688 if { (eval echo configure:2689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2689   rm -rf conftest*
2690    ftp_cv_HAVE_SOCKADDR_SA_LEN=yes 
2691 else
2692   echo "configure: failed program was:" >&5
2693   cat conftest.$ac_ext >&5
2694   rm -rf conftest*
2695    ftp_cv_HAVE_SOCKADDR_SA_LEN=no 
2696 fi
2697 rm -f conftest*
2698         
2699 fi
2700
2701 echo "$ac_t""$ftp_cv_HAVE_SOCKADDR_SA_LEN" 1>&6
2702         if test "x$ftp_cv_HAVE_SOCKADDR_SA_LEN" = "xyes"; then
2703                 cat >> confdefs.h <<\EOF
2704 #define HAVE_SOCKADDR_SA_LEN 1
2705 EOF
2706
2707         else
2708                 
2709                 :
2710         fi
2711
2712
2713
2714         echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
2715 echo "configure:2716: checking for socklen_t" >&5
2716 if eval "test \"`echo '$''{'ftp_cv_HAVE_SOCKLEN_T'+set}'`\" = set"; then
2717   echo $ac_n "(cached) $ac_c" 1>&6
2718 else
2719   
2720                 cat > conftest.$ac_ext <<EOF
2721 #line 2722 "configure"
2722 #include "confdefs.h"
2723  
2724 #include <sys/types.h>
2725 #include <sys/socket.h>  
2726 int main() {
2727   socklen_t X ; 
2728 ; return 0; }
2729 EOF
2730 if { (eval echo configure:2731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2731   rm -rf conftest*
2732    ftp_cv_HAVE_SOCKLEN_T=yes 
2733 else
2734   echo "configure: failed program was:" >&5
2735   cat conftest.$ac_ext >&5
2736   rm -rf conftest*
2737    ftp_cv_HAVE_SOCKLEN_T=no 
2738 fi
2739 rm -f conftest*
2740         
2741 fi
2742
2743 echo "$ac_t""$ftp_cv_HAVE_SOCKLEN_T" 1>&6
2744         if test "x$ftp_cv_HAVE_SOCKLEN_T" = "xyes"; then
2745                 cat >> confdefs.h <<\EOF
2746 #define HAVE_SOCKLEN_T 1
2747 EOF
2748
2749         else
2750                 
2751                 :
2752         fi
2753
2754
2755 if test $opt_ipv6 = yes; then
2756
2757         
2758         echo $ac_n "checking for AF_INET6""... $ac_c" 1>&6
2759 echo "configure:2760: checking for AF_INET6" >&5
2760 if eval "test \"`echo '$''{'ftp_cv_HAVE_AF_INET6'+set}'`\" = set"; then
2761   echo $ac_n "(cached) $ac_c" 1>&6
2762 else
2763   
2764                 cat > conftest.$ac_ext <<EOF
2765 #line 2766 "configure"
2766 #include "confdefs.h"
2767  
2768 #include <sys/types.h>
2769 #include <sys/socket.h>  
2770 int main() {
2771   int X = AF_INET6 ; 
2772 ; return 0; }
2773 EOF
2774 if { (eval echo configure:2775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2775   rm -rf conftest*
2776    ftp_cv_HAVE_AF_INET6=yes 
2777 else
2778   echo "configure: failed program was:" >&5
2779   cat conftest.$ac_ext >&5
2780   rm -rf conftest*
2781    ftp_cv_HAVE_AF_INET6=no 
2782 fi
2783 rm -f conftest*
2784         
2785 fi
2786
2787 echo "$ac_t""$ftp_cv_HAVE_AF_INET6" 1>&6
2788         if test "x$ftp_cv_HAVE_AF_INET6" = "xyes"; then
2789                 cat >> confdefs.h <<\EOF
2790 #define HAVE_AF_INET6 1
2791 EOF
2792
2793         else
2794                 
2795                 :
2796         fi
2797
2798
2799         
2800         echo $ac_n "checking for struct sockaddr_in6""... $ac_c" 1>&6
2801 echo "configure:2802: checking for struct sockaddr_in6" >&5
2802 if eval "test \"`echo '$''{'ftp_cv_HAVE_SOCKADDR_IN6'+set}'`\" = set"; then
2803   echo $ac_n "(cached) $ac_c" 1>&6
2804 else
2805   
2806                 cat > conftest.$ac_ext <<EOF
2807 #line 2808 "configure"
2808 #include "confdefs.h"
2809  
2810 #include <sys/types.h>
2811 #include <netinet/in.h>  
2812 int main() {
2813   struct sockaddr_in6 X ; 
2814 ; return 0; }
2815 EOF
2816 if { (eval echo configure:2817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2817   rm -rf conftest*
2818    ftp_cv_HAVE_SOCKADDR_IN6=yes 
2819 else
2820   echo "configure: failed program was:" >&5
2821   cat conftest.$ac_ext >&5
2822   rm -rf conftest*
2823    ftp_cv_HAVE_SOCKADDR_IN6=no 
2824 fi
2825 rm -f conftest*
2826         
2827 fi
2828
2829 echo "$ac_t""$ftp_cv_HAVE_SOCKADDR_IN6" 1>&6
2830         if test "x$ftp_cv_HAVE_SOCKADDR_IN6" = "xyes"; then
2831                 cat >> confdefs.h <<\EOF
2832 #define HAVE_SOCKADDR_IN6 1
2833 EOF
2834
2835         else
2836                 
2837                 :
2838         fi
2839
2840
2841 fi
2842
2843
2844         echo $ac_n "checking for struct addrinfo""... $ac_c" 1>&6
2845 echo "configure:2846: checking for struct addrinfo" >&5
2846 if eval "test \"`echo '$''{'ftp_cv_HAVE_ADDRINFO'+set}'`\" = set"; then
2847   echo $ac_n "(cached) $ac_c" 1>&6
2848 else
2849   
2850                 cat > conftest.$ac_ext <<EOF
2851 #line 2852 "configure"
2852 #include "confdefs.h"
2853  
2854 #include <sys/types.h>
2855 #include <sys/socket.h>
2856 #include <netdb.h>  
2857 int main() {
2858   struct addrinfo X ; 
2859 ; return 0; }
2860 EOF
2861 if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2862   rm -rf conftest*
2863    ftp_cv_HAVE_ADDRINFO=yes 
2864 else
2865   echo "configure: failed program was:" >&5
2866   cat conftest.$ac_ext >&5
2867   rm -rf conftest*
2868    ftp_cv_HAVE_ADDRINFO=no 
2869 fi
2870 rm -f conftest*
2871         
2872 fi
2873
2874 echo "$ac_t""$ftp_cv_HAVE_ADDRINFO" 1>&6
2875         if test "x$ftp_cv_HAVE_ADDRINFO" = "xyes"; then
2876                 cat >> confdefs.h <<\EOF
2877 #define HAVE_ADDRINFO 1
2878 EOF
2879
2880         else
2881                 
2882                 :
2883         fi
2884
2885
2886
2887         echo $ac_n "checking for d_namlen in struct dirent""... $ac_c" 1>&6
2888 echo "configure:2889: checking for d_namlen in struct dirent" >&5
2889 if eval "test \"`echo '$''{'ftp_cv_HAVE_D_NAMLEN'+set}'`\" = set"; then
2890   echo $ac_n "(cached) $ac_c" 1>&6
2891 else
2892   
2893                 cat > conftest.$ac_ext <<EOF
2894 #line 2895 "configure"
2895 #include "confdefs.h"
2896  
2897 #if HAVE_DIRENT_H
2898 # include <dirent.h>
2899 #else
2900 # define dirent direct
2901 # if HAVE_SYS_NDIR_H
2902 #  include <sys/ndir.h>
2903 # endif
2904 # if HAVE_SYS_DIR_H
2905 #  include <sys/dir.h>
2906 # endif
2907 # if HAVE_NDIR_H
2908 #  include <ndir.h>
2909 # endif
2910 #endif  
2911 int main() {
2912  
2913         struct dirent dp;
2914         int X = dp.d_namlen; ; 
2915 ; return 0; }
2916 EOF
2917 if { (eval echo configure:2918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2918   rm -rf conftest*
2919    ftp_cv_HAVE_D_NAMLEN=yes 
2920 else
2921   echo "configure: failed program was:" >&5
2922   cat conftest.$ac_ext >&5
2923   rm -rf conftest*
2924    ftp_cv_HAVE_D_NAMLEN=no 
2925 fi
2926 rm -f conftest*
2927         
2928 fi
2929
2930 echo "$ac_t""$ftp_cv_HAVE_D_NAMLEN" 1>&6
2931         if test "x$ftp_cv_HAVE_D_NAMLEN" = "xyes"; then
2932                 cat >> confdefs.h <<\EOF
2933 #define HAVE_D_NAMLEN 1
2934 EOF
2935
2936         else
2937                 
2938                 :
2939         fi
2940
2941
2942
2943         echo $ac_n "checking for h_errno declaration""... $ac_c" 1>&6
2944 echo "configure:2945: checking for h_errno declaration" >&5
2945 if eval "test \"`echo '$''{'ftp_cv_HAVE_H_ERRNO_D'+set}'`\" = set"; then
2946   echo $ac_n "(cached) $ac_c" 1>&6
2947 else
2948   
2949                 cat > conftest.$ac_ext <<EOF
2950 #line 2951 "configure"
2951 #include "confdefs.h"
2952  
2953 #include <netdb.h>  
2954 int main() {
2955   int X = h_errno ; 
2956 ; return 0; }
2957 EOF
2958 if { (eval echo configure:2959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2959   rm -rf conftest*
2960    ftp_cv_HAVE_H_ERRNO_D=yes 
2961 else
2962   echo "configure: failed program was:" >&5
2963   cat conftest.$ac_ext >&5
2964   rm -rf conftest*
2965    ftp_cv_HAVE_H_ERRNO_D=no 
2966 fi
2967 rm -f conftest*
2968         
2969 fi
2970
2971 echo "$ac_t""$ftp_cv_HAVE_H_ERRNO_D" 1>&6
2972         if test "x$ftp_cv_HAVE_H_ERRNO_D" = "xyes"; then
2973                 cat >> confdefs.h <<\EOF
2974 #define HAVE_H_ERRNO_D 1
2975 EOF
2976
2977         else
2978                 
2979                 :
2980         fi
2981
2982
2983
2984         echo $ac_n "checking for fclose() declaration""... $ac_c" 1>&6
2985 echo "configure:2986: checking for fclose() declaration" >&5
2986 if eval "test \"`echo '$''{'ftp_cv_HAVE_FCLOSE_D'+set}'`\" = set"; then
2987   echo $ac_n "(cached) $ac_c" 1>&6
2988 else
2989   
2990                 cat > conftest.$ac_ext <<EOF
2991 #line 2992 "configure"
2992 #include "confdefs.h"
2993  
2994 #include <stdio.h>  
2995 int main() {
2996   int (*X)() = fclose ; 
2997 ; return 0; }
2998 EOF
2999 if { (eval echo configure:3000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3000   rm -rf conftest*
3001    ftp_cv_HAVE_FCLOSE_D=yes 
3002 else
3003   echo "configure: failed program was:" >&5
3004   cat conftest.$ac_ext >&5
3005   rm -rf conftest*
3006    ftp_cv_HAVE_FCLOSE_D=no 
3007 fi
3008 rm -f conftest*
3009         
3010 fi
3011
3012 echo "$ac_t""$ftp_cv_HAVE_FCLOSE_D" 1>&6
3013         if test "x$ftp_cv_HAVE_FCLOSE_D" = "xyes"; then
3014                 cat >> confdefs.h <<\EOF
3015 #define HAVE_FCLOSE_D 1
3016 EOF
3017
3018         else
3019                 
3020                 :
3021         fi
3022
3023
3024
3025         echo $ac_n "checking for getpass() declaration""... $ac_c" 1>&6
3026 echo "configure:3027: checking for getpass() declaration" >&5
3027 if eval "test \"`echo '$''{'ftp_cv_HAVE_GETPASS_D'+set}'`\" = set"; then
3028   echo $ac_n "(cached) $ac_c" 1>&6
3029 else
3030   
3031                 cat > conftest.$ac_ext <<EOF
3032 #line 3033 "configure"
3033 #include "confdefs.h"
3034  
3035 #include <stdlib.h>
3036 #include <unistd.h>  
3037 int main() {
3038   char *(*X)() = getpass ; 
3039 ; return 0; }
3040 EOF
3041 if { (eval echo configure:3042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3042   rm -rf conftest*
3043    ftp_cv_HAVE_GETPASS_D=yes 
3044 else
3045   echo "configure: failed program was:" >&5
3046   cat conftest.$ac_ext >&5
3047   rm -rf conftest*
3048    ftp_cv_HAVE_GETPASS_D=no 
3049 fi
3050 rm -f conftest*
3051         
3052 fi
3053
3054 echo "$ac_t""$ftp_cv_HAVE_GETPASS_D" 1>&6
3055         if test "x$ftp_cv_HAVE_GETPASS_D" = "xyes"; then
3056                 
3057         cat >> confdefs.h <<\EOF
3058 #define HAVE_GETPASS_D 1
3059 EOF
3060
3061         else
3062                 
3063                 :
3064         fi
3065
3066
3067
3068         echo $ac_n "checking for optarg declaration""... $ac_c" 1>&6
3069 echo "configure:3070: checking for optarg declaration" >&5
3070 if eval "test \"`echo '$''{'ftp_cv_HAVE_OPTARG_D'+set}'`\" = set"; then
3071   echo $ac_n "(cached) $ac_c" 1>&6
3072 else
3073   
3074                 cat > conftest.$ac_ext <<EOF
3075 #line 3076 "configure"
3076 #include "confdefs.h"
3077  
3078 #include <stdlib.h>
3079 #include <unistd.h>  
3080 int main() {
3081   char *X = optarg ; 
3082 ; return 0; }
3083 EOF
3084 if { (eval echo configure:3085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3085   rm -rf conftest*
3086    ftp_cv_HAVE_OPTARG_D=yes 
3087 else
3088   echo "configure: failed program was:" >&5
3089   cat conftest.$ac_ext >&5
3090   rm -rf conftest*
3091    ftp_cv_HAVE_OPTARG_D=no 
3092 fi
3093 rm -f conftest*
3094         
3095 fi
3096
3097 echo "$ac_t""$ftp_cv_HAVE_OPTARG_D" 1>&6
3098         if test "x$ftp_cv_HAVE_OPTARG_D" = "xyes"; then
3099                 cat >> confdefs.h <<\EOF
3100 #define HAVE_OPTARG_D 1
3101 EOF
3102
3103         else
3104                 
3105                 :
3106         fi
3107
3108
3109
3110         echo $ac_n "checking for optind declaration""... $ac_c" 1>&6
3111 echo "configure:3112: checking for optind declaration" >&5
3112 if eval "test \"`echo '$''{'ftp_cv_HAVE_OPTIND_D'+set}'`\" = set"; then
3113   echo $ac_n "(cached) $ac_c" 1>&6
3114 else
3115   
3116                 cat > conftest.$ac_ext <<EOF
3117 #line 3118 "configure"
3118 #include "confdefs.h"
3119  
3120 #include <stdlib.h>
3121 #include <unistd.h>  
3122 int main() {
3123   int X = optind ; 
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3127   rm -rf conftest*
3128    ftp_cv_HAVE_OPTIND_D=yes 
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133    ftp_cv_HAVE_OPTIND_D=no 
3134 fi
3135 rm -f conftest*
3136         
3137 fi
3138
3139 echo "$ac_t""$ftp_cv_HAVE_OPTIND_D" 1>&6
3140         if test "x$ftp_cv_HAVE_OPTIND_D" = "xyes"; then
3141                 cat >> confdefs.h <<\EOF
3142 #define HAVE_OPTIND_D 1
3143 EOF
3144
3145         else
3146                 
3147                 :
3148         fi
3149
3150
3151
3152         echo $ac_n "checking for pclose() declaration""... $ac_c" 1>&6
3153 echo "configure:3154: checking for pclose() declaration" >&5
3154 if eval "test \"`echo '$''{'ftp_cv_HAVE_PCLOSE_D'+set}'`\" = set"; then
3155   echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157   
3158                 cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161  
3162 #include <stdio.h>  
3163 int main() {
3164   int (*X)() = pclose ; 
3165 ; return 0; }
3166 EOF
3167 if { (eval echo configure:3168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3168   rm -rf conftest*
3169    ftp_cv_HAVE_PCLOSE_D=yes 
3170 else
3171   echo "configure: failed program was:" >&5
3172   cat conftest.$ac_ext >&5
3173   rm -rf conftest*
3174    ftp_cv_HAVE_PCLOSE_D=no 
3175 fi
3176 rm -f conftest*
3177         
3178 fi
3179
3180 echo "$ac_t""$ftp_cv_HAVE_PCLOSE_D" 1>&6
3181         if test "x$ftp_cv_HAVE_PCLOSE_D" = "xyes"; then
3182                 cat >> confdefs.h <<\EOF
3183 #define HAVE_PCLOSE_D 1
3184 EOF
3185
3186         else
3187                 
3188                 :
3189         fi
3190
3191
3192
3193 for ac_func in err fgetln fseeko getaddrinfo getnameinfo inet_ntop inet_pton \
3194                 mkstemp setprogname sl_init snprintf strdup strerror strlcat \
3195                 strlcpy strptime strsep strunvis strvis timegm usleep
3196 do
3197 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3198 echo "configure:3199: checking for $ac_func" >&5
3199 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3200   echo $ac_n "(cached) $ac_c" 1>&6
3201 else
3202   cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 /* System header to define __stub macros and hopefully few prototypes,
3206     which can conflict with char $ac_func(); below.  */
3207 #include <assert.h>
3208 /* Override any gcc2 internal prototype to avoid an error.  */
3209 /* We use char because int might match the return type of a gcc2
3210     builtin and then its argument prototype would still apply.  */
3211 char $ac_func();
3212
3213 int main() {
3214
3215 /* The GNU C library defines this for functions which it implements
3216     to always fail with ENOSYS.  Some functions are actually named
3217     something starting with __ and the normal name is an alias.  */
3218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3219 choke me
3220 #else
3221 $ac_func();
3222 #endif
3223
3224 ; return 0; }
3225 EOF
3226 if { (eval echo configure:3227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3227   rm -rf conftest*
3228   eval "ac_cv_func_$ac_func=yes"
3229 else
3230   echo "configure: failed program was:" >&5
3231   cat conftest.$ac_ext >&5
3232   rm -rf conftest*
3233   eval "ac_cv_func_$ac_func=no"
3234 fi
3235 rm -f conftest*
3236 fi
3237
3238 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3239   echo "$ac_t""yes" 1>&6
3240     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3241   cat >> confdefs.h <<EOF
3242 #define $ac_tr_func 1
3243 EOF
3244  
3245 else
3246   echo "$ac_t""no" 1>&6
3247 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3248 fi
3249 done
3250
3251
3252 for ac_func in gethostbyname2 getpassphrase getpgrp memmove poll select
3253 do
3254 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3255 echo "configure:3256: checking for $ac_func" >&5
3256 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3257   echo $ac_n "(cached) $ac_c" 1>&6
3258 else
3259   cat > conftest.$ac_ext <<EOF
3260 #line 3261 "configure"
3261 #include "confdefs.h"
3262 /* System header to define __stub macros and hopefully few prototypes,
3263     which can conflict with char $ac_func(); below.  */
3264 #include <assert.h>
3265 /* Override any gcc2 internal prototype to avoid an error.  */
3266 /* We use char because int might match the return type of a gcc2
3267     builtin and then its argument prototype would still apply.  */
3268 char $ac_func();
3269
3270 int main() {
3271
3272 /* The GNU C library defines this for functions which it implements
3273     to always fail with ENOSYS.  Some functions are actually named
3274     something starting with __ and the normal name is an alias.  */
3275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3276 choke me
3277 #else
3278 $ac_func();
3279 #endif
3280
3281 ; return 0; }
3282 EOF
3283 if { (eval echo configure:3284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3284   rm -rf conftest*
3285   eval "ac_cv_func_$ac_func=yes"
3286 else
3287   echo "configure: failed program was:" >&5
3288   cat conftest.$ac_ext >&5
3289   rm -rf conftest*
3290   eval "ac_cv_func_$ac_func=no"
3291 fi
3292 rm -f conftest*
3293 fi
3294
3295 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3296   echo "$ac_t""yes" 1>&6
3297     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3298   cat >> confdefs.h <<EOF
3299 #define $ac_tr_func 1
3300 EOF
3301  
3302 else
3303   echo "$ac_t""no" 1>&6
3304 fi
3305 done
3306
3307 if test $ac_cv_func_getpgrp = yes; then
3308         echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
3309 echo "configure:3310: checking whether getpgrp takes no argument" >&5
3310 if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
3311   echo $ac_n "(cached) $ac_c" 1>&6
3312 else
3313   if test "$cross_compiling" = yes; then
3314   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
3315 else
3316   cat > conftest.$ac_ext <<EOF
3317 #line 3318 "configure"
3318 #include "confdefs.h"
3319
3320 /*
3321  * If this system has a BSD-style getpgrp(),
3322  * which takes a pid argument, exit unsuccessfully.
3323  *
3324  * Snarfed from Chet Ramey's bash pgrp.c test program
3325  */
3326 #include <stdio.h>
3327 #include <sys/types.h>
3328
3329 int     pid;
3330 int     pg1, pg2, pg3, pg4;
3331 int     ng, np, s, child;
3332
3333 main()
3334 {
3335         pid = getpid();
3336         pg1 = getpgrp(0);
3337         pg2 = getpgrp();
3338         pg3 = getpgrp(pid);
3339         pg4 = getpgrp(1);
3340
3341         /*
3342          * If all of these values are the same, it's pretty sure that
3343          * we're on a system that ignores getpgrp's first argument.
3344          */
3345         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
3346                 exit(0);
3347
3348         child = fork();
3349         if (child < 0)
3350                 exit(1);
3351         else if (child == 0) {
3352                 np = getpid();
3353                 /*
3354                  * If this is Sys V, this will not work; pgrp will be
3355                  * set to np because setpgrp just changes a pgrp to be
3356                  * the same as the pid.
3357                  */
3358                 setpgrp(np, pg1);
3359                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
3360                 if (ng == pg1) {
3361                         exit(1);
3362                 } else {
3363                         exit(0);
3364                 }
3365         } else {
3366                 wait(&s);
3367                 exit(s>>8);
3368         }
3369 }
3370
3371 EOF
3372 if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3373 then
3374   ac_cv_func_getpgrp_void=yes
3375 else
3376   echo "configure: failed program was:" >&5
3377   cat conftest.$ac_ext >&5
3378   rm -fr conftest*
3379   ac_cv_func_getpgrp_void=no
3380 fi
3381 rm -fr conftest*
3382 fi
3383
3384
3385 fi
3386
3387 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
3388 if test $ac_cv_func_getpgrp_void = yes; then
3389   cat >> confdefs.h <<\EOF
3390 #define GETPGRP_VOID 1
3391 EOF
3392
3393 fi
3394
3395 fi
3396 if test $ac_cv_lib_util_fparseln != yes; then
3397         for ac_func in fparseln
3398 do
3399 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3400 echo "configure:3401: checking for $ac_func" >&5
3401 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407 /* System header to define __stub macros and hopefully few prototypes,
3408     which can conflict with char $ac_func(); below.  */
3409 #include <assert.h>
3410 /* Override any gcc2 internal prototype to avoid an error.  */
3411 /* We use char because int might match the return type of a gcc2
3412     builtin and then its argument prototype would still apply.  */
3413 char $ac_func();
3414
3415 int main() {
3416
3417 /* The GNU C library defines this for functions which it implements
3418     to always fail with ENOSYS.  Some functions are actually named
3419     something starting with __ and the normal name is an alias.  */
3420 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3421 choke me
3422 #else
3423 $ac_func();
3424 #endif
3425
3426 ; return 0; }
3427 EOF
3428 if { (eval echo configure:3429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3429   rm -rf conftest*
3430   eval "ac_cv_func_$ac_func=yes"
3431 else
3432   echo "configure: failed program was:" >&5
3433   cat conftest.$ac_ext >&5
3434   rm -rf conftest*
3435   eval "ac_cv_func_$ac_func=no"
3436 fi
3437 rm -f conftest*
3438 fi
3439
3440 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3441   echo "$ac_t""yes" 1>&6
3442     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3443   cat >> confdefs.h <<EOF
3444 #define $ac_tr_func 1
3445 EOF
3446  
3447 else
3448   echo "$ac_t""no" 1>&6
3449 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3450 fi
3451 done
3452
3453
3454 fi
3455
3456 LIBOBJS="$LIBOBJS glob.o"
3457
3458 if test $ac_cv_func_strptime = yes; then
3459         
3460         echo $ac_n "checking for strptime() declaration""... $ac_c" 1>&6
3461 echo "configure:3462: checking for strptime() declaration" >&5
3462 if eval "test \"`echo '$''{'ftp_cv_HAVE_STRPTIME_D'+set}'`\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   
3466                 cat > conftest.$ac_ext <<EOF
3467 #line 3468 "configure"
3468 #include "confdefs.h"
3469  
3470         #include <time.h>  
3471 int main() {
3472   char *X = strptime("", "", NULL) ; 
3473 ; return 0; }
3474 EOF
3475 if { (eval echo configure:3476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3476   rm -rf conftest*
3477    ftp_cv_HAVE_STRPTIME_D=yes 
3478 else
3479   echo "configure: failed program was:" >&5
3480   cat conftest.$ac_ext >&5
3481   rm -rf conftest*
3482    ftp_cv_HAVE_STRPTIME_D=no 
3483 fi
3484 rm -f conftest*
3485         
3486 fi
3487
3488 echo "$ac_t""$ftp_cv_HAVE_STRPTIME_D" 1>&6
3489         if test "x$ftp_cv_HAVE_STRPTIME_D" = "xyes"; then
3490                 cat >> confdefs.h <<\EOF
3491 #define HAVE_STRPTIME_D 1
3492 EOF
3493
3494         else
3495                 
3496                 :
3497         fi
3498
3499 fi
3500
3501 if test $have_long_long = yes -a $ac_cv_sizeof_off_t -ge 8; then
3502
3503
3504         echo $ac_n "checking *printf() support for %lld""... $ac_c" 1>&6
3505 echo "configure:3506: checking *printf() support for %lld" >&5
3506         can_printf_longlong=no
3507         if test "$cross_compiling" = yes; then
3508    : 
3509 else
3510   cat > conftest.$ac_ext <<EOF
3511 #line 3512 "configure"
3512 #include "confdefs.h"
3513
3514                 #include <stdio.h>
3515                 int main() {
3516                         char buf[100];
3517                         sprintf(buf, "%lld", 4294967300LL);
3518                         return (strcmp(buf, "4294967300"));
3519                 }
3520         
3521 EOF
3522 if { (eval echo configure:3523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3523 then
3524   
3525                 echo "$ac_t""yes" 1>&6
3526                 can_printf_longlong=yes
3527         
3528 else
3529   echo "configure: failed program was:" >&5
3530   cat conftest.$ac_ext >&5
3531   rm -fr conftest*
3532   
3533                 echo "$ac_t""no" 1>&6
3534         
3535 fi
3536 rm -fr conftest*
3537 fi
3538
3539
3540         if test $can_printf_longlong != yes; then
3541                 echo $ac_n "checking *printf() support for %qd""... $ac_c" 1>&6
3542 echo "configure:3543: checking *printf() support for %qd" >&5
3543                 if test "$cross_compiling" = yes; then
3544    : 
3545 else
3546   cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549
3550                         #include <stdio.h>
3551                         int main() {
3552                                 char buf[100];
3553                                 sprintf(buf, "%qd", 4294967300LL);
3554                                 return (strcmp(buf, "4294967300"));
3555                         }
3556                 
3557 EOF
3558 if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3559 then
3560   
3561                         echo "$ac_t""yes" 1>&6
3562                         can_printf_longlong=yes
3563                         cat >> confdefs.h <<\EOF
3564 #define HAVE_PRINTF_QD 1
3565 EOF
3566
3567                 
3568 else
3569   echo "configure: failed program was:" >&5
3570   cat conftest.$ac_ext >&5
3571   rm -fr conftest*
3572   
3573                         echo "$ac_t""no" 1>&6
3574                 
3575 fi
3576 rm -fr conftest*
3577 fi
3578
3579         fi
3580
3581         if test $can_printf_longlong = yes; then
3582                 cat >> confdefs.h <<\EOF
3583 #define HAVE_QUAD_SUPPORT 1
3584 EOF
3585
3586                 for ac_func in strtoll
3587 do
3588 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3589 echo "configure:3590: checking for $ac_func" >&5
3590 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3591   echo $ac_n "(cached) $ac_c" 1>&6
3592 else
3593   cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 /* System header to define __stub macros and hopefully few prototypes,
3597     which can conflict with char $ac_func(); below.  */
3598 #include <assert.h>
3599 /* Override any gcc2 internal prototype to avoid an error.  */
3600 /* We use char because int might match the return type of a gcc2
3601     builtin and then its argument prototype would still apply.  */
3602 char $ac_func();
3603
3604 int main() {
3605
3606 /* The GNU C library defines this for functions which it implements
3607     to always fail with ENOSYS.  Some functions are actually named
3608     something starting with __ and the normal name is an alias.  */
3609 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3610 choke me
3611 #else
3612 $ac_func();
3613 #endif
3614
3615 ; return 0; }
3616 EOF
3617 if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3618   rm -rf conftest*
3619   eval "ac_cv_func_$ac_func=yes"
3620 else
3621   echo "configure: failed program was:" >&5
3622   cat conftest.$ac_ext >&5
3623   rm -rf conftest*
3624   eval "ac_cv_func_$ac_func=no"
3625 fi
3626 rm -f conftest*
3627 fi
3628
3629 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3630   echo "$ac_t""yes" 1>&6
3631     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3632   cat >> confdefs.h <<EOF
3633 #define $ac_tr_func 1
3634 EOF
3635  
3636 else
3637   echo "$ac_t""no" 1>&6
3638 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3639 fi
3640 done
3641
3642
3643         fi
3644
3645 fi
3646
3647
3648 if test $opt_editcomplete = yes; then
3649         if test $have_libedit = yes; then
3650                 
3651         echo $ac_n "checking for EL_RPROMPT in libedit""... $ac_c" 1>&6
3652 echo "configure:3653: checking for EL_RPROMPT in libedit" >&5
3653 if eval "test \"`echo '$''{'ftp_cv_have_libedit'+set}'`\" = set"; then
3654   echo $ac_n "(cached) $ac_c" 1>&6
3655 else
3656   
3657                 cat > conftest.$ac_ext <<EOF
3658 #line 3659 "configure"
3659 #include "confdefs.h"
3660  
3661                 #include <histedit.h>  
3662 int main() {
3663   int X = EL_RPROMPT ; 
3664 ; return 0; }
3665 EOF
3666 if { (eval echo configure:3667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3667   rm -rf conftest*
3668    ftp_cv_have_libedit=yes 
3669 else
3670   echo "configure: failed program was:" >&5
3671   cat conftest.$ac_ext >&5
3672   rm -rf conftest*
3673    ftp_cv_have_libedit=no 
3674 fi
3675 rm -f conftest*
3676         
3677 fi
3678
3679 echo "$ac_t""$ftp_cv_have_libedit" 1>&6
3680         if test "x$ftp_cv_have_libedit" = "xyes"; then
3681                 :
3682         else
3683                 have_libedit=no 
3684                 :
3685         fi
3686
3687         fi
3688
3689         echo $ac_n "checking for working libedit""... $ac_c" 1>&6
3690 echo "configure:3691: checking for working libedit" >&5
3691         if test $have_libedit = no; then
3692                 echo "$ac_t""no - using my own" 1>&6
3693                 INCLUDES="-I\${srcdir}/../libedit $INCLUDES"
3694                 LDFLAGS="-L../libedit $LDFLAGS"
3695                 LIBS="-ledit $LIBS"
3696                 LIBEDIT=libedit.a
3697                 LIBDEPENDS="$LIBDEPENDS ../libedit/libedit.a"
3698         else
3699                 echo "$ac_t""yes" 1>&6
3700         fi
3701 else
3702         CFLAGS="-DNO_EDITCOMPLETE $CFLAGS"
3703 fi
3704
3705 if test $ac_cv_func_sl_init = yes; then
3706         
3707         echo $ac_n "checking if sl_add() returns int""... $ac_c" 1>&6
3708 echo "configure:3709: checking if sl_add() returns int" >&5
3709 if eval "test \"`echo '$''{'ftp_cv_INT_SL_ADD'+set}'`\" = set"; then
3710   echo $ac_n "(cached) $ac_c" 1>&6
3711 else
3712   
3713                 cat > conftest.$ac_ext <<EOF
3714 #line 3715 "configure"
3715 #include "confdefs.h"
3716  
3717         #include <stringlist.h>  
3718 int main() {
3719   int f = sl_add((StringList *)0, "foo") ; 
3720 ; return 0; }
3721 EOF
3722 if { (eval echo configure:3723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3723   rm -rf conftest*
3724    ftp_cv_INT_SL_ADD=yes 
3725 else
3726   echo "configure: failed program was:" >&5
3727   cat conftest.$ac_ext >&5
3728   rm -rf conftest*
3729    ftp_cv_INT_SL_ADD=no 
3730 fi
3731 rm -f conftest*
3732         
3733 fi
3734
3735 echo "$ac_t""$ftp_cv_INT_SL_ADD" 1>&6
3736         if test "x$ftp_cv_INT_SL_ADD" = "xyes"; then
3737                 : 
3738         else
3739                 LIBOBJS="$LIBOBJS sl_init.o"
3740                 :
3741         fi
3742
3743 fi
3744
3745
3746 have_rfc2553_netdb=no
3747 if test $ac_cv_func_getaddrinfo = yes -a ! -n "$socks"; then
3748         
3749         echo $ac_n "checking for AI_NUMERICHOST""... $ac_c" 1>&6
3750 echo "configure:3751: checking for AI_NUMERICHOST" >&5
3751 if eval "test \"`echo '$''{'ftp_cv_have_ai_numerichost'+set}'`\" = set"; then
3752   echo $ac_n "(cached) $ac_c" 1>&6
3753 else
3754   
3755                 cat > conftest.$ac_ext <<EOF
3756 #line 3757 "configure"
3757 #include "confdefs.h"
3758  
3759         #include <sys/types.h>
3760         #include <sys/socket.h>
3761         #include <netdb.h>  
3762 int main() {
3763   int X = AI_NUMERICHOST ; 
3764 ; return 0; }
3765 EOF
3766 if { (eval echo configure:3767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3767   rm -rf conftest*
3768    ftp_cv_have_ai_numerichost=yes 
3769 else
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -rf conftest*
3773    ftp_cv_have_ai_numerichost=no 
3774 fi
3775 rm -f conftest*
3776         
3777 fi
3778
3779 echo "$ac_t""$ftp_cv_have_ai_numerichost" 1>&6
3780         if test "x$ftp_cv_have_ai_numerichost" = "xyes"; then
3781                  have_rfc2553_netdb=yes 
3782         else
3783                 
3784                 :
3785         fi
3786
3787 fi
3788 echo $ac_n "checking for working getaddrinfo()""... $ac_c" 1>&6
3789 echo "configure:3790: checking for working getaddrinfo()" >&5
3790 if test $have_rfc2553_netdb = yes; then
3791         cat >> confdefs.h <<\EOF
3792 #define HAVE_RFC2553_NETDB 1
3793 EOF
3794
3795         echo "$ac_t""yes" 1>&6
3796 else
3797         if test $ac_cv_func_getaddrinfo = yes; then
3798                 LIBOBJS="$LIBOBJS getaddrinfo.o"
3799                 echo "$ac_t""no - using local version" 1>&6
3800         else
3801                 echo "$ac_t""using local version" 1>&6
3802         fi
3803 fi
3804
3805
3806 if test $ac_cv_header_vis_h = yes; then
3807         
3808         echo $ac_n "checking for VIS_WHITE in vis.h""... $ac_c" 1>&6
3809 echo "configure:3810: checking for VIS_WHITE in vis.h" >&5
3810 if eval "test \"`echo '$''{'ftp_cv_have_vis_white'+set}'`\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   
3814                 cat > conftest.$ac_ext <<EOF
3815 #line 3816 "configure"
3816 #include "confdefs.h"
3817  
3818         #include <sys/types.h>
3819         #include <vis.h>  
3820 int main() {
3821   int X = VIS_WHITE ; 
3822 ; return 0; }
3823 EOF
3824 if { (eval echo configure:3825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3825   rm -rf conftest*
3826    ftp_cv_have_vis_white=yes 
3827 else
3828   echo "configure: failed program was:" >&5
3829   cat conftest.$ac_ext >&5
3830   rm -rf conftest*
3831    ftp_cv_have_vis_white=no 
3832 fi
3833 rm -f conftest*
3834         
3835 fi
3836
3837 echo "$ac_t""$ftp_cv_have_vis_white" 1>&6
3838         if test "x$ftp_cv_have_vis_white" = "xyes"; then
3839                 :
3840         else
3841                 ac_cv_header_vis_h=no 
3842                 :
3843         fi
3844
3845 fi
3846
3847
3848 if test -n "$LIBOBJS"; then
3849         INCLUDES="$INCLUDES -I\${srcdir}/../libukem"
3850         LDFLAGS="$LDFLAGS -L../libukem"
3851         LIBS="$LIBS -lukem"
3852         LIBUKEM=libukem.a
3853         LIBDEPENDS="$LIBDEPENDS ../libukem/libukem.a"
3854 fi
3855
3856
3857
3858
3859
3860
3861
3862 trap '' 1 2 15
3863 cat > confcache <<\EOF
3864 # This file is a shell script that caches the results of configure
3865 # tests run on this system so they can be shared between configure
3866 # scripts and configure runs.  It is not useful on other systems.
3867 # If it contains results you don't want to keep, you may remove or edit it.
3868 #
3869 # By default, configure uses ./config.cache as the cache file,
3870 # creating it if it does not exist already.  You can give configure
3871 # the --cache-file=FILE option to use a different cache file; that is
3872 # what configure does when it calls configure scripts in
3873 # subdirectories, so they share the cache.
3874 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3875 # config.status only pays attention to the cache file if you give it the
3876 # --recheck option to rerun configure.
3877 #
3878 EOF
3879 # The following way of writing the cache mishandles newlines in values,
3880 # but we know of no workaround that is simple, portable, and efficient.
3881 # So, don't put newlines in cache variables' values.
3882 # Ultrix sh set writes to stderr and can't be redirected directly,
3883 # and sets the high bit in the cache file unless we assign to the vars.
3884 (set) 2>&1 |
3885   case `(ac_space=' '; set | grep ac_space) 2>&1` in
3886   *ac_space=\ *)
3887     # `set' does not quote correctly, so add quotes (double-quote substitution
3888     # turns \\\\ into \\, and sed turns \\ into \).
3889     sed -n \
3890       -e "s/'/'\\\\''/g" \
3891       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3892     ;;
3893   *)
3894     # `set' quotes correctly as required by POSIX, so do not add quotes.
3895     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3896     ;;
3897   esac >> confcache
3898 if cmp -s $cache_file confcache; then
3899   :
3900 else
3901   if test -w $cache_file; then
3902     echo "updating cache $cache_file"
3903     cat confcache > $cache_file
3904   else
3905     echo "not updating unwritable cache $cache_file"
3906   fi
3907 fi
3908 rm -f confcache
3909
3910 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3911
3912 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3913 # Let make expand exec_prefix.
3914 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3915
3916 # Any assignment to VPATH causes Sun make to only execute
3917 # the first set of double-colon rules, so remove it if not needed.
3918 # If there is a colon in the path, we need to keep it.
3919 if test "x$srcdir" = x.; then
3920   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
3921 fi
3922
3923 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3924
3925 DEFS=-DHAVE_CONFIG_H
3926
3927 # Without the "./", some shells look in PATH for config.status.
3928 : ${CONFIG_STATUS=./config.status}
3929
3930 echo creating $CONFIG_STATUS
3931 rm -f $CONFIG_STATUS
3932 cat > $CONFIG_STATUS <<EOF
3933 #! /bin/sh
3934 # Generated automatically by configure.
3935 # Run this file to recreate the current configuration.
3936 # This directory was configured as follows,
3937 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3938 #
3939 # $0 $ac_configure_args
3940 #
3941 # Compiler output produced by configure, useful for debugging
3942 # configure, is in ./config.log if it exists.
3943
3944 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3945 for ac_option
3946 do
3947   case "\$ac_option" in
3948   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3949     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3950     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3951   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3952     echo "$CONFIG_STATUS generated by autoconf version 2.13"
3953     exit 0 ;;
3954   -help | --help | --hel | --he | --h)
3955     echo "\$ac_cs_usage"; exit 0 ;;
3956   *) echo "\$ac_cs_usage"; exit 1 ;;
3957   esac
3958 done
3959
3960 ac_given_srcdir=$srcdir
3961 ac_given_INSTALL="$INSTALL"
3962
3963 trap 'rm -fr `echo "Makefile libedit/Makefile libedit/makelist libukem/Makefile \
3964         src/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3965 EOF
3966 cat >> $CONFIG_STATUS <<EOF
3967
3968 # Protect against being on the right side of a sed subst in config.status.
3969 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3970  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3971 $ac_vpsub
3972 $extrasub
3973 s%@SHELL@%$SHELL%g
3974 s%@CFLAGS@%$CFLAGS%g
3975 s%@CPPFLAGS@%$CPPFLAGS%g
3976 s%@CXXFLAGS@%$CXXFLAGS%g
3977 s%@FFLAGS@%$FFLAGS%g
3978 s%@DEFS@%$DEFS%g
3979 s%@LDFLAGS@%$LDFLAGS%g
3980 s%@LIBS@%$LIBS%g
3981 s%@exec_prefix@%$exec_prefix%g
3982 s%@prefix@%$prefix%g
3983 s%@program_transform_name@%$program_transform_name%g
3984 s%@bindir@%$bindir%g
3985 s%@sbindir@%$sbindir%g
3986 s%@libexecdir@%$libexecdir%g
3987 s%@datadir@%$datadir%g
3988 s%@sysconfdir@%$sysconfdir%g
3989 s%@sharedstatedir@%$sharedstatedir%g
3990 s%@localstatedir@%$localstatedir%g
3991 s%@libdir@%$libdir%g
3992 s%@includedir@%$includedir%g
3993 s%@oldincludedir@%$oldincludedir%g
3994 s%@infodir@%$infodir%g
3995 s%@mandir@%$mandir%g
3996 s%@SET_MAKE@%$SET_MAKE%g
3997 s%@CC@%$CC%g
3998 s%@AWK@%$AWK%g
3999 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4000 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4001 s%@INSTALL_DATA@%$INSTALL_DATA%g
4002 s%@RANLIB@%$RANLIB%g
4003 s%@AR@%$AR%g
4004 s%@CPP@%$CPP%g
4005 s%@LIBOBJS@%$LIBOBJS%g
4006 s%@INCLUDES@%$INCLUDES%g
4007 s%@LIBEDIT@%$LIBEDIT%g
4008 s%@LIBUKEM@%$LIBUKEM%g
4009 s%@LIBDEPENDS@%$LIBDEPENDS%g
4010
4011 CEOF
4012 EOF
4013
4014 cat >> $CONFIG_STATUS <<\EOF
4015
4016 # Split the substitutions into bite-sized pieces for seds with
4017 # small command number limits, like on Digital OSF/1 and HP-UX.
4018 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4019 ac_file=1 # Number of current file.
4020 ac_beg=1 # First line for current file.
4021 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4022 ac_more_lines=:
4023 ac_sed_cmds=""
4024 while $ac_more_lines; do
4025   if test $ac_beg -gt 1; then
4026     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4027   else
4028     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4029   fi
4030   if test ! -s conftest.s$ac_file; then
4031     ac_more_lines=false
4032     rm -f conftest.s$ac_file
4033   else
4034     if test -z "$ac_sed_cmds"; then
4035       ac_sed_cmds="sed -f conftest.s$ac_file"
4036     else
4037       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4038     fi
4039     ac_file=`expr $ac_file + 1`
4040     ac_beg=$ac_end
4041     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4042   fi
4043 done
4044 if test -z "$ac_sed_cmds"; then
4045   ac_sed_cmds=cat
4046 fi
4047 EOF
4048
4049 cat >> $CONFIG_STATUS <<EOF
4050
4051 CONFIG_FILES=\${CONFIG_FILES-"Makefile libedit/Makefile libedit/makelist libukem/Makefile \
4052         src/Makefile"}
4053 EOF
4054 cat >> $CONFIG_STATUS <<\EOF
4055 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4056   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4057   case "$ac_file" in
4058   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4059        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4060   *) ac_file_in="${ac_file}.in" ;;
4061   esac
4062
4063   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4064
4065   # Remove last slash and all that follows it.  Not all systems have dirname.
4066   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4067   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4068     # The file is in a subdirectory.
4069     test ! -d "$ac_dir" && mkdir "$ac_dir"
4070     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4071     # A "../" for each directory in $ac_dir_suffix.
4072     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4073   else
4074     ac_dir_suffix= ac_dots=
4075   fi
4076
4077   case "$ac_given_srcdir" in
4078   .)  srcdir=.
4079       if test -z "$ac_dots"; then top_srcdir=.
4080       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4081   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4082   *) # Relative path.
4083     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4084     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4085   esac
4086
4087   case "$ac_given_INSTALL" in
4088   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4089   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4090   esac
4091
4092   echo creating "$ac_file"
4093   rm -f "$ac_file"
4094   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4095   case "$ac_file" in
4096   *Makefile*) ac_comsub="1i\\
4097 # $configure_input" ;;
4098   *) ac_comsub= ;;
4099   esac
4100
4101   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4102   sed -e "$ac_comsub
4103 s%@configure_input@%$configure_input%g
4104 s%@srcdir@%$srcdir%g
4105 s%@top_srcdir@%$top_srcdir%g
4106 s%@INSTALL@%$INSTALL%g
4107 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4108 fi; done
4109 rm -f conftest.s*
4110
4111 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4112 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4113 #
4114 # ac_d sets the value in "#define NAME VALUE" lines.
4115 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4116 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4117 ac_dC='\3'
4118 ac_dD='%g'
4119 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4120 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4121 ac_uB='\([      ]\)%\1#\2define\3'
4122 ac_uC=' '
4123 ac_uD='\4%g'
4124 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4125 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4126 ac_eB='$%\1#\2define\3'
4127 ac_eC=' '
4128 ac_eD='%g'
4129
4130 if test "${CONFIG_HEADERS+set}" != set; then
4131 EOF
4132 cat >> $CONFIG_STATUS <<EOF
4133   CONFIG_HEADERS="config.h"
4134 EOF
4135 cat >> $CONFIG_STATUS <<\EOF
4136 fi
4137 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4138   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4139   case "$ac_file" in
4140   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4141        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4142   *) ac_file_in="${ac_file}.in" ;;
4143   esac
4144
4145   echo creating $ac_file
4146
4147   rm -f conftest.frag conftest.in conftest.out
4148   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4149   cat $ac_file_inputs > conftest.in
4150
4151 EOF
4152
4153 # Transform confdefs.h into a sed script conftest.vals that substitutes
4154 # the proper values into config.h.in to produce config.h.  And first:
4155 # Protect against being on the right side of a sed subst in config.status.
4156 # Protect against being in an unquoted here document in config.status.
4157 rm -f conftest.vals
4158 cat > conftest.hdr <<\EOF
4159 s/[\\&%]/\\&/g
4160 s%[\\$`]%\\&%g
4161 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4162 s%ac_d%ac_u%gp
4163 s%ac_u%ac_e%gp
4164 EOF
4165 sed -n -f conftest.hdr confdefs.h > conftest.vals
4166 rm -f conftest.hdr
4167
4168 # This sed command replaces #undef with comments.  This is necessary, for
4169 # example, in the case of _POSIX_SOURCE, which is predefined and required
4170 # on some systems where configure will not decide to define it.
4171 cat >> conftest.vals <<\EOF
4172 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4173 EOF
4174
4175 # Break up conftest.vals because some shells have a limit on
4176 # the size of here documents, and old seds have small limits too.
4177
4178 rm -f conftest.tail
4179 while :
4180 do
4181   ac_lines=`grep -c . conftest.vals`
4182   # grep -c gives empty output for an empty file on some AIX systems.
4183   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4184   # Write a limited-size here document to conftest.frag.
4185   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4186   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4187   echo 'CEOF
4188   sed -f conftest.frag conftest.in > conftest.out
4189   rm -f conftest.in
4190   mv conftest.out conftest.in
4191 ' >> $CONFIG_STATUS
4192   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4193   rm -f conftest.vals
4194   mv conftest.tail conftest.vals
4195 done
4196 rm -f conftest.vals
4197
4198 cat >> $CONFIG_STATUS <<\EOF
4199   rm -f conftest.frag conftest.h
4200   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4201   cat conftest.in >> conftest.h
4202   rm -f conftest.in
4203   if cmp -s $ac_file conftest.h 2>/dev/null; then
4204     echo "$ac_file is unchanged"
4205     rm -f conftest.h
4206   else
4207     # Remove last slash and all that follows it.  Not all systems have dirname.
4208       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4209       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4210       # The file is in a subdirectory.
4211       test ! -d "$ac_dir" && mkdir "$ac_dir"
4212     fi
4213     rm -f $ac_file
4214     mv conftest.h $ac_file
4215   fi
4216 fi; done
4217
4218 EOF
4219 cat >> $CONFIG_STATUS <<EOF
4220
4221 EOF
4222 cat >> $CONFIG_STATUS <<\EOF
4223
4224 exit 0
4225 EOF
4226 chmod +x $CONFIG_STATUS
4227 rm -fr confdefs* $ac_clean_files
4228 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4229