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