fixed test in Makefiles for LIBTOOL for the case where it doesn't exist
[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
1700   SETGID_MAIL=1
1701 fi
1702
1703 echo $ac_n "checking what group owns the mail spool""... $ac_c" 1>&6
1704 echo "configure:1705: checking what group owns the mail spool" >&5
1705 if eval "test \"`echo '$''{'nmh_cv_ls_mail_grp'+set}'`\" = set"; then
1706   echo $ac_n "(cached) $ac_c" 1>&6
1707 else
1708   nmh_cv_ls_mail_grp=`$lspath -dL $nmh_cv_ls_grpopt $mailspool|$AWK '{print $4}'`
1709    if test x$nmh_cv_ls_mail_grp = xmail; then
1710    MAIL_SPOOL_GRP="mail"
1711  elif test x$nmh_cv_ls_mail_grp = xwheel; then
1712    MAIL_SPOOL_GRP="wheel"
1713  else
1714    MAIL_SPOOL_GRP="'0'"
1715  fi
1716 fi
1717
1718 echo "$ac_t""$nmh_cv_ls_mail_grp" 1>&6
1719
1720 ac_header_dirent=no
1721 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1722 do
1723 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1724 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1725 echo "configure:1726: checking for $ac_hdr that defines DIR" >&5
1726 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1727   echo $ac_n "(cached) $ac_c" 1>&6
1728 else
1729   cat > conftest.$ac_ext <<EOF
1730 #line 1731 "configure"
1731 #include "confdefs.h"
1732 #include <sys/types.h>
1733 #include <$ac_hdr>
1734 int main() {
1735 DIR *dirp = 0;
1736 ; return 0; }
1737 EOF
1738 if { (eval echo configure:1739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1739   rm -rf conftest*
1740   eval "ac_cv_header_dirent_$ac_safe=yes"
1741 else
1742   echo "configure: failed program was:" >&5
1743   cat conftest.$ac_ext >&5
1744   rm -rf conftest*
1745   eval "ac_cv_header_dirent_$ac_safe=no"
1746 fi
1747 rm -f conftest*
1748 fi
1749 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1750   echo "$ac_t""yes" 1>&6
1751     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1752   cat >> confdefs.h <<EOF
1753 #define $ac_tr_hdr 1
1754 EOF
1755  ac_header_dirent=$ac_hdr; break
1756 else
1757   echo "$ac_t""no" 1>&6
1758 fi
1759 done
1760 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1761 if test $ac_header_dirent = dirent.h; then
1762 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1763 echo "configure:1764: checking for opendir in -ldir" >&5
1764 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1765 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1766   echo $ac_n "(cached) $ac_c" 1>&6
1767 else
1768   ac_save_LIBS="$LIBS"
1769 LIBS="-ldir  $LIBS"
1770 cat > conftest.$ac_ext <<EOF
1771 #line 1772 "configure"
1772 #include "confdefs.h"
1773 /* Override any gcc2 internal prototype to avoid an error.  */
1774 /* We use char because int might match the return type of a gcc2
1775     builtin and then its argument prototype would still apply.  */
1776 char opendir();
1777
1778 int main() {
1779 opendir()
1780 ; return 0; }
1781 EOF
1782 if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1783   rm -rf conftest*
1784   eval "ac_cv_lib_$ac_lib_var=yes"
1785 else
1786   echo "configure: failed program was:" >&5
1787   cat conftest.$ac_ext >&5
1788   rm -rf conftest*
1789   eval "ac_cv_lib_$ac_lib_var=no"
1790 fi
1791 rm -f conftest*
1792 LIBS="$ac_save_LIBS"
1793
1794 fi
1795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1796   echo "$ac_t""yes" 1>&6
1797   LIBS="$LIBS -ldir"
1798 else
1799   echo "$ac_t""no" 1>&6
1800 fi
1801
1802 else
1803 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1804 echo "configure:1805: checking for opendir in -lx" >&5
1805 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1806 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1807   echo $ac_n "(cached) $ac_c" 1>&6
1808 else
1809   ac_save_LIBS="$LIBS"
1810 LIBS="-lx  $LIBS"
1811 cat > conftest.$ac_ext <<EOF
1812 #line 1813 "configure"
1813 #include "confdefs.h"
1814 /* Override any gcc2 internal prototype to avoid an error.  */
1815 /* We use char because int might match the return type of a gcc2
1816     builtin and then its argument prototype would still apply.  */
1817 char opendir();
1818
1819 int main() {
1820 opendir()
1821 ; return 0; }
1822 EOF
1823 if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1824   rm -rf conftest*
1825   eval "ac_cv_lib_$ac_lib_var=yes"
1826 else
1827   echo "configure: failed program was:" >&5
1828   cat conftest.$ac_ext >&5
1829   rm -rf conftest*
1830   eval "ac_cv_lib_$ac_lib_var=no"
1831 fi
1832 rm -f conftest*
1833 LIBS="$ac_save_LIBS"
1834
1835 fi
1836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1837   echo "$ac_t""yes" 1>&6
1838   LIBS="$LIBS -lx"
1839 else
1840   echo "$ac_t""no" 1>&6
1841 fi
1842
1843 fi
1844
1845 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1846 echo "configure:1847: checking how to run the C preprocessor" >&5
1847 # On Suns, sometimes $CPP names a directory.
1848 if test -n "$CPP" && test -d "$CPP"; then
1849   CPP=
1850 fi
1851 if test -z "$CPP"; then
1852 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1853   echo $ac_n "(cached) $ac_c" 1>&6
1854 else
1855     # This must be in double quotes, not single quotes, because CPP may get
1856   # substituted into the Makefile and "${CC-cc}" will confuse make.
1857   CPP="${CC-cc} -E"
1858   # On the NeXT, cc -E runs the code through the compiler's parser,
1859   # not just through cpp.
1860   cat > conftest.$ac_ext <<EOF
1861 #line 1862 "configure"
1862 #include "confdefs.h"
1863 #include <assert.h>
1864 Syntax Error
1865 EOF
1866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1867 { (eval echo configure:1868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1869 if test -z "$ac_err"; then
1870   :
1871 else
1872   echo "$ac_err" >&5
1873   echo "configure: failed program was:" >&5
1874   cat conftest.$ac_ext >&5
1875   rm -rf conftest*
1876   CPP="${CC-cc} -E -traditional-cpp"
1877   cat > conftest.$ac_ext <<EOF
1878 #line 1879 "configure"
1879 #include "confdefs.h"
1880 #include <assert.h>
1881 Syntax Error
1882 EOF
1883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1884 { (eval echo configure:1885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1886 if test -z "$ac_err"; then
1887   :
1888 else
1889   echo "$ac_err" >&5
1890   echo "configure: failed program was:" >&5
1891   cat conftest.$ac_ext >&5
1892   rm -rf conftest*
1893   CPP="${CC-cc} -nologo -E"
1894   cat > conftest.$ac_ext <<EOF
1895 #line 1896 "configure"
1896 #include "confdefs.h"
1897 #include <assert.h>
1898 Syntax Error
1899 EOF
1900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1901 { (eval echo configure:1902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1903 if test -z "$ac_err"; then
1904   :
1905 else
1906   echo "$ac_err" >&5
1907   echo "configure: failed program was:" >&5
1908   cat conftest.$ac_ext >&5
1909   rm -rf conftest*
1910   CPP=/lib/cpp
1911 fi
1912 rm -f conftest*
1913 fi
1914 rm -f conftest*
1915 fi
1916 rm -f conftest*
1917   ac_cv_prog_CPP="$CPP"
1918 fi
1919   CPP="$ac_cv_prog_CPP"
1920 else
1921   ac_cv_prog_CPP="$CPP"
1922 fi
1923 echo "$ac_t""$CPP" 1>&6
1924
1925 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1926 echo "configure:1927: checking for ANSI C header files" >&5
1927 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1928   echo $ac_n "(cached) $ac_c" 1>&6
1929 else
1930   cat > conftest.$ac_ext <<EOF
1931 #line 1932 "configure"
1932 #include "confdefs.h"
1933 #include <stdlib.h>
1934 #include <stdarg.h>
1935 #include <string.h>
1936 #include <float.h>
1937 EOF
1938 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1939 { (eval echo configure:1940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1940 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1941 if test -z "$ac_err"; then
1942   rm -rf conftest*
1943   ac_cv_header_stdc=yes
1944 else
1945   echo "$ac_err" >&5
1946   echo "configure: failed program was:" >&5
1947   cat conftest.$ac_ext >&5
1948   rm -rf conftest*
1949   ac_cv_header_stdc=no
1950 fi
1951 rm -f conftest*
1952
1953 if test $ac_cv_header_stdc = yes; then
1954   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1955 cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1958 #include <string.h>
1959 EOF
1960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1961   egrep "memchr" >/dev/null 2>&1; then
1962   :
1963 else
1964   rm -rf conftest*
1965   ac_cv_header_stdc=no
1966 fi
1967 rm -f conftest*
1968
1969 fi
1970
1971 if test $ac_cv_header_stdc = yes; then
1972   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1973 cat > conftest.$ac_ext <<EOF
1974 #line 1975 "configure"
1975 #include "confdefs.h"
1976 #include <stdlib.h>
1977 EOF
1978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1979   egrep "free" >/dev/null 2>&1; then
1980   :
1981 else
1982   rm -rf conftest*
1983   ac_cv_header_stdc=no
1984 fi
1985 rm -f conftest*
1986
1987 fi
1988
1989 if test $ac_cv_header_stdc = yes; then
1990   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1991 if test "$cross_compiling" = yes; then
1992   :
1993 else
1994   cat > conftest.$ac_ext <<EOF
1995 #line 1996 "configure"
1996 #include "confdefs.h"
1997 #include <ctype.h>
1998 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1999 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2000 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2001 int main () { int i; for (i = 0; i < 256; i++)
2002 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2003 exit (0); }
2004
2005 EOF
2006 if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2007 then
2008   :
2009 else
2010   echo "configure: failed program was:" >&5
2011   cat conftest.$ac_ext >&5
2012   rm -fr conftest*
2013   ac_cv_header_stdc=no
2014 fi
2015 rm -fr conftest*
2016 fi
2017
2018 fi
2019 fi
2020
2021 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2022 if test $ac_cv_header_stdc = yes; then
2023   cat >> confdefs.h <<\EOF
2024 #define STDC_HEADERS 1
2025 EOF
2026
2027 fi
2028
2029 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2030 echo "configure:2031: checking whether time.h and sys/time.h may both be included" >&5
2031 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2032   echo $ac_n "(cached) $ac_c" 1>&6
2033 else
2034   cat > conftest.$ac_ext <<EOF
2035 #line 2036 "configure"
2036 #include "confdefs.h"
2037 #include <sys/types.h>
2038 #include <sys/time.h>
2039 #include <time.h>
2040 int main() {
2041 struct tm *tp;
2042 ; return 0; }
2043 EOF
2044 if { (eval echo configure:2045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2045   rm -rf conftest*
2046   ac_cv_header_time=yes
2047 else
2048   echo "configure: failed program was:" >&5
2049   cat conftest.$ac_ext >&5
2050   rm -rf conftest*
2051   ac_cv_header_time=no
2052 fi
2053 rm -f conftest*
2054 fi
2055
2056 echo "$ac_t""$ac_cv_header_time" 1>&6
2057 if test $ac_cv_header_time = yes; then
2058   cat >> confdefs.h <<\EOF
2059 #define TIME_WITH_SYS_TIME 1
2060 EOF
2061
2062 fi
2063
2064 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2065 echo "configure:2066: checking for sys/wait.h that is POSIX.1 compatible" >&5
2066 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2067   echo $ac_n "(cached) $ac_c" 1>&6
2068 else
2069   cat > conftest.$ac_ext <<EOF
2070 #line 2071 "configure"
2071 #include "confdefs.h"
2072 #include <sys/types.h>
2073 #include <sys/wait.h>
2074 #ifndef WEXITSTATUS
2075 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2076 #endif
2077 #ifndef WIFEXITED
2078 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2079 #endif
2080 int main() {
2081 int s;
2082 wait (&s);
2083 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2084 ; return 0; }
2085 EOF
2086 if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2087   rm -rf conftest*
2088   ac_cv_header_sys_wait_h=yes
2089 else
2090   echo "configure: failed program was:" >&5
2091   cat conftest.$ac_ext >&5
2092   rm -rf conftest*
2093   ac_cv_header_sys_wait_h=no
2094 fi
2095 rm -f conftest*
2096 fi
2097
2098 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2099 if test $ac_cv_header_sys_wait_h = yes; then
2100   cat >> confdefs.h <<\EOF
2101 #define HAVE_SYS_WAIT_H 1
2102 EOF
2103
2104 fi
2105
2106 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
2107 echo "configure:2108: checking whether stat file-mode macros are broken" >&5
2108 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
2109   echo $ac_n "(cached) $ac_c" 1>&6
2110 else
2111   cat > conftest.$ac_ext <<EOF
2112 #line 2113 "configure"
2113 #include "confdefs.h"
2114 #include <sys/types.h>
2115 #include <sys/stat.h>
2116
2117 #if defined(S_ISBLK) && defined(S_IFDIR)
2118 # if S_ISBLK (S_IFDIR)
2119 You lose.
2120 # endif
2121 #endif
2122
2123 #if defined(S_ISBLK) && defined(S_IFCHR)
2124 # if S_ISBLK (S_IFCHR)
2125 You lose.
2126 # endif
2127 #endif
2128
2129 #if defined(S_ISLNK) && defined(S_IFREG)
2130 # if S_ISLNK (S_IFREG)
2131 You lose.
2132 # endif
2133 #endif
2134
2135 #if defined(S_ISSOCK) && defined(S_IFREG)
2136 # if S_ISSOCK (S_IFREG)
2137 You lose.
2138 # endif
2139 #endif
2140
2141 EOF
2142 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2143   egrep "You lose" >/dev/null 2>&1; then
2144   rm -rf conftest*
2145   ac_cv_header_stat_broken=yes
2146 else
2147   rm -rf conftest*
2148   ac_cv_header_stat_broken=no
2149 fi
2150 rm -f conftest*
2151
2152 fi
2153
2154 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
2155 if test $ac_cv_header_stat_broken = yes; then
2156   cat >> confdefs.h <<\EOF
2157 #define STAT_MACROS_BROKEN 1
2158 EOF
2159
2160 fi
2161
2162 for ac_hdr in string.h memory.h stdlib.h unistd.h errno.h fcntl.h \
2163                  limits.h crypt.h termcap.h termio.h termios.h locale.h \
2164                  netdb.h sys/param.h sys/time.h sys/utsname.h arpa/inet.h \
2165                  arpa/ftp.h
2166 do
2167 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2168 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2169 echo "configure:2170: checking for $ac_hdr" >&5
2170 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2171   echo $ac_n "(cached) $ac_c" 1>&6
2172 else
2173   cat > conftest.$ac_ext <<EOF
2174 #line 2175 "configure"
2175 #include "confdefs.h"
2176 #include <$ac_hdr>
2177 EOF
2178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2179 { (eval echo configure:2180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2181 if test -z "$ac_err"; then
2182   rm -rf conftest*
2183   eval "ac_cv_header_$ac_safe=yes"
2184 else
2185   echo "$ac_err" >&5
2186   echo "configure: failed program was:" >&5
2187   cat conftest.$ac_ext >&5
2188   rm -rf conftest*
2189   eval "ac_cv_header_$ac_safe=no"
2190 fi
2191 rm -f conftest*
2192 fi
2193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2194   echo "$ac_t""yes" 1>&6
2195     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2196   cat >> confdefs.h <<EOF
2197 #define $ac_tr_hdr 1
2198 EOF
2199  
2200 else
2201   echo "$ac_t""no" 1>&6
2202 fi
2203 done
2204
2205
2206
2207 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
2208 echo "configure:2209: checking POSIX termios" >&5
2209 if eval "test \"`echo '$''{'nmh_cv_sys_posix_termios'+set}'`\" = set"; then
2210   echo $ac_n "(cached) $ac_c" 1>&6
2211 else
2212   cat > conftest.$ac_ext <<EOF
2213 #line 2214 "configure"
2214 #include "confdefs.h"
2215 #include <sys/types.h>
2216 #include <unistd.h>
2217 #include <termios.h>
2218 int main() {
2219 /* SunOS 4.0.3 has termios.h but not the library calls.  */
2220 tcgetattr(0, 0);
2221 ; return 0; }
2222 EOF
2223 if { (eval echo configure:2224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2224   rm -rf conftest*
2225   nmh_cv_sys_posix_termios=yes
2226 else
2227   echo "configure: failed program was:" >&5
2228   cat conftest.$ac_ext >&5
2229   rm -rf conftest*
2230   nmh_cv_sys_posix_termios=no
2231 fi
2232 rm -f conftest*
2233 fi
2234
2235 echo "$ac_t""$nmh_cv_sys_posix_termios" 1>&6
2236  
2237 if test $nmh_cv_sys_posix_termios = yes; then
2238   echo $ac_n "checking TIOCGWINSZ in termios.h""... $ac_c" 1>&6
2239 echo "configure:2240: checking TIOCGWINSZ in termios.h" >&5
2240 if eval "test \"`echo '$''{'nmh_cv_header_termios_h_tiocgwinsz'+set}'`\" = set"; then
2241   echo $ac_n "(cached) $ac_c" 1>&6
2242 else
2243   cat > conftest.$ac_ext <<EOF
2244 #line 2245 "configure"
2245 #include "confdefs.h"
2246 #include <sys/types.h>
2247 #include <termios.h>
2248 int main() {
2249 int x = TIOCGWINSZ;
2250 ; return 0; }
2251 EOF
2252 if { (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2253   rm -rf conftest*
2254   nmh_cv_header_termios_h_tiocgwinsz=yes
2255 else
2256   echo "configure: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   rm -rf conftest*
2259   nmh_cv_header_termios_h_tiocgwinsz=no
2260 fi
2261 rm -f conftest*
2262 fi
2263
2264 echo "$ac_t""$nmh_cv_header_termios_h_tiocgwinsz" 1>&6
2265 else
2266   nmh_cv_header_termios_h_tiocgwinsz=no
2267 fi
2268  
2269 if test $nmh_cv_header_termios_h_tiocgwinsz = no; then
2270   echo $ac_n "checking TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6
2271 echo "configure:2272: checking TIOCGWINSZ in sys/ioctl.h" >&5
2272 if eval "test \"`echo '$''{'nmh_cv_header_sys_ioctl_h_tiocgwinsz'+set}'`\" = set"; then
2273   echo $ac_n "(cached) $ac_c" 1>&6
2274 else
2275   cat > conftest.$ac_ext <<EOF
2276 #line 2277 "configure"
2277 #include "confdefs.h"
2278 #include <sys/types.h>
2279 #include <sys/ioctl.h>
2280 int main() {
2281 int x = TIOCGWINSZ;
2282 ; return 0; }
2283 EOF
2284 if { (eval echo configure:2285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2285   rm -rf conftest*
2286   nmh_cv_header_sys_ioctl_h_tiocgwinsz=yes
2287 else
2288   echo "configure: failed program was:" >&5
2289   cat conftest.$ac_ext >&5
2290   rm -rf conftest*
2291   nmh_cv_header_sys_ioctl_h_tiocgwinsz=no
2292 fi
2293 rm -f conftest*
2294 fi
2295
2296 echo "$ac_t""$nmh_cv_header_sys_ioctl_h_tiocgwinsz" 1>&6
2297   if test $nmh_cv_header_sys_ioctl_h_tiocgwinsz = yes; then
2298     cat >> confdefs.h <<\EOF
2299 #define GWINSZ_IN_SYS_IOCTL 1
2300 EOF
2301
2302   fi
2303 fi
2304  
2305 ac_safe=`echo "libio.h" | sed 'y%./+-%__p_%'`
2306 echo $ac_n "checking for libio.h""... $ac_c" 1>&6
2307 echo "configure:2308: checking for libio.h" >&5
2308 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2309   echo $ac_n "(cached) $ac_c" 1>&6
2310 else
2311   cat > conftest.$ac_ext <<EOF
2312 #line 2313 "configure"
2313 #include "confdefs.h"
2314 #include <libio.h>
2315 EOF
2316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2317 { (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2319 if test -z "$ac_err"; then
2320   rm -rf conftest*
2321   eval "ac_cv_header_$ac_safe=yes"
2322 else
2323   echo "$ac_err" >&5
2324   echo "configure: failed program was:" >&5
2325   cat conftest.$ac_ext >&5
2326   rm -rf conftest*
2327   eval "ac_cv_header_$ac_safe=no"
2328 fi
2329 rm -f conftest*
2330 fi
2331 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2332   echo "$ac_t""yes" 1>&6
2333   
2334   cat > conftest.$ac_ext <<EOF
2335 #line 2336 "configure"
2336 #include "confdefs.h"
2337 #include <libio.h>
2338 EOF
2339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2340   egrep "_IO_write_ptr" >/dev/null 2>&1; then
2341   rm -rf conftest*
2342   
2343     cat >> confdefs.h <<\EOF
2344 #define LINUX_STDIO 1
2345 EOF
2346  
2347 fi
2348 rm -f conftest*
2349  
2350 else
2351   echo "$ac_t""no" 1>&6
2352 fi
2353  
2354
2355 ac_safe=`echo "sys/ptem.h" | sed 'y%./+-%__p_%'`
2356 echo $ac_n "checking for sys/ptem.h""... $ac_c" 1>&6
2357 echo "configure:2358: checking for sys/ptem.h" >&5
2358 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2359   echo $ac_n "(cached) $ac_c" 1>&6
2360 else
2361   cat > conftest.$ac_ext <<EOF
2362 #line 2363 "configure"
2363 #include "confdefs.h"
2364 #include <sys/ptem.h>
2365 EOF
2366 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2367 { (eval echo configure:2368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2368 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2369 if test -z "$ac_err"; then
2370   rm -rf conftest*
2371   eval "ac_cv_header_$ac_safe=yes"
2372 else
2373   echo "$ac_err" >&5
2374   echo "configure: failed program was:" >&5
2375   cat conftest.$ac_ext >&5
2376   rm -rf conftest*
2377   eval "ac_cv_header_$ac_safe=no"
2378 fi
2379 rm -f conftest*
2380 fi
2381 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2382   echo "$ac_t""yes" 1>&6
2383   cat >> confdefs.h <<\EOF
2384 #define WINSIZE_IN_PTEM 1
2385 EOF
2386
2387 else
2388   echo "$ac_t""no" 1>&6
2389 fi
2390
2391
2392 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2393 echo "configure:2394: checking for pid_t" >&5
2394 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2395   echo $ac_n "(cached) $ac_c" 1>&6
2396 else
2397   cat > conftest.$ac_ext <<EOF
2398 #line 2399 "configure"
2399 #include "confdefs.h"
2400 #include <sys/types.h>
2401 #if STDC_HEADERS
2402 #include <stdlib.h>
2403 #include <stddef.h>
2404 #endif
2405 EOF
2406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2407   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2408   rm -rf conftest*
2409   ac_cv_type_pid_t=yes
2410 else
2411   rm -rf conftest*
2412   ac_cv_type_pid_t=no
2413 fi
2414 rm -f conftest*
2415
2416 fi
2417 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2418 if test $ac_cv_type_pid_t = no; then
2419   cat >> confdefs.h <<\EOF
2420 #define pid_t int
2421 EOF
2422
2423 fi
2424
2425 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2426 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
2427 echo "configure:2428: checking for vfork.h" >&5
2428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2429   echo $ac_n "(cached) $ac_c" 1>&6
2430 else
2431   cat > conftest.$ac_ext <<EOF
2432 #line 2433 "configure"
2433 #include "confdefs.h"
2434 #include <vfork.h>
2435 EOF
2436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2437 { (eval echo configure:2438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2439 if test -z "$ac_err"; then
2440   rm -rf conftest*
2441   eval "ac_cv_header_$ac_safe=yes"
2442 else
2443   echo "$ac_err" >&5
2444   echo "configure: failed program was:" >&5
2445   cat conftest.$ac_ext >&5
2446   rm -rf conftest*
2447   eval "ac_cv_header_$ac_safe=no"
2448 fi
2449 rm -f conftest*
2450 fi
2451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2452   echo "$ac_t""yes" 1>&6
2453   cat >> confdefs.h <<\EOF
2454 #define HAVE_VFORK_H 1
2455 EOF
2456
2457 else
2458   echo "$ac_t""no" 1>&6
2459 fi
2460
2461 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
2462 echo "configure:2463: checking for working vfork" >&5
2463 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2464   echo $ac_n "(cached) $ac_c" 1>&6
2465 else
2466   if test "$cross_compiling" = yes; then
2467   echo $ac_n "checking for vfork""... $ac_c" 1>&6
2468 echo "configure:2469: checking for vfork" >&5
2469 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2470   echo $ac_n "(cached) $ac_c" 1>&6
2471 else
2472   cat > conftest.$ac_ext <<EOF
2473 #line 2474 "configure"
2474 #include "confdefs.h"
2475 /* System header to define __stub macros and hopefully few prototypes,
2476     which can conflict with char vfork(); below.  */
2477 #include <assert.h>
2478 /* Override any gcc2 internal prototype to avoid an error.  */
2479 /* We use char because int might match the return type of a gcc2
2480     builtin and then its argument prototype would still apply.  */
2481 char vfork();
2482
2483 int main() {
2484
2485 /* The GNU C library defines this for functions which it implements
2486     to always fail with ENOSYS.  Some functions are actually named
2487     something starting with __ and the normal name is an alias.  */
2488 #if defined (__stub_vfork) || defined (__stub___vfork)
2489 choke me
2490 #else
2491 vfork();
2492 #endif
2493
2494 ; return 0; }
2495 EOF
2496 if { (eval echo configure:2497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2497   rm -rf conftest*
2498   eval "ac_cv_func_vfork=yes"
2499 else
2500   echo "configure: failed program was:" >&5
2501   cat conftest.$ac_ext >&5
2502   rm -rf conftest*
2503   eval "ac_cv_func_vfork=no"
2504 fi
2505 rm -f conftest*
2506 fi
2507
2508 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2509   echo "$ac_t""yes" 1>&6
2510   :
2511 else
2512   echo "$ac_t""no" 1>&6
2513 fi
2514
2515 ac_cv_func_vfork_works=$ac_cv_func_vfork
2516 else
2517   cat > conftest.$ac_ext <<EOF
2518 #line 2519 "configure"
2519 #include "confdefs.h"
2520 /* Thanks to Paul Eggert for this test.  */
2521 #include <stdio.h>
2522 #include <sys/types.h>
2523 #include <sys/stat.h>
2524 #ifdef HAVE_UNISTD_H
2525 #include <unistd.h>
2526 #endif
2527 #ifdef HAVE_VFORK_H
2528 #include <vfork.h>
2529 #endif
2530 /* On some sparc systems, changes by the child to local and incoming
2531    argument registers are propagated back to the parent.
2532    The compiler is told about this with #include <vfork.h>,
2533    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2534    Test for this by using a static variable whose address
2535    is put into a register that is clobbered by the vfork.  */
2536 static
2537 #ifdef __cplusplus
2538 sparc_address_test (int arg)
2539 #else
2540 sparc_address_test (arg) int arg;
2541 #endif
2542 {
2543   static pid_t child;
2544   if (!child) {
2545     child = vfork ();
2546     if (child < 0) {
2547       perror ("vfork");
2548       _exit(2);
2549     }
2550     if (!child) {
2551       arg = getpid();
2552       write(-1, "", 0);
2553       _exit (arg);
2554     }
2555   }
2556 }
2557 main() {
2558   pid_t parent = getpid ();
2559   pid_t child;
2560
2561   sparc_address_test ();
2562
2563   child = vfork ();
2564
2565   if (child == 0) {
2566     /* Here is another test for sparc vfork register problems.
2567        This test uses lots of local variables, at least
2568        as many local variables as main has allocated so far
2569        including compiler temporaries.  4 locals are enough for
2570        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2571        A buggy compiler should reuse the register of parent
2572        for one of the local variables, since it will think that
2573        parent can't possibly be used any more in this routine.
2574        Assigning to the local variable will thus munge parent
2575        in the parent process.  */
2576     pid_t
2577       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2578       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2579     /* Convince the compiler that p..p7 are live; otherwise, it might
2580        use the same hardware register for all 8 local variables.  */
2581     if (p != p1 || p != p2 || p != p3 || p != p4
2582         || p != p5 || p != p6 || p != p7)
2583       _exit(1);
2584
2585     /* On some systems (e.g. IRIX 3.3),
2586        vfork doesn't separate parent from child file descriptors.
2587        If the child closes a descriptor before it execs or exits,
2588        this munges the parent's descriptor as well.
2589        Test for this by closing stdout in the child.  */
2590     _exit(close(fileno(stdout)) != 0);
2591   } else {
2592     int status;
2593     struct stat st;
2594
2595     while (wait(&status) != child)
2596       ;
2597     exit(
2598          /* Was there some problem with vforking?  */
2599          child < 0
2600
2601          /* Did the child fail?  (This shouldn't happen.)  */
2602          || status
2603
2604          /* Did the vfork/compiler bug occur?  */
2605          || parent != getpid()
2606
2607          /* Did the file descriptor bug occur?  */
2608          || fstat(fileno(stdout), &st) != 0
2609          );
2610   }
2611 }
2612 EOF
2613 if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2614 then
2615   ac_cv_func_vfork_works=yes
2616 else
2617   echo "configure: failed program was:" >&5
2618   cat conftest.$ac_ext >&5
2619   rm -fr conftest*
2620   ac_cv_func_vfork_works=no
2621 fi
2622 rm -fr conftest*
2623 fi
2624
2625 fi
2626
2627 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2628 if test $ac_cv_func_vfork_works = no; then
2629   cat >> confdefs.h <<\EOF
2630 #define vfork fork
2631 EOF
2632
2633 fi
2634
2635 echo $ac_n "checking for mkstemp in -lmkstemp""... $ac_c" 1>&6
2636 echo "configure:2637: checking for mkstemp in -lmkstemp" >&5
2637 ac_lib_var=`echo mkstemp'_'mkstemp | sed 'y%./+-%__p_%'`
2638 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2639   echo $ac_n "(cached) $ac_c" 1>&6
2640 else
2641   ac_save_LIBS="$LIBS"
2642 LIBS="-lmkstemp  $LIBS"
2643 cat > conftest.$ac_ext <<EOF
2644 #line 2645 "configure"
2645 #include "confdefs.h"
2646 /* Override any gcc2 internal prototype to avoid an error.  */
2647 /* We use char because int might match the return type of a gcc2
2648     builtin and then its argument prototype would still apply.  */
2649 char mkstemp();
2650
2651 int main() {
2652 mkstemp()
2653 ; return 0; }
2654 EOF
2655 if { (eval echo configure:2656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2656   rm -rf conftest*
2657   eval "ac_cv_lib_$ac_lib_var=yes"
2658 else
2659   echo "configure: failed program was:" >&5
2660   cat conftest.$ac_ext >&5
2661   rm -rf conftest*
2662   eval "ac_cv_lib_$ac_lib_var=no"
2663 fi
2664 rm -f conftest*
2665 LIBS="$ac_save_LIBS"
2666
2667 fi
2668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2669   echo "$ac_t""yes" 1>&6
2670     ac_tr_lib=HAVE_LIB`echo mkstemp | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2671     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2672   cat >> confdefs.h <<EOF
2673 #define $ac_tr_lib 1
2674 EOF
2675
2676   LIBS="-lmkstemp $LIBS"
2677
2678 else
2679   echo "$ac_t""no" 1>&6
2680 fi
2681
2682 for ac_func in waitpid wait3 sigaction sigprocmask sigblock sigsetmask \
2683                sighold sigrelse writev lstat uname tzset killpg mkstemp \
2684                sethostent
2685 do
2686 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2687 echo "configure:2688: checking for $ac_func" >&5
2688 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2689   echo $ac_n "(cached) $ac_c" 1>&6
2690 else
2691   cat > conftest.$ac_ext <<EOF
2692 #line 2693 "configure"
2693 #include "confdefs.h"
2694 /* System header to define __stub macros and hopefully few prototypes,
2695     which can conflict with char $ac_func(); below.  */
2696 #include <assert.h>
2697 /* Override any gcc2 internal prototype to avoid an error.  */
2698 /* We use char because int might match the return type of a gcc2
2699     builtin and then its argument prototype would still apply.  */
2700 char $ac_func();
2701
2702 int main() {
2703
2704 /* The GNU C library defines this for functions which it implements
2705     to always fail with ENOSYS.  Some functions are actually named
2706     something starting with __ and the normal name is an alias.  */
2707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2708 choke me
2709 #else
2710 $ac_func();
2711 #endif
2712
2713 ; return 0; }
2714 EOF
2715 if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2716   rm -rf conftest*
2717   eval "ac_cv_func_$ac_func=yes"
2718 else
2719   echo "configure: failed program was:" >&5
2720   cat conftest.$ac_ext >&5
2721   rm -rf conftest*
2722   eval "ac_cv_func_$ac_func=no"
2723 fi
2724 rm -f conftest*
2725 fi
2726
2727 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2728   echo "$ac_t""yes" 1>&6
2729     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2730   cat >> confdefs.h <<EOF
2731 #define $ac_tr_func 1
2732 EOF
2733  
2734 else
2735   echo "$ac_t""no" 1>&6
2736 fi
2737 done
2738
2739
2740 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2741 echo "configure:2742: checking for gethostbyname" >&5
2742 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2743   echo $ac_n "(cached) $ac_c" 1>&6
2744 else
2745   cat > conftest.$ac_ext <<EOF
2746 #line 2747 "configure"
2747 #include "confdefs.h"
2748 /* System header to define __stub macros and hopefully few prototypes,
2749     which can conflict with char gethostbyname(); below.  */
2750 #include <assert.h>
2751 /* Override any gcc2 internal prototype to avoid an error.  */
2752 /* We use char because int might match the return type of a gcc2
2753     builtin and then its argument prototype would still apply.  */
2754 char gethostbyname();
2755
2756 int main() {
2757
2758 /* The GNU C library defines this for functions which it implements
2759     to always fail with ENOSYS.  Some functions are actually named
2760     something starting with __ and the normal name is an alias.  */
2761 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2762 choke me
2763 #else
2764 gethostbyname();
2765 #endif
2766
2767 ; return 0; }
2768 EOF
2769 if { (eval echo configure:2770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2770   rm -rf conftest*
2771   eval "ac_cv_func_gethostbyname=yes"
2772 else
2773   echo "configure: failed program was:" >&5
2774   cat conftest.$ac_ext >&5
2775   rm -rf conftest*
2776   eval "ac_cv_func_gethostbyname=no"
2777 fi
2778 rm -f conftest*
2779 fi
2780
2781 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2782   echo "$ac_t""yes" 1>&6
2783   cat >> confdefs.h <<\EOF
2784 #define HAVE_GETHOSTBYNAME 1
2785 EOF
2786
2787 else
2788   echo "$ac_t""no" 1>&6
2789 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2790 echo "configure:2791: checking for gethostbyname in -lnsl" >&5
2791 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2793   echo $ac_n "(cached) $ac_c" 1>&6
2794 else
2795   ac_save_LIBS="$LIBS"
2796 LIBS="-lnsl  $LIBS"
2797 cat > conftest.$ac_ext <<EOF
2798 #line 2799 "configure"
2799 #include "confdefs.h"
2800 /* Override any gcc2 internal prototype to avoid an error.  */
2801 /* We use char because int might match the return type of a gcc2
2802     builtin and then its argument prototype would still apply.  */
2803 char gethostbyname();
2804
2805 int main() {
2806 gethostbyname()
2807 ; return 0; }
2808 EOF
2809 if { (eval echo configure:2810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2810   rm -rf conftest*
2811   eval "ac_cv_lib_$ac_lib_var=yes"
2812 else
2813   echo "configure: failed program was:" >&5
2814   cat conftest.$ac_ext >&5
2815   rm -rf conftest*
2816   eval "ac_cv_lib_$ac_lib_var=no"
2817 fi
2818 rm -f conftest*
2819 LIBS="$ac_save_LIBS"
2820
2821 fi
2822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2823   echo "$ac_t""yes" 1>&6
2824   cat >> confdefs.h <<\EOF
2825 #define HAVE_GETHOSTBYNAME 1
2826 EOF
2827  
2828 else
2829   echo "$ac_t""no" 1>&6
2830 fi
2831  
2832 fi
2833
2834
2835 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
2836 echo "configure:2837: checking for sigsetjmp" >&5
2837 cat > conftest.$ac_ext <<EOF
2838 #line 2839 "configure"
2839 #include "confdefs.h"
2840 #include <setjmp.h>
2841 int main() {
2842 sigsetjmp((void *)0, 0);
2843 ; return 0; }
2844 EOF
2845 if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2846   rm -rf conftest*
2847   cat >> confdefs.h <<\EOF
2848 #define HAVE_SIGSETJMP 1
2849 EOF
2850  echo "$ac_t""yes" 1>&6
2851 else
2852   echo "configure: failed program was:" >&5
2853   cat conftest.$ac_ext >&5
2854   rm -rf conftest*
2855   echo "$ac_t""no" 1>&6
2856 fi
2857 rm -f conftest*
2858
2859 for ac_func in snprintf strerror strdup
2860 do
2861 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2862 echo "configure:2863: checking for $ac_func" >&5
2863 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2864   echo $ac_n "(cached) $ac_c" 1>&6
2865 else
2866   cat > conftest.$ac_ext <<EOF
2867 #line 2868 "configure"
2868 #include "confdefs.h"
2869 /* System header to define __stub macros and hopefully few prototypes,
2870     which can conflict with char $ac_func(); below.  */
2871 #include <assert.h>
2872 /* Override any gcc2 internal prototype to avoid an error.  */
2873 /* We use char because int might match the return type of a gcc2
2874     builtin and then its argument prototype would still apply.  */
2875 char $ac_func();
2876
2877 int main() {
2878
2879 /* The GNU C library defines this for functions which it implements
2880     to always fail with ENOSYS.  Some functions are actually named
2881     something starting with __ and the normal name is an alias.  */
2882 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2883 choke me
2884 #else
2885 $ac_func();
2886 #endif
2887
2888 ; return 0; }
2889 EOF
2890 if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2891   rm -rf conftest*
2892   eval "ac_cv_func_$ac_func=yes"
2893 else
2894   echo "configure: failed program was:" >&5
2895   cat conftest.$ac_ext >&5
2896   rm -rf conftest*
2897   eval "ac_cv_func_$ac_func=no"
2898 fi
2899 rm -f conftest*
2900 fi
2901
2902 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2903   echo "$ac_t""yes" 1>&6
2904     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2905   cat >> confdefs.h <<EOF
2906 #define $ac_tr_func 1
2907 EOF
2908  
2909 else
2910   echo "$ac_t""no" 1>&6
2911 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2912 fi
2913 done
2914
2915
2916
2917 echo $ac_n "checking for modf""... $ac_c" 1>&6
2918 echo "configure:2919: checking for modf" >&5
2919 if eval "test \"`echo '$''{'ac_cv_func_modf'+set}'`\" = set"; then
2920   echo $ac_n "(cached) $ac_c" 1>&6
2921 else
2922   cat > conftest.$ac_ext <<EOF
2923 #line 2924 "configure"
2924 #include "confdefs.h"
2925 /* System header to define __stub macros and hopefully few prototypes,
2926     which can conflict with char modf(); below.  */
2927 #include <assert.h>
2928 /* Override any gcc2 internal prototype to avoid an error.  */
2929 /* We use char because int might match the return type of a gcc2
2930     builtin and then its argument prototype would still apply.  */
2931 char modf();
2932
2933 int main() {
2934
2935 /* The GNU C library defines this for functions which it implements
2936     to always fail with ENOSYS.  Some functions are actually named
2937     something starting with __ and the normal name is an alias.  */
2938 #if defined (__stub_modf) || defined (__stub___modf)
2939 choke me
2940 #else
2941 modf();
2942 #endif
2943
2944 ; return 0; }
2945 EOF
2946 if { (eval echo configure:2947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2947   rm -rf conftest*
2948   eval "ac_cv_func_modf=yes"
2949 else
2950   echo "configure: failed program was:" >&5
2951   cat conftest.$ac_ext >&5
2952   rm -rf conftest*
2953   eval "ac_cv_func_modf=no"
2954 fi
2955 rm -f conftest*
2956 fi
2957
2958 if eval "test \"`echo '$ac_cv_func_'modf`\" = yes"; then
2959   echo "$ac_t""yes" 1>&6
2960   :
2961 else
2962   echo "$ac_t""no" 1>&6
2963 echo $ac_n "checking for modf in -lm""... $ac_c" 1>&6
2964 echo "configure:2965: checking for modf in -lm" >&5
2965 ac_lib_var=`echo m'_'modf | sed 'y%./+-%__p_%'`
2966 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2967   echo $ac_n "(cached) $ac_c" 1>&6
2968 else
2969   ac_save_LIBS="$LIBS"
2970 LIBS="-lm  $LIBS"
2971 cat > conftest.$ac_ext <<EOF
2972 #line 2973 "configure"
2973 #include "confdefs.h"
2974 /* Override any gcc2 internal prototype to avoid an error.  */
2975 /* We use char because int might match the return type of a gcc2
2976     builtin and then its argument prototype would still apply.  */
2977 char modf();
2978
2979 int main() {
2980 modf()
2981 ; return 0; }
2982 EOF
2983 if { (eval echo configure:2984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2984   rm -rf conftest*
2985   eval "ac_cv_lib_$ac_lib_var=yes"
2986 else
2987   echo "configure: failed program was:" >&5
2988   cat conftest.$ac_ext >&5
2989   rm -rf conftest*
2990   eval "ac_cv_lib_$ac_lib_var=no"
2991 fi
2992 rm -f conftest*
2993 LIBS="$ac_save_LIBS"
2994
2995 fi
2996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2997   echo "$ac_t""yes" 1>&6
2998     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
2999     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3000   cat >> confdefs.h <<EOF
3001 #define $ac_tr_lib 1
3002 EOF
3003
3004   LIBS="-lm $LIBS"
3005
3006 else
3007   echo "$ac_t""no" 1>&6
3008 fi
3009
3010 fi
3011
3012
3013 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3014 echo "configure:3015: checking for gethostbyname" >&5
3015 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
3016   echo $ac_n "(cached) $ac_c" 1>&6
3017 else
3018   cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021 /* System header to define __stub macros and hopefully few prototypes,
3022     which can conflict with char gethostbyname(); below.  */
3023 #include <assert.h>
3024 /* Override any gcc2 internal prototype to avoid an error.  */
3025 /* We use char because int might match the return type of a gcc2
3026     builtin and then its argument prototype would still apply.  */
3027 char gethostbyname();
3028
3029 int main() {
3030
3031 /* The GNU C library defines this for functions which it implements
3032     to always fail with ENOSYS.  Some functions are actually named
3033     something starting with __ and the normal name is an alias.  */
3034 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
3035 choke me
3036 #else
3037 gethostbyname();
3038 #endif
3039
3040 ; return 0; }
3041 EOF
3042 if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3043   rm -rf conftest*
3044   eval "ac_cv_func_gethostbyname=yes"
3045 else
3046   echo "configure: failed program was:" >&5
3047   cat conftest.$ac_ext >&5
3048   rm -rf conftest*
3049   eval "ac_cv_func_gethostbyname=no"
3050 fi
3051 rm -f conftest*
3052 fi
3053
3054 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
3055   echo "$ac_t""yes" 1>&6
3056   :
3057 else
3058   echo "$ac_t""no" 1>&6
3059 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3060 echo "configure:3061: checking for gethostbyname in -lnsl" >&5
3061 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
3062 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   ac_save_LIBS="$LIBS"
3066 LIBS="-lnsl  $LIBS"
3067 cat > conftest.$ac_ext <<EOF
3068 #line 3069 "configure"
3069 #include "confdefs.h"
3070 /* Override any gcc2 internal prototype to avoid an error.  */
3071 /* We use char because int might match the return type of a gcc2
3072     builtin and then its argument prototype would still apply.  */
3073 char gethostbyname();
3074
3075 int main() {
3076 gethostbyname()
3077 ; return 0; }
3078 EOF
3079 if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3080   rm -rf conftest*
3081   eval "ac_cv_lib_$ac_lib_var=yes"
3082 else
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085   rm -rf conftest*
3086   eval "ac_cv_lib_$ac_lib_var=no"
3087 fi
3088 rm -f conftest*
3089 LIBS="$ac_save_LIBS"
3090
3091 fi
3092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3093   echo "$ac_t""yes" 1>&6
3094     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
3095     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3096   cat >> confdefs.h <<EOF
3097 #define $ac_tr_lib 1
3098 EOF
3099
3100   LIBS="-lnsl $LIBS"
3101
3102 else
3103   echo "$ac_t""no" 1>&6
3104 echo $ac_n "checking for gethostbyname in -lresolv""... $ac_c" 1>&6
3105 echo "configure:3106: checking for gethostbyname in -lresolv" >&5
3106 ac_lib_var=`echo resolv'_'gethostbyname | sed 'y%./+-%__p_%'`
3107 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3108   echo $ac_n "(cached) $ac_c" 1>&6
3109 else
3110   ac_save_LIBS="$LIBS"
3111 LIBS="-lresolv  $LIBS"
3112 cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115 /* Override any gcc2 internal prototype to avoid an error.  */
3116 /* We use char because int might match the return type of a gcc2
3117     builtin and then its argument prototype would still apply.  */
3118 char gethostbyname();
3119
3120 int main() {
3121 gethostbyname()
3122 ; return 0; }
3123 EOF
3124 if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3125   rm -rf conftest*
3126   eval "ac_cv_lib_$ac_lib_var=yes"
3127 else
3128   echo "configure: failed program was:" >&5
3129   cat conftest.$ac_ext >&5
3130   rm -rf conftest*
3131   eval "ac_cv_lib_$ac_lib_var=no"
3132 fi
3133 rm -f conftest*
3134 LIBS="$ac_save_LIBS"
3135
3136 fi
3137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3138   echo "$ac_t""yes" 1>&6
3139     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
3140     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3141   cat >> confdefs.h <<EOF
3142 #define $ac_tr_lib 1
3143 EOF
3144
3145   LIBS="-lresolv $LIBS"
3146
3147 else
3148   echo "$ac_t""no" 1>&6
3149 fi
3150
3151 fi
3152
3153 fi
3154
3155 echo $ac_n "checking for socket""... $ac_c" 1>&6
3156 echo "configure:3157: checking for socket" >&5
3157 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3158   echo $ac_n "(cached) $ac_c" 1>&6
3159 else
3160   cat > conftest.$ac_ext <<EOF
3161 #line 3162 "configure"
3162 #include "confdefs.h"
3163 /* System header to define __stub macros and hopefully few prototypes,
3164     which can conflict with char socket(); below.  */
3165 #include <assert.h>
3166 /* Override any gcc2 internal prototype to avoid an error.  */
3167 /* We use char because int might match the return type of a gcc2
3168     builtin and then its argument prototype would still apply.  */
3169 char socket();
3170
3171 int main() {
3172
3173 /* The GNU C library defines this for functions which it implements
3174     to always fail with ENOSYS.  Some functions are actually named
3175     something starting with __ and the normal name is an alias.  */
3176 #if defined (__stub_socket) || defined (__stub___socket)
3177 choke me
3178 #else
3179 socket();
3180 #endif
3181
3182 ; return 0; }
3183 EOF
3184 if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3185   rm -rf conftest*
3186   eval "ac_cv_func_socket=yes"
3187 else
3188   echo "configure: failed program was:" >&5
3189   cat conftest.$ac_ext >&5
3190   rm -rf conftest*
3191   eval "ac_cv_func_socket=no"
3192 fi
3193 rm -f conftest*
3194 fi
3195
3196 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3197   echo "$ac_t""yes" 1>&6
3198   :
3199 else
3200   echo "$ac_t""no" 1>&6
3201 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3202 echo "configure:3203: checking for socket in -lsocket" >&5
3203 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3204 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3205   echo $ac_n "(cached) $ac_c" 1>&6
3206 else
3207   ac_save_LIBS="$LIBS"
3208 LIBS="-lsocket  $LIBS"
3209 cat > conftest.$ac_ext <<EOF
3210 #line 3211 "configure"
3211 #include "confdefs.h"
3212 /* Override any gcc2 internal prototype to avoid an error.  */
3213 /* We use char because int might match the return type of a gcc2
3214     builtin and then its argument prototype would still apply.  */
3215 char socket();
3216
3217 int main() {
3218 socket()
3219 ; return 0; }
3220 EOF
3221 if { (eval echo configure:3222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3222   rm -rf conftest*
3223   eval "ac_cv_lib_$ac_lib_var=yes"
3224 else
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   eval "ac_cv_lib_$ac_lib_var=no"
3229 fi
3230 rm -f conftest*
3231 LIBS="$ac_save_LIBS"
3232
3233 fi
3234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3235   echo "$ac_t""yes" 1>&6
3236     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
3237     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3238   cat >> confdefs.h <<EOF
3239 #define $ac_tr_lib 1
3240 EOF
3241
3242   LIBS="-lsocket $LIBS"
3243
3244 else
3245   echo "$ac_t""no" 1>&6
3246 fi
3247
3248 fi
3249
3250
3251
3252 echo $ac_n "checking for ruserpass""... $ac_c" 1>&6
3253 echo "configure:3254: checking for ruserpass" >&5
3254 if eval "test \"`echo '$''{'ac_cv_func_ruserpass'+set}'`\" = set"; then
3255   echo $ac_n "(cached) $ac_c" 1>&6
3256 else
3257   cat > conftest.$ac_ext <<EOF
3258 #line 3259 "configure"
3259 #include "confdefs.h"
3260 /* System header to define __stub macros and hopefully few prototypes,
3261     which can conflict with char ruserpass(); below.  */
3262 #include <assert.h>
3263 /* Override any gcc2 internal prototype to avoid an error.  */
3264 /* We use char because int might match the return type of a gcc2
3265     builtin and then its argument prototype would still apply.  */
3266 char ruserpass();
3267
3268 int main() {
3269
3270 /* The GNU C library defines this for functions which it implements
3271     to always fail with ENOSYS.  Some functions are actually named
3272     something starting with __ and the normal name is an alias.  */
3273 #if defined (__stub_ruserpass) || defined (__stub___ruserpass)
3274 choke me
3275 #else
3276 ruserpass();
3277 #endif
3278
3279 ; return 0; }
3280 EOF
3281 if { (eval echo configure:3282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3282   rm -rf conftest*
3283   eval "ac_cv_func_ruserpass=yes"
3284 else
3285   echo "configure: failed program was:" >&5
3286   cat conftest.$ac_ext >&5
3287   rm -rf conftest*
3288   eval "ac_cv_func_ruserpass=no"
3289 fi
3290 rm -f conftest*
3291 fi
3292
3293 if eval "test \"`echo '$ac_cv_func_'ruserpass`\" = yes"; then
3294   echo "$ac_t""yes" 1>&6
3295   :
3296 else
3297   echo "$ac_t""no" 1>&6
3298 echo $ac_n "checking for _ruserpass""... $ac_c" 1>&6
3299 echo "configure:3300: checking for _ruserpass" >&5
3300 if eval "test \"`echo '$''{'ac_cv_func__ruserpass'+set}'`\" = set"; then
3301   echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303   cat > conftest.$ac_ext <<EOF
3304 #line 3305 "configure"
3305 #include "confdefs.h"
3306 /* System header to define __stub macros and hopefully few prototypes,
3307     which can conflict with char _ruserpass(); below.  */
3308 #include <assert.h>
3309 /* Override any gcc2 internal prototype to avoid an error.  */
3310 /* We use char because int might match the return type of a gcc2
3311     builtin and then its argument prototype would still apply.  */
3312 char _ruserpass();
3313
3314 int main() {
3315
3316 /* The GNU C library defines this for functions which it implements
3317     to always fail with ENOSYS.  Some functions are actually named
3318     something starting with __ and the normal name is an alias.  */
3319 #if defined (__stub__ruserpass) || defined (__stub____ruserpass)
3320 choke me
3321 #else
3322 _ruserpass();
3323 #endif
3324
3325 ; return 0; }
3326 EOF
3327 if { (eval echo configure:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3328   rm -rf conftest*
3329   eval "ac_cv_func__ruserpass=yes"
3330 else
3331   echo "configure: failed program was:" >&5
3332   cat conftest.$ac_ext >&5
3333   rm -rf conftest*
3334   eval "ac_cv_func__ruserpass=no"
3335 fi
3336 rm -f conftest*
3337 fi
3338
3339 if eval "test \"`echo '$ac_cv_func_'_ruserpass`\" = yes"; then
3340   echo "$ac_t""yes" 1>&6
3341   :
3342 else
3343   echo "$ac_t""no" 1>&6
3344 echo $ac_n "checking for _ruserpass in -lsocket""... $ac_c" 1>&6
3345 echo "configure:3346: checking for _ruserpass in -lsocket" >&5
3346 ac_lib_var=`echo socket'_'_ruserpass | sed 'y%./+-%__p_%'`
3347 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3348   echo $ac_n "(cached) $ac_c" 1>&6
3349 else
3350   ac_save_LIBS="$LIBS"
3351 LIBS="-lsocket  $LIBS"
3352 cat > conftest.$ac_ext <<EOF
3353 #line 3354 "configure"
3354 #include "confdefs.h"
3355 /* Override any gcc2 internal prototype to avoid an error.  */
3356 /* We use char because int might match the return type of a gcc2
3357     builtin and then its argument prototype would still apply.  */
3358 char _ruserpass();
3359
3360 int main() {
3361 _ruserpass()
3362 ; return 0; }
3363 EOF
3364 if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3365   rm -rf conftest*
3366   eval "ac_cv_lib_$ac_lib_var=yes"
3367 else
3368   echo "configure: failed program was:" >&5
3369   cat conftest.$ac_ext >&5
3370   rm -rf conftest*
3371   eval "ac_cv_lib_$ac_lib_var=no"
3372 fi
3373 rm -f conftest*
3374 LIBS="$ac_save_LIBS"
3375
3376 fi
3377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3378   echo "$ac_t""yes" 1>&6
3379     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
3380     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3381   cat >> confdefs.h <<EOF
3382 #define $ac_tr_lib 1
3383 EOF
3384
3385   LIBS="-lsocket $LIBS"
3386
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 fi
3392
3393 fi
3394
3395 if test x$ac_cv_func_ruserpass = xno; then
3396   if test x$ac_cv_func__ruserpass = xyes -o x$ac_cv_lib_socket__ruserpass = xyes; then
3397     cat >> confdefs.h <<\EOF
3398 #define ruserpass _ruserpass
3399 EOF
3400
3401   else
3402     LIBOBJS="$LIBOBJS ruserpass.o"
3403   fi
3404 fi
3405
3406
3407 termcap_curses_order="termcap curses ncurses"
3408 for lib in $termcap_curses_order; do
3409   echo $ac_n "checking for tgetent in -l${lib}""... $ac_c" 1>&6
3410 echo "configure:3411: checking for tgetent in -l${lib}" >&5
3411 ac_lib_var=`echo ${lib}'_'tgetent | sed 'y%./+-%__p_%'`
3412 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3413   echo $ac_n "(cached) $ac_c" 1>&6
3414 else
3415   ac_save_LIBS="$LIBS"
3416 LIBS="-l${lib}  $LIBS"
3417 cat > conftest.$ac_ext <<EOF
3418 #line 3419 "configure"
3419 #include "confdefs.h"
3420 /* Override any gcc2 internal prototype to avoid an error.  */
3421 /* We use char because int might match the return type of a gcc2
3422     builtin and then its argument prototype would still apply.  */
3423 char tgetent();
3424
3425 int main() {
3426 tgetent()
3427 ; return 0; }
3428 EOF
3429 if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3430   rm -rf conftest*
3431   eval "ac_cv_lib_$ac_lib_var=yes"
3432 else
3433   echo "configure: failed program was:" >&5
3434   cat conftest.$ac_ext >&5
3435   rm -rf conftest*
3436   eval "ac_cv_lib_$ac_lib_var=no"
3437 fi
3438 rm -f conftest*
3439 LIBS="$ac_save_LIBS"
3440
3441 fi
3442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3443   echo "$ac_t""yes" 1>&6
3444   TERMLIB="-l$lib"; break
3445 else
3446   echo "$ac_t""no" 1>&6
3447 fi
3448
3449 done
3450
3451
3452 echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
3453 echo "configure:3454: checking for dbm_open" >&5
3454 if eval "test \"`echo '$''{'ac_cv_func_dbm_open'+set}'`\" = set"; then
3455   echo $ac_n "(cached) $ac_c" 1>&6
3456 else
3457   cat > conftest.$ac_ext <<EOF
3458 #line 3459 "configure"
3459 #include "confdefs.h"
3460 /* System header to define __stub macros and hopefully few prototypes,
3461     which can conflict with char dbm_open(); below.  */
3462 #include <assert.h>
3463 /* Override any gcc2 internal prototype to avoid an error.  */
3464 /* We use char because int might match the return type of a gcc2
3465     builtin and then its argument prototype would still apply.  */
3466 char dbm_open();
3467
3468 int main() {
3469
3470 /* The GNU C library defines this for functions which it implements
3471     to always fail with ENOSYS.  Some functions are actually named
3472     something starting with __ and the normal name is an alias.  */
3473 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
3474 choke me
3475 #else
3476 dbm_open();
3477 #endif
3478
3479 ; return 0; }
3480 EOF
3481 if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3482   rm -rf conftest*
3483   eval "ac_cv_func_dbm_open=yes"
3484 else
3485   echo "configure: failed program was:" >&5
3486   cat conftest.$ac_ext >&5
3487   rm -rf conftest*
3488   eval "ac_cv_func_dbm_open=no"
3489 fi
3490 rm -f conftest*
3491 fi
3492
3493 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
3494   echo "$ac_t""yes" 1>&6
3495   :
3496 else
3497   echo "$ac_t""no" 1>&6
3498 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
3499 echo "configure:3500: checking for dbm_open in -lndbm" >&5
3500 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-%__p_%'`
3501 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3502   echo $ac_n "(cached) $ac_c" 1>&6
3503 else
3504   ac_save_LIBS="$LIBS"
3505 LIBS="-lndbm  $LIBS"
3506 cat > conftest.$ac_ext <<EOF
3507 #line 3508 "configure"
3508 #include "confdefs.h"
3509 /* Override any gcc2 internal prototype to avoid an error.  */
3510 /* We use char because int might match the return type of a gcc2
3511     builtin and then its argument prototype would still apply.  */
3512 char dbm_open();
3513
3514 int main() {
3515 dbm_open()
3516 ; return 0; }
3517 EOF
3518 if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3519   rm -rf conftest*
3520   eval "ac_cv_lib_$ac_lib_var=yes"
3521 else
3522   echo "configure: failed program was:" >&5
3523   cat conftest.$ac_ext >&5
3524   rm -rf conftest*
3525   eval "ac_cv_lib_$ac_lib_var=no"
3526 fi
3527 rm -f conftest*
3528 LIBS="$ac_save_LIBS"
3529
3530 fi
3531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3532   echo "$ac_t""yes" 1>&6
3533     ac_tr_lib=HAVE_LIB`echo ndbm | sed -e 's/^a-zA-Z0-9_/_/g' \
3534     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3535   cat >> confdefs.h <<EOF
3536 #define $ac_tr_lib 1
3537 EOF
3538
3539   LIBS="-lndbm $LIBS"
3540
3541 else
3542   echo "$ac_t""no" 1>&6
3543 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
3544 echo "configure:3545: checking for dbm_open in -ldbm" >&5
3545 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
3546 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3547   echo $ac_n "(cached) $ac_c" 1>&6
3548 else
3549   ac_save_LIBS="$LIBS"
3550 LIBS="-ldbm  $LIBS"
3551 cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3554 /* Override any gcc2 internal prototype to avoid an error.  */
3555 /* We use char because int might match the return type of a gcc2
3556     builtin and then its argument prototype would still apply.  */
3557 char dbm_open();
3558
3559 int main() {
3560 dbm_open()
3561 ; return 0; }
3562 EOF
3563 if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3564   rm -rf conftest*
3565   eval "ac_cv_lib_$ac_lib_var=yes"
3566 else
3567   echo "configure: failed program was:" >&5
3568   cat conftest.$ac_ext >&5
3569   rm -rf conftest*
3570   eval "ac_cv_lib_$ac_lib_var=no"
3571 fi
3572 rm -f conftest*
3573 LIBS="$ac_save_LIBS"
3574
3575 fi
3576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3577   echo "$ac_t""yes" 1>&6
3578     ac_tr_lib=HAVE_LIB`echo dbm | sed -e 's/^a-zA-Z0-9_/_/g' \
3579     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3580   cat >> confdefs.h <<EOF
3581 #define $ac_tr_lib 1
3582 EOF
3583
3584   LIBS="-ldbm $LIBS"
3585
3586 else
3587   echo "$ac_t""no" 1>&6
3588 fi
3589
3590 fi
3591
3592 fi
3593
3594
3595 for ac_hdr in db1/ndbm.h
3596 do
3597 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3598 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3599 echo "configure:3600: checking for $ac_hdr" >&5
3600 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3601   echo $ac_n "(cached) $ac_c" 1>&6
3602 else
3603   cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 #include <$ac_hdr>
3607 EOF
3608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3609 { (eval echo configure:3610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3611 if test -z "$ac_err"; then
3612   rm -rf conftest*
3613   eval "ac_cv_header_$ac_safe=yes"
3614 else
3615   echo "$ac_err" >&5
3616   echo "configure: failed program was:" >&5
3617   cat conftest.$ac_ext >&5
3618   rm -rf conftest*
3619   eval "ac_cv_header_$ac_safe=no"
3620 fi
3621 rm -f conftest*
3622 fi
3623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3624   echo "$ac_t""yes" 1>&6
3625     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3626   cat >> confdefs.h <<EOF
3627 #define $ac_tr_hdr 1
3628 EOF
3629  
3630 else
3631   echo "$ac_t""no" 1>&6
3632 fi
3633 done
3634
3635
3636 if test x$with_hesiod != x -a x$with_hesiod != xno; then
3637   if test x$with_hesiod != xyes; then
3638     HESIOD_INCLUDES="-I$with_hesiod/include"
3639     HESIOD_LIBS="-L$with_hesiod/lib"
3640   fi
3641   echo $ac_n "checking for res_send""... $ac_c" 1>&6
3642 echo "configure:3643: checking for res_send" >&5
3643 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649 /* System header to define __stub macros and hopefully few prototypes,
3650     which can conflict with char res_send(); below.  */
3651 #include <assert.h>
3652 /* Override any gcc2 internal prototype to avoid an error.  */
3653 /* We use char because int might match the return type of a gcc2
3654     builtin and then its argument prototype would still apply.  */
3655 char res_send();
3656
3657 int main() {
3658
3659 /* The GNU C library defines this for functions which it implements
3660     to always fail with ENOSYS.  Some functions are actually named
3661     something starting with __ and the normal name is an alias.  */
3662 #if defined (__stub_res_send) || defined (__stub___res_send)
3663 choke me
3664 #else
3665 res_send();
3666 #endif
3667
3668 ; return 0; }
3669 EOF
3670 if { (eval echo configure:3671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3671   rm -rf conftest*
3672   eval "ac_cv_func_res_send=yes"
3673 else
3674   echo "configure: failed program was:" >&5
3675   cat conftest.$ac_ext >&5
3676   rm -rf conftest*
3677   eval "ac_cv_func_res_send=no"
3678 fi
3679 rm -f conftest*
3680 fi
3681
3682 if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
3683   echo "$ac_t""yes" 1>&6
3684   :
3685 else
3686   echo "$ac_t""no" 1>&6
3687 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
3688 echo "configure:3689: checking for res_send in -lresolv" >&5
3689 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
3690 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3691   echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693   ac_save_LIBS="$LIBS"
3694 LIBS="-lresolv  $LIBS"
3695 cat > conftest.$ac_ext <<EOF
3696 #line 3697 "configure"
3697 #include "confdefs.h"
3698 /* Override any gcc2 internal prototype to avoid an error.  */
3699 /* We use char because int might match the return type of a gcc2
3700     builtin and then its argument prototype would still apply.  */
3701 char res_send();
3702
3703 int main() {
3704 res_send()
3705 ; return 0; }
3706 EOF
3707 if { (eval echo configure:3708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3708   rm -rf conftest*
3709   eval "ac_cv_lib_$ac_lib_var=yes"
3710 else
3711   echo "configure: failed program was:" >&5
3712   cat conftest.$ac_ext >&5
3713   rm -rf conftest*
3714   eval "ac_cv_lib_$ac_lib_var=no"
3715 fi
3716 rm -f conftest*
3717 LIBS="$ac_save_LIBS"
3718
3719 fi
3720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3721   echo "$ac_t""yes" 1>&6
3722     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
3723     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3724   cat >> confdefs.h <<EOF
3725 #define $ac_tr_lib 1
3726 EOF
3727
3728   LIBS="-lresolv $LIBS"
3729
3730 else
3731   echo "$ac_t""no" 1>&6
3732 fi
3733
3734 fi
3735
3736   echo $ac_n "checking for hes_resolve in -lhesiod""... $ac_c" 1>&6
3737 echo "configure:3738: checking for hes_resolve in -lhesiod" >&5
3738 ac_lib_var=`echo hesiod'_'hes_resolve | sed 'y%./+-%__p_%'`
3739 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3740   echo $ac_n "(cached) $ac_c" 1>&6
3741 else
3742   ac_save_LIBS="$LIBS"
3743 LIBS="-lhesiod $HESIOD_LIBS $LIBS"
3744 cat > conftest.$ac_ext <<EOF
3745 #line 3746 "configure"
3746 #include "confdefs.h"
3747 /* Override any gcc2 internal prototype to avoid an error.  */
3748 /* We use char because int might match the return type of a gcc2
3749     builtin and then its argument prototype would still apply.  */
3750 char hes_resolve();
3751
3752 int main() {
3753 hes_resolve()
3754 ; return 0; }
3755 EOF
3756 if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3757   rm -rf conftest*
3758   eval "ac_cv_lib_$ac_lib_var=yes"
3759 else
3760   echo "configure: failed program was:" >&5
3761   cat conftest.$ac_ext >&5
3762   rm -rf conftest*
3763   eval "ac_cv_lib_$ac_lib_var=no"
3764 fi
3765 rm -f conftest*
3766 LIBS="$ac_save_LIBS"
3767
3768 fi
3769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3770   echo "$ac_t""yes" 1>&6
3771   HESIOD_LIBS="$HESIOD_LIBS -lhesiod"
3772 else
3773   echo "$ac_t""no" 1>&6
3774 { echo "configure: error: Hesiod library not found" 1>&2; exit 1; }
3775 fi
3776
3777 fi
3778
3779 if test x$with_krb4 != x -a x$with_krb4 != xno; then
3780   if test x$with_krb4 != xyes; then
3781     KRB4_INCLUDES="-I$with_krb4/include"
3782     if test -d "$with_krb4/include/kerberosIV"; then
3783       KRB4_INCLUDES="$KRB4_INCLUDES -I$with_krb4/include/kerberosIV"
3784     fi
3785     KRB4_LIBS="-L$with_krb4/lib"
3786   elif test -d /usr/include/kerberosIV; then
3787     KRB4_INCLUDES="-I/usr/include/kerberosIV"
3788   fi
3789   echo $ac_n "checking for krb_rd_req in -lkrb4""... $ac_c" 1>&6
3790 echo "configure:3791: checking for krb_rd_req in -lkrb4" >&5
3791 ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'`
3792 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   ac_save_LIBS="$LIBS"
3796 LIBS="-lkrb4 $KRB4_LIBS -ldes425 -lkrb5 -lcrypto -lcom_err $LIBS"
3797 cat > conftest.$ac_ext <<EOF
3798 #line 3799 "configure"
3799 #include "confdefs.h"
3800 /* Override any gcc2 internal prototype to avoid an error.  */
3801 /* We use char because int might match the return type of a gcc2
3802     builtin and then its argument prototype would still apply.  */
3803 char krb_rd_req();
3804
3805 int main() {
3806 krb_rd_req()
3807 ; return 0; }
3808 EOF
3809 if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3810   rm -rf conftest*
3811   eval "ac_cv_lib_$ac_lib_var=yes"
3812 else
3813   echo "configure: failed program was:" >&5
3814   cat conftest.$ac_ext >&5
3815   rm -rf conftest*
3816   eval "ac_cv_lib_$ac_lib_var=no"
3817 fi
3818 rm -f conftest*
3819 LIBS="$ac_save_LIBS"
3820
3821 fi
3822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3823   echo "$ac_t""yes" 1>&6
3824   KRB4_LIBS="$KRB4_LIBS -lkrb4 -ldes425 -lkrb5 -lcrypto -lcom_err"
3825 else
3826   echo "$ac_t""no" 1>&6
3827 echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6
3828 echo "configure:3829: checking for krb_rd_req in -lkrb" >&5
3829 ac_lib_var=`echo krb'_'krb_rd_req | sed 'y%./+-%__p_%'`
3830 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3831   echo $ac_n "(cached) $ac_c" 1>&6
3832 else
3833   ac_save_LIBS="$LIBS"
3834 LIBS="-lkrb $KRB4_LIBS -ldes $LIBS"
3835 cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 /* Override any gcc2 internal prototype to avoid an error.  */
3839 /* We use char because int might match the return type of a gcc2
3840     builtin and then its argument prototype would still apply.  */
3841 char krb_rd_req();
3842
3843 int main() {
3844 krb_rd_req()
3845 ; return 0; }
3846 EOF
3847 if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3848   rm -rf conftest*
3849   eval "ac_cv_lib_$ac_lib_var=yes"
3850 else
3851   echo "configure: failed program was:" >&5
3852   cat conftest.$ac_ext >&5
3853   rm -rf conftest*
3854   eval "ac_cv_lib_$ac_lib_var=no"
3855 fi
3856 rm -f conftest*
3857 LIBS="$ac_save_LIBS"
3858
3859 fi
3860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3861   echo "$ac_t""yes" 1>&6
3862   KRB4_LIBS="$KRB4_LIBS -lkrb -ldes"
3863 else
3864   echo "$ac_t""no" 1>&6
3865 { echo "configure: error: Kerberos 4 libraries not found" 1>&2; exit 1; }
3866 fi
3867
3868 fi
3869
3870 fi
3871
3872
3873 nmh_save_LIBS="$LIBS"
3874 LIBS="$TERMLIB $LIBS"
3875
3876 echo $ac_n "checking if an include file defines ospeed""... $ac_c" 1>&6
3877 echo "configure:3878: checking if an include file defines ospeed" >&5
3878 if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_include_defines'+set}'`\" = set"; then
3879   echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881   cat > conftest.$ac_ext <<EOF
3882 #line 3883 "configure"
3883 #include "confdefs.h"
3884 #include <sys/types.h>
3885 #if HAVE_TERMIOS_H
3886 #include <termios.h>
3887 #endif
3888 #if HAVE_TERMCAP_H
3889 #include <termcap.h>
3890 #endif
3891 int main() {
3892 ospeed = 0;
3893 ; return 0; }
3894 EOF
3895 if { (eval echo configure:3896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3896   rm -rf conftest*
3897   nmh_cv_decl_ospeed_include_defines=yes
3898 else
3899   echo "configure: failed program was:" >&5
3900   cat conftest.$ac_ext >&5
3901   rm -rf conftest*
3902   nmh_cv_decl_ospeed_include_defines=no
3903 fi
3904 rm -f conftest*
3905 fi
3906
3907 echo "$ac_t""$nmh_cv_decl_ospeed_include_defines" 1>&6
3908  
3909 if test $nmh_cv_decl_ospeed_include_defines = no; then
3910   echo $ac_n "checking if you must define ospeed""... $ac_c" 1>&6
3911 echo "configure:3912: checking if you must define ospeed" >&5
3912 if eval "test \"`echo '$''{'nmh_cv_decl_ospeed_must_define'+set}'`\" = set"; then
3913   echo $ac_n "(cached) $ac_c" 1>&6
3914 else
3915   cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918
3919 int main() {
3920 extern short ospeed; ospeed = 0;
3921 ; return 0; }
3922 EOF
3923 if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3924   rm -rf conftest*
3925   nmh_cv_decl_ospeed_must_define=yes
3926 else
3927   echo "configure: failed program was:" >&5
3928   cat conftest.$ac_ext >&5
3929   rm -rf conftest*
3930   nmh_cv_decl_ospeed_must_define=no
3931 fi
3932 rm -f conftest*
3933 fi
3934
3935 echo "$ac_t""$nmh_cv_decl_ospeed_must_define" 1>&6
3936 fi
3937  
3938 if test $nmh_cv_decl_ospeed_include_defines = yes; then
3939   cat >> confdefs.h <<\EOF
3940 #define HAVE_OSPEED 1
3941 EOF
3942
3943 elif test $nmh_cv_decl_ospeed_must_define = yes; then
3944   cat >> confdefs.h <<\EOF
3945 #define HAVE_OSPEED 1
3946 EOF
3947
3948   cat >> confdefs.h <<\EOF
3949 #define MUST_DEFINE_OSPEED 1
3950 EOF
3951
3952 fi
3953
3954
3955 LIBS="$nmh_save_LIBS"
3956
3957 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3958 echo "configure:3959: checking return type of signal handlers" >&5
3959 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3960   echo $ac_n "(cached) $ac_c" 1>&6
3961 else
3962   cat > conftest.$ac_ext <<EOF
3963 #line 3964 "configure"
3964 #include "confdefs.h"
3965 #include <sys/types.h>
3966 #include <signal.h>
3967 #ifdef signal
3968 #undef signal
3969 #endif
3970 #ifdef __cplusplus
3971 extern "C" void (*signal (int, void (*)(int)))(int);
3972 #else
3973 void (*signal ()) ();
3974 #endif
3975
3976 int main() {
3977 int i;
3978 ; return 0; }
3979 EOF
3980 if { (eval echo configure:3981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3981   rm -rf conftest*
3982   ac_cv_type_signal=void
3983 else
3984   echo "configure: failed program was:" >&5
3985   cat conftest.$ac_ext >&5
3986   rm -rf conftest*
3987   ac_cv_type_signal=int
3988 fi
3989 rm -f conftest*
3990 fi
3991
3992 echo "$ac_t""$ac_cv_type_signal" 1>&6
3993 cat >> confdefs.h <<EOF
3994 #define RETSIGTYPE $ac_cv_type_signal
3995 EOF
3996
3997
3998 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3999 echo "configure:4000: checking for pid_t" >&5
4000 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4001   echo $ac_n "(cached) $ac_c" 1>&6
4002 else
4003   cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006 #include <sys/types.h>
4007 #if STDC_HEADERS
4008 #include <stdlib.h>
4009 #include <stddef.h>
4010 #endif
4011 EOF
4012 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4013   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4014   rm -rf conftest*
4015   ac_cv_type_pid_t=yes
4016 else
4017   rm -rf conftest*
4018   ac_cv_type_pid_t=no
4019 fi
4020 rm -f conftest*
4021
4022 fi
4023 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4024 if test $ac_cv_type_pid_t = no; then
4025   cat >> confdefs.h <<\EOF
4026 #define pid_t int
4027 EOF
4028
4029 fi
4030
4031 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4032 echo "configure:4033: checking for off_t" >&5
4033 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
4034   echo $ac_n "(cached) $ac_c" 1>&6
4035 else
4036   cat > conftest.$ac_ext <<EOF
4037 #line 4038 "configure"
4038 #include "confdefs.h"
4039 #include <sys/types.h>
4040 #if STDC_HEADERS
4041 #include <stdlib.h>
4042 #include <stddef.h>
4043 #endif
4044 EOF
4045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4046   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4047   rm -rf conftest*
4048   ac_cv_type_off_t=yes
4049 else
4050   rm -rf conftest*
4051   ac_cv_type_off_t=no
4052 fi
4053 rm -f conftest*
4054
4055 fi
4056 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4057 if test $ac_cv_type_off_t = no; then
4058   cat >> confdefs.h <<\EOF
4059 #define off_t long
4060 EOF
4061
4062 fi
4063
4064 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
4065 echo "configure:4066: checking for uid_t in sys/types.h" >&5
4066 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
4067   echo $ac_n "(cached) $ac_c" 1>&6
4068 else
4069   cat > conftest.$ac_ext <<EOF
4070 #line 4071 "configure"
4071 #include "confdefs.h"
4072 #include <sys/types.h>
4073 EOF
4074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4075   egrep "uid_t" >/dev/null 2>&1; then
4076   rm -rf conftest*
4077   ac_cv_type_uid_t=yes
4078 else
4079   rm -rf conftest*
4080   ac_cv_type_uid_t=no
4081 fi
4082 rm -f conftest*
4083
4084 fi
4085
4086 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
4087 if test $ac_cv_type_uid_t = no; then
4088   cat >> confdefs.h <<\EOF
4089 #define uid_t int
4090 EOF
4091
4092   cat >> confdefs.h <<\EOF
4093 #define gid_t int
4094 EOF
4095
4096 fi
4097
4098 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
4099 echo "configure:4100: checking for mode_t" >&5
4100 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
4101   echo $ac_n "(cached) $ac_c" 1>&6
4102 else
4103   cat > conftest.$ac_ext <<EOF
4104 #line 4105 "configure"
4105 #include "confdefs.h"
4106 #include <sys/types.h>
4107 #if STDC_HEADERS
4108 #include <stdlib.h>
4109 #include <stddef.h>
4110 #endif
4111 EOF
4112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4113   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4114   rm -rf conftest*
4115   ac_cv_type_mode_t=yes
4116 else
4117   rm -rf conftest*
4118   ac_cv_type_mode_t=no
4119 fi
4120 rm -f conftest*
4121
4122 fi
4123 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4124 if test $ac_cv_type_mode_t = no; then
4125   cat >> confdefs.h <<\EOF
4126 #define mode_t int
4127 EOF
4128
4129 fi
4130
4131 echo $ac_n "checking for size_t""... $ac_c" 1>&6
4132 echo "configure:4133: checking for size_t" >&5
4133 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
4134   echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136   cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 #include <sys/types.h>
4140 #if STDC_HEADERS
4141 #include <stdlib.h>
4142 #include <stddef.h>
4143 #endif
4144 EOF
4145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4146   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4147   rm -rf conftest*
4148   ac_cv_type_size_t=yes
4149 else
4150   rm -rf conftest*
4151   ac_cv_type_size_t=no
4152 fi
4153 rm -f conftest*
4154
4155 fi
4156 echo "$ac_t""$ac_cv_type_size_t" 1>&6
4157 if test $ac_cv_type_size_t = no; then
4158   cat >> confdefs.h <<\EOF
4159 #define size_t unsigned
4160 EOF
4161
4162 fi
4163
4164
4165 echo $ac_n "checking for sigset_t""... $ac_c" 1>&6
4166 echo "configure:4167: checking for sigset_t" >&5
4167 if eval "test \"`echo '$''{'nmh_cv_type_sigset_t'+set}'`\" = set"; then
4168   echo $ac_n "(cached) $ac_c" 1>&6
4169 else
4170   cat > conftest.$ac_ext <<EOF
4171 #line 4172 "configure"
4172 #include "confdefs.h"
4173 #include <sys/types.h>
4174 #include <signal.h>
4175 int main() {
4176 sigset_t tempsigset;
4177 ; return 0; }
4178 EOF
4179 if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4180   rm -rf conftest*
4181   nmh_cv_type_sigset_t=yes
4182 else
4183   echo "configure: failed program was:" >&5
4184   cat conftest.$ac_ext >&5
4185   rm -rf conftest*
4186   nmh_cv_type_sigset_t=no
4187 fi
4188 rm -f conftest*
4189 fi
4190
4191 echo "$ac_t""$nmh_cv_type_sigset_t" 1>&6
4192 if test $nmh_cv_type_sigset_t = no; then
4193   cat >> confdefs.h <<\EOF
4194 #define sigset_t unsigned int
4195 EOF
4196
4197 fi
4198
4199 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
4200 echo "configure:4201: checking for st_blksize in struct stat" >&5
4201 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
4202   echo $ac_n "(cached) $ac_c" 1>&6
4203 else
4204   cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207 #include <sys/types.h>
4208 #include <sys/stat.h>
4209 int main() {
4210 struct stat s; s.st_blksize;
4211 ; return 0; }
4212 EOF
4213 if { (eval echo configure:4214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4214   rm -rf conftest*
4215   ac_cv_struct_st_blksize=yes
4216 else
4217   echo "configure: failed program was:" >&5
4218   cat conftest.$ac_ext >&5
4219   rm -rf conftest*
4220   ac_cv_struct_st_blksize=no
4221 fi
4222 rm -f conftest*
4223 fi
4224
4225 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
4226 if test $ac_cv_struct_st_blksize = yes; then
4227   cat >> confdefs.h <<\EOF
4228 #define HAVE_ST_BLKSIZE 1
4229 EOF
4230
4231 fi
4232
4233
4234 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
4235 echo "configure:4236: checking for tm_gmtoff in struct tm" >&5
4236 if eval "test \"`echo '$''{'nmh_cv_struct_tm_gmtoff'+set}'`\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   cat > conftest.$ac_ext <<EOF
4240 #line 4241 "configure"
4241 #include "confdefs.h"
4242 #ifdef TIME_WITH_SYS_TIME
4243 # include <sys/time.h>
4244 # include <time.h>
4245 #else
4246 # ifdef TM_IN_SYS_TIME
4247 #  include <sys/time.h>
4248 # else
4249 #  include <time.h>
4250 # endif
4251 #endif
4252 int main() {
4253 struct tm temptm; temptm.tm_gmtoff = 0;
4254 ; return 0; }
4255 EOF
4256 if { (eval echo configure:4257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4257   rm -rf conftest*
4258   nmh_cv_struct_tm_gmtoff=yes
4259 else
4260   echo "configure: failed program was:" >&5
4261   cat conftest.$ac_ext >&5
4262   rm -rf conftest*
4263   nmh_cv_struct_tm_gmtoff=no
4264 fi
4265 rm -f conftest*
4266 fi
4267
4268 echo "$ac_t""$nmh_cv_struct_tm_gmtoff" 1>&6
4269 if test $nmh_cv_struct_tm_gmtoff = yes; then
4270   cat >> confdefs.h <<\EOF
4271 #define HAVE_TM_GMTOFF 1
4272 EOF
4273
4274 fi
4275
4276 echo $ac_n "checking what style of signals to use""... $ac_c" 1>&6
4277 echo "configure:4278: checking what style of signals to use" >&5
4278 if test $ac_cv_func_sigaction = yes -a $ac_cv_func_sigprocmask = yes; then
4279   signals_style=POSIX_SIGNALS
4280   cat >> confdefs.h <<\EOF
4281 #define POSIX_SIGNALS 1
4282 EOF
4283
4284   cat >> confdefs.h <<\EOF
4285 #define RELIABLE_SIGNALS 1
4286 EOF
4287
4288 elif test $ac_cv_func_sigblock = yes -a $ac_cv_func_sigsetmask = yes; then
4289   signals_style=BSD_SIGNALS
4290   cat >> confdefs.h <<\EOF
4291 #define BSD_SIGNALS 1
4292 EOF
4293
4294   cat >> confdefs.h <<\EOF
4295 #define RELIABLE_SIGNALS 1
4296 EOF
4297
4298 elif test $ac_cv_func_sighold = yes -a $ac_cv_func_sigrelse = yes; then
4299   signals_style=SYSV_SIGNALS
4300   cat >> confdefs.h <<\EOF
4301 #define SYSV_SIGNALS 1
4302 EOF
4303
4304 else
4305   signals_style=NO_SIGNAL_BLOCKING
4306   cat >> confdefs.h <<\EOF
4307 #define NO_SIGNAL_BLOCKING 1
4308 EOF
4309
4310 fi
4311
4312 echo "$ac_t""$signals_style" 1>&6
4313
4314 echo $ac_n "checking where signal.h is located""... $ac_c" 1>&6
4315 echo "configure:4316: checking where signal.h is located" >&5
4316 if eval "test \"`echo '$''{'nmh_cv_path_signal_h'+set}'`\" = set"; then
4317   echo $ac_n "(cached) $ac_c" 1>&6
4318 else
4319   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
4320   test -f $SIGNAL_H && \
4321   grep '#[      ]*define[       ][      ]*SIG[0-9A-Z]*[         ]*[0-9][0-9]*' $SIGNAL_H > /dev/null && \
4322   break
4323 done
4324 nmh_cv_path_signal_h=$SIGNAL_H
4325
4326 fi
4327
4328 echo "$ac_t""$nmh_cv_path_signal_h" 1>&6
4329 SIGNAL_H=$nmh_cv_path_signal_h
4330
4331 case "$target_os" in
4332
4333   solaris2*)
4334     cat >> confdefs.h <<\EOF
4335 #define SYS5 1
4336 EOF
4337
4338     cat >> confdefs.h <<\EOF
4339 #define SVR4 1
4340 EOF
4341
4342     ;;
4343   irix*)
4344     cat >> confdefs.h <<\EOF
4345 #define SYS5 1
4346 EOF
4347
4348     cat >> confdefs.h <<\EOF
4349 #define SVR4 1
4350 EOF
4351
4352     ;;
4353   osf*)
4354     cat >> confdefs.h <<\EOF
4355 #define SYS5 1
4356 EOF
4357
4358     cat >> confdefs.h <<\EOF
4359 #define SVR4 1
4360 EOF
4361
4362     ;;
4363   aix*)
4364     cat >> confdefs.h <<\EOF
4365 #define SYS5 1
4366 EOF
4367
4368     cat >> confdefs.h <<\EOF
4369 #define SVR4 1
4370 EOF
4371
4372     ;;
4373   sunos4*)
4374     cat >> confdefs.h <<\EOF
4375 #define BSD42 1
4376 EOF
4377
4378     ;;
4379   freebsd*)  
4380     cat >> confdefs.h <<\EOF
4381 #define BSD42 1
4382 EOF
4383
4384     cat >> confdefs.h <<\EOF
4385 #define BSD44 1
4386 EOF
4387
4388     ;;
4389   netbsd*)
4390     cat >> confdefs.h <<\EOF
4391 #define BSD42 1
4392 EOF
4393
4394     cat >> confdefs.h <<\EOF
4395 #define BSD44 1
4396 EOF
4397
4398     ;;
4399   openbsd*)
4400     cat >> confdefs.h <<\EOF
4401 #define BSD42 1
4402 EOF
4403
4404     cat >> confdefs.h <<\EOF
4405 #define BSD44 1
4406 EOF
4407
4408     ;;
4409   bsd/os*)
4410     cat >> confdefs.h <<\EOF
4411 #define BSD42 1
4412 EOF
4413
4414     cat >> confdefs.h <<\EOF
4415 #define BSD44 1
4416 EOF
4417
4418     ;;
4419   sco5*)
4420     cat >> confdefs.h <<\EOF
4421 #define SYS5 1
4422 EOF
4423
4424     cat >> confdefs.h <<\EOF
4425 #define SCO_5_STDIO 1
4426 EOF
4427
4428     ;;
4429 esac
4430
4431
4432 trap '' 1 2 15
4433 cat > confcache <<\EOF
4434 # This file is a shell script that caches the results of configure
4435 # tests run on this system so they can be shared between configure
4436 # scripts and configure runs.  It is not useful on other systems.
4437 # If it contains results you don't want to keep, you may remove or edit it.
4438 #
4439 # By default, configure uses ./config.cache as the cache file,
4440 # creating it if it does not exist already.  You can give configure
4441 # the --cache-file=FILE option to use a different cache file; that is
4442 # what configure does when it calls configure scripts in
4443 # subdirectories, so they share the cache.
4444 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4445 # config.status only pays attention to the cache file if you give it the
4446 # --recheck option to rerun configure.
4447 #
4448 EOF
4449 # The following way of writing the cache mishandles newlines in values,
4450 # but we know of no workaround that is simple, portable, and efficient.
4451 # So, don't put newlines in cache variables' values.
4452 # Ultrix sh set writes to stderr and can't be redirected directly,
4453 # and sets the high bit in the cache file unless we assign to the vars.
4454 (set) 2>&1 |
4455   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4456   *ac_space=\ *)
4457     # `set' does not quote correctly, so add quotes (double-quote substitution
4458     # turns \\\\ into \\, and sed turns \\ into \).
4459     sed -n \
4460       -e "s/'/'\\\\''/g" \
4461       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4462     ;;
4463   *)
4464     # `set' quotes correctly as required by POSIX, so do not add quotes.
4465     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4466     ;;
4467   esac >> confcache
4468 if cmp -s $cache_file confcache; then
4469   :
4470 else
4471   if test -w $cache_file; then
4472     echo "updating cache $cache_file"
4473     cat confcache > $cache_file
4474   else
4475     echo "not updating unwritable cache $cache_file"
4476   fi
4477 fi
4478 rm -f confcache
4479
4480 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4481
4482 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4483 # Let make expand exec_prefix.
4484 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4485
4486 # Any assignment to VPATH causes Sun make to only execute
4487 # the first set of double-colon rules, so remove it if not needed.
4488 # If there is a colon in the path, we need to keep it.
4489 if test "x$srcdir" = x.; then
4490   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4491 fi
4492
4493 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4494
4495 DEFS=-DHAVE_CONFIG_H
4496
4497 # Without the "./", some shells look in PATH for config.status.
4498 : ${CONFIG_STATUS=./config.status}
4499
4500 echo creating $CONFIG_STATUS
4501 rm -f $CONFIG_STATUS
4502 cat > $CONFIG_STATUS <<EOF
4503 #! /bin/sh
4504 # Generated automatically by configure.
4505 # Run this file to recreate the current configuration.
4506 # This directory was configured as follows,
4507 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4508 #
4509 # $0 $ac_configure_args
4510 #
4511 # Compiler output produced by configure, useful for debugging
4512 # configure, is in ./config.log if it exists.
4513
4514 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4515 for ac_option
4516 do
4517   case "\$ac_option" in
4518   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4519     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4520     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4521   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4522     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4523     exit 0 ;;
4524   -help | --help | --hel | --he | --h)
4525     echo "\$ac_cs_usage"; exit 0 ;;
4526   *) echo "\$ac_cs_usage"; exit 1 ;;
4527   esac
4528 done
4529
4530 ac_given_srcdir=$srcdir
4531 ac_given_INSTALL="$INSTALL"
4532
4533 trap 'rm -fr `echo "Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
4534           zotnet/Makefile zotnet/mts/Makefile zotnet/tws/Makefile \
4535           zotnet/mf/Makefile zotnet/bboards/Makefile mts/Makefile \
4536           mts/smtp/Makefile mts/sendmail/Makefile mts/mmdf/Makefile \
4537           etc/Makefile man/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4538 EOF
4539 cat >> $CONFIG_STATUS <<EOF
4540
4541 # Protect against being on the right side of a sed subst in config.status.
4542 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4543  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4544 $ac_vpsub
4545 $extrasub
4546 s%@SHELL@%$SHELL%g
4547 s%@CFLAGS@%$CFLAGS%g
4548 s%@CPPFLAGS@%$CPPFLAGS%g
4549 s%@CXXFLAGS@%$CXXFLAGS%g
4550 s%@FFLAGS@%$FFLAGS%g
4551 s%@DEFS@%$DEFS%g
4552 s%@LDFLAGS@%$LDFLAGS%g
4553 s%@LIBS@%$LIBS%g
4554 s%@exec_prefix@%$exec_prefix%g
4555 s%@prefix@%$prefix%g
4556 s%@program_transform_name@%$program_transform_name%g
4557 s%@bindir@%$bindir%g
4558 s%@sbindir@%$sbindir%g
4559 s%@libexecdir@%$libexecdir%g
4560 s%@datadir@%$datadir%g
4561 s%@sysconfdir@%$sysconfdir%g
4562 s%@sharedstatedir@%$sharedstatedir%g
4563 s%@localstatedir@%$localstatedir%g
4564 s%@libdir@%$libdir%g
4565 s%@includedir@%$includedir%g
4566 s%@oldincludedir@%$oldincludedir%g
4567 s%@infodir@%$infodir%g
4568 s%@mandir@%$mandir%g
4569 s%@host@%$host%g
4570 s%@host_alias@%$host_alias%g
4571 s%@host_cpu@%$host_cpu%g
4572 s%@host_vendor@%$host_vendor%g
4573 s%@host_os@%$host_os%g
4574 s%@target@%$target%g
4575 s%@target_alias@%$target_alias%g
4576 s%@target_cpu@%$target_cpu%g
4577 s%@target_vendor@%$target_vendor%g
4578 s%@target_os@%$target_os%g
4579 s%@build@%$build%g
4580 s%@build_alias@%$build_alias%g
4581 s%@build_cpu@%$build_cpu%g
4582 s%@build_vendor@%$build_vendor%g
4583 s%@build_os@%$build_os%g
4584 s%@VERSION@%$VERSION%g
4585 s%@MTS@%$MTS%g
4586 s%@MTSLIB@%$MTSLIB%g
4587 s%@POPLIB@%$POPLIB%g
4588 s%@POPSED@%$POPSED%g
4589 s%@CC@%$CC%g
4590 s%@SET_MAKE@%$SET_MAKE%g
4591 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4592 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4593 s%@INSTALL_DATA@%$INSTALL_DATA%g
4594 s%@RANLIB@%$RANLIB%g
4595 s%@AWK@%$AWK%g
4596 s%@LEX@%$LEX%g
4597 s%@LEXLIB@%$LEXLIB%g
4598 s%@cutpath@%$cutpath%g
4599 s%@LIBTOOL@%$LIBTOOL%g
4600 s%@GNU_LIBTOOL@%$GNU_LIBTOOL%g
4601 s%@LORDER@%$LORDER%g
4602 s%@TSORT@%$TSORT%g
4603 s%@lspath@%$lspath%g
4604 s%@morepath@%$morepath%g
4605 s%@pagerpath@%$pagerpath%g
4606 s%@sendmailpath@%$sendmailpath%g
4607 s%@vipath@%$vipath%g
4608 s%@editorpath@%$editorpath%g
4609 s%@mailspool@%$mailspool%g
4610 s%@SETGID_MAIL@%$SETGID_MAIL%g
4611 s%@MAIL_SPOOL_GRP@%$MAIL_SPOOL_GRP%g
4612 s%@CPP@%$CPP%g
4613 s%@LIBOBJS@%$LIBOBJS%g
4614 s%@TERMLIB@%$TERMLIB%g
4615 s%@HESIOD_INCLUDES@%$HESIOD_INCLUDES%g
4616 s%@HESIOD_LIBS@%$HESIOD_LIBS%g
4617 s%@KRB4_INCLUDES@%$KRB4_INCLUDES%g
4618 s%@KRB4_LIBS@%$KRB4_LIBS%g
4619 s%@SIGNAL_H@%$SIGNAL_H%g
4620
4621 CEOF
4622 EOF
4623
4624 cat >> $CONFIG_STATUS <<\EOF
4625
4626 # Split the substitutions into bite-sized pieces for seds with
4627 # small command number limits, like on Digital OSF/1 and HP-UX.
4628 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4629 ac_file=1 # Number of current file.
4630 ac_beg=1 # First line for current file.
4631 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4632 ac_more_lines=:
4633 ac_sed_cmds=""
4634 while $ac_more_lines; do
4635   if test $ac_beg -gt 1; then
4636     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4637   else
4638     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4639   fi
4640   if test ! -s conftest.s$ac_file; then
4641     ac_more_lines=false
4642     rm -f conftest.s$ac_file
4643   else
4644     if test -z "$ac_sed_cmds"; then
4645       ac_sed_cmds="sed -f conftest.s$ac_file"
4646     else
4647       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4648     fi
4649     ac_file=`expr $ac_file + 1`
4650     ac_beg=$ac_end
4651     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4652   fi
4653 done
4654 if test -z "$ac_sed_cmds"; then
4655   ac_sed_cmds=cat
4656 fi
4657 EOF
4658
4659 cat >> $CONFIG_STATUS <<EOF
4660
4661 CONFIG_FILES=\${CONFIG_FILES-"Makefile config/Makefile h/Makefile sbr/Makefile uip/Makefile \
4662           zotnet/Makefile zotnet/mts/Makefile zotnet/tws/Makefile \
4663           zotnet/mf/Makefile zotnet/bboards/Makefile mts/Makefile \
4664           mts/smtp/Makefile mts/sendmail/Makefile mts/mmdf/Makefile \
4665           etc/Makefile man/Makefile"}
4666 EOF
4667 cat >> $CONFIG_STATUS <<\EOF
4668 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4669   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4670   case "$ac_file" in
4671   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4672        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4673   *) ac_file_in="${ac_file}.in" ;;
4674   esac
4675
4676   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4677
4678   # Remove last slash and all that follows it.  Not all systems have dirname.
4679   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4680   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4681     # The file is in a subdirectory.
4682     test ! -d "$ac_dir" && mkdir "$ac_dir"
4683     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4684     # A "../" for each directory in $ac_dir_suffix.
4685     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4686   else
4687     ac_dir_suffix= ac_dots=
4688   fi
4689
4690   case "$ac_given_srcdir" in
4691   .)  srcdir=.
4692       if test -z "$ac_dots"; then top_srcdir=.
4693       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4694   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4695   *) # Relative path.
4696     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4697     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4698   esac
4699
4700   case "$ac_given_INSTALL" in
4701   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4702   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4703   esac
4704
4705   echo creating "$ac_file"
4706   rm -f "$ac_file"
4707   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4708   case "$ac_file" in
4709   *Makefile*) ac_comsub="1i\\
4710 # $configure_input" ;;
4711   *) ac_comsub= ;;
4712   esac
4713
4714   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4715   sed -e "$ac_comsub
4716 s%@configure_input@%$configure_input%g
4717 s%@srcdir@%$srcdir%g
4718 s%@top_srcdir@%$top_srcdir%g
4719 s%@INSTALL@%$INSTALL%g
4720 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4721 fi; done
4722 rm -f conftest.s*
4723
4724 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4725 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4726 #
4727 # ac_d sets the value in "#define NAME VALUE" lines.
4728 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4729 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4730 ac_dC='\3'
4731 ac_dD='%g'
4732 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4733 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4734 ac_uB='\([      ]\)%\1#\2define\3'
4735 ac_uC=' '
4736 ac_uD='\4%g'
4737 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4738 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4739 ac_eB='$%\1#\2define\3'
4740 ac_eC=' '
4741 ac_eD='%g'
4742
4743 if test "${CONFIG_HEADERS+set}" != set; then
4744 EOF
4745 cat >> $CONFIG_STATUS <<EOF
4746   CONFIG_HEADERS="config.h"
4747 EOF
4748 cat >> $CONFIG_STATUS <<\EOF
4749 fi
4750 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4751   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4752   case "$ac_file" in
4753   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4754        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4755   *) ac_file_in="${ac_file}.in" ;;
4756   esac
4757
4758   echo creating $ac_file
4759
4760   rm -f conftest.frag conftest.in conftest.out
4761   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4762   cat $ac_file_inputs > conftest.in
4763
4764 EOF
4765
4766 # Transform confdefs.h into a sed script conftest.vals that substitutes
4767 # the proper values into config.h.in to produce config.h.  And first:
4768 # Protect against being on the right side of a sed subst in config.status.
4769 # Protect against being in an unquoted here document in config.status.
4770 rm -f conftest.vals
4771 cat > conftest.hdr <<\EOF
4772 s/[\\&%]/\\&/g
4773 s%[\\$`]%\\&%g
4774 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4775 s%ac_d%ac_u%gp
4776 s%ac_u%ac_e%gp
4777 EOF
4778 sed -n -f conftest.hdr confdefs.h > conftest.vals
4779 rm -f conftest.hdr
4780
4781 # This sed command replaces #undef with comments.  This is necessary, for
4782 # example, in the case of _POSIX_SOURCE, which is predefined and required
4783 # on some systems where configure will not decide to define it.
4784 cat >> conftest.vals <<\EOF
4785 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4786 EOF
4787
4788 # Break up conftest.vals because some shells have a limit on
4789 # the size of here documents, and old seds have small limits too.
4790
4791 rm -f conftest.tail
4792 while :
4793 do
4794   ac_lines=`grep -c . conftest.vals`
4795   # grep -c gives empty output for an empty file on some AIX systems.
4796   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4797   # Write a limited-size here document to conftest.frag.
4798   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4799   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4800   echo 'CEOF
4801   sed -f conftest.frag conftest.in > conftest.out
4802   rm -f conftest.in
4803   mv conftest.out conftest.in
4804 ' >> $CONFIG_STATUS
4805   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4806   rm -f conftest.vals
4807   mv conftest.tail conftest.vals
4808 done
4809 rm -f conftest.vals
4810
4811 cat >> $CONFIG_STATUS <<\EOF
4812   rm -f conftest.frag conftest.h
4813   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4814   cat conftest.in >> conftest.h
4815   rm -f conftest.in
4816   if cmp -s $ac_file conftest.h 2>/dev/null; then
4817     echo "$ac_file is unchanged"
4818     rm -f conftest.h
4819   else
4820     # Remove last slash and all that follows it.  Not all systems have dirname.
4821       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4822       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4823       # The file is in a subdirectory.
4824       test ! -d "$ac_dir" && mkdir "$ac_dir"
4825     fi
4826     rm -f $ac_file
4827     mv conftest.h $ac_file
4828   fi
4829 fi; done
4830
4831 EOF
4832 cat >> $CONFIG_STATUS <<EOF
4833
4834 EOF
4835 cat >> $CONFIG_STATUS <<\EOF
4836 \
4837           test -z "$CONFIG_HEADERS" || echo > stamp-h
4838 exit 0
4839 EOF
4840 chmod +x $CONFIG_STATUS
4841 rm -fr confdefs* $ac_clean_files
4842 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4843
4844
4845 eval "nmhbin=${bindir}";         eval "nmhbin2=${nmhbin}"
4846 eval "nmhsysconf=${sysconfdir}"; eval "nmhsysconf2=${nmhsysconf}"
4847 eval "nmhlib=${libdir}";         eval "nmhlib2=${nmhlib}"
4848 eval "nmhman=${mandir}"
4849
4850 echo "
4851 nmh configuration
4852 -----------------
4853 nmh version               : ${VERSION}
4854 target os                 : ${target}
4855 compiler                  : ${CC}
4856 compiler flags            : ${CFLAGS}
4857 linker flags              : ${LDFLAGS}
4858 source code location      : ${srcdir}
4859 binary install path       : ${nmhbin2}
4860 libary install path       : ${nmhlib2}
4861 config files install path : ${nmhsysconf2}
4862 man page install path     : ${nmhman}
4863 transport system          : ${MTS}
4864 default editor            : ${editorpath}
4865 default pager             : ${pagerpath}"
4866 echo ""