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