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