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