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