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