* Merged mts/sendmail functionality into mts/smtp; switching between
[mmh] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-apop           enable client-side support for POP3 and APOP"
16 ac_help="$ac_help
17   --enable-debug          enable nmh code debugging"
18 ac_help="$ac_help
19   --enable-masquerade[='draft_from mmailid username_extension']
20                           enable up to 3 types of address masquerading [none]"
21 ac_help="$ac_help
22   --enable-mhe            enable mhe support (DEFAULT)"
23 ac_help="$ac_help
24   --enable-pop            enable client-side support for plain POP3"
25 ac_help="$ac_help
26   --with-hesiod=PREFIX    specify location of Hesiod"
27 ac_help="$ac_help
28   --with-krb4=PREFIX      specify location of Kerberos V4 for KPOP support"
29 ac_help="$ac_help
30   --with-editor=EDITOR    specify the default editor"
31 ac_help="$ac_help
32   --with-mts=MTS          specify the default mail transport agent/service"
33 ac_help="$ac_help
34   --with-pager=PAGER      specify the default pager"
35 ac_help="$ac_help
36   --with-smtpservers='SMTPSERVER1[ SMTPSERVER2...]'
37                           specify the default SMTP server(s) [localhost]"
38 ac_default_prefix=/usr/local/nmh
39
40 # Initialize some variables set by options.
41 # The variables have the same names as the options, with
42 # dashes changed to underlines.
43 build=NONE
44 cache_file=./config.cache
45 exec_prefix=NONE
46 host=NONE
47 no_create=
48 nonopt=NONE
49 no_recursion=
50 prefix=NONE
51 program_prefix=NONE
52 program_suffix=NONE
53 program_transform_name=s,x,x,
54 silent=
55 site=
56 srcdir=
57 target=NONE
58 verbose=
59 x_includes=NONE
60 x_libraries=NONE
61 bindir='${exec_prefix}/bin'
62 sbindir='${exec_prefix}/sbin'
63 libexecdir='${exec_prefix}/libexec'
64 datadir='${prefix}/share'
65 sysconfdir='${prefix}/etc'
66 sharedstatedir='${prefix}/com'
67 localstatedir='${prefix}/var'
68 libdir='${exec_prefix}/lib'
69 includedir='${prefix}/include'
70 oldincludedir='/usr/include'
71 infodir='${prefix}/info'
72 mandir='${prefix}/man'
73
74 # Initialize some other variables.
75 subdirs=
76 MFLAGS= MAKEFLAGS=
77 SHELL=${CONFIG_SHELL-/bin/sh}
78 # Maximum number of lines to put in a shell here document.
79 ac_max_here_lines=12
80
81 ac_prev=
82 for ac_option
83 do
84
85   # If the previous option needs an argument, assign it.
86   if test -n "$ac_prev"; then
87     eval "$ac_prev=\$ac_option"
88     ac_prev=
89     continue
90   fi
91
92   case "$ac_option" in
93   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
94   *) ac_optarg= ;;
95   esac
96
97   # Accept the important Cygnus configure options, so we can diagnose typos.
98
99   case "$ac_option" in
100
101   -bindir | --bindir | --bindi | --bind | --bin | --bi)
102     ac_prev=bindir ;;
103   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
104     bindir="$ac_optarg" ;;
105
106   -build | --build | --buil | --bui | --bu)
107     ac_prev=build ;;
108   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
109     build="$ac_optarg" ;;
110
111   -cache-file | --cache-file | --cache-fil | --cache-fi \
112   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
113     ac_prev=cache_file ;;
114   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
115   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
116     cache_file="$ac_optarg" ;;
117
118   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
119     ac_prev=datadir ;;
120   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
121   | --da=*)
122     datadir="$ac_optarg" ;;
123
124   -disable-* | --disable-*)
125     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
126     # Reject names that are not valid shell variable names.
127     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
128       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
129     fi
130     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
131     eval "enable_${ac_feature}=no" ;;
132
133   -enable-* | --enable-*)
134     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
135     # Reject names that are not valid shell variable names.
136     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
137       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
138     fi
139     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
140     case "$ac_option" in
141       *=*) ;;
142       *) ac_optarg=yes ;;
143     esac
144     eval "enable_${ac_feature}='$ac_optarg'" ;;
145
146   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
147   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
148   | --exec | --exe | --ex)
149     ac_prev=exec_prefix ;;
150   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
151   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
152   | --exec=* | --exe=* | --ex=*)
153     exec_prefix="$ac_optarg" ;;
154
155   -gas | --gas | --ga | --g)
156     # Obsolete; use --with-gas.
157     with_gas=yes ;;
158
159   -help | --help | --hel | --he)
160     # Omit some internal or obsolete options to make the list less imposing.
161     # This message is too long to be a string in the A/UX 3.1 sh.
162     cat << EOF
163 Usage: configure [options] [host]
164 Options: [defaults in brackets after descriptions]
165 Configuration:
166   --cache-file=FILE       cache test results in FILE
167   --help                  print this message
168   --no-create             do not create output files
169   --quiet, --silent       do not print \`checking...' messages
170   --version               print the version of autoconf that created configure
171 Directory and file names:
172   --prefix=PREFIX         install architecture-independent files in PREFIX
173                           [$ac_default_prefix]
174   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
175                           [same as prefix]
176   --bindir=DIR            user executables in DIR [EPREFIX/bin]
177   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
178   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
179   --datadir=DIR           read-only architecture-independent data in DIR
180                           [PREFIX/share]
181   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
182   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
183                           [PREFIX/com]
184   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
185   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
186   --includedir=DIR        C header files in DIR [PREFIX/include]
187   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
188   --infodir=DIR           info documentation in DIR [PREFIX/info]
189   --mandir=DIR            man documentation in DIR [PREFIX/man]
190   --srcdir=DIR            find the sources in DIR [configure dir or ..]
191   --program-prefix=PREFIX prepend PREFIX to installed program names
192   --program-suffix=SUFFIX append SUFFIX to installed program names
193   --program-transform-name=PROGRAM
194                           run sed PROGRAM on installed program names
195 EOF
196     cat << EOF
197 Host type:
198   --build=BUILD           configure for building on BUILD [BUILD=HOST]
199   --host=HOST             configure for HOST [guessed]
200   --target=TARGET         configure for TARGET [TARGET=HOST]
201 Features and packages:
202   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
203   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
204   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
205   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
206   --x-includes=DIR        X include files are in DIR
207   --x-libraries=DIR       X library files are in DIR
208 EOF
209     if test -n "$ac_help"; then
210       echo "--enable and --with options recognized:$ac_help"
211     fi
212     exit 0 ;;
213
214   -host | --host | --hos | --ho)
215     ac_prev=host ;;
216   -host=* | --host=* | --hos=* | --ho=*)
217     host="$ac_optarg" ;;
218
219   -includedir | --includedir | --includedi | --included | --include \
220   | --includ | --inclu | --incl | --inc)
221     ac_prev=includedir ;;
222   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
223   | --includ=* | --inclu=* | --incl=* | --inc=*)
224     includedir="$ac_optarg" ;;
225
226   -infodir | --infodir | --infodi | --infod | --info | --inf)
227     ac_prev=infodir ;;
228   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
229     infodir="$ac_optarg" ;;
230
231   -libdir | --libdir | --libdi | --libd)
232     ac_prev=libdir ;;
233   -libdir=* | --libdir=* | --libdi=* | --libd=*)
234     libdir="$ac_optarg" ;;
235
236   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
237   | --libexe | --libex | --libe)
238     ac_prev=libexecdir ;;
239   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
240   | --libexe=* | --libex=* | --libe=*)
241     libexecdir="$ac_optarg" ;;
242
243   -localstatedir | --localstatedir | --localstatedi | --localstated \
244   | --localstate | --localstat | --localsta | --localst \
245   | --locals | --local | --loca | --loc | --lo)
246     ac_prev=localstatedir ;;
247   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
248   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
249   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
250     localstatedir="$ac_optarg" ;;
251
252   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
253     ac_prev=mandir ;;
254   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
255     mandir="$ac_optarg" ;;
256
257   -nfp | --nfp | --nf)
258     # Obsolete; use --without-fp.
259     with_fp=no ;;
260
261   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
262   | --no-cr | --no-c)
263     no_create=yes ;;
264
265   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
266   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
267     no_recursion=yes ;;
268
269   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
270   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
271   | --oldin | --oldi | --old | --ol | --o)
272     ac_prev=oldincludedir ;;
273   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
274   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
275   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
276     oldincludedir="$ac_optarg" ;;
277
278   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
279     ac_prev=prefix ;;
280   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
281     prefix="$ac_optarg" ;;
282
283   -program-prefix | --program-prefix | --program-prefi | --program-pref \
284   | --program-pre | --program-pr | --program-p)
285     ac_prev=program_prefix ;;
286   -program-prefix=* | --program-prefix=* | --program-prefi=* \
287   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
288     program_prefix="$ac_optarg" ;;
289
290   -program-suffix | --program-suffix | --program-suffi | --program-suff \
291   | --program-suf | --program-su | --program-s)
292     ac_prev=program_suffix ;;
293   -program-suffix=* | --program-suffix=* | --program-suffi=* \
294   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
295     program_suffix="$ac_optarg" ;;
296
297   -program-transform-name | --program-transform-name \
298   | --program-transform-nam | --program-transform-na \
299   | --program-transform-n | --program-transform- \
300   | --program-transform | --program-transfor \
301   | --program-transfo | --program-transf \
302   | --program-trans | --program-tran \
303   | --progr-tra | --program-tr | --program-t)
304     ac_prev=program_transform_name ;;
305   -program-transform-name=* | --program-transform-name=* \
306   | --program-transform-nam=* | --program-transform-na=* \
307   | --program-transform-n=* | --program-transform-=* \
308   | --program-transform=* | --program-transfor=* \
309   | --program-transfo=* | --program-transf=* \
310   | --program-trans=* | --program-tran=* \
311   | --progr-tra=* | --program-tr=* | --program-t=*)
312     program_transform_name="$ac_optarg" ;;
313
314   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
315   | -silent | --silent | --silen | --sile | --sil)
316     silent=yes ;;
317
318   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
319     ac_prev=sbindir ;;
320   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
321   | --sbi=* | --sb=*)
322     sbindir="$ac_optarg" ;;
323
324   -sharedstatedir | --sharedstatedir | --sharedstatedi \
325   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
326   | --sharedst | --shareds | --shared | --share | --shar \
327   | --sha | --sh)
328     ac_prev=sharedstatedir ;;
329   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
330   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
331   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
332   | --sha=* | --sh=*)
333     sharedstatedir="$ac_optarg" ;;
334
335   -site | --site | --sit)
336     ac_prev=site ;;
337   -site=* | --site=* | --sit=*)
338     site="$ac_optarg" ;;
339
340   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
341     ac_prev=srcdir ;;
342   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
343     srcdir="$ac_optarg" ;;
344
345   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
346   | --syscon | --sysco | --sysc | --sys | --sy)
347     ac_prev=sysconfdir ;;
348   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
349   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
350     sysconfdir="$ac_optarg" ;;
351
352   -target | --target | --targe | --targ | --tar | --ta | --t)
353     ac_prev=target ;;
354   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
355     target="$ac_optarg" ;;
356
357   -v | -verbose | --verbose | --verbos | --verbo | --verb)
358     verbose=yes ;;
359
360   -version | --version | --versio | --versi | --vers)
361     echo "configure generated by autoconf version 2.13"
362     exit 0 ;;
363
364   -with-* | --with-*)
365     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
366     # Reject names that are not valid shell variable names.
367     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
368       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369     fi
370     ac_package=`echo $ac_package| sed 's/-/_/g'`
371     case "$ac_option" in
372       *=*) ;;
373       *) ac_optarg=yes ;;
374     esac
375     eval "with_${ac_package}='$ac_optarg'" ;;
376
377   -without-* | --without-*)
378     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
379     # Reject names that are not valid shell variable names.
380     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
381       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
382     fi
383     ac_package=`echo $ac_package| sed 's/-/_/g'`
384     eval "with_${ac_package}=no" ;;
385
386   --x)
387     # Obsolete; use --with-x.
388     with_x=yes ;;
389
390   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
391   | --x-incl | --x-inc | --x-in | --x-i)
392     ac_prev=x_includes ;;
393   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
394   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
395     x_includes="$ac_optarg" ;;
396
397   -x-libraries | --x-libraries | --x-librarie | --x-librari \
398   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
399     ac_prev=x_libraries ;;
400   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
401   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
402     x_libraries="$ac_optarg" ;;
403
404   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
405     ;;
406
407   *)
408     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
409       echo "configure: warning: $ac_option: invalid host type" 1>&2
410     fi
411     if test "x$nonopt" != xNONE; then
412       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
413     fi
414     nonopt="$ac_option"
415     ;;
416
417   esac
418 done
419
420 if test -n "$ac_prev"; then
421   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
422 fi
423
424 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
425
426 # File descriptor usage:
427 # 0 standard input
428 # 1 file creation
429 # 2 errors and warnings
430 # 3 some systems may open it to /dev/tty
431 # 4 used on the Kubota Titan
432 # 6 checking for... messages and results
433 # 5 compiler messages saved in config.log
434 if test "$silent" = yes; then
435   exec 6>/dev/null
436 else
437   exec 6>&1
438 fi
439 exec 5>./config.log
440
441 echo "\
442 This file contains any messages produced by compilers while
443 running configure, to aid debugging if configure makes a mistake.
444 " 1>&5
445
446 # Strip out --no-create and --no-recursion so they do not pile up.
447 # Also quote any args containing shell metacharacters.
448 ac_configure_args=
449 for ac_arg
450 do
451   case "$ac_arg" in
452   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
453   | --no-cr | --no-c) ;;
454   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
455   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
456   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
457   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
458   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
459   esac
460 done
461
462 # NLS nuisances.
463 # Only set these to C if already set.  These must not be set unconditionally
464 # because not all systems understand e.g. LANG=C (notably SCO).
465 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
466 # Non-C LC_CTYPE values break the ctype check.
467 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
468 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
469 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
470 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
471
472 # confdefs.h avoids OS command line length limits that DEFS can exceed.
473 rm -rf conftest* confdefs.h
474 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
475 echo > confdefs.h
476
477 # A filename unique to this package, relative to the directory that
478 # configure is in, which we can look for to find out if srcdir is correct.
479 ac_unique_file=h/nmh.h
480
481 # Find the source files, if location was not specified.
482 if test -z "$srcdir"; then
483   ac_srcdir_defaulted=yes
484   # Try the directory containing this script, then its parent.
485   ac_prog=$0
486   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
487   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
488   srcdir=$ac_confdir
489   if test ! -r $srcdir/$ac_unique_file; then
490     srcdir=..
491   fi
492 else
493   ac_srcdir_defaulted=no
494 fi
495 if test ! -r $srcdir/$ac_unique_file; then
496   if test "$ac_srcdir_defaulted" = yes; then
497     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
498   else
499     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
500   fi
501 fi
502 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
503
504 # Prefer explicitly selected file to automatically selected ones.
505 if test -z "$CONFIG_SITE"; then
506   if test "x$prefix" != xNONE; then
507     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
508   else
509     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
510   fi
511 fi
512 for ac_site_file in $CONFIG_SITE; do
513   if test -r "$ac_site_file"; then
514     echo "loading site script $ac_site_file"
515     . "$ac_site_file"
516   fi
517 done
518
519 if test -r "$cache_file"; then
520   echo "loading cache $cache_file"
521   . $cache_file
522 else
523   echo "creating cache $cache_file"
524   > $cache_file
525 fi
526
527 ac_ext=c
528 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
529 ac_cpp='$CPP $CPPFLAGS'
530 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
531 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
532 cross_compiling=$ac_cv_prog_cc_cross
533
534 ac_exeext=
535 ac_objext=o
536 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
537   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
538   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
539     ac_n= ac_c='
540 ' ac_t='        '
541   else
542     ac_n=-n ac_c= ac_t=
543   fi
544 else
545   ac_n= ac_c='\c' ac_t=
546 fi
547
548
549
550
551 ac_aux_dir=
552 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
553   if test -f $ac_dir/install-sh; then
554     ac_aux_dir=$ac_dir
555     ac_install_sh="$ac_aux_dir/install-sh -c"
556     break
557   elif test -f $ac_dir/install.sh; then
558     ac_aux_dir=$ac_dir
559     ac_install_sh="$ac_aux_dir/install.sh -c"
560     break
561   fi
562 done
563 if test -z "$ac_aux_dir"; then
564   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
565 fi
566 ac_config_guess=$ac_aux_dir/config.guess
567 ac_config_sub=$ac_aux_dir/config.sub
568 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
569
570
571 # Do some error checking and defaulting for the host and target type.
572 # The inputs are:
573 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
574 #
575 # The rules are:
576 # 1. You are not allowed to specify --host, --target, and nonopt at the
577 #    same time.
578 # 2. Host defaults to nonopt.
579 # 3. If nonopt is not specified, then host defaults to the current host,
580 #    as determined by config.guess.
581 # 4. Target and build default to nonopt.
582 # 5. If nonopt is not specified, then target and build default to host.
583
584 # The aliases save the names the user supplied, while $host etc.
585 # will get canonicalized.
586 case $host---$target---$nonopt in
587 NONE---*---* | *---NONE---* | *---*---NONE) ;;
588 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
589 esac
590
591
592 # Make sure we can run config.sub.
593 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
594 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
595 fi
596
597 echo $ac_n "checking host system type""... $ac_c" 1>&6
598 echo "configure:599: checking host system type" >&5
599
600 host_alias=$host
601 case "$host_alias" in
602 NONE)
603   case $nonopt in
604   NONE)
605     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
606     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
607     fi ;;
608   *) host_alias=$nonopt ;;
609   esac ;;
610 esac
611
612 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
613 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
614 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
615 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
616 echo "$ac_t""$host" 1>&6
617
618 echo $ac_n "checking target system type""... $ac_c" 1>&6
619 echo "configure:620: checking target system type" >&5
620
621 target_alias=$target
622 case "$target_alias" in
623 NONE)
624   case $nonopt in
625   NONE) target_alias=$host_alias ;;
626   *) target_alias=$nonopt ;;
627   esac ;;
628 esac
629
630 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
631 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
632 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
633 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
634 echo "$ac_t""$target" 1>&6
635
636 echo $ac_n "checking build system type""... $ac_c" 1>&6
637 echo "configure:638: checking build system type" >&5
638
639 build_alias=$build
640 case "$build_alias" in
641 NONE)
642   case $nonopt in
643   NONE) build_alias=$host_alias ;;
644   *) build_alias=$nonopt ;;
645   esac ;;
646 esac
647
648 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
649 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
650 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
651 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
652 echo "$ac_t""$build" 1>&6
653
654 test "$host_alias" != "$target_alias" &&
655   test "$program_prefix$program_suffix$program_transform_name" = \
656     NONENONEs,x,x, &&
657   program_prefix=${target_alias}-
658
659
660
661
662   
663
664 VERSION=`sed -e 's/nmh-//' ${srcdir}/VERSION`
665 echo "configuring for nmh-$VERSION"
666
667
668 # Check whether --enable-apop or --disable-apop was given.
669 if test "${enable_apop+set}" = set; then
670   enableval="$enable_apop"
671   :
672 fi
673
674 if test x"$enable_apop" = x"yes"; then
675   cat >> confdefs.h <<\EOF
676 #define APOP 1
677 EOF
678   APOPLIB=md5.o
679   enable_pop=yes
680 fi
681
682 # Check whether --enable-debug or --disable-debug was given.
683 if test "${enable_debug+set}" = set; then
684   enableval="$enable_debug"
685   :
686 fi
687
688 if test x"$enable_nmh_debug" = x"yes"; then
689   enable_debug=yes
690 fi
691
692 # Check whether --enable-masquerade or --disable-masquerade was given.
693 if test "${enable_masquerade+set}" = set; then
694   enableval="$enable_masquerade"
695   if test x"$enable_masquerade" = x"yes"; then
696     masquerade="draft_from mmailid username_extension"
697   else
698     masquerade="$enable_masquerade"
699   fi
700 fi
701
702
703 # Check whether --enable-mhe or --disable-mhe was given.
704 if test "${enable_mhe+set}" = set; then
705   enableval="$enable_mhe"
706   :
707 fi
708
709
710 if test x"$enable_mhe" != x"no" -a x"$enable_nmh_mhe" != x"no"; then
711   cat >> confdefs.h <<\EOF
712 #define MHE 1
713 EOF
714 fi
715
716 # Check whether --enable-pop or --disable-pop was given.
717 if test "${enable_pop+set}" = set; then
718   enableval="$enable_pop"
719   :
720 fi
721
722 if test x"$enable_nmh_pop" = x"yes"; then
723   enable_pop=yes
724 fi
725
726 # Check whether --with-hesiod or --without-hesiod was given.
727 if test "${with_hesiod+set}" = set; then
728   withval="$with_hesiod"
729   :
730 fi
731
732 if test x"$with_hesiod" != x -a x"$with_hesiod" != x"no"; then
733   cat >> confdefs.h <<\EOF
734 #define HESIOD 1
735 EOF
736 fi
737
738 # Check whether --with-krb4 or --without-krb4 was given.
739 if test "${with_krb4+set}" = set; then
740   withval="$with_krb4"
741   :
742 fi
743
744 if test x"$with_krb4" != x -a x"$with_krb4" != x"no"; then
745   enable_pop=yes
746   cat >> confdefs.h <<\EOF
747 #define KPOP 1
748 EOF
749   cat >> confdefs.h <<\EOF
750 #define KPOP_PRINCIPAL "pop"
751 EOF
752 fi
753
754 if test x"$enable_pop" = x"yes"; then
755   cat >> confdefs.h <<\EOF
756 #define POP 1
757 EOF
758   POPLIB=popsbr.o
759   POPSED='/^%nmhbeginpop%/d;/^%nmhendpop%/d'
760 else
761   POPSED='/^%nmhbeginpop%/,/^%nmhendpop%/d'
762 fi
763
764 # Check whether --with-editor or --without-editor was given.
765 if test "${with_editor+set}" = set; then
766   withval="$with_editor"
767   :
768 fi
769
770
771 if test -n "$with_editor"; then
772   editorpath="$with_editor"
773 fi
774
775 # Check whether --with-mts or --without-mts was given.
776 if test "${with_mts+set}" = set; then
777   withval="$with_mts"
778   :
779 fi
780
781
782 if test x"$with_mts" = x"smtp"; then
783   MTS="smtp"
784 elif test x"$with_mts" = x"sendmail"; then
785   MTS="sendmail"
786 else
787   MTS="smtp"
788 fi
789
790 cat >> confdefs.h <<\EOF
791 #define SMTPMTS 1
792 EOF
793
794 # Check whether --with-pager or --without-pager was given.
795 if test "${with_pager+set}" = set; then
796   withval="$with_pager"
797   :
798 fi
799
800
801 if test -n "$with_pager"; then
802   pagerpath="$with_pager"
803 fi
804
805 # Check whether --with-smtpservers or --without-smtpservers was given.
806 if test "${with_smtpservers+set}" = set; then
807   withval="$with_smtpservers"
808   :
809 fi
810
811 if test -n "$with_smtpservers"; then
812   smtpservers="$with_smtpservers"
813 else
814   smtpservers="localhost"
815 fi
816
817
818
819 test -z "$CFLAGS" && CFLAGS= auto_cflags=1
820 if test x"$enable_debug" = x"yes"; then
821   test -z "$LDFLAGS" && LDFLAGS=-g
822 fi
823
824 # Extract the first word of "gcc", so it can be a program name with args.
825 set dummy gcc; ac_word=$2
826 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
827 echo "configure:828: checking for $ac_word" >&5
828 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
829   echo $ac_n "(cached) $ac_c" 1>&6
830 else
831   if test -n "$CC"; then
832   ac_cv_prog_CC="$CC" # Let the user override the test.
833 else
834   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
835   ac_dummy="$PATH"
836   for ac_dir in $ac_dummy; do
837     test -z "$ac_dir" && ac_dir=.
838     if test -f $ac_dir/$ac_word; then
839       ac_cv_prog_CC="gcc"
840       break
841     fi
842   done
843   IFS="$ac_save_ifs"
844 fi
845 fi
846 CC="$ac_cv_prog_CC"
847 if test -n "$CC"; then
848   echo "$ac_t""$CC" 1>&6
849 else
850   echo "$ac_t""no" 1>&6
851 fi
852
853 if test -z "$CC"; then
854   # Extract the first word of "cc", so it can be a program name with args.
855 set dummy cc; ac_word=$2
856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
857 echo "configure:858: checking for $ac_word" >&5
858 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
859   echo $ac_n "(cached) $ac_c" 1>&6
860 else
861   if test -n "$CC"; then
862   ac_cv_prog_CC="$CC" # Let the user override the test.
863 else
864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
865   ac_prog_rejected=no
866   ac_dummy="$PATH"
867   for ac_dir in $ac_dummy; do
868     test -z "$ac_dir" && ac_dir=.
869     if test -f $ac_dir/$ac_word; then
870       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
871         ac_prog_rejected=yes
872         continue
873       fi
874       ac_cv_prog_CC="cc"
875       break
876     fi
877   done
878   IFS="$ac_save_ifs"
879 if test $ac_prog_rejected = yes; then
880   # We found a bogon in the path, so make sure we never use it.
881   set dummy $ac_cv_prog_CC
882   shift
883   if test $# -gt 0; then
884     # We chose a different compiler from the bogus one.
885     # However, it has the same basename, so the bogon will be chosen
886     # first if we set CC to just the basename; use the full file name.
887     shift
888     set dummy "$ac_dir/$ac_word" "$@"
889     shift
890     ac_cv_prog_CC="$@"
891   fi
892 fi
893 fi
894 fi
895 CC="$ac_cv_prog_CC"
896 if test -n "$CC"; then
897   echo "$ac_t""$CC" 1>&6
898 else
899   echo "$ac_t""no" 1>&6
900 fi
901
902   if test -z "$CC"; then
903     case "`uname -s`" in
904     *win32* | *WIN32*)
905       # Extract the first word of "cl", so it can be a program name with args.
906 set dummy cl; ac_word=$2
907 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
908 echo "configure:909: checking for $ac_word" >&5
909 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
910   echo $ac_n "(cached) $ac_c" 1>&6
911 else
912   if test -n "$CC"; then
913   ac_cv_prog_CC="$CC" # Let the user override the test.
914 else
915   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
916   ac_dummy="$PATH"
917   for ac_dir in $ac_dummy; do
918     test -z "$ac_dir" && ac_dir=.
919     if test -f $ac_dir/$ac_word; then
920       ac_cv_prog_CC="cl"
921       break
922     fi
923   done
924   IFS="$ac_save_ifs"
925 fi
926 fi
927 CC="$ac_cv_prog_CC"
928 if test -n "$CC"; then
929   echo "$ac_t""$CC" 1>&6
930 else
931   echo "$ac_t""no" 1>&6
932 fi
933  ;;
934     esac
935   fi
936   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
937 fi
938
939 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
940 echo "configure:941: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
941
942 ac_ext=c
943 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
944 ac_cpp='$CPP $CPPFLAGS'
945 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
946 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
947 cross_compiling=$ac_cv_prog_cc_cross
948
949 cat > conftest.$ac_ext << EOF
950
951 #line 952 "configure"
952 #include "confdefs.h"
953
954 main(){return(0);}
955 EOF
956 if { (eval echo configure:957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
957   ac_cv_prog_cc_works=yes
958   # If we can't run a trivial program, we are probably using a cross compiler.
959   if (./conftest; exit) 2>/dev/null; then
960     ac_cv_prog_cc_cross=no
961   else
962     ac_cv_prog_cc_cross=yes
963   fi
964 else
965   echo "configure: failed program was:" >&5
966   cat conftest.$ac_ext >&5
967   ac_cv_prog_cc_works=no
968 fi
969 rm -fr conftest*
970 ac_ext=c
971 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
972 ac_cpp='$CPP $CPPFLAGS'
973 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
974 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
975 cross_compiling=$ac_cv_prog_cc_cross
976
977 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
978 if test $ac_cv_prog_cc_works = no; then
979   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
980 fi
981 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
982 echo "configure:983: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
983 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
984 cross_compiling=$ac_cv_prog_cc_cross
985
986 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
987 echo "configure:988: checking whether we are using GNU C" >&5
988 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
989   echo $ac_n "(cached) $ac_c" 1>&6
990 else
991   cat > conftest.c <<EOF
992 #ifdef __GNUC__
993   yes;
994 #endif
995 EOF
996 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
997   ac_cv_prog_gcc=yes
998 else
999   ac_cv_prog_gcc=no
1000 fi
1001 fi
1002
1003 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1004
1005 if test $ac_cv_prog_gcc = yes; then
1006   GCC=yes
1007 else
1008   GCC=
1009 fi
1010
1011 ac_test_CFLAGS="${CFLAGS+set}"
1012 ac_save_CFLAGS="$CFLAGS"
1013 CFLAGS=
1014 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1015 echo "configure:1016: checking whether ${CC-cc} accepts -g" >&5
1016 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1017   echo $ac_n "(cached) $ac_c" 1>&6
1018 else
1019   echo 'void f(){}' > conftest.c
1020 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1021   ac_cv_prog_cc_g=yes
1022 else
1023   ac_cv_prog_cc_g=no
1024 fi
1025 rm -f conftest*
1026
1027 fi
1028
1029 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1030 if test "$ac_test_CFLAGS" = set; then
1031   CFLAGS="$ac_save_CFLAGS"
1032 elif test $ac_cv_prog_cc_g = yes; then
1033   if test "$GCC" = yes; then
1034     CFLAGS="-g -O2"
1035   else
1036     CFLAGS="-g"
1037   fi
1038 else
1039   if test "$GCC" = yes; then
1040     CFLAGS="-O2"
1041   else
1042     CFLAGS=
1043   fi
1044 fi
1045
1046
1047 if test -n "$auto_cflags"; then
1048   if test x"$enable_debug" = x"yes"; then
1049     if test -n "$GCC"; then
1050       test -z "$CFLAGS" && CFLAGS="-Wall -g" || CFLAGS="$CFLAGS -Wall -g"
1051     else
1052       test -z "$CFLAGS" && CFLAGS=-g || CFLAGS="$CFLAGS -g"
1053     fi
1054   else
1055     test -z "$LDFLAGS" && LDFLAGS=-s
1056     if test -n "$GCC"; then
1057       test -z "$CFLAGS" && CFLAGS="-Wall -O2" || CFLAGS="$CFLAGS -Wall -O2"
1058     else
1059       test -z "$CFLAGS" && CFLAGS=-O  || CFLAGS="$CFLAGS -O"
1060     fi
1061   fi
1062 fi
1063
1064 echo $ac_n "checking for working const""... $ac_c" 1>&6
1065 echo "configure:1066: checking for working const" >&5
1066 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1067   echo $ac_n "(cached) $ac_c" 1>&6
1068 else
1069   cat > conftest.$ac_ext <<EOF
1070 #line 1071 "configure"
1071 #include "confdefs.h"
1072
1073 int main() {
1074
1075 /* Ultrix mips cc rejects this.  */
1076 typedef int charset[2]; const charset x = {0,0};
1077 /* SunOS 4.1.1 cc rejects this.  */
1078 char const *const *ccp;
1079 char **p;
1080 /* NEC SVR4.0.2 mips cc rejects this.  */
1081 struct point {int x, y;};
1082 static struct point const zero = {0,0};
1083 /* AIX XL C 1.02.0.0 rejects this.
1084    It does not let you subtract one const X* pointer from another in an arm
1085    of an if-expression whose if-part is not a constant expression */
1086 const char *g = "string";
1087 ccp = &g + (g ? g-g : 0);
1088 /* HPUX 7.0 cc rejects these. */
1089 ++ccp;
1090 p = (char**) ccp;
1091 ccp = (char const *const *) p;
1092 { /* SCO 3.2v4 cc rejects this.  */
1093   char *t;
1094   char const *s = 0 ? (char *) 0 : (char const *) 0;
1095
1096   *t++ = 0;
1097 }
1098 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1099   int x[] = {25, 17};
1100   const int *foo = &x[0];
1101   ++foo;
1102 }
1103 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1104   typedef const int *iptr;
1105   iptr p = 0;
1106   ++p;
1107 }
1108 { /* AIX XL C 1.02.0.0 rejects this saying
1109      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1110   struct s { int j; const int *ap[3]; };
1111   struct s *b; b->j = 5;
1112 }
1113 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1114   const int foo = 10;
1115 }
1116
1117 ; return 0; }
1118 EOF
1119 if { (eval echo configure:1120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1120   rm -rf conftest*
1121   ac_cv_c_const=yes
1122 else
1123   echo "configure: failed program was:" >&5
1124   cat conftest.$ac_ext >&5
1125   rm -rf conftest*
1126   ac_cv_c_const=no
1127 fi
1128 rm -f conftest*
1129 fi
1130
1131 echo "$ac_t""$ac_cv_c_const" 1>&6
1132 if test $ac_cv_c_const = no; then
1133   cat >> confdefs.h <<\EOF
1134 #define const 
1135 EOF
1136
1137 fi
1138               
1139 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1140 echo "configure:1141: checking whether ${MAKE-make} sets \${MAKE}" >&5
1141 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1142 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1143   echo $ac_n "(cached) $ac_c" 1>&6
1144 else
1145   cat > conftestmake <<\EOF
1146 all:
1147         @echo 'ac_maketemp="${MAKE}"'
1148 EOF
1149 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1150 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1151 if test -n "$ac_maketemp"; then
1152   eval ac_cv_prog_make_${ac_make}_set=yes
1153 else
1154   eval ac_cv_prog_make_${ac_make}_set=no
1155 fi
1156 rm -f conftestmake
1157 fi
1158 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1159   echo "$ac_t""yes" 1>&6
1160   SET_MAKE=
1161 else
1162   echo "$ac_t""no" 1>&6
1163   SET_MAKE="MAKE=${MAKE-make}"
1164 fi
1165         # Find a good install program.  We prefer a C program (faster),
1166 # so one script is as good as another.  But avoid the broken or
1167 # incompatible versions:
1168 # SysV /etc/install, /usr/sbin/install
1169 # SunOS /usr/etc/install
1170 # IRIX /sbin/install
1171 # AIX /bin/install
1172 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1173 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1174 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1175 # ./install, which can be erroneously created by make from ./install.sh.
1176 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1177 echo "configure:1178: checking for a BSD compatible install" >&5
1178 if test -z "$INSTALL"; then
1179 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1180   echo $ac_n "(cached) $ac_c" 1>&6
1181 else
1182     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1183   for ac_dir in $PATH; do
1184     # Account for people who put trailing slashes in PATH elements.
1185     case "$ac_dir/" in
1186     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1187     *)
1188       # OSF1 and SCO ODT 3.0 have their own names for install.
1189       # Don't use installbsd from OSF since it installs stuff as root
1190       # by default.
1191       for ac_prog in ginstall scoinst install; do
1192         if test -f $ac_dir/$ac_prog; then
1193           if test $ac_prog = install &&
1194             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1195             # AIX install.  It has an incompatible calling convention.
1196             :
1197           else
1198             ac_cv_path_install="$ac_dir/$ac_prog -c"
1199             break 2
1200           fi
1201         fi
1202       done
1203       ;;
1204     esac
1205   done
1206   IFS="$ac_save_IFS"
1207
1208 fi
1209   if test "${ac_cv_path_install+set}" = set; then
1210     INSTALL="$ac_cv_path_install"
1211   else
1212     # As a last resort, use the slow shell script.  We don't cache a
1213     # path for INSTALL within a source directory, because that will
1214     # break other packages using the cache if that directory is
1215     # removed, or if the path is relative.
1216     INSTALL="$ac_install_sh"
1217   fi
1218 fi
1219 echo "$ac_t""$INSTALL" 1>&6
1220
1221 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1222 # It thinks the first close brace ends the variable substitution.
1223 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1224
1225 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1226
1227 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1228                 # Extract the first word of "ranlib", so it can be a program name with args.
1229 set dummy ranlib; ac_word=$2
1230 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1231 echo "configure:1232: checking for $ac_word" >&5
1232 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1233   echo $ac_n "(cached) $ac_c" 1>&6
1234 else
1235   if test -n "$RANLIB"; then
1236   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1237 else
1238   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1239   ac_dummy="$PATH"
1240   for ac_dir in $ac_dummy; do
1241     test -z "$ac_dir" && ac_dir=.
1242     if test -f $ac_dir/$ac_word; then
1243       ac_cv_prog_RANLIB="ranlib"
1244       break
1245     fi
1246   done
1247   IFS="$ac_save_ifs"
1248   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1249 fi
1250 fi
1251 RANLIB="$ac_cv_prog_RANLIB"
1252 if test -n "$RANLIB"; then
1253   echo "$ac_t""$RANLIB" 1>&6
1254 else
1255   echo "$ac_t""no" 1>&6
1256 fi
1257                 for ac_prog in mawk gawk nawk awk
1258 do
1259 # Extract the first word of "$ac_prog", so it can be a program name with args.
1260 set dummy $ac_prog; ac_word=$2
1261 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1262 echo "configure:1263: checking for $ac_word" >&5
1263 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1264   echo $ac_n "(cached) $ac_c" 1>&6
1265 else
1266   if test -n "$AWK"; then
1267   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1268 else
1269   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1270   ac_dummy="$PATH"
1271   for ac_dir in $ac_dummy; do
1272     test -z "$ac_dir" && ac_dir=.
1273     if test -f $ac_dir/$ac_word; then
1274       ac_cv_prog_AWK="$ac_prog"
1275       break
1276     fi
1277   done
1278   IFS="$ac_save_ifs"
1279 fi
1280 fi
1281 AWK="$ac_cv_prog_AWK"
1282 if test -n "$AWK"; then
1283   echo "$ac_t""$AWK" 1>&6
1284 else
1285   echo "$ac_t""no" 1>&6
1286 fi
1287
1288 test -n "$AWK" && break
1289 done
1290              # Extract the first word of "flex", so it can be a program name with args.
1291 set dummy flex; ac_word=$2
1292 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1293 echo "configure:1294: checking for $ac_word" >&5
1294 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1295   echo $ac_n "(cached) $ac_c" 1>&6
1296 else
1297   if test -n "$LEX"; then
1298   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1299 else
1300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1301   ac_dummy="$PATH"
1302   for ac_dir in $ac_dummy; do
1303     test -z "$ac_dir" && ac_dir=.
1304     if test -f $ac_dir/$ac_word; then
1305       ac_cv_prog_LEX="flex"
1306       break
1307     fi
1308   done
1309   IFS="$ac_save_ifs"
1310   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1311 fi
1312 fi
1313 LEX="$ac_cv_prog_LEX"
1314 if test -n "$LEX"; then
1315   echo "$ac_t""$LEX" 1>&6
1316 else
1317   echo "$ac_t""no" 1>&6
1318 fi
1319
1320 if test -z "$LEXLIB"
1321 then
1322   case "$LEX" in
1323   flex*) ac_lib=fl ;;
1324   *) ac_lib=l ;;
1325   esac
1326   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1327 echo "configure:1328: checking for yywrap in -l$ac_lib" >&5
1328 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1329 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1330   echo $ac_n "(cached) $ac_c" 1>&6
1331 else
1332   ac_save_LIBS="$LIBS"
1333 LIBS="-l$ac_lib  $LIBS"
1334 cat > conftest.$ac_ext <<EOF
1335 #line 1336 "configure"
1336 #include "confdefs.h"
1337 /* Override any gcc2 internal prototype to avoid an error.  */
1338 /* We use char because int might match the return type of a gcc2
1339     builtin and then its argument prototype would still apply.  */
1340 char yywrap();
1341
1342 int main() {
1343 yywrap()
1344 ; return 0; }
1345 EOF
1346 if { (eval echo configure:1347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1347   rm -rf conftest*
1348   eval "ac_cv_lib_$ac_lib_var=yes"
1349 else
1350   echo "configure: failed program was:" >&5
1351   cat conftest.$ac_ext >&5
1352   rm -rf conftest*
1353   eval "ac_cv_lib_$ac_lib_var=no"
1354 fi
1355 rm -f conftest*
1356 LIBS="$ac_save_LIBS"
1357
1358 fi
1359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1360   echo "$ac_t""yes" 1>&6
1361   LEXLIB="-l$ac_lib"
1362 else
1363   echo "$ac_t""no" 1>&6
1364 fi
1365
1366 fi
1367              
1368 pathtmp=/usr/bin:/bin:/usr/local/bin:/usr/xpg4/bin:/usr/ucb
1369 # Extract the first word of "cut", so it can be a program name with args.
1370 set dummy cut; ac_word=$2
1371 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1372 echo "configure:1373: checking for $ac_word" >&5
1373 if eval "test \"`echo '$''{'ac_cv_path_cutpath'+set}'`\" = set"; then
1374   echo $ac_n "(cached) $ac_c" 1>&6
1375 else
1376   case "$cutpath" in
1377   /*)
1378   ac_cv_path_cutpath="$cutpath" # Let the user override the test with a path.
1379   ;;
1380   ?:/*)                  
1381   ac_cv_path_cutpath="$cutpath" # Let the user override the test with a dos path.
1382   ;;
1383   *)
1384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1385   ac_dummy="$pathtmp"
1386   for ac_dir in $ac_dummy; do 
1387     test -z "$ac_dir" && ac_dir=.
1388     if test -f $ac_dir/$ac_word; then
1389       ac_cv_path_cutpath="$ac_dir/$ac_word"
1390       break
1391     fi
1392   done
1393   IFS="$ac_save_ifs"
1394   test -z "$ac_cv_path_cutpath" && ac_cv_path_cutpath="no"
1395   ;;
1396 esac
1397 fi
1398 cutpath="$ac_cv_path_cutpath"
1399 if test -n "$cutpath"; then
1400   echo "$ac_t""$cutpath" 1>&6
1401 else
1402   echo "$ac_t""no" 1>&6
1403 fi
1404
1405
1406 # Extract the first word of "lclint", so it can be a program name with args.
1407 set dummy lclint; ac_word=$2
1408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1409 echo "configure:1410: checking for $ac_word" >&5
1410 if eval "test \"`echo '$''{'ac_cv_prog_linttmp1'+set}'`\" = set"; then
1411   echo $ac_n "(cached) $ac_c" 1>&6
1412 else
1413   if test -n "$linttmp1"; then
1414   ac_cv_prog_linttmp1="$linttmp1" # Let the user override the test.
1415 else
1416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1417   ac_dummy="$PATH"
1418   for ac_dir in $ac_dummy; do
1419     test -z "$ac_dir" && ac_dir=.
1420     if test -f $ac_dir/$ac_word; then
1421       ac_cv_prog_linttmp1="lclint"
1422       break
1423     fi
1424   done
1425   IFS="$ac_save_ifs"
1426   test -z "$ac_cv_prog_linttmp1" && ac_cv_prog_linttmp1="no"
1427 fi
1428 fi
1429 linttmp1="$ac_cv_prog_linttmp1"
1430 if test -n "$linttmp1"; then
1431   echo "$ac_t""$linttmp1" 1>&6
1432 else
1433   echo "$ac_t""no" 1>&6
1434 fi
1435 if test x$ac_cv_prog_linttmp1 != xno ; then
1436   LINT=$ac_cv_prog_linttmp1
1437   LINTFLAGS="-weak +posixlib -macrovarprefixexclude"
1438 else
1439   # Extract the first word of "lint", so it can be a program name with args.
1440 set dummy lint; ac_word=$2
1441 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1442 echo "configure:1443: checking for $ac_word" >&5
1443 if eval "test \"`echo '$''{'ac_cv_prog_linttmp2'+set}'`\" = set"; then
1444   echo $ac_n "(cached) $ac_c" 1>&6
1445 else
1446   if test -n "$linttmp2"; then
1447   ac_cv_prog_linttmp2="$linttmp2" # Let the user override the test.
1448 else
1449   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1450   ac_dummy="$PATH"
1451   for ac_dir in $ac_dummy; do
1452     test -z "$ac_dir" && ac_dir=.
1453     if test -f $ac_dir/$ac_word; then
1454       ac_cv_prog_linttmp2="lint"
1455       break
1456     fi
1457   done
1458   IFS="$ac_save_ifs"
1459   test -z "$ac_cv_prog_linttmp2" && ac_cv_prog_linttmp2="no"
1460 fi
1461 fi
1462 linttmp2="$ac_cv_prog_linttmp2"
1463 if test -n "$linttmp2"; then
1464   echo "$ac_t""$linttmp2" 1>&6
1465 else
1466   echo "$ac_t""no" 1>&6
1467 fi
1468   if test x$ac_cv_prog_linttmp2 != xno ; then
1469     LINT=$ac_cv_prog_linttmp2
1470     LINTFLAGS=""
1471   else
1472     LINT="echo 'No lint program found'"
1473     LINTFLAGS=""
1474   fi
1475 fi
1476
1477
1478
1479 # Extract the first word of "libtool", so it can be a program name with args.
1480 set dummy libtool; ac_word=$2
1481 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1482 echo "configure:1483: checking for $ac_word" >&5
1483 if eval "test \"`echo '$''{'ac_cv_prog_LIBTOOL'+set}'`\" = set"; then
1484   echo $ac_n "(cached) $ac_c" 1>&6
1485 else
1486   if test -n "$LIBTOOL"; then
1487   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
1488 else
1489   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1490   ac_dummy="$pathtmp"
1491   for ac_dir in $ac_dummy; do
1492     test -z "$ac_dir" && ac_dir=.
1493     if test -f $ac_dir/$ac_word; then
1494       ac_cv_prog_LIBTOOL="libtool"
1495       break
1496     fi
1497   done
1498   IFS="$ac_save_ifs"
1499 fi
1500 fi
1501 LIBTOOL="$ac_cv_prog_LIBTOOL"
1502 if test -n "$LIBTOOL"; then
1503   echo "$ac_t""$LIBTOOL" 1>&6
1504 else
1505   echo "$ac_t""no" 1>&6
1506 fi
1507
1508
1509   tmptest=`$LIBTOOL --version 2>&1 | grep GNU`
1510   if test x"$tmptest" != x  ; then
1511     GNU_LIBTOOL=1
1512       fi
1513  
1514
1515 # Extract the first word of "lorder", so it can be a program name with args.
1516 set dummy lorder; ac_word=$2
1517 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1518 echo "configure:1519: checking for $ac_word" >&5
1519 if eval "test \"`echo '$''{'ac_cv_prog_LORDER'+set}'`\" = set"; then
1520   echo $ac_n "(cached) $ac_c" 1>&6
1521 else
1522   if test -n "$LORDER"; then
1523   ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
1524 else
1525   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1526   ac_dummy="$PATH"
1527   for ac_dir in $ac_dummy; do
1528     test -z "$ac_dir" && ac_dir=.
1529     if test -f $ac_dir/$ac_word; then
1530       ac_cv_prog_LORDER="lorder"
1531       break
1532     fi
1533   done
1534   IFS="$ac_save_ifs"
1535   test -z "$ac_cv_prog_LORDER" && ac_cv_prog_LORDER="no"
1536 fi
1537 fi
1538 LORDER="$ac_cv_prog_LORDER"
1539 if test -n "$LORDER"; then
1540   echo "$ac_t""$LORDER" 1>&6
1541 else
1542   echo "$ac_t""no" 1>&6
1543 fi
1544 # Extract the first word of "tsort", so it can be a program name with args.
1545 set dummy tsort; ac_word=$2
1546 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1547 echo "configure:1548: checking for $ac_word" >&5
1548 if eval "test \"`echo '$''{'ac_cv_prog_TSORT'+set}'`\" = set"; then
1549   echo $ac_n "(cached) $ac_c" 1>&6
1550 else
1551   if test -n "$TSORT"; then
1552   ac_cv_prog_TSORT="$TSORT" # Let the user override the test.
1553 else
1554   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1555   ac_dummy="$PATH"
1556   for ac_dir in $ac_dummy; do
1557     test -z "$ac_dir" && ac_dir=.
1558     if test -f $ac_dir/$ac_word; then
1559       ac_cv_prog_TSORT="tsort"
1560       break
1561     fi
1562   done
1563   IFS="$ac_save_ifs"
1564   test -z "$ac_cv_prog_TSORT" && ac_cv_prog_TSORT="no"
1565 fi
1566 fi
1567 TSORT="$ac_cv_prog_TSORT"
1568 if test -n "$TSORT"; then
1569   echo "$ac_t""$TSORT" 1>&6
1570 else
1571   echo "$ac_t""no" 1>&6
1572 fi
1573
1574 if test x$ac_cv_prog_LORDER != xlorder -o x$ac_cv_prog_TSORT != xtsort; then
1575   LORDER=echo
1576   TSORT=cat
1577     fi
1578
1579 echo $ac_n "checking whether tsort can deal with loops""... $ac_c" 1>&6
1580 echo "configure:1581: checking whether tsort can deal with loops" >&5
1581 if eval "test \"`echo '$''{'nmh_cv_tsort_loop'+set}'`\" = set"; then
1582   echo $ac_n "(cached) $ac_c" 1>&6
1583 else
1584   if test -z "`echo a b b a | tsort 2>/dev/null | grep a`" ; then
1585     nmh_cv_tsort_loop=no
1586   else
1587     nmh_cv_tsort_loop=yes
1588   fi
1589 fi
1590
1591 echo "$ac_t""$nmh_cv_tsort_loop" 1>&6
1592 if test x$nmh_cv_tsort_loop = xno ; then
1593   LORDER=echo
1594   TSORT=cat
1595     fi
1596
1597 pathtmp=/usr/bin:/bin:/usr/local/bin:/usr/xpg4/bin:/usr/ucb
1598 # Extract the first word of "ls", so it can be a program name with args.
1599 set dummy ls; ac_word=$2
1600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1601 echo "configure:1602: checking for $ac_word" >&5
1602 if eval "test \"`echo '$''{'ac_cv_path_lspath'+set}'`\" = set"; then
1603   echo $ac_n "(cached) $ac_c" 1>&6
1604 else
1605   case "$lspath" in
1606   /*)
1607   ac_cv_path_lspath="$lspath" # Let the user override the test with a path.
1608   ;;
1609   ?:/*)                  
1610   ac_cv_path_lspath="$lspath" # Let the user override the test with a dos path.
1611   ;;
1612   *)
1613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1614   ac_dummy="$pathtmp"
1615   for ac_dir in $ac_dummy; do 
1616     test -z "$ac_dir" && ac_dir=.
1617     if test -f $ac_dir/$ac_word; then
1618       ac_cv_path_lspath="$ac_dir/$ac_word"
1619       break
1620     fi
1621   done
1622   IFS="$ac_save_ifs"
1623   test -z "$ac_cv_path_lspath" && ac_cv_path_lspath="no"
1624   ;;
1625 esac
1626 fi
1627 lspath="$ac_cv_path_lspath"
1628 if test -n "$lspath"; then
1629   echo "$ac_t""$lspath" 1>&6
1630 else
1631   echo "$ac_t""no" 1>&6
1632 fi
1633
1634
1635 if test "$lspath" != "no"; then
1636   echo $ac_n "checking how to get ls to show us the group ownership of a file""... $ac_c" 1>&6
1637 echo "configure:1638: checking how to get ls to show us the group ownership of a file" >&5
1638 if eval "test \"`echo '$''{'nmh_cv_ls_grpopt'+set}'`\" = set"; then
1639   echo $ac_n "(cached) $ac_c" 1>&6
1640 else
1641   if test x"`$lspath -dl / | $AWK '{print $9}'`" = x"/"; then
1642                 nmh_cv_ls_grpopt="-l"
1643   else
1644         nmh_cv_ls_grpopt="-lg"
1645   fi
1646 fi
1647
1648 echo "$ac_t""$nmh_cv_ls_grpopt" 1>&6
1649 fi
1650
1651 pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin
1652 # Extract the first word of "more", so it can be a program name with args.
1653 set dummy more; ac_word=$2
1654 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1655 echo "configure:1656: checking for $ac_word" >&5
1656 if eval "test \"`echo '$''{'ac_cv_path_morepath'+set}'`\" = set"; then
1657   echo $ac_n "(cached) $ac_c" 1>&6
1658 else
1659   case "$morepath" in
1660   /*)
1661   ac_cv_path_morepath="$morepath" # Let the user override the test with a path.
1662   ;;
1663   ?:/*)                  
1664   ac_cv_path_morepath="$morepath" # Let the user override the test with a dos path.
1665   ;;
1666   *)
1667   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1668   ac_dummy="$pathtmp"
1669   for ac_dir in $ac_dummy; do 
1670     test -z "$ac_dir" && ac_dir=.
1671     if test -f $ac_dir/$ac_word; then
1672       ac_cv_path_morepath="$ac_dir/$ac_word"
1673       break
1674     fi
1675   done
1676   IFS="$ac_save_ifs"
1677   test -z "$ac_cv_path_morepath" && ac_cv_path_morepath="no"
1678   ;;
1679 esac
1680 fi
1681 morepath="$ac_cv_path_morepath"
1682 if test -n "$morepath"; then
1683   echo "$ac_t""$morepath" 1>&6
1684 else
1685   echo "$ac_t""no" 1>&6
1686 fi
1687
1688
1689 if test -z "$pagerpath"; then
1690   pagerpath="$morepath"
1691 fi
1692
1693 pathtmp=/usr/lib:/usr/sbin:/usr/etc:/usr/ucblib:/usr/bin:/bin
1694 # Extract the first word of "sendmail", so it can be a program name with args.
1695 set dummy sendmail; ac_word=$2
1696 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1697 echo "configure:1698: checking for $ac_word" >&5
1698 if eval "test \"`echo '$''{'ac_cv_path_sendmailpath'+set}'`\" = set"; then
1699   echo $ac_n "(cached) $ac_c" 1>&6
1700 else
1701   case "$sendmailpath" in
1702   /*)
1703   ac_cv_path_sendmailpath="$sendmailpath" # Let the user override the test with a path.
1704   ;;
1705   ?:/*)                  
1706   ac_cv_path_sendmailpath="$sendmailpath" # Let the user override the test with a dos path.
1707   ;;
1708   *)
1709   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1710   ac_dummy="$pathtmp"
1711   for ac_dir in $ac_dummy; do 
1712     test -z "$ac_dir" && ac_dir=.
1713     if test -f $ac_dir/$ac_word; then
1714       ac_cv_path_sendmailpath="$ac_dir/$ac_word"
1715       break
1716     fi
1717   done
1718   IFS="$ac_save_ifs"
1719   test -z "$ac_cv_path_sendmailpath" && ac_cv_path_sendmailpath="no"
1720   ;;
1721 esac
1722 fi
1723 sendmailpath="$ac_cv_path_sendmailpath"
1724 if test -n "$sendmailpath"; then
1725   echo "$ac_t""$sendmailpath" 1>&6
1726 else
1727   echo "$ac_t""no" 1>&6
1728 fi
1729
1730
1731 pathtmp=/usr/bin:/bin:/usr/ucb:/usr/local/bin
1732 # Extract the first word of "vi", so it can be a program name with args.
1733 set dummy vi; ac_word=$2
1734 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1735 echo "configure:1736: checking for $ac_word" >&5
1736 if eval "test \"`echo '$''{'ac_cv_path_vipath'+set}'`\" = set"; then
1737   echo $ac_n "(cached) $ac_c" 1>&6
1738 else
1739   case "$vipath" in
1740   /*)
1741   ac_cv_path_vipath="$vipath" # Let the user override the test with a path.
1742   ;;
1743   ?:/*)                  
1744   ac_cv_path_vipath="$vipath" # Let the user override the test with a dos path.
1745   ;;
1746   *)
1747   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1748   ac_dummy="$pathtmp"
1749   for ac_dir in $ac_dummy; do 
1750     test -z "$ac_dir" && ac_dir=.
1751     if test -f $ac_dir/$ac_word; then
1752       ac_cv_path_vipath="$ac_dir/$ac_word"
1753       break
1754     fi
1755   done
1756   IFS="$ac_save_ifs"
1757   test -z "$ac_cv_path_vipath" && ac_cv_path_vipath="no"
1758   ;;
1759 esac
1760 fi
1761 vipath="$ac_cv_path_vipath"
1762 if test -n "$vipath"; then
1763   echo "$ac_t""$vipath" 1>&6
1764 else
1765   echo "$ac_t""no" 1>&6
1766 fi
1767
1768
1769 if test -z "$editorpath"; then
1770   editorpath="$vipath"
1771 fi
1772
1773 echo $ac_n "checking for broken vi""... $ac_c" 1>&6
1774 echo "configure:1775: checking for broken vi" >&5
1775 if eval "test \"`echo '$''{'nmh_cv_attvibug'+set}'`\" = set"; then
1776   echo $ac_n "(cached) $ac_c" 1>&6
1777 else
1778   if echo 'r /nonexist-file
1779 q' | ex > /dev/null 2>&1
1780 then
1781         nmh_cv_attvibug=no
1782 else
1783         nmh_cv_attvibug=yes
1784 fi
1785 fi
1786
1787 echo "$ac_t""$nmh_cv_attvibug" 1>&6
1788  
1789 if test "$nmh_cv_attvibug" = yes; then
1790   cat >> confdefs.h <<\EOF
1791 #define ATTVIBUG 1
1792 EOF
1793 fi
1794
1795 echo $ac_n "checking where mail spool is located""... $ac_c" 1>&6
1796 echo "configure:1797: checking where mail spool is located" >&5
1797 if eval "test \"`echo '$''{'nmh_cv_mailspool'+set}'`\" = set"; then
1798   echo $ac_n "(cached) $ac_c" 1>&6
1799 else
1800   for mailspool in /var/mail                          /var/spool/mail                    /usr/spool/mail                    /dev/null;       do
1801   test -d $mailspool && break
1802 done
1803 nmh_cv_mailspool=$mailspool
1804
1805 fi
1806
1807 echo "$ac_t""$nmh_cv_mailspool" 1>&6
1808 mailspool=$nmh_cv_mailspool
1809
1810 if test "$lspath" != "no" -a "$cutpath" != "no"; then
1811   echo $ac_n "checking whether the mail spool is world-writable""... $ac_c" 1>&6
1812 echo "configure:1813: checking whether the mail spool is world-writable" >&5
1813 if eval "test \"`echo '$''{'nmh_cv_mailspool_world_writable'+set}'`\" = set"; then
1814   echo $ac_n "(cached) $ac_c" 1>&6
1815 else
1816   if test "`$lspath -dlL $mailspool | $cutpath -c9`" = "-"; then
1817     nmh_cv_mailspool_world_writable=no
1818   else
1819     nmh_cv_mailspool_world_writable=yes
1820   fi
1821 fi
1822
1823 echo "$ac_t""$nmh_cv_mailspool_world_writable" 1>&6
1824 fi
1825
1826 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1827 echo "configure:1828: checking how to run the C preprocessor" >&5
1828 # On Suns, sometimes $CPP names a directory.
1829 if test -n "$CPP" && test -d "$CPP"; then
1830   CPP=
1831 fi
1832 if test -z "$CPP"; then
1833 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1834   echo $ac_n "(cached) $ac_c" 1>&6
1835 else
1836     # This must be in double quotes, not single quotes, because CPP may get
1837   # substituted into the Makefile and "${CC-cc}" will confuse make.
1838   CPP="${CC-cc} -E"
1839   # On the NeXT, cc -E runs the code through the compiler's parser,
1840   # not just through cpp.
1841   cat > conftest.$ac_ext <<EOF
1842 #line 1843 "configure"
1843 #include "confdefs.h"
1844 #include <assert.h>
1845 Syntax Error
1846 EOF
1847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1848 { (eval echo configure:1849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1850 if test -z "$ac_err"; then
1851   :
1852 else
1853   echo "$ac_err" >&5
1854   echo "configure: failed program was:" >&5
1855   cat conftest.$ac_ext >&5
1856   rm -rf conftest*
1857   CPP="${CC-cc} -E -traditional-cpp"
1858   cat > conftest.$ac_ext <<EOF
1859 #line 1860 "configure"
1860 #include "confdefs.h"
1861 #include <assert.h>
1862 Syntax Error
1863 EOF
1864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1865 { (eval echo configure:1866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1867 if test -z "$ac_err"; then
1868   :
1869 else
1870   echo "$ac_err" >&5
1871   echo "configure: failed program was:" >&5
1872   cat conftest.$ac_ext >&5
1873   rm -rf conftest*
1874   CPP="${CC-cc} -nologo -E"
1875   cat > conftest.$ac_ext <<EOF
1876 #line 1877 "configure"
1877 #include "confdefs.h"
1878 #include <assert.h>
1879 Syntax Error
1880 EOF
1881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1882 { (eval echo configure:1883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1884 if test -z "$ac_err"; then
1885   :
1886 else
1887   echo "$ac_err" >&5
1888   echo "configure: failed program was:" >&5
1889   cat conftest.$ac_ext >&5
1890   rm -rf conftest*
1891   CPP=/lib/cpp
1892 fi
1893 rm -f conftest*
1894 fi
1895 rm -f conftest*
1896 fi
1897 rm -f conftest*
1898   ac_cv_prog_CPP="$CPP"
1899 fi
1900   CPP="$ac_cv_prog_CPP"
1901 else
1902   ac_cv_prog_CPP="$CPP"
1903 fi
1904 echo "$ac_t""$CPP" 1>&6
1905
1906 ac_safe=`echo "lockfile.h" | sed 'y%./+-%__p_%'`
1907 echo $ac_n "checking for lockfile.h""... $ac_c" 1>&6
1908 echo "configure:1909: checking for lockfile.h" >&5
1909 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1910   echo $ac_n "(cached) $ac_c" 1>&6
1911 else
1912   cat > conftest.$ac_ext <<EOF
1913 #line 1914 "configure"
1914 #include "confdefs.h"
1915 #include <lockfile.h>
1916 EOF
1917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1918 { (eval echo configure:1919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1920 if test -z "$ac_err"; then
1921   rm -rf conftest*
1922   eval "ac_cv_header_$ac_safe=yes"
1923 else
1924   echo "$ac_err" >&5
1925   echo "configure: failed program was:" >&5
1926   cat conftest.$ac_ext >&5
1927   rm -rf conftest*
1928   eval "ac_cv_header_$ac_safe=no"
1929 fi
1930 rm -f conftest*
1931 fi
1932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1933   echo "$ac_t""yes" 1>&6
1934   echo $ac_n "checking for lockfile_create in -llockfile""... $ac_c" 1>&6
1935 echo "configure:1936: checking for lockfile_create in -llockfile" >&5
1936 ac_lib_var=`echo lockfile'_'lockfile_create | sed 'y%./+-%__p_%'`
1937 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1938   echo $ac_n "(cached) $ac_c" 1>&6
1939 else
1940   ac_save_LIBS="$LIBS"
1941 LIBS="-llockfile  $LIBS"
1942 cat > conftest.$ac_ext <<EOF
1943 #line 1944 "configure"
1944 #include "confdefs.h"
1945 /* Override any gcc2 internal prototype to avoid an error.  */
1946 /* We use char because int might match the return type of a gcc2
1947     builtin and then its argument prototype would still apply.  */
1948 char lockfile_create();
1949
1950 int main() {
1951 lockfile_create()
1952 ; return 0; }
1953 EOF
1954 if { (eval echo configure:1955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1955   rm -rf conftest*
1956   eval "ac_cv_lib_$ac_lib_var=yes"
1957 else
1958   echo "configure: failed program was:" >&5
1959   cat conftest.$ac_ext >&5
1960   rm -rf conftest*
1961   eval "ac_cv_lib_$ac_lib_var=no"
1962 fi
1963 rm -f conftest*
1964 LIBS="$ac_save_LIBS"
1965
1966 fi
1967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1968   echo "$ac_t""yes" 1>&6
1969     ac_tr_lib=HAVE_LIB`echo lockfile | sed -e 's/^a-zA-Z0-9_/_/g' \
1970     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1971   cat >> confdefs.h <<EOF
1972 #define $ac_tr_lib 1
1973 EOF
1974
1975   LIBS="-llockfile $LIBS"
1976
1977 else
1978   echo "$ac_t""no" 1>&6
1979 fi
1980  
1981 else
1982   echo "$ac_t""no" 1>&6
1983 fi
1984
1985
1986 # Extract the first word of "dotlockfile", so it can be a program name with args.
1987 set dummy dotlockfile; ac_word=$2
1988 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1989 echo "configure:1990: checking for $ac_word" >&5
1990 if eval "test \"`echo '$''{'ac_cv_path_dotlockfilepath'+set}'`\" = set"; then
1991   echo $ac_n "(cached) $ac_c" 1>&6
1992 else
1993   case "$dotlockfilepath" in
1994   /*)
1995   ac_cv_path_dotlockfilepath="$dotlockfilepath" # Let the user override the test with a path.
1996   ;;
1997   ?:/*)                  
1998   ac_cv_path_dotlockfilepath="$dotlockfilepath" # Let the user override the test with a dos path.
1999   ;;
2000   *)
2001   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2002   ac_dummy="$PATH"
2003   for ac_dir in $ac_dummy; do 
2004     test -z "$ac_dir" && ac_dir=.
2005     if test -f $ac_dir/$ac_word; then
2006       ac_cv_path_dotlockfilepath="$ac_dir/$ac_word"
2007       break
2008     fi
2009   done
2010   IFS="$ac_save_ifs"
2011   test -z "$ac_cv_path_dotlockfilepath" && ac_cv_path_dotlockfilepath="no"
2012   ;;
2013 esac
2014 fi
2015 dotlockfilepath="$ac_cv_path_dotlockfilepath"
2016 if test -n "$dotlockfilepath"; then
2017   echo "$ac_t""$dotlockfilepath" 1>&6
2018 else
2019   echo "$ac_t""no" 1>&6
2020 fi
2021
2022 if test "$ac_cv_lib_lockfile_lockfile_create" != "no" ; then
2023   if test "$ac_cv_path_dotlockfilepath" != "no" ; then
2024     echo $ac_n "checking whether dotlockfile is setgid""... $ac_c" 1>&6
2025 echo "configure:2026: checking whether dotlockfile is setgid" >&5
2026 if eval "test \"`echo '$''{'nmh_cv_dotlockfile_setgid'+set}'`\" = set"; then
2027   echo $ac_n "(cached) $ac_c" 1>&6
2028 else
2029    if test -g "$ac_cv_path_dotlockfilepath" ; then
2030         nmh_cv_dotlockfile_setgid=yes
2031       else
2032         nmh_cv_dotlockfile_setgid=no
2033       fi
2034 fi
2035
2036 echo "$ac_t""$nmh_cv_dotlockfile_setgid" 1>&6
2037   fi
2038 fi
2039
2040 if test x"$nmh_cv_mailspool_world_writable" = x"no" -a x"$nmh_cv_dotlockfile_setgid" != x"yes" ; then
2041     cat >> confdefs.h <<\EOF
2042 #define MAILGROUP 1
2043 EOF
2044   SETGID_MAIL=1
2045 fi
2046
2047 echo $ac_n "checking what group owns the mail spool""... $ac_c" 1>&6
2048 echo "configure:2049: checking what group owns the mail spool" >&5
2049 if eval "test \"`echo '$''{'nmh_cv_ls_mail_grp'+set}'`\" = set"; then
2050   echo $ac_n "(cached) $ac_c" 1>&6
2051 else
2052   nmh_cv_ls_mail_grp=`$lspath -dL $nmh_cv_ls_grpopt $mailspool|$AWK '{print $4}'`
2053
2054 fi
2055
2056 echo "$ac_t""$nmh_cv_ls_mail_grp" 1>&6
2057 MAIL_SPOOL_GRP=$nmh_cv_ls_mail_grp
2058
2059 ac_header_dirent=no
2060 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2061 do
2062 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2063 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2064 echo "configure:2065: checking for $ac_hdr that defines DIR" >&5
2065 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2066   echo $ac_n "(cached) $ac_c" 1>&6
2067 else
2068   cat > conftest.$ac_ext <<EOF
2069 #line 2070 "configure"
2070 #include "confdefs.h"
2071 #include <sys/types.h>
2072 #include <$ac_hdr>
2073 int main() {
2074 DIR *dirp = 0;
2075 ; return 0; }
2076 EOF
2077 if { (eval echo configure:2078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2078   rm -rf conftest*
2079   eval "ac_cv_header_dirent_$ac_safe=yes"
2080 else
2081   echo "configure: failed program was:" >&5
2082   cat conftest.$ac_ext >&5
2083   rm -rf conftest*
2084   eval "ac_cv_header_dirent_$ac_safe=no"
2085 fi
2086 rm -f conftest*
2087 fi
2088 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2089   echo "$ac_t""yes" 1>&6
2090     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2091   cat >> confdefs.h <<EOF
2092 #define $ac_tr_hdr 1
2093 EOF
2094  ac_header_dirent=$ac_hdr; break
2095 else
2096   echo "$ac_t""no" 1>&6
2097 fi
2098 done
2099 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2100 if test $ac_header_dirent = dirent.h; then
2101 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2102 echo "configure:2103: checking for opendir in -ldir" >&5
2103 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2104 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2105   echo $ac_n "(cached) $ac_c" 1>&6
2106 else
2107   ac_save_LIBS="$LIBS"
2108 LIBS="-ldir  $LIBS"
2109 cat > conftest.$ac_ext <<EOF
2110 #line 2111 "configure"
2111 #include "confdefs.h"
2112 /* Override any gcc2 internal prototype to avoid an error.  */
2113 /* We use char because int might match the return type of a gcc2
2114     builtin and then its argument prototype would still apply.  */
2115 char opendir();
2116
2117 int main() {
2118 opendir()
2119 ; return 0; }
2120 EOF
2121 if { (eval echo configure:2122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2122   rm -rf conftest*
2123   eval "ac_cv_lib_$ac_lib_var=yes"
2124 else
2125   echo "configure: failed program was:" >&5
2126   cat conftest.$ac_ext >&5
2127   rm -rf conftest*
2128   eval "ac_cv_lib_$ac_lib_var=no"
2129 fi
2130 rm -f conftest*
2131 LIBS="$ac_save_LIBS"
2132
2133 fi
2134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2135   echo "$ac_t""yes" 1>&6
2136   LIBS="$LIBS -ldir"
2137 else
2138   echo "$ac_t""no" 1>&6
2139 fi
2140
2141 else
2142 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2143 echo "configure:2144: checking for opendir in -lx" >&5
2144 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2146   echo $ac_n "(cached) $ac_c" 1>&6
2147 else
2148   ac_save_LIBS="$LIBS"
2149 LIBS="-lx  $LIBS"
2150 cat > conftest.$ac_ext <<EOF
2151 #line 2152 "configure"
2152 #include "confdefs.h"
2153 /* Override any gcc2 internal prototype to avoid an error.  */
2154 /* We use char because int might match the return type of a gcc2
2155     builtin and then its argument prototype would still apply.  */
2156 char opendir();
2157
2158 int main() {
2159 opendir()
2160 ; return 0; }
2161 EOF
2162 if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2163   rm -rf conftest*
2164   eval "ac_cv_lib_$ac_lib_var=yes"
2165 else
2166   echo "configure: failed program was:" >&5
2167   cat conftest.$ac_ext >&5
2168   rm -rf conftest*
2169   eval "ac_cv_lib_$ac_lib_var=no"
2170 fi
2171 rm -f conftest*
2172 LIBS="$ac_save_LIBS"
2173
2174 fi
2175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2176   echo "$ac_t""yes" 1>&6
2177   LIBS="$LIBS -lx"
2178 else
2179   echo "$ac_t""no" 1>&6
2180 fi
2181
2182 fi
2183
2184 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2185 echo "configure:2186: checking for ANSI C header files" >&5
2186 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2187   echo $ac_n "(cached) $ac_c" 1>&6
2188 else
2189   cat > conftest.$ac_ext <<EOF
2190 #line 2191 "configure"
2191 #include "confdefs.h"
2192 #include <stdlib.h>
2193 #include <stdarg.h>
2194 #include <string.h>
2195 #include <float.h>
2196 EOF
2197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2198 { (eval echo configure:2199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2200 if test -z "$ac_err"; then
2201   rm -rf conftest*
2202   ac_cv_header_stdc=yes
2203 else
2204   echo "$ac_err" >&5
2205   echo "configure: failed program was:" >&5
2206   cat conftest.$ac_ext >&5
2207   rm -rf conftest*
2208   ac_cv_header_stdc=no
2209 fi
2210 rm -f conftest*
2211
2212 if test $ac_cv_header_stdc = yes; then
2213   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2214 cat > conftest.$ac_ext <<EOF
2215 #line 2216 "configure"
2216 #include "confdefs.h"
2217 #include <string.h>
2218 EOF
2219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2220   egrep "memchr" >/dev/null 2>&1; then
2221   :
2222 else
2223   rm -rf conftest*
2224   ac_cv_header_stdc=no
2225 fi
2226 rm -f conftest*
2227
2228 fi
2229
2230 if test $ac_cv_header_stdc = yes; then
2231   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2232 cat > conftest.$ac_ext <<EOF
2233 #line 2234 "configure"
2234 #include "confdefs.h"
2235 #include <stdlib.h>
2236 EOF
2237 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2238   egrep "free" >/dev/null 2>&1; then
2239   :
2240 else
2241   rm -rf conftest*
2242   ac_cv_header_stdc=no
2243 fi
2244 rm -f conftest*
2245
2246 fi
2247
2248 if test $ac_cv_header_stdc = yes; then
2249   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2250 if test "$cross_compiling" = yes; then
2251   :
2252 else
2253   cat > conftest.$ac_ext <<EOF
2254 #line 2255 "configure"
2255 #include "confdefs.h"
2256 #include <ctype.h>
2257 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2258 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2259 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2260 int main () { int i; for (i = 0; i < 256; i++)
2261 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2262 exit (0); }
2263
2264 EOF
2265 if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2266 then
2267   :
2268 else
2269   echo "configure: failed program was:" >&5
2270   cat conftest.$ac_ext >&5
2271   rm -fr conftest*
2272   ac_cv_header_stdc=no
2273 fi
2274 rm -fr conftest*
2275 fi
2276
2277 fi
2278 fi
2279
2280 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2281 if test $ac_cv_header_stdc = yes; then
2282   cat >> confdefs.h <<\EOF
2283 #define STDC_HEADERS 1
2284 EOF
2285
2286 fi
2287
2288 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2289 echo "configure:2290: checking whether time.h and sys/time.h may both be included" >&5
2290 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2291   echo $ac_n "(cached) $ac_c" 1>&6
2292 else
2293   cat > conftest.$ac_ext <<EOF
2294 #line 2295 "configure"
2295 #include "confdefs.h"
2296 #include <sys/types.h>
2297 #include <sys/time.h>
2298 #include <time.h>
2299 int main() {
2300 struct tm *tp;
2301 ; return 0; }
2302 EOF
2303 if { (eval echo configure:2304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2304   rm -rf conftest*
2305   ac_cv_header_time=yes
2306 else
2307   echo "configure: failed program was:" >&5
2308   cat conftest.$ac_ext >&5
2309   rm -rf conftest*
2310   ac_cv_header_time=no
2311 fi
2312 rm -f conftest*
2313 fi
2314
2315 echo "$ac_t""$ac_cv_header_time" 1>&6
2316 if test $ac_cv_header_time = yes; then
2317   cat >> confdefs.h <<\EOF
2318 #define TIME_WITH_SYS_TIME 1
2319 EOF
2320
2321 fi
2322
2323 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2324 echo "configure:2325: checking for sys/wait.h that is POSIX.1 compatible" >&5
2325 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2326   echo $ac_n "(cached) $ac_c" 1>&6
2327 else
2328   cat > conftest.$ac_ext <<EOF
2329 #line 2330 "configure"
2330 #include "confdefs.h"
2331 #include <sys/types.h>
2332 #include <sys/wait.h>
2333 #ifndef WEXITSTATUS
2334 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2335 #endif
2336 #ifndef WIFEXITED
2337 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2338 #endif
2339 int main() {
2340 int s;
2341 wait (&s);
2342 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2343 ; return 0; }
2344 EOF
2345 if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2346   rm -rf conftest*
2347   ac_cv_header_sys_wait_h=yes
2348 else
2349   echo "configure: failed program was:" >&5
2350   cat conftest.$ac_ext >&5
2351   rm -rf conftest*
2352   ac_cv_header_sys_wait_h=no
2353 fi
2354 rm -f conftest*
2355 fi
2356
2357 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2358 if test $ac_cv_header_sys_wait_h = yes; then
2359   cat >> confdefs.h <<\EOF
2360 #define HAVE_SYS_WAIT_H 1
2361 EOF
2362
2363 fi
2364
2365 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
2366 echo "configure:2367: checking whether stat file-mode macros are broken" >&5
2367 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
2368   echo $ac_n "(cached) $ac_c" 1>&6
2369 else
2370   cat > conftest.$ac_ext <<EOF
2371 #line 2372 "configure"
2372 #include "confdefs.h"
2373 #include <sys/types.h>
2374 #include <sys/stat.h>
2375
2376 #if defined(S_ISBLK) && defined(S_IFDIR)
2377 # if S_ISBLK (S_IFDIR)
2378 You lose.
2379 # endif
2380 #endif
2381
2382 #if defined(S_ISBLK) && defined(S_IFCHR)
2383 # if S_ISBLK (S_IFCHR)
2384 You lose.
2385 # endif
2386 #endif
2387
2388 #if defined(S_ISLNK) && defined(S_IFREG)
2389 # if S_ISLNK (S_IFREG)
2390 You lose.
2391 # endif
2392 #endif
2393
2394 #if defined(S_ISSOCK) && defined(S_IFREG)
2395 # if S_ISSOCK (S_IFREG)
2396 You lose.
2397 # endif
2398 #endif
2399
2400 EOF
2401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2402   egrep "You lose" >/dev/null 2>&1; then
2403   rm -rf conftest*
2404   ac_cv_header_stat_broken=yes
2405 else
2406   rm -rf conftest*
2407   ac_cv_header_stat_broken=no
2408 fi
2409 rm -f conftest*
2410
2411 fi
2412
2413 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
2414 if test $ac_cv_header_stat_broken = yes; then
2415   cat >> confdefs.h <<\EOF
2416 #define STAT_MACROS_BROKEN 1
2417 EOF
2418
2419 fi
2420
2421 for ac_hdr in string.h memory.h stdlib.h unistd.h errno.h fcntl.h \
2422                  limits.h crypt.h termcap.h termio.h termios.h locale.h \
2423                  netdb.h sys/param.h sys/time.h sys/utsname.h arpa/inet.h \
2424                  arpa/ftp.h
2425 do
2426 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2427 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2428 echo "configure:2429: checking for $ac_hdr" >&5
2429 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2430   echo $ac_n "(cached) $ac_c" 1>&6
2431 else
2432   cat > conftest.$ac_ext <<EOF
2433 #line 2434 "configure"
2434 #include "confdefs.h"
2435 #include <$ac_hdr>
2436 EOF
2437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2438 { (eval echo configure:2439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2440 if test -z "$ac_err"; then
2441   rm -rf conftest*
2442   eval "ac_cv_header_$ac_safe=yes"
2443 else
2444   echo "$ac_err" >&5
2445   echo "configure: failed program was:" >&5
2446   cat conftest.$ac_ext >&5
2447   rm -rf conftest*
2448   eval "ac_cv_header_$ac_safe=no"
2449 fi
2450 rm -f conftest*
2451 fi
2452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2453   echo "$ac_t""yes" 1>&6
2454     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2455   cat >> confdefs.h <<EOF
2456 #define $ac_tr_hdr 1
2457 EOF
2458  
2459 else
2460   echo "$ac_t""no" 1>&6
2461 fi
2462 done
2463
2464
2465
2466 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
2467 echo "configure:2468: checking POSIX termios" >&5
2468 if eval "test \"`echo '$''{'nmh_cv_sys_posix_termios'+set}'`\" = set"; then
2469   echo $ac_n "(cached) $ac_c" 1>&6
2470 else
2471   cat > conftest.$ac_ext <<EOF
2472 #line 2473 "configure"
2473 #include "confdefs.h"
2474 #include <sys/types.h>
2475 #include <unistd.h>
2476 #include <termios.h>
2477 int main() {
2478 /* SunOS 4.0.3 has termios.h but not the library calls.  */
2479 tcgetattr(0, 0);
2480 ; return 0; }
2481 EOF
2482 if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2483   rm -rf conftest*
2484   nmh_cv_sys_posix_termios=yes
2485 else
2486   echo "configure: failed program was:" >&5
2487   cat conftest.$ac_ext >&5
2488   rm -rf conftest*
2489   nmh_cv_sys_posix_termios=no
2490 fi
2491 rm -f conftest*
2492 fi
2493
2494 echo "$ac_t""$nmh_cv_sys_posix_termios" 1>&6
2495  
2496 if test $nmh_cv_sys_posix_termios = yes; then
2497   echo $ac_n "checking TIOCGWINSZ in termios.h""... $ac_c" 1>&6
2498 echo "configure:2499: checking TIOCGWINSZ in termios.h" >&5
2499 if eval "test \"`echo '$''{'nmh_cv_header_termios_h_tiocgwinsz'+set}'`\" = set"; then
2500   echo $ac_n "(cached) $ac_c" 1>&6
2501 else
2502   cat > conftest.$ac_ext <<EOF
2503 #line 2504 "configure"
2504 #include "confdefs.h"
2505 #include <sys/types.h>
2506 #include <termios.h>
2507 int main() {
2508 int x = TIOCGWINSZ;
2509 ; return 0; }
2510 EOF
2511 if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2512   rm -rf conftest*
2513   nmh_cv_header_termios_h_tiocgwinsz=yes
2514 else
2515   echo "configure: failed program was:" >&5
2516   cat conftest.$ac_ext >&5
2517   rm -rf conftest*
2518   nmh_cv_header_termios_h_tiocgwinsz=no
2519 fi
2520 rm -f conftest*
2521 fi
2522
2523 echo "$ac_t""$nmh_cv_header_termios_h_tiocgwinsz" 1>&6
2524 else
2525   nmh_cv_header_termios_h_tiocgwinsz=no
2526 fi
2527  
2528 if test $nmh_cv_header_termios_h_tiocgwinsz = no; then
2529   echo $ac_n "checking TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
2530 echo "configure:2531: checking TIOCGWINSZ in sys/ioctl.h" >&5
2531 if eval "test \"`echo '$''{'nmh_cv_header_sys_ioctl_h_tiocgwinsz'+set}'`\" = set"; then
2532   echo $ac_n "(cached) $ac_c" 1>&6
2533 else
2534   cat > conftest.$ac_ext <<EOF
2535 #line 2536 "configure"
2536 #include "confdefs.h"
2537 #include <sys/types.h>
2538 #include <sys/ioctl.h>
2539 int main() {
2540 int x = TIOCGWINSZ;
2541 ; return 0; }
2542 EOF
2543 if { (eval echo configure:2544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2544   rm -rf conftest*
2545   nmh_cv_header_sys_ioctl_h_tiocgwinsz=yes
2546 else
2547   echo "configure: failed program was:" >&5
2548   cat conftest.$ac_ext >&5
2549   rm -rf conftest*
2550   nmh_cv_header_sys_ioctl_h_tiocgwinsz=no
2551 fi
2552 rm -f conftest*
2553 fi
2554
2555 echo "$ac_t""$nmh_cv_header_sys_ioctl_h_tiocgwinsz" 1>&6
2556   if test $nmh_cv_header_sys_ioctl_h_tiocgwinsz = yes; then
2557     cat >> confdefs.h <<\EOF
2558 #define GWINSZ_IN_SYS_IOCTL 1
2559 EOF
2560
2561   fi
2562 fi
2563  
2564 ac_safe=`echo "libio.h" | sed 'y%./+-%__p_%'`
2565 echo $ac_n "checking for libio.h""... $ac_c" 1>&6
2566 echo "configure:2567: checking for libio.h" >&5
2567 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2568   echo $ac_n "(cached) $ac_c" 1>&6
2569 else
2570   cat > conftest.$ac_ext <<EOF
2571 #line 2572 "configure"
2572 #include "confdefs.h"
2573 #include <libio.h>
2574 EOF
2575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2576 { (eval echo configure:2577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2578 if test -z "$ac_err"; then
2579   rm -rf conftest*
2580   eval "ac_cv_header_$ac_safe=yes"
2581 else
2582   echo "$ac_err" >&5
2583   echo "configure: failed program was:" >&5
2584   cat conftest.$ac_ext >&5
2585   rm -rf conftest*
2586   eval "ac_cv_header_$ac_safe=no"
2587 fi
2588 rm -f conftest*
2589 fi
2590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2591   echo "$ac_t""yes" 1>&6
2592   
2593   cat > conftest.$ac_ext <<EOF
2594 #line 2595 "configure"
2595 #include "confdefs.h"
2596 #include <libio.h>
2597 EOF
2598 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2599   egrep "_IO_write_ptr" >/dev/null 2>&1; then
2600   rm -rf conftest*
2601   
2602     cat >> confdefs.h <<\EOF
2603 #define LINUX_STDIO 1
2604 EOF
2605  
2606 fi
2607 rm -f conftest*
2608  
2609 else
2610   echo "$ac_t""no" 1>&6
2611 fi
2612  
2613
2614 ac_safe=`echo "sys/ptem.h" | sed 'y%./+-%__p_%'`
2615 echo $ac_n "checking for sys/ptem.h""... $ac_c" 1>&6
2616 echo "configure:2617: checking for sys/ptem.h" >&5
2617 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2618   echo $ac_n "(cached) $ac_c" 1>&6
2619 else
2620   cat > conftest.$ac_ext <<EOF
2621 #line 2622 "configure"
2622 #include "confdefs.h"
2623 #include <sys/ptem.h>
2624 EOF
2625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2626 { (eval echo configure:2627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2628 if test -z "$ac_err"; then
2629   rm -rf conftest*
2630   eval "ac_cv_header_$ac_safe=yes"
2631 else
2632   echo "$ac_err" >&5
2633   echo "configure: failed program was:" >&5
2634   cat conftest.$ac_ext >&5
2635   rm -rf conftest*
2636   eval "ac_cv_header_$ac_safe=no"
2637 fi
2638 rm -f conftest*
2639 fi
2640 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2641   echo "$ac_t""yes" 1>&6
2642   cat >> confdefs.h <<\EOF
2643 #define WINSIZE_IN_PTEM 1
2644 EOF
2645
2646 else
2647   echo "$ac_t""no" 1>&6
2648 fi
2649
2650
2651 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2652 echo "configure:2653: checking for pid_t" >&5
2653 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2654   echo $ac_n "(cached) $ac_c" 1>&6
2655 else
2656   cat > conftest.$ac_ext <<EOF
2657 #line 2658 "configure"
2658 #include "confdefs.h"
2659 #include <sys/types.h>
2660 #if STDC_HEADERS
2661 #include <stdlib.h>
2662 #include <stddef.h>
2663 #endif
2664 EOF
2665 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2666   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2667   rm -rf conftest*
2668   ac_cv_type_pid_t=yes
2669 else
2670   rm -rf conftest*
2671   ac_cv_type_pid_t=no
2672 fi
2673 rm -f conftest*
2674
2675 fi
2676 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2677 if test $ac_cv_type_pid_t = no; then
2678   cat >> confdefs.h <<\EOF
2679 #define pid_t int
2680 EOF
2681
2682 fi
2683
2684 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2685 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
2686 echo "configure:2687: checking for vfork.h" >&5
2687 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2688   echo $ac_n "(cached) $ac_c" 1>&6
2689 else
2690   cat > conftest.$ac_ext <<EOF
2691 #line 2692 "configure"
2692 #include "confdefs.h"
2693 #include <vfork.h>
2694 EOF
2695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2696 { (eval echo configure:2697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2698 if test -z "$ac_err"; then
2699   rm -rf conftest*
2700   eval "ac_cv_header_$ac_safe=yes"
2701 else
2702   echo "$ac_err" >&5
2703   echo "configure: failed program was:" >&5
2704   cat conftest.$ac_ext >&5
2705   rm -rf conftest*
2706   eval "ac_cv_header_$ac_safe=no"
2707 fi
2708 rm -f conftest*
2709 fi
2710 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2711   echo "$ac_t""yes" 1>&6
2712   cat >> confdefs.h <<\EOF
2713 #define HAVE_VFORK_H 1
2714 EOF
2715
2716 else
2717   echo "$ac_t""no" 1>&6
2718 fi
2719
2720 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
2721 echo "configure:2722: checking for working vfork" >&5
2722 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2723   echo $ac_n "(cached) $ac_c" 1>&6
2724 else
2725   if test "$cross_compiling" = yes; then
2726   echo $ac_n "checking for vfork""... $ac_c" 1>&6
2727 echo "configure:2728: checking for vfork" >&5
2728 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2729   echo $ac_n "(cached) $ac_c" 1>&6
2730 else
2731   cat > conftest.$ac_ext <<EOF
2732 #line 2733 "configure"
2733 #include "confdefs.h"
2734 /* System header to define __stub macros and hopefully few prototypes,
2735     which can conflict with char vfork(); below.  */
2736 #include <assert.h>
2737 /* Override any gcc2 internal prototype to avoid an error.  */
2738 /* We use char because int might match the return type of a gcc2
2739     builtin and then its argument prototype would still apply.  */
2740 char vfork();
2741
2742 int main() {
2743
2744 /* The GNU C library defines this for functions which it implements
2745     to always fail with ENOSYS.  Some functions are actually named
2746     something starting with __ and the normal name is an alias.  */
2747 #if defined (__stub_vfork) || defined (__stub___vfork)
2748 choke me
2749 #else
2750 vfork();
2751 #endif
2752
2753 ; return 0; }
2754 EOF
2755 if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2756   rm -rf conftest*
2757   eval "ac_cv_func_vfork=yes"
2758 else
2759   echo "configure: failed program was:" >&5
2760   cat conftest.$ac_ext >&5
2761   rm -rf conftest*
2762   eval "ac_cv_func_vfork=no"
2763 fi
2764 rm -f conftest*
2765 fi
2766
2767 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2768   echo "$ac_t""yes" 1>&6
2769   :
2770 else
2771   echo "$ac_t""no" 1>&6
2772 fi
2773
2774 ac_cv_func_vfork_works=$ac_cv_func_vfork
2775 else
2776   cat > conftest.$ac_ext <<EOF
2777 #line 2778 "configure"
2778 #include "confdefs.h"
2779 /* Thanks to Paul Eggert for this test.  */
2780 #include <stdio.h>
2781 #include <sys/types.h>
2782 #include <sys/stat.h>
2783 #ifdef HAVE_UNISTD_H
2784 #include <unistd.h>
2785 #endif
2786 #ifdef HAVE_VFORK_H
2787 #include <vfork.h>
2788 #endif
2789 /* On some sparc systems, changes by the child to local and incoming
2790    argument registers are propagated back to the parent.
2791    The compiler is told about this with #include <vfork.h>,
2792    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2793    Test for this by using a static variable whose address
2794    is put into a register that is clobbered by the vfork.  */
2795 static
2796 #ifdef __cplusplus
2797 sparc_address_test (int arg)
2798 #else
2799 sparc_address_test (arg) int arg;
2800 #endif
2801 {
2802   static pid_t child;
2803   if (!child) {
2804     child = vfork ();
2805     if (child < 0) {
2806       perror ("vfork");
2807       _exit(2);
2808     }
2809     if (!child) {
2810       arg = getpid();
2811       write(-1, "", 0);
2812       _exit (arg);
2813     }
2814   }
2815 }
2816 main() {
2817   pid_t parent = getpid ();
2818   pid_t child;
2819
2820   sparc_address_test ();
2821
2822   child = vfork ();
2823
2824   if (child == 0) {
2825     /* Here is another test for sparc vfork register problems.
2826        This test uses lots of local variables, at least
2827        as many local variables as main has allocated so far
2828        including compiler temporaries.  4 locals are enough for
2829        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2830        A buggy compiler should reuse the register of parent
2831        for one of the local variables, since it will think that
2832        parent can't possibly be used any more in this routine.
2833        Assigning to the local variable will thus munge parent
2834        in the parent process.  */
2835     pid_t
2836       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2837       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2838     /* Convince the compiler that p..p7 are live; otherwise, it might
2839        use the same hardware register for all 8 local variables.  */
2840     if (p != p1 || p != p2 || p != p3 || p != p4
2841         || p != p5 || p != p6 || p != p7)
2842       _exit(1);
2843
2844     /* On some systems (e.g. IRIX 3.3),
2845        vfork doesn't separate parent from child file descriptors.
2846        If the child closes a descriptor before it execs or exits,
2847        this munges the parent's descriptor as well.
2848        Test for this by closing stdout in the child.  */
2849     _exit(close(fileno(stdout)) != 0);
2850   } else {
2851     int status;
2852     struct stat st;
2853
2854     while (wait(&status) != child)
2855       ;
2856     exit(
2857          /* Was there some problem with vforking?  */
2858          child < 0
2859
2860          /* Did the child fail?  (This shouldn't happen.)  */
2861          || status
2862
2863          /* Did the vfork/compiler bug occur?  */
2864          || parent != getpid()
2865
2866          /* Did the file descriptor bug occur?  */
2867          || fstat(fileno(stdout), &st) != 0
2868          );
2869   }
2870 }
2871 EOF
2872 if { (eval echo configure:2873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2873 then
2874   ac_cv_func_vfork_works=yes
2875 else
2876   echo "configure: failed program was:" >&5
2877   cat conftest.$ac_ext >&5
2878   rm -fr conftest*
2879   ac_cv_func_vfork_works=no
2880 fi
2881 rm -fr conftest*
2882 fi
2883
2884 fi
2885
2886 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2887 if test $ac_cv_func_vfork_works = no; then
2888   cat >> confdefs.h <<\EOF
2889 #define vfork fork
2890 EOF
2891
2892 fi
2893
2894 echo $ac_n "checking for mkstemp in -lmkstemp""... $ac_c" 1>&6
2895 echo "configure:2896: checking for mkstemp in -lmkstemp" >&5
2896 ac_lib_var=`echo mkstemp'_'mkstemp | sed 'y%./+-%__p_%'`
2897 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2898   echo $ac_n "(cached) $ac_c" 1>&6
2899 else
2900   ac_save_LIBS="$LIBS"
2901 LIBS="-lmkstemp  $LIBS"
2902 cat > conftest.$ac_ext <<EOF
2903 #line 2904 "configure"
2904 #include "confdefs.h"
2905 /* Override any gcc2 internal prototype to avoid an error.  */
2906 /* We use char because int might match the return type of a gcc2
2907     builtin and then its argument prototype would still apply.  */
2908 char mkstemp();
2909
2910 int main() {
2911 mkstemp()
2912 ; return 0; }
2913 EOF
2914 if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2915   rm -rf conftest*
2916   eval "ac_cv_lib_$ac_lib_var=yes"
2917 else
2918   echo "configure: failed program was:" >&5
2919   cat conftest.$ac_ext >&5
2920   rm -rf conftest*
2921   eval "ac_cv_lib_$ac_lib_var=no"
2922 fi
2923 rm -f conftest*
2924 LIBS="$ac_save_LIBS"
2925
2926 fi
2927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2928   echo "$ac_t""yes" 1>&6
2929     ac_tr_lib=HAVE_LIB`echo mkstemp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2930     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2931   cat >> confdefs.h <<EOF
2932 #define $ac_tr_lib 1
2933 EOF
2934
2935   LIBS="-lmkstemp $LIBS"
2936
2937 else
2938   echo "$ac_t""no" 1>&6
2939 fi
2940
2941 for ac_func in waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
2942                sighold sigrelse writev lstat uname tzset killpg mkstemp \
2943                sethostent getutent
2944 do
2945 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2946 echo "configure:2947: checking for $ac_func" >&5
2947 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2948   echo $ac_n "(cached) $ac_c" 1>&6
2949 else
2950   cat > conftest.$ac_ext <<EOF
2951 #line 2952 "configure"
2952 #include "confdefs.h"
2953 /* System header to define __stub macros and hopefully few prototypes,
2954     which can conflict with char $ac_func(); below.  */
2955 #include <assert.h>
2956 /* Override any gcc2 internal prototype to avoid an error.  */
2957 /* We use char because int might match the return type of a gcc2
2958     builtin and then its argument prototype would still apply.  */
2959 char $ac_func();
2960
2961 int main() {
2962
2963 /* The GNU C library defines this for functions which it implements
2964     to always fail with ENOSYS.  Some functions are actually named
2965     something starting with __ and the normal name is an alias.  */
2966 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2967 choke me
2968 #else
2969 $ac_func();
2970 #endif
2971
2972 ; return 0; }
2973 EOF
2974 if { (eval echo configure:2975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2975   rm -rf conftest*
2976   eval "ac_cv_func_$ac_func=yes"
2977 else
2978   echo "configure: failed program was:" >&5
2979   cat conftest.$ac_ext >&5
2980   rm -rf conftest*
2981   eval "ac_cv_func_$ac_func=no"
2982 fi
2983 rm -f conftest*
2984 fi
2985
2986 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2987   echo "$ac_t""yes" 1>&6
2988     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2989   cat >> confdefs.h <<EOF
2990 #define $ac_tr_func 1
2991 EOF
2992  
2993 else
2994   echo "$ac_t""no" 1>&6
2995 fi
2996 done
2997
2998
2999 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3000 echo "configure:3001: checking for gethostbyname" >&5
3001 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3002   echo $ac_n "(cached) $ac_c" 1>&6
3003 else
3004   cat > conftest.$ac_ext <<EOF
3005 #line 3006 "configure"
3006 #include "confdefs.h"
3007 /* System header to define __stub macros and hopefully few prototypes,
3008     which can conflict with char gethostbyname(); below.  */
3009 #include <assert.h>
3010 /* Override any gcc2 internal prototype to avoid an error.  */
3011 /* We use char because int might match the return type of a gcc2
3012     builtin and then its argument prototype would still apply.  */
3013 char gethostbyname();
3014
3015 int main() {
3016
3017 /* The GNU C library defines this for functions which it implements
3018     to always fail with ENOSYS.  Some functions are actually named
3019     something starting with __ and the normal name is an alias.  */
3020 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3021 choke me
3022 #else
3023 gethostbyname();
3024 #endif
3025
3026 ; return 0; }
3027 EOF
3028 if { (eval echo configure:3029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3029   rm -rf conftest*
3030   eval "ac_cv_func_gethostbyname=yes"
3031 else
3032   echo "configure: failed program was:" >&5
3033   cat conftest.$ac_ext >&5
3034   rm -rf conftest*
3035   eval "ac_cv_func_gethostbyname=no"
3036 fi
3037 rm -f conftest*
3038 fi
3039
3040 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3041   echo "$ac_t""yes" 1>&6
3042   cat >> confdefs.h <<\EOF
3043 #define HAVE_GETHOSTBYNAME 1
3044 EOF
3045
3046 else
3047   echo "$ac_t""no" 1>&6
3048 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3049 echo "configure:3050: checking for gethostbyname in -lnsl" >&5
3050 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3052   echo $ac_n "(cached) $ac_c" 1>&6
3053 else
3054   ac_save_LIBS="$LIBS"
3055 LIBS="-lnsl  $LIBS"
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 /* Override any gcc2 internal prototype to avoid an error.  */
3060 /* We use char because int might match the return type of a gcc2
3061     builtin and then its argument prototype would still apply.  */
3062 char gethostbyname();
3063
3064 int main() {
3065 gethostbyname()
3066 ; return 0; }
3067 EOF
3068 if { (eval echo configure:3069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3069   rm -rf conftest*
3070   eval "ac_cv_lib_$ac_lib_var=yes"
3071 else
3072   echo "configure: failed program was:" >&5
3073   cat conftest.$ac_ext >&5
3074   rm -rf conftest*
3075   eval "ac_cv_lib_$ac_lib_var=no"
3076 fi
3077 rm -f conftest*
3078 LIBS="$ac_save_LIBS"
3079
3080 fi
3081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3082   echo "$ac_t""yes" 1>&6
3083   cat >> confdefs.h <<\EOF
3084 #define HAVE_GETHOSTBYNAME 1
3085 EOF
3086  
3087 else
3088   echo "$ac_t""no" 1>&6
3089 fi
3090  
3091 fi
3092
3093
3094 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
3095 echo "configure:3096: checking for sigsetjmp" >&5
3096 cat > conftest.$ac_ext <<EOF
3097 #line 3098 "configure"
3098 #include "confdefs.h"
3099 #include <setjmp.h>
3100 int main() {
3101 sigsetjmp((void *)0, 0);
3102 ; return 0; }
3103 EOF
3104 if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3105   rm -rf conftest*
3106   cat >> confdefs.h <<\EOF
3107 #define HAVE_SIGSETJMP 1
3108 EOF
3109  echo "$ac_t""yes" 1>&6
3110 else
3111   echo "configure: failed program was:" >&5
3112   cat conftest.$ac_ext >&5
3113   rm -rf conftest*
3114   echo "$ac_t""no" 1>&6
3115 fi
3116 rm -f conftest*
3117
3118 for ac_func in snprintf strerror strdup
3119 do
3120 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3121 echo "configure:3122: checking for $ac_func" >&5
3122 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3123   echo $ac_n "(cached) $ac_c" 1>&6
3124 else
3125   cat > conftest.$ac_ext <<EOF
3126 #line 3127 "configure"
3127 #include "confdefs.h"
3128 /* System header to define __stub macros and hopefully few prototypes,
3129     which can conflict with char $ac_func(); below.  */
3130 #include <assert.h>
3131 /* Override any gcc2 internal prototype to avoid an error.  */
3132 /* We use char because int might match the return type of a gcc2
3133     builtin and then its argument prototype would still apply.  */
3134 char $ac_func();
3135
3136 int main() {
3137
3138 /* The GNU C library defines this for functions which it implements
3139     to always fail with ENOSYS.  Some functions are actually named
3140     something starting with __ and the normal name is an alias.  */
3141 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3142 choke me
3143 #else
3144 $ac_func();
3145 #endif
3146
3147 ; return 0; }
3148 EOF
3149 if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3150   rm -rf conftest*
3151   eval "ac_cv_func_$ac_func=yes"
3152 else
3153   echo "configure: failed program was:" >&5
3154   cat conftest.$ac_ext >&5
3155   rm -rf conftest*
3156   eval "ac_cv_func_$ac_func=no"
3157 fi
3158 rm -f conftest*
3159 fi
3160
3161 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3162   echo "$ac_t""yes" 1>&6
3163     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3164   cat >> confdefs.h <<EOF
3165 #define $ac_tr_func 1
3166 EOF
3167  
3168 else
3169   echo "$ac_t""no" 1>&6
3170 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
3171 fi
3172 done
3173
3174
3175
3176 cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179 #include <grp.h>
3180 EOF
3181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3182   egrep "initgroups" >/dev/null 2>&1; then
3183   rm -rf conftest*
3184   cat >> confdefs.h <<\EOF
3185 #define INITGROUPS_HEADER <grp.h>
3186 EOF
3187
3188 else
3189   rm -rf conftest*
3190   cat > conftest.$ac_ext <<EOF
3191 #line 3192 "configure"
3192 #include "confdefs.h"
3193 #include <unistd.h>
3194 EOF
3195 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3196   egrep "initgroups" >/dev/null 2>&1; then
3197   rm -rf conftest*
3198   cat >> confdefs.h <<\EOF
3199 #define INITGROUPS_HEADER <unistd.h>
3200 EOF
3201
3202 fi
3203 rm -f conftest*
3204
3205 fi
3206 rm -f conftest*
3207
3208
3209 cat > conftest.$ac_ext <<EOF
3210 #line 3211 "configure"
3211 #include "confdefs.h"
3212 #include <stdio.h>
3213 EOF
3214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3215   egrep "snprintf" >/dev/null 2>&1; then
3216   rm -rf conftest*
3217   cat >> confdefs.h <<\EOF
3218 #define HAVE_SNPRINTF_PROTOTYPE 1
3219 EOF
3220
3221 fi
3222 rm -f conftest*
3223
3224
3225 echo $ac_n "checking for modf""... $ac_c" 1>&6
3226 echo "configure:3227: checking for modf" >&5
3227 if eval "test \"`echo '$''{'ac_cv_func_modf'+set}'`\" = set"; then
3228   echo $ac_n "(cached) $ac_c" 1>&6
3229 else
3230   cat > conftest.$ac_ext <<EOF
3231 #line 3232 "configure"
3232 #include "confdefs.h"
3233 /* System header to define __stub macros and hopefully few prototypes,
3234     which can conflict with char modf(); below.  */
3235 #include <assert.h>
3236 /* Override any gcc2 internal prototype to avoid an error.  */
3237 /* We use char because int might match the return type of a gcc2
3238     builtin and then its argument prototype would still apply.  */
3239 char modf();
3240
3241 int main() {
3242
3243 /* The GNU C library defines this for functions which it implements
3244     to always fail with ENOSYS.  Some functions are actually named
3245     something starting with __ and the normal name is an alias.  */
3246 #if defined (__stub_modf) || defined (__stub___modf)
3247 choke me
3248 #else
3249 modf();
3250 #endif
3251
3252 ; return 0; }
3253 EOF
3254 if { (eval echo configure:3255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3255   rm -rf conftest*
3256   eval "ac_cv_func_modf=yes"
3257 else
3258   echo "configure: failed program was:" >&5
3259   cat conftest.$ac_ext >&5
3260   rm -rf conftest*
3261   eval "ac_cv_func_modf=no"
3262 fi
3263 rm -f conftest*
3264 fi
3265
3266 if eval "test \"`echo '$ac_cv_func_'modf`\" = yes"; then
3267   echo "$ac_t""yes" 1>&6
3268   :
3269 else
3270   echo "$ac_t""no" 1>&6
3271 echo $ac_n "checking for modf in -lm""... $ac_c" 1>&6
3272 echo "configure:3273: checking for modf in -lm" >&5
3273 ac_lib_var=`echo m'_'modf | sed 'y%./+-%__p_%'`
3274 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3275   echo $ac_n "(cached) $ac_c" 1>&6
3276 else
3277   ac_save_LIBS="$LIBS"
3278 LIBS="-lm  $LIBS"
3279 cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 /* Override any gcc2 internal prototype to avoid an error.  */
3283 /* We use char because int might match the return type of a gcc2
3284     builtin and then its argument prototype would still apply.  */
3285 char modf();
3286
3287 int main() {
3288 modf()
3289 ; return 0; }
3290 EOF
3291 if { (eval echo configure:3292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3292   rm -rf conftest*
3293   eval "ac_cv_lib_$ac_lib_var=yes"
3294 else
3295   echo "configure: failed program was:" >&5
3296   cat conftest.$ac_ext >&5
3297   rm -rf conftest*
3298   eval "ac_cv_lib_$ac_lib_var=no"
3299 fi
3300 rm -f conftest*
3301 LIBS="$ac_save_LIBS"
3302
3303 fi
3304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3305   echo "$ac_t""yes" 1>&6
3306     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
3307     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3308   cat >> confdefs.h <<EOF
3309 #define $ac_tr_lib 1
3310 EOF
3311
3312   LIBS="-lm $LIBS"
3313
3314 else
3315   echo "$ac_t""no" 1>&6
3316 fi
3317
3318 fi
3319
3320
3321 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3322 echo "configure:3323: checking for gethostbyname" >&5
3323 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3324   echo $ac_n "(cached) $ac_c" 1>&6
3325 else
3326   cat > conftest.$ac_ext <<EOF
3327 #line 3328 "configure"
3328 #include "confdefs.h"
3329 /* System header to define __stub macros and hopefully few prototypes,
3330     which can conflict with char gethostbyname(); below.  */
3331 #include <assert.h>
3332 /* Override any gcc2 internal prototype to avoid an error.  */
3333 /* We use char because int might match the return type of a gcc2
3334     builtin and then its argument prototype would still apply.  */
3335 char gethostbyname();
3336
3337 int main() {
3338
3339 /* The GNU C library defines this for functions which it implements
3340     to always fail with ENOSYS.  Some functions are actually named
3341     something starting with __ and the normal name is an alias.  */
3342 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3343 choke me
3344 #else
3345 gethostbyname();
3346 #endif
3347
3348 ; return 0; }
3349 EOF
3350 if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3351   rm -rf conftest*
3352   eval "ac_cv_func_gethostbyname=yes"
3353 else
3354   echo "configure: failed program was:" >&5
3355   cat conftest.$ac_ext >&5
3356   rm -rf conftest*
3357   eval "ac_cv_func_gethostbyname=no"
3358 fi
3359 rm -f conftest*
3360 fi
3361
3362 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3363   echo "$ac_t""yes" 1>&6
3364   :
3365 else
3366   echo "$ac_t""no" 1>&6
3367 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3368 echo "configure:3369: checking for gethostbyname in -lnsl" >&5
3369 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3371   echo $ac_n "(cached) $ac_c" 1>&6
3372 else
3373   ac_save_LIBS="$LIBS"
3374 LIBS="-lnsl  $LIBS"
3375 cat > conftest.$ac_ext <<EOF
3376 #line 3377 "configure"
3377 #include "confdefs.h"
3378 /* Override any gcc2 internal prototype to avoid an error.  */
3379 /* We use char because int might match the return type of a gcc2
3380     builtin and then its argument prototype would still apply.  */
3381 char gethostbyname();
3382
3383 int main() {
3384 gethostbyname()
3385 ; return 0; }
3386 EOF
3387 if { (eval echo configure:3388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3388   rm -rf conftest*
3389   eval "ac_cv_lib_$ac_lib_var=yes"
3390 else
3391   echo "configure: failed program was:" >&5
3392   cat conftest.$ac_ext >&5
3393   rm -rf conftest*
3394   eval "ac_cv_lib_$ac_lib_var=no"
3395 fi
3396 rm -f conftest*
3397 LIBS="$ac_save_LIBS"
3398
3399 fi
3400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3401   echo "$ac_t""yes" 1>&6
3402     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
3403     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3404   cat >> confdefs.h <<EOF
3405 #define $ac_tr_lib 1
3406 EOF
3407
3408   LIBS="-lnsl $LIBS"
3409
3410 else
3411   echo "$ac_t""no" 1>&6
3412 echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
3413 echo "configure:3414: checking for gethostbyname in -lresolv" >&5
3414 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
3415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3416   echo $ac_n "(cached) $ac_c" 1>&6
3417 else
3418   ac_save_LIBS="$LIBS"
3419 LIBS="-lresolv  $LIBS"
3420 cat > conftest.$ac_ext <<EOF
3421 #line 3422 "configure"
3422 #include "confdefs.h"
3423 /* Override any gcc2 internal prototype to avoid an error.  */
3424 /* We use char because int might match the return type of a gcc2
3425     builtin and then its argument prototype would still apply.  */
3426 char gethostbyname();
3427
3428 int main() {
3429 gethostbyname()
3430 ; return 0; }
3431 EOF
3432 if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3433   rm -rf conftest*
3434   eval "ac_cv_lib_$ac_lib_var=yes"
3435 else
3436   echo "configure: failed program was:" >&5
3437   cat conftest.$ac_ext >&5
3438   rm -rf conftest*
3439   eval "ac_cv_lib_$ac_lib_var=no"
3440 fi
3441 rm -f conftest*
3442 LIBS="$ac_save_LIBS"
3443
3444 fi
3445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3446   echo "$ac_t""yes" 1>&6
3447     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
3448     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3449   cat >> confdefs.h <<EOF
3450 #define $ac_tr_lib 1
3451 EOF
3452
3453   LIBS="-lresolv $LIBS"
3454
3455 else
3456   echo "$ac_t""no" 1>&6
3457 fi
3458
3459 fi
3460
3461 fi
3462
3463 echo $ac_n "checking for socket""... $ac_c" 1>&6
3464 echo "configure:3465: checking for socket" >&5
3465 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3466   echo $ac_n "(cached) $ac_c" 1>&6
3467 else
3468   cat > conftest.$ac_ext <<EOF
3469 #line 3470 "configure"
3470 #include "confdefs.h"
3471 /* System header to define __stub macros and hopefully few prototypes,
3472     which can conflict with char socket(); below.  */
3473 #include <assert.h>
3474 /* Override any gcc2 internal prototype to avoid an error.  */
3475 /* We use char because int might match the return type of a gcc2
3476     builtin and then its argument prototype would still apply.  */
3477 char socket();
3478
3479 int main() {
3480
3481 /* The GNU C library defines this for functions which it implements
3482     to always fail with ENOSYS.  Some functions are actually named
3483     something starting with __ and the normal name is an alias.  */
3484 #if defined (__stub_socket) || defined (__stub___socket)
3485 choke me
3486 #else
3487 socket();
3488 #endif
3489
3490 ; return 0; }
3491 EOF
3492 if { (eval echo configure:3493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3493   rm -rf conftest*
3494   eval "ac_cv_func_socket=yes"
3495 else
3496   echo "configure: failed program was:" >&5
3497   cat conftest.$ac_ext >&5
3498   rm -rf conftest*
3499   eval "ac_cv_func_socket=no"
3500 fi
3501 rm -f conftest*
3502 fi
3503
3504 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3505   echo "$ac_t""yes" 1>&6
3506   :
3507 else
3508   echo "$ac_t""no" 1>&6
3509 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3510 echo "configure:3511: checking for socket in -lsocket" >&5
3511 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3512 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   ac_save_LIBS="$LIBS"
3516 LIBS="-lsocket  $LIBS"
3517 cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 /* Override any gcc2 internal prototype to avoid an error.  */
3521 /* We use char because int might match the return type of a gcc2
3522     builtin and then its argument prototype would still apply.  */
3523 char socket();
3524
3525 int main() {
3526 socket()
3527 ; return 0; }
3528 EOF
3529 if { (eval echo configure:3530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3530   rm -rf conftest*
3531   eval "ac_cv_lib_$ac_lib_var=yes"
3532 else
3533   echo "configure: failed program was:" >&5
3534   cat conftest.$ac_ext >&5
3535   rm -rf conftest*
3536   eval "ac_cv_lib_$ac_lib_var=no"
3537 fi
3538 rm -f conftest*
3539 LIBS="$ac_save_LIBS"
3540
3541 fi
3542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3543   echo "$ac_t""yes" 1>&6
3544     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
3545     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3546   cat >> confdefs.h <<EOF
3547 #define $ac_tr_lib 1
3548 EOF
3549
3550   LIBS="-lsocket $LIBS"
3551
3552 else
3553   echo "$ac_t""no" 1>&6
3554 fi
3555
3556 fi
3557
3558
3559
3560 termcap_curses_order="termcap curses ncurses"
3561 for lib in $termcap_curses_order; do
3562   echo $ac_n "checking for tgetent in -l${lib}""... $ac_c" 1>&6
3563 echo "configure:3564: checking for tgetent in -l${lib}" >&5
3564 ac_lib_var=`echo ${lib}'_'tgetent | sed 'y%./+-%__p_%'`
3565 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3566   echo $ac_n "(cached) $ac_c" 1>&6
3567 else
3568   ac_save_LIBS="$LIBS"
3569 LIBS="-l${lib}  $LIBS"
3570 cat > conftest.$ac_ext <<EOF
3571 #line 3572 "configure"
3572 #include "confdefs.h"
3573 /* Override any gcc2 internal prototype to avoid an error.  */
3574 /* We use char because int might match the return type of a gcc2
3575     builtin and then its argument prototype would still apply.  */
3576 char tgetent();
3577
3578 int main() {
3579 tgetent()
3580 ; return 0; }
3581 EOF
3582 if { (eval echo configure:3583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3583   rm -rf conftest*
3584   eval "ac_cv_lib_$ac_lib_var=yes"
3585 else
3586   echo "configure: failed program was:" >&5
3587   cat conftest.$ac_ext >&5
3588   rm -rf conftest*
3589   eval "ac_cv_lib_$ac_lib_var=no"
3590 fi
3591 rm -f conftest*
3592 LIBS="$ac_save_LIBS"
3593
3594 fi
3595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3596   echo "$ac_t""yes" 1>&6
3597   TERMLIB="-l$lib"; break
3598 else
3599   echo "$ac_t""no" 1>&6
3600 fi
3601
3602 done
3603
3604 echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
3605 echo "configure:3606: checking for dbm_open" >&5
3606 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
3607   echo $ac_n "(cached) $ac_c" 1>&6
3608 else
3609   cat > conftest.$ac_ext <<EOF
3610 #line 3611 "configure"
3611 #include "confdefs.h"
3612 /* System header to define __stub macros and hopefully few prototypes,
3613     which can conflict with char dbm_open(); below.  */
3614 #include <assert.h>
3615 /* Override any gcc2 internal prototype to avoid an error.  */
3616 /* We use char because int might match the return type of a gcc2
3617     builtin and then its argument prototype would still apply.  */
3618 char dbm_open();
3619
3620 int main() {
3621
3622 /* The GNU C library defines this for functions which it implements
3623     to always fail with ENOSYS.  Some functions are actually named
3624     something starting with __ and the normal name is an alias.  */
3625 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
3626 choke me
3627 #else
3628 dbm_open();
3629 #endif
3630
3631 ; return 0; }
3632 EOF
3633 if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3634   rm -rf conftest*
3635   eval "ac_cv_func_dbm_open=yes"
3636 else
3637   echo "configure: failed program was:" >&5
3638   cat conftest.$ac_ext >&5
3639   rm -rf conftest*
3640   eval "ac_cv_func_dbm_open=no"
3641 fi
3642 rm -f conftest*
3643 fi
3644
3645 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
3646   echo "$ac_t""yes" 1>&6
3647   :
3648 else
3649   echo "$ac_t""no" 1>&6
3650 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
3651 echo "configure:3652: checking for dbm_open in -lndbm" >&5
3652 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
3653 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3654   echo $ac_n "(cached) $ac_c" 1>&6
3655 else
3656   ac_save_LIBS="$LIBS"
3657 LIBS="-lndbm  $LIBS"
3658 cat > conftest.$ac_ext <<EOF
3659 #line 3660 "configure"
3660 #include "confdefs.h"
3661 /* Override any gcc2 internal prototype to avoid an error.  */
3662 /* We use char because int might match the return type of a gcc2
3663     builtin and then its argument prototype would still apply.  */
3664 char dbm_open();
3665
3666 int main() {
3667 dbm_open()
3668 ; return 0; }
3669 EOF
3670 if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3671   rm -rf conftest*
3672   eval "ac_cv_lib_$ac_lib_var=yes"
3673 else
3674   echo "configure: failed program was:" >&5
3675   cat conftest.$ac_ext >&5
3676   rm -rf conftest*
3677   eval "ac_cv_lib_$ac_lib_var=no"
3678 fi
3679 rm -f conftest*
3680 LIBS="$ac_save_LIBS"
3681
3682 fi
3683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3684   echo "$ac_t""yes" 1>&6
3685     ac_tr_lib=HAVE_LIB`echo ndbm | sed -e 's/^a-zA-Z0-9_/_/g' \
3686     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3687   cat >> confdefs.h <<EOF
3688 #define $ac_tr_lib 1
3689 EOF
3690
3691   LIBS="-lndbm $LIBS"
3692
3693 else
3694   echo "$ac_t""no" 1>&6
3695 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
3696 echo "configure:3697: checking for dbm_open in -ldbm" >&5
3697 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
3698 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3699   echo $ac_n "(cached) $ac_c" 1>&6
3700 else
3701   ac_save_LIBS="$LIBS"
3702 LIBS="-ldbm  $LIBS"
3703 cat > conftest.$ac_ext <<EOF
3704 #line 3705 "configure"
3705 #include "confdefs.h"
3706 /* Override any gcc2 internal prototype to avoid an error.  */
3707 /* We use char because int might match the return type of a gcc2
3708     builtin and then its argument prototype would still apply.  */
3709 char dbm_open();
3710
3711 int main() {
3712 dbm_open()
3713 ; return 0; }
3714 EOF
3715 if { (eval echo configure:3716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3716   rm -rf conftest*
3717   eval "ac_cv_lib_$ac_lib_var=yes"
3718 else
3719   echo "configure: failed program was:" >&5
3720   cat conftest.$ac_ext >&5
3721   rm -rf conftest*
3722   eval "ac_cv_lib_$ac_lib_var=no"
3723 fi
3724 rm -f conftest*
3725 LIBS="$ac_save_LIBS"
3726
3727 fi
3728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3729   echo "$ac_t""yes" 1>&6
3730     ac_tr_lib=HAVE_LIB`echo dbm | sed -e 's/^a-zA-Z0-9_/_/g' \
3731     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3732   cat >> confdefs.h <<EOF
3733 #define $ac_tr_lib 1
3734 EOF
3735
3736   LIBS="-ldbm $LIBS"
3737
3738 else
3739   echo "$ac_t""no" 1>&6
3740 fi
3741
3742 fi
3743
3744 fi
3745
3746
3747 for ac_hdr in db1/ndbm.h
3748 do
3749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3751 echo "configure:3752: checking for $ac_hdr" >&5
3752 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3753   echo $ac_n "(cached) $ac_c" 1>&6
3754 else
3755   cat > conftest.$ac_ext <<EOF
3756 #line 3757 "configure"
3757 #include "confdefs.h"
3758 #include <$ac_hdr>
3759 EOF
3760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3761 { (eval echo configure:3762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3763 if test -z "$ac_err"; then
3764   rm -rf conftest*
3765   eval "ac_cv_header_$ac_safe=yes"
3766 else
3767   echo "$ac_err" >&5
3768   echo "configure: failed program was:" >&5
3769   cat conftest.$ac_ext >&5
3770   rm -rf conftest*
3771   eval "ac_cv_header_$ac_safe=no"
3772 fi
3773 rm -f conftest*
3774 fi
3775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3776   echo "$ac_t""yes" 1>&6
3777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3778   cat >> confdefs.h <<EOF
3779 #define $ac_tr_hdr 1
3780 EOF
3781  
3782 else
3783   echo "$ac_t""no" 1>&6
3784 fi
3785 done
3786
3787
3788 if test x"$with_hesiod" != x -a x"$with_hesiod" != x"no"; then
3789   if test x"$with_hesiod" != x"yes"; then
3790     HESIOD_INCLUDES="-I$with_hesiod/include"
3791     HESIOD_LIBS="-L$with_hesiod/lib"
3792   fi
3793   echo $ac_n "checking for res_send""... $ac_c" 1>&6
3794 echo "configure:3795: checking for res_send" >&5
3795 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   cat > conftest.$ac_ext <<EOF
3799 #line 3800 "configure"
3800 #include "confdefs.h"
3801 /* System header to define __stub macros and hopefully few prototypes,
3802     which can conflict with char res_send(); below.  */
3803 #include <assert.h>
3804 /* Override any gcc2 internal prototype to avoid an error.  */
3805 /* We use char because int might match the return type of a gcc2
3806     builtin and then its argument prototype would still apply.  */
3807 char res_send();
3808
3809 int main() {
3810
3811 /* The GNU C library defines this for functions which it implements
3812     to always fail with ENOSYS.  Some functions are actually named
3813     something starting with __ and the normal name is an alias.  */
3814 #if defined (__stub_res_send) || defined (__stub___res_send)
3815 choke me
3816 #else
3817 res_send();
3818 #endif
3819
3820 ; return 0; }
3821 EOF
3822 if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3823   rm -rf conftest*
3824   eval "ac_cv_func_res_send=yes"
3825 else
3826   echo "configure: failed program was:" >&5
3827   cat conftest.$ac_ext >&5
3828   rm -rf conftest*
3829   eval "ac_cv_func_res_send=no"
3830 fi
3831 rm -f conftest*
3832 fi
3833
3834 if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
3835   echo "$ac_t""yes" 1>&6
3836   :
3837 else
3838   echo "$ac_t""no" 1>&6
3839 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
3840 echo "configure:3841: checking for res_send in -lresolv" >&5
3841 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
3842 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3843   echo $ac_n "(cached) $ac_c" 1>&6
3844 else
3845   ac_save_LIBS="$LIBS"
3846 LIBS="-lresolv  $LIBS"
3847 cat > conftest.$ac_ext <<EOF
3848 #line 3849 "configure"
3849 #include "confdefs.h"
3850 /* Override any gcc2 internal prototype to avoid an error.  */
3851 /* We use char because int might match the return type of a gcc2
3852     builtin and then its argument prototype would still apply.  */
3853 char res_send();
3854
3855 int main() {
3856 res_send()
3857 ; return 0; }
3858 EOF
3859 if { (eval echo configure:3860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3860   rm -rf conftest*
3861   eval "ac_cv_lib_$ac_lib_var=yes"
3862 else
3863   echo "configure: failed program was:" >&5
3864   cat conftest.$ac_ext >&5
3865   rm -rf conftest*
3866   eval "ac_cv_lib_$ac_lib_var=no"
3867 fi
3868 rm -f conftest*
3869 LIBS="$ac_save_LIBS"
3870
3871 fi
3872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3873   echo "$ac_t""yes" 1>&6
3874     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
3875     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3876   cat >> confdefs.h <<EOF
3877 #define $ac_tr_lib 1
3878 EOF
3879
3880   LIBS="-lresolv $LIBS"
3881
3882 else
3883   echo "$ac_t""no" 1>&6
3884 fi
3885
3886 fi
3887
3888   echo $ac_n "checking for hes_resolve in -lhesiod""... $ac_c" 1>&6
3889 echo "configure:3890: checking for hes_resolve in -lhesiod" >&5
3890 ac_lib_var=`echo hesiod'_'hes_resolve | sed 'y%./+-%__p_%'`
3891 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3892   echo $ac_n "(cached) $ac_c" 1>&6
3893 else
3894   ac_save_LIBS="$LIBS"
3895 LIBS="-lhesiod $HESIOD_LIBS $LIBS"
3896 cat > conftest.$ac_ext <<EOF
3897 #line 3898 "configure"
3898 #include "confdefs.h"
3899 /* Override any gcc2 internal prototype to avoid an error.  */
3900 /* We use char because int might match the return type of a gcc2
3901     builtin and then its argument prototype would still apply.  */
3902 char hes_resolve();
3903
3904 int main() {
3905 hes_resolve()
3906 ; return 0; }
3907 EOF
3908 if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3909   rm -rf conftest*
3910   eval "ac_cv_lib_$ac_lib_var=yes"
3911 else
3912   echo "configure: failed program was:" >&5
3913   cat conftest.$ac_ext >&5
3914   rm -rf conftest*
3915   eval "ac_cv_lib_$ac_lib_var=no"
3916 fi
3917 rm -f conftest*
3918 LIBS="$ac_save_LIBS"
3919
3920 fi
3921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3922   echo "$ac_t""yes" 1>&6
3923   HESIOD_LIBS="$HESIOD_LIBS -lhesiod"
3924 else
3925   echo "$ac_t""no" 1>&6
3926 { echo "configure: error: Hesiod library not found" 1>&2; exit 1; }
3927 fi
3928
3929 fi
3930
3931 if test x"$with_krb4" != x -a x"$with_krb4" != x"no"; then
3932   if test x"$with_krb4" != x"yes"; then
3933     KRB4_INCLUDES="-I$with_krb4/include"
3934     if test -d "$with_krb4/include/kerberosIV"; then
3935       KRB4_INCLUDES="$KRB4_INCLUDES -I$with_krb4/include/kerberosIV"
3936     fi
3937     KRB4_LIBS="-L$with_krb4/lib"
3938   elif test -d /usr/include/kerberosIV; then
3939     KRB4_INCLUDES="-I/usr/include/kerberosIV"
3940   fi
3941   echo $ac_n "checking for krb_rd_req in -lkrb4""... $ac_c" 1>&6
3942 echo "configure:3943: checking for krb_rd_req in -lkrb4" >&5
3943 ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'`
3944 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3945   echo $ac_n "(cached) $ac_c" 1>&6
3946 else
3947   ac_save_LIBS="$LIBS"
3948 LIBS="-lkrb4 $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
3949 cat > conftest.$ac_ext <<EOF
3950 #line 3951 "configure"
3951 #include "confdefs.h"
3952 /* Override any gcc2 internal prototype to avoid an error.  */
3953 /* We use char because int might match the return type of a gcc2
3954     builtin and then its argument prototype would still apply.  */
3955 char krb_rd_req();
3956
3957 int main() {
3958 krb_rd_req()
3959 ; return 0; }
3960 EOF
3961 if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3962   rm -rf conftest*
3963   eval "ac_cv_lib_$ac_lib_var=yes"
3964 else
3965   echo "configure: failed program was:" >&5
3966   cat conftest.$ac_ext >&5
3967   rm -rf conftest*
3968   eval "ac_cv_lib_$ac_lib_var=no"
3969 fi
3970 rm -f conftest*
3971 LIBS="$ac_save_LIBS"
3972
3973 fi
3974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3975   echo "$ac_t""yes" 1>&6
3976   KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"
3977 else
3978   echo "$ac_t""no" 1>&6
3979 echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6
3980 echo "configure:3981: checking for krb_rd_req in -lkrb" >&5
3981 ac_lib_var=`echo krb'_'krb_rd_req | sed 'y%./+-%__p_%'`
3982 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3983   echo $ac_n "(cached) $ac_c" 1>&6
3984 else
3985   ac_save_LIBS="$LIBS"
3986 LIBS="-lkrb $KRB4_LIBS -ldes $LIBS"
3987 cat > conftest.$ac_ext <<EOF
3988 #line 3989 "configure"
3989 #include "confdefs.h"
3990 /* Override any gcc2 internal prototype to avoid an error.  */
3991 /* We use char because int might match the return type of a gcc2
3992     builtin and then its argument prototype would still apply.  */
3993 char krb_rd_req();
3994
3995 int main() {
3996 krb_rd_req()
3997 ; return 0; }
3998 EOF
3999 if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4000   rm -rf conftest*
4001   eval "ac_cv_lib_$ac_lib_var=yes"
4002 else
4003   echo "configure: failed program was:" >&5
4004   cat conftest.$ac_ext >&5
4005   rm -rf conftest*
4006   eval "ac_cv_lib_$ac_lib_var=no"
4007 fi
4008 rm -f conftest*
4009 LIBS="$ac_save_LIBS"
4010
4011 fi
4012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4013   echo "$ac_t""yes" 1>&6
4014   KRB4_LIBS="$KRB4_LIBS -lkrb -ldes"
4015 else
4016   echo "$ac_t""no" 1>&6
4017 { echo "configure: error: Kerberos 4 libraries not found" 1>&2; exit 1; }
4018 fi
4019
4020 fi
4021
4022 fi
4023
4024
4025 nmh_save_LIBS="$LIBS"
4026 LIBS="$TERMLIB $LIBS"
4027
4028 echo $ac_n "checking if an include file defines ospeed""... $ac_c" 1>&6
4029 echo "configure:4030: checking if an include file defines ospeed" >&5
4030 if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_include_defines'+set}'`\" = set"; then
4031   echo $ac_n "(cached) $ac_c" 1>&6
4032 else
4033   cat > conftest.$ac_ext <<EOF
4034 #line 4035 "configure"
4035 #include "confdefs.h"
4036 #include <sys/types.h>
4037 #if HAVE_TERMIOS_H
4038 #include <termios.h>
4039 #endif
4040 #if HAVE_TERMCAP_H
4041 #include <termcap.h>
4042 #endif
4043 int main() {
4044 ospeed = 0;
4045 ; return 0; }
4046 EOF
4047 if { (eval echo configure:4048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4048   rm -rf conftest*
4049   nmh_cv_decl_ospeed_include_defines=yes
4050 else
4051   echo "configure: failed program was:" >&5
4052   cat conftest.$ac_ext >&5
4053   rm -rf conftest*
4054   nmh_cv_decl_ospeed_include_defines=no
4055 fi
4056 rm -f conftest*
4057 fi
4058
4059 echo "$ac_t""$nmh_cv_decl_ospeed_include_defines" 1>&6
4060  
4061 if test $nmh_cv_decl_ospeed_include_defines = no; then
4062   echo $ac_n "checking if you must define ospeed""... $ac_c" 1>&6
4063 echo "configure:4064: checking if you must define ospeed" >&5
4064 if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_must_define'+set}'`\" = set"; then
4065   echo $ac_n "(cached) $ac_c" 1>&6
4066 else
4067   cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070
4071 int main() {
4072 extern short ospeed; ospeed = 0;
4073 ; return 0; }
4074 EOF
4075 if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4076   rm -rf conftest*
4077   nmh_cv_decl_ospeed_must_define=yes
4078 else
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -rf conftest*
4082   nmh_cv_decl_ospeed_must_define=no
4083 fi
4084 rm -f conftest*
4085 fi
4086
4087 echo "$ac_t""$nmh_cv_decl_ospeed_must_define" 1>&6
4088 fi
4089  
4090 if test $nmh_cv_decl_ospeed_include_defines = yes; then
4091   cat >> confdefs.h <<\EOF
4092 #define HAVE_OSPEED 1
4093 EOF
4094
4095 elif test $nmh_cv_decl_ospeed_must_define = yes; then
4096   cat >> confdefs.h <<\EOF
4097 #define HAVE_OSPEED 1
4098 EOF
4099
4100   cat >> confdefs.h <<\EOF
4101 #define MUST_DEFINE_OSPEED 1
4102 EOF
4103
4104 fi
4105
4106
4107 LIBS="$nmh_save_LIBS"
4108
4109 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4110 echo "configure:4111: checking return type of signal handlers" >&5
4111 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
4112   echo $ac_n "(cached) $ac_c" 1>&6
4113 else
4114   cat > conftest.$ac_ext <<EOF
4115 #line 4116 "configure"
4116 #include "confdefs.h"
4117 #include <sys/types.h>
4118 #include <signal.h>
4119 #ifdef signal
4120 #undef signal
4121 #endif
4122 #ifdef __cplusplus
4123 extern "C" void (*signal (int, void (*)(int)))(int);
4124 #else
4125 void (*signal ()) ();
4126 #endif
4127
4128 int main() {
4129 int i;
4130 ; return 0; }
4131 EOF
4132 if { (eval echo configure:4133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4133   rm -rf conftest*
4134   ac_cv_type_signal=void
4135 else
4136   echo "configure: failed program was:" >&5
4137   cat conftest.$ac_ext >&5
4138   rm -rf conftest*
4139   ac_cv_type_signal=int
4140 fi
4141 rm -f conftest*
4142 fi
4143
4144 echo "$ac_t""$ac_cv_type_signal" 1>&6
4145 cat >> confdefs.h <<EOF
4146 #define RETSIGTYPE $ac_cv_type_signal
4147 EOF
4148
4149
4150 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4151 echo "configure:4152: checking for pid_t" >&5
4152 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4153   echo $ac_n "(cached) $ac_c" 1>&6
4154 else
4155   cat > conftest.$ac_ext <<EOF
4156 #line 4157 "configure"
4157 #include "confdefs.h"
4158 #include <sys/types.h>
4159 #if STDC_HEADERS
4160 #include <stdlib.h>
4161 #include <stddef.h>
4162 #endif
4163 EOF
4164 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4165   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4166   rm -rf conftest*
4167   ac_cv_type_pid_t=yes
4168 else
4169   rm -rf conftest*
4170   ac_cv_type_pid_t=no
4171 fi
4172 rm -f conftest*
4173
4174 fi
4175 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4176 if test $ac_cv_type_pid_t = no; then
4177   cat >> confdefs.h <<\EOF
4178 #define pid_t int
4179 EOF
4180
4181 fi
4182
4183 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4184 echo "configure:4185: checking for off_t" >&5
4185 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4186   echo $ac_n "(cached) $ac_c" 1>&6
4187 else
4188   cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 #include <sys/types.h>
4192 #if STDC_HEADERS
4193 #include <stdlib.h>
4194 #include <stddef.h>
4195 #endif
4196 EOF
4197 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4198   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4199   rm -rf conftest*
4200   ac_cv_type_off_t=yes
4201 else
4202   rm -rf conftest*
4203   ac_cv_type_off_t=no
4204 fi
4205 rm -f conftest*
4206
4207 fi
4208 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4209 if test $ac_cv_type_off_t = no; then
4210   cat >> confdefs.h <<\EOF
4211 #define off_t long
4212 EOF
4213
4214 fi
4215
4216 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
4217 echo "configure:4218: checking for uid_t in sys/types.h" >&5
4218 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
4219   echo $ac_n "(cached) $ac_c" 1>&6
4220 else
4221   cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 #include <sys/types.h>
4225 EOF
4226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4227   egrep "uid_t" >/dev/null 2>&1; then
4228   rm -rf conftest*
4229   ac_cv_type_uid_t=yes
4230 else
4231   rm -rf conftest*
4232   ac_cv_type_uid_t=no
4233 fi
4234 rm -f conftest*
4235
4236 fi
4237
4238 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
4239 if test $ac_cv_type_uid_t = no; then
4240   cat >> confdefs.h <<\EOF
4241 #define uid_t int
4242 EOF
4243
4244   cat >> confdefs.h <<\EOF
4245 #define gid_t int
4246 EOF
4247
4248 fi
4249
4250 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4251 echo "configure:4252: checking for mode_t" >&5
4252 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
4253   echo $ac_n "(cached) $ac_c" 1>&6
4254 else
4255   cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 #include <sys/types.h>
4259 #if STDC_HEADERS
4260 #include <stdlib.h>
4261 #include <stddef.h>
4262 #endif
4263 EOF
4264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4265   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4266   rm -rf conftest*
4267   ac_cv_type_mode_t=yes
4268 else
4269   rm -rf conftest*
4270   ac_cv_type_mode_t=no
4271 fi
4272 rm -f conftest*
4273
4274 fi
4275 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4276 if test $ac_cv_type_mode_t = no; then
4277   cat >> confdefs.h <<\EOF
4278 #define mode_t int
4279 EOF
4280
4281 fi
4282
4283 echo $ac_n "checking for size_t""... $ac_c" 1>&6
4284 echo "configure:4285: checking for size_t" >&5
4285 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4286   echo $ac_n "(cached) $ac_c" 1>&6
4287 else
4288   cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 #include <sys/types.h>
4292 #if STDC_HEADERS
4293 #include <stdlib.h>
4294 #include <stddef.h>
4295 #endif
4296 EOF
4297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4298   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4299   rm -rf conftest*
4300   ac_cv_type_size_t=yes
4301 else
4302   rm -rf conftest*
4303   ac_cv_type_size_t=no
4304 fi
4305 rm -f conftest*
4306
4307 fi
4308 echo "$ac_t""$ac_cv_type_size_t" 1>&6
4309 if test $ac_cv_type_size_t = no; then
4310   cat >> confdefs.h <<\EOF
4311 #define size_t unsigned
4312 EOF
4313
4314 fi
4315
4316
4317 echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
4318 echo "configure:4319: checking for sigset_t" >&5
4319 if eval "test \"`echo '$''{'nmh_cv_type_sigset_t'+set}'`\" = set"; then
4320   echo $ac_n "(cached) $ac_c" 1>&6
4321 else
4322   cat > conftest.$ac_ext <<EOF
4323 #line 4324 "configure"
4324 #include "confdefs.h"
4325 #include <sys/types.h>
4326 #include <signal.h>
4327 int main() {
4328 sigset_t tempsigset;
4329 ; return 0; }
4330 EOF
4331 if { (eval echo configure:4332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4332   rm -rf conftest*
4333   nmh_cv_type_sigset_t=yes
4334 else
4335   echo "configure: failed program was:" >&5
4336   cat conftest.$ac_ext >&5
4337   rm -rf conftest*
4338   nmh_cv_type_sigset_t=no
4339 fi
4340 rm -f conftest*
4341 fi
4342
4343 echo "$ac_t""$nmh_cv_type_sigset_t" 1>&6
4344 if test $nmh_cv_type_sigset_t = no; then
4345   cat >> confdefs.h <<\EOF
4346 #define sigset_t unsigned int
4347 EOF
4348
4349 fi
4350
4351 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
4352 echo "configure:4353: checking for st_blksize in struct stat" >&5
4353 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
4354   echo $ac_n "(cached) $ac_c" 1>&6
4355 else
4356   cat > conftest.$ac_ext <<EOF
4357 #line 4358 "configure"
4358 #include "confdefs.h"
4359 #include <sys/types.h>
4360 #include <sys/stat.h>
4361 int main() {
4362 struct stat s; s.st_blksize;
4363 ; return 0; }
4364 EOF
4365 if { (eval echo configure:4366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4366   rm -rf conftest*
4367   ac_cv_struct_st_blksize=yes
4368 else
4369   echo "configure: failed program was:" >&5
4370   cat conftest.$ac_ext >&5
4371   rm -rf conftest*
4372   ac_cv_struct_st_blksize=no
4373 fi
4374 rm -f conftest*
4375 fi
4376
4377 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
4378 if test $ac_cv_struct_st_blksize = yes; then
4379   cat >> confdefs.h <<\EOF
4380 #define HAVE_ST_BLKSIZE 1
4381 EOF
4382
4383 fi
4384
4385
4386 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
4387 echo "configure:4388: checking for tm_gmtoff in struct tm" >&5
4388 if eval "test \"`echo '$''{'nmh_cv_struct_tm_gmtoff'+set}'`\" = set"; then
4389   echo $ac_n "(cached) $ac_c" 1>&6
4390 else
4391   cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394 #ifdef TIME_WITH_SYS_TIME
4395 # include <sys/time.h>
4396 # include <time.h>
4397 #else
4398 # ifdef TM_IN_SYS_TIME
4399 #  include <sys/time.h>
4400 # else
4401 #  include <time.h>
4402 # endif
4403 #endif
4404 int main() {
4405 struct tm temptm; temptm.tm_gmtoff = 0;
4406 ; return 0; }
4407 EOF
4408 if { (eval echo configure:4409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4409   rm -rf conftest*
4410   nmh_cv_struct_tm_gmtoff=yes
4411 else
4412   echo "configure: failed program was:" >&5
4413   cat conftest.$ac_ext >&5
4414   rm -rf conftest*
4415   nmh_cv_struct_tm_gmtoff=no
4416 fi
4417 rm -f conftest*
4418 fi
4419
4420 echo "$ac_t""$nmh_cv_struct_tm_gmtoff" 1>&6
4421 if test $nmh_cv_struct_tm_gmtoff = yes; then
4422   cat >> confdefs.h <<\EOF
4423 #define HAVE_TM_GMTOFF 1
4424 EOF
4425
4426 fi
4427
4428 echo $ac_n "checking what style of signals to use""... $ac_c" 1>&6
4429 echo "configure:4430: checking what style of signals to use" >&5
4430 if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then
4431   signals_style=POSIX_SIGNALS
4432   cat >> confdefs.h <<\EOF
4433 #define POSIX_SIGNALS 1
4434 EOF
4435
4436   cat >> confdefs.h <<\EOF
4437 #define RELIABLE_SIGNALS 1
4438 EOF
4439
4440 elif test $ac_cv_func_sigblock = yes -a $ac_cv_func_sigsetmask = yes; then
4441   signals_style=BSD_SIGNALS
4442   cat >> confdefs.h <<\EOF
4443 #define BSD_SIGNALS 1
4444 EOF
4445
4446   cat >> confdefs.h <<\EOF
4447 #define RELIABLE_SIGNALS 1
4448 EOF
4449
4450 elif test $ac_cv_func_sighold = yes -a $ac_cv_func_sigrelse = yes; then
4451   signals_style=SYSV_SIGNALS
4452   cat >> confdefs.h <<\EOF
4453 #define SYSV_SIGNALS 1
4454 EOF
4455
4456 else
4457   signals_style=NO_SIGNAL_BLOCKING
4458   cat >> confdefs.h <<\EOF
4459 #define NO_SIGNAL_BLOCKING 1
4460 EOF
4461
4462 fi
4463
4464 echo "$ac_t""$signals_style" 1>&6
4465
4466 echo $ac_n "checking where signal.h is located""... $ac_c" 1>&6
4467 echo "configure:4468: checking where signal.h is located" >&5
4468 if eval "test \"`echo '$''{'nmh_cv_path_signal_h'+set}'`\" = set"; then
4469   echo $ac_n "(cached) $ac_c" 1>&6
4470 else
4471   for SIGNAL_H in /usr/include/bsd/sys/signal.h                   /usr/include/asm/signal.h                       /usr/include/asm/signum.h                       /usr/include/linux/signal.h                     /usr/include/sys/signal.h                       /dev/null;                     do
4472   test -f $SIGNAL_H && \
4473   grep '#[      ]*define[       ][      ]*SIG[0-9A-Z]*[         ]*[0-9][0-9]*' $SIGNAL_H > /dev/null && \
4474   break
4475 done
4476 nmh_cv_path_signal_h=$SIGNAL_H
4477
4478 fi
4479
4480 echo "$ac_t""$nmh_cv_path_signal_h" 1>&6
4481 SIGNAL_H=$nmh_cv_path_signal_h
4482
4483 case "$target_os" in
4484
4485   solaris2*)
4486     cat >> confdefs.h <<\EOF
4487 #define SYS5 1
4488 EOF
4489
4490     cat >> confdefs.h <<\EOF
4491 #define SVR4 1
4492 EOF
4493
4494     ;;
4495   irix*)
4496     cat >> confdefs.h <<\EOF
4497 #define SYS5 1
4498 EOF
4499
4500     cat >> confdefs.h <<\EOF
4501 #define SVR4 1
4502 EOF
4503
4504     ;;
4505   osf*)
4506     cat >> confdefs.h <<\EOF
4507 #define SYS5 1
4508 EOF
4509
4510     cat >> confdefs.h <<\EOF
4511 #define SVR4 1
4512 EOF
4513
4514     ;;
4515   aix*)
4516     cat >> confdefs.h <<\EOF
4517 #define SYS5 1
4518 EOF
4519
4520     cat >> confdefs.h <<\EOF
4521 #define SVR4 1
4522 EOF
4523
4524     ;;
4525   sunos4*)
4526     cat >> confdefs.h <<\EOF
4527 #define BSD42 1
4528 EOF
4529
4530     ;;
4531   freebsd*)  
4532     cat >> confdefs.h <<\EOF
4533 #define BSD42 1
4534 EOF
4535
4536     cat >> confdefs.h <<\EOF
4537 #define BSD44 1
4538 EOF
4539
4540     ;;
4541   netbsd*)
4542     cat >> confdefs.h <<\EOF
4543 #define BSD42 1
4544 EOF
4545
4546     cat >> confdefs.h <<\EOF
4547 #define BSD44 1
4548 EOF
4549
4550     ;;
4551   openbsd*)
4552     cat >> confdefs.h <<\EOF
4553 #define BSD42 1
4554 EOF
4555
4556     cat >> confdefs.h <<\EOF
4557 #define BSD44 1
4558 EOF
4559
4560     ;;
4561   bsd/os*)
4562     cat >> confdefs.h <<\EOF
4563 #define BSD42 1
4564 EOF
4565
4566     cat >> confdefs.h <<\EOF
4567 #define BSD44 1
4568 EOF
4569
4570     ;;
4571   sco5*)
4572     cat >> confdefs.h <<\EOF
4573 #define SYS5 1
4574 EOF
4575
4576     cat >> confdefs.h <<\EOF
4577 #define SCO_5_STDIO 1
4578 EOF
4579
4580     ;;
4581 esac
4582
4583
4584 trap '' 1 2 15
4585 cat > confcache <<\EOF
4586 # This file is a shell script that caches the results of configure
4587 # tests run on this system so they can be shared between configure
4588 # scripts and configure runs.  It is not useful on other systems.
4589 # If it contains results you don't want to keep, you may remove or edit it.
4590 #
4591 # By default, configure uses ./config.cache as the cache file,
4592 # creating it if it does not exist already.  You can give configure
4593 # the --cache-file=FILE option to use a different cache file; that is
4594 # what configure does when it calls configure scripts in
4595 # subdirectories, so they share the cache.
4596 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4597 # config.status only pays attention to the cache file if you give it the
4598 # --recheck option to rerun configure.
4599 #
4600 EOF
4601 # The following way of writing the cache mishandles newlines in values,
4602 # but we know of no workaround that is simple, portable, and efficient.
4603 # So, don't put newlines in cache variables' values.
4604 # Ultrix sh set writes to stderr and can't be redirected directly,
4605 # and sets the high bit in the cache file unless we assign to the vars.
4606 (set) 2>&1 |
4607   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4608   *ac_space=\ *)
4609     # `set' does not quote correctly, so add quotes (double-quote substitution
4610     # turns \\\\ into \\, and sed turns \\ into \).
4611     sed -n \
4612       -e "s/'/'\\\\''/g" \
4613       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4614     ;;
4615   *)
4616     # `set' quotes correctly as required by POSIX, so do not add quotes.
4617     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4618     ;;
4619   esac >> confcache
4620 if cmp -s $cache_file confcache; then
4621   :
4622 else
4623   if test -w $cache_file; then
4624     echo "updating cache $cache_file"
4625     cat confcache > $cache_file
4626   else
4627     echo "not updating unwritable cache $cache_file"
4628   fi
4629 fi
4630 rm -f confcache
4631
4632 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4633
4634 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4635 # Let make expand exec_prefix.
4636 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4637
4638 # Any assignment to VPATH causes Sun make to only execute
4639 # the first set of double-colon rules, so remove it if not needed.
4640 # If there is a colon in the path, we need to keep it.
4641 if test "x$srcdir" = x.; then
4642   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4643 fi
4644
4645 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4646
4647 DEFS=-DHAVE_CONFIG_H
4648
4649 # Without the "./", some shells look in PATH for config.status.
4650 : ${CONFIG_STATUS=./config.status}
4651
4652 echo creating $CONFIG_STATUS
4653 rm -f $CONFIG_STATUS
4654 cat > $CONFIG_STATUS <<EOF
4655 #! /bin/sh
4656 # Generated automatically by configure.
4657 # Run this file to recreate the current configuration.
4658 # This directory was configured as follows,
4659 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4660 #
4661 # $0 $ac_configure_args
4662 #
4663 # Compiler output produced by configure, useful for debugging
4664 # configure, is in ./config.log if it exists.
4665
4666 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4667 for ac_option
4668 do
4669   case "\$ac_option" in
4670   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4671     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4672     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4673   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4674     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4675     exit 0 ;;
4676   -help | --help | --hel | --he | --h)
4677     echo "\$ac_cs_usage"; exit 0 ;;
4678   *) echo "\$ac_cs_usage"; exit 1 ;;
4679   esac
4680 done
4681
4682 ac_given_srcdir=$srcdir
4683 ac_given_INSTALL="$INSTALL"
4684
4685 trap 'rm -fr `echo "Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
4686           zotnet/Makefile zotnet/mts/Makefile \
4687           mts/Makefile mts/smtp/Makefile \
4688           mts/sendmail/Makefile mts/mmdf/Makefile etc/Makefile \
4689           docs/Makefile man/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4690 EOF
4691 cat >> $CONFIG_STATUS <<EOF
4692
4693 # Protect against being on the right side of a sed subst in config.status.
4694 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4695  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4696 $ac_vpsub
4697 $extrasub
4698 s%@SHELL@%$SHELL%g
4699 s%@CFLAGS@%$CFLAGS%g
4700 s%@CPPFLAGS@%$CPPFLAGS%g
4701 s%@CXXFLAGS@%$CXXFLAGS%g
4702 s%@FFLAGS@%$FFLAGS%g
4703 s%@DEFS@%$DEFS%g
4704 s%@LDFLAGS@%$LDFLAGS%g
4705 s%@LIBS@%$LIBS%g
4706 s%@exec_prefix@%$exec_prefix%g
4707 s%@prefix@%$prefix%g
4708 s%@program_transform_name@%$program_transform_name%g
4709 s%@bindir@%$bindir%g
4710 s%@sbindir@%$sbindir%g
4711 s%@libexecdir@%$libexecdir%g
4712 s%@datadir@%$datadir%g
4713 s%@sysconfdir@%$sysconfdir%g
4714 s%@sharedstatedir@%$sharedstatedir%g
4715 s%@localstatedir@%$localstatedir%g
4716 s%@libdir@%$libdir%g
4717 s%@includedir@%$includedir%g
4718 s%@oldincludedir@%$oldincludedir%g
4719 s%@infodir@%$infodir%g
4720 s%@mandir@%$mandir%g
4721 s%@host@%$host%g
4722 s%@host_alias@%$host_alias%g
4723 s%@host_cpu@%$host_cpu%g
4724 s%@host_vendor@%$host_vendor%g
4725 s%@host_os@%$host_os%g
4726 s%@target@%$target%g
4727 s%@target_alias@%$target_alias%g
4728 s%@target_cpu@%$target_cpu%g
4729 s%@target_vendor@%$target_vendor%g
4730 s%@target_os@%$target_os%g
4731 s%@build@%$build%g
4732 s%@build_alias@%$build_alias%g
4733 s%@build_cpu@%$build_cpu%g
4734 s%@build_vendor@%$build_vendor%g
4735 s%@build_os@%$build_os%g
4736 s%@VERSION@%$VERSION%g
4737 s%@APOPLIB@%$APOPLIB%g
4738 s%@masquerade@%$masquerade%g
4739 s%@POPLIB@%$POPLIB%g
4740 s%@POPSED@%$POPSED%g
4741 s%@MTS@%$MTS%g
4742 s%@smtpservers@%$smtpservers%g
4743 s%@CC@%$CC%g
4744 s%@SET_MAKE@%$SET_MAKE%g
4745 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4746 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4747 s%@INSTALL_DATA@%$INSTALL_DATA%g
4748 s%@RANLIB@%$RANLIB%g
4749 s%@AWK@%$AWK%g
4750 s%@LEX@%$LEX%g
4751 s%@LEXLIB@%$LEXLIB%g
4752 s%@cutpath@%$cutpath%g
4753 s%@linttmp1@%$linttmp1%g
4754 s%@linttmp2@%$linttmp2%g
4755 s%@LINT@%$LINT%g
4756 s%@LINTFLAGS@%$LINTFLAGS%g
4757 s%@LIBTOOL@%$LIBTOOL%g
4758 s%@GNU_LIBTOOL@%$GNU_LIBTOOL%g
4759 s%@LORDER@%$LORDER%g
4760 s%@TSORT@%$TSORT%g
4761 s%@lspath@%$lspath%g
4762 s%@morepath@%$morepath%g
4763 s%@pagerpath@%$pagerpath%g
4764 s%@sendmailpath@%$sendmailpath%g
4765 s%@vipath@%$vipath%g
4766 s%@editorpath@%$editorpath%g
4767 s%@mailspool@%$mailspool%g
4768 s%@CPP@%$CPP%g
4769 s%@dotlockfilepath@%$dotlockfilepath%g
4770 s%@SETGID_MAIL@%$SETGID_MAIL%g
4771 s%@MAIL_SPOOL_GRP@%$MAIL_SPOOL_GRP%g
4772 s%@LIBOBJS@%$LIBOBJS%g
4773 s%@TERMLIB@%$TERMLIB%g
4774 s%@HESIOD_INCLUDES@%$HESIOD_INCLUDES%g
4775 s%@HESIOD_LIBS@%$HESIOD_LIBS%g
4776 s%@KRB4_INCLUDES@%$KRB4_INCLUDES%g
4777 s%@KRB4_LIBS@%$KRB4_LIBS%g
4778 s%@SIGNAL_H@%$SIGNAL_H%g
4779
4780 CEOF
4781 EOF
4782
4783 cat >> $CONFIG_STATUS <<\EOF
4784
4785 # Split the substitutions into bite-sized pieces for seds with
4786 # small command number limits, like on Digital OSF/1 and HP-UX.
4787 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4788 ac_file=1 # Number of current file.
4789 ac_beg=1 # First line for current file.
4790 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4791 ac_more_lines=:
4792 ac_sed_cmds=""
4793 while $ac_more_lines; do
4794   if test $ac_beg -gt 1; then
4795     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4796   else
4797     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4798   fi
4799   if test ! -s conftest.s$ac_file; then
4800     ac_more_lines=false
4801     rm -f conftest.s$ac_file
4802   else
4803     if test -z "$ac_sed_cmds"; then
4804       ac_sed_cmds="sed -f conftest.s$ac_file"
4805     else
4806       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4807     fi
4808     ac_file=`expr $ac_file + 1`
4809     ac_beg=$ac_end
4810     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4811   fi
4812 done
4813 if test -z "$ac_sed_cmds"; then
4814   ac_sed_cmds=cat
4815 fi
4816 EOF
4817
4818 cat >> $CONFIG_STATUS <<EOF
4819
4820 CONFIG_FILES=\${CONFIG_FILES-"Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
4821           zotnet/Makefile zotnet/mts/Makefile \
4822           mts/Makefile mts/smtp/Makefile \
4823           mts/sendmail/Makefile mts/mmdf/Makefile etc/Makefile \
4824           docs/Makefile man/Makefile"}
4825 EOF
4826 cat >> $CONFIG_STATUS <<\EOF
4827 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4828   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4829   case "$ac_file" in
4830   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4831        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4832   *) ac_file_in="${ac_file}.in" ;;
4833   esac
4834
4835   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4836
4837   # Remove last slash and all that follows it.  Not all systems have dirname.
4838   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4839   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4840     # The file is in a subdirectory.
4841     test ! -d "$ac_dir" && mkdir "$ac_dir"
4842     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4843     # A "../" for each directory in $ac_dir_suffix.
4844     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4845   else
4846     ac_dir_suffix= ac_dots=
4847   fi
4848
4849   case "$ac_given_srcdir" in
4850   .)  srcdir=.
4851       if test -z "$ac_dots"; then top_srcdir=.
4852       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4853   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4854   *) # Relative path.
4855     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4856     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4857   esac
4858
4859   case "$ac_given_INSTALL" in
4860   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4861   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4862   esac
4863
4864   echo creating "$ac_file"
4865   rm -f "$ac_file"
4866   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4867   case "$ac_file" in
4868   *Makefile*) ac_comsub="1i\\
4869 # $configure_input" ;;
4870   *) ac_comsub= ;;
4871   esac
4872
4873   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4874   sed -e "$ac_comsub
4875 s%@configure_input@%$configure_input%g
4876 s%@srcdir@%$srcdir%g
4877 s%@top_srcdir@%$top_srcdir%g
4878 s%@INSTALL@%$INSTALL%g
4879 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4880 fi; done
4881 rm -f conftest.s*
4882
4883 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4884 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4885 #
4886 # ac_d sets the value in "#define NAME VALUE" lines.
4887 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4888 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4889 ac_dC='\3'
4890 ac_dD='%g'
4891 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4892 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4893 ac_uB='\([      ]\)%\1#\2define\3'
4894 ac_uC=' '
4895 ac_uD='\4%g'
4896 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4897 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4898 ac_eB='$%\1#\2define\3'
4899 ac_eC=' '
4900 ac_eD='%g'
4901
4902 if test "${CONFIG_HEADERS+set}" != set; then
4903 EOF
4904 cat >> $CONFIG_STATUS <<EOF
4905   CONFIG_HEADERS="config.h"
4906 EOF
4907 cat >> $CONFIG_STATUS <<\EOF
4908 fi
4909 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4910   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4911   case "$ac_file" in
4912   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4913        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4914   *) ac_file_in="${ac_file}.in" ;;
4915   esac
4916
4917   echo creating $ac_file
4918
4919   rm -f conftest.frag conftest.in conftest.out
4920   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4921   cat $ac_file_inputs > conftest.in
4922
4923 EOF
4924
4925 # Transform confdefs.h into a sed script conftest.vals that substitutes
4926 # the proper values into config.h.in to produce config.h.  And first:
4927 # Protect against being on the right side of a sed subst in config.status.
4928 # Protect against being in an unquoted here document in config.status.
4929 rm -f conftest.vals
4930 cat > conftest.hdr <<\EOF
4931 s/[\\&%]/\\&/g
4932 s%[\\$`]%\\&%g
4933 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4934 s%ac_d%ac_u%gp
4935 s%ac_u%ac_e%gp
4936 EOF
4937 sed -n -f conftest.hdr confdefs.h > conftest.vals
4938 rm -f conftest.hdr
4939
4940 # This sed command replaces #undef with comments.  This is necessary, for
4941 # example, in the case of _POSIX_SOURCE, which is predefined and required
4942 # on some systems where configure will not decide to define it.
4943 cat >> conftest.vals <<\EOF
4944 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4945 EOF
4946
4947 # Break up conftest.vals because some shells have a limit on
4948 # the size of here documents, and old seds have small limits too.
4949
4950 rm -f conftest.tail
4951 while :
4952 do
4953   ac_lines=`grep -c . conftest.vals`
4954   # grep -c gives empty output for an empty file on some AIX systems.
4955   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4956   # Write a limited-size here document to conftest.frag.
4957   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4958   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4959   echo 'CEOF
4960   sed -f conftest.frag conftest.in > conftest.out
4961   rm -f conftest.in
4962   mv conftest.out conftest.in
4963 ' >> $CONFIG_STATUS
4964   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4965   rm -f conftest.vals
4966   mv conftest.tail conftest.vals
4967 done
4968 rm -f conftest.vals
4969
4970 cat >> $CONFIG_STATUS <<\EOF
4971   rm -f conftest.frag conftest.h
4972   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4973   cat conftest.in >> conftest.h
4974   rm -f conftest.in
4975   if cmp -s $ac_file conftest.h 2>/dev/null; then
4976     echo "$ac_file is unchanged"
4977     rm -f conftest.h
4978   else
4979     # Remove last slash and all that follows it.  Not all systems have dirname.
4980       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4981       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4982       # The file is in a subdirectory.
4983       test ! -d "$ac_dir" && mkdir "$ac_dir"
4984     fi
4985     rm -f $ac_file
4986     mv conftest.h $ac_file
4987   fi
4988 fi; done
4989
4990 EOF
4991 cat >> $CONFIG_STATUS <<EOF
4992
4993 EOF
4994 cat >> $CONFIG_STATUS <<\EOF
4995 \
4996           test -z "$CONFIG_HEADERS" || echo > stamp-h
4997 exit 0
4998 EOF
4999 chmod +x $CONFIG_STATUS
5000 rm -fr confdefs* $ac_clean_files
5001 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5002
5003
5004 eval "nmhbin=${bindir}";         eval "nmhbin2=${nmhbin}"
5005 eval "nmhsysconf=${sysconfdir}"; eval "nmhsysconf2=${nmhsysconf}"
5006 eval "nmhlib=${libdir}";         eval "nmhlib2=${nmhlib}"
5007 eval "nmhman=${mandir}"
5008
5009 pop_kinds=no
5010 if test x"$enable_pop" = x"yes"; then
5011   pop_kinds="yes ("
5012
5013   if test x"$enable_apop" = x"yes"; then
5014     pop_kinds="${pop_kinds}APOP "
5015   fi
5016
5017   if test x"$with_krb4" != x -a x"$with_krb4" != x"no"; then
5018     pop_kinds="${pop_kinds}KPOP "
5019   fi
5020
5021   pop_kinds="${pop_kinds}POP3)"
5022 fi
5023
5024 echo "
5025 nmh configuration
5026 -----------------
5027 nmh version                : ${VERSION}
5028 target os                  : ${target}
5029 compiler                   : ${CC}
5030 compiler flags             : ${CFLAGS}
5031 linker flags               : ${LDFLAGS}
5032 source code location       : ${srcdir}
5033 binary install path        : ${nmhbin2}
5034 libary install path        : ${nmhlib2}
5035 config files install path  : ${nmhsysconf2}
5036 man page install path      : ${nmhman}
5037 transport system           : ${MTS}
5038 default smtp servers       : ${smtpservers}
5039 default editor             : ${editorpath}
5040 default pager              : ${pagerpath}
5041 email address masquerading : ${masquerade}
5042 pop is enabled             : ${pop_kinds}"
5043 echo ""
5044
5045
5046