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