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