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