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