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