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