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