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