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