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