Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / crypto / kerberosIV / configure
1 #! /bin/sh
2
3 # From configure.in Revision: 1.432.2.14 
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61 # Define a conditional.
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121 # Guess values for system-dependent variables and create Makefiles.
122 # Generated automatically using autoconf version 2.13 
123 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
124 #
125 # This configure script is free software; the Free Software Foundation
126 # gives unlimited permission to copy, distribute and modify it.
127
128 # Defaults:
129 ac_help=
130 ac_default_prefix=/usr/local
131 # Any additions from configure.in:
132 ac_default_prefix=/usr/athena
133 ac_help="$ac_help
134   --with-socks=dir                use socks in dir"
135 ac_help="$ac_help
136   --with-socks-lib=dir            use socks libraries in dir"
137 ac_help="$ac_help
138   --with-socks-include=dir        use socks headers in dir"
139 ac_help="$ac_help
140   --enable-legacy-kdestroy    kdestroy doesn't destroy tokens by default"
141 ac_help="$ac_help
142   --enable-match-subdomains     match realm in subdomains"
143 ac_help="$ac_help
144   --with-ld-flags=flags   what flags use when linking"
145 ac_help="$ac_help
146   --with-cracklib=dir     use the cracklib.a in dir"
147 ac_help="$ac_help
148   --with-dictpath=path    use this dictionary with cracklib
149 "
150 ac_help="$ac_help
151   --with-mailspool=dir    this is the mail spool directory
152 "
153 ac_help="$ac_help
154   --with-db-dir=dir        this is the database directory (default /var/kerberos)"
155 ac_help="$ac_help
156   --enable-random-mkey    use new code for master keys"
157 ac_help="$ac_help
158   --with-mkey=file        where to put the master key"
159 ac_help="$ac_help
160   --disable-otp           if you don't want OTP support"
161 ac_help="$ac_help
162   --enable-osfc2          enable some OSF C2 support"
163 ac_help="$ac_help
164   --disable-mmap          disable use of mmap"
165 ac_help="$ac_help
166   --disable-dynamic-afs   don't use loaded AFS library with AIX"
167 ac_help="$ac_help
168   --without-berkeley-db   if you don't want berkeley db"
169 ac_help="$ac_help
170   --without-afs-support   if you don't want support for afs"
171 ac_help="$ac_help
172   --with-des-quad-checksum=kind
173                            default checksum to use (new, old, or guess)"
174 ac_help="$ac_help
175   --with-afsws=dir        use AFS includes and libraries from dir=/usr/afsws"
176 ac_help="$ac_help
177   --enable-rxkad           build rxkad library"
178 ac_help="$ac_help
179   --disable-cat-manpages   don't install any preformatted manpages"
180 ac_help="$ac_help
181   --with-readline=dir                use readline in dir"
182 ac_help="$ac_help
183   --with-readline-lib=dir            use readline libraries in dir"
184 ac_help="$ac_help
185   --with-readline-include=dir        use readline headers in dir"
186 ac_help="$ac_help
187   --with-mips-abi=abi     ABI to use for IRIX (32, n32, or 64)"
188 ac_help="$ac_help
189   --with-hesiod=dir                use hesiod in dir"
190 ac_help="$ac_help
191   --with-hesiod-lib=dir            use hesiod libraries in dir"
192 ac_help="$ac_help
193   --with-hesiod-include=dir        use hesiod headers in dir"
194 ac_help="$ac_help
195   --enable-shared         create shared libraries for Kerberos"
196 ac_help="$ac_help
197   --with-x                use the X Window System"
198
199 # Initialize some variables set by options.
200 # The variables have the same names as the options, with
201 # dashes changed to underlines.
202 build=NONE
203 cache_file=./config.cache
204 exec_prefix=NONE
205 host=NONE
206 no_create=
207 nonopt=NONE
208 no_recursion=
209 prefix=NONE
210 program_prefix=NONE
211 program_suffix=NONE
212 program_transform_name=s,x,x,
213 silent=
214 site=
215 srcdir=
216 target=NONE
217 verbose=
218 x_includes=NONE
219 x_libraries=NONE
220 bindir='${exec_prefix}/bin'
221 sbindir='${exec_prefix}/sbin'
222 libexecdir='${exec_prefix}/libexec'
223 datadir='${prefix}/share'
224 sysconfdir='${prefix}/etc'
225 sharedstatedir='${prefix}/com'
226 localstatedir='${prefix}/var'
227 libdir='${exec_prefix}/lib'
228 includedir='${prefix}/include'
229 oldincludedir='/usr/include'
230 infodir='${prefix}/info'
231 mandir='${prefix}/man'
232
233 # Initialize some other variables.
234 subdirs=
235 MFLAGS= MAKEFLAGS=
236 SHELL=${CONFIG_SHELL-/bin/sh}
237 # Maximum number of lines to put in a shell here document.
238 ac_max_here_lines=12
239
240 ac_prev=
241 for ac_option
242 do
243
244   # If the previous option needs an argument, assign it.
245   if test -n "$ac_prev"; then
246     eval "$ac_prev=\$ac_option"
247     ac_prev=
248     continue
249   fi
250
251   case "$ac_option" in
252   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
253   *) ac_optarg= ;;
254   esac
255
256   # Accept the important Cygnus configure options, so we can diagnose typos.
257
258   case "$ac_option" in
259
260   -bindir | --bindir | --bindi | --bind | --bin | --bi)
261     ac_prev=bindir ;;
262   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
263     bindir="$ac_optarg" ;;
264
265   -build | --build | --buil | --bui | --bu)
266     ac_prev=build ;;
267   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
268     build="$ac_optarg" ;;
269
270   -cache-file | --cache-file | --cache-fil | --cache-fi \
271   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
272     ac_prev=cache_file ;;
273   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
274   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
275     cache_file="$ac_optarg" ;;
276
277   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
278     ac_prev=datadir ;;
279   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
280   | --da=*)
281     datadir="$ac_optarg" ;;
282
283   -disable-* | --disable-*)
284     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
285     # Reject names that are not valid shell variable names.
286     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
287       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
288     fi
289     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
290     eval "enable_${ac_feature}=no" ;;
291
292   -enable-* | --enable-*)
293     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
294     # Reject names that are not valid shell variable names.
295     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
296       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
297     fi
298     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
299     case "$ac_option" in
300       *=*) ;;
301       *) ac_optarg=yes ;;
302     esac
303     eval "enable_${ac_feature}='$ac_optarg'" ;;
304
305   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
306   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
307   | --exec | --exe | --ex)
308     ac_prev=exec_prefix ;;
309   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
310   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
311   | --exec=* | --exe=* | --ex=*)
312     exec_prefix="$ac_optarg" ;;
313
314   -gas | --gas | --ga | --g)
315     # Obsolete; use --with-gas.
316     with_gas=yes ;;
317
318   -help | --help | --hel | --he)
319     # Omit some internal or obsolete options to make the list less imposing.
320     # This message is too long to be a string in the A/UX 3.1 sh.
321     cat << EOF
322 Usage: configure [options] [host]
323 Options: [defaults in brackets after descriptions]
324 Configuration:
325   --cache-file=FILE       cache test results in FILE
326   --help                  print this message
327   --no-create             do not create output files
328   --quiet, --silent       do not print \`checking...' messages
329   --version               print the version of autoconf that created configure
330 Directory and file names:
331   --prefix=PREFIX         install architecture-independent files in PREFIX
332                           [$ac_default_prefix]
333   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
334                           [same as prefix]
335   --bindir=DIR            user executables in DIR [EPREFIX/bin]
336   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
337   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
338   --datadir=DIR           read-only architecture-independent data in DIR
339                           [PREFIX/share]
340   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
341   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
342                           [PREFIX/com]
343   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
344   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
345   --includedir=DIR        C header files in DIR [PREFIX/include]
346   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
347   --infodir=DIR           info documentation in DIR [PREFIX/info]
348   --mandir=DIR            man documentation in DIR [PREFIX/man]
349   --srcdir=DIR            find the sources in DIR [configure dir or ..]
350   --program-prefix=PREFIX prepend PREFIX to installed program names
351   --program-suffix=SUFFIX append SUFFIX to installed program names
352   --program-transform-name=PROGRAM
353                           run sed PROGRAM on installed program names
354 EOF
355     cat << EOF
356 Host type:
357   --build=BUILD           configure for building on BUILD [BUILD=HOST]
358   --host=HOST             configure for HOST [guessed]
359   --target=TARGET         configure for TARGET [TARGET=HOST]
360 Features and packages:
361   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
362   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
363   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
364   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
365   --x-includes=DIR        X include files are in DIR
366   --x-libraries=DIR       X library files are in DIR
367 EOF
368     if test -n "$ac_help"; then
369       echo "--enable and --with options recognized:$ac_help"
370     fi
371     exit 0 ;;
372
373   -host | --host | --hos | --ho)
374     ac_prev=host ;;
375   -host=* | --host=* | --hos=* | --ho=*)
376     host="$ac_optarg" ;;
377
378   -includedir | --includedir | --includedi | --included | --include \
379   | --includ | --inclu | --incl | --inc)
380     ac_prev=includedir ;;
381   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
382   | --includ=* | --inclu=* | --incl=* | --inc=*)
383     includedir="$ac_optarg" ;;
384
385   -infodir | --infodir | --infodi | --infod | --info | --inf)
386     ac_prev=infodir ;;
387   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
388     infodir="$ac_optarg" ;;
389
390   -libdir | --libdir | --libdi | --libd)
391     ac_prev=libdir ;;
392   -libdir=* | --libdir=* | --libdi=* | --libd=*)
393     libdir="$ac_optarg" ;;
394
395   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
396   | --libexe | --libex | --libe)
397     ac_prev=libexecdir ;;
398   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
399   | --libexe=* | --libex=* | --libe=*)
400     libexecdir="$ac_optarg" ;;
401
402   -localstatedir | --localstatedir | --localstatedi | --localstated \
403   | --localstate | --localstat | --localsta | --localst \
404   | --locals | --local | --loca | --loc | --lo)
405     ac_prev=localstatedir ;;
406   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
407   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
408   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
409     localstatedir="$ac_optarg" ;;
410
411   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
412     ac_prev=mandir ;;
413   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
414     mandir="$ac_optarg" ;;
415
416   -nfp | --nfp | --nf)
417     # Obsolete; use --without-fp.
418     with_fp=no ;;
419
420   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
421   | --no-cr | --no-c)
422     no_create=yes ;;
423
424   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
425   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
426     no_recursion=yes ;;
427
428   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
429   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
430   | --oldin | --oldi | --old | --ol | --o)
431     ac_prev=oldincludedir ;;
432   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
433   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
434   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
435     oldincludedir="$ac_optarg" ;;
436
437   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
438     ac_prev=prefix ;;
439   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
440     prefix="$ac_optarg" ;;
441
442   -program-prefix | --program-prefix | --program-prefi | --program-pref \
443   | --program-pre | --program-pr | --program-p)
444     ac_prev=program_prefix ;;
445   -program-prefix=* | --program-prefix=* | --program-prefi=* \
446   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
447     program_prefix="$ac_optarg" ;;
448
449   -program-suffix | --program-suffix | --program-suffi | --program-suff \
450   | --program-suf | --program-su | --program-s)
451     ac_prev=program_suffix ;;
452   -program-suffix=* | --program-suffix=* | --program-suffi=* \
453   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
454     program_suffix="$ac_optarg" ;;
455
456   -program-transform-name | --program-transform-name \
457   | --program-transform-nam | --program-transform-na \
458   | --program-transform-n | --program-transform- \
459   | --program-transform | --program-transfor \
460   | --program-transfo | --program-transf \
461   | --program-trans | --program-tran \
462   | --progr-tra | --program-tr | --program-t)
463     ac_prev=program_transform_name ;;
464   -program-transform-name=* | --program-transform-name=* \
465   | --program-transform-nam=* | --program-transform-na=* \
466   | --program-transform-n=* | --program-transform-=* \
467   | --program-transform=* | --program-transfor=* \
468   | --program-transfo=* | --program-transf=* \
469   | --program-trans=* | --program-tran=* \
470   | --progr-tra=* | --program-tr=* | --program-t=*)
471     program_transform_name="$ac_optarg" ;;
472
473   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
474   | -silent | --silent | --silen | --sile | --sil)
475     silent=yes ;;
476
477   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
478     ac_prev=sbindir ;;
479   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
480   | --sbi=* | --sb=*)
481     sbindir="$ac_optarg" ;;
482
483   -sharedstatedir | --sharedstatedir | --sharedstatedi \
484   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
485   | --sharedst | --shareds | --shared | --share | --shar \
486   | --sha | --sh)
487     ac_prev=sharedstatedir ;;
488   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
489   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
490   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
491   | --sha=* | --sh=*)
492     sharedstatedir="$ac_optarg" ;;
493
494   -site | --site | --sit)
495     ac_prev=site ;;
496   -site=* | --site=* | --sit=*)
497     site="$ac_optarg" ;;
498
499   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
500     ac_prev=srcdir ;;
501   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
502     srcdir="$ac_optarg" ;;
503
504   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
505   | --syscon | --sysco | --sysc | --sys | --sy)
506     ac_prev=sysconfdir ;;
507   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
508   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
509     sysconfdir="$ac_optarg" ;;
510
511   -target | --target | --targe | --targ | --tar | --ta | --t)
512     ac_prev=target ;;
513   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
514     target="$ac_optarg" ;;
515
516   -v | -verbose | --verbose | --verbos | --verbo | --verb)
517     verbose=yes ;;
518
519   -version | --version | --versio | --versi | --vers)
520     echo "configure generated by autoconf version 2.13"
521     exit 0 ;;
522
523   -with-* | --with-*)
524     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
525     # Reject names that are not valid shell variable names.
526     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
527       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
528     fi
529     ac_package=`echo $ac_package| sed 's/-/_/g'`
530     case "$ac_option" in
531       *=*) ;;
532       *) ac_optarg=yes ;;
533     esac
534     eval "with_${ac_package}='$ac_optarg'" ;;
535
536   -without-* | --without-*)
537     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
538     # Reject names that are not valid shell variable names.
539     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
540       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
541     fi
542     ac_package=`echo $ac_package| sed 's/-/_/g'`
543     eval "with_${ac_package}=no" ;;
544
545   --x)
546     # Obsolete; use --with-x.
547     with_x=yes ;;
548
549   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
550   | --x-incl | --x-inc | --x-in | --x-i)
551     ac_prev=x_includes ;;
552   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
553   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
554     x_includes="$ac_optarg" ;;
555
556   -x-libraries | --x-libraries | --x-librarie | --x-librari \
557   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
558     ac_prev=x_libraries ;;
559   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
560   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
561     x_libraries="$ac_optarg" ;;
562
563   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
564     ;;
565
566   *)
567     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
568       echo "configure: warning: $ac_option: invalid host type" 1>&2
569     fi
570     if test "x$nonopt" != xNONE; then
571       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
572     fi
573     nonopt="$ac_option"
574     ;;
575
576   esac
577 done
578
579 if test -n "$ac_prev"; then
580   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
581 fi
582
583 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
584
585 # File descriptor usage:
586 # 0 standard input
587 # 1 file creation
588 # 2 errors and warnings
589 # 3 some systems may open it to /dev/tty
590 # 4 used on the Kubota Titan
591 # 6 checking for... messages and results
592 # 5 compiler messages saved in config.log
593 if test "$silent" = yes; then
594   exec 6>/dev/null
595 else
596   exec 6>&1
597 fi
598 exec 5>./config.log
599
600 echo "\
601 This file contains any messages produced by compilers while
602 running configure, to aid debugging if configure makes a mistake.
603 " 1>&5
604
605 # Strip out --no-create and --no-recursion so they do not pile up.
606 # Also quote any args containing shell metacharacters.
607 ac_configure_args=
608 for ac_arg
609 do
610   case "$ac_arg" in
611   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
612   | --no-cr | --no-c) ;;
613   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
614   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
615   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
616   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
617   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
618   esac
619 done
620
621 # NLS nuisances.
622 # Only set these to C if already set.  These must not be set unconditionally
623 # because not all systems understand e.g. LANG=C (notably SCO).
624 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
625 # Non-C LC_CTYPE values break the ctype check.
626 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
627 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
628 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
629 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
630
631 # confdefs.h avoids OS command line length limits that DEFS can exceed.
632 rm -rf conftest* confdefs.h
633 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
634 echo > confdefs.h
635
636 # A filename unique to this package, relative to the directory that
637 # configure is in, which we can look for to find out if srcdir is correct.
638 ac_unique_file=lib/krb/getrealm.c
639
640 # Find the source files, if location was not specified.
641 if test -z "$srcdir"; then
642   ac_srcdir_defaulted=yes
643   # Try the directory containing this script, then its parent.
644   ac_prog=$0
645   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
646   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
647   srcdir=$ac_confdir
648   if test ! -r $srcdir/$ac_unique_file; then
649     srcdir=..
650   fi
651 else
652   ac_srcdir_defaulted=no
653 fi
654 if test ! -r $srcdir/$ac_unique_file; then
655   if test "$ac_srcdir_defaulted" = yes; then
656     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
657   else
658     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
659   fi
660 fi
661 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
662
663 # Prefer explicitly selected file to automatically selected ones.
664 if test -z "$CONFIG_SITE"; then
665   if test "x$prefix" != xNONE; then
666     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
667   else
668     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
669   fi
670 fi
671 for ac_site_file in $CONFIG_SITE; do
672   if test -r "$ac_site_file"; then
673     echo "loading site script $ac_site_file"
674     . "$ac_site_file"
675   fi
676 done
677
678 if test -r "$cache_file"; then
679   echo "loading cache $cache_file"
680   . $cache_file
681 else
682   echo "creating cache $cache_file"
683   > $cache_file
684 fi
685
686 ac_ext=c
687 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
688 ac_cpp='$CPP $CPPFLAGS'
689 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
690 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
691 cross_compiling=$ac_cv_prog_cc_cross
692
693 ac_exeext=
694 ac_objext=o
695 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
696   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
697   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
698     ac_n= ac_c='
699 ' ac_t='        '
700   else
701     ac_n=-n ac_c= ac_t=
702   fi
703 else
704   ac_n= ac_c='\c' ac_t=
705 fi
706
707
708
709
710
711 PACKAGE=krb4
712 VERSION=1.0.5
713 cat >> confdefs.h <<EOF
714 #define PACKAGE "$PACKAGE"
715 EOF
716 cat >> confdefs.h <<EOF
717 #define VERSION "$VERSION"
718 EOF
719
720 # This may be overridden using --prefix=/usr to configure
721
722
723 ac_aux_dir=
724 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
725   if test -f $ac_dir/install-sh; then
726     ac_aux_dir=$ac_dir
727     ac_install_sh="$ac_aux_dir/install-sh -c"
728     break
729   elif test -f $ac_dir/install.sh; then
730     ac_aux_dir=$ac_dir
731     ac_install_sh="$ac_aux_dir/install.sh -c"
732     break
733   fi
734 done
735 if test -z "$ac_aux_dir"; then
736   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
737 fi
738 ac_config_guess=$ac_aux_dir/config.guess
739 ac_config_sub=$ac_aux_dir/config.sub
740 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
741
742
743 # Make sure we can run config.sub.
744 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
745 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
746 fi
747
748 echo $ac_n "checking host system type""... $ac_c" 1>&6
749 echo "configure:750: checking host system type" >&5
750
751 host_alias=$host
752 case "$host_alias" in
753 NONE)
754   case $nonopt in
755   NONE)
756     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
757     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
758     fi ;;
759   *) host_alias=$nonopt ;;
760   esac ;;
761 esac
762
763 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
764 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
765 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
766 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
767 echo "$ac_t""$host" 1>&6
768
769 CANONICAL_HOST=$host
770
771
772
773 sunos=no
774 case "$host" in 
775 *-*-sunos4*)
776         sunos=40
777         ;;
778 *-*-solaris2.7)
779         sunos=57
780         ;;
781 *-*-solaris2.8)
782         sunos=58
783         ;;
784 *-*-solaris2*)
785         sunos=50
786         ;;
787 esac
788 if test "$sunos" != no; then
789         cat >> confdefs.h <<EOF
790 #define SunOS $sunos
791 EOF
792
793 fi
794
795 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
796 echo "configure:797: checking whether ${MAKE-make} sets \${MAKE}" >&5
797 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
798 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
799   echo $ac_n "(cached) $ac_c" 1>&6
800 else
801   cat > conftestmake <<\EOF
802 all:
803         @echo 'ac_maketemp="${MAKE}"'
804 EOF
805 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
806 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
807 if test -n "$ac_maketemp"; then
808   eval ac_cv_prog_make_${ac_make}_set=yes
809 else
810   eval ac_cv_prog_make_${ac_make}_set=no
811 fi
812 rm -f conftestmake
813 fi
814 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
815   echo "$ac_t""yes" 1>&6
816   SET_MAKE=
817 else
818   echo "$ac_t""no" 1>&6
819   SET_MAKE="MAKE=${MAKE-make}"
820 fi
821
822 if test "$program_transform_name" = s,x,x,; then
823   program_transform_name=
824 else
825   # Double any \ or $.  echo might interpret backslashes.
826   cat <<\EOF_SED > conftestsed
827 s,\\,\\\\,g; s,\$,$$,g
828 EOF_SED
829   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
830   rm -f conftestsed
831 fi
832 test "$program_prefix" != NONE &&
833   program_transform_name="s,^,${program_prefix},; $program_transform_name"
834 # Use a double $ so make ignores it.
835 test "$program_suffix" != NONE &&
836   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
837
838 # sed with no file args requires a program.
839 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
840
841
842 # We want these before the checks, so the checks can modify their values.
843 test -z "$LDFLAGS" && LDFLAGS=-g
844
845
846 echo $ac_n "checking for ln -s or something else""... $ac_c" 1>&6
847 echo "configure:848: checking for ln -s or something else" >&5
848 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
849   echo $ac_n "(cached) $ac_c" 1>&6
850 else
851   rm -f conftestdata
852 if ln -s X conftestdata 2>/dev/null
853 then
854   rm -f conftestdata
855   ac_cv_prog_LN_S="ln -s"
856 else
857   touch conftestdata1
858   if ln conftestdata1 conftestdata2; then
859     rm -f conftestdata*
860     ac_cv_prog_LN_S=ln
861   else
862     ac_cv_prog_LN_S=cp
863   fi
864 fi
865 fi
866 LN_S="$ac_cv_prog_LN_S"
867 echo "$ac_t""$ac_cv_prog_LN_S" 1>&6
868
869 # Extract the first word of "gcc", so it can be a program name with args.
870 set dummy gcc; ac_word=$2
871 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
872 echo "configure:873: checking for $ac_word" >&5
873 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
874   echo $ac_n "(cached) $ac_c" 1>&6
875 else
876   if test -n "$CC"; then
877   ac_cv_prog_CC="$CC" # Let the user override the test.
878 else
879   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
880   ac_dummy="$PATH"
881   for ac_dir in $ac_dummy; do
882     test -z "$ac_dir" && ac_dir=.
883     if test -f $ac_dir/$ac_word; then
884       ac_cv_prog_CC="gcc"
885       break
886     fi
887   done
888   IFS="$ac_save_ifs"
889 fi
890 fi
891 CC="$ac_cv_prog_CC"
892 if test -n "$CC"; then
893   echo "$ac_t""$CC" 1>&6
894 else
895   echo "$ac_t""no" 1>&6
896 fi
897
898 if test -z "$CC"; then
899   # Extract the first word of "cc", so it can be a program name with args.
900 set dummy cc; ac_word=$2
901 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
902 echo "configure:903: checking for $ac_word" >&5
903 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
904   echo $ac_n "(cached) $ac_c" 1>&6
905 else
906   if test -n "$CC"; then
907   ac_cv_prog_CC="$CC" # Let the user override the test.
908 else
909   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
910   ac_prog_rejected=no
911   ac_dummy="$PATH"
912   for ac_dir in $ac_dummy; do
913     test -z "$ac_dir" && ac_dir=.
914     if test -f $ac_dir/$ac_word; then
915       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
916         ac_prog_rejected=yes
917         continue
918       fi
919       ac_cv_prog_CC="cc"
920       break
921     fi
922   done
923   IFS="$ac_save_ifs"
924 if test $ac_prog_rejected = yes; then
925   # We found a bogon in the path, so make sure we never use it.
926   set dummy $ac_cv_prog_CC
927   shift
928   if test $# -gt 0; then
929     # We chose a different compiler from the bogus one.
930     # However, it has the same basename, so the bogon will be chosen
931     # first if we set CC to just the basename; use the full file name.
932     shift
933     set dummy "$ac_dir/$ac_word" "$@"
934     shift
935     ac_cv_prog_CC="$@"
936   fi
937 fi
938 fi
939 fi
940 CC="$ac_cv_prog_CC"
941 if test -n "$CC"; then
942   echo "$ac_t""$CC" 1>&6
943 else
944   echo "$ac_t""no" 1>&6
945 fi
946
947   if test -z "$CC"; then
948     case "`uname -s`" in
949     *win32* | *WIN32*)
950       # Extract the first word of "cl", so it can be a program name with args.
951 set dummy cl; ac_word=$2
952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
953 echo "configure:954: checking for $ac_word" >&5
954 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
955   echo $ac_n "(cached) $ac_c" 1>&6
956 else
957   if test -n "$CC"; then
958   ac_cv_prog_CC="$CC" # Let the user override the test.
959 else
960   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
961   ac_dummy="$PATH"
962   for ac_dir in $ac_dummy; do
963     test -z "$ac_dir" && ac_dir=.
964     if test -f $ac_dir/$ac_word; then
965       ac_cv_prog_CC="cl"
966       break
967     fi
968   done
969   IFS="$ac_save_ifs"
970 fi
971 fi
972 CC="$ac_cv_prog_CC"
973 if test -n "$CC"; then
974   echo "$ac_t""$CC" 1>&6
975 else
976   echo "$ac_t""no" 1>&6
977 fi
978  ;;
979     esac
980   fi
981   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
982 fi
983
984 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
985 echo "configure:986: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
986
987 ac_ext=c
988 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
989 ac_cpp='$CPP $CPPFLAGS'
990 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
991 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
992 cross_compiling=$ac_cv_prog_cc_cross
993
994 cat > conftest.$ac_ext << EOF
995
996 #line 997 "configure"
997 #include "confdefs.h"
998
999 main(){return(0);}
1000 EOF
1001 if { (eval echo configure:1002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1002   ac_cv_prog_cc_works=yes
1003   # If we can't run a trivial program, we are probably using a cross compiler.
1004   if (./conftest; exit) 2>/dev/null; then
1005     ac_cv_prog_cc_cross=no
1006   else
1007     ac_cv_prog_cc_cross=yes
1008   fi
1009 else
1010   echo "configure: failed program was:" >&5
1011   cat conftest.$ac_ext >&5
1012   ac_cv_prog_cc_works=no
1013 fi
1014 rm -fr conftest*
1015 ac_ext=c
1016 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1017 ac_cpp='$CPP $CPPFLAGS'
1018 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1019 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1020 cross_compiling=$ac_cv_prog_cc_cross
1021
1022 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1023 if test $ac_cv_prog_cc_works = no; then
1024   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1025 fi
1026 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1027 echo "configure:1028: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1028 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1029 cross_compiling=$ac_cv_prog_cc_cross
1030
1031 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1032 echo "configure:1033: checking whether we are using GNU C" >&5
1033 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1034   echo $ac_n "(cached) $ac_c" 1>&6
1035 else
1036   cat > conftest.c <<EOF
1037 #ifdef __GNUC__
1038   yes;
1039 #endif
1040 EOF
1041 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1042   ac_cv_prog_gcc=yes
1043 else
1044   ac_cv_prog_gcc=no
1045 fi
1046 fi
1047
1048 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1049
1050 if test $ac_cv_prog_gcc = yes; then
1051   GCC=yes
1052 else
1053   GCC=
1054 fi
1055
1056 ac_test_CFLAGS="${CFLAGS+set}"
1057 ac_save_CFLAGS="$CFLAGS"
1058 CFLAGS=
1059 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1060 echo "configure:1061: checking whether ${CC-cc} accepts -g" >&5
1061 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1062   echo $ac_n "(cached) $ac_c" 1>&6
1063 else
1064   echo 'void f(){}' > conftest.c
1065 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1066   ac_cv_prog_cc_g=yes
1067 else
1068   ac_cv_prog_cc_g=no
1069 fi
1070 rm -f conftest*
1071
1072 fi
1073
1074 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1075 if test "$ac_test_CFLAGS" = set; then
1076   CFLAGS="$ac_save_CFLAGS"
1077 elif test $ac_cv_prog_cc_g = yes; then
1078   if test "$GCC" = yes; then
1079     CFLAGS="-g -O2"
1080   else
1081     CFLAGS="-g"
1082   fi
1083 else
1084   if test "$GCC" = yes; then
1085     CFLAGS="-O2"
1086   else
1087     CFLAGS=
1088   fi
1089 fi
1090
1091 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1092 echo "configure:1093: checking how to run the C preprocessor" >&5
1093 # On Suns, sometimes $CPP names a directory.
1094 if test -n "$CPP" && test -d "$CPP"; then
1095   CPP=
1096 fi
1097 if test -z "$CPP"; then
1098 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1099   echo $ac_n "(cached) $ac_c" 1>&6
1100 else
1101     # This must be in double quotes, not single quotes, because CPP may get
1102   # substituted into the Makefile and "${CC-cc}" will confuse make.
1103   CPP="${CC-cc} -E"
1104   # On the NeXT, cc -E runs the code through the compiler's parser,
1105   # not just through cpp.
1106   cat > conftest.$ac_ext <<EOF
1107 #line 1108 "configure"
1108 #include "confdefs.h"
1109 #include <assert.h>
1110 Syntax Error
1111 EOF
1112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1113 { (eval echo configure:1114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1115 if test -z "$ac_err"; then
1116   :
1117 else
1118   echo "$ac_err" >&5
1119   echo "configure: failed program was:" >&5
1120   cat conftest.$ac_ext >&5
1121   rm -rf conftest*
1122   CPP="${CC-cc} -E -traditional-cpp"
1123   cat > conftest.$ac_ext <<EOF
1124 #line 1125 "configure"
1125 #include "confdefs.h"
1126 #include <assert.h>
1127 Syntax Error
1128 EOF
1129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1130 { (eval echo configure:1131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1132 if test -z "$ac_err"; then
1133   :
1134 else
1135   echo "$ac_err" >&5
1136   echo "configure: failed program was:" >&5
1137   cat conftest.$ac_ext >&5
1138   rm -rf conftest*
1139   CPP="${CC-cc} -nologo -E"
1140   cat > conftest.$ac_ext <<EOF
1141 #line 1142 "configure"
1142 #include "confdefs.h"
1143 #include <assert.h>
1144 Syntax Error
1145 EOF
1146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1147 { (eval echo configure:1148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1149 if test -z "$ac_err"; then
1150   :
1151 else
1152   echo "$ac_err" >&5
1153   echo "configure: failed program was:" >&5
1154   cat conftest.$ac_ext >&5
1155   rm -rf conftest*
1156   CPP=/lib/cpp
1157 fi
1158 rm -f conftest*
1159 fi
1160 rm -f conftest*
1161 fi
1162 rm -f conftest*
1163   ac_cv_prog_CPP="$CPP"
1164 fi
1165   CPP="$ac_cv_prog_CPP"
1166 else
1167   ac_cv_prog_CPP="$CPP"
1168 fi
1169 echo "$ac_t""$CPP" 1>&6
1170
1171 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1172 echo "configure:1173: checking for POSIXized ISC" >&5
1173 if test -d /etc/conf/kconfig.d &&
1174   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1175 then
1176   echo "$ac_t""yes" 1>&6
1177   ISC=yes # If later tests want to check for ISC.
1178   cat >> confdefs.h <<\EOF
1179 #define _POSIX_SOURCE 1
1180 EOF
1181
1182   if test "$GCC" = yes; then
1183     CC="$CC -posix"
1184   else
1185     CC="$CC -Xp"
1186   fi
1187 else
1188   echo "$ac_t""no" 1>&6
1189   ISC=
1190 fi
1191
1192 for ac_prog in byacc yacc 'bison -y'
1193 do
1194 # Extract the first word of "$ac_prog", so it can be a program name with args.
1195 set dummy $ac_prog; ac_word=$2
1196 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1197 echo "configure:1198: checking for $ac_word" >&5
1198 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1199   echo $ac_n "(cached) $ac_c" 1>&6
1200 else
1201   if test -n "$YACC"; then
1202   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1203 else
1204   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1205   ac_dummy="$PATH"
1206   for ac_dir in $ac_dummy; do
1207     test -z "$ac_dir" && ac_dir=.
1208     if test -f $ac_dir/$ac_word; then
1209       ac_cv_prog_YACC="$ac_prog"
1210       break
1211     fi
1212   done
1213   IFS="$ac_save_ifs"
1214 fi
1215 fi
1216 YACC="$ac_cv_prog_YACC"
1217 if test -n "$YACC"; then
1218   echo "$ac_t""$YACC" 1>&6
1219 else
1220   echo "$ac_t""no" 1>&6
1221 fi
1222
1223 test -n "$YACC" && break
1224 done
1225
1226 # Extract the first word of "flex", so it can be a program name with args.
1227 set dummy flex; ac_word=$2
1228 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1229 echo "configure:1230: checking for $ac_word" >&5
1230 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
1231   echo $ac_n "(cached) $ac_c" 1>&6
1232 else
1233   if test -n "$LEX"; then
1234   ac_cv_prog_LEX="$LEX" # Let the user override the test.
1235 else
1236   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1237   ac_dummy="$PATH"
1238   for ac_dir in $ac_dummy; do
1239     test -z "$ac_dir" && ac_dir=.
1240     if test -f $ac_dir/$ac_word; then
1241       ac_cv_prog_LEX="flex"
1242       break
1243     fi
1244   done
1245   IFS="$ac_save_ifs"
1246   test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
1247 fi
1248 fi
1249 LEX="$ac_cv_prog_LEX"
1250 if test -n "$LEX"; then
1251   echo "$ac_t""$LEX" 1>&6
1252 else
1253   echo "$ac_t""no" 1>&6
1254 fi
1255
1256 if test -z "$LEXLIB"
1257 then
1258   case "$LEX" in
1259   flex*) ac_lib=fl ;;
1260   *) ac_lib=l ;;
1261   esac
1262   echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
1263 echo "configure:1264: checking for yywrap in -l$ac_lib" >&5
1264 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
1265 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1266   echo $ac_n "(cached) $ac_c" 1>&6
1267 else
1268   ac_save_LIBS="$LIBS"
1269 LIBS="-l$ac_lib  $LIBS"
1270 cat > conftest.$ac_ext <<EOF
1271 #line 1272 "configure"
1272 #include "confdefs.h"
1273 /* Override any gcc2 internal prototype to avoid an error.  */
1274 /* We use char because int might match the return type of a gcc2
1275     builtin and then its argument prototype would still apply.  */
1276 char yywrap();
1277
1278 int main() {
1279 yywrap()
1280 ; return 0; }
1281 EOF
1282 if { (eval echo configure:1283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1283   rm -rf conftest*
1284   eval "ac_cv_lib_$ac_lib_var=yes"
1285 else
1286   echo "configure: failed program was:" >&5
1287   cat conftest.$ac_ext >&5
1288   rm -rf conftest*
1289   eval "ac_cv_lib_$ac_lib_var=no"
1290 fi
1291 rm -f conftest*
1292 LIBS="$ac_save_LIBS"
1293
1294 fi
1295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1296   echo "$ac_t""yes" 1>&6
1297   LEXLIB="-l$ac_lib"
1298 else
1299   echo "$ac_t""no" 1>&6
1300 fi
1301
1302 fi
1303
1304 # Extract the first word of "ranlib", so it can be a program name with args.
1305 set dummy ranlib; ac_word=$2
1306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1307 echo "configure:1308: checking for $ac_word" >&5
1308 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1309   echo $ac_n "(cached) $ac_c" 1>&6
1310 else
1311   if test -n "$RANLIB"; then
1312   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1313 else
1314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1315   ac_dummy="$PATH"
1316   for ac_dir in $ac_dummy; do
1317     test -z "$ac_dir" && ac_dir=.
1318     if test -f $ac_dir/$ac_word; then
1319       ac_cv_prog_RANLIB="ranlib"
1320       break
1321     fi
1322   done
1323   IFS="$ac_save_ifs"
1324   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1325 fi
1326 fi
1327 RANLIB="$ac_cv_prog_RANLIB"
1328 if test -n "$RANLIB"; then
1329   echo "$ac_t""$RANLIB" 1>&6
1330 else
1331   echo "$ac_t""no" 1>&6
1332 fi
1333
1334 # Find a good install program.  We prefer a C program (faster),
1335 # so one script is as good as another.  But avoid the broken or
1336 # incompatible versions:
1337 # SysV /etc/install, /usr/sbin/install
1338 # SunOS /usr/etc/install
1339 # IRIX /sbin/install
1340 # AIX /bin/install
1341 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1342 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1343 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1344 # ./install, which can be erroneously created by make from ./install.sh.
1345 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1346 echo "configure:1347: checking for a BSD compatible install" >&5
1347 if test -z "$INSTALL"; then
1348 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1349   echo $ac_n "(cached) $ac_c" 1>&6
1350 else
1351     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1352   for ac_dir in $PATH; do
1353     # Account for people who put trailing slashes in PATH elements.
1354     case "$ac_dir/" in
1355     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1356     *)
1357       # OSF1 and SCO ODT 3.0 have their own names for install.
1358       # Don't use installbsd from OSF since it installs stuff as root
1359       # by default.
1360       for ac_prog in ginstall scoinst install; do
1361         if test -f $ac_dir/$ac_prog; then
1362           if test $ac_prog = install &&
1363             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1364             # AIX install.  It has an incompatible calling convention.
1365             :
1366           else
1367             ac_cv_path_install="$ac_dir/$ac_prog -c"
1368             break 2
1369           fi
1370         fi
1371       done
1372       ;;
1373     esac
1374   done
1375   IFS="$ac_save_IFS"
1376
1377 fi
1378   if test "${ac_cv_path_install+set}" = set; then
1379     INSTALL="$ac_cv_path_install"
1380   else
1381     # As a last resort, use the slow shell script.  We don't cache a
1382     # path for INSTALL within a source directory, because that will
1383     # break other packages using the cache if that directory is
1384     # removed, or if the path is relative.
1385     INSTALL="$ac_install_sh"
1386   fi
1387 fi
1388 echo "$ac_t""$INSTALL" 1>&6
1389
1390 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1391 # It thinks the first close brace ends the variable substitution.
1392 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1393
1394 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1395
1396 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1397
1398 for ac_prog in mawk gawk nawk awk
1399 do
1400 # Extract the first word of "$ac_prog", so it can be a program name with args.
1401 set dummy $ac_prog; ac_word=$2
1402 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1403 echo "configure:1404: checking for $ac_word" >&5
1404 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1405   echo $ac_n "(cached) $ac_c" 1>&6
1406 else
1407   if test -n "$AWK"; then
1408   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1409 else
1410   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1411   ac_dummy="$PATH"
1412   for ac_dir in $ac_dummy; do
1413     test -z "$ac_dir" && ac_dir=.
1414     if test -f $ac_dir/$ac_word; then
1415       ac_cv_prog_AWK="$ac_prog"
1416       break
1417     fi
1418   done
1419   IFS="$ac_save_ifs"
1420 fi
1421 fi
1422 AWK="$ac_cv_prog_AWK"
1423 if test -n "$AWK"; then
1424   echo "$ac_t""$AWK" 1>&6
1425 else
1426   echo "$ac_t""no" 1>&6
1427 fi
1428
1429 test -n "$AWK" && break
1430 done
1431
1432 # Extract the first word of "makeinfo", so it can be a program name with args.
1433 set dummy makeinfo; ac_word=$2
1434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1435 echo "configure:1436: checking for $ac_word" >&5
1436 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
1437   echo $ac_n "(cached) $ac_c" 1>&6
1438 else
1439   if test -n "$MAKEINFO"; then
1440   ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
1441 else
1442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1443   ac_dummy="$PATH"
1444   for ac_dir in $ac_dummy; do
1445     test -z "$ac_dir" && ac_dir=.
1446     if test -f $ac_dir/$ac_word; then
1447       ac_cv_prog_MAKEINFO="makeinfo"
1448       break
1449     fi
1450   done
1451   IFS="$ac_save_ifs"
1452   test -z "$ac_cv_prog_MAKEINFO" && ac_cv_prog_MAKEINFO=":"
1453 fi
1454 fi
1455 MAKEINFO="$ac_cv_prog_MAKEINFO"
1456 if test -n "$MAKEINFO"; then
1457   echo "$ac_t""$MAKEINFO" 1>&6
1458 else
1459   echo "$ac_t""no" 1>&6
1460 fi
1461
1462
1463 WFLAGS=""
1464 WFLAGS_NOUNUSED=""
1465 WFLAGS_NOIMPLICITINT=""
1466    
1467
1468
1469 # Check whether --with-socks or --without-socks was given.
1470 if test "${with_socks+set}" = set; then
1471   withval="$with_socks"
1472   :
1473 fi
1474
1475 # Check whether --with-socks-lib or --without-socks-lib was given.
1476 if test "${with_socks_lib+set}" = set; then
1477   withval="$with_socks_lib"
1478   if test "$withval" = "yes" -o "$withval" = "no"; then
1479   { echo "configure: error: No argument for --with-socks-lib" 1>&2; exit 1; }
1480 elif test "X$with_socks" = "X"; then
1481   with_socks=yes
1482 fi
1483 fi
1484
1485 # Check whether --with-socks-include or --without-socks-include was given.
1486 if test "${with_socks_include+set}" = set; then
1487   withval="$with_socks_include"
1488   if test "$withval" = "yes" -o "$withval" = "no"; then
1489   { echo "configure: error: No argument for --with-socks-include" 1>&2; exit 1; }
1490 elif test "X$with_socks" = "X"; then
1491   with_socks=yes
1492 fi
1493 fi
1494
1495
1496 echo $ac_n "checking for socks""... $ac_c" 1>&6
1497 echo "configure:1498: checking for socks" >&5
1498
1499 case "$with_socks" in
1500 yes)    ;;
1501 no)     ;;
1502 "")     ;;
1503 *)      if test "$with_socks_include" = ""; then
1504                 with_socks_include="$with_socks/include"
1505         fi
1506         if test "$with_socks_lib" = ""; then
1507                 with_socks_lib="$with_socks/lib$abilibdirext"
1508         fi
1509         ;;
1510 esac
1511 header_dirs=
1512 lib_dirs=
1513 d=''
1514 for i in $d; do
1515         header_dirs="$header_dirs $i/include"
1516         lib_dirs="$lib_dirs $i/lib$abilibdirext"
1517 done
1518
1519 case "$with_socks_include" in
1520 yes) ;;
1521 no)  ;;
1522 *)   header_dirs="$with_socks_include $header_dirs";;
1523 esac
1524 case "$with_socks_lib" in
1525 yes) ;;
1526 no)  ;;
1527 *)   lib_dirs="$with_socks_lib $lib_dirs";;
1528 esac
1529
1530 save_CFLAGS="$CFLAGS"
1531 save_LIBS="$LIBS"
1532 ires= lres=
1533 for i in $header_dirs; do
1534         CFLAGS="-I$i $save_CFLAGS"
1535         cat > conftest.$ac_ext <<EOF
1536 #line 1537 "configure"
1537 #include "confdefs.h"
1538 #include <socks.h>
1539 int main() {
1540
1541 ; return 0; }
1542 EOF
1543 if { (eval echo configure:1544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1544   rm -rf conftest*
1545   ires=$i;break
1546 else
1547   echo "configure: failed program was:" >&5
1548   cat conftest.$ac_ext >&5
1549 fi
1550 rm -f conftest*
1551 done
1552 for i in $lib_dirs; do
1553         LIBS="-L$i -lsocks5  $save_LIBS"
1554         cat > conftest.$ac_ext <<EOF
1555 #line 1556 "configure"
1556 #include "confdefs.h"
1557 #include <socks.h>
1558 int main() {
1559
1560 ; return 0; }
1561 EOF
1562 if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1563   rm -rf conftest*
1564   lres=$i;break
1565 else
1566   echo "configure: failed program was:" >&5
1567   cat conftest.$ac_ext >&5
1568 fi
1569 rm -f conftest*
1570 done
1571 CFLAGS="$save_CFLAGS"
1572 LIBS="$save_LIBS"
1573
1574 if test "$ires" -a "$lres" -a "$with_socks" != "no"; then
1575         socks_includedir="$ires"
1576         socks_libdir="$lres"
1577         INCLUDE_socks="-I$socks_includedir"
1578         LIB_socks="-L$socks_libdir -lsocks5"
1579         cat >> confdefs.h <<EOF
1580 #define `echo socks | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` 1
1581 EOF
1582
1583         with_socks=yes
1584         echo "$ac_t""headers $ires, libraries $lres" 1>&6
1585 else
1586         INCLUDE_socks=
1587         LIB_socks=
1588         with_socks=no
1589         echo "$ac_t""$with_socks" 1>&6
1590 fi
1591
1592
1593
1594 CFLAGS="$INCLUDE_socks $CFLAGS"
1595 LIBS="$LIB_socks $LIBS"
1596
1597 # Check whether --enable-legacy-kdestroy or --disable-legacy-kdestroy was given.
1598 if test "${enable_legacy_kdestroy+set}" = set; then
1599   enableval="$enable_legacy_kdestroy"
1600   
1601 if test "$enableval" = "yes"; then
1602         cat >> confdefs.h <<\EOF
1603 #define LEGACY_KDESTROY 1
1604 EOF
1605
1606 fi
1607
1608 fi
1609
1610
1611 # Check whether --enable-match-subdomains or --disable-match-subdomains was given.
1612 if test "${enable_match_subdomains+set}" = set; then
1613   enableval="$enable_match_subdomains"
1614   if test "$enableval" = "yes"; then
1615         cat >> confdefs.h <<\EOF
1616 #define MATCH_SUBDOMAINS 1
1617 EOF
1618
1619 fi
1620
1621 fi
1622
1623
1624 # Check whether --with-ld-flags or --without-ld-flags was given.
1625 if test "${with_ld_flags+set}" = set; then
1626   withval="$with_ld_flags"
1627   :
1628 fi
1629
1630
1631 # Check whether --with-cracklib or --without-cracklib was given.
1632 if test "${with_cracklib+set}" = set; then
1633   withval="$with_cracklib"
1634   :
1635 fi
1636
1637
1638 # Check whether --with-dictpath or --without-dictpath was given.
1639 if test "${with_dictpath+set}" = set; then
1640   withval="$with_dictpath"
1641   :
1642 fi
1643
1644
1645 (test -z "$with_cracklib" && test -n "$with_dictpath") ||
1646 (test -n "$with_cracklib" && test -z "$with_dictpath") &&
1647 { echo "configure: error: --with-cracklib requires --with-dictpath and vice versa" 1>&2; exit 1; }
1648 test -n "$with_cracklib" &&
1649 CRACKLIB="-L$with_cracklib -lcrack" &&
1650 echo "$ac_t""Using cracklib in $with_cracklib" 1>&6
1651 test -n "$with_dictpath" &&
1652 echo "$ac_t""Using dictpath=$with_dictpath" 1>&6 &&
1653 cat >> confdefs.h <<EOF
1654 #define DICTPATH "$with_dictpath"
1655 EOF
1656
1657
1658 # Check whether --with-mailspool or --without-mailspool was given.
1659 if test "${with_mailspool+set}" = set; then
1660   withval="$with_mailspool"
1661   :
1662 fi
1663
1664
1665 test -n "$with_mailspool" &&
1666 cat >> confdefs.h <<EOF
1667 #define KRB4_MAILDIR "$with_mailspool"
1668 EOF
1669
1670
1671 # Check whether --with-db-dir or --without-db-dir was given.
1672 if test "${with_db_dir+set}" = set; then
1673   withval="$with_db_dir"
1674   :
1675 fi
1676
1677
1678 test -n "$with_db_dir" &&
1679 cat >> confdefs.h <<EOF
1680 #define DB_DIR "$with_db_dir"
1681 EOF
1682
1683
1684 # Check whether --enable-random-mkey or --disable-random-mkey was given.
1685 if test "${enable_random_mkey+set}" = set; then
1686   enableval="$enable_random_mkey"
1687   
1688 if test "$enableval" = "yes"; then
1689         cat >> confdefs.h <<\EOF
1690 #define RANDOM_MKEY 1
1691 EOF
1692
1693 fi
1694
1695 fi
1696
1697
1698 # Check whether --with-mkey or --without-mkey was given.
1699 if test "${with_mkey+set}" = set; then
1700   withval="$with_mkey"
1701   
1702 if test -n "$withval"; then
1703         cat >> confdefs.h <<EOF
1704 #define MKEYFILE "$withval"
1705 EOF
1706
1707 fi
1708
1709 fi
1710
1711
1712 otp=yes
1713 # Check whether --enable-otp or --disable-otp was given.
1714 if test "${enable_otp+set}" = set; then
1715   enableval="$enable_otp"
1716   
1717 if test "$enableval" = "no"; then
1718         otp=no
1719 fi
1720
1721 fi
1722
1723
1724 if test "$otp" = "yes"; then
1725         cat >> confdefs.h <<\EOF
1726 #define OTP 1
1727 EOF
1728
1729         LIB_otp='-L$(top_builddir)/lib/otp -lotp'
1730         OTP_dir=otp
1731         LIB_SUBDIRS="$LIB_SUBDIRS otp"
1732 fi
1733
1734
1735
1736
1737 # Check whether --enable-osfc2 or --disable-osfc2 was given.
1738 if test "${enable_osfc2+set}" = set; then
1739   enableval="$enable_osfc2"
1740   :
1741 fi
1742
1743 LIB_security=
1744 if test "$enable_osfc2" = yes; then
1745         cat >> confdefs.h <<\EOF
1746 #define HAVE_OSFC2 1
1747 EOF
1748
1749         LIB_security=-lsecurity
1750 fi
1751
1752
1753
1754 mmap=yes
1755 # Check whether --enable-mmap or --disable-mmap was given.
1756 if test "${enable_mmap+set}" = set; then
1757   enableval="$enable_mmap"
1758   
1759 if test "$enableval" = "no"; then
1760         mmap=no
1761 fi
1762
1763 fi
1764
1765 if test "$mmap" = "no"; then
1766         cat >> confdefs.h <<\EOF
1767 #define NO_MMAP 1
1768 EOF
1769
1770 fi
1771
1772 aix_dynamic_afs=yes
1773 # Check whether --enable-dynamic-afs or --disable-dynamic-afs was given.
1774 if test "${enable_dynamic_afs+set}" = set; then
1775   enableval="$enable_dynamic_afs"
1776   
1777 if test "$enableval" = "no"; then
1778         aix_dynamic_afs=no
1779 fi
1780
1781 fi
1782
1783
1784 berkeley_db=db
1785 # Check whether --with-berkeley-db or --without-berkeley-db was given.
1786 if test "${with_berkeley_db+set}" = set; then
1787   withval="$with_berkeley_db"
1788   
1789 if test "$withval" = no; then
1790         berkeley_db=""
1791 fi
1792
1793 fi
1794
1795
1796 afs_support=yes
1797 # Check whether --with-afs-support or --without-afs-support was given.
1798 if test "${with_afs_support+set}" = set; then
1799   withval="$with_afs_support"
1800   
1801 if test "$withval" = no; then
1802         cat >> confdefs.h <<\EOF
1803 #define NO_AFS 1
1804 EOF
1805
1806         afs_support=no
1807 fi
1808
1809 fi
1810
1811
1812 des_quad=guess
1813 # Check whether --with-des-quad-checksum or --without-des-quad-checksum was given.
1814 if test "${with_des_quad_checksum+set}" = set; then
1815   withval="$with_des_quad_checksum"
1816   
1817 des_quad="$withval"
1818
1819 fi
1820
1821 if test "$des_quad" = "new"; then
1822         ac_x=DES_QUAD_NEW
1823 elif test "$des_quad" = "old"; then
1824         ac_x=DES_QUAD_OLD
1825 else
1826         ac_x=DES_QUAD_GUESS
1827 fi      
1828 cat >> confdefs.h <<EOF
1829 #define DES_QUAD_DEFAULT $ac_x
1830 EOF
1831
1832
1833 # Check whether --with-afsws or --without-afsws was given.
1834 if test "${with_afsws+set}" = set; then
1835   withval="$with_afsws"
1836   AFSWS=$withval
1837 else
1838   AFSWS=/usr/afsws
1839
1840 fi
1841
1842 test "$AFSWS" = "yes" && AFSWS=/usr/afsws
1843
1844
1845 # Check whether --enable-rxkad or --disable-rxkad was given.
1846 if test "${enable_rxkad+set}" = set; then
1847   enableval="$enable_rxkad"
1848   :
1849 fi
1850
1851
1852 if test "$afs_support" = yes -a "$enable_rxkad" = yes; then
1853         LIB_SUBDIRS="$LIB_SUBDIRS rxkad"
1854 fi
1855
1856
1857 # Check whether --enable-cat-manpages or --disable-cat-manpages was given.
1858 if test "${enable_cat_manpages+set}" = set; then
1859   enableval="$enable_cat_manpages"
1860   
1861 if test "$enableval" = "no"; then
1862         disable_cat_manpages=yes
1863 fi
1864
1865 fi
1866
1867
1868
1869
1870 # Check whether --with-readline or --without-readline was given.
1871 if test "${with_readline+set}" = set; then
1872   withval="$with_readline"
1873   :
1874 fi
1875
1876 # Check whether --with-readline-lib or --without-readline-lib was given.
1877 if test "${with_readline_lib+set}" = set; then
1878   withval="$with_readline_lib"
1879   if test "$withval" = "yes" -o "$withval" = "no"; then
1880   { echo "configure: error: No argument for --with-readline-lib" 1>&2; exit 1; }
1881 elif test "X$with_readline" = "X"; then
1882   with_readline=yes
1883 fi
1884 fi
1885
1886 # Check whether --with-readline-include or --without-readline-include was given.
1887 if test "${with_readline_include+set}" = set; then
1888   withval="$with_readline_include"
1889   if test "$withval" = "yes" -o "$withval" = "no"; then
1890   { echo "configure: error: No argument for --with-readline-include" 1>&2; exit 1; }
1891 elif test "X$with_readline" = "X"; then
1892   with_readline=yes
1893 fi
1894 fi
1895
1896
1897 echo $ac_n "checking for readline""... $ac_c" 1>&6
1898 echo "configure:1899: checking for readline" >&5
1899
1900 case "$with_readline" in
1901 yes)    ;;
1902 no)     ;;
1903 "")     ;;
1904 *)      if test "$with_readline_include" = ""; then
1905                 with_readline_include="$with_readline/include"
1906         fi
1907         if test "$with_readline_lib" = ""; then
1908                 with_readline_lib="$with_readline/lib$abilibdirext"
1909         fi
1910         ;;
1911 esac
1912 header_dirs=
1913 lib_dirs=
1914 d=''
1915 for i in $d; do
1916         header_dirs="$header_dirs $i/include"
1917         lib_dirs="$lib_dirs $i/lib$abilibdirext"
1918 done
1919
1920 case "$with_readline_include" in
1921 yes) ;;
1922 no)  ;;
1923 *)   header_dirs="$with_readline_include $header_dirs";;
1924 esac
1925 case "$with_readline_lib" in
1926 yes) ;;
1927 no)  ;;
1928 *)   lib_dirs="$with_readline_lib $lib_dirs";;
1929 esac
1930
1931 save_CFLAGS="$CFLAGS"
1932 save_LIBS="$LIBS"
1933 ires= lres=
1934 for i in $header_dirs; do
1935         CFLAGS="-I$i $save_CFLAGS"
1936         cat > conftest.$ac_ext <<EOF
1937 #line 1938 "configure"
1938 #include "confdefs.h"
1939
1940 #include <stdio.h>
1941 #include <readline.h>
1942
1943 int main() {
1944
1945 ; return 0; }
1946 EOF
1947 if { (eval echo configure:1948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1948   rm -rf conftest*
1949   ires=$i;break
1950 else
1951   echo "configure: failed program was:" >&5
1952   cat conftest.$ac_ext >&5
1953 fi
1954 rm -f conftest*
1955 done
1956 for i in $lib_dirs; do
1957         LIBS="-L$i -lreadline  $save_LIBS"
1958         cat > conftest.$ac_ext <<EOF
1959 #line 1960 "configure"
1960 #include "confdefs.h"
1961
1962 #include <stdio.h>
1963 #include <readline.h>
1964
1965 int main() {
1966
1967 ; return 0; }
1968 EOF
1969 if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1970   rm -rf conftest*
1971   lres=$i;break
1972 else
1973   echo "configure: failed program was:" >&5
1974   cat conftest.$ac_ext >&5
1975 fi
1976 rm -f conftest*
1977 done
1978 CFLAGS="$save_CFLAGS"
1979 LIBS="$save_LIBS"
1980
1981 if test "$ires" -a "$lres" -a "$with_readline" != "no"; then
1982         readline_includedir="$ires"
1983         readline_libdir="$lres"
1984         INCLUDE_readline="-I$readline_includedir"
1985         LIB_readline="-L$readline_libdir -lreadline"
1986         cat >> confdefs.h <<EOF
1987 #define `echo readline | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` 1
1988 EOF
1989
1990         with_readline=yes
1991         echo "$ac_t""headers $ires, libraries $lres" 1>&6
1992 else
1993         INCLUDE_readline=
1994         LIB_readline=
1995         with_readline=no
1996         echo "$ac_t""$with_readline" 1>&6
1997 fi
1998
1999
2000
2001
2002
2003 # Check whether --with-mips_abi or --without-mips_abi was given.
2004 if test "${with_mips_abi+set}" = set; then
2005   withval="$with_mips_abi"
2006   :
2007 fi
2008
2009
2010 case "$host_os" in
2011 irix*)
2012 with_mips_abi="${with_mips_abi:-yes}"
2013 if test -n "$GCC"; then
2014
2015 # GCC < 2.8 only supports the O32 ABI. GCC >= 2.8 has a flag to select
2016 # which ABI to use, but only supports (as of 2.8.1) the N32 and 64 ABIs.
2017 #
2018 # Default to N32, but if GCC doesn't grok -mabi=n32, we assume an old
2019 # GCC and revert back to O32. The same goes if O32 is asked for - old
2020 # GCCs doesn't like the -mabi option, and new GCCs can't output O32.
2021 #
2022 # Don't you just love *all* the different SGI ABIs?
2023
2024 case "${with_mips_abi}" in 
2025         32|o32) abi='-mabi=32';  abilibdirext=''     ;;
2026        n32|yes) abi='-mabi=n32'; abilibdirext='32'  ;;
2027         64) abi='-mabi=64';  abilibdirext='64'   ;;
2028         no) abi=''; abilibdirext='';;
2029          *) { echo "configure: error: "Invalid ABI specified"" 1>&2; exit 1; } ;;
2030 esac
2031 if test -n "$abi" ; then
2032 ac_foo=krb_cv_gcc_`echo $abi | tr =- __`
2033 echo $ac_n "checking if $CC supports the $abi option""... $ac_c" 1>&6
2034 echo "configure:2035: checking if $CC supports the $abi option" >&5
2035 if eval "test \"`echo '$''{'$ac_foo'+set}'`\" = set"; then
2036   echo $ac_n "(cached) $ac_c" 1>&6
2037 else
2038   
2039 save_CFLAGS="$CFLAGS"
2040 CFLAGS="$CFLAGS $abi"
2041 cat > conftest.$ac_ext <<EOF
2042 #line 2043 "configure"
2043 #include "confdefs.h"
2044
2045 int main() {
2046 int x;
2047 ; return 0; }
2048 EOF
2049 if { (eval echo configure:2050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2050   rm -rf conftest*
2051   eval $ac_foo=yes
2052 else
2053   echo "configure: failed program was:" >&5
2054   cat conftest.$ac_ext >&5
2055   rm -rf conftest*
2056   eval $ac_foo=no
2057 fi
2058 rm -f conftest*
2059 CFLAGS="$save_CFLAGS"
2060
2061 fi
2062
2063 ac_res=`eval echo \\\$$ac_foo`
2064 echo "$ac_t""$ac_res" 1>&6
2065 if test $ac_res = no; then
2066 # Try to figure out why that failed...
2067 case $abi in
2068         -mabi=32) 
2069         save_CFLAGS="$CFLAGS"
2070         CFLAGS="$CFLAGS -mabi=n32"
2071         cat > conftest.$ac_ext <<EOF
2072 #line 2073 "configure"
2073 #include "confdefs.h"
2074
2075 int main() {
2076 int x;
2077 ; return 0; }
2078 EOF
2079 if { (eval echo configure:2080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2080   rm -rf conftest*
2081   ac_res=yes
2082 else
2083   echo "configure: failed program was:" >&5
2084   cat conftest.$ac_ext >&5
2085   rm -rf conftest*
2086   ac_res=no
2087 fi
2088 rm -f conftest*
2089         CLAGS="$save_CFLAGS"
2090         if test $ac_res = yes; then
2091                 # New GCC
2092                 { echo "configure: error: $CC does not support the $with_mips_abi ABI" 1>&2; exit 1; }
2093         fi
2094         # Old GCC
2095         abi=''
2096         abilibdirext=''
2097         ;;
2098         -mabi=n32|-mabi=64)
2099                 if test $with_mips_abi = yes; then
2100                         # Old GCC, default to O32
2101                         abi=''
2102                         abilibdirext=''
2103                 else
2104                         # Some broken GCC
2105                         { echo "configure: error: $CC does not support the $with_mips_abi ABI" 1>&2; exit 1; }
2106                 fi
2107         ;;
2108 esac
2109 fi #if test $ac_res = no; then
2110 fi #if test -n "$abi" ; then
2111 else
2112 case "${with_mips_abi}" in
2113         32|o32) abi='-32'; abilibdirext=''     ;;
2114        n32|yes) abi='-n32'; abilibdirext='32'  ;;
2115         64) abi='-64'; abilibdirext='64'   ;;
2116         no) abi=''; abilibdirext='';;
2117          *) { echo "configure: error: "Invalid ABI specified"" 1>&2; exit 1; } ;;
2118 esac
2119 fi #if test -n "$GCC"; then
2120 ;;
2121 esac
2122
2123
2124
2125 # Check whether --with-hesiod or --without-hesiod was given.
2126 if test "${with_hesiod+set}" = set; then
2127   withval="$with_hesiod"
2128   :
2129 fi
2130
2131 # Check whether --with-hesiod-lib or --without-hesiod-lib was given.
2132 if test "${with_hesiod_lib+set}" = set; then
2133   withval="$with_hesiod_lib"
2134   if test "$withval" = "yes" -o "$withval" = "no"; then
2135   { echo "configure: error: No argument for --with-hesiod-lib" 1>&2; exit 1; }
2136 elif test "X$with_hesiod" = "X"; then
2137   with_hesiod=yes
2138 fi
2139 fi
2140
2141 # Check whether --with-hesiod-include or --without-hesiod-include was given.
2142 if test "${with_hesiod_include+set}" = set; then
2143   withval="$with_hesiod_include"
2144   if test "$withval" = "yes" -o "$withval" = "no"; then
2145   { echo "configure: error: No argument for --with-hesiod-include" 1>&2; exit 1; }
2146 elif test "X$with_hesiod" = "X"; then
2147   with_hesiod=yes
2148 fi
2149 fi
2150
2151
2152 echo $ac_n "checking for hesiod""... $ac_c" 1>&6
2153 echo "configure:2154: checking for hesiod" >&5
2154
2155 case "$with_hesiod" in
2156 yes)    ;;
2157 no)     ;;
2158 "")     ;;
2159 *)      if test "$with_hesiod_include" = ""; then
2160                 with_hesiod_include="$with_hesiod/include"
2161         fi
2162         if test "$with_hesiod_lib" = ""; then
2163                 with_hesiod_lib="$with_hesiod/lib$abilibdirext"
2164         fi
2165         ;;
2166 esac
2167 header_dirs=
2168 lib_dirs=
2169 d=''
2170 for i in $d; do
2171         header_dirs="$header_dirs $i/include"
2172         lib_dirs="$lib_dirs $i/lib$abilibdirext"
2173 done
2174
2175 case "$with_hesiod_include" in
2176 yes) ;;
2177 no)  ;;
2178 *)   header_dirs="$with_hesiod_include $header_dirs";;
2179 esac
2180 case "$with_hesiod_lib" in
2181 yes) ;;
2182 no)  ;;
2183 *)   lib_dirs="$with_hesiod_lib $lib_dirs";;
2184 esac
2185
2186 save_CFLAGS="$CFLAGS"
2187 save_LIBS="$LIBS"
2188 ires= lres=
2189 for i in $header_dirs; do
2190         CFLAGS="-I$i $save_CFLAGS"
2191         cat > conftest.$ac_ext <<EOF
2192 #line 2193 "configure"
2193 #include "confdefs.h"
2194 #include <hesiod.h>
2195 int main() {
2196
2197 ; return 0; }
2198 EOF
2199 if { (eval echo configure:2200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2200   rm -rf conftest*
2201   ires=$i;break
2202 else
2203   echo "configure: failed program was:" >&5
2204   cat conftest.$ac_ext >&5
2205 fi
2206 rm -f conftest*
2207 done
2208 for i in $lib_dirs; do
2209         LIBS="-L$i -lhesiod  $save_LIBS"
2210         cat > conftest.$ac_ext <<EOF
2211 #line 2212 "configure"
2212 #include "confdefs.h"
2213 #include <hesiod.h>
2214 int main() {
2215
2216 ; return 0; }
2217 EOF
2218 if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2219   rm -rf conftest*
2220   lres=$i;break
2221 else
2222   echo "configure: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224 fi
2225 rm -f conftest*
2226 done
2227 CFLAGS="$save_CFLAGS"
2228 LIBS="$save_LIBS"
2229
2230 if test "$ires" -a "$lres" -a "$with_hesiod" != "no"; then
2231         hesiod_includedir="$ires"
2232         hesiod_libdir="$lres"
2233         INCLUDE_hesiod="-I$hesiod_includedir"
2234         LIB_hesiod="-L$hesiod_libdir -lhesiod"
2235         cat >> confdefs.h <<EOF
2236 #define `echo hesiod | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` 1
2237 EOF
2238
2239         with_hesiod=yes
2240         echo "$ac_t""headers $ires, libraries $lres" 1>&6
2241 else
2242         INCLUDE_hesiod=
2243         LIB_hesiod=
2244         with_hesiod=no
2245         echo "$ac_t""$with_hesiod" 1>&6
2246 fi
2247
2248
2249
2250
2251
2252
2253 # Check whether --enable-shared or --disable-shared was given.
2254 if test "${enable_shared+set}" = set; then
2255   enableval="$enable_shared"
2256   :
2257 fi
2258
2259
2260
2261 case ${enable_shared} in
2262   yes ) enable_shared=yes;;
2263   no  ) enable_shared=no;;
2264   *   ) enable_shared=no;;
2265 esac
2266
2267 # NOTE: Building shared libraries may not work if you do not use gcc!
2268 #
2269 # OS            $SHLIBEXT
2270 # HP-UX         sl
2271 # Linux         so
2272 # NetBSD        so
2273 # FreeBSD       so
2274 # OSF           so
2275 # SunOS5        so
2276 # SunOS4        so.0.5
2277 # Irix          so
2278 #
2279 # LIBEXT is the extension we should build (.a or $SHLIBEXT)
2280 LINK='$(CC)'
2281
2282 lib_deps=yes
2283 REAL_PICFLAGS="-fpic"
2284 LDSHARED='$(CC) $(PICFLAGS) -shared'
2285 LIBPREFIX=lib
2286 build_symlink_command=@true
2287 install_symlink_command=@true
2288 install_symlink_command2=@true
2289 REAL_SHLIBEXT=so
2290 SHLIB_VERSION=`echo $VERSION | sed 's/\([0-9.]*\).*/\1/'`
2291 SHLIB_SONAME=`echo $VERSION | sed 's/\([0-9]*\).*/\1/'`
2292 case "${host}" in
2293 *-*-hpux*)
2294         REAL_SHLIBEXT=sl
2295         REAL_LD_FLAGS='-Wl,+b$(libdir)'
2296         if test -z "$GCC"; then
2297                 LDSHARED="ld -b"
2298                 REAL_PICFLAGS="+z"
2299         fi
2300         lib_deps=no
2301         ;;
2302 *-*-linux*)
2303         LDSHARED='$(CC) -shared -Wl,-soname,$(LIBNAME).so.'"${SHLIB_SONAME}"
2304         REAL_LD_FLAGS='-Wl,-rpath,$(libdir)'
2305         REAL_SHLIBEXT=so.$SHLIB_VERSION
2306         build_symlink_command='$(LN_S) -f $@ $(LIBNAME).so'
2307         install_symlink_command='$(LN_S) -f $(LIB) $(DESTDIR)$(libdir)/$(LIBNAME).so.'"${SHLIB_SONAME}"';$(LN_S) -f $(LIB) $(DESTDIR)$(libdir)/$(LIBNAME).so'
2308         install_symlink_command2='$(LN_S) -f $(LIB2) $(DESTDIR)$(libdir)/$(LIBNAME2).so.'"${SHLIB_SONAME}"';$(LN_S) -f $(LIB2) $(DESTDIR)$(libdir)/$(LIBNAME2).so'
2309         ;;
2310 *-*-freebsd[345]* | *-*-freebsdelf[345]*)
2311         REAL_SHLIBEXT=so.$SHLIB_VERSION
2312         REAL_LD_FLAGS='-Wl,-R$(libdir)'
2313         build_symlink_command='$(LN_S) -f $@ $(LIBNAME).so'
2314         install_symlink_command='$(LN_S) -f $(LIB) $(DESTDIR)$(libdir)/$(LIBNAME).so'
2315         install_symlink_command2='$(LN_S) -f $(LIB2) $(DESTDIR)$(libdir)/$(LIBNAME2).so'
2316         ;;
2317 *-*-*bsd*)
2318         REAL_SHLIBEXT=so.$SHLIB_VERSION
2319         LDSHARED='ld -Bshareable'
2320         REAL_LD_FLAGS='-Wl,-R$(libdir)'
2321         ;;
2322 *-*-osf*)
2323         REAL_LD_FLAGS='-Wl,-rpath,$(libdir)'
2324         REAL_PICFLAGS=
2325         LDSHARED='ld -shared -expect_unresolved \*'
2326         ;;
2327 *-*-solaris2*)
2328         LDSHARED='$(CC) -shared -Wl,-h$(LIBNAME).so.'"${SHLIB_SONAME}"
2329         REAL_SHLIBEXT=so.$SHLIB_VERSION
2330         build_symlink_command='$(LN_S) $@ $(LIBNAME).so'
2331         install_symlink_command='$(LN_S) $(LIB) $(DESTDIR)$(libdir)/$(LIBNAME).so.'"${SHLIB_SONAME}"';$(LN_S) $(LIB) $(DESTDIR)$(libdir)/$(LIBNAME).so'
2332         install_symlink_command2='$(LN_S) $(LIB2) $(DESTDIR)$(libdir)/$(LIBNAME2).so.'"${SHLIB_SONAME}"';$(LN_S) $(LIB2) $(DESTDIR)$(libdir)/$(LIBNAME2).so'
2333         REAL_LD_FLAGS='-Wl,-R$(libdir)'
2334         if test -z "$GCC"; then
2335                 LDSHARED='$(CC) -G -h$(LIBNAME).so.'"${SHLIB_SONAME}"
2336                 REAL_PICFLAGS="-Kpic"
2337         fi
2338         ;;
2339 *-fujitsu-uxpv*)
2340         REAL_LD_FLAGS='' # really: LD_RUN_PATH=$(libdir) cc -o ...
2341         REAL_LINK='LD_RUN_PATH=$(libdir) $(CC)'
2342         LDSHARED='$(CC) -G'
2343         REAL_PICFLAGS="-Kpic"
2344         lib_deps=no # fails in mysterious ways
2345         ;;
2346 *-*-sunos*)
2347         REAL_SHLIBEXT=so.$SHLIB_VERSION
2348         REAL_LD_FLAGS='-Wl,-L$(libdir)'
2349         lib_deps=no
2350         ;;
2351 *-*-irix*)
2352         libdir="${libdir}${abilibdirext}"
2353         REAL_LD_FLAGS="${abi} -Wl,-rpath,\$(libdir)"
2354         LD_FLAGS="${abi} -Wl,-rpath,\$(libdir)"
2355         LDSHARED="\$(CC) -shared ${abi}"
2356         REAL_PICFLAGS=
2357         CFLAGS="${abi} ${CFLAGS}"
2358         ;;
2359 *-*-os2*)
2360         LIBPREFIX=
2361         EXECSUFFIX='.exe'
2362         RANLIB=EMXOMF
2363         LD_FLAGS=-Zcrtdll
2364         REAL_SHLIBEXT=nobuild
2365         ;;
2366 *-*-cygwin32*)
2367         EXECSUFFIX='.exe'
2368         REAL_SHLIBEXT=nobuild
2369         ;;
2370 *)      REAL_SHLIBEXT=nobuild
2371         REAL_PICFLAGS= 
2372         ;;
2373 esac
2374
2375 if test "${enable_shared}" != "yes" ; then 
2376  PICFLAGS=""
2377  SHLIBEXT="nobuild"
2378  LIBEXT="a"
2379  build_symlink_command=@true
2380  install_symlink_command=@true
2381  install_symlink_command2=@true
2382 else
2383  PICFLAGS="$REAL_PICFLAGS"
2384  SHLIBEXT="$REAL_SHLIBEXT"
2385  LIBEXT="$SHLIBEXT"
2386  echo $ac_n "checking whether to use -rpath""... $ac_c" 1>&6
2387 echo "configure:2388: checking whether to use -rpath" >&5
2388  case "$libdir" in
2389    /lib | /usr/lib | /usr/local/lib)
2390      echo "$ac_t""no" 1>&6
2391      REAL_LD_FLAGS=
2392      LD_FLAGS=
2393      ;;
2394    *)
2395      LD_FLAGS="$REAL_LD_FLAGS"
2396      test "$REAL_LINK" && LINK="$REAL_LINK"
2397      echo "$ac_t""$LD_FLAGS" 1>&6
2398      ;;
2399    esac
2400 fi
2401
2402 if test "$lib_deps" = yes; then
2403         lib_deps_yes=""
2404         lib_deps_no="# "
2405 else
2406         lib_deps_yes="# "
2407         lib_deps_no=""
2408 fi
2409
2410
2411
2412 # use supplied ld-flags, or none if `no'
2413 if test "$with_ld_flags" = no; then
2414         LD_FLAGS=
2415 elif test -n "$with_ld_flags"; then
2416         LD_FLAGS="$with_ld_flags"
2417 fi
2418
2419    
2420        
2421
2422
2423 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2424 echo "configure:2425: checking whether byte ordering is bigendian" >&5
2425 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2426   echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428   ac_cv_c_bigendian=unknown
2429 # See if sys/param.h defines the BYTE_ORDER macro.
2430 cat > conftest.$ac_ext <<EOF
2431 #line 2432 "configure"
2432 #include "confdefs.h"
2433 #include <sys/types.h>
2434 #include <sys/param.h>
2435 int main() {
2436
2437 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2438  bogus endian macros
2439 #endif
2440 ; return 0; }
2441 EOF
2442 if { (eval echo configure:2443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2443   rm -rf conftest*
2444   # It does; now see whether it defined to BIG_ENDIAN or not.
2445 cat > conftest.$ac_ext <<EOF
2446 #line 2447 "configure"
2447 #include "confdefs.h"
2448 #include <sys/types.h>
2449 #include <sys/param.h>
2450 int main() {
2451
2452 #if BYTE_ORDER != BIG_ENDIAN
2453  not big endian
2454 #endif
2455 ; return 0; }
2456 EOF
2457 if { (eval echo configure:2458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2458   rm -rf conftest*
2459   ac_cv_c_bigendian=yes
2460 else
2461   echo "configure: failed program was:" >&5
2462   cat conftest.$ac_ext >&5
2463   rm -rf conftest*
2464   ac_cv_c_bigendian=no
2465 fi
2466 rm -f conftest*
2467 else
2468   echo "configure: failed program was:" >&5
2469   cat conftest.$ac_ext >&5
2470 fi
2471 rm -f conftest*
2472 if test $ac_cv_c_bigendian = unknown; then
2473 if test "$cross_compiling" = yes; then
2474     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2475 else
2476   cat > conftest.$ac_ext <<EOF
2477 #line 2478 "configure"
2478 #include "confdefs.h"
2479 main () {
2480   /* Are we little or big endian?  From Harbison&Steele.  */
2481   union
2482   {
2483     long l;
2484     char c[sizeof (long)];
2485   } u;
2486   u.l = 1;
2487   exit (u.c[sizeof (long) - 1] == 1);
2488 }
2489 EOF
2490 if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2491 then
2492   ac_cv_c_bigendian=no
2493 else
2494   echo "configure: failed program was:" >&5
2495   cat conftest.$ac_ext >&5
2496   rm -fr conftest*
2497   ac_cv_c_bigendian=yes
2498 fi
2499 rm -fr conftest*
2500 fi
2501
2502 fi
2503 fi
2504
2505 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2506 if test $ac_cv_c_bigendian = yes; then
2507   cat >> confdefs.h <<\EOF
2508 #define WORDS_BIGENDIAN 1
2509 EOF
2510
2511 fi
2512
2513
2514 echo $ac_n "checking for working const""... $ac_c" 1>&6
2515 echo "configure:2516: checking for working const" >&5
2516 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2517   echo $ac_n "(cached) $ac_c" 1>&6
2518 else
2519   cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522
2523 int main() {
2524
2525 /* Ultrix mips cc rejects this.  */
2526 typedef int charset[2]; const charset x;
2527 /* SunOS 4.1.1 cc rejects this.  */
2528 char const *const *ccp;
2529 char **p;
2530 /* NEC SVR4.0.2 mips cc rejects this.  */
2531 struct point {int x, y;};
2532 static struct point const zero = {0,0};
2533 /* AIX XL C 1.02.0.0 rejects this.
2534    It does not let you subtract one const X* pointer from another in an arm
2535    of an if-expression whose if-part is not a constant expression */
2536 const char *g = "string";
2537 ccp = &g + (g ? g-g : 0);
2538 /* HPUX 7.0 cc rejects these. */
2539 ++ccp;
2540 p = (char**) ccp;
2541 ccp = (char const *const *) p;
2542 { /* SCO 3.2v4 cc rejects this.  */
2543   char *t;
2544   char const *s = 0 ? (char *) 0 : (char const *) 0;
2545
2546   *t++ = 0;
2547 }
2548 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2549   int x[] = {25, 17};
2550   const int *foo = &x[0];
2551   ++foo;
2552 }
2553 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2554   typedef const int *iptr;
2555   iptr p = 0;
2556   ++p;
2557 }
2558 { /* AIX XL C 1.02.0.0 rejects this saying
2559      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2560   struct s { int j; const int *ap[3]; };
2561   struct s *b; b->j = 5;
2562 }
2563 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2564   const int foo = 10;
2565 }
2566
2567 ; return 0; }
2568 EOF
2569 if { (eval echo configure:2570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2570   rm -rf conftest*
2571   ac_cv_c_const=yes
2572 else
2573   echo "configure: failed program was:" >&5
2574   cat conftest.$ac_ext >&5
2575   rm -rf conftest*
2576   ac_cv_c_const=no
2577 fi
2578 rm -f conftest*
2579 fi
2580
2581 echo "$ac_t""$ac_cv_c_const" 1>&6
2582 if test $ac_cv_c_const = no; then
2583   cat >> confdefs.h <<\EOF
2584 #define const 
2585 EOF
2586
2587 fi
2588
2589
2590 echo $ac_n "checking for inline""... $ac_c" 1>&6
2591 echo "configure:2592: checking for inline" >&5
2592 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2593   echo $ac_n "(cached) $ac_c" 1>&6
2594 else
2595   ac_cv_c_inline=no
2596 for ac_kw in inline __inline__ __inline; do
2597   cat > conftest.$ac_ext <<EOF
2598 #line 2599 "configure"
2599 #include "confdefs.h"
2600
2601 int main() {
2602 } $ac_kw foo() {
2603 ; return 0; }
2604 EOF
2605 if { (eval echo configure:2606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2606   rm -rf conftest*
2607   ac_cv_c_inline=$ac_kw; break
2608 else
2609   echo "configure: failed program was:" >&5
2610   cat conftest.$ac_ext >&5
2611 fi
2612 rm -f conftest*
2613 done
2614
2615 fi
2616
2617 echo "$ac_t""$ac_cv_c_inline" 1>&6
2618 case "$ac_cv_c_inline" in
2619   inline | yes) ;;
2620   no) cat >> confdefs.h <<\EOF
2621 #define inline 
2622 EOF
2623  ;;
2624   *)  cat >> confdefs.h <<EOF
2625 #define inline $ac_cv_c_inline
2626 EOF
2627  ;;
2628 esac
2629
2630
2631
2632 echo $ac_n "checking for __attribute__""... $ac_c" 1>&6
2633 echo "configure:2634: checking for __attribute__" >&5
2634 if eval "test \"`echo '$''{'ac_cv___attribute__'+set}'`\" = set"; then
2635   echo $ac_n "(cached) $ac_c" 1>&6
2636 else
2637   
2638 cat > conftest.$ac_ext <<EOF
2639 #line 2640 "configure"
2640 #include "confdefs.h"
2641
2642 #include <stdlib.h>
2643
2644 int main() {
2645
2646 static void foo(void) __attribute__ ((noreturn));
2647
2648 static void
2649 foo(void)
2650 {
2651   exit(1);
2652 }
2653
2654 ; return 0; }
2655 EOF
2656 if { (eval echo configure:2657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2657   rm -rf conftest*
2658   ac_cv___attribute__=yes
2659 else
2660   echo "configure: failed program was:" >&5
2661   cat conftest.$ac_ext >&5
2662   rm -rf conftest*
2663   ac_cv___attribute__=no
2664 fi
2665 rm -f conftest*
2666 fi
2667
2668 if test "$ac_cv___attribute__" = "yes"; then
2669   cat >> confdefs.h <<\EOF
2670 #define HAVE___ATTRIBUTE__ 1
2671 EOF
2672
2673 fi
2674 echo "$ac_t""$ac_cv___attribute__" 1>&6
2675
2676
2677
2678
2679 echo $ac_n "checking for NEXTSTEP""... $ac_c" 1>&6
2680 echo "configure:2681: checking for NEXTSTEP" >&5
2681 if eval "test \"`echo '$''{'krb_cv_sys_nextstep'+set}'`\" = set"; then
2682   echo $ac_n "(cached) $ac_c" 1>&6
2683 else
2684   cat > conftest.$ac_ext <<EOF
2685 #line 2686 "configure"
2686 #include "confdefs.h"
2687 #if defined(NeXT) && !defined(__APPLE__)
2688         yes
2689 #endif 
2690
2691 EOF
2692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2693   egrep "yes" >/dev/null 2>&1; then
2694   rm -rf conftest*
2695   krb_cv_sys_nextstep=yes
2696 else
2697   rm -rf conftest*
2698   krb_cv_sys_nextstep=no
2699 fi
2700 rm -f conftest*
2701  
2702 fi
2703
2704 if test "$krb_cv_sys_nextstep" = "yes"; then
2705   CFLAGS="$CFLAGS -posix"
2706   LIBS="$LIBS -posix"
2707 fi
2708 echo "$ac_t""$krb_cv_sys_nextstep" 1>&6
2709
2710
2711 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2712 echo "configure:2713: checking for AIX" >&5
2713 if eval "test \"`echo '$''{'krb_cv_sys_aix'+set}'`\" = set"; then
2714   echo $ac_n "(cached) $ac_c" 1>&6
2715 else
2716   cat > conftest.$ac_ext <<EOF
2717 #line 2718 "configure"
2718 #include "confdefs.h"
2719 #ifdef _AIX
2720         yes
2721 #endif 
2722
2723 EOF
2724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2725   egrep "yes" >/dev/null 2>&1; then
2726   rm -rf conftest*
2727   krb_cv_sys_aix=yes
2728 else
2729   rm -rf conftest*
2730   krb_cv_sys_aix=no
2731 fi
2732 rm -f conftest*
2733  
2734 fi
2735
2736 echo "$ac_t""$krb_cv_sys_aix" 1>&6
2737
2738
2739 if test "$krb_cv_sys_aix" = yes ;then
2740         if test "$aix_dynamic_afs" = yes; then
2741                 AFS_EXTRA_OBJS=
2742                 AFS_EXTRA_LIBS=afslib.so
2743                 # this works differently in AIX <=3 and 4
2744                 if test `uname -v` = 4 ; then
2745                         AFS_EXTRA_LD="-bnoentry"
2746                 else
2747                         AFS_EXTRA_LD="-e _nostart"
2748                 fi
2749                 AFS_EXTRA_DEFS=
2750                 
2751
2752
2753 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
2754 echo "configure:2755: checking for dlopen" >&5
2755 if eval "test \"`echo '$''{'ac_cv_funclib_dlopen'+set}'`\" = set"; then
2756   echo $ac_n "(cached) $ac_c" 1>&6
2757 else
2758   
2759 if eval "test \"\$ac_cv_func_dlopen\" != yes" ; then
2760         ac_save_LIBS="$LIBS"
2761         for ac_lib in "" dl; do
2762                 if test -n "$ac_lib"; then 
2763                         ac_lib="-l$ac_lib"
2764                 else
2765                         ac_lib=""
2766                 fi
2767                 LIBS=" $ac_lib  $ac_save_LIBS"
2768                 cat > conftest.$ac_ext <<EOF
2769 #line 2770 "configure"
2770 #include "confdefs.h"
2771
2772 int main() {
2773 dlopen()
2774 ; return 0; }
2775 EOF
2776 if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2777   rm -rf conftest*
2778   eval "if test -n \"$ac_lib\";then ac_cv_funclib_dlopen=$ac_lib; else ac_cv_funclib_dlopen=yes; fi";break
2779 else
2780   echo "configure: failed program was:" >&5
2781   cat conftest.$ac_ext >&5
2782 fi
2783 rm -f conftest*
2784         done
2785         eval "ac_cv_funclib_dlopen=\${ac_cv_funclib_dlopen-no}"
2786         LIBS="$ac_save_LIBS"
2787 fi
2788
2789 fi
2790
2791
2792 eval "ac_res=\$ac_cv_funclib_dlopen"
2793
2794 : << END
2795 @@@funcs="$funcs dlopen"@@@
2796 @@@libs="$libs "" dl"@@@
2797 END
2798
2799 # dlopen
2800 eval "ac_tr_func=HAVE_`echo dlopen | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
2801 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
2802 eval "LIB_dlopen=$ac_res"
2803
2804 case "$ac_res" in
2805         yes)
2806         eval "ac_cv_func_dlopen=yes"
2807         eval "LIB_dlopen="
2808         cat >> confdefs.h <<EOF
2809 #define $ac_tr_func 1
2810 EOF
2811
2812         echo "$ac_t""yes" 1>&6
2813         ;;
2814         no)
2815         eval "ac_cv_func_dlopen=no"
2816         eval "LIB_dlopen="
2817         echo "$ac_t""no" 1>&6
2818         ;;
2819         *)
2820         eval "ac_cv_func_dlopen=yes"
2821         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
2822         cat >> confdefs.h <<EOF
2823 #define $ac_tr_func 1
2824 EOF
2825
2826         cat >> confdefs.h <<EOF
2827 #define $ac_tr_lib 1
2828 EOF
2829
2830         echo "$ac_t""yes, in $ac_res" 1>&6
2831         ;;
2832 esac
2833
2834
2835                 if test "$ac_cv_funclib_dlopen" = yes; then
2836                         AIX_EXTRA_KAFS=
2837                 elif test "$ac_cv_funclib_dlopen" != no; then
2838                         AIX_EXTRA_KAFS="$ac_cv_funclib_dlopen"
2839                 else
2840                         AFS_EXTRA_OBJS="$AFS_EXTRA_OBJS dlfcn.o"
2841                         AIX_EXTRA_KAFS=-lld
2842                 fi
2843         else
2844                 AFS_EXTRA_OBJS='$(srcdir)/afsl.exp afslib.o'
2845                 AFS_EXTRA_LIBS=
2846                 AFS_EXTRA_DEFS='-DSTATIC_AFS_SYSCALLS'
2847                 AIX_EXTRA_KAFS=
2848         fi
2849                                         fi
2850
2851 #
2852 # AIX needs /lib/pse.exp for getmsg, but alas that file is broken in
2853 # AIX414
2854 #
2855
2856 case "${host}" in
2857 *-*-aix4.1*)
2858 if test -f /lib/pse.exp ;then
2859         LIBS="$LIBS -Wl,-bnolibpath -Wl,-bI:/lib/pse.exp"
2860 fi
2861 ;;
2862 *-*-aix*)
2863         LIBS="$LIBS -Wl,-bnolibpath"
2864         ;;
2865 esac
2866
2867
2868 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2869 echo "configure:2870: checking for ANSI C header files" >&5
2870 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2871   echo $ac_n "(cached) $ac_c" 1>&6
2872 else
2873   cat > conftest.$ac_ext <<EOF
2874 #line 2875 "configure"
2875 #include "confdefs.h"
2876 #include <stdlib.h>
2877 #include <stdarg.h>
2878 #include <string.h>
2879 #include <float.h>
2880 EOF
2881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2882 { (eval echo configure:2883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2884 if test -z "$ac_err"; then
2885   rm -rf conftest*
2886   ac_cv_header_stdc=yes
2887 else
2888   echo "$ac_err" >&5
2889   echo "configure: failed program was:" >&5
2890   cat conftest.$ac_ext >&5
2891   rm -rf conftest*
2892   ac_cv_header_stdc=no
2893 fi
2894 rm -f conftest*
2895
2896 if test $ac_cv_header_stdc = yes; then
2897   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2898 cat > conftest.$ac_ext <<EOF
2899 #line 2900 "configure"
2900 #include "confdefs.h"
2901 #include <string.h>
2902 EOF
2903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2904   egrep "memchr" >/dev/null 2>&1; then
2905   :
2906 else
2907   rm -rf conftest*
2908   ac_cv_header_stdc=no
2909 fi
2910 rm -f conftest*
2911
2912 fi
2913
2914 if test $ac_cv_header_stdc = yes; then
2915   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2916 cat > conftest.$ac_ext <<EOF
2917 #line 2918 "configure"
2918 #include "confdefs.h"
2919 #include <stdlib.h>
2920 EOF
2921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2922   egrep "free" >/dev/null 2>&1; then
2923   :
2924 else
2925   rm -rf conftest*
2926   ac_cv_header_stdc=no
2927 fi
2928 rm -f conftest*
2929
2930 fi
2931
2932 if test $ac_cv_header_stdc = yes; then
2933   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2934 if test "$cross_compiling" = yes; then
2935   :
2936 else
2937   cat > conftest.$ac_ext <<EOF
2938 #line 2939 "configure"
2939 #include "confdefs.h"
2940 #include <ctype.h>
2941 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2942 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2943 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2944 int main () { int i; for (i = 0; i < 256; i++)
2945 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2946 exit (0); }
2947
2948 EOF
2949 if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2950 then
2951   :
2952 else
2953   echo "configure: failed program was:" >&5
2954   cat conftest.$ac_ext >&5
2955   rm -fr conftest*
2956   ac_cv_header_stdc=no
2957 fi
2958 rm -fr conftest*
2959 fi
2960
2961 fi
2962 fi
2963
2964 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2965 if test $ac_cv_header_stdc = yes; then
2966   cat >> confdefs.h <<\EOF
2967 #define STDC_HEADERS 1
2968 EOF
2969
2970 fi
2971
2972
2973 for ac_hdr in arpa/ftp.h                        \
2974         arpa/inet.h                             \
2975         arpa/nameser.h                          \
2976         arpa/telnet.h                           \
2977         bsd/bsd.h                               \
2978         bsdsetjmp.h                             \
2979         capability.h                            \
2980         crypt.h                                 \
2981         curses.h                                \
2982         db.h                                    \
2983         dbm.h                                   \
2984         dirent.h                                \
2985         err.h                                   \
2986         errno.h                                 \
2987         fcntl.h                                 \
2988         fnmatch.h                               \
2989         gdbm/ndbm.h                             \
2990         grp.h                                   \
2991         inttypes.h                              \
2992         io.h                                    \
2993         lastlog.h                               \
2994         libutil.h                               \
2995         limits.h                                \
2996         login.h                                 \
2997         maillock.h                              \
2998         ndbm.h                                  \
2999         net/if.h                                \
3000         net/if_tun.h                            \
3001         net/if_var.h                            \
3002         netdb.h                                 \
3003         netinet/in.h                            \
3004         netinet/in6_machtypes.h                 \
3005         netinet/in_systm.h                      \
3006         paths.h                                 \
3007         pty.h                                   \
3008         pwd.h                                   \
3009         resolv.h                                \
3010         rpcsvc/dbm.h                            \
3011         rpcsvc/ypclnt.h                         \
3012         sac.h                                   \
3013         security/pam_modules.h                  \
3014         shadow.h                                \
3015         siad.h                                  \
3016         signal.h                                \
3017         stropts.h                               \
3018         sys/bitypes.h                           \
3019         sys/category.h                          \
3020         sys/file.h                              \
3021         sys/filio.h                             \
3022         sys/ioccom.h                            \
3023         sys/ioctl.h                             \
3024         sys/locking.h                           \
3025         sys/mman.h                              \
3026         sys/param.h                             \
3027         sys/proc.h                              \
3028         sys/pty.h                               \
3029         sys/ptyio.h                             \
3030         sys/ptyvar.h                            \
3031         sys/resource.h                          \
3032         sys/select.h                            \
3033         sys/socket.h                            \
3034         sys/sockio.h                            \
3035         sys/stat.h                              \
3036         sys/str_tty.h                           \
3037         sys/stream.h                            \
3038         sys/stropts.h                           \
3039         sys/strtty.h                            \
3040         sys/syscall.h                           \
3041         sys/sysctl.h                            \
3042         sys/termio.h                            \
3043         sys/time.h                              \
3044         sys/timeb.h                             \
3045         sys/times.h                             \
3046         sys/tty.h                               \
3047         sys/types.h                             \
3048         sys/uio.h                               \
3049         sys/un.h                                \
3050         sys/utsname.h                           \
3051         sys/wait.h                              \
3052         syslog.h                                \
3053         term.h                                  \
3054         termcap.h                               \
3055         termio.h                                \
3056         termios.h                               \
3057         tmpdir.h                                \
3058         ttyent.h                                \
3059         udb.h                                   \
3060         ulimit.h                                \
3061         unistd.h                                \
3062         userpw.h                                \
3063         usersec.h                               \
3064         util.h                                  \
3065         utime.h                                 \
3066         utmp.h                                  \
3067         utmpx.h                                 \
3068         wait.h
3069 do
3070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3072 echo "configure:3073: checking for $ac_hdr" >&5
3073 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079 #include <$ac_hdr>
3080 EOF
3081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3082 { (eval echo configure:3083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3084 if test -z "$ac_err"; then
3085   rm -rf conftest*
3086   eval "ac_cv_header_$ac_safe=yes"
3087 else
3088   echo "$ac_err" >&5
3089   echo "configure: failed program was:" >&5
3090   cat conftest.$ac_ext >&5
3091   rm -rf conftest*
3092   eval "ac_cv_header_$ac_safe=no"
3093 fi
3094 rm -f conftest*
3095 fi
3096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3097   echo "$ac_t""yes" 1>&6
3098     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3099   cat >> confdefs.h <<EOF
3100 #define $ac_tr_hdr 1
3101 EOF
3102  
3103 else
3104   echo "$ac_t""no" 1>&6
3105 fi
3106 done
3107
3108
3109 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3110 echo "configure:3111: checking whether time.h and sys/time.h may both be included" >&5
3111 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3112   echo $ac_n "(cached) $ac_c" 1>&6
3113 else
3114   cat > conftest.$ac_ext <<EOF
3115 #line 3116 "configure"
3116 #include "confdefs.h"
3117 #include <sys/types.h>
3118 #include <sys/time.h>
3119 #include <time.h>
3120 int main() {
3121 struct tm *tp;
3122 ; return 0; }
3123 EOF
3124 if { (eval echo configure:3125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3125   rm -rf conftest*
3126   ac_cv_header_time=yes
3127 else
3128   echo "configure: failed program was:" >&5
3129   cat conftest.$ac_ext >&5
3130   rm -rf conftest*
3131   ac_cv_header_time=no
3132 fi
3133 rm -f conftest*
3134 fi
3135
3136 echo "$ac_t""$ac_cv_header_time" 1>&6
3137 if test $ac_cv_header_time = yes; then
3138   cat >> confdefs.h <<\EOF
3139 #define TIME_WITH_SYS_TIME 1
3140 EOF
3141
3142 fi
3143
3144 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3145 echo "configure:3146: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3146 if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
3147   echo $ac_n "(cached) $ac_c" 1>&6
3148 else
3149   cat > conftest.$ac_ext <<EOF
3150 #line 3151 "configure"
3151 #include "confdefs.h"
3152 #include <sys/types.h>
3153 #include <signal.h>
3154 /* NetBSD declares sys_siglist in unistd.h.  */
3155 #ifdef HAVE_UNISTD_H
3156 #include <unistd.h>
3157 #endif
3158 int main() {
3159 char *msg = *(sys_siglist + 1);
3160 ; return 0; }
3161 EOF
3162 if { (eval echo configure:3163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3163   rm -rf conftest*
3164   ac_cv_decl_sys_siglist=yes
3165 else
3166   echo "configure: failed program was:" >&5
3167   cat conftest.$ac_ext >&5
3168   rm -rf conftest*
3169   ac_cv_decl_sys_siglist=no
3170 fi
3171 rm -f conftest*
3172 fi
3173
3174 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3175 if test $ac_cv_decl_sys_siglist = yes; then
3176   cat >> confdefs.h <<\EOF
3177 #define SYS_SIGLIST_DECLARED 1
3178 EOF
3179
3180 fi
3181
3182
3183
3184 for ac_hdr in standards.h
3185 do
3186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3188 echo "configure:3189: checking for $ac_hdr" >&5
3189 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3190   echo $ac_n "(cached) $ac_c" 1>&6
3191 else
3192   cat > conftest.$ac_ext <<EOF
3193 #line 3194 "configure"
3194 #include "confdefs.h"
3195 #include <$ac_hdr>
3196 EOF
3197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3198 { (eval echo configure:3199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3200 if test -z "$ac_err"; then
3201   rm -rf conftest*
3202   eval "ac_cv_header_$ac_safe=yes"
3203 else
3204   echo "$ac_err" >&5
3205   echo "configure: failed program was:" >&5
3206   cat conftest.$ac_ext >&5
3207   rm -rf conftest*
3208   eval "ac_cv_header_$ac_safe=no"
3209 fi
3210 rm -f conftest*
3211 fi
3212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3213   echo "$ac_t""yes" 1>&6
3214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3215   cat >> confdefs.h <<EOF
3216 #define $ac_tr_hdr 1
3217 EOF
3218  
3219 else
3220   echo "$ac_t""no" 1>&6
3221 fi
3222 done
3223
3224 for i in netinet/ip.h netinet/tcp.h; do
3225
3226 cv=`echo "$i" | sed 'y%./+-%__p_%'`
3227
3228 echo $ac_n "checking for $i""... $ac_c" 1>&6
3229 echo "configure:3230: checking for $i" >&5
3230 if eval "test \"`echo '$''{'ac_cv_header_$cv'+set}'`\" = set"; then
3231   echo $ac_n "(cached) $ac_c" 1>&6
3232 else
3233   cat > conftest.$ac_ext <<EOF
3234 #line 3235 "configure"
3235 #include "confdefs.h"
3236 \
3237 #ifdef HAVE_STANDARDS_H
3238 #include <standards.h>
3239 #endif
3240 #include <$i>
3241
3242 EOF
3243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3244 { (eval echo configure:3245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3246 if test -z "$ac_err"; then
3247   rm -rf conftest*
3248   eval "ac_cv_header_$cv=yes"
3249 else
3250   echo "$ac_err" >&5
3251   echo "configure: failed program was:" >&5
3252   cat conftest.$ac_ext >&5
3253   rm -rf conftest*
3254   eval "ac_cv_header_$cv=no"
3255 fi
3256 rm -f conftest*
3257 fi
3258
3259 echo "$ac_t""`eval echo \\$ac_cv_header_$cv`" 1>&6
3260 if test `eval echo \\$ac_cv_header_$cv` = yes; then
3261   ac_tr_hdr=HAVE_`echo $i | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3262   cat >> confdefs.h <<EOF
3263 #define $ac_tr_hdr 1
3264 EOF
3265
3266 fi
3267 done
3268 : << END
3269 @@@headers="$headers netinet/ip.h netinet/tcp.h"@@@
3270 END
3271
3272
3273
3274 EXTRA_LOCL_HEADERS=
3275 EXTRA_HEADERS=
3276 if test "$ac_cv_header_err_h" != yes; then
3277         EXTRA_HEADERS="$EXTRA_HEADERS err.h"
3278 fi
3279 if test "$ac_cv_header_fnmatch_h" != yes; then
3280         EXTRA_LOCL_HEADERS="$EXTRA_LOCL_HEADERS fnmatch.h"
3281 fi
3282
3283
3284
3285
3286 for i in int8_t int16_t int32_t int64_t; do
3287         echo $ac_n "checking for $i""... $ac_c" 1>&6
3288 echo "configure:3289: checking for $i" >&5
3289         
3290 if eval "test \"`echo '$''{'ac_cv_type_$i'+set}'`\" = set"; then
3291   echo $ac_n "(cached) $ac_c" 1>&6
3292 else
3293   cat > conftest.$ac_ext <<EOF
3294 #line 3295 "configure"
3295 #include "confdefs.h"
3296
3297 #ifdef HAVE_INTTYPES_H
3298 #include <inttypes.h>
3299 #endif
3300 #ifdef HAVE_SYS_TYPES_H
3301 #include <sys/types.h>
3302 #endif
3303 #ifdef HAVE_SYS_BITYPES_H
3304 #include <sys/bitypes.h>
3305 #endif
3306 #ifdef HAVE_BIND_BITYPES_H
3307 #include <bind/bitypes.h>
3308 #endif
3309 #ifdef HAVE_NETINET_IN6_MACHTYPES_H
3310 #include <netinet/in6_machtypes.h>
3311 #endif
3312
3313 int main() {
3314 $i x;
3315
3316 ; return 0; }
3317 EOF
3318 if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3319   rm -rf conftest*
3320   eval ac_cv_type_$i=yes
3321 else
3322   echo "configure: failed program was:" >&5
3323   cat conftest.$ac_ext >&5
3324   rm -rf conftest*
3325   eval ac_cv_type_$i=no
3326 fi
3327 rm -f conftest*
3328 fi
3329
3330         eval ac_res=\$ac_cv_type_$i
3331         if test "$ac_res" = yes; then
3332                 type=HAVE_`echo $i | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
3333                 cat >> confdefs.h <<EOF
3334 #define $type 1
3335 EOF
3336
3337         fi
3338         echo "$ac_t""$ac_res" 1>&6
3339 done
3340
3341
3342 for i in u_int8_t u_int16_t u_int32_t u_int64_t; do
3343         echo $ac_n "checking for $i""... $ac_c" 1>&6
3344 echo "configure:3345: checking for $i" >&5
3345         
3346 if eval "test \"`echo '$''{'ac_cv_type_$i'+set}'`\" = set"; then
3347   echo $ac_n "(cached) $ac_c" 1>&6
3348 else
3349   cat > conftest.$ac_ext <<EOF
3350 #line 3351 "configure"
3351 #include "confdefs.h"
3352
3353 #ifdef HAVE_INTTYPES_H
3354 #include <inttypes.h>
3355 #endif
3356 #ifdef HAVE_SYS_TYPES_H
3357 #include <sys/types.h>
3358 #endif
3359 #ifdef HAVE_SYS_BITYPES_H
3360 #include <sys/bitypes.h>
3361 #endif
3362 #ifdef HAVE_BIND_BITYPES_H
3363 #include <bind/bitypes.h>
3364 #endif
3365 #ifdef HAVE_NETINET_IN6_MACHTYPES_H
3366 #include <netinet/in6_machtypes.h>
3367 #endif
3368
3369 int main() {
3370 $i x;
3371
3372 ; return 0; }
3373 EOF
3374 if { (eval echo configure:3375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3375   rm -rf conftest*
3376   eval ac_cv_type_$i=yes
3377 else
3378   echo "configure: failed program was:" >&5
3379   cat conftest.$ac_ext >&5
3380   rm -rf conftest*
3381   eval ac_cv_type_$i=no
3382 fi
3383 rm -f conftest*
3384 fi
3385
3386         eval ac_res=\$ac_cv_type_$i
3387         if test "$ac_res" = yes; then
3388                 type=HAVE_`echo $i | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
3389                 cat >> confdefs.h <<EOF
3390 #define $type 1
3391 EOF
3392
3393         fi
3394         echo "$ac_t""$ac_res" 1>&6
3395 done
3396
3397
3398 echo $ac_n "checking for strange sys/bitypes.h""... $ac_c" 1>&6
3399 echo "configure:3400: checking for strange sys/bitypes.h" >&5
3400 if eval "test \"`echo '$''{'krb_cv_int8_t_ifdef'+set}'`\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   
3404 cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407
3408 #ifdef HAVE_SYS_TYPES_H
3409 #include <sys/types.h>
3410 #endif
3411 #ifdef HAVE_SYS_BITYPES_H
3412 #include <sys/bitypes.h>
3413 #endif
3414 #ifdef HAVE_NETINET_IN6_MACHTYPES_H
3415 #include <netinet/in6_machtypes.h>
3416 #endif
3417
3418 int main() {
3419 int8_t x;
3420
3421 ; return 0; }
3422 EOF
3423 if { (eval echo configure:3424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3424   rm -rf conftest*
3425   krb_cv_int8_t_ifdef=no
3426 else
3427   echo "configure: failed program was:" >&5
3428   cat conftest.$ac_ext >&5
3429   rm -rf conftest*
3430   krb_cv_int8_t_ifdef=yes
3431 fi
3432 rm -f conftest*
3433 fi
3434
3435 echo "$ac_t""$krb_cv_int8_t_ifdef" 1>&6
3436 if test "$krb_cv_int8_t_ifdef" = "yes"; then
3437   cat >> confdefs.h <<\EOF
3438 #define HAVE_STRANGE_INT8_T 1
3439 EOF
3440 fi
3441
3442
3443
3444
3445
3446 echo $ac_n "checking for crypt""... $ac_c" 1>&6
3447 echo "configure:3448: checking for crypt" >&5
3448 if eval "test \"`echo '$''{'ac_cv_funclib_crypt'+set}'`\" = set"; then
3449   echo $ac_n "(cached) $ac_c" 1>&6
3450 else
3451   
3452 if eval "test \"\$ac_cv_func_crypt\" != yes" ; then
3453         ac_save_LIBS="$LIBS"
3454         for ac_lib in "" crypt; do
3455                 if test -n "$ac_lib"; then 
3456                         ac_lib="-l$ac_lib"
3457                 else
3458                         ac_lib=""
3459                 fi
3460                 LIBS=" $ac_lib  $ac_save_LIBS"
3461                 cat > conftest.$ac_ext <<EOF
3462 #line 3463 "configure"
3463 #include "confdefs.h"
3464
3465 int main() {
3466 crypt()
3467 ; return 0; }
3468 EOF
3469 if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3470   rm -rf conftest*
3471   eval "if test -n \"$ac_lib\";then ac_cv_funclib_crypt=$ac_lib; else ac_cv_funclib_crypt=yes; fi";break
3472 else
3473   echo "configure: failed program was:" >&5
3474   cat conftest.$ac_ext >&5
3475 fi
3476 rm -f conftest*
3477         done
3478         eval "ac_cv_funclib_crypt=\${ac_cv_funclib_crypt-no}"
3479         LIBS="$ac_save_LIBS"
3480 fi
3481
3482 fi
3483
3484
3485 eval "ac_res=\$ac_cv_funclib_crypt"
3486
3487 : << END
3488 @@@funcs="$funcs crypt"@@@
3489 @@@libs="$libs "" crypt"@@@
3490 END
3491
3492 # crypt
3493 eval "ac_tr_func=HAVE_`echo crypt | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3494 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3495 eval "LIB_crypt=$ac_res"
3496
3497 case "$ac_res" in
3498         yes)
3499         eval "ac_cv_func_crypt=yes"
3500         eval "LIB_crypt="
3501         cat >> confdefs.h <<EOF
3502 #define $ac_tr_func 1
3503 EOF
3504
3505         echo "$ac_t""yes" 1>&6
3506         ;;
3507         no)
3508         eval "ac_cv_func_crypt=no"
3509         eval "LIB_crypt="
3510         echo "$ac_t""no" 1>&6
3511         ;;
3512         *)
3513         eval "ac_cv_func_crypt=yes"
3514         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
3515         cat >> confdefs.h <<EOF
3516 #define $ac_tr_func 1
3517 EOF
3518
3519         cat >> confdefs.h <<EOF
3520 #define $ac_tr_lib 1
3521 EOF
3522
3523         echo "$ac_t""yes, in $ac_res" 1>&6
3524         ;;
3525 esac
3526
3527
3528
3529
3530
3531
3532
3533 echo $ac_n "checking for socket""... $ac_c" 1>&6
3534 echo "configure:3535: checking for socket" >&5
3535 if eval "test \"`echo '$''{'ac_cv_funclib_socket'+set}'`\" = set"; then
3536   echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538   
3539 if eval "test \"\$ac_cv_func_socket\" != yes" ; then
3540         ac_save_LIBS="$LIBS"
3541         for ac_lib in "" socket; do
3542                 if test -n "$ac_lib"; then 
3543                         ac_lib="-l$ac_lib"
3544                 else
3545                         ac_lib=""
3546                 fi
3547                 LIBS=" $ac_lib  $ac_save_LIBS"
3548                 cat > conftest.$ac_ext <<EOF
3549 #line 3550 "configure"
3550 #include "confdefs.h"
3551 #ifdef HAVE_SYS_TYPES_H
3552 #include <sys/types.h>
3553 #endif
3554 #ifdef HAVE_SYS_SOCKET_H
3555 #include <sys/socket.h>
3556 #endif
3557 int main() {
3558 socket(0,0,0)
3559 ; return 0; }
3560 EOF
3561 if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3562   rm -rf conftest*
3563   eval "if test -n \"$ac_lib\";then ac_cv_funclib_socket=$ac_lib; else ac_cv_funclib_socket=yes; fi";break
3564 else
3565   echo "configure: failed program was:" >&5
3566   cat conftest.$ac_ext >&5
3567 fi
3568 rm -f conftest*
3569         done
3570         eval "ac_cv_funclib_socket=\${ac_cv_funclib_socket-no}"
3571         LIBS="$ac_save_LIBS"
3572 fi
3573
3574 fi
3575
3576
3577 eval "ac_res=\$ac_cv_funclib_socket"
3578
3579 : << END
3580 @@@funcs="$funcs socket"@@@
3581 @@@libs="$libs "" socket"@@@
3582 END
3583
3584 # socket
3585 eval "ac_tr_func=HAVE_`echo socket | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3586 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3587 eval "LIB_socket=$ac_res"
3588
3589 case "$ac_res" in
3590         yes)
3591         eval "ac_cv_func_socket=yes"
3592         eval "LIB_socket="
3593         cat >> confdefs.h <<EOF
3594 #define $ac_tr_func 1
3595 EOF
3596
3597         echo "$ac_t""yes" 1>&6
3598         ;;
3599         no)
3600         eval "ac_cv_func_socket=no"
3601         eval "LIB_socket="
3602         echo "$ac_t""no" 1>&6
3603         ;;
3604         *)
3605         eval "ac_cv_func_socket=yes"
3606         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
3607         cat >> confdefs.h <<EOF
3608 #define $ac_tr_func 1
3609 EOF
3610
3611         cat >> confdefs.h <<EOF
3612 #define $ac_tr_lib 1
3613 EOF
3614
3615         echo "$ac_t""yes, in $ac_res" 1>&6
3616         ;;
3617 esac
3618
3619
3620 if test -n "$LIB_socket"; then
3621         LIBS="$LIB_socket $LIBS"
3622 fi
3623
3624
3625
3626
3627
3628 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3629 echo "configure:3630: checking for gethostbyname" >&5
3630 if eval "test \"`echo '$''{'ac_cv_funclib_gethostbyname'+set}'`\" = set"; then
3631   echo $ac_n "(cached) $ac_c" 1>&6
3632 else
3633   
3634 if eval "test \"\$ac_cv_func_gethostbyname\" != yes" ; then
3635         ac_save_LIBS="$LIBS"
3636         for ac_lib in "" nsl; do
3637                 if test -n "$ac_lib"; then 
3638                         ac_lib="-l$ac_lib"
3639                 else
3640                         ac_lib=""
3641                 fi
3642                 LIBS=" $ac_lib  $ac_save_LIBS"
3643                 cat > conftest.$ac_ext <<EOF
3644 #line 3645 "configure"
3645 #include "confdefs.h"
3646 #ifdef HAVE_SYS_TYPES_H
3647 #include <sys/types.h>
3648 #endif
3649 #ifdef HAVE_SYS_SOCKET_H
3650 #include <sys/socket.h>
3651 #endif
3652 int main() {
3653 gethostbyname("foo")
3654 ; return 0; }
3655 EOF
3656 if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3657   rm -rf conftest*
3658   eval "if test -n \"$ac_lib\";then ac_cv_funclib_gethostbyname=$ac_lib; else ac_cv_funclib_gethostbyname=yes; fi";break
3659 else
3660   echo "configure: failed program was:" >&5
3661   cat conftest.$ac_ext >&5
3662 fi
3663 rm -f conftest*
3664         done
3665         eval "ac_cv_funclib_gethostbyname=\${ac_cv_funclib_gethostbyname-no}"
3666         LIBS="$ac_save_LIBS"
3667 fi
3668
3669 fi
3670
3671
3672 eval "ac_res=\$ac_cv_funclib_gethostbyname"
3673
3674 : << END
3675 @@@funcs="$funcs gethostbyname"@@@
3676 @@@libs="$libs "" nsl"@@@
3677 END
3678
3679 # gethostbyname
3680 eval "ac_tr_func=HAVE_`echo gethostbyname | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3681 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3682 eval "LIB_gethostbyname=$ac_res"
3683
3684 case "$ac_res" in
3685         yes)
3686         eval "ac_cv_func_gethostbyname=yes"
3687         eval "LIB_gethostbyname="
3688         cat >> confdefs.h <<EOF
3689 #define $ac_tr_func 1
3690 EOF
3691
3692         echo "$ac_t""yes" 1>&6
3693         ;;
3694         no)
3695         eval "ac_cv_func_gethostbyname=no"
3696         eval "LIB_gethostbyname="
3697         echo "$ac_t""no" 1>&6
3698         ;;
3699         *)
3700         eval "ac_cv_func_gethostbyname=yes"
3701         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
3702         cat >> confdefs.h <<EOF
3703 #define $ac_tr_func 1
3704 EOF
3705
3706         cat >> confdefs.h <<EOF
3707 #define $ac_tr_lib 1
3708 EOF
3709
3710         echo "$ac_t""yes, in $ac_res" 1>&6
3711         ;;
3712 esac
3713
3714
3715 if test -n "$LIB_gethostbyname"; then
3716         LIBS="$LIB_gethostbyname $LIBS"
3717 fi
3718
3719
3720
3721
3722
3723
3724
3725 echo $ac_n "checking for odm_initialize""... $ac_c" 1>&6
3726 echo "configure:3727: checking for odm_initialize" >&5
3727 if eval "test \"`echo '$''{'ac_cv_funclib_odm_initialize'+set}'`\" = set"; then
3728   echo $ac_n "(cached) $ac_c" 1>&6
3729 else
3730   
3731 if eval "test \"\$ac_cv_func_odm_initialize\" != yes" ; then
3732         ac_save_LIBS="$LIBS"
3733         for ac_lib in "" odm; do
3734                 if test -n "$ac_lib"; then 
3735                         ac_lib="-l$ac_lib"
3736                 else
3737                         ac_lib=""
3738                 fi
3739                 LIBS=" $ac_lib  $ac_save_LIBS"
3740                 cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743
3744 int main() {
3745 odm_initialize()
3746 ; return 0; }
3747 EOF
3748 if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3749   rm -rf conftest*
3750   eval "if test -n \"$ac_lib\";then ac_cv_funclib_odm_initialize=$ac_lib; else ac_cv_funclib_odm_initialize=yes; fi";break
3751 else
3752   echo "configure: failed program was:" >&5
3753   cat conftest.$ac_ext >&5
3754 fi
3755 rm -f conftest*
3756         done
3757         eval "ac_cv_funclib_odm_initialize=\${ac_cv_funclib_odm_initialize-no}"
3758         LIBS="$ac_save_LIBS"
3759 fi
3760
3761 fi
3762
3763
3764 eval "ac_res=\$ac_cv_funclib_odm_initialize"
3765
3766 : << END
3767 @@@funcs="$funcs odm_initialize"@@@
3768 @@@libs="$libs "" odm"@@@
3769 END
3770
3771 # odm_initialize
3772 eval "ac_tr_func=HAVE_`echo odm_initialize | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3773 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3774 eval "LIB_odm_initialize=$ac_res"
3775
3776 case "$ac_res" in
3777         yes)
3778         eval "ac_cv_func_odm_initialize=yes"
3779         eval "LIB_odm_initialize="
3780         cat >> confdefs.h <<EOF
3781 #define $ac_tr_func 1
3782 EOF
3783
3784         echo "$ac_t""yes" 1>&6
3785         ;;
3786         no)
3787         eval "ac_cv_func_odm_initialize=no"
3788         eval "LIB_odm_initialize="
3789         echo "$ac_t""no" 1>&6
3790         ;;
3791         *)
3792         eval "ac_cv_func_odm_initialize=yes"
3793         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
3794         cat >> confdefs.h <<EOF
3795 #define $ac_tr_func 1
3796 EOF
3797
3798         cat >> confdefs.h <<EOF
3799 #define $ac_tr_lib 1
3800 EOF
3801
3802         echo "$ac_t""yes, in $ac_res" 1>&6
3803         ;;
3804 esac
3805
3806
3807 if test -n "$LIB_odm_initialize"; then
3808         LIBS="$LIB_odm_initialize $LIBS"
3809 fi
3810
3811
3812
3813
3814
3815 echo $ac_n "checking for getattr""... $ac_c" 1>&6
3816 echo "configure:3817: checking for getattr" >&5
3817 if eval "test \"`echo '$''{'ac_cv_funclib_getattr'+set}'`\" = set"; then
3818   echo $ac_n "(cached) $ac_c" 1>&6
3819 else
3820   
3821 if eval "test \"\$ac_cv_func_getattr\" != yes" ; then
3822         ac_save_LIBS="$LIBS"
3823         for ac_lib in "" cfg; do
3824                 if test -n "$ac_lib"; then 
3825                         ac_lib="-l$ac_lib"
3826                 else
3827                         ac_lib=""
3828                 fi
3829                 LIBS=" $ac_lib  $ac_save_LIBS"
3830                 cat > conftest.$ac_ext <<EOF
3831 #line 3832 "configure"
3832 #include "confdefs.h"
3833
3834 int main() {
3835 getattr()
3836 ; return 0; }
3837 EOF
3838 if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3839   rm -rf conftest*
3840   eval "if test -n \"$ac_lib\";then ac_cv_funclib_getattr=$ac_lib; else ac_cv_funclib_getattr=yes; fi";break
3841 else
3842   echo "configure: failed program was:" >&5
3843   cat conftest.$ac_ext >&5
3844 fi
3845 rm -f conftest*
3846         done
3847         eval "ac_cv_funclib_getattr=\${ac_cv_funclib_getattr-no}"
3848         LIBS="$ac_save_LIBS"
3849 fi
3850
3851 fi
3852
3853
3854 eval "ac_res=\$ac_cv_funclib_getattr"
3855
3856 : << END
3857 @@@funcs="$funcs getattr"@@@
3858 @@@libs="$libs "" cfg"@@@
3859 END
3860
3861 # getattr
3862 eval "ac_tr_func=HAVE_`echo getattr | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3863 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3864 eval "LIB_getattr=$ac_res"
3865
3866 case "$ac_res" in
3867         yes)
3868         eval "ac_cv_func_getattr=yes"
3869         eval "LIB_getattr="
3870         cat >> confdefs.h <<EOF
3871 #define $ac_tr_func 1
3872 EOF
3873
3874         echo "$ac_t""yes" 1>&6
3875         ;;
3876         no)
3877         eval "ac_cv_func_getattr=no"
3878         eval "LIB_getattr="
3879         echo "$ac_t""no" 1>&6
3880         ;;
3881         *)
3882         eval "ac_cv_func_getattr=yes"
3883         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
3884         cat >> confdefs.h <<EOF
3885 #define $ac_tr_func 1
3886 EOF
3887
3888         cat >> confdefs.h <<EOF
3889 #define $ac_tr_lib 1
3890 EOF
3891
3892         echo "$ac_t""yes, in $ac_res" 1>&6
3893         ;;
3894 esac
3895
3896
3897 if test -n "$LIB_getattr"; then
3898         LIBS="$LIB_getattr $LIBS"
3899 fi
3900
3901
3902
3903
3904
3905 echo $ac_n "checking for setpcred""... $ac_c" 1>&6
3906 echo "configure:3907: checking for setpcred" >&5
3907 if eval "test \"`echo '$''{'ac_cv_funclib_setpcred'+set}'`\" = set"; then
3908   echo $ac_n "(cached) $ac_c" 1>&6
3909 else
3910   
3911 if eval "test \"\$ac_cv_func_setpcred\" != yes" ; then
3912         ac_save_LIBS="$LIBS"
3913         for ac_lib in "" s; do
3914                 if test -n "$ac_lib"; then 
3915                         ac_lib="-l$ac_lib"
3916                 else
3917                         ac_lib=""
3918                 fi
3919                 LIBS=" $ac_lib  $ac_save_LIBS"
3920                 cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3923
3924 int main() {
3925 setpcred()
3926 ; return 0; }
3927 EOF
3928 if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3929   rm -rf conftest*
3930   eval "if test -n \"$ac_lib\";then ac_cv_funclib_setpcred=$ac_lib; else ac_cv_funclib_setpcred=yes; fi";break
3931 else
3932   echo "configure: failed program was:" >&5
3933   cat conftest.$ac_ext >&5
3934 fi
3935 rm -f conftest*
3936         done
3937         eval "ac_cv_funclib_setpcred=\${ac_cv_funclib_setpcred-no}"
3938         LIBS="$ac_save_LIBS"
3939 fi
3940
3941 fi
3942
3943
3944 eval "ac_res=\$ac_cv_funclib_setpcred"
3945
3946 : << END
3947 @@@funcs="$funcs setpcred"@@@
3948 @@@libs="$libs "" s"@@@
3949 END
3950
3951 # setpcred
3952 eval "ac_tr_func=HAVE_`echo setpcred | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3953 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
3954 eval "LIB_setpcred=$ac_res"
3955
3956 case "$ac_res" in
3957         yes)
3958         eval "ac_cv_func_setpcred=yes"
3959         eval "LIB_setpcred="
3960         cat >> confdefs.h <<EOF
3961 #define $ac_tr_func 1
3962 EOF
3963
3964         echo "$ac_t""yes" 1>&6
3965         ;;
3966         no)
3967         eval "ac_cv_func_setpcred=no"
3968         eval "LIB_setpcred="
3969         echo "$ac_t""no" 1>&6
3970         ;;
3971         *)
3972         eval "ac_cv_func_setpcred=yes"
3973         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
3974         cat >> confdefs.h <<EOF
3975 #define $ac_tr_func 1
3976 EOF
3977
3978         cat >> confdefs.h <<EOF
3979 #define $ac_tr_lib 1
3980 EOF
3981
3982         echo "$ac_t""yes, in $ac_res" 1>&6
3983         ;;
3984 esac
3985
3986
3987 if test -n "$LIB_setpcred"; then
3988         LIBS="$LIB_setpcred $LIBS"
3989 fi
3990
3991
3992
3993
3994
3995 echo $ac_n "checking for logwtmp""... $ac_c" 1>&6
3996 echo "configure:3997: checking for logwtmp" >&5
3997 if eval "test \"`echo '$''{'ac_cv_funclib_logwtmp'+set}'`\" = set"; then
3998   echo $ac_n "(cached) $ac_c" 1>&6
3999 else
4000   
4001 if eval "test \"\$ac_cv_func_logwtmp\" != yes" ; then
4002         ac_save_LIBS="$LIBS"
4003         for ac_lib in "" util; do
4004                 if test -n "$ac_lib"; then 
4005                         ac_lib="-l$ac_lib"
4006                 else
4007                         ac_lib=""
4008                 fi
4009                 LIBS=" $ac_lib  $ac_save_LIBS"
4010                 cat > conftest.$ac_ext <<EOF
4011 #line 4012 "configure"
4012 #include "confdefs.h"
4013
4014 int main() {
4015 logwtmp()
4016 ; return 0; }
4017 EOF
4018 if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4019   rm -rf conftest*
4020   eval "if test -n \"$ac_lib\";then ac_cv_funclib_logwtmp=$ac_lib; else ac_cv_funclib_logwtmp=yes; fi";break
4021 else
4022   echo "configure: failed program was:" >&5
4023   cat conftest.$ac_ext >&5
4024 fi
4025 rm -f conftest*
4026         done
4027         eval "ac_cv_funclib_logwtmp=\${ac_cv_funclib_logwtmp-no}"
4028         LIBS="$ac_save_LIBS"
4029 fi
4030
4031 fi
4032
4033
4034 eval "ac_res=\$ac_cv_funclib_logwtmp"
4035
4036 : << END
4037 @@@funcs="$funcs logwtmp"@@@
4038 @@@libs="$libs "" util"@@@
4039 END
4040
4041 # logwtmp
4042 eval "ac_tr_func=HAVE_`echo logwtmp | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
4043 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
4044 eval "LIB_logwtmp=$ac_res"
4045
4046 case "$ac_res" in
4047         yes)
4048         eval "ac_cv_func_logwtmp=yes"
4049         eval "LIB_logwtmp="
4050         cat >> confdefs.h <<EOF
4051 #define $ac_tr_func 1
4052 EOF
4053
4054         echo "$ac_t""yes" 1>&6
4055         ;;
4056         no)
4057         eval "ac_cv_func_logwtmp=no"
4058         eval "LIB_logwtmp="
4059         echo "$ac_t""no" 1>&6
4060         ;;
4061         *)
4062         eval "ac_cv_func_logwtmp=yes"
4063         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
4064         cat >> confdefs.h <<EOF
4065 #define $ac_tr_func 1
4066 EOF
4067
4068         cat >> confdefs.h <<EOF
4069 #define $ac_tr_lib 1
4070 EOF
4071
4072         echo "$ac_t""yes, in $ac_res" 1>&6
4073         ;;
4074 esac
4075
4076
4077 if test -n "$LIB_logwtmp"; then
4078         LIBS="$LIB_logwtmp $LIBS"
4079 fi
4080
4081
4082
4083
4084
4085
4086 echo $ac_n "checking for logout""... $ac_c" 1>&6
4087 echo "configure:4088: checking for logout" >&5
4088 if eval "test \"`echo '$''{'ac_cv_funclib_logout'+set}'`\" = set"; then
4089   echo $ac_n "(cached) $ac_c" 1>&6
4090 else
4091   
4092 if eval "test \"\$ac_cv_func_logout\" != yes" ; then
4093         ac_save_LIBS="$LIBS"
4094         for ac_lib in "" util; do
4095                 if test -n "$ac_lib"; then 
4096                         ac_lib="-l$ac_lib"
4097                 else
4098                         ac_lib=""
4099                 fi
4100                 LIBS=" $ac_lib  $ac_save_LIBS"
4101                 cat > conftest.$ac_ext <<EOF
4102 #line 4103 "configure"
4103 #include "confdefs.h"
4104
4105 int main() {
4106 logout()
4107 ; return 0; }
4108 EOF
4109 if { (eval echo configure:4110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4110   rm -rf conftest*
4111   eval "if test -n \"$ac_lib\";then ac_cv_funclib_logout=$ac_lib; else ac_cv_funclib_logout=yes; fi";break
4112 else
4113   echo "configure: failed program was:" >&5
4114   cat conftest.$ac_ext >&5
4115 fi
4116 rm -f conftest*
4117         done
4118         eval "ac_cv_funclib_logout=\${ac_cv_funclib_logout-no}"
4119         LIBS="$ac_save_LIBS"
4120 fi
4121
4122 fi
4123
4124
4125 eval "ac_res=\$ac_cv_funclib_logout"
4126
4127 : << END
4128 @@@funcs="$funcs logout"@@@
4129 @@@libs="$libs "" util"@@@
4130 END
4131
4132 # logout
4133 eval "ac_tr_func=HAVE_`echo logout | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
4134 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
4135 eval "LIB_logout=$ac_res"
4136
4137 case "$ac_res" in
4138         yes)
4139         eval "ac_cv_func_logout=yes"
4140         eval "LIB_logout="
4141         cat >> confdefs.h <<EOF
4142 #define $ac_tr_func 1
4143 EOF
4144
4145         echo "$ac_t""yes" 1>&6
4146         ;;
4147         no)
4148         eval "ac_cv_func_logout=no"
4149         eval "LIB_logout="
4150         echo "$ac_t""no" 1>&6
4151         ;;
4152         *)
4153         eval "ac_cv_func_logout=yes"
4154         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
4155         cat >> confdefs.h <<EOF
4156 #define $ac_tr_func 1
4157 EOF
4158
4159         cat >> confdefs.h <<EOF
4160 #define $ac_tr_lib 1
4161 EOF
4162
4163         echo "$ac_t""yes, in $ac_res" 1>&6
4164         ;;
4165 esac
4166
4167
4168 if test -n "$LIB_logout"; then
4169         LIBS="$LIB_logout $LIBS"
4170 fi
4171
4172
4173
4174
4175 echo $ac_n "checking for tgetent""... $ac_c" 1>&6
4176 echo "configure:4177: checking for tgetent" >&5
4177 if eval "test \"`echo '$''{'ac_cv_funclib_tgetent'+set}'`\" = set"; then
4178   echo $ac_n "(cached) $ac_c" 1>&6
4179 else
4180   
4181 if eval "test \"\$ac_cv_func_tgetent\" != yes" ; then
4182         ac_save_LIBS="$LIBS"
4183         for ac_lib in "" termcap ncurses curses; do
4184                 if test -n "$ac_lib"; then 
4185                         ac_lib="-l$ac_lib"
4186                 else
4187                         ac_lib=""
4188                 fi
4189                 LIBS=" $ac_lib  $ac_save_LIBS"
4190                 cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193
4194 int main() {
4195 tgetent()
4196 ; return 0; }
4197 EOF
4198 if { (eval echo configure:4199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4199   rm -rf conftest*
4200   eval "if test -n \"$ac_lib\";then ac_cv_funclib_tgetent=$ac_lib; else ac_cv_funclib_tgetent=yes; fi";break
4201 else
4202   echo "configure: failed program was:" >&5
4203   cat conftest.$ac_ext >&5
4204 fi
4205 rm -f conftest*
4206         done
4207         eval "ac_cv_funclib_tgetent=\${ac_cv_funclib_tgetent-no}"
4208         LIBS="$ac_save_LIBS"
4209 fi
4210
4211 fi
4212
4213
4214 eval "ac_res=\$ac_cv_funclib_tgetent"
4215
4216 : << END
4217 @@@funcs="$funcs tgetent"@@@
4218 @@@libs="$libs "" termcap ncurses curses"@@@
4219 END
4220
4221 # tgetent
4222 eval "ac_tr_func=HAVE_`echo tgetent | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
4223 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
4224 eval "LIB_tgetent=$ac_res"
4225
4226 case "$ac_res" in
4227         yes)
4228         eval "ac_cv_func_tgetent=yes"
4229         eval "LIB_tgetent="
4230         cat >> confdefs.h <<EOF
4231 #define $ac_tr_func 1
4232 EOF
4233
4234         echo "$ac_t""yes" 1>&6
4235         ;;
4236         no)
4237         eval "ac_cv_func_tgetent=no"
4238         eval "LIB_tgetent="
4239         echo "$ac_t""no" 1>&6
4240         ;;
4241         *)
4242         eval "ac_cv_func_tgetent=yes"
4243         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
4244         cat >> confdefs.h <<EOF
4245 #define $ac_tr_func 1
4246 EOF
4247
4248         cat >> confdefs.h <<EOF
4249 #define $ac_tr_lib 1
4250 EOF
4251
4252         echo "$ac_t""yes, in $ac_res" 1>&6
4253         ;;
4254 esac
4255
4256
4257         
4258 # If we find X, set shell vars x_includes and x_libraries to the
4259 # paths, otherwise set no_x=yes.
4260 # Uses ac_ vars as temps to allow command line to override cache and checks.
4261 # --without-x overrides everything else, but does not touch the cache.
4262 echo $ac_n "checking for X""... $ac_c" 1>&6
4263 echo "configure:4264: checking for X" >&5
4264
4265 # Check whether --with-x or --without-x was given.
4266 if test "${with_x+set}" = set; then
4267   withval="$with_x"
4268   :
4269 fi
4270
4271 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4272 if test "x$with_x" = xno; then
4273   # The user explicitly disabled X.
4274   have_x=disabled
4275 else
4276   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4277     # Both variables are already set.
4278     have_x=yes
4279   else
4280 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4281   echo $ac_n "(cached) $ac_c" 1>&6
4282 else
4283   # One or both of the vars are not set, and there is no cached value.
4284 ac_x_includes=NO ac_x_libraries=NO
4285 rm -fr conftestdir
4286 if mkdir conftestdir; then
4287   cd conftestdir
4288   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4289   cat > Imakefile <<'EOF'
4290 acfindx:
4291         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4292 EOF
4293   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4294     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4295     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4296     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4297     for ac_extension in a so sl; do
4298       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4299         test -f $ac_im_libdir/libX11.$ac_extension; then
4300         ac_im_usrlibdir=$ac_im_libdir; break
4301       fi
4302     done
4303     # Screen out bogus values from the imake configuration.  They are
4304     # bogus both because they are the default anyway, and because
4305     # using them would break gcc on systems where it needs fixed includes.
4306     case "$ac_im_incroot" in
4307         /usr/include) ;;
4308         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4309     esac
4310     case "$ac_im_usrlibdir" in
4311         /usr/lib | /lib) ;;
4312         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4313     esac
4314   fi
4315   cd ..
4316   rm -fr conftestdir
4317 fi
4318
4319 if test "$ac_x_includes" = NO; then
4320   # Guess where to find include files, by looking for this one X11 .h file.
4321   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4322
4323   # First, try using that file with no special directory specified.
4324 cat > conftest.$ac_ext <<EOF
4325 #line 4326 "configure"
4326 #include "confdefs.h"
4327 #include <$x_direct_test_include>
4328 EOF
4329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4330 { (eval echo configure:4331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4332 if test -z "$ac_err"; then
4333   rm -rf conftest*
4334   # We can compile using X headers with no special include directory.
4335 ac_x_includes=
4336 else
4337   echo "$ac_err" >&5
4338   echo "configure: failed program was:" >&5
4339   cat conftest.$ac_ext >&5
4340   rm -rf conftest*
4341   # Look for the header file in a standard set of common directories.
4342 # Check X11 before X11Rn because it is often a symlink to the current release.
4343   for ac_dir in               \
4344     /usr/X11/include          \
4345     /usr/X11R6/include        \
4346     /usr/X11R5/include        \
4347     /usr/X11R4/include        \
4348                               \
4349     /usr/include/X11          \
4350     /usr/include/X11R6        \
4351     /usr/include/X11R5        \
4352     /usr/include/X11R4        \
4353                               \
4354     /usr/local/X11/include    \
4355     /usr/local/X11R6/include  \
4356     /usr/local/X11R5/include  \
4357     /usr/local/X11R4/include  \
4358                               \
4359     /usr/local/include/X11    \
4360     /usr/local/include/X11R6  \
4361     /usr/local/include/X11R5  \
4362     /usr/local/include/X11R4  \
4363                               \
4364     /usr/X386/include         \
4365     /usr/x386/include         \
4366     /usr/XFree86/include/X11  \
4367                               \
4368     /usr/include              \
4369     /usr/local/include        \
4370     /usr/unsupported/include  \
4371     /usr/athena/include       \
4372     /usr/local/x11r5/include  \
4373     /usr/lpp/Xamples/include  \
4374                               \
4375     /usr/openwin/include      \
4376     /usr/openwin/share/include \
4377     ; \
4378   do
4379     if test -r "$ac_dir/$x_direct_test_include"; then
4380       ac_x_includes=$ac_dir
4381       break
4382     fi
4383   done
4384 fi
4385 rm -f conftest*
4386 fi # $ac_x_includes = NO
4387
4388 if test "$ac_x_libraries" = NO; then
4389   # Check for the libraries.
4390
4391   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4392   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4393
4394   # See if we find them without any special options.
4395   # Don't add to $LIBS permanently.
4396   ac_save_LIBS="$LIBS"
4397   LIBS="-l$x_direct_test_library $LIBS"
4398 cat > conftest.$ac_ext <<EOF
4399 #line 4400 "configure"
4400 #include "confdefs.h"
4401
4402 int main() {
4403 ${x_direct_test_function}()
4404 ; return 0; }
4405 EOF
4406 if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4407   rm -rf conftest*
4408   LIBS="$ac_save_LIBS"
4409 # We can link X programs with no special library path.
4410 ac_x_libraries=
4411 else
4412   echo "configure: failed program was:" >&5
4413   cat conftest.$ac_ext >&5
4414   rm -rf conftest*
4415   LIBS="$ac_save_LIBS"
4416 # First see if replacing the include by lib works.
4417 # Check X11 before X11Rn because it is often a symlink to the current release.
4418 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4419     /usr/X11/lib          \
4420     /usr/X11R6/lib        \
4421     /usr/X11R5/lib        \
4422     /usr/X11R4/lib        \
4423                           \
4424     /usr/lib/X11          \
4425     /usr/lib/X11R6        \
4426     /usr/lib/X11R5        \
4427     /usr/lib/X11R4        \
4428                           \
4429     /usr/local/X11/lib    \
4430     /usr/local/X11R6/lib  \
4431     /usr/local/X11R5/lib  \
4432     /usr/local/X11R4/lib  \
4433                           \
4434     /usr/local/lib/X11    \
4435     /usr/local/lib/X11R6  \
4436     /usr/local/lib/X11R5  \
4437     /usr/local/lib/X11R4  \
4438                           \
4439     /usr/X386/lib         \
4440     /usr/x386/lib         \
4441     /usr/XFree86/lib/X11  \
4442                           \
4443     /usr/lib              \
4444     /usr/local/lib        \
4445     /usr/unsupported/lib  \
4446     /usr/athena/lib       \
4447     /usr/local/x11r5/lib  \
4448     /usr/lpp/Xamples/lib  \
4449     /lib/usr/lib/X11      \
4450                           \
4451     /usr/openwin/lib      \
4452     /usr/openwin/share/lib \
4453     ; \
4454 do
4455   for ac_extension in a so sl; do
4456     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4457       ac_x_libraries=$ac_dir
4458       break 2
4459     fi
4460   done
4461 done
4462 fi
4463 rm -f conftest*
4464 fi # $ac_x_libraries = NO
4465
4466 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4467   # Didn't find X anywhere.  Cache the known absence of X.
4468   ac_cv_have_x="have_x=no"
4469 else
4470   # Record where we found X for the cache.
4471   ac_cv_have_x="have_x=yes \
4472                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4473 fi
4474 fi
4475   fi
4476   eval "$ac_cv_have_x"
4477 fi # $with_x != no
4478
4479 if test "$have_x" != yes; then
4480   echo "$ac_t""$have_x" 1>&6
4481   no_x=yes
4482 else
4483   # If each of the values was on the command line, it overrides each guess.
4484   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4485   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4486   # Update the cache value to reflect the command line values.
4487   ac_cv_have_x="have_x=yes \
4488                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4489   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4490 fi
4491
4492
4493 if test "$no_x" = yes; then
4494   # Not all programs may use this symbol, but it does not hurt to define it.
4495   cat >> confdefs.h <<\EOF
4496 #define X_DISPLAY_MISSING 1
4497 EOF
4498
4499   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4500 else
4501   if test -n "$x_includes"; then
4502     X_CFLAGS="$X_CFLAGS -I$x_includes"
4503   fi
4504
4505   # It would also be nice to do this for all -L options, not just this one.
4506   if test -n "$x_libraries"; then
4507     X_LIBS="$X_LIBS -L$x_libraries"
4508     # For Solaris; some versions of Sun CC require a space after -R and
4509     # others require no space.  Words are not sufficient . . . .
4510     case "`(uname -sr) 2>/dev/null`" in
4511     "SunOS 5"*)
4512       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4513 echo "configure:4514: checking whether -R must be followed by a space" >&5
4514       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4515       cat > conftest.$ac_ext <<EOF
4516 #line 4517 "configure"
4517 #include "confdefs.h"
4518
4519 int main() {
4520
4521 ; return 0; }
4522 EOF
4523 if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4524   rm -rf conftest*
4525   ac_R_nospace=yes
4526 else
4527   echo "configure: failed program was:" >&5
4528   cat conftest.$ac_ext >&5
4529   rm -rf conftest*
4530   ac_R_nospace=no
4531 fi
4532 rm -f conftest*
4533       if test $ac_R_nospace = yes; then
4534         echo "$ac_t""no" 1>&6
4535         X_LIBS="$X_LIBS -R$x_libraries"
4536       else
4537         LIBS="$ac_xsave_LIBS -R $x_libraries"
4538         cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541
4542 int main() {
4543
4544 ; return 0; }
4545 EOF
4546 if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4547   rm -rf conftest*
4548   ac_R_space=yes
4549 else
4550   echo "configure: failed program was:" >&5
4551   cat conftest.$ac_ext >&5
4552   rm -rf conftest*
4553   ac_R_space=no
4554 fi
4555 rm -f conftest*
4556         if test $ac_R_space = yes; then
4557           echo "$ac_t""yes" 1>&6
4558           X_LIBS="$X_LIBS -R $x_libraries"
4559         else
4560           echo "$ac_t""neither works" 1>&6
4561         fi
4562       fi
4563       LIBS="$ac_xsave_LIBS"
4564     esac
4565   fi
4566
4567   # Check for system-dependent libraries X programs must link with.
4568   # Do this before checking for the system-independent R6 libraries
4569   # (-lICE), since we may need -lsocket or whatever for X linking.
4570
4571   if test "$ISC" = yes; then
4572     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4573   else
4574     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4575     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4576     # the Alpha needs dnet_stub (dnet does not exist).
4577     echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4578 echo "configure:4579: checking for dnet_ntoa in -ldnet" >&5
4579 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4580 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4581   echo $ac_n "(cached) $ac_c" 1>&6
4582 else
4583   ac_save_LIBS="$LIBS"
4584 LIBS="-ldnet  $LIBS"
4585 cat > conftest.$ac_ext <<EOF
4586 #line 4587 "configure"
4587 #include "confdefs.h"
4588 /* Override any gcc2 internal prototype to avoid an error.  */
4589 /* We use char because int might match the return type of a gcc2
4590     builtin and then its argument prototype would still apply.  */
4591 char dnet_ntoa();
4592
4593 int main() {
4594 dnet_ntoa()
4595 ; return 0; }
4596 EOF
4597 if { (eval echo configure:4598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4598   rm -rf conftest*
4599   eval "ac_cv_lib_$ac_lib_var=yes"
4600 else
4601   echo "configure: failed program was:" >&5
4602   cat conftest.$ac_ext >&5
4603   rm -rf conftest*
4604   eval "ac_cv_lib_$ac_lib_var=no"
4605 fi
4606 rm -f conftest*
4607 LIBS="$ac_save_LIBS"
4608
4609 fi
4610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4611   echo "$ac_t""yes" 1>&6
4612   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4613 else
4614   echo "$ac_t""no" 1>&6
4615 fi
4616
4617     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4618       echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4619 echo "configure:4620: checking for dnet_ntoa in -ldnet_stub" >&5
4620 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4621 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   ac_save_LIBS="$LIBS"
4625 LIBS="-ldnet_stub  $LIBS"
4626 cat > conftest.$ac_ext <<EOF
4627 #line 4628 "configure"
4628 #include "confdefs.h"
4629 /* Override any gcc2 internal prototype to avoid an error.  */
4630 /* We use char because int might match the return type of a gcc2
4631     builtin and then its argument prototype would still apply.  */
4632 char dnet_ntoa();
4633
4634 int main() {
4635 dnet_ntoa()
4636 ; return 0; }
4637 EOF
4638 if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4639   rm -rf conftest*
4640   eval "ac_cv_lib_$ac_lib_var=yes"
4641 else
4642   echo "configure: failed program was:" >&5
4643   cat conftest.$ac_ext >&5
4644   rm -rf conftest*
4645   eval "ac_cv_lib_$ac_lib_var=no"
4646 fi
4647 rm -f conftest*
4648 LIBS="$ac_save_LIBS"
4649
4650 fi
4651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4652   echo "$ac_t""yes" 1>&6
4653   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4654 else
4655   echo "$ac_t""no" 1>&6
4656 fi
4657
4658     fi
4659
4660     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4661     # to get the SysV transport functions.
4662     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4663     # needs -lnsl.
4664     # The nsl library prevents programs from opening the X display
4665     # on Irix 5.2, according to dickey@clark.net.
4666     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4667 echo "configure:4668: checking for gethostbyname" >&5
4668 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4669   echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671   cat > conftest.$ac_ext <<EOF
4672 #line 4673 "configure"
4673 #include "confdefs.h"
4674 /* System header to define __stub macros and hopefully few prototypes,
4675     which can conflict with char gethostbyname(); below.  */
4676 #include <assert.h>
4677 /* Override any gcc2 internal prototype to avoid an error.  */
4678 /* We use char because int might match the return type of a gcc2
4679     builtin and then its argument prototype would still apply.  */
4680 char gethostbyname();
4681
4682 int main() {
4683
4684 /* The GNU C library defines this for functions which it implements
4685     to always fail with ENOSYS.  Some functions are actually named
4686     something starting with __ and the normal name is an alias.  */
4687 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4688 choke me
4689 #else
4690 gethostbyname();
4691 #endif
4692
4693 ; return 0; }
4694 EOF
4695 if { (eval echo configure:4696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4696   rm -rf conftest*
4697   eval "ac_cv_func_gethostbyname=yes"
4698 else
4699   echo "configure: failed program was:" >&5
4700   cat conftest.$ac_ext >&5
4701   rm -rf conftest*
4702   eval "ac_cv_func_gethostbyname=no"
4703 fi
4704 rm -f conftest*
4705 fi
4706
4707 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4708   echo "$ac_t""yes" 1>&6
4709   :
4710 else
4711   echo "$ac_t""no" 1>&6
4712 fi
4713
4714     if test $ac_cv_func_gethostbyname = no; then
4715       echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4716 echo "configure:4717: checking for gethostbyname in -lnsl" >&5
4717 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4718 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4719   echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721   ac_save_LIBS="$LIBS"
4722 LIBS="-lnsl  $LIBS"
4723 cat > conftest.$ac_ext <<EOF
4724 #line 4725 "configure"
4725 #include "confdefs.h"
4726 /* Override any gcc2 internal prototype to avoid an error.  */
4727 /* We use char because int might match the return type of a gcc2
4728     builtin and then its argument prototype would still apply.  */
4729 char gethostbyname();
4730
4731 int main() {
4732 gethostbyname()
4733 ; return 0; }
4734 EOF
4735 if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4736   rm -rf conftest*
4737   eval "ac_cv_lib_$ac_lib_var=yes"
4738 else
4739   echo "configure: failed program was:" >&5
4740   cat conftest.$ac_ext >&5
4741   rm -rf conftest*
4742   eval "ac_cv_lib_$ac_lib_var=no"
4743 fi
4744 rm -f conftest*
4745 LIBS="$ac_save_LIBS"
4746
4747 fi
4748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4749   echo "$ac_t""yes" 1>&6
4750   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4751 else
4752   echo "$ac_t""no" 1>&6
4753 fi
4754
4755     fi
4756
4757     # lieder@skyler.mavd.honeywell.com says without -lsocket,
4758     # socket/setsockopt and other routines are undefined under SCO ODT
4759     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4760     # on later versions), says simon@lia.di.epfl.ch: it contains
4761     # gethostby* variants that don't use the nameserver (or something).
4762     # -lsocket must be given before -lnsl if both are needed.
4763     # We assume that if connect needs -lnsl, so does gethostbyname.
4764     echo $ac_n "checking for connect""... $ac_c" 1>&6
4765 echo "configure:4766: checking for connect" >&5
4766 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4767   echo $ac_n "(cached) $ac_c" 1>&6
4768 else
4769   cat > conftest.$ac_ext <<EOF
4770 #line 4771 "configure"
4771 #include "confdefs.h"
4772 /* System header to define __stub macros and hopefully few prototypes,
4773     which can conflict with char connect(); below.  */
4774 #include <assert.h>
4775 /* Override any gcc2 internal prototype to avoid an error.  */
4776 /* We use char because int might match the return type of a gcc2
4777     builtin and then its argument prototype would still apply.  */
4778 char connect();
4779
4780 int main() {
4781
4782 /* The GNU C library defines this for functions which it implements
4783     to always fail with ENOSYS.  Some functions are actually named
4784     something starting with __ and the normal name is an alias.  */
4785 #if defined (__stub_connect) || defined (__stub___connect)
4786 choke me
4787 #else
4788 connect();
4789 #endif
4790
4791 ; return 0; }
4792 EOF
4793 if { (eval echo configure:4794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4794   rm -rf conftest*
4795   eval "ac_cv_func_connect=yes"
4796 else
4797   echo "configure: failed program was:" >&5
4798   cat conftest.$ac_ext >&5
4799   rm -rf conftest*
4800   eval "ac_cv_func_connect=no"
4801 fi
4802 rm -f conftest*
4803 fi
4804
4805 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4806   echo "$ac_t""yes" 1>&6
4807   :
4808 else
4809   echo "$ac_t""no" 1>&6
4810 fi
4811
4812     if test $ac_cv_func_connect = no; then
4813       echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4814 echo "configure:4815: checking for connect in -lsocket" >&5
4815 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4817   echo $ac_n "(cached) $ac_c" 1>&6
4818 else
4819   ac_save_LIBS="$LIBS"
4820 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
4821 cat > conftest.$ac_ext <<EOF
4822 #line 4823 "configure"
4823 #include "confdefs.h"
4824 /* Override any gcc2 internal prototype to avoid an error.  */
4825 /* We use char because int might match the return type of a gcc2
4826     builtin and then its argument prototype would still apply.  */
4827 char connect();
4828
4829 int main() {
4830 connect()
4831 ; return 0; }
4832 EOF
4833 if { (eval echo configure:4834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4834   rm -rf conftest*
4835   eval "ac_cv_lib_$ac_lib_var=yes"
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840   eval "ac_cv_lib_$ac_lib_var=no"
4841 fi
4842 rm -f conftest*
4843 LIBS="$ac_save_LIBS"
4844
4845 fi
4846 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4847   echo "$ac_t""yes" 1>&6
4848   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4849 else
4850   echo "$ac_t""no" 1>&6
4851 fi
4852
4853     fi
4854
4855     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
4856     echo $ac_n "checking for remove""... $ac_c" 1>&6
4857 echo "configure:4858: checking for remove" >&5
4858 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
4859   echo $ac_n "(cached) $ac_c" 1>&6
4860 else
4861   cat > conftest.$ac_ext <<EOF
4862 #line 4863 "configure"
4863 #include "confdefs.h"
4864 /* System header to define __stub macros and hopefully few prototypes,
4865     which can conflict with char remove(); below.  */
4866 #include <assert.h>
4867 /* Override any gcc2 internal prototype to avoid an error.  */
4868 /* We use char because int might match the return type of a gcc2
4869     builtin and then its argument prototype would still apply.  */
4870 char remove();
4871
4872 int main() {
4873
4874 /* The GNU C library defines this for functions which it implements
4875     to always fail with ENOSYS.  Some functions are actually named
4876     something starting with __ and the normal name is an alias.  */
4877 #if defined (__stub_remove) || defined (__stub___remove)
4878 choke me
4879 #else
4880 remove();
4881 #endif
4882
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   eval "ac_cv_func_remove=yes"
4888 else
4889   echo "configure: failed program was:" >&5
4890   cat conftest.$ac_ext >&5
4891   rm -rf conftest*
4892   eval "ac_cv_func_remove=no"
4893 fi
4894 rm -f conftest*
4895 fi
4896
4897 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
4898   echo "$ac_t""yes" 1>&6
4899   :
4900 else
4901   echo "$ac_t""no" 1>&6
4902 fi
4903
4904     if test $ac_cv_func_remove = no; then
4905       echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
4906 echo "configure:4907: checking for remove in -lposix" >&5
4907 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
4908 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4909   echo $ac_n "(cached) $ac_c" 1>&6
4910 else
4911   ac_save_LIBS="$LIBS"
4912 LIBS="-lposix  $LIBS"
4913 cat > conftest.$ac_ext <<EOF
4914 #line 4915 "configure"
4915 #include "confdefs.h"
4916 /* Override any gcc2 internal prototype to avoid an error.  */
4917 /* We use char because int might match the return type of a gcc2
4918     builtin and then its argument prototype would still apply.  */
4919 char remove();
4920
4921 int main() {
4922 remove()
4923 ; return 0; }
4924 EOF
4925 if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4926   rm -rf conftest*
4927   eval "ac_cv_lib_$ac_lib_var=yes"
4928 else
4929   echo "configure: failed program was:" >&5
4930   cat conftest.$ac_ext >&5
4931   rm -rf conftest*
4932   eval "ac_cv_lib_$ac_lib_var=no"
4933 fi
4934 rm -f conftest*
4935 LIBS="$ac_save_LIBS"
4936
4937 fi
4938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4939   echo "$ac_t""yes" 1>&6
4940   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
4941 else
4942   echo "$ac_t""no" 1>&6
4943 fi
4944
4945     fi
4946
4947     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
4948     echo $ac_n "checking for shmat""... $ac_c" 1>&6
4949 echo "configure:4950: checking for shmat" >&5
4950 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
4951   echo $ac_n "(cached) $ac_c" 1>&6
4952 else
4953   cat > conftest.$ac_ext <<EOF
4954 #line 4955 "configure"
4955 #include "confdefs.h"
4956 /* System header to define __stub macros and hopefully few prototypes,
4957     which can conflict with char shmat(); below.  */
4958 #include <assert.h>
4959 /* Override any gcc2 internal prototype to avoid an error.  */
4960 /* We use char because int might match the return type of a gcc2
4961     builtin and then its argument prototype would still apply.  */
4962 char shmat();
4963
4964 int main() {
4965
4966 /* The GNU C library defines this for functions which it implements
4967     to always fail with ENOSYS.  Some functions are actually named
4968     something starting with __ and the normal name is an alias.  */
4969 #if defined (__stub_shmat) || defined (__stub___shmat)
4970 choke me
4971 #else
4972 shmat();
4973 #endif
4974
4975 ; return 0; }
4976 EOF
4977 if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4978   rm -rf conftest*
4979   eval "ac_cv_func_shmat=yes"
4980 else
4981   echo "configure: failed program was:" >&5
4982   cat conftest.$ac_ext >&5
4983   rm -rf conftest*
4984   eval "ac_cv_func_shmat=no"
4985 fi
4986 rm -f conftest*
4987 fi
4988
4989 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
4990   echo "$ac_t""yes" 1>&6
4991   :
4992 else
4993   echo "$ac_t""no" 1>&6
4994 fi
4995
4996     if test $ac_cv_func_shmat = no; then
4997       echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
4998 echo "configure:4999: checking for shmat in -lipc" >&5
4999 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5000 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5001   echo $ac_n "(cached) $ac_c" 1>&6
5002 else
5003   ac_save_LIBS="$LIBS"
5004 LIBS="-lipc  $LIBS"
5005 cat > conftest.$ac_ext <<EOF
5006 #line 5007 "configure"
5007 #include "confdefs.h"
5008 /* Override any gcc2 internal prototype to avoid an error.  */
5009 /* We use char because int might match the return type of a gcc2
5010     builtin and then its argument prototype would still apply.  */
5011 char shmat();
5012
5013 int main() {
5014 shmat()
5015 ; return 0; }
5016 EOF
5017 if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5018   rm -rf conftest*
5019   eval "ac_cv_lib_$ac_lib_var=yes"
5020 else
5021   echo "configure: failed program was:" >&5
5022   cat conftest.$ac_ext >&5
5023   rm -rf conftest*
5024   eval "ac_cv_lib_$ac_lib_var=no"
5025 fi
5026 rm -f conftest*
5027 LIBS="$ac_save_LIBS"
5028
5029 fi
5030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5031   echo "$ac_t""yes" 1>&6
5032   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5033 else
5034   echo "$ac_t""no" 1>&6
5035 fi
5036
5037     fi
5038   fi
5039
5040   # Check for libraries that X11R6 Xt/Xaw programs need.
5041   ac_save_LDFLAGS="$LDFLAGS"
5042   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5043   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5044   # check for ICE first), but we must link in the order -lSM -lICE or
5045   # we get undefined symbols.  So assume we have SM if we have ICE.
5046   # These have to be linked with before -lX11, unlike the other
5047   # libraries we check for below, so use a different variable.
5048   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5049   echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5050 echo "configure:5051: checking for IceConnectionNumber in -lICE" >&5
5051 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5053   echo $ac_n "(cached) $ac_c" 1>&6
5054 else
5055   ac_save_LIBS="$LIBS"
5056 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5057 cat > conftest.$ac_ext <<EOF
5058 #line 5059 "configure"
5059 #include "confdefs.h"
5060 /* Override any gcc2 internal prototype to avoid an error.  */
5061 /* We use char because int might match the return type of a gcc2
5062     builtin and then its argument prototype would still apply.  */
5063 char IceConnectionNumber();
5064
5065 int main() {
5066 IceConnectionNumber()
5067 ; return 0; }
5068 EOF
5069 if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5070   rm -rf conftest*
5071   eval "ac_cv_lib_$ac_lib_var=yes"
5072 else
5073   echo "configure: failed program was:" >&5
5074   cat conftest.$ac_ext >&5
5075   rm -rf conftest*
5076   eval "ac_cv_lib_$ac_lib_var=no"
5077 fi
5078 rm -f conftest*
5079 LIBS="$ac_save_LIBS"
5080
5081 fi
5082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5083   echo "$ac_t""yes" 1>&6
5084   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5085 else
5086   echo "$ac_t""no" 1>&6
5087 fi
5088
5089   LDFLAGS="$ac_save_LDFLAGS"
5090
5091 fi
5092
5093
5094 # try to figure out if we need any additional ld flags, like -R
5095 # and yes, the autoconf X test is utterly broken
5096 if test "$no_x" != yes; then
5097         echo $ac_n "checking for special X linker flags""... $ac_c" 1>&6
5098 echo "configure:5099: checking for special X linker flags" >&5
5099 if eval "test \"`echo '$''{'krb_cv_sys_x_libs_rpath'+set}'`\" = set"; then
5100   echo $ac_n "(cached) $ac_c" 1>&6
5101 else
5102   
5103         ac_save_libs="$LIBS"
5104         ac_save_cflags="$CFLAGS"
5105         CFLAGS="$CFLAGS $X_CFLAGS"
5106         krb_cv_sys_x_libs_rpath=""
5107         krb_cv_sys_x_libs=""
5108         for rflag in "" "-R" "-R " "-rpath "; do
5109                 if test "$rflag" = ""; then
5110                         foo="$X_LIBS"
5111                 else
5112                         foo=""
5113                         for flag in $X_LIBS; do
5114                         case $flag in
5115                         -L*)
5116                                 foo="$foo $flag `echo $flag | sed \"s/-L/$rflag/\"`"
5117                                 ;;
5118                         *)
5119                                 foo="$foo $flag"
5120                                 ;;
5121                         esac
5122                         done
5123                 fi
5124                 LIBS="$ac_save_libs $foo $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
5125                 if test "$cross_compiling" = yes; then
5126     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5127 else
5128   cat > conftest.$ac_ext <<EOF
5129 #line 5130 "configure"
5130 #include "confdefs.h"
5131
5132                 #include <X11/Xlib.h>
5133                 foo()
5134                 {
5135                 XOpenDisplay(NULL);
5136                 }
5137                 main()
5138                 {
5139                 return 0;
5140                 }
5141                 
5142 EOF
5143 if { (eval echo configure:5144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5144 then
5145   krb_cv_sys_x_libs_rpath="$rflag"; krb_cv_sys_x_libs="$foo"; break
5146 else
5147   echo "configure: failed program was:" >&5
5148   cat conftest.$ac_ext >&5
5149   rm -fr conftest*
5150   :
5151 fi
5152 rm -fr conftest*
5153 fi
5154
5155         done
5156         LIBS="$ac_save_libs"
5157         CFLAGS="$ac_save_cflags"
5158         
5159 fi
5160
5161 echo "$ac_t""$krb_cv_sys_x_libs_rpath" 1>&6
5162         X_LIBS="$krb_cv_sys_x_libs"
5163 fi
5164
5165 if test "$no_x" = "yes" ; then
5166         MAKE_X_PROGS_BIN=""
5167         MAKE_X_SCRIPTS_BIN=""
5168         MAKE_X_PROGS_LIBEXEC=""
5169 else
5170         MAKE_X_PROGS_BIN='$(X_PROGS_BIN)'
5171         MAKE_X_SCRIPTS_BIN='$(X_SCRIPTS_BIN)'
5172         MAKE_X_PROGS_LIBEXEC='$(X_PROGS_LIBEXEC)'
5173 fi
5174
5175
5176 save_CFLAGS="$CFLAGS"
5177 CFLAGS="$X_CFLAGS $CFLAGS"
5178 save_LIBS="$LIBS"
5179 LIBS="$X_PRE_LIBS $X_EXTRA_LIBS $LIBS"
5180 save_LDFLAGS="$LDFLAGS"
5181 LDFLAGS="$LDFLAGS $X_LIBS"
5182
5183
5184
5185
5186
5187 echo $ac_n "checking for XauWriteAuth""... $ac_c" 1>&6
5188 echo "configure:5189: checking for XauWriteAuth" >&5
5189 if eval "test \"`echo '$''{'ac_cv_funclib_XauWriteAuth'+set}'`\" = set"; then
5190   echo $ac_n "(cached) $ac_c" 1>&6
5191 else
5192   
5193 if eval "test \"\$ac_cv_func_XauWriteAuth\" != yes" ; then
5194         ac_save_LIBS="$LIBS"
5195         for ac_lib in "" X11 Xau; do
5196                 if test -n "$ac_lib"; then 
5197                         ac_lib="-l$ac_lib"
5198                 else
5199                         ac_lib=""
5200                 fi
5201                 LIBS=" $ac_lib  $ac_save_LIBS"
5202                 cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205
5206 int main() {
5207 XauWriteAuth()
5208 ; return 0; }
5209 EOF
5210 if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5211   rm -rf conftest*
5212   eval "if test -n \"$ac_lib\";then ac_cv_funclib_XauWriteAuth=$ac_lib; else ac_cv_funclib_XauWriteAuth=yes; fi";break
5213 else
5214   echo "configure: failed program was:" >&5
5215   cat conftest.$ac_ext >&5
5216 fi
5217 rm -f conftest*
5218         done
5219         eval "ac_cv_funclib_XauWriteAuth=\${ac_cv_funclib_XauWriteAuth-no}"
5220         LIBS="$ac_save_LIBS"
5221 fi
5222
5223 fi
5224
5225
5226 eval "ac_res=\$ac_cv_funclib_XauWriteAuth"
5227
5228 : << END
5229 @@@funcs="$funcs XauWriteAuth"@@@
5230 @@@libs="$libs "" X11 Xau"@@@
5231 END
5232
5233 # XauWriteAuth
5234 eval "ac_tr_func=HAVE_`echo XauWriteAuth | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
5235 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
5236 eval "LIB_XauWriteAuth=$ac_res"
5237
5238 case "$ac_res" in
5239         yes)
5240         eval "ac_cv_func_XauWriteAuth=yes"
5241         eval "LIB_XauWriteAuth="
5242         cat >> confdefs.h <<EOF
5243 #define $ac_tr_func 1
5244 EOF
5245
5246         echo "$ac_t""yes" 1>&6
5247         ;;
5248         no)
5249         eval "ac_cv_func_XauWriteAuth=no"
5250         eval "LIB_XauWriteAuth="
5251         echo "$ac_t""no" 1>&6
5252         ;;
5253         *)
5254         eval "ac_cv_func_XauWriteAuth=yes"
5255         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
5256         cat >> confdefs.h <<EOF
5257 #define $ac_tr_func 1
5258 EOF
5259
5260         cat >> confdefs.h <<EOF
5261 #define $ac_tr_lib 1
5262 EOF
5263
5264         echo "$ac_t""yes, in $ac_res" 1>&6
5265         ;;
5266 esac
5267
5268
5269 ac_xxx="$LIBS"
5270 LIBS="$LIB_XauWriteAuth $LIBS"
5271
5272
5273
5274 echo $ac_n "checking for XauReadAuth""... $ac_c" 1>&6
5275 echo "configure:5276: checking for XauReadAuth" >&5
5276 if eval "test \"`echo '$''{'ac_cv_funclib_XauReadAuth'+set}'`\" = set"; then
5277   echo $ac_n "(cached) $ac_c" 1>&6
5278 else
5279   
5280 if eval "test \"\$ac_cv_func_XauReadAuth\" != yes" ; then
5281         ac_save_LIBS="$LIBS"
5282         for ac_lib in "" X11 Xau; do
5283                 if test -n "$ac_lib"; then 
5284                         ac_lib="-l$ac_lib"
5285                 else
5286                         ac_lib=""
5287                 fi
5288                 LIBS=" $ac_lib  $ac_save_LIBS"
5289                 cat > conftest.$ac_ext <<EOF
5290 #line 5291 "configure"
5291 #include "confdefs.h"
5292
5293 int main() {
5294 XauReadAuth()
5295 ; return 0; }
5296 EOF
5297 if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5298   rm -rf conftest*
5299   eval "if test -n \"$ac_lib\";then ac_cv_funclib_XauReadAuth=$ac_lib; else ac_cv_funclib_XauReadAuth=yes; fi";break
5300 else
5301   echo "configure: failed program was:" >&5
5302   cat conftest.$ac_ext >&5
5303 fi
5304 rm -f conftest*
5305         done
5306         eval "ac_cv_funclib_XauReadAuth=\${ac_cv_funclib_XauReadAuth-no}"
5307         LIBS="$ac_save_LIBS"
5308 fi
5309
5310 fi
5311
5312
5313 eval "ac_res=\$ac_cv_funclib_XauReadAuth"
5314
5315 : << END
5316 @@@funcs="$funcs XauReadAuth"@@@
5317 @@@libs="$libs "" X11 Xau"@@@
5318 END
5319
5320 # XauReadAuth
5321 eval "ac_tr_func=HAVE_`echo XauReadAuth | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
5322 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
5323 eval "LIB_XauReadAuth=$ac_res"
5324
5325 case "$ac_res" in
5326         yes)
5327         eval "ac_cv_func_XauReadAuth=yes"
5328         eval "LIB_XauReadAuth="
5329         cat >> confdefs.h <<EOF
5330 #define $ac_tr_func 1
5331 EOF
5332
5333         echo "$ac_t""yes" 1>&6
5334         ;;
5335         no)
5336         eval "ac_cv_func_XauReadAuth=no"
5337         eval "LIB_XauReadAuth="
5338         echo "$ac_t""no" 1>&6
5339         ;;
5340         *)
5341         eval "ac_cv_func_XauReadAuth=yes"
5342         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
5343         cat >> confdefs.h <<EOF
5344 #define $ac_tr_func 1
5345 EOF
5346
5347         cat >> confdefs.h <<EOF
5348 #define $ac_tr_lib 1
5349 EOF
5350
5351         echo "$ac_t""yes, in $ac_res" 1>&6
5352         ;;
5353 esac
5354
5355
5356 LIBS="$LIB_XauReadAauth $LIBS"
5357
5358
5359
5360 echo $ac_n "checking for XauFileName""... $ac_c" 1>&6
5361 echo "configure:5362: checking for XauFileName" >&5
5362 if eval "test \"`echo '$''{'ac_cv_funclib_XauFileName'+set}'`\" = set"; then
5363   echo $ac_n "(cached) $ac_c" 1>&6
5364 else
5365   
5366 if eval "test \"\$ac_cv_func_XauFileName\" != yes" ; then
5367         ac_save_LIBS="$LIBS"
5368         for ac_lib in "" X11 Xau; do
5369                 if test -n "$ac_lib"; then 
5370                         ac_lib="-l$ac_lib"
5371                 else
5372                         ac_lib=""
5373                 fi
5374                 LIBS=" $ac_lib  $ac_save_LIBS"
5375                 cat > conftest.$ac_ext <<EOF
5376 #line 5377 "configure"
5377 #include "confdefs.h"
5378
5379 int main() {
5380 XauFileName()
5381 ; return 0; }
5382 EOF
5383 if { (eval echo configure:5384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5384   rm -rf conftest*
5385   eval "if test -n \"$ac_lib\";then ac_cv_funclib_XauFileName=$ac_lib; else ac_cv_funclib_XauFileName=yes; fi";break
5386 else
5387   echo "configure: failed program was:" >&5
5388   cat conftest.$ac_ext >&5
5389 fi
5390 rm -f conftest*
5391         done
5392         eval "ac_cv_funclib_XauFileName=\${ac_cv_funclib_XauFileName-no}"
5393         LIBS="$ac_save_LIBS"
5394 fi
5395
5396 fi
5397
5398
5399 eval "ac_res=\$ac_cv_funclib_XauFileName"
5400
5401 : << END
5402 @@@funcs="$funcs XauFileName"@@@
5403 @@@libs="$libs "" X11 Xau"@@@
5404 END
5405
5406 # XauFileName
5407 eval "ac_tr_func=HAVE_`echo XauFileName | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
5408 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
5409 eval "LIB_XauFileName=$ac_res"
5410
5411 case "$ac_res" in
5412         yes)
5413         eval "ac_cv_func_XauFileName=yes"
5414         eval "LIB_XauFileName="
5415         cat >> confdefs.h <<EOF
5416 #define $ac_tr_func 1
5417 EOF
5418
5419         echo "$ac_t""yes" 1>&6
5420         ;;
5421         no)
5422         eval "ac_cv_func_XauFileName=no"
5423         eval "LIB_XauFileName="
5424         echo "$ac_t""no" 1>&6
5425         ;;
5426         *)
5427         eval "ac_cv_func_XauFileName=yes"
5428         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
5429         cat >> confdefs.h <<EOF
5430 #define $ac_tr_func 1
5431 EOF
5432
5433         cat >> confdefs.h <<EOF
5434 #define $ac_tr_lib 1
5435 EOF
5436
5437         echo "$ac_t""yes, in $ac_res" 1>&6
5438         ;;
5439 esac
5440
5441
5442 LIBS="$ac_xxx"
5443
5444 case "$ac_cv_funclib_XauWriteAuth" in
5445 yes)    ;;
5446 no)     ;;
5447 *)      if test "$ac_cv_funclib_XauReadAuth" = yes; then
5448                 if test "$ac_cv_funclib_XauFileName" = yes; then
5449                         LIB_XauReadAuth="$LIB_XauWriteAuth"
5450                 else
5451                         LIB_XauReadAuth="$LIB_XauWriteAuth $LIB_XauFileName"
5452                 fi
5453         else
5454                 if test "$ac_cv_funclib_XauFileName" = yes; then
5455                         LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth"
5456                 else
5457                         LIB_XauReadAuth="$LIB_XauReadAuth $LIB_XauWriteAuth $LIB_XauFileName"
5458                 fi
5459         fi
5460         ;;
5461 esac
5462
5463 if test "$AUTOMAKE" != ""; then
5464         
5465
5466 if test "$ac_cv_func_XauWriteAuth" != "yes"; then
5467   NEED_WRITEAUTH_TRUE=
5468   NEED_WRITEAUTH_FALSE='#'
5469 else
5470   NEED_WRITEAUTH_TRUE='#'
5471   NEED_WRITEAUTH_FALSE=
5472 fi
5473 else
5474         
5475         
5476         if test "$ac_cv_func_XauWriteAuth" != "yes"; then
5477                 NEED_WRITEAUTH_TRUE=
5478                 NEED_WRITEAUTH_FALSE='#'
5479         else
5480                 NEED_WRITEAUTH_TRUE='#'
5481                 NEED_WRITEAUTH_FALSE=
5482         fi
5483 fi
5484 CFLAGS=$save_CFLAGS
5485 LIBS=$save_LIBS
5486 LDFLAGS=$save_LDFLAGS
5487
5488
5489
5490
5491
5492 lib_dbm=no
5493 lib_db=no
5494
5495 for i in "" $berkeley_db gdbm ndbm; do
5496
5497         if test "$i"; then
5498                 m="lib$i"
5499                 l="-l$i"
5500         else
5501                 m="libc"
5502                 l=""
5503         fi      
5504
5505         echo $ac_n "checking for dbm_open in $m""... $ac_c" 1>&6
5506 echo "configure:5507: checking for dbm_open in $m" >&5
5507         if eval "test \"`echo '$''{'ac_cv_krb_dbm_open_$m'+set}'`\" = set"; then
5508   echo $ac_n "(cached) $ac_c" 1>&6
5509 else
5510   
5511
5512         save_LIBS="$LIBS"
5513         LIBS="$l $LIBS"
5514         if test "$cross_compiling" = yes; then
5515   ac_res=no
5516 else
5517   cat > conftest.$ac_ext <<EOF
5518 #line 5519 "configure"
5519 #include "confdefs.h"
5520
5521 #include <unistd.h>
5522 #include <fcntl.h>
5523 #if defined(HAVE_NDBM_H)
5524 #include <ndbm.h>
5525 #elif defined(HAVE_GDBM_NDBM_H)
5526 #include <gdbm/ndbm.h>
5527 #elif defined(HAVE_DBM_H)
5528 #include <dbm.h>
5529 #elif defined(HAVE_RPCSVC_DBM_H)
5530 #include <rpcsvc/dbm.h>
5531 #elif defined(HAVE_DB_H)
5532 #define DB_DBM_HSEARCH 1
5533 #include <db.h>
5534 #endif
5535 int main()
5536 {
5537   DBM *d;
5538
5539   d = dbm_open("conftest", O_RDWR | O_CREAT, 0666);
5540   if(d == NULL)
5541     return 1;
5542   dbm_close(d);
5543   return 0;
5544 }
5545 EOF
5546 if { (eval echo configure:5547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5547 then
5548   
5549         if test -f conftest.db; then
5550                 ac_res=db
5551         else
5552                 ac_res=dbm
5553         fi
5554 else
5555   echo "configure: failed program was:" >&5
5556   cat conftest.$ac_ext >&5
5557   rm -fr conftest*
5558   ac_res=no
5559 fi
5560 rm -fr conftest*
5561 fi
5562
5563
5564         LIBS="$save_LIBS"
5565
5566         eval ac_cv_krb_dbm_open_$m=$ac_res
5567 fi
5568
5569         eval ac_res=\$ac_cv_krb_dbm_open_$m
5570         echo "$ac_t""$ac_res" 1>&6
5571
5572         if test "$lib_dbm" = no -a $ac_res = dbm; then
5573                 lib_dbm="$l"
5574         elif test "$lib_db" = no -a $ac_res = db; then
5575                 lib_db="$l"
5576                 break
5577         fi
5578 done
5579
5580 echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
5581 echo "configure:5582: checking for NDBM library" >&5
5582 ac_ndbm=no
5583 if test "$lib_db" != no; then
5584         LIB_DBM="$lib_db"
5585         ac_ndbm=yes
5586         cat >> confdefs.h <<\EOF
5587 #define HAVE_NEW_DB 1
5588 EOF
5589
5590         if test "$LIB_DBM"; then
5591                 ac_res="yes, $LIB_DBM"
5592         else
5593                 ac_res=yes
5594         fi
5595 elif test "$lib_dbm" != no; then
5596         LIB_DBM="$lib_dbm"
5597         ac_ndbm=yes
5598         if test "$LIB_DBM"; then
5599                 ac_res="yes, $LIB_DBM"
5600         else
5601                 ac_res=yes
5602         fi
5603 else
5604         LIB_DBM=""
5605         ac_res=no
5606 fi
5607 test "$ac_ndbm" = yes && cat >> confdefs.h <<\EOF
5608 #define NDBM 1
5609 EOF
5610
5611 DBLIB="$LIB_DBM"
5612
5613 echo "$ac_t""$ac_res" 1>&6
5614
5615
5616
5617
5618
5619
5620
5621 echo $ac_n "checking for syslog""... $ac_c" 1>&6
5622 echo "configure:5623: checking for syslog" >&5
5623 if eval "test \"`echo '$''{'ac_cv_funclib_syslog'+set}'`\" = set"; then
5624   echo $ac_n "(cached) $ac_c" 1>&6
5625 else
5626   
5627 if eval "test \"\$ac_cv_func_syslog\" != yes" ; then
5628         ac_save_LIBS="$LIBS"
5629         for ac_lib in "" syslog; do
5630                 if test -n "$ac_lib"; then 
5631                         ac_lib="-l$ac_lib"
5632                 else
5633                         ac_lib=""
5634                 fi
5635                 LIBS=" $ac_lib  $ac_save_LIBS"
5636                 cat > conftest.$ac_ext <<EOF
5637 #line 5638 "configure"
5638 #include "confdefs.h"
5639
5640 int main() {
5641 syslog()
5642 ; return 0; }
5643 EOF
5644 if { (eval echo configure:5645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5645   rm -rf conftest*
5646   eval "if test -n \"$ac_lib\";then ac_cv_funclib_syslog=$ac_lib; else ac_cv_funclib_syslog=yes; fi";break
5647 else
5648   echo "configure: failed program was:" >&5
5649   cat conftest.$ac_ext >&5
5650 fi
5651 rm -f conftest*
5652         done
5653         eval "ac_cv_funclib_syslog=\${ac_cv_funclib_syslog-no}"
5654         LIBS="$ac_save_LIBS"
5655 fi
5656
5657 fi
5658
5659
5660 eval "ac_res=\$ac_cv_funclib_syslog"
5661
5662 : << END
5663 @@@funcs="$funcs syslog"@@@
5664 @@@libs="$libs "" syslog"@@@
5665 END
5666
5667 # syslog
5668 eval "ac_tr_func=HAVE_`echo syslog | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
5669 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
5670 eval "LIB_syslog=$ac_res"
5671
5672 case "$ac_res" in
5673         yes)
5674         eval "ac_cv_func_syslog=yes"
5675         eval "LIB_syslog="
5676         cat >> confdefs.h <<EOF
5677 #define $ac_tr_func 1
5678 EOF
5679
5680         echo "$ac_t""yes" 1>&6
5681         ;;
5682         no)
5683         eval "ac_cv_func_syslog=no"
5684         eval "LIB_syslog="
5685         echo "$ac_t""no" 1>&6
5686         ;;
5687         *)
5688         eval "ac_cv_func_syslog=yes"
5689         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
5690         cat >> confdefs.h <<EOF
5691 #define $ac_tr_func 1
5692 EOF
5693
5694         cat >> confdefs.h <<EOF
5695 #define $ac_tr_lib 1
5696 EOF
5697
5698         echo "$ac_t""yes, in $ac_res" 1>&6
5699         ;;
5700 esac
5701
5702
5703 if test -n "$LIB_syslog"; then
5704         LIBS="$LIB_syslog $LIBS"
5705 fi
5706
5707
5708
5709 echo $ac_n "checking for working snprintf""... $ac_c" 1>&6
5710 echo "configure:5711: checking for working snprintf" >&5
5711 if eval "test \"`echo '$''{'ac_cv_func_snprintf_working'+set}'`\" = set"; then
5712   echo $ac_n "(cached) $ac_c" 1>&6
5713 else
5714   ac_cv_func_snprintf_working=yes
5715 if test "$cross_compiling" = yes; then
5716   :
5717 else
5718   cat > conftest.$ac_ext <<EOF
5719 #line 5720 "configure"
5720 #include "confdefs.h"
5721
5722 #include <stdio.h>
5723 #include <string.h>
5724 int main()
5725 {
5726         char foo[3];
5727         snprintf(foo, 2, "12");
5728         return strcmp(foo, "1");
5729 }
5730 EOF
5731 if { (eval echo configure:5732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5732 then
5733   :
5734 else
5735   echo "configure: failed program was:" >&5
5736   cat conftest.$ac_ext >&5
5737   rm -fr conftest*
5738   ac_cv_func_snprintf_working=no
5739 fi
5740 rm -fr conftest*
5741 fi
5742
5743 fi
5744
5745 echo "$ac_t""$ac_cv_func_snprintf_working" 1>&6
5746
5747 if test "$ac_cv_func_snprintf_working" = yes; then
5748         cat >> confdefs.h <<EOF
5749 #define HAVE_SNPRINTF 1
5750 EOF
5751
5752 fi
5753 if test "$ac_cv_func_snprintf_working" = yes; then
5754
5755 if test "$ac_cv_func_snprintf+set" != set -o "$ac_cv_func_snprintf" = yes; then
5756 echo $ac_n "checking if snprintf needs a prototype""... $ac_c" 1>&6
5757 echo "configure:5758: checking if snprintf needs a prototype" >&5
5758 if eval "test \"`echo '$''{'ac_cv_func_snprintf_noproto'+set}'`\" = set"; then
5759   echo $ac_n "(cached) $ac_c" 1>&6
5760 else
5761   cat > conftest.$ac_ext <<EOF
5762 #line 5763 "configure"
5763 #include "confdefs.h"
5764 #include <stdio.h>
5765 int main() {
5766 struct foo { int foo; } xx;
5767 extern int snprintf (struct foo*);
5768 snprintf(&xx);
5769
5770 ; return 0; }
5771 EOF
5772 if { (eval echo configure:5773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5773   rm -rf conftest*
5774   eval "ac_cv_func_snprintf_noproto=yes"
5775 else
5776   echo "configure: failed program was:" >&5
5777   cat conftest.$ac_ext >&5
5778   rm -rf conftest*
5779   eval "ac_cv_func_snprintf_noproto=no"
5780 fi
5781 rm -f conftest*
5782 fi
5783
5784 echo "$ac_t""$ac_cv_func_snprintf_noproto" 1>&6
5785
5786 if test "$ac_cv_func_snprintf_noproto" = yes; then
5787         cat >> confdefs.h <<\EOF
5788 #define NEED_SNPRINTF_PROTO 1
5789 EOF
5790
5791 fi
5792
5793 fi
5794
5795 fi
5796
5797
5798 echo $ac_n "checking for working glob""... $ac_c" 1>&6
5799 echo "configure:5800: checking for working glob" >&5
5800 if eval "test \"`echo '$''{'ac_cv_func_glob_working'+set}'`\" = set"; then
5801   echo $ac_n "(cached) $ac_c" 1>&6
5802 else
5803   ac_cv_func_glob_working=yes
5804 cat > conftest.$ac_ext <<EOF
5805 #line 5806 "configure"
5806 #include "confdefs.h"
5807
5808 #include <stdio.h>
5809 #include <glob.h>
5810 int main() {
5811
5812 glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE, NULL, NULL);
5813
5814 ; return 0; }
5815 EOF
5816 if { (eval echo configure:5817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5817   rm -rf conftest*
5818   :
5819 else
5820   echo "configure: failed program was:" >&5
5821   cat conftest.$ac_ext >&5
5822   rm -rf conftest*
5823   ac_cv_func_glob_working=no
5824 fi
5825 rm -f conftest*
5826 fi
5827
5828 echo "$ac_t""$ac_cv_func_glob_working" 1>&6
5829
5830 if test "$ac_cv_func_glob_working" = yes; then
5831         cat >> confdefs.h <<\EOF
5832 #define HAVE_GLOB 1
5833 EOF
5834
5835 fi
5836 if test "$ac_cv_func_glob_working" = yes; then
5837
5838 if test "$ac_cv_func_glob+set" != set -o "$ac_cv_func_glob" = yes; then
5839 echo $ac_n "checking if glob needs a prototype""... $ac_c" 1>&6
5840 echo "configure:5841: checking if glob needs a prototype" >&5
5841 if eval "test \"`echo '$''{'ac_cv_func_glob_noproto'+set}'`\" = set"; then
5842   echo $ac_n "(cached) $ac_c" 1>&6
5843 else
5844   cat > conftest.$ac_ext <<EOF
5845 #line 5846 "configure"
5846 #include "confdefs.h"
5847 #include <stdio.h>
5848 #include <glob.h>
5849 int main() {
5850 struct foo { int foo; } xx;
5851 extern int glob (struct foo*);
5852 glob(&xx);
5853
5854 ; return 0; }
5855 EOF
5856 if { (eval echo configure:5857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5857   rm -rf conftest*
5858   eval "ac_cv_func_glob_noproto=yes"
5859 else
5860   echo "configure: failed program was:" >&5
5861   cat conftest.$ac_ext >&5
5862   rm -rf conftest*
5863   eval "ac_cv_func_glob_noproto=no"
5864 fi
5865 rm -f conftest*
5866 fi
5867
5868 echo "$ac_t""$ac_cv_func_glob_noproto" 1>&6
5869
5870 if test "$ac_cv_func_glob_noproto" = yes; then
5871         cat >> confdefs.h <<\EOF
5872 #define NEED_GLOB_PROTO 1
5873 EOF
5874
5875 fi
5876
5877 fi
5878
5879 fi
5880
5881
5882 if test "$ac_cv_func_glob_working" != yes; then
5883         EXTRA_LOCL_HEADERS="$EXTRA_LOCL_HEADERS glob.h"
5884         LIBOBJS="$LIBOBJS glob.o"
5885 fi
5886
5887 for ac_func in                          \
5888         _getpty                                 \
5889         _scrsize                                \
5890         _setsid                                 \
5891         _stricmp                                \
5892         asnprintf                               \
5893         asprintf                                \
5894         atexit                                  \
5895         cgetent                                 \
5896         chroot                                  \
5897         fattach                                 \
5898         fchmod                                  \
5899         fcntl                                   \
5900         forkpty                                 \
5901         frevoke                                 \
5902         getpriority                             \
5903         getrlimit                               \
5904         getservbyname                           \
5905         getspnam                                \
5906         gettimeofday                            \
5907         gettosbyname                            \
5908         getuid                                  \
5909         grantpt                                 \
5910         mktime                                  \
5911         on_exit                                 \
5912         parsetos                                \
5913         ptsname                                 \
5914         rand                                    \
5915         random                                  \
5916         revoke                                  \
5917         setitimer                               \
5918         setpgid                                 \
5919         setpriority                             \
5920         setproctitle                            \
5921         setregid                                \
5922         setresgid                               \
5923         setresuid                               \
5924         setreuid                                \
5925         setsid                                  \
5926         setutent                                \
5927         sigaction                               \
5928         sysconf                                 \
5929         sysctl                                  \
5930         ttyname                                 \
5931         ttyslot                                 \
5932         ulimit                                  \
5933         uname                                   \
5934         unlockpt                                \
5935         vasnprintf                              \
5936         vasprintf                               \
5937         vhangup                                 \
5938         vsnprintf                               \
5939         yp_get_default_domain                   \
5940         
5941 do
5942 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5943 echo "configure:5944: checking for $ac_func" >&5
5944 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5945   echo $ac_n "(cached) $ac_c" 1>&6
5946 else
5947   cat > conftest.$ac_ext <<EOF
5948 #line 5949 "configure"
5949 #include "confdefs.h"
5950 /* System header to define __stub macros and hopefully few prototypes,
5951     which can conflict with char $ac_func(); below.  */
5952 #include <assert.h>
5953 /* Override any gcc2 internal prototype to avoid an error.  */
5954 /* We use char because int might match the return type of a gcc2
5955     builtin and then its argument prototype would still apply.  */
5956 char $ac_func();
5957
5958 int main() {
5959
5960 /* The GNU C library defines this for functions which it implements
5961     to always fail with ENOSYS.  Some functions are actually named
5962     something starting with __ and the normal name is an alias.  */
5963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5964 choke me
5965 #else
5966 $ac_func();
5967 #endif
5968
5969 ; return 0; }
5970 EOF
5971 if { (eval echo configure:5972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5972   rm -rf conftest*
5973   eval "ac_cv_func_$ac_func=yes"
5974 else
5975   echo "configure: failed program was:" >&5
5976   cat conftest.$ac_ext >&5
5977   rm -rf conftest*
5978   eval "ac_cv_func_$ac_func=no"
5979 fi
5980 rm -f conftest*
5981 fi
5982
5983 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5984   echo "$ac_t""yes" 1>&6
5985     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5986   cat >> confdefs.h <<EOF
5987 #define $ac_tr_func 1
5988 EOF
5989  
5990 else
5991   echo "$ac_t""no" 1>&6
5992 fi
5993 done
5994
5995
5996
5997
5998 for ac_hdr in capability.h sys/capability.h
5999 do
6000 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6001 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6002 echo "configure:6003: checking for $ac_hdr" >&5
6003 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6004   echo $ac_n "(cached) $ac_c" 1>&6
6005 else
6006   cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 #include <$ac_hdr>
6010 EOF
6011 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6012 { (eval echo configure:6013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6013 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6014 if test -z "$ac_err"; then
6015   rm -rf conftest*
6016   eval "ac_cv_header_$ac_safe=yes"
6017 else
6018   echo "$ac_err" >&5
6019   echo "configure: failed program was:" >&5
6020   cat conftest.$ac_ext >&5
6021   rm -rf conftest*
6022   eval "ac_cv_header_$ac_safe=no"
6023 fi
6024 rm -f conftest*
6025 fi
6026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6027   echo "$ac_t""yes" 1>&6
6028     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6029   cat >> confdefs.h <<EOF
6030 #define $ac_tr_hdr 1
6031 EOF
6032  
6033 else
6034   echo "$ac_t""no" 1>&6
6035 fi
6036 done
6037
6038
6039 for ac_func in sgi_getcapabilitybyname cap_set_proc
6040 do
6041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6042 echo "configure:6043: checking for $ac_func" >&5
6043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6044   echo $ac_n "(cached) $ac_c" 1>&6
6045 else
6046   cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 /* System header to define __stub macros and hopefully few prototypes,
6050     which can conflict with char $ac_func(); below.  */
6051 #include <assert.h>
6052 /* Override any gcc2 internal prototype to avoid an error.  */
6053 /* We use char because int might match the return type of a gcc2
6054     builtin and then its argument prototype would still apply.  */
6055 char $ac_func();
6056
6057 int main() {
6058
6059 /* The GNU C library defines this for functions which it implements
6060     to always fail with ENOSYS.  Some functions are actually named
6061     something starting with __ and the normal name is an alias.  */
6062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6063 choke me
6064 #else
6065 $ac_func();
6066 #endif
6067
6068 ; return 0; }
6069 EOF
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071   rm -rf conftest*
6072   eval "ac_cv_func_$ac_func=yes"
6073 else
6074   echo "configure: failed program was:" >&5
6075   cat conftest.$ac_ext >&5
6076   rm -rf conftest*
6077   eval "ac_cv_func_$ac_func=no"
6078 fi
6079 rm -f conftest*
6080 fi
6081
6082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6083   echo "$ac_t""yes" 1>&6
6084     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6085   cat >> confdefs.h <<EOF
6086 #define $ac_tr_func 1
6087 EOF
6088  
6089 else
6090   echo "$ac_t""no" 1>&6
6091 fi
6092 done
6093
6094
6095
6096
6097
6098
6099
6100 echo $ac_n "checking for getpwnam_r""... $ac_c" 1>&6
6101 echo "configure:6102: checking for getpwnam_r" >&5
6102 if eval "test \"`echo '$''{'ac_cv_funclib_getpwnam_r'+set}'`\" = set"; then
6103   echo $ac_n "(cached) $ac_c" 1>&6
6104 else
6105   
6106 if eval "test \"\$ac_cv_func_getpwnam_r\" != yes" ; then
6107         ac_save_LIBS="$LIBS"
6108         for ac_lib in "" c_r; do
6109                 if test -n "$ac_lib"; then 
6110                         ac_lib="-l$ac_lib"
6111                 else
6112                         ac_lib=""
6113                 fi
6114                 LIBS=" $ac_lib  $ac_save_LIBS"
6115                 cat > conftest.$ac_ext <<EOF
6116 #line 6117 "configure"
6117 #include "confdefs.h"
6118
6119 int main() {
6120 getpwnam_r()
6121 ; return 0; }
6122 EOF
6123 if { (eval echo configure:6124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6124   rm -rf conftest*
6125   eval "if test -n \"$ac_lib\";then ac_cv_funclib_getpwnam_r=$ac_lib; else ac_cv_funclib_getpwnam_r=yes; fi";break
6126 else
6127   echo "configure: failed program was:" >&5
6128   cat conftest.$ac_ext >&5
6129 fi
6130 rm -f conftest*
6131         done
6132         eval "ac_cv_funclib_getpwnam_r=\${ac_cv_funclib_getpwnam_r-no}"
6133         LIBS="$ac_save_LIBS"
6134 fi
6135
6136 fi
6137
6138
6139 eval "ac_res=\$ac_cv_funclib_getpwnam_r"
6140
6141 : << END
6142 @@@funcs="$funcs getpwnam_r"@@@
6143 @@@libs="$libs "" c_r"@@@
6144 END
6145
6146 # getpwnam_r
6147 eval "ac_tr_func=HAVE_`echo getpwnam_r | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6148 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6149 eval "LIB_getpwnam_r=$ac_res"
6150
6151 case "$ac_res" in
6152         yes)
6153         eval "ac_cv_func_getpwnam_r=yes"
6154         eval "LIB_getpwnam_r="
6155         cat >> confdefs.h <<EOF
6156 #define $ac_tr_func 1
6157 EOF
6158
6159         echo "$ac_t""yes" 1>&6
6160         ;;
6161         no)
6162         eval "ac_cv_func_getpwnam_r=no"
6163         eval "LIB_getpwnam_r="
6164         echo "$ac_t""no" 1>&6
6165         ;;
6166         *)
6167         eval "ac_cv_func_getpwnam_r=yes"
6168         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
6169         cat >> confdefs.h <<EOF
6170 #define $ac_tr_func 1
6171 EOF
6172
6173         cat >> confdefs.h <<EOF
6174 #define $ac_tr_lib 1
6175 EOF
6176
6177         echo "$ac_t""yes, in $ac_res" 1>&6
6178         ;;
6179 esac
6180
6181
6182 if test "$ac_cv_func_getpwnam_r" = yes; then
6183         echo $ac_n "checking if getpwnam_r is posix""... $ac_c" 1>&6
6184 echo "configure:6185: checking if getpwnam_r is posix" >&5
6185 if eval "test \"`echo '$''{'ac_cv_func_getpwnam_r_posix'+set}'`\" = set"; then
6186   echo $ac_n "(cached) $ac_c" 1>&6
6187 else
6188   ac_libs="$LIBS"
6189         LIBS="$LIBS $LIB_getpwnam_r"
6190         if test "$cross_compiling" = yes; then
6191   :
6192 else
6193   cat > conftest.$ac_ext <<EOF
6194 #line 6195 "configure"
6195 #include "confdefs.h"
6196
6197 #include <pwd.h>
6198 int main()
6199 {
6200         struct passwd pw, *pwd;
6201         return getpwnam_r("", &pw, NULL, 0, &pwd) < 0;
6202 }
6203
6204 EOF
6205 if { (eval echo configure:6206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6206 then
6207   ac_cv_func_getpwnam_r_posix=yes
6208 else
6209   echo "configure: failed program was:" >&5
6210   cat conftest.$ac_ext >&5
6211   rm -fr conftest*
6212   ac_cv_func_getpwnam_r_posix=no
6213 fi
6214 rm -fr conftest*
6215 fi
6216
6217 LIBS="$ac_libs"
6218 fi
6219
6220 echo "$ac_t""$ac_cv_func_getpwnam_r_posix" 1>&6
6221 if test "$ac_cv_func_getpwnam_r_posix" = yes; then
6222         cat >> confdefs.h <<\EOF
6223 #define POSIX_GETPWNAM_R 1
6224 EOF
6225
6226 fi
6227 fi
6228
6229
6230
6231
6232
6233 echo $ac_n "checking for getsockopt""... $ac_c" 1>&6
6234 echo "configure:6235: checking for getsockopt" >&5
6235 if eval "test \"`echo '$''{'ac_cv_funclib_getsockopt'+set}'`\" = set"; then
6236   echo $ac_n "(cached) $ac_c" 1>&6
6237 else
6238   
6239 if eval "test \"\$ac_cv_func_getsockopt\" != yes" ; then
6240         ac_save_LIBS="$LIBS"
6241         for ac_lib in "" ; do
6242                 if test -n "$ac_lib"; then 
6243                         ac_lib="-l$ac_lib"
6244                 else
6245                         ac_lib=""
6246                 fi
6247                 LIBS=" $ac_lib  $ac_save_LIBS"
6248                 cat > conftest.$ac_ext <<EOF
6249 #line 6250 "configure"
6250 #include "confdefs.h"
6251 #ifdef HAVE_SYS_TYPES_H
6252 #include <sys/types.h>
6253 #endif
6254 #ifdef HAVE_SYS_SOCKET_H
6255 #include <sys/socket.h>
6256 #endif
6257 int main() {
6258 getsockopt(0,0,0,0,0)
6259 ; return 0; }
6260 EOF
6261 if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6262   rm -rf conftest*
6263   eval "if test -n \"$ac_lib\";then ac_cv_funclib_getsockopt=$ac_lib; else ac_cv_funclib_getsockopt=yes; fi";break
6264 else
6265   echo "configure: failed program was:" >&5
6266   cat conftest.$ac_ext >&5
6267 fi
6268 rm -f conftest*
6269         done
6270         eval "ac_cv_funclib_getsockopt=\${ac_cv_funclib_getsockopt-no}"
6271         LIBS="$ac_save_LIBS"
6272 fi
6273
6274 fi
6275
6276
6277 eval "ac_res=\$ac_cv_funclib_getsockopt"
6278
6279 : << END
6280 @@@funcs="$funcs getsockopt"@@@
6281 @@@libs="$libs "" "@@@
6282 END
6283
6284 # getsockopt
6285 eval "ac_tr_func=HAVE_`echo getsockopt | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6286 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6287 eval "LIB_getsockopt=$ac_res"
6288
6289 case "$ac_res" in
6290         yes)
6291         eval "ac_cv_func_getsockopt=yes"
6292         eval "LIB_getsockopt="
6293         cat >> confdefs.h <<EOF
6294 #define $ac_tr_func 1
6295 EOF
6296
6297         echo "$ac_t""yes" 1>&6
6298         ;;
6299         no)
6300         eval "ac_cv_func_getsockopt=no"
6301         eval "LIB_getsockopt="
6302         echo "$ac_t""no" 1>&6
6303         ;;
6304         *)
6305         eval "ac_cv_func_getsockopt=yes"
6306         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
6307         cat >> confdefs.h <<EOF
6308 #define $ac_tr_func 1
6309 EOF
6310
6311         cat >> confdefs.h <<EOF
6312 #define $ac_tr_lib 1
6313 EOF
6314
6315         echo "$ac_t""yes, in $ac_res" 1>&6
6316         ;;
6317 esac
6318
6319
6320
6321
6322
6323 echo $ac_n "checking for setsockopt""... $ac_c" 1>&6
6324 echo "configure:6325: checking for setsockopt" >&5
6325 if eval "test \"`echo '$''{'ac_cv_funclib_setsockopt'+set}'`\" = set"; then
6326   echo $ac_n "(cached) $ac_c" 1>&6
6327 else
6328   
6329 if eval "test \"\$ac_cv_func_setsockopt\" != yes" ; then
6330         ac_save_LIBS="$LIBS"
6331         for ac_lib in "" ; do
6332                 if test -n "$ac_lib"; then 
6333                         ac_lib="-l$ac_lib"
6334                 else
6335                         ac_lib=""
6336                 fi
6337                 LIBS=" $ac_lib  $ac_save_LIBS"
6338                 cat > conftest.$ac_ext <<EOF
6339 #line 6340 "configure"
6340 #include "confdefs.h"
6341 #ifdef HAVE_SYS_TYPES_H
6342 #include <sys/types.h>
6343 #endif
6344 #ifdef HAVE_SYS_SOCKET_H
6345 #include <sys/socket.h>
6346 #endif
6347 int main() {
6348 setsockopt(0,0,0,0,0)
6349 ; return 0; }
6350 EOF
6351 if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6352   rm -rf conftest*
6353   eval "if test -n \"$ac_lib\";then ac_cv_funclib_setsockopt=$ac_lib; else ac_cv_funclib_setsockopt=yes; fi";break
6354 else
6355   echo "configure: failed program was:" >&5
6356   cat conftest.$ac_ext >&5
6357 fi
6358 rm -f conftest*
6359         done
6360         eval "ac_cv_funclib_setsockopt=\${ac_cv_funclib_setsockopt-no}"
6361         LIBS="$ac_save_LIBS"
6362 fi
6363
6364 fi
6365
6366
6367 eval "ac_res=\$ac_cv_funclib_setsockopt"
6368
6369 : << END
6370 @@@funcs="$funcs setsockopt"@@@
6371 @@@libs="$libs "" "@@@
6372 END
6373
6374 # setsockopt
6375 eval "ac_tr_func=HAVE_`echo setsockopt | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6376 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6377 eval "LIB_setsockopt=$ac_res"
6378
6379 case "$ac_res" in
6380         yes)
6381         eval "ac_cv_func_setsockopt=yes"
6382         eval "LIB_setsockopt="
6383         cat >> confdefs.h <<EOF
6384 #define $ac_tr_func 1
6385 EOF
6386
6387         echo "$ac_t""yes" 1>&6
6388         ;;
6389         no)
6390         eval "ac_cv_func_setsockopt=no"
6391         eval "LIB_setsockopt="
6392         echo "$ac_t""no" 1>&6
6393         ;;
6394         *)
6395         eval "ac_cv_func_setsockopt=yes"
6396         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
6397         cat >> confdefs.h <<EOF
6398 #define $ac_tr_func 1
6399 EOF
6400
6401         cat >> confdefs.h <<EOF
6402 #define $ac_tr_lib 1
6403 EOF
6404
6405         echo "$ac_t""yes, in $ac_res" 1>&6
6406         ;;
6407 esac
6408
6409
6410
6411 for ac_func in getudbnam setlim
6412 do
6413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6414 echo "configure:6415: checking for $ac_func" >&5
6415 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6416   echo $ac_n "(cached) $ac_c" 1>&6
6417 else
6418   cat > conftest.$ac_ext <<EOF
6419 #line 6420 "configure"
6420 #include "confdefs.h"
6421 /* System header to define __stub macros and hopefully few prototypes,
6422     which can conflict with char $ac_func(); below.  */
6423 #include <assert.h>
6424 /* Override any gcc2 internal prototype to avoid an error.  */
6425 /* We use char because int might match the return type of a gcc2
6426     builtin and then its argument prototype would still apply.  */
6427 char $ac_func();
6428
6429 int main() {
6430
6431 /* The GNU C library defines this for functions which it implements
6432     to always fail with ENOSYS.  Some functions are actually named
6433     something starting with __ and the normal name is an alias.  */
6434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6435 choke me
6436 #else
6437 $ac_func();
6438 #endif
6439
6440 ; return 0; }
6441 EOF
6442 if { (eval echo configure:6443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6443   rm -rf conftest*
6444   eval "ac_cv_func_$ac_func=yes"
6445 else
6446   echo "configure: failed program was:" >&5
6447   cat conftest.$ac_ext >&5
6448   rm -rf conftest*
6449   eval "ac_cv_func_$ac_func=no"
6450 fi
6451 rm -f conftest*
6452 fi
6453
6454 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6455   echo "$ac_t""yes" 1>&6
6456     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6457   cat >> confdefs.h <<EOF
6458 #define $ac_tr_func 1
6459 EOF
6460  
6461 else
6462   echo "$ac_t""no" 1>&6
6463 fi
6464 done
6465
6466
6467
6468
6469
6470
6471 echo $ac_n "checking for res_search""... $ac_c" 1>&6
6472 echo "configure:6473: checking for res_search" >&5
6473 if eval "test \"`echo '$''{'ac_cv_funclib_res_search'+set}'`\" = set"; then
6474   echo $ac_n "(cached) $ac_c" 1>&6
6475 else
6476   
6477 if eval "test \"\$ac_cv_func_res_search\" != yes" ; then
6478         ac_save_LIBS="$LIBS"
6479         for ac_lib in "" resolv; do
6480                 if test -n "$ac_lib"; then 
6481                         ac_lib="-l$ac_lib"
6482                 else
6483                         ac_lib=""
6484                 fi
6485                 LIBS=" $ac_lib  $ac_save_LIBS"
6486                 cat > conftest.$ac_ext <<EOF
6487 #line 6488 "configure"
6488 #include "confdefs.h"
6489
6490 #include <stdio.h>
6491 #ifdef HAVE_SYS_TYPES_H
6492 #include <sys/types.h>
6493 #endif
6494 #ifdef HAVE_NETINET_IN_H
6495 #include <netinet/in.h>
6496 #endif
6497 #ifdef HAVE_ARPA_NAMESER_H
6498 #include <arpa/nameser.h>
6499 #endif
6500 #ifdef HAVE_RESOLV_H
6501 #include <resolv.h>
6502 #endif
6503
6504 int main() {
6505 res_search(0,0,0,0,0)
6506 ; return 0; }
6507 EOF
6508 if { (eval echo configure:6509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6509   rm -rf conftest*
6510   eval "if test -n \"$ac_lib\";then ac_cv_funclib_res_search=$ac_lib; else ac_cv_funclib_res_search=yes; fi";break
6511 else
6512   echo "configure: failed program was:" >&5
6513   cat conftest.$ac_ext >&5
6514 fi
6515 rm -f conftest*
6516         done
6517         eval "ac_cv_funclib_res_search=\${ac_cv_funclib_res_search-no}"
6518         LIBS="$ac_save_LIBS"
6519 fi
6520
6521 fi
6522
6523
6524 eval "ac_res=\$ac_cv_funclib_res_search"
6525
6526 : << END
6527 @@@funcs="$funcs res_search"@@@
6528 @@@libs="$libs "" resolv"@@@
6529 END
6530
6531 # res_search
6532 eval "ac_tr_func=HAVE_`echo res_search | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6533 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6534 eval "LIB_res_search=$ac_res"
6535
6536 case "$ac_res" in
6537         yes)
6538         eval "ac_cv_func_res_search=yes"
6539         eval "LIB_res_search="
6540         cat >> confdefs.h <<EOF
6541 #define $ac_tr_func 1
6542 EOF
6543
6544         echo "$ac_t""yes" 1>&6
6545         ;;
6546         no)
6547         eval "ac_cv_func_res_search=no"
6548         eval "LIB_res_search="
6549         echo "$ac_t""no" 1>&6
6550         ;;
6551         *)
6552         eval "ac_cv_func_res_search=yes"
6553         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
6554         cat >> confdefs.h <<EOF
6555 #define $ac_tr_func 1
6556 EOF
6557
6558         cat >> confdefs.h <<EOF
6559 #define $ac_tr_lib 1
6560 EOF
6561
6562         echo "$ac_t""yes, in $ac_res" 1>&6
6563         ;;
6564 esac
6565
6566
6567 if test -n "$LIB_res_search"; then
6568         LIBS="$LIB_res_search $LIBS"
6569 fi
6570
6571
6572
6573
6574
6575
6576 echo $ac_n "checking for dn_expand""... $ac_c" 1>&6
6577 echo "configure:6578: checking for dn_expand" >&5
6578 if eval "test \"`echo '$''{'ac_cv_funclib_dn_expand'+set}'`\" = set"; then
6579   echo $ac_n "(cached) $ac_c" 1>&6
6580 else
6581   
6582 if eval "test \"\$ac_cv_func_dn_expand\" != yes" ; then
6583         ac_save_LIBS="$LIBS"
6584         for ac_lib in "" resolv; do
6585                 if test -n "$ac_lib"; then 
6586                         ac_lib="-l$ac_lib"
6587                 else
6588                         ac_lib=""
6589                 fi
6590                 LIBS=" $ac_lib  $ac_save_LIBS"
6591                 cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6594
6595 #include <stdio.h>
6596 #ifdef HAVE_SYS_TYPES_H
6597 #include <sys/types.h>
6598 #endif
6599 #ifdef HAVE_NETINET_IN_H
6600 #include <netinet/in.h>
6601 #endif
6602 #ifdef HAVE_ARPA_NAMESER_H
6603 #include <arpa/nameser.h>
6604 #endif
6605 #ifdef HAVE_RESOLV_H
6606 #include <resolv.h>
6607 #endif
6608
6609 int main() {
6610 dn_expand(0,0,0,0,0)
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6614   rm -rf conftest*
6615   eval "if test -n \"$ac_lib\";then ac_cv_funclib_dn_expand=$ac_lib; else ac_cv_funclib_dn_expand=yes; fi";break
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619 fi
6620 rm -f conftest*
6621         done
6622         eval "ac_cv_funclib_dn_expand=\${ac_cv_funclib_dn_expand-no}"
6623         LIBS="$ac_save_LIBS"
6624 fi
6625
6626 fi
6627
6628
6629 eval "ac_res=\$ac_cv_funclib_dn_expand"
6630
6631 : << END
6632 @@@funcs="$funcs dn_expand"@@@
6633 @@@libs="$libs "" resolv"@@@
6634 END
6635
6636 # dn_expand
6637 eval "ac_tr_func=HAVE_`echo dn_expand | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6638 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
6639 eval "LIB_dn_expand=$ac_res"
6640
6641 case "$ac_res" in
6642         yes)
6643         eval "ac_cv_func_dn_expand=yes"
6644         eval "LIB_dn_expand="
6645         cat >> confdefs.h <<EOF
6646 #define $ac_tr_func 1
6647 EOF
6648
6649         echo "$ac_t""yes" 1>&6
6650         ;;
6651         no)
6652         eval "ac_cv_func_dn_expand=no"
6653         eval "LIB_dn_expand="
6654         echo "$ac_t""no" 1>&6
6655         ;;
6656         *)
6657         eval "ac_cv_func_dn_expand=yes"
6658         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
6659         cat >> confdefs.h <<EOF
6660 #define $ac_tr_func 1
6661 EOF
6662
6663         cat >> confdefs.h <<EOF
6664 #define $ac_tr_lib 1
6665 EOF
6666
6667         echo "$ac_t""yes, in $ac_res" 1>&6
6668         ;;
6669 esac
6670
6671
6672 if test -n "$LIB_dn_expand"; then
6673         LIBS="$LIB_dn_expand $LIBS"
6674 fi
6675
6676
6677
6678 for ac_hdr in unistd.h
6679 do
6680 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6681 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6682 echo "configure:6683: checking for $ac_hdr" >&5
6683 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6684   echo $ac_n "(cached) $ac_c" 1>&6
6685 else
6686   cat > conftest.$ac_ext <<EOF
6687 #line 6688 "configure"
6688 #include "confdefs.h"
6689 #include <$ac_hdr>
6690 EOF
6691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6692 { (eval echo configure:6693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6694 if test -z "$ac_err"; then
6695   rm -rf conftest*
6696   eval "ac_cv_header_$ac_safe=yes"
6697 else
6698   echo "$ac_err" >&5
6699   echo "configure: failed program was:" >&5
6700   cat conftest.$ac_ext >&5
6701   rm -rf conftest*
6702   eval "ac_cv_header_$ac_safe=no"
6703 fi
6704 rm -f conftest*
6705 fi
6706 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6707   echo "$ac_t""yes" 1>&6
6708     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6709   cat >> confdefs.h <<EOF
6710 #define $ac_tr_hdr 1
6711 EOF
6712  
6713 else
6714   echo "$ac_t""no" 1>&6
6715 fi
6716 done
6717
6718 for ac_func in getpagesize
6719 do
6720 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6721 echo "configure:6722: checking for $ac_func" >&5
6722 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6723   echo $ac_n "(cached) $ac_c" 1>&6
6724 else
6725   cat > conftest.$ac_ext <<EOF
6726 #line 6727 "configure"
6727 #include "confdefs.h"
6728 /* System header to define __stub macros and hopefully few prototypes,
6729     which can conflict with char $ac_func(); below.  */
6730 #include <assert.h>
6731 /* Override any gcc2 internal prototype to avoid an error.  */
6732 /* We use char because int might match the return type of a gcc2
6733     builtin and then its argument prototype would still apply.  */
6734 char $ac_func();
6735
6736 int main() {
6737
6738 /* The GNU C library defines this for functions which it implements
6739     to always fail with ENOSYS.  Some functions are actually named
6740     something starting with __ and the normal name is an alias.  */
6741 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6742 choke me
6743 #else
6744 $ac_func();
6745 #endif
6746
6747 ; return 0; }
6748 EOF
6749 if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6750   rm -rf conftest*
6751   eval "ac_cv_func_$ac_func=yes"
6752 else
6753   echo "configure: failed program was:" >&5
6754   cat conftest.$ac_ext >&5
6755   rm -rf conftest*
6756   eval "ac_cv_func_$ac_func=no"
6757 fi
6758 rm -f conftest*
6759 fi
6760
6761 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6762   echo "$ac_t""yes" 1>&6
6763     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6764   cat >> confdefs.h <<EOF
6765 #define $ac_tr_func 1
6766 EOF
6767  
6768 else
6769   echo "$ac_t""no" 1>&6
6770 fi
6771 done
6772
6773 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6774 echo "configure:6775: checking for working mmap" >&5
6775 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6776   echo $ac_n "(cached) $ac_c" 1>&6
6777 else
6778   if test "$cross_compiling" = yes; then
6779   ac_cv_func_mmap_fixed_mapped=no
6780 else
6781   cat > conftest.$ac_ext <<EOF
6782 #line 6783 "configure"
6783 #include "confdefs.h"
6784
6785 /* Thanks to Mike Haertel and Jim Avera for this test.
6786    Here is a matrix of mmap possibilities:
6787         mmap private not fixed
6788         mmap private fixed at somewhere currently unmapped
6789         mmap private fixed at somewhere already mapped
6790         mmap shared not fixed
6791         mmap shared fixed at somewhere currently unmapped
6792         mmap shared fixed at somewhere already mapped
6793    For private mappings, we should verify that changes cannot be read()
6794    back from the file, nor mmap's back from the file at a different
6795    address.  (There have been systems where private was not correctly
6796    implemented like the infamous i386 svr4.0, and systems where the
6797    VM page cache was not coherent with the filesystem buffer cache
6798    like early versions of FreeBSD and possibly contemporary NetBSD.)
6799    For shared mappings, we should conversely verify that changes get
6800    propogated back to all the places they're supposed to be.
6801
6802    Grep wants private fixed already mapped.
6803    The main things grep needs to know about mmap are:
6804    * does it exist and is it safe to write into the mmap'd area
6805    * how to use it (BSD variants)  */
6806 #include <sys/types.h>
6807 #include <fcntl.h>
6808 #include <sys/mman.h>
6809
6810 /* This mess was copied from the GNU getpagesize.h.  */
6811 #ifndef HAVE_GETPAGESIZE
6812 # ifdef HAVE_UNISTD_H
6813 #  include <unistd.h>
6814 # endif
6815
6816 /* Assume that all systems that can run configure have sys/param.h.  */
6817 # ifndef HAVE_SYS_PARAM_H
6818 #  define HAVE_SYS_PARAM_H 1
6819 # endif
6820
6821 # ifdef _SC_PAGESIZE
6822 #  define getpagesize() sysconf(_SC_PAGESIZE)
6823 # else /* no _SC_PAGESIZE */
6824 #  ifdef HAVE_SYS_PARAM_H
6825 #   include <sys/param.h>
6826 #   ifdef EXEC_PAGESIZE
6827 #    define getpagesize() EXEC_PAGESIZE
6828 #   else /* no EXEC_PAGESIZE */
6829 #    ifdef NBPG
6830 #     define getpagesize() NBPG * CLSIZE
6831 #     ifndef CLSIZE
6832 #      define CLSIZE 1
6833 #     endif /* no CLSIZE */
6834 #    else /* no NBPG */
6835 #     ifdef NBPC
6836 #      define getpagesize() NBPC
6837 #     else /* no NBPC */
6838 #      ifdef PAGESIZE
6839 #       define getpagesize() PAGESIZE
6840 #      endif /* PAGESIZE */
6841 #     endif /* no NBPC */
6842 #    endif /* no NBPG */
6843 #   endif /* no EXEC_PAGESIZE */
6844 #  else /* no HAVE_SYS_PARAM_H */
6845 #   define getpagesize() 8192   /* punt totally */
6846 #  endif /* no HAVE_SYS_PARAM_H */
6847 # endif /* no _SC_PAGESIZE */
6848
6849 #endif /* no HAVE_GETPAGESIZE */
6850
6851 #ifdef __cplusplus
6852 extern "C" { void *malloc(unsigned); }
6853 #else
6854 char *malloc();
6855 #endif
6856
6857 int
6858 main()
6859 {
6860         char *data, *data2, *data3;
6861         int i, pagesize;
6862         int fd;
6863
6864         pagesize = getpagesize();
6865
6866         /*
6867          * First, make a file with some known garbage in it.
6868          */
6869         data = malloc(pagesize);
6870         if (!data)
6871                 exit(1);
6872         for (i = 0; i < pagesize; ++i)
6873                 *(data + i) = rand();
6874         umask(0);
6875         fd = creat("conftestmmap", 0600);
6876         if (fd < 0)
6877                 exit(1);
6878         if (write(fd, data, pagesize) != pagesize)
6879                 exit(1);
6880         close(fd);
6881
6882         /*
6883          * Next, try to mmap the file at a fixed address which
6884          * already has something else allocated at it.  If we can,
6885          * also make sure that we see the same garbage.
6886          */
6887         fd = open("conftestmmap", O_RDWR);
6888         if (fd < 0)
6889                 exit(1);
6890         data2 = malloc(2 * pagesize);
6891         if (!data2)
6892                 exit(1);
6893         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6894         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6895             MAP_PRIVATE | MAP_FIXED, fd, 0L))
6896                 exit(1);
6897         for (i = 0; i < pagesize; ++i)
6898                 if (*(data + i) != *(data2 + i))
6899                         exit(1);
6900
6901         /*
6902          * Finally, make sure that changes to the mapped area
6903          * do not percolate back to the file as seen by read().
6904          * (This is a bug on some variants of i386 svr4.0.)
6905          */
6906         for (i = 0; i < pagesize; ++i)
6907                 *(data2 + i) = *(data2 + i) + 1;
6908         data3 = malloc(pagesize);
6909         if (!data3)
6910                 exit(1);
6911         if (read(fd, data3, pagesize) != pagesize)
6912                 exit(1);
6913         for (i = 0; i < pagesize; ++i)
6914                 if (*(data + i) != *(data3 + i))
6915                         exit(1);
6916         close(fd);
6917         unlink("conftestmmap");
6918         exit(0);
6919 }
6920
6921 EOF
6922 if { (eval echo configure:6923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6923 then
6924   ac_cv_func_mmap_fixed_mapped=yes
6925 else
6926   echo "configure: failed program was:" >&5
6927   cat conftest.$ac_ext >&5
6928   rm -fr conftest*
6929   ac_cv_func_mmap_fixed_mapped=no
6930 fi
6931 rm -fr conftest*
6932 fi
6933
6934 fi
6935
6936 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6937 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6938   cat >> confdefs.h <<\EOF
6939 #define HAVE_MMAP 1
6940 EOF
6941
6942 fi
6943
6944 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6945 # for constant arguments.  Useless!
6946 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
6947 echo "configure:6948: checking for working alloca.h" >&5
6948 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6949   echo $ac_n "(cached) $ac_c" 1>&6
6950 else
6951   cat > conftest.$ac_ext <<EOF
6952 #line 6953 "configure"
6953 #include "confdefs.h"
6954 #include <alloca.h>
6955 int main() {
6956 char *p = alloca(2 * sizeof(int));
6957 ; return 0; }
6958 EOF
6959 if { (eval echo configure:6960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6960   rm -rf conftest*
6961   ac_cv_header_alloca_h=yes
6962 else
6963   echo "configure: failed program was:" >&5
6964   cat conftest.$ac_ext >&5
6965   rm -rf conftest*
6966   ac_cv_header_alloca_h=no
6967 fi
6968 rm -f conftest*
6969 fi
6970
6971 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6972 if test $ac_cv_header_alloca_h = yes; then
6973   cat >> confdefs.h <<\EOF
6974 #define HAVE_ALLOCA_H 1
6975 EOF
6976
6977 fi
6978
6979 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6980 echo "configure:6981: checking for alloca" >&5
6981 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6982   echo $ac_n "(cached) $ac_c" 1>&6
6983 else
6984   cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987
6988 #ifdef __GNUC__
6989 # define alloca __builtin_alloca
6990 #else
6991 # ifdef _MSC_VER
6992 #  include <malloc.h>
6993 #  define alloca _alloca
6994 # else
6995 #  if HAVE_ALLOCA_H
6996 #   include <alloca.h>
6997 #  else
6998 #   ifdef _AIX
6999  #pragma alloca
7000 #   else
7001 #    ifndef alloca /* predefined by HP cc +Olibcalls */
7002 char *alloca ();
7003 #    endif
7004 #   endif
7005 #  endif
7006 # endif
7007 #endif
7008
7009 int main() {
7010 char *p = (char *) alloca(1);
7011 ; return 0; }
7012 EOF
7013 if { (eval echo configure:7014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7014   rm -rf conftest*
7015   ac_cv_func_alloca_works=yes
7016 else
7017   echo "configure: failed program was:" >&5
7018   cat conftest.$ac_ext >&5
7019   rm -rf conftest*
7020   ac_cv_func_alloca_works=no
7021 fi
7022 rm -f conftest*
7023 fi
7024
7025 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
7026 if test $ac_cv_func_alloca_works = yes; then
7027   cat >> confdefs.h <<\EOF
7028 #define HAVE_ALLOCA 1
7029 EOF
7030
7031 fi
7032
7033 if test $ac_cv_func_alloca_works = no; then
7034   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7035   # that cause trouble.  Some versions do not even contain alloca or
7036   # contain a buggy version.  If you still want to use their alloca,
7037   # use ar to extract alloca.o from them instead of compiling alloca.c.
7038   ALLOCA=alloca.${ac_objext}
7039   cat >> confdefs.h <<\EOF
7040 #define C_ALLOCA 1
7041 EOF
7042
7043
7044 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
7045 echo "configure:7046: checking whether alloca needs Cray hooks" >&5
7046 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
7047   echo $ac_n "(cached) $ac_c" 1>&6
7048 else
7049   cat > conftest.$ac_ext <<EOF
7050 #line 7051 "configure"
7051 #include "confdefs.h"
7052 #if defined(CRAY) && ! defined(CRAY2)
7053 webecray
7054 #else
7055 wenotbecray
7056 #endif
7057
7058 EOF
7059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7060   egrep "webecray" >/dev/null 2>&1; then
7061   rm -rf conftest*
7062   ac_cv_os_cray=yes
7063 else
7064   rm -rf conftest*
7065   ac_cv_os_cray=no
7066 fi
7067 rm -f conftest*
7068
7069 fi
7070
7071 echo "$ac_t""$ac_cv_os_cray" 1>&6
7072 if test $ac_cv_os_cray = yes; then
7073 for ac_func in _getb67 GETB67 getb67; do
7074   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7075 echo "configure:7076: checking for $ac_func" >&5
7076 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7077   echo $ac_n "(cached) $ac_c" 1>&6
7078 else
7079   cat > conftest.$ac_ext <<EOF
7080 #line 7081 "configure"
7081 #include "confdefs.h"
7082 /* System header to define __stub macros and hopefully few prototypes,
7083     which can conflict with char $ac_func(); below.  */
7084 #include <assert.h>
7085 /* Override any gcc2 internal prototype to avoid an error.  */
7086 /* We use char because int might match the return type of a gcc2
7087     builtin and then its argument prototype would still apply.  */
7088 char $ac_func();
7089
7090 int main() {
7091
7092 /* The GNU C library defines this for functions which it implements
7093     to always fail with ENOSYS.  Some functions are actually named
7094     something starting with __ and the normal name is an alias.  */
7095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7096 choke me
7097 #else
7098 $ac_func();
7099 #endif
7100
7101 ; return 0; }
7102 EOF
7103 if { (eval echo configure:7104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7104   rm -rf conftest*
7105   eval "ac_cv_func_$ac_func=yes"
7106 else
7107   echo "configure: failed program was:" >&5
7108   cat conftest.$ac_ext >&5
7109   rm -rf conftest*
7110   eval "ac_cv_func_$ac_func=no"
7111 fi
7112 rm -f conftest*
7113 fi
7114
7115 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7116   echo "$ac_t""yes" 1>&6
7117   cat >> confdefs.h <<EOF
7118 #define CRAY_STACKSEG_END $ac_func
7119 EOF
7120
7121   break
7122 else
7123   echo "$ac_t""no" 1>&6
7124 fi
7125
7126 done
7127 fi
7128
7129 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
7130 echo "configure:7131: checking stack direction for C alloca" >&5
7131 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
7132   echo $ac_n "(cached) $ac_c" 1>&6
7133 else
7134   if test "$cross_compiling" = yes; then
7135   ac_cv_c_stack_direction=0
7136 else
7137   cat > conftest.$ac_ext <<EOF
7138 #line 7139 "configure"
7139 #include "confdefs.h"
7140 find_stack_direction ()
7141 {
7142   static char *addr = 0;
7143   auto char dummy;
7144   if (addr == 0)
7145     {
7146       addr = &dummy;
7147       return find_stack_direction ();
7148     }
7149   else
7150     return (&dummy > addr) ? 1 : -1;
7151 }
7152 main ()
7153 {
7154   exit (find_stack_direction() < 0);
7155 }
7156 EOF
7157 if { (eval echo configure:7158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7158 then
7159   ac_cv_c_stack_direction=1
7160 else
7161   echo "configure: failed program was:" >&5
7162   cat conftest.$ac_ext >&5
7163   rm -fr conftest*
7164   ac_cv_c_stack_direction=-1
7165 fi
7166 rm -fr conftest*
7167 fi
7168
7169 fi
7170
7171 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
7172 cat >> confdefs.h <<EOF
7173 #define STACK_DIRECTION $ac_cv_c_stack_direction
7174 EOF
7175
7176 fi
7177
7178
7179
7180 for ac_func in getlogin setlogin
7181 do
7182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7183 echo "configure:7184: checking for $ac_func" >&5
7184 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7185   echo $ac_n "(cached) $ac_c" 1>&6
7186 else
7187   cat > conftest.$ac_ext <<EOF
7188 #line 7189 "configure"
7189 #include "confdefs.h"
7190 /* System header to define __stub macros and hopefully few prototypes,
7191     which can conflict with char $ac_func(); below.  */
7192 #include <assert.h>
7193 /* Override any gcc2 internal prototype to avoid an error.  */
7194 /* We use char because int might match the return type of a gcc2
7195     builtin and then its argument prototype would still apply.  */
7196 char $ac_func();
7197
7198 int main() {
7199
7200 /* The GNU C library defines this for functions which it implements
7201     to always fail with ENOSYS.  Some functions are actually named
7202     something starting with __ and the normal name is an alias.  */
7203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7204 choke me
7205 #else
7206 $ac_func();
7207 #endif
7208
7209 ; return 0; }
7210 EOF
7211 if { (eval echo configure:7212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7212   rm -rf conftest*
7213   eval "ac_cv_func_$ac_func=yes"
7214 else
7215   echo "configure: failed program was:" >&5
7216   cat conftest.$ac_ext >&5
7217   rm -rf conftest*
7218   eval "ac_cv_func_$ac_func=no"
7219 fi
7220 rm -f conftest*
7221 fi
7222
7223 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7224   echo "$ac_t""yes" 1>&6
7225     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7226   cat >> confdefs.h <<EOF
7227 #define $ac_tr_func 1
7228 EOF
7229  
7230 else
7231   echo "$ac_t""no" 1>&6
7232 fi
7233 done
7234
7235 if test "$ac_cv_func_getlogin" = yes; then
7236 echo $ac_n "checking if getlogin is posix""... $ac_c" 1>&6
7237 echo "configure:7238: checking if getlogin is posix" >&5
7238 if eval "test \"`echo '$''{'ac_cv_func_getlogin_posix'+set}'`\" = set"; then
7239   echo $ac_n "(cached) $ac_c" 1>&6
7240 else
7241   
7242 if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then
7243         ac_cv_func_getlogin_posix=no
7244 else
7245         ac_cv_func_getlogin_posix=yes
7246 fi
7247
7248 fi
7249
7250 echo "$ac_t""$ac_cv_func_getlogin_posix" 1>&6
7251 if test "$ac_cv_func_getlogin_posix" = yes; then
7252         cat >> confdefs.h <<\EOF
7253 #define POSIX_GETLOGIN 1
7254 EOF
7255
7256 fi
7257 fi
7258
7259
7260
7261
7262
7263
7264 echo $ac_n "checking for hstrerror""... $ac_c" 1>&6
7265 echo "configure:7266: checking for hstrerror" >&5
7266 if eval "test \"`echo '$''{'ac_cv_funclib_hstrerror'+set}'`\" = set"; then
7267   echo $ac_n "(cached) $ac_c" 1>&6
7268 else
7269   
7270 if eval "test \"\$ac_cv_func_hstrerror\" != yes" ; then
7271         ac_save_LIBS="$LIBS"
7272         for ac_lib in "" resolv; do
7273                 if test -n "$ac_lib"; then 
7274                         ac_lib="-l$ac_lib"
7275                 else
7276                         ac_lib=""
7277                 fi
7278                 LIBS=" $ac_lib  $ac_save_LIBS"
7279                 cat > conftest.$ac_ext <<EOF
7280 #line 7281 "configure"
7281 #include "confdefs.h"
7282 #ifdef HAVE_NETDB_H
7283 #include <netdb.h>
7284 #endif
7285 int main() {
7286 hstrerror(17)
7287 ; return 0; }
7288 EOF
7289 if { (eval echo configure:7290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7290   rm -rf conftest*
7291   eval "if test -n \"$ac_lib\";then ac_cv_funclib_hstrerror=$ac_lib; else ac_cv_funclib_hstrerror=yes; fi";break
7292 else
7293   echo "configure: failed program was:" >&5
7294   cat conftest.$ac_ext >&5
7295 fi
7296 rm -f conftest*
7297         done
7298         eval "ac_cv_funclib_hstrerror=\${ac_cv_funclib_hstrerror-no}"
7299         LIBS="$ac_save_LIBS"
7300 fi
7301
7302 fi
7303
7304
7305 eval "ac_res=\$ac_cv_funclib_hstrerror"
7306
7307 : << END
7308 @@@funcs="$funcs hstrerror"@@@
7309 @@@libs="$libs "" resolv"@@@
7310 END
7311
7312 # hstrerror
7313 eval "ac_tr_func=HAVE_`echo hstrerror | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
7314 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
7315 eval "LIB_hstrerror=$ac_res"
7316
7317 case "$ac_res" in
7318         yes)
7319         eval "ac_cv_func_hstrerror=yes"
7320         eval "LIB_hstrerror="
7321         cat >> confdefs.h <<EOF
7322 #define $ac_tr_func 1
7323 EOF
7324
7325         echo "$ac_t""yes" 1>&6
7326         ;;
7327         no)
7328         eval "ac_cv_func_hstrerror=no"
7329         eval "LIB_hstrerror="
7330         echo "$ac_t""no" 1>&6
7331         ;;
7332         *)
7333         eval "ac_cv_func_hstrerror=yes"
7334         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
7335         cat >> confdefs.h <<EOF
7336 #define $ac_tr_func 1
7337 EOF
7338
7339         cat >> confdefs.h <<EOF
7340 #define $ac_tr_lib 1
7341 EOF
7342
7343         echo "$ac_t""yes, in $ac_res" 1>&6
7344         ;;
7345 esac
7346
7347
7348 if test -n "$LIB_hstrerror"; then
7349         LIBS="$LIB_hstrerror $LIBS"
7350 fi
7351
7352 if eval "test \"$ac_cv_func_hstrerror\" != yes"; then
7353 LIBOBJS="$LIBOBJS hstrerror.o"
7354 fi
7355
7356 if test "$ac_cv_func_hstrerror" = yes; then
7357
7358 if test "$ac_cv_func_hstrerror+set" != set -o "$ac_cv_func_hstrerror" = yes; then
7359 echo $ac_n "checking if hstrerror needs a prototype""... $ac_c" 1>&6
7360 echo "configure:7361: checking if hstrerror needs a prototype" >&5
7361 if eval "test \"`echo '$''{'ac_cv_func_hstrerror_noproto'+set}'`\" = set"; then
7362   echo $ac_n "(cached) $ac_c" 1>&6
7363 else
7364   cat > conftest.$ac_ext <<EOF
7365 #line 7366 "configure"
7366 #include "confdefs.h"
7367
7368 #ifdef HAVE_NETDB_H
7369 #include <netdb.h>
7370 #endif
7371 int main() {
7372 struct foo { int foo; } xx;
7373 extern int hstrerror (struct foo*);
7374 hstrerror(&xx);
7375
7376 ; return 0; }
7377 EOF
7378 if { (eval echo configure:7379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7379   rm -rf conftest*
7380   eval "ac_cv_func_hstrerror_noproto=yes"
7381 else
7382   echo "configure: failed program was:" >&5
7383   cat conftest.$ac_ext >&5
7384   rm -rf conftest*
7385   eval "ac_cv_func_hstrerror_noproto=no"
7386 fi
7387 rm -f conftest*
7388 fi
7389
7390 echo "$ac_t""$ac_cv_func_hstrerror_noproto" 1>&6
7391
7392 if test "$ac_cv_func_hstrerror_noproto" = yes; then
7393         cat >> confdefs.h <<\EOF
7394 #define NEED_HSTRERROR_PROTO 1
7395 EOF
7396
7397 fi
7398
7399 fi
7400
7401 fi
7402
7403 for ac_func in chown copyhostent daemon err errx fchown flock fnmatch freehostent
7404 do
7405 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7406 echo "configure:7407: checking for $ac_func" >&5
7407 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7408   echo $ac_n "(cached) $ac_c" 1>&6
7409 else
7410   cat > conftest.$ac_ext <<EOF
7411 #line 7412 "configure"
7412 #include "confdefs.h"
7413 /* System header to define __stub macros and hopefully few prototypes,
7414     which can conflict with char $ac_func(); below.  */
7415 #include <assert.h>
7416 /* Override any gcc2 internal prototype to avoid an error.  */
7417 /* We use char because int might match the return type of a gcc2
7418     builtin and then its argument prototype would still apply.  */
7419 char $ac_func();
7420
7421 int main() {
7422
7423 /* The GNU C library defines this for functions which it implements
7424     to always fail with ENOSYS.  Some functions are actually named
7425     something starting with __ and the normal name is an alias.  */
7426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7427 choke me
7428 #else
7429 $ac_func();
7430 #endif
7431
7432 ; return 0; }
7433 EOF
7434 if { (eval echo configure:7435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7435   rm -rf conftest*
7436   eval "ac_cv_func_$ac_func=yes"
7437 else
7438   echo "configure: failed program was:" >&5
7439   cat conftest.$ac_ext >&5
7440   rm -rf conftest*
7441   eval "ac_cv_func_$ac_func=no"
7442 fi
7443 rm -f conftest*
7444 fi
7445
7446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7447   echo "$ac_t""yes" 1>&6
7448   
7449 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7450 cat >> confdefs.h <<EOF
7451 #define $ac_tr_func 1
7452 EOF
7453
7454 else
7455   echo "$ac_t""no" 1>&6
7456 LIBOBJS="$LIBOBJS ${ac_func}.o"
7457 fi
7458
7459 : << END
7460 @@@funcs="$funcs chown copyhostent daemon err errx fchown flock fnmatch freehostent"@@@
7461 END
7462 done
7463
7464 for ac_func in getcwd getdtablesize gethostname getipnodebyaddr getipnodebyname
7465 do
7466 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7467 echo "configure:7468: checking for $ac_func" >&5
7468 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7469   echo $ac_n "(cached) $ac_c" 1>&6
7470 else
7471   cat > conftest.$ac_ext <<EOF
7472 #line 7473 "configure"
7473 #include "confdefs.h"
7474 /* System header to define __stub macros and hopefully few prototypes,
7475     which can conflict with char $ac_func(); below.  */
7476 #include <assert.h>
7477 /* Override any gcc2 internal prototype to avoid an error.  */
7478 /* We use char because int might match the return type of a gcc2
7479     builtin and then its argument prototype would still apply.  */
7480 char $ac_func();
7481
7482 int main() {
7483
7484 /* The GNU C library defines this for functions which it implements
7485     to always fail with ENOSYS.  Some functions are actually named
7486     something starting with __ and the normal name is an alias.  */
7487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7488 choke me
7489 #else
7490 $ac_func();
7491 #endif
7492
7493 ; return 0; }
7494 EOF
7495 if { (eval echo configure:7496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7496   rm -rf conftest*
7497   eval "ac_cv_func_$ac_func=yes"
7498 else
7499   echo "configure: failed program was:" >&5
7500   cat conftest.$ac_ext >&5
7501   rm -rf conftest*
7502   eval "ac_cv_func_$ac_func=no"
7503 fi
7504 rm -f conftest*
7505 fi
7506
7507 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7508   echo "$ac_t""yes" 1>&6
7509   
7510 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7511 cat >> confdefs.h <<EOF
7512 #define $ac_tr_func 1
7513 EOF
7514
7515 else
7516   echo "$ac_t""no" 1>&6
7517 LIBOBJS="$LIBOBJS ${ac_func}.o"
7518 fi
7519
7520 : << END
7521 @@@funcs="$funcs getcwd getdtablesize gethostname getipnodebyaddr getipnodebyname"@@@
7522 END
7523 done
7524
7525 for ac_func in geteuid getgid getegid
7526 do
7527 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7528 echo "configure:7529: checking for $ac_func" >&5
7529 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7530   echo $ac_n "(cached) $ac_c" 1>&6
7531 else
7532   cat > conftest.$ac_ext <<EOF
7533 #line 7534 "configure"
7534 #include "confdefs.h"
7535 /* System header to define __stub macros and hopefully few prototypes,
7536     which can conflict with char $ac_func(); below.  */
7537 #include <assert.h>
7538 /* Override any gcc2 internal prototype to avoid an error.  */
7539 /* We use char because int might match the return type of a gcc2
7540     builtin and then its argument prototype would still apply.  */
7541 char $ac_func();
7542
7543 int main() {
7544
7545 /* The GNU C library defines this for functions which it implements
7546     to always fail with ENOSYS.  Some functions are actually named
7547     something starting with __ and the normal name is an alias.  */
7548 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7549 choke me
7550 #else
7551 $ac_func();
7552 #endif
7553
7554 ; return 0; }
7555 EOF
7556 if { (eval echo configure:7557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7557   rm -rf conftest*
7558   eval "ac_cv_func_$ac_func=yes"
7559 else
7560   echo "configure: failed program was:" >&5
7561   cat conftest.$ac_ext >&5
7562   rm -rf conftest*
7563   eval "ac_cv_func_$ac_func=no"
7564 fi
7565 rm -f conftest*
7566 fi
7567
7568 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7569   echo "$ac_t""yes" 1>&6
7570   
7571 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7572 cat >> confdefs.h <<EOF
7573 #define $ac_tr_func 1
7574 EOF
7575
7576 else
7577   echo "$ac_t""no" 1>&6
7578 LIBOBJS="$LIBOBJS ${ac_func}.o"
7579 fi
7580
7581 : << END
7582 @@@funcs="$funcs geteuid getgid getegid"@@@
7583 END
7584 done
7585
7586 for ac_func in getopt getusershell
7587 do
7588 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7589 echo "configure:7590: checking for $ac_func" >&5
7590 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7591   echo $ac_n "(cached) $ac_c" 1>&6
7592 else
7593   cat > conftest.$ac_ext <<EOF
7594 #line 7595 "configure"
7595 #include "confdefs.h"
7596 /* System header to define __stub macros and hopefully few prototypes,
7597     which can conflict with char $ac_func(); below.  */
7598 #include <assert.h>
7599 /* Override any gcc2 internal prototype to avoid an error.  */
7600 /* We use char because int might match the return type of a gcc2
7601     builtin and then its argument prototype would still apply.  */
7602 char $ac_func();
7603
7604 int main() {
7605
7606 /* The GNU C library defines this for functions which it implements
7607     to always fail with ENOSYS.  Some functions are actually named
7608     something starting with __ and the normal name is an alias.  */
7609 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7610 choke me
7611 #else
7612 $ac_func();
7613 #endif
7614
7615 ; return 0; }
7616 EOF
7617 if { (eval echo configure:7618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7618   rm -rf conftest*
7619   eval "ac_cv_func_$ac_func=yes"
7620 else
7621   echo "configure: failed program was:" >&5
7622   cat conftest.$ac_ext >&5
7623   rm -rf conftest*
7624   eval "ac_cv_func_$ac_func=no"
7625 fi
7626 rm -f conftest*
7627 fi
7628
7629 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7630   echo "$ac_t""yes" 1>&6
7631   
7632 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7633 cat >> confdefs.h <<EOF
7634 #define $ac_tr_func 1
7635 EOF
7636
7637 else
7638   echo "$ac_t""no" 1>&6
7639 LIBOBJS="$LIBOBJS ${ac_func}.o"
7640 fi
7641
7642 : << END
7643 @@@funcs="$funcs getopt getusershell"@@@
7644 END
7645 done
7646
7647 for ac_func in inet_aton inet_ntop inet_pton initgroups innetgr iruserok lstat
7648 do
7649 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7650 echo "configure:7651: checking for $ac_func" >&5
7651 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7652   echo $ac_n "(cached) $ac_c" 1>&6
7653 else
7654   cat > conftest.$ac_ext <<EOF
7655 #line 7656 "configure"
7656 #include "confdefs.h"
7657 /* System header to define __stub macros and hopefully few prototypes,
7658     which can conflict with char $ac_func(); below.  */
7659 #include <assert.h>
7660 /* Override any gcc2 internal prototype to avoid an error.  */
7661 /* We use char because int might match the return type of a gcc2
7662     builtin and then its argument prototype would still apply.  */
7663 char $ac_func();
7664
7665 int main() {
7666
7667 /* The GNU C library defines this for functions which it implements
7668     to always fail with ENOSYS.  Some functions are actually named
7669     something starting with __ and the normal name is an alias.  */
7670 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7671 choke me
7672 #else
7673 $ac_func();
7674 #endif
7675
7676 ; return 0; }
7677 EOF
7678 if { (eval echo configure:7679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7679   rm -rf conftest*
7680   eval "ac_cv_func_$ac_func=yes"
7681 else
7682   echo "configure: failed program was:" >&5
7683   cat conftest.$ac_ext >&5
7684   rm -rf conftest*
7685   eval "ac_cv_func_$ac_func=no"
7686 fi
7687 rm -f conftest*
7688 fi
7689
7690 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7691   echo "$ac_t""yes" 1>&6
7692   
7693 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7694 cat >> confdefs.h <<EOF
7695 #define $ac_tr_func 1
7696 EOF
7697
7698 else
7699   echo "$ac_t""no" 1>&6
7700 LIBOBJS="$LIBOBJS ${ac_func}.o"
7701 fi
7702
7703 : << END
7704 @@@funcs="$funcs inet_aton inet_ntop inet_pton initgroups innetgr iruserok lstat"@@@
7705 END
7706 done
7707
7708 for ac_func in memmove
7709 do
7710 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7711 echo "configure:7712: checking for $ac_func" >&5
7712 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7713   echo $ac_n "(cached) $ac_c" 1>&6
7714 else
7715   cat > conftest.$ac_ext <<EOF
7716 #line 7717 "configure"
7717 #include "confdefs.h"
7718 /* System header to define __stub macros and hopefully few prototypes,
7719     which can conflict with char $ac_func(); below.  */
7720 #include <assert.h>
7721 /* Override any gcc2 internal prototype to avoid an error.  */
7722 /* We use char because int might match the return type of a gcc2
7723     builtin and then its argument prototype would still apply.  */
7724 char $ac_func();
7725
7726 int main() {
7727
7728 /* The GNU C library defines this for functions which it implements
7729     to always fail with ENOSYS.  Some functions are actually named
7730     something starting with __ and the normal name is an alias.  */
7731 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7732 choke me
7733 #else
7734 $ac_func();
7735 #endif
7736
7737 ; return 0; }
7738 EOF
7739 if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7740   rm -rf conftest*
7741   eval "ac_cv_func_$ac_func=yes"
7742 else
7743   echo "configure: failed program was:" >&5
7744   cat conftest.$ac_ext >&5
7745   rm -rf conftest*
7746   eval "ac_cv_func_$ac_func=no"
7747 fi
7748 rm -f conftest*
7749 fi
7750
7751 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7752   echo "$ac_t""yes" 1>&6
7753   
7754 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7755 cat >> confdefs.h <<EOF
7756 #define $ac_tr_func 1
7757 EOF
7758
7759 else
7760   echo "$ac_t""no" 1>&6
7761 LIBOBJS="$LIBOBJS ${ac_func}.o"
7762 fi
7763
7764 : << END
7765 @@@funcs="$funcs memmove"@@@
7766 END
7767 done
7768
7769 for ac_func in mkstemp putenv rcmd readv recvmsg sendmsg setegid setenv seteuid
7770 do
7771 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7772 echo "configure:7773: checking for $ac_func" >&5
7773 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7774   echo $ac_n "(cached) $ac_c" 1>&6
7775 else
7776   cat > conftest.$ac_ext <<EOF
7777 #line 7778 "configure"
7778 #include "confdefs.h"
7779 /* System header to define __stub macros and hopefully few prototypes,
7780     which can conflict with char $ac_func(); below.  */
7781 #include <assert.h>
7782 /* Override any gcc2 internal prototype to avoid an error.  */
7783 /* We use char because int might match the return type of a gcc2
7784     builtin and then its argument prototype would still apply.  */
7785 char $ac_func();
7786
7787 int main() {
7788
7789 /* The GNU C library defines this for functions which it implements
7790     to always fail with ENOSYS.  Some functions are actually named
7791     something starting with __ and the normal name is an alias.  */
7792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7793 choke me
7794 #else
7795 $ac_func();
7796 #endif
7797
7798 ; return 0; }
7799 EOF
7800 if { (eval echo configure:7801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7801   rm -rf conftest*
7802   eval "ac_cv_func_$ac_func=yes"
7803 else
7804   echo "configure: failed program was:" >&5
7805   cat conftest.$ac_ext >&5
7806   rm -rf conftest*
7807   eval "ac_cv_func_$ac_func=no"
7808 fi
7809 rm -f conftest*
7810 fi
7811
7812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7813   echo "$ac_t""yes" 1>&6
7814   
7815 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7816 cat >> confdefs.h <<EOF
7817 #define $ac_tr_func 1
7818 EOF
7819
7820 else
7821   echo "$ac_t""no" 1>&6
7822 LIBOBJS="$LIBOBJS ${ac_func}.o"
7823 fi
7824
7825 : << END
7826 @@@funcs="$funcs mkstemp putenv rcmd readv recvmsg sendmsg setegid setenv seteuid"@@@
7827 END
7828 done
7829
7830 for ac_func in strcasecmp strncasecmp strdup strerror strftime
7831 do
7832 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7833 echo "configure:7834: checking for $ac_func" >&5
7834 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7835   echo $ac_n "(cached) $ac_c" 1>&6
7836 else
7837   cat > conftest.$ac_ext <<EOF
7838 #line 7839 "configure"
7839 #include "confdefs.h"
7840 /* System header to define __stub macros and hopefully few prototypes,
7841     which can conflict with char $ac_func(); below.  */
7842 #include <assert.h>
7843 /* Override any gcc2 internal prototype to avoid an error.  */
7844 /* We use char because int might match the return type of a gcc2
7845     builtin and then its argument prototype would still apply.  */
7846 char $ac_func();
7847
7848 int main() {
7849
7850 /* The GNU C library defines this for functions which it implements
7851     to always fail with ENOSYS.  Some functions are actually named
7852     something starting with __ and the normal name is an alias.  */
7853 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7854 choke me
7855 #else
7856 $ac_func();
7857 #endif
7858
7859 ; return 0; }
7860 EOF
7861 if { (eval echo configure:7862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7862   rm -rf conftest*
7863   eval "ac_cv_func_$ac_func=yes"
7864 else
7865   echo "configure: failed program was:" >&5
7866   cat conftest.$ac_ext >&5
7867   rm -rf conftest*
7868   eval "ac_cv_func_$ac_func=no"
7869 fi
7870 rm -f conftest*
7871 fi
7872
7873 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7874   echo "$ac_t""yes" 1>&6
7875   
7876 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7877 cat >> confdefs.h <<EOF
7878 #define $ac_tr_func 1
7879 EOF
7880
7881 else
7882   echo "$ac_t""no" 1>&6
7883 LIBOBJS="$LIBOBJS ${ac_func}.o"
7884 fi
7885
7886 : << END
7887 @@@funcs="$funcs strcasecmp strncasecmp strdup strerror strftime"@@@
7888 END
7889 done
7890
7891 for ac_func in strlcat strlcpy strlwr
7892 do
7893 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7894 echo "configure:7895: checking for $ac_func" >&5
7895 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7896   echo $ac_n "(cached) $ac_c" 1>&6
7897 else
7898   cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901 /* System header to define __stub macros and hopefully few prototypes,
7902     which can conflict with char $ac_func(); below.  */
7903 #include <assert.h>
7904 /* Override any gcc2 internal prototype to avoid an error.  */
7905 /* We use char because int might match the return type of a gcc2
7906     builtin and then its argument prototype would still apply.  */
7907 char $ac_func();
7908
7909 int main() {
7910
7911 /* The GNU C library defines this for functions which it implements
7912     to always fail with ENOSYS.  Some functions are actually named
7913     something starting with __ and the normal name is an alias.  */
7914 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7915 choke me
7916 #else
7917 $ac_func();
7918 #endif
7919
7920 ; return 0; }
7921 EOF
7922 if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7923   rm -rf conftest*
7924   eval "ac_cv_func_$ac_func=yes"
7925 else
7926   echo "configure: failed program was:" >&5
7927   cat conftest.$ac_ext >&5
7928   rm -rf conftest*
7929   eval "ac_cv_func_$ac_func=no"
7930 fi
7931 rm -f conftest*
7932 fi
7933
7934 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7935   echo "$ac_t""yes" 1>&6
7936   
7937 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7938 cat >> confdefs.h <<EOF
7939 #define $ac_tr_func 1
7940 EOF
7941
7942 else
7943   echo "$ac_t""no" 1>&6
7944 LIBOBJS="$LIBOBJS ${ac_func}.o"
7945 fi
7946
7947 : << END
7948 @@@funcs="$funcs strlcat strlcpy strlwr"@@@
7949 END
7950 done
7951
7952 for ac_func in strndup strnlen strptime strsep strtok_r strupr
7953 do
7954 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7955 echo "configure:7956: checking for $ac_func" >&5
7956 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7957   echo $ac_n "(cached) $ac_c" 1>&6
7958 else
7959   cat > conftest.$ac_ext <<EOF
7960 #line 7961 "configure"
7961 #include "confdefs.h"
7962 /* System header to define __stub macros and hopefully few prototypes,
7963     which can conflict with char $ac_func(); below.  */
7964 #include <assert.h>
7965 /* Override any gcc2 internal prototype to avoid an error.  */
7966 /* We use char because int might match the return type of a gcc2
7967     builtin and then its argument prototype would still apply.  */
7968 char $ac_func();
7969
7970 int main() {
7971
7972 /* The GNU C library defines this for functions which it implements
7973     to always fail with ENOSYS.  Some functions are actually named
7974     something starting with __ and the normal name is an alias.  */
7975 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7976 choke me
7977 #else
7978 $ac_func();
7979 #endif
7980
7981 ; return 0; }
7982 EOF
7983 if { (eval echo configure:7984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7984   rm -rf conftest*
7985   eval "ac_cv_func_$ac_func=yes"
7986 else
7987   echo "configure: failed program was:" >&5
7988   cat conftest.$ac_ext >&5
7989   rm -rf conftest*
7990   eval "ac_cv_func_$ac_func=no"
7991 fi
7992 rm -f conftest*
7993 fi
7994
7995 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7996   echo "$ac_t""yes" 1>&6
7997   
7998 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
7999 cat >> confdefs.h <<EOF
8000 #define $ac_tr_func 1
8001 EOF
8002
8003 else
8004   echo "$ac_t""no" 1>&6
8005 LIBOBJS="$LIBOBJS ${ac_func}.o"
8006 fi
8007
8008 : << END
8009 @@@funcs="$funcs strndup strnlen strptime strsep strtok_r strupr"@@@
8010 END
8011 done
8012
8013 for ac_func in swab unsetenv verr verrx vsyslog
8014 do
8015 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8016 echo "configure:8017: checking for $ac_func" >&5
8017 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8018   echo $ac_n "(cached) $ac_c" 1>&6
8019 else
8020   cat > conftest.$ac_ext <<EOF
8021 #line 8022 "configure"
8022 #include "confdefs.h"
8023 /* System header to define __stub macros and hopefully few prototypes,
8024     which can conflict with char $ac_func(); below.  */
8025 #include <assert.h>
8026 /* Override any gcc2 internal prototype to avoid an error.  */
8027 /* We use char because int might match the return type of a gcc2
8028     builtin and then its argument prototype would still apply.  */
8029 char $ac_func();
8030
8031 int main() {
8032
8033 /* The GNU C library defines this for functions which it implements
8034     to always fail with ENOSYS.  Some functions are actually named
8035     something starting with __ and the normal name is an alias.  */
8036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8037 choke me
8038 #else
8039 $ac_func();
8040 #endif
8041
8042 ; return 0; }
8043 EOF
8044 if { (eval echo configure:8045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8045   rm -rf conftest*
8046   eval "ac_cv_func_$ac_func=yes"
8047 else
8048   echo "configure: failed program was:" >&5
8049   cat conftest.$ac_ext >&5
8050   rm -rf conftest*
8051   eval "ac_cv_func_$ac_func=no"
8052 fi
8053 rm -f conftest*
8054 fi
8055
8056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8057   echo "$ac_t""yes" 1>&6
8058   
8059 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
8060 cat >> confdefs.h <<EOF
8061 #define $ac_tr_func 1
8062 EOF
8063
8064 else
8065   echo "$ac_t""no" 1>&6
8066 LIBOBJS="$LIBOBJS ${ac_func}.o"
8067 fi
8068
8069 : << END
8070 @@@funcs="$funcs swab unsetenv verr verrx vsyslog"@@@
8071 END
8072 done
8073
8074 for ac_func in vwarn vwarnx warn warnx writev
8075 do
8076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8077 echo "configure:8078: checking for $ac_func" >&5
8078 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8079   echo $ac_n "(cached) $ac_c" 1>&6
8080 else
8081   cat > conftest.$ac_ext <<EOF
8082 #line 8083 "configure"
8083 #include "confdefs.h"
8084 /* System header to define __stub macros and hopefully few prototypes,
8085     which can conflict with char $ac_func(); below.  */
8086 #include <assert.h>
8087 /* Override any gcc2 internal prototype to avoid an error.  */
8088 /* We use char because int might match the return type of a gcc2
8089     builtin and then its argument prototype would still apply.  */
8090 char $ac_func();
8091
8092 int main() {
8093
8094 /* The GNU C library defines this for functions which it implements
8095     to always fail with ENOSYS.  Some functions are actually named
8096     something starting with __ and the normal name is an alias.  */
8097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8098 choke me
8099 #else
8100 $ac_func();
8101 #endif
8102
8103 ; return 0; }
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8106   rm -rf conftest*
8107   eval "ac_cv_func_$ac_func=yes"
8108 else
8109   echo "configure: failed program was:" >&5
8110   cat conftest.$ac_ext >&5
8111   rm -rf conftest*
8112   eval "ac_cv_func_$ac_func=no"
8113 fi
8114 rm -f conftest*
8115 fi
8116
8117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8118   echo "$ac_t""yes" 1>&6
8119   
8120 ac_tr_func=HAVE_`echo $ac_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
8121 cat >> confdefs.h <<EOF
8122 #define $ac_tr_func 1
8123 EOF
8124
8125 else
8126   echo "$ac_t""no" 1>&6
8127 LIBOBJS="$LIBOBJS ${ac_func}.o"
8128 fi
8129
8130 : << END
8131 @@@funcs="$funcs vwarn vwarnx warn warnx writev"@@@
8132 END
8133 done
8134
8135
8136 if test "$ac_cv_func_gethostname" = "yes"; then
8137
8138 if test "$ac_cv_func_gethostname+set" != set -o "$ac_cv_func_gethostname" = yes; then
8139 echo $ac_n "checking if gethostname needs a prototype""... $ac_c" 1>&6
8140 echo "configure:8141: checking if gethostname needs a prototype" >&5
8141 if eval "test \"`echo '$''{'ac_cv_func_gethostname_noproto'+set}'`\" = set"; then
8142   echo $ac_n "(cached) $ac_c" 1>&6
8143 else
8144   cat > conftest.$ac_ext <<EOF
8145 #line 8146 "configure"
8146 #include "confdefs.h"
8147
8148 #include <unistd.h>
8149 int main() {
8150 struct foo { int foo; } xx;
8151 extern int gethostname (struct foo*);
8152 gethostname(&xx);
8153
8154 ; return 0; }
8155 EOF
8156 if { (eval echo configure:8157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8157   rm -rf conftest*
8158   eval "ac_cv_func_gethostname_noproto=yes"
8159 else
8160   echo "configure: failed program was:" >&5
8161   cat conftest.$ac_ext >&5
8162   rm -rf conftest*
8163   eval "ac_cv_func_gethostname_noproto=no"
8164 fi
8165 rm -f conftest*
8166 fi
8167
8168 echo "$ac_t""$ac_cv_func_gethostname_noproto" 1>&6
8169
8170 if test "$ac_cv_func_gethostname_noproto" = yes; then
8171         cat >> confdefs.h <<\EOF
8172 #define NEED_GETHOSTNAME_PROTO 1
8173 EOF
8174
8175 fi
8176
8177 fi
8178
8179 fi
8180
8181 if test "$ac_cv_func_mkstemp" = "yes"; then
8182
8183 if test "$ac_cv_func_mkstemp+set" != set -o "$ac_cv_func_mkstemp" = yes; then
8184 echo $ac_n "checking if mkstemp needs a prototype""... $ac_c" 1>&6
8185 echo "configure:8186: checking if mkstemp needs a prototype" >&5
8186 if eval "test \"`echo '$''{'ac_cv_func_mkstemp_noproto'+set}'`\" = set"; then
8187   echo $ac_n "(cached) $ac_c" 1>&6
8188 else
8189   cat > conftest.$ac_ext <<EOF
8190 #line 8191 "configure"
8191 #include "confdefs.h"
8192
8193 #include <unistd.h>
8194 int main() {
8195 struct foo { int foo; } xx;
8196 extern int mkstemp (struct foo*);
8197 mkstemp(&xx);
8198
8199 ; return 0; }
8200 EOF
8201 if { (eval echo configure:8202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8202   rm -rf conftest*
8203   eval "ac_cv_func_mkstemp_noproto=yes"
8204 else
8205   echo "configure: failed program was:" >&5
8206   cat conftest.$ac_ext >&5
8207   rm -rf conftest*
8208   eval "ac_cv_func_mkstemp_noproto=no"
8209 fi
8210 rm -f conftest*
8211 fi
8212
8213 echo "$ac_t""$ac_cv_func_mkstemp_noproto" 1>&6
8214
8215 if test "$ac_cv_func_mkstemp_noproto" = yes; then
8216         cat >> confdefs.h <<\EOF
8217 #define NEED_MKSTEMP_PROTO 1
8218 EOF
8219
8220 fi
8221
8222 fi
8223
8224 fi
8225
8226 if test "$ac_cv_func_inet_aton" = "yes"; then
8227
8228 if test "$ac_cv_func_inet_aton+set" != set -o "$ac_cv_func_inet_aton" = yes; then
8229 echo $ac_n "checking if inet_aton needs a prototype""... $ac_c" 1>&6
8230 echo "configure:8231: checking if inet_aton needs a prototype" >&5
8231 if eval "test \"`echo '$''{'ac_cv_func_inet_aton_noproto'+set}'`\" = set"; then
8232   echo $ac_n "(cached) $ac_c" 1>&6
8233 else
8234   cat > conftest.$ac_ext <<EOF
8235 #line 8236 "configure"
8236 #include "confdefs.h"
8237
8238 #ifdef HAVE_SYS_TYPES_H
8239 #include <sys/types.h>
8240 #endif
8241 #ifdef HAVE_SYS_SOCKET_H
8242 #include <sys/socket.h>
8243 #endif
8244 #ifdef HAVE_NETINET_IN_H
8245 #include <netinet/in.h>
8246 #endif
8247 #ifdef HAVE_ARPA_INET_H
8248 #include <arpa/inet.h>
8249 #endif
8250 int main() {
8251 struct foo { int foo; } xx;
8252 extern int inet_aton (struct foo*);
8253 inet_aton(&xx);
8254
8255 ; return 0; }
8256 EOF
8257 if { (eval echo configure:8258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8258   rm -rf conftest*
8259   eval "ac_cv_func_inet_aton_noproto=yes"
8260 else
8261   echo "configure: failed program was:" >&5
8262   cat conftest.$ac_ext >&5
8263   rm -rf conftest*
8264   eval "ac_cv_func_inet_aton_noproto=no"
8265 fi
8266 rm -f conftest*
8267 fi
8268
8269 echo "$ac_t""$ac_cv_func_inet_aton_noproto" 1>&6
8270
8271 if test "$ac_cv_func_inet_aton_noproto" = yes; then
8272         cat >> confdefs.h <<\EOF
8273 #define NEED_INET_ATON_PROTO 1
8274 EOF
8275
8276 fi
8277
8278 fi
8279
8280 fi
8281
8282 echo $ac_n "checking if realloc is broken""... $ac_c" 1>&6
8283 echo "configure:8284: checking if realloc is broken" >&5
8284 if eval "test \"`echo '$''{'ac_cv_func_realloc_broken'+set}'`\" = set"; then
8285   echo $ac_n "(cached) $ac_c" 1>&6
8286 else
8287   
8288 ac_cv_func_realloc_broken=no
8289 if test "$cross_compiling" = yes; then
8290   :
8291 else
8292   cat > conftest.$ac_ext <<EOF
8293 #line 8294 "configure"
8294 #include "confdefs.h"
8295
8296 #include <stddef.h>
8297 #include <stdlib.h>
8298
8299 int main()
8300 {
8301         return realloc(NULL, 17) == NULL;
8302 }
8303
8304 EOF
8305 if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8306 then
8307   :
8308 else
8309   echo "configure: failed program was:" >&5
8310   cat conftest.$ac_ext >&5
8311   rm -fr conftest*
8312   ac_cv_func_realloc_broken=yes
8313 fi
8314 rm -fr conftest*
8315 fi
8316
8317
8318 fi
8319
8320 echo "$ac_t""$ac_cv_func_realloc_broken" 1>&6
8321 if test "$ac_cv_func_realloc_broken" = yes ; then
8322         cat >> confdefs.h <<\EOF
8323 #define BROKEN_REALLOC 1
8324 EOF
8325
8326 fi
8327
8328
8329 if test "$ac_cv_func_getcwd" = yes; then
8330 echo $ac_n "checking if getcwd is broken""... $ac_c" 1>&6
8331 echo "configure:8332: checking if getcwd is broken" >&5
8332 if eval "test \"`echo '$''{'ac_cv_func_getcwd_broken'+set}'`\" = set"; then
8333   echo $ac_n "(cached) $ac_c" 1>&6
8334 else
8335   
8336 ac_cv_func_getcwd_broken=no
8337
8338 if test "$cross_compiling" = yes; then
8339   :
8340 else
8341   cat > conftest.$ac_ext <<EOF
8342 #line 8343 "configure"
8343 #include "confdefs.h"
8344
8345 #include <errno.h>
8346 char *getcwd(char*, int);
8347
8348 void *popen(char *cmd, char *mode)
8349 {
8350         errno = ENOTTY;
8351         return 0;
8352 }
8353
8354 int main()
8355 {
8356         char *ret;
8357         ret = getcwd(0, 1024);
8358         if(ret == 0 && errno == ENOTTY)
8359                 return 0;
8360         return 1;
8361 }
8362
8363 EOF
8364 if { (eval echo configure:8365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8365 then
8366   ac_cv_func_getcwd_broken=yes
8367 else
8368   echo "configure: failed program was:" >&5
8369   cat conftest.$ac_ext >&5
8370   rm -fr conftest*
8371   :
8372 fi
8373 rm -fr conftest*
8374 fi
8375
8376
8377 fi
8378
8379 if test "$ac_cv_func_getcwd_broken" = yes; then
8380         cat >> confdefs.h <<\EOF
8381 #define BROKEN_GETCWD 1
8382 EOF
8383         LIBOBJS="$LIBOBJS getcwd.o"
8384                 echo "$ac_t""$ac_cv_func_getcwd_broken" 1>&6
8385 else
8386         echo "$ac_t""seems ok" 1>&6
8387 fi
8388 fi
8389
8390
8391
8392 echo $ac_n "checking which authentication modules should be built""... $ac_c" 1>&6
8393 echo "configure:8394: checking which authentication modules should be built" >&5
8394
8395 LIB_AUTH_SUBDIRS=
8396
8397 if test "$ac_cv_header_siad_h" = yes; then
8398         LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS sia"
8399 fi
8400
8401 if test "$ac_cv_header_security_pam_modules_h" = yes -a "$enable_shared" = yes; then
8402         LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS pam"
8403 fi
8404
8405 case "${host}" in
8406 *-*-irix[56]*) LIB_AUTH_SUBDIRS="$LIB_AUTH_SUBDIRS afskauthlib" ;;
8407 esac
8408
8409 echo "$ac_t""$LIB_AUTH_SUBDIRS" 1>&6
8410
8411
8412
8413
8414 echo $ac_n "checking if gethostbyname is compatible with system prototype""... $ac_c" 1>&6
8415 echo "configure:8416: checking if gethostbyname is compatible with system prototype" >&5
8416 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_proto_compat'+set}'`\" = set"; then
8417   echo $ac_n "(cached) $ac_c" 1>&6
8418 else
8419   cat > conftest.$ac_ext <<EOF
8420 #line 8421 "configure"
8421 #include "confdefs.h"
8422
8423 #ifdef HAVE_SYS_TYPES_H
8424 #include <sys/types.h>
8425 #endif
8426 #ifdef HAVE_SYS_SOCKET_H
8427 #include <sys/socket.h>
8428 #endif
8429 #ifdef HAVE_NETINET_IN_H
8430 #include <netinet/in.h>
8431 #endif
8432 #ifdef HAVE_ARPA_INET_H
8433 #include <arpa/inet.h>
8434 #endif
8435 #ifdef HAVE_NETDB_H
8436 #include <netdb.h>
8437 #endif
8438
8439 int main() {
8440 struct hostent *gethostbyname(const char *);
8441 ; return 0; }
8442 EOF
8443 if { (eval echo configure:8444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8444   rm -rf conftest*
8445   eval "ac_cv_func_gethostbyname_proto_compat=yes"
8446 else
8447   echo "configure: failed program was:" >&5
8448   cat conftest.$ac_ext >&5
8449   rm -rf conftest*
8450   eval "ac_cv_func_gethostbyname_proto_compat=no"
8451 fi
8452 rm -f conftest*
8453 fi
8454
8455 echo "$ac_t""$ac_cv_func_gethostbyname_proto_compat" 1>&6
8456
8457 if test "$ac_cv_func_gethostbyname_proto_compat" = yes; then
8458         cat >> confdefs.h <<\EOF
8459 #define GETHOSTBYNAME_PROTO_COMPATIBLE 1
8460 EOF
8461
8462 fi
8463
8464
8465
8466
8467 echo $ac_n "checking if gethostbyaddr is compatible with system prototype""... $ac_c" 1>&6
8468 echo "configure:8469: checking if gethostbyaddr is compatible with system prototype" >&5
8469 if eval "test \"`echo '$''{'ac_cv_func_gethostbyaddr_proto_compat'+set}'`\" = set"; then
8470   echo $ac_n "(cached) $ac_c" 1>&6
8471 else
8472   cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475
8476 #ifdef HAVE_SYS_TYPES_H
8477 #include <sys/types.h>
8478 #endif
8479 #ifdef HAVE_SYS_SOCKET_H
8480 #include <sys/socket.h>
8481 #endif
8482 #ifdef HAVE_NETINET_IN_H
8483 #include <netinet/in.h>
8484 #endif
8485 #ifdef HAVE_ARPA_INET_H
8486 #include <arpa/inet.h>
8487 #endif
8488 #ifdef HAVE_NETDB_H
8489 #include <netdb.h>
8490 #endif
8491
8492 int main() {
8493 struct hostent *gethostbyaddr(const void *, size_t, int);
8494 ; return 0; }
8495 EOF
8496 if { (eval echo configure:8497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8497   rm -rf conftest*
8498   eval "ac_cv_func_gethostbyaddr_proto_compat=yes"
8499 else
8500   echo "configure: failed program was:" >&5
8501   cat conftest.$ac_ext >&5
8502   rm -rf conftest*
8503   eval "ac_cv_func_gethostbyaddr_proto_compat=no"
8504 fi
8505 rm -f conftest*
8506 fi
8507
8508 echo "$ac_t""$ac_cv_func_gethostbyaddr_proto_compat" 1>&6
8509
8510 if test "$ac_cv_func_gethostbyaddr_proto_compat" = yes; then
8511         cat >> confdefs.h <<\EOF
8512 #define GETHOSTBYADDR_PROTO_COMPATIBLE 1
8513 EOF
8514
8515 fi
8516
8517
8518
8519
8520 echo $ac_n "checking if getservbyname is compatible with system prototype""... $ac_c" 1>&6
8521 echo "configure:8522: checking if getservbyname is compatible with system prototype" >&5
8522 if eval "test \"`echo '$''{'ac_cv_func_getservbyname_proto_compat'+set}'`\" = set"; then
8523   echo $ac_n "(cached) $ac_c" 1>&6
8524 else
8525   cat > conftest.$ac_ext <<EOF
8526 #line 8527 "configure"
8527 #include "confdefs.h"
8528
8529 #ifdef HAVE_SYS_TYPES_H
8530 #include <sys/types.h>
8531 #endif
8532 #ifdef HAVE_SYS_SOCKET_H
8533 #include <sys/socket.h>
8534 #endif
8535 #ifdef HAVE_NETINET_IN_H
8536 #include <netinet/in.h>
8537 #endif
8538 #ifdef HAVE_ARPA_INET_H
8539 #include <arpa/inet.h>
8540 #endif
8541 #ifdef HAVE_NETDB_H
8542 #include <netdb.h>
8543 #endif
8544
8545 int main() {
8546 struct servent *getservbyname(const char *, const char *);
8547 ; return 0; }
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8550   rm -rf conftest*
8551   eval "ac_cv_func_getservbyname_proto_compat=yes"
8552 else
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_func_getservbyname_proto_compat=no"
8557 fi
8558 rm -f conftest*
8559 fi
8560
8561 echo "$ac_t""$ac_cv_func_getservbyname_proto_compat" 1>&6
8562
8563 if test "$ac_cv_func_getservbyname_proto_compat" = yes; then
8564         cat >> confdefs.h <<\EOF
8565 #define GETSERVBYNAME_PROTO_COMPATIBLE 1
8566 EOF
8567
8568 fi
8569
8570
8571
8572
8573 echo $ac_n "checking if openlog is compatible with system prototype""... $ac_c" 1>&6
8574 echo "configure:8575: checking if openlog is compatible with system prototype" >&5
8575 if eval "test \"`echo '$''{'ac_cv_func_openlog_proto_compat'+set}'`\" = set"; then
8576   echo $ac_n "(cached) $ac_c" 1>&6
8577 else
8578   cat > conftest.$ac_ext <<EOF
8579 #line 8580 "configure"
8580 #include "confdefs.h"
8581
8582 #ifdef HAVE_SYSLOG_H
8583 #include <syslog.h>
8584 #endif
8585
8586 int main() {
8587 void openlog(const char *, int, int);
8588 ; return 0; }
8589 EOF
8590 if { (eval echo configure:8591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8591   rm -rf conftest*
8592   eval "ac_cv_func_openlog_proto_compat=yes"
8593 else
8594   echo "configure: failed program was:" >&5
8595   cat conftest.$ac_ext >&5
8596   rm -rf conftest*
8597   eval "ac_cv_func_openlog_proto_compat=no"
8598 fi
8599 rm -f conftest*
8600 fi
8601
8602 echo "$ac_t""$ac_cv_func_openlog_proto_compat" 1>&6
8603
8604 if test "$ac_cv_func_openlog_proto_compat" = yes; then
8605         cat >> confdefs.h <<\EOF
8606 #define OPENLOG_PROTO_COMPATIBLE 1
8607 EOF
8608
8609 fi
8610
8611
8612
8613
8614 if test "$ac_cv_func_crypt+set" != set -o "$ac_cv_func_crypt" = yes; then
8615 echo $ac_n "checking if crypt needs a prototype""... $ac_c" 1>&6
8616 echo "configure:8617: checking if crypt needs a prototype" >&5
8617 if eval "test \"`echo '$''{'ac_cv_func_crypt_noproto'+set}'`\" = set"; then
8618   echo $ac_n "(cached) $ac_c" 1>&6
8619 else
8620   cat > conftest.$ac_ext <<EOF
8621 #line 8622 "configure"
8622 #include "confdefs.h"
8623
8624 #ifdef HAVE_CRYPT_H
8625 #include <crypt.h>
8626 #endif
8627 #ifdef HAVE_UNISTD_H
8628 #include <unistd.h>
8629 #endif
8630
8631 int main() {
8632 struct foo { int foo; } xx;
8633 extern int crypt (struct foo*);
8634 crypt(&xx);
8635
8636 ; return 0; }
8637 EOF
8638 if { (eval echo configure:8639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8639   rm -rf conftest*
8640   eval "ac_cv_func_crypt_noproto=yes"
8641 else
8642   echo "configure: failed program was:" >&5
8643   cat conftest.$ac_ext >&5
8644   rm -rf conftest*
8645   eval "ac_cv_func_crypt_noproto=no"
8646 fi
8647 rm -f conftest*
8648 fi
8649
8650 echo "$ac_t""$ac_cv_func_crypt_noproto" 1>&6
8651
8652 if test "$ac_cv_func_crypt_noproto" = yes; then
8653         cat >> confdefs.h <<\EOF
8654 #define NEED_CRYPT_PROTO 1
8655 EOF
8656
8657 fi
8658
8659 fi
8660
8661
8662
8663 if test "$ac_cv_func_fclose+set" != set -o "$ac_cv_func_fclose" = yes; then
8664 echo $ac_n "checking if fclose needs a prototype""... $ac_c" 1>&6
8665 echo "configure:8666: checking if fclose needs a prototype" >&5
8666 if eval "test \"`echo '$''{'ac_cv_func_fclose_noproto'+set}'`\" = set"; then
8667   echo $ac_n "(cached) $ac_c" 1>&6
8668 else
8669   cat > conftest.$ac_ext <<EOF
8670 #line 8671 "configure"
8671 #include "confdefs.h"
8672
8673 #include <stdio.h>
8674
8675 int main() {
8676 struct foo { int foo; } xx;
8677 extern int fclose (struct foo*);
8678 fclose(&xx);
8679
8680 ; return 0; }
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8683   rm -rf conftest*
8684   eval "ac_cv_func_fclose_noproto=yes"
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   eval "ac_cv_func_fclose_noproto=no"
8690 fi
8691 rm -f conftest*
8692 fi
8693
8694 echo "$ac_t""$ac_cv_func_fclose_noproto" 1>&6
8695
8696 if test "$ac_cv_func_fclose_noproto" = yes; then
8697         cat >> confdefs.h <<\EOF
8698 #define NEED_FCLOSE_PROTO 1
8699 EOF
8700
8701 fi
8702
8703 fi
8704
8705
8706
8707 if test "$ac_cv_func_strtok_r+set" != set -o "$ac_cv_func_strtok_r" = yes; then
8708 echo $ac_n "checking if strtok_r needs a prototype""... $ac_c" 1>&6
8709 echo "configure:8710: checking if strtok_r needs a prototype" >&5
8710 if eval "test \"`echo '$''{'ac_cv_func_strtok_r_noproto'+set}'`\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716
8717 #include <string.h>
8718
8719 int main() {
8720 struct foo { int foo; } xx;
8721 extern int strtok_r (struct foo*);
8722 strtok_r(&xx);
8723
8724 ; return 0; }
8725 EOF
8726 if { (eval echo configure:8727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8727   rm -rf conftest*
8728   eval "ac_cv_func_strtok_r_noproto=yes"
8729 else
8730   echo "configure: failed program was:" >&5
8731   cat conftest.$ac_ext >&5
8732   rm -rf conftest*
8733   eval "ac_cv_func_strtok_r_noproto=no"
8734 fi
8735 rm -f conftest*
8736 fi
8737
8738 echo "$ac_t""$ac_cv_func_strtok_r_noproto" 1>&6
8739
8740 if test "$ac_cv_func_strtok_r_noproto" = yes; then
8741         cat >> confdefs.h <<\EOF
8742 #define NEED_STRTOK_R_PROTO 1
8743 EOF
8744
8745 fi
8746
8747 fi
8748
8749
8750
8751 if test "$ac_cv_func_strsep+set" != set -o "$ac_cv_func_strsep" = yes; then
8752 echo $ac_n "checking if strsep needs a prototype""... $ac_c" 1>&6
8753 echo "configure:8754: checking if strsep needs a prototype" >&5
8754 if eval "test \"`echo '$''{'ac_cv_func_strsep_noproto'+set}'`\" = set"; then
8755   echo $ac_n "(cached) $ac_c" 1>&6
8756 else
8757   cat > conftest.$ac_ext <<EOF
8758 #line 8759 "configure"
8759 #include "confdefs.h"
8760
8761 #include <string.h>
8762
8763 int main() {
8764 struct foo { int foo; } xx;
8765 extern int strsep (struct foo*);
8766 strsep(&xx);
8767
8768 ; return 0; }
8769 EOF
8770 if { (eval echo configure:8771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8771   rm -rf conftest*
8772   eval "ac_cv_func_strsep_noproto=yes"
8773 else
8774   echo "configure: failed program was:" >&5
8775   cat conftest.$ac_ext >&5
8776   rm -rf conftest*
8777   eval "ac_cv_func_strsep_noproto=no"
8778 fi
8779 rm -f conftest*
8780 fi
8781
8782 echo "$ac_t""$ac_cv_func_strsep_noproto" 1>&6
8783
8784 if test "$ac_cv_func_strsep_noproto" = yes; then
8785         cat >> confdefs.h <<\EOF
8786 #define NEED_STRSEP_PROTO 1
8787 EOF
8788
8789 fi
8790
8791 fi
8792
8793
8794
8795 if test "$ac_cv_func_getusershell+set" != set -o "$ac_cv_func_getusershell" = yes; then
8796 echo $ac_n "checking if getusershell needs a prototype""... $ac_c" 1>&6
8797 echo "configure:8798: checking if getusershell needs a prototype" >&5
8798 if eval "test \"`echo '$''{'ac_cv_func_getusershell_noproto'+set}'`\" = set"; then
8799   echo $ac_n "(cached) $ac_c" 1>&6
8800 else
8801   cat > conftest.$ac_ext <<EOF
8802 #line 8803 "configure"
8803 #include "confdefs.h"
8804
8805 #include <unistd.h>
8806
8807 int main() {
8808 struct foo { int foo; } xx;
8809 extern int getusershell (struct foo*);
8810 getusershell(&xx);
8811
8812 ; return 0; }
8813 EOF
8814 if { (eval echo configure:8815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8815   rm -rf conftest*
8816   eval "ac_cv_func_getusershell_noproto=yes"
8817 else
8818   echo "configure: failed program was:" >&5
8819   cat conftest.$ac_ext >&5
8820   rm -rf conftest*
8821   eval "ac_cv_func_getusershell_noproto=no"
8822 fi
8823 rm -f conftest*
8824 fi
8825
8826 echo "$ac_t""$ac_cv_func_getusershell_noproto" 1>&6
8827
8828 if test "$ac_cv_func_getusershell_noproto" = yes; then
8829         cat >> confdefs.h <<\EOF
8830 #define NEED_GETUSERSHELL_PROTO 1
8831 EOF
8832
8833 fi
8834
8835 fi
8836
8837
8838
8839 if test "$ac_cv_func_utime+set" != set -o "$ac_cv_func_utime" = yes; then
8840 echo $ac_n "checking if utime needs a prototype""... $ac_c" 1>&6
8841 echo "configure:8842: checking if utime needs a prototype" >&5
8842 if eval "test \"`echo '$''{'ac_cv_func_utime_noproto'+set}'`\" = set"; then
8843   echo $ac_n "(cached) $ac_c" 1>&6
8844 else
8845   cat > conftest.$ac_ext <<EOF
8846 #line 8847 "configure"
8847 #include "confdefs.h"
8848
8849 #ifdef HAVE_UTIME_H
8850 #include <utime.h>
8851 #endif
8852
8853 int main() {
8854 struct foo { int foo; } xx;
8855 extern int utime (struct foo*);
8856 utime(&xx);
8857
8858 ; return 0; }
8859 EOF
8860 if { (eval echo configure:8861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8861   rm -rf conftest*
8862   eval "ac_cv_func_utime_noproto=yes"
8863 else
8864   echo "configure: failed program was:" >&5
8865   cat conftest.$ac_ext >&5
8866   rm -rf conftest*
8867   eval "ac_cv_func_utime_noproto=no"
8868 fi
8869 rm -f conftest*
8870 fi
8871
8872 echo "$ac_t""$ac_cv_func_utime_noproto" 1>&6
8873
8874 if test "$ac_cv_func_utime_noproto" = yes; then
8875         cat >> confdefs.h <<\EOF
8876 #define NEED_UTIME_PROTO 1
8877 EOF
8878
8879 fi
8880
8881 fi
8882
8883
8884
8885 echo $ac_n "checking for h_errno""... $ac_c" 1>&6
8886 echo "configure:8887: checking for h_errno" >&5
8887 if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
8888   echo $ac_n "(cached) $ac_c" 1>&6
8889 else
8890   
8891 cat > conftest.$ac_ext <<EOF
8892 #line 8893 "configure"
8893 #include "confdefs.h"
8894 extern int h_errno;
8895 int foo() { return h_errno; }
8896 int main() {
8897 foo()
8898 ; return 0; }
8899 EOF
8900 if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8901   rm -rf conftest*
8902   ac_cv_var_h_errno=yes
8903 else
8904   echo "configure: failed program was:" >&5
8905   cat conftest.$ac_ext >&5
8906   rm -rf conftest*
8907   ac_cv_var_h_errno=no
8908 fi
8909 rm -f conftest*
8910
8911 fi
8912
8913
8914
8915 echo "$ac_t""`eval echo \\$ac_cv_var_h_errno`" 1>&6
8916 if test `eval echo \\$ac_cv_var_h_errno` = yes; then
8917         cat >> confdefs.h <<EOF
8918 #define HAVE_H_ERRNO 1
8919 EOF
8920
8921         
8922 echo $ac_n "checking if h_errno is properly declared""... $ac_c" 1>&6
8923 echo "configure:8924: checking if h_errno is properly declared" >&5
8924 if eval "test \"`echo '$''{'ac_cv_var_h_errno_declaration'+set}'`\" = set"; then
8925   echo $ac_n "(cached) $ac_c" 1>&6
8926 else
8927   
8928 cat > conftest.$ac_ext <<EOF
8929 #line 8930 "configure"
8930 #include "confdefs.h"
8931 #ifdef HAVE_SYS_TYPES_H
8932 #include <sys/types.h>
8933 #endif
8934 #ifdef HAVE_NETDB_H
8935 #include <netdb.h>
8936 #endif
8937 extern struct { int foo; } h_errno;
8938 int main() {
8939 h_errno.foo = 1;
8940 ; return 0; }
8941 EOF
8942 if { (eval echo configure:8943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8943   rm -rf conftest*
8944   eval "ac_cv_var_h_errno_declaration=no"
8945 else
8946   echo "configure: failed program was:" >&5
8947   cat conftest.$ac_ext >&5
8948   rm -rf conftest*
8949   eval "ac_cv_var_h_errno_declaration=yes"
8950 fi
8951 rm -f conftest*
8952
8953 fi
8954
8955
8956
8957
8958 echo "$ac_t""$ac_cv_var_h_errno_declaration" 1>&6
8959 if eval "test \"\$ac_cv_var_h_errno_declaration\" = yes"; then
8960         cat >> confdefs.h <<\EOF
8961 #define HAVE_H_ERRNO_DECLARATION 1
8962 EOF
8963
8964 fi
8965
8966
8967 fi
8968
8969
8970
8971
8972 echo $ac_n "checking for h_errlist""... $ac_c" 1>&6
8973 echo "configure:8974: checking for h_errlist" >&5
8974 if eval "test \"`echo '$''{'ac_cv_var_h_errlist'+set}'`\" = set"; then
8975   echo $ac_n "(cached) $ac_c" 1>&6
8976 else
8977   
8978 cat > conftest.$ac_ext <<EOF
8979 #line 8980 "configure"
8980 #include "confdefs.h"
8981 extern int h_errlist;
8982 int foo() { return h_errlist; }
8983 int main() {
8984 foo()
8985 ; return 0; }
8986 EOF
8987 if { (eval echo configure:8988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8988   rm -rf conftest*
8989   ac_cv_var_h_errlist=yes
8990 else
8991   echo "configure: failed program was:" >&5
8992   cat conftest.$ac_ext >&5
8993   rm -rf conftest*
8994   ac_cv_var_h_errlist=no
8995 fi
8996 rm -f conftest*
8997
8998 fi
8999
9000
9001
9002 echo "$ac_t""`eval echo \\$ac_cv_var_h_errlist`" 1>&6
9003 if test `eval echo \\$ac_cv_var_h_errlist` = yes; then
9004         cat >> confdefs.h <<EOF
9005 #define HAVE_H_ERRLIST 1
9006 EOF
9007
9008         
9009 echo $ac_n "checking if h_errlist is properly declared""... $ac_c" 1>&6
9010 echo "configure:9011: checking if h_errlist is properly declared" >&5
9011 if eval "test \"`echo '$''{'ac_cv_var_h_errlist_declaration'+set}'`\" = set"; then
9012   echo $ac_n "(cached) $ac_c" 1>&6
9013 else
9014   
9015 cat > conftest.$ac_ext <<EOF
9016 #line 9017 "configure"
9017 #include "confdefs.h"
9018 #ifdef HAVE_NETDB_H
9019 #include <netdb.h>
9020 #endif
9021 extern struct { int foo; } h_errlist;
9022 int main() {
9023 h_errlist.foo = 1;
9024 ; return 0; }
9025 EOF
9026 if { (eval echo configure:9027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9027   rm -rf conftest*
9028   eval "ac_cv_var_h_errlist_declaration=no"
9029 else
9030   echo "configure: failed program was:" >&5
9031   cat conftest.$ac_ext >&5
9032   rm -rf conftest*
9033   eval "ac_cv_var_h_errlist_declaration=yes"
9034 fi
9035 rm -f conftest*
9036
9037 fi
9038
9039
9040
9041
9042 echo "$ac_t""$ac_cv_var_h_errlist_declaration" 1>&6
9043 if eval "test \"\$ac_cv_var_h_errlist_declaration\" = yes"; then
9044         cat >> confdefs.h <<\EOF
9045 #define HAVE_H_ERRLIST_DECLARATION 1
9046 EOF
9047
9048 fi
9049
9050
9051 fi
9052
9053
9054
9055
9056 echo $ac_n "checking for h_nerr""... $ac_c" 1>&6
9057 echo "configure:9058: checking for h_nerr" >&5
9058 if eval "test \"`echo '$''{'ac_cv_var_h_nerr'+set}'`\" = set"; then
9059   echo $ac_n "(cached) $ac_c" 1>&6
9060 else
9061   
9062 cat > conftest.$ac_ext <<EOF
9063 #line 9064 "configure"
9064 #include "confdefs.h"
9065 extern int h_nerr;
9066 int foo() { return h_nerr; }
9067 int main() {
9068 foo()
9069 ; return 0; }
9070 EOF
9071 if { (eval echo configure:9072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9072   rm -rf conftest*
9073   ac_cv_var_h_nerr=yes
9074 else
9075   echo "configure: failed program was:" >&5
9076   cat conftest.$ac_ext >&5
9077   rm -rf conftest*
9078   ac_cv_var_h_nerr=no
9079 fi
9080 rm -f conftest*
9081
9082 fi
9083
9084
9085
9086 echo "$ac_t""`eval echo \\$ac_cv_var_h_nerr`" 1>&6
9087 if test `eval echo \\$ac_cv_var_h_nerr` = yes; then
9088         cat >> confdefs.h <<EOF
9089 #define HAVE_H_NERR 1
9090 EOF
9091
9092         
9093 echo $ac_n "checking if h_nerr is properly declared""... $ac_c" 1>&6
9094 echo "configure:9095: checking if h_nerr is properly declared" >&5
9095 if eval "test \"`echo '$''{'ac_cv_var_h_nerr_declaration'+set}'`\" = set"; then
9096   echo $ac_n "(cached) $ac_c" 1>&6
9097 else
9098   
9099 cat > conftest.$ac_ext <<EOF
9100 #line 9101 "configure"
9101 #include "confdefs.h"
9102 #ifdef HAVE_NETDB_H
9103 #include <netdb.h>
9104 #endif
9105 extern struct { int foo; } h_nerr;
9106 int main() {
9107 h_nerr.foo = 1;
9108 ; return 0; }
9109 EOF
9110 if { (eval echo configure:9111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9111   rm -rf conftest*
9112   eval "ac_cv_var_h_nerr_declaration=no"
9113 else
9114   echo "configure: failed program was:" >&5
9115   cat conftest.$ac_ext >&5
9116   rm -rf conftest*
9117   eval "ac_cv_var_h_nerr_declaration=yes"
9118 fi
9119 rm -f conftest*
9120
9121 fi
9122
9123
9124
9125
9126 echo "$ac_t""$ac_cv_var_h_nerr_declaration" 1>&6
9127 if eval "test \"\$ac_cv_var_h_nerr_declaration\" = yes"; then
9128         cat >> confdefs.h <<\EOF
9129 #define HAVE_H_NERR_DECLARATION 1
9130 EOF
9131
9132 fi
9133
9134
9135 fi
9136
9137
9138
9139
9140 echo $ac_n "checking for __progname""... $ac_c" 1>&6
9141 echo "configure:9142: checking for __progname" >&5
9142 if eval "test \"`echo '$''{'ac_cv_var___progname'+set}'`\" = set"; then
9143   echo $ac_n "(cached) $ac_c" 1>&6
9144 else
9145   
9146 cat > conftest.$ac_ext <<EOF
9147 #line 9148 "configure"
9148 #include "confdefs.h"
9149 extern int __progname;
9150 int foo() { return __progname; }
9151 int main() {
9152 foo()
9153 ; return 0; }
9154 EOF
9155 if { (eval echo configure:9156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9156   rm -rf conftest*
9157   ac_cv_var___progname=yes
9158 else
9159   echo "configure: failed program was:" >&5
9160   cat conftest.$ac_ext >&5
9161   rm -rf conftest*
9162   ac_cv_var___progname=no
9163 fi
9164 rm -f conftest*
9165
9166 fi
9167
9168
9169
9170 echo "$ac_t""`eval echo \\$ac_cv_var___progname`" 1>&6
9171 if test `eval echo \\$ac_cv_var___progname` = yes; then
9172         cat >> confdefs.h <<EOF
9173 #define HAVE___PROGNAME 1
9174 EOF
9175
9176         
9177 echo $ac_n "checking if __progname is properly declared""... $ac_c" 1>&6
9178 echo "configure:9179: checking if __progname is properly declared" >&5
9179 if eval "test \"`echo '$''{'ac_cv_var___progname_declaration'+set}'`\" = set"; then
9180   echo $ac_n "(cached) $ac_c" 1>&6
9181 else
9182   
9183 cat > conftest.$ac_ext <<EOF
9184 #line 9185 "configure"
9185 #include "confdefs.h"
9186 #ifdef HAVE_ERR_H
9187 #include <err.h>
9188 #endif
9189 extern struct { int foo; } __progname;
9190 int main() {
9191 __progname.foo = 1;
9192 ; return 0; }
9193 EOF
9194 if { (eval echo configure:9195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9195   rm -rf conftest*
9196   eval "ac_cv_var___progname_declaration=no"
9197 else
9198   echo "configure: failed program was:" >&5
9199   cat conftest.$ac_ext >&5
9200   rm -rf conftest*
9201   eval "ac_cv_var___progname_declaration=yes"
9202 fi
9203 rm -f conftest*
9204
9205 fi
9206
9207
9208
9209
9210 echo "$ac_t""$ac_cv_var___progname_declaration" 1>&6
9211 if eval "test \"\$ac_cv_var___progname_declaration\" = yes"; then
9212         cat >> confdefs.h <<\EOF
9213 #define HAVE___PROGNAME_DECLARATION 1
9214 EOF
9215
9216 fi
9217
9218
9219 fi
9220
9221
9222
9223
9224 echo $ac_n "checking if optarg is properly declared""... $ac_c" 1>&6
9225 echo "configure:9226: checking if optarg is properly declared" >&5
9226 if eval "test \"`echo '$''{'ac_cv_var_optarg_declaration'+set}'`\" = set"; then
9227   echo $ac_n "(cached) $ac_c" 1>&6
9228 else
9229   
9230 cat > conftest.$ac_ext <<EOF
9231 #line 9232 "configure"
9232 #include "confdefs.h"
9233 #include <stdlib.h>
9234 #ifdef HAVE_UNISTD_H
9235 #include <unistd.h>
9236 #endif
9237 extern struct { int foo; } optarg;
9238 int main() {
9239 optarg.foo = 1;
9240 ; return 0; }
9241 EOF
9242 if { (eval echo configure:9243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9243   rm -rf conftest*
9244   eval "ac_cv_var_optarg_declaration=no"
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   eval "ac_cv_var_optarg_declaration=yes"
9250 fi
9251 rm -f conftest*
9252
9253 fi
9254
9255
9256
9257
9258 echo "$ac_t""$ac_cv_var_optarg_declaration" 1>&6
9259 if eval "test \"\$ac_cv_var_optarg_declaration\" = yes"; then
9260         cat >> confdefs.h <<\EOF
9261 #define HAVE_OPTARG_DECLARATION 1
9262 EOF
9263
9264 fi
9265
9266
9267
9268 echo $ac_n "checking if optind is properly declared""... $ac_c" 1>&6
9269 echo "configure:9270: checking if optind is properly declared" >&5
9270 if eval "test \"`echo '$''{'ac_cv_var_optind_declaration'+set}'`\" = set"; then
9271   echo $ac_n "(cached) $ac_c" 1>&6
9272 else
9273   
9274 cat > conftest.$ac_ext <<EOF
9275 #line 9276 "configure"
9276 #include "confdefs.h"
9277 #include <stdlib.h>
9278 #ifdef HAVE_UNISTD_H
9279 #include <unistd.h>
9280 #endif
9281 extern struct { int foo; } optind;
9282 int main() {
9283 optind.foo = 1;
9284 ; return 0; }
9285 EOF
9286 if { (eval echo configure:9287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9287   rm -rf conftest*
9288   eval "ac_cv_var_optind_declaration=no"
9289 else
9290   echo "configure: failed program was:" >&5
9291   cat conftest.$ac_ext >&5
9292   rm -rf conftest*
9293   eval "ac_cv_var_optind_declaration=yes"
9294 fi
9295 rm -f conftest*
9296
9297 fi
9298
9299
9300
9301
9302 echo "$ac_t""$ac_cv_var_optind_declaration" 1>&6
9303 if eval "test \"\$ac_cv_var_optind_declaration\" = yes"; then
9304         cat >> confdefs.h <<\EOF
9305 #define HAVE_OPTIND_DECLARATION 1
9306 EOF
9307
9308 fi
9309
9310
9311
9312 echo $ac_n "checking if opterr is properly declared""... $ac_c" 1>&6
9313 echo "configure:9314: checking if opterr is properly declared" >&5
9314 if eval "test \"`echo '$''{'ac_cv_var_opterr_declaration'+set}'`\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   
9318 cat > conftest.$ac_ext <<EOF
9319 #line 9320 "configure"
9320 #include "confdefs.h"
9321 #include <stdlib.h>
9322 #ifdef HAVE_UNISTD_H
9323 #include <unistd.h>
9324 #endif
9325 extern struct { int foo; } opterr;
9326 int main() {
9327 opterr.foo = 1;
9328 ; return 0; }
9329 EOF
9330 if { (eval echo configure:9331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9331   rm -rf conftest*
9332   eval "ac_cv_var_opterr_declaration=no"
9333 else
9334   echo "configure: failed program was:" >&5
9335   cat conftest.$ac_ext >&5
9336   rm -rf conftest*
9337   eval "ac_cv_var_opterr_declaration=yes"
9338 fi
9339 rm -f conftest*
9340
9341 fi
9342
9343
9344
9345
9346 echo "$ac_t""$ac_cv_var_opterr_declaration" 1>&6
9347 if eval "test \"\$ac_cv_var_opterr_declaration\" = yes"; then
9348         cat >> confdefs.h <<\EOF
9349 #define HAVE_OPTERR_DECLARATION 1
9350 EOF
9351
9352 fi
9353
9354
9355
9356 echo $ac_n "checking if optopt is properly declared""... $ac_c" 1>&6
9357 echo "configure:9358: checking if optopt is properly declared" >&5
9358 if eval "test \"`echo '$''{'ac_cv_var_optopt_declaration'+set}'`\" = set"; then
9359   echo $ac_n "(cached) $ac_c" 1>&6
9360 else
9361   
9362 cat > conftest.$ac_ext <<EOF
9363 #line 9364 "configure"
9364 #include "confdefs.h"
9365 #include <stdlib.h>
9366 #ifdef HAVE_UNISTD_H
9367 #include <unistd.h>
9368 #endif
9369 extern struct { int foo; } optopt;
9370 int main() {
9371 optopt.foo = 1;
9372 ; return 0; }
9373 EOF
9374 if { (eval echo configure:9375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9375   rm -rf conftest*
9376   eval "ac_cv_var_optopt_declaration=no"
9377 else
9378   echo "configure: failed program was:" >&5
9379   cat conftest.$ac_ext >&5
9380   rm -rf conftest*
9381   eval "ac_cv_var_optopt_declaration=yes"
9382 fi
9383 rm -f conftest*
9384
9385 fi
9386
9387
9388
9389
9390 echo "$ac_t""$ac_cv_var_optopt_declaration" 1>&6
9391 if eval "test \"\$ac_cv_var_optopt_declaration\" = yes"; then
9392         cat >> confdefs.h <<\EOF
9393 #define HAVE_OPTOPT_DECLARATION 1
9394 EOF
9395
9396 fi
9397
9398
9399
9400
9401 echo $ac_n "checking if environ is properly declared""... $ac_c" 1>&6
9402 echo "configure:9403: checking if environ is properly declared" >&5
9403 if eval "test \"`echo '$''{'ac_cv_var_environ_declaration'+set}'`\" = set"; then
9404   echo $ac_n "(cached) $ac_c" 1>&6
9405 else
9406   
9407 cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410 #include <stdlib.h>
9411 extern struct { int foo; } environ;
9412 int main() {
9413 environ.foo = 1;
9414 ; return 0; }
9415 EOF
9416 if { (eval echo configure:9417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9417   rm -rf conftest*
9418   eval "ac_cv_var_environ_declaration=no"
9419 else
9420   echo "configure: failed program was:" >&5
9421   cat conftest.$ac_ext >&5
9422   rm -rf conftest*
9423   eval "ac_cv_var_environ_declaration=yes"
9424 fi
9425 rm -f conftest*
9426
9427 fi
9428
9429
9430
9431
9432 echo "$ac_t""$ac_cv_var_environ_declaration" 1>&6
9433 if eval "test \"\$ac_cv_var_environ_declaration\" = yes"; then
9434         cat >> confdefs.h <<\EOF
9435 #define HAVE_ENVIRON_DECLARATION 1
9436 EOF
9437
9438 fi
9439
9440
9441
9442 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
9443 echo "configure:9444: checking return type of signal handlers" >&5
9444 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
9445   echo $ac_n "(cached) $ac_c" 1>&6
9446 else
9447   cat > conftest.$ac_ext <<EOF
9448 #line 9449 "configure"
9449 #include "confdefs.h"
9450 #include <sys/types.h>
9451 #include <signal.h>
9452 #ifdef signal
9453 #undef signal
9454 #endif
9455 #ifdef __cplusplus
9456 extern "C" void (*signal (int, void (*)(int)))(int);
9457 #else
9458 void (*signal ()) ();
9459 #endif
9460
9461 int main() {
9462 int i;
9463 ; return 0; }
9464 EOF
9465 if { (eval echo configure:9466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9466   rm -rf conftest*
9467   ac_cv_type_signal=void
9468 else
9469   echo "configure: failed program was:" >&5
9470   cat conftest.$ac_ext >&5
9471   rm -rf conftest*
9472   ac_cv_type_signal=int
9473 fi
9474 rm -f conftest*
9475 fi
9476
9477 echo "$ac_t""$ac_cv_type_signal" 1>&6
9478 cat >> confdefs.h <<EOF
9479 #define RETSIGTYPE $ac_cv_type_signal
9480 EOF
9481
9482
9483 if test "$ac_cv_type_signal" = "void" ; then
9484         cat >> confdefs.h <<\EOF
9485 #define VOID_RETSIGTYPE 1
9486 EOF
9487
9488 fi
9489
9490
9491
9492
9493 echo $ac_n "checking for ut_addr in struct utmp""... $ac_c" 1>&6
9494 echo "configure:9495: checking for ut_addr in struct utmp" >&5
9495 if eval "test \"`echo '$''{'ac_cv_type_struct_utmp_ut_addr'+set}'`\" = set"; then
9496   echo $ac_n "(cached) $ac_c" 1>&6
9497 else
9498   
9499 cat > conftest.$ac_ext <<EOF
9500 #line 9501 "configure"
9501 #include "confdefs.h"
9502 #include <sys/types.h>
9503  #include <utmp.h>
9504 int main() {
9505 struct utmp x; x.ut_addr;
9506 ; return 0; }
9507 EOF
9508 if { (eval echo configure:9509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9509   rm -rf conftest*
9510   ac_cv_type_struct_utmp_ut_addr=yes
9511 else
9512   echo "configure: failed program was:" >&5
9513   cat conftest.$ac_ext >&5
9514   rm -rf conftest*
9515   ac_cv_type_struct_utmp_ut_addr=no
9516 fi
9517 rm -f conftest*
9518 fi
9519
9520 echo "$ac_t""$ac_cv_type_struct_utmp_ut_addr" 1>&6
9521 if test "$ac_cv_type_struct_utmp_ut_addr" = yes; then
9522         
9523         cat >> confdefs.h <<\EOF
9524 #define HAVE_STRUCT_UTMP_UT_ADDR 1
9525 EOF
9526
9527         
9528 fi
9529
9530
9531
9532
9533 echo $ac_n "checking for ut_host in struct utmp""... $ac_c" 1>&6
9534 echo "configure:9535: checking for ut_host in struct utmp" >&5
9535 if eval "test \"`echo '$''{'ac_cv_type_struct_utmp_ut_host'+set}'`\" = set"; then
9536   echo $ac_n "(cached) $ac_c" 1>&6
9537 else
9538   
9539 cat > conftest.$ac_ext <<EOF
9540 #line 9541 "configure"
9541 #include "confdefs.h"
9542 #include <sys/types.h>
9543  #include <utmp.h>
9544 int main() {
9545 struct utmp x; x.ut_host;
9546 ; return 0; }
9547 EOF
9548 if { (eval echo configure:9549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9549   rm -rf conftest*
9550   ac_cv_type_struct_utmp_ut_host=yes
9551 else
9552   echo "configure: failed program was:" >&5
9553   cat conftest.$ac_ext >&5
9554   rm -rf conftest*
9555   ac_cv_type_struct_utmp_ut_host=no
9556 fi
9557 rm -f conftest*
9558 fi
9559
9560 echo "$ac_t""$ac_cv_type_struct_utmp_ut_host" 1>&6
9561 if test "$ac_cv_type_struct_utmp_ut_host" = yes; then
9562         
9563         cat >> confdefs.h <<\EOF
9564 #define HAVE_STRUCT_UTMP_UT_HOST 1
9565 EOF
9566
9567         
9568 fi
9569
9570
9571
9572
9573 echo $ac_n "checking for ut_id in struct utmp""... $ac_c" 1>&6
9574 echo "configure:9575: checking for ut_id in struct utmp" >&5
9575 if eval "test \"`echo '$''{'ac_cv_type_struct_utmp_ut_id'+set}'`\" = set"; then
9576   echo $ac_n "(cached) $ac_c" 1>&6
9577 else
9578   
9579 cat > conftest.$ac_ext <<EOF
9580 #line 9581 "configure"
9581 #include "confdefs.h"
9582 #include <sys/types.h>
9583  #include <utmp.h>
9584 int main() {
9585 struct utmp x; x.ut_id;
9586 ; return 0; }
9587 EOF
9588 if { (eval echo configure:9589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9589   rm -rf conftest*
9590   ac_cv_type_struct_utmp_ut_id=yes
9591 else
9592   echo "configure: failed program was:" >&5
9593   cat conftest.$ac_ext >&5
9594   rm -rf conftest*
9595   ac_cv_type_struct_utmp_ut_id=no
9596 fi
9597 rm -f conftest*
9598 fi
9599
9600 echo "$ac_t""$ac_cv_type_struct_utmp_ut_id" 1>&6
9601 if test "$ac_cv_type_struct_utmp_ut_id" = yes; then
9602         
9603         cat >> confdefs.h <<\EOF
9604 #define HAVE_STRUCT_UTMP_UT_ID 1
9605 EOF
9606
9607         
9608 fi
9609
9610
9611
9612
9613 echo $ac_n "checking for ut_pid in struct utmp""... $ac_c" 1>&6
9614 echo "configure:9615: checking for ut_pid in struct utmp" >&5
9615 if eval "test \"`echo '$''{'ac_cv_type_struct_utmp_ut_pid'+set}'`\" = set"; then
9616   echo $ac_n "(cached) $ac_c" 1>&6
9617 else
9618   
9619 cat > conftest.$ac_ext <<EOF
9620 #line 9621 "configure"
9621 #include "confdefs.h"
9622 #include <sys/types.h>
9623  #include <utmp.h>
9624 int main() {
9625 struct utmp x; x.ut_pid;
9626 ; return 0; }
9627 EOF
9628 if { (eval echo configure:9629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9629   rm -rf conftest*
9630   ac_cv_type_struct_utmp_ut_pid=yes
9631 else
9632   echo "configure: failed program was:" >&5
9633   cat conftest.$ac_ext >&5
9634   rm -rf conftest*
9635   ac_cv_type_struct_utmp_ut_pid=no
9636 fi
9637 rm -f conftest*
9638 fi
9639
9640 echo "$ac_t""$ac_cv_type_struct_utmp_ut_pid" 1>&6
9641 if test "$ac_cv_type_struct_utmp_ut_pid" = yes; then
9642         
9643         cat >> confdefs.h <<\EOF
9644 #define HAVE_STRUCT_UTMP_UT_PID 1
9645 EOF
9646
9647         
9648 fi
9649
9650
9651
9652
9653 echo $ac_n "checking for ut_type in struct utmp""... $ac_c" 1>&6
9654 echo "configure:9655: checking for ut_type in struct utmp" >&5
9655 if eval "test \"`echo '$''{'ac_cv_type_struct_utmp_ut_type'+set}'`\" = set"; then
9656   echo $ac_n "(cached) $ac_c" 1>&6
9657 else
9658   
9659 cat > conftest.$ac_ext <<EOF
9660 #line 9661 "configure"
9661 #include "confdefs.h"
9662 #include <sys/types.h>
9663  #include <utmp.h>
9664 int main() {
9665 struct utmp x; x.ut_type;
9666 ; return 0; }
9667 EOF
9668 if { (eval echo configure:9669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9669   rm -rf conftest*
9670   ac_cv_type_struct_utmp_ut_type=yes
9671 else
9672   echo "configure: failed program was:" >&5
9673   cat conftest.$ac_ext >&5
9674   rm -rf conftest*
9675   ac_cv_type_struct_utmp_ut_type=no
9676 fi
9677 rm -f conftest*
9678 fi
9679
9680 echo "$ac_t""$ac_cv_type_struct_utmp_ut_type" 1>&6
9681 if test "$ac_cv_type_struct_utmp_ut_type" = yes; then
9682         
9683         cat >> confdefs.h <<\EOF
9684 #define HAVE_STRUCT_UTMP_UT_TYPE 1
9685 EOF
9686
9687         
9688 fi
9689
9690
9691
9692
9693 echo $ac_n "checking for ut_user in struct utmp""... $ac_c" 1>&6
9694 echo "configure:9695: checking for ut_user in struct utmp" >&5
9695 if eval "test \"`echo '$''{'ac_cv_type_struct_utmp_ut_user'+set}'`\" = set"; then
9696   echo $ac_n "(cached) $ac_c" 1>&6
9697 else
9698   
9699 cat > conftest.$ac_ext <<EOF
9700 #line 9701 "configure"
9701 #include "confdefs.h"
9702 #include <sys/types.h>
9703  #include <utmp.h>
9704 int main() {
9705 struct utmp x; x.ut_user;
9706 ; return 0; }
9707 EOF
9708 if { (eval echo configure:9709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9709   rm -rf conftest*
9710   ac_cv_type_struct_utmp_ut_user=yes
9711 else
9712   echo "configure: failed program was:" >&5
9713   cat conftest.$ac_ext >&5
9714   rm -rf conftest*
9715   ac_cv_type_struct_utmp_ut_user=no
9716 fi
9717 rm -f conftest*
9718 fi
9719
9720 echo "$ac_t""$ac_cv_type_struct_utmp_ut_user" 1>&6
9721 if test "$ac_cv_type_struct_utmp_ut_user" = yes; then
9722         
9723         cat >> confdefs.h <<\EOF
9724 #define HAVE_STRUCT_UTMP_UT_USER 1
9725 EOF
9726
9727         
9728 fi
9729
9730
9731
9732
9733 echo $ac_n "checking for ut_exit in struct utmpx""... $ac_c" 1>&6
9734 echo "configure:9735: checking for ut_exit in struct utmpx" >&5
9735 if eval "test \"`echo '$''{'ac_cv_type_struct_utmpx_ut_exit'+set}'`\" = set"; then
9736   echo $ac_n "(cached) $ac_c" 1>&6
9737 else
9738   
9739 cat > conftest.$ac_ext <<EOF
9740 #line 9741 "configure"
9741 #include "confdefs.h"
9742 #include <sys/types.h>
9743  #include <utmp.h>
9744 int main() {
9745 struct utmpx x; x.ut_exit;
9746 ; return 0; }
9747 EOF
9748 if { (eval echo configure:9749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9749   rm -rf conftest*
9750   ac_cv_type_struct_utmpx_ut_exit=yes
9751 else
9752   echo "configure: failed program was:" >&5
9753   cat conftest.$ac_ext >&5
9754   rm -rf conftest*
9755   ac_cv_type_struct_utmpx_ut_exit=no
9756 fi
9757 rm -f conftest*
9758 fi
9759
9760 echo "$ac_t""$ac_cv_type_struct_utmpx_ut_exit" 1>&6
9761 if test "$ac_cv_type_struct_utmpx_ut_exit" = yes; then
9762         
9763         cat >> confdefs.h <<\EOF
9764 #define HAVE_STRUCT_UTMPX_UT_EXIT 1
9765 EOF
9766
9767         
9768 fi
9769
9770
9771
9772
9773 echo $ac_n "checking for ut_syslen in struct utmpx""... $ac_c" 1>&6
9774 echo "configure:9775: checking for ut_syslen in struct utmpx" >&5
9775 if eval "test \"`echo '$''{'ac_cv_type_struct_utmpx_ut_syslen'+set}'`\" = set"; then
9776   echo $ac_n "(cached) $ac_c" 1>&6
9777 else
9778   
9779 cat > conftest.$ac_ext <<EOF
9780 #line 9781 "configure"
9781 #include "confdefs.h"
9782 #include <sys/types.h>
9783  #include <utmp.h>
9784 int main() {
9785 struct utmpx x; x.ut_syslen;
9786 ; return 0; }
9787 EOF
9788 if { (eval echo configure:9789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9789   rm -rf conftest*
9790   ac_cv_type_struct_utmpx_ut_syslen=yes
9791 else
9792   echo "configure: failed program was:" >&5
9793   cat conftest.$ac_ext >&5
9794   rm -rf conftest*
9795   ac_cv_type_struct_utmpx_ut_syslen=no
9796 fi
9797 rm -f conftest*
9798 fi
9799
9800 echo "$ac_t""$ac_cv_type_struct_utmpx_ut_syslen" 1>&6
9801 if test "$ac_cv_type_struct_utmpx_ut_syslen" = yes; then
9802         
9803         cat >> confdefs.h <<\EOF
9804 #define HAVE_STRUCT_UTMPX_UT_SYSLEN 1
9805 EOF
9806
9807         
9808 fi
9809
9810
9811
9812
9813
9814
9815 echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
9816 echo "configure:9817: checking for tm_gmtoff in struct tm" >&5
9817 if eval "test \"`echo '$''{'ac_cv_type_struct_tm_tm_gmtoff'+set}'`\" = set"; then
9818   echo $ac_n "(cached) $ac_c" 1>&6
9819 else
9820   
9821 cat > conftest.$ac_ext <<EOF
9822 #line 9823 "configure"
9823 #include "confdefs.h"
9824 #include <time.h>
9825 int main() {
9826 struct tm x; x.tm_gmtoff;
9827 ; return 0; }
9828 EOF
9829 if { (eval echo configure:9830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9830   rm -rf conftest*
9831   ac_cv_type_struct_tm_tm_gmtoff=yes
9832 else
9833   echo "configure: failed program was:" >&5
9834   cat conftest.$ac_ext >&5
9835   rm -rf conftest*
9836   ac_cv_type_struct_tm_tm_gmtoff=no
9837 fi
9838 rm -f conftest*
9839 fi
9840
9841 echo "$ac_t""$ac_cv_type_struct_tm_tm_gmtoff" 1>&6
9842 if test "$ac_cv_type_struct_tm_tm_gmtoff" = yes; then
9843         
9844         cat >> confdefs.h <<\EOF
9845 #define HAVE_STRUCT_TM_TM_GMTOFF 1
9846 EOF
9847
9848         
9849 fi
9850
9851
9852
9853
9854 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
9855 echo "configure:9856: checking for tm_zone in struct tm" >&5
9856 if eval "test \"`echo '$''{'ac_cv_type_struct_tm_tm_zone'+set}'`\" = set"; then
9857   echo $ac_n "(cached) $ac_c" 1>&6
9858 else
9859   
9860 cat > conftest.$ac_ext <<EOF
9861 #line 9862 "configure"
9862 #include "confdefs.h"
9863 #include <time.h>
9864 int main() {
9865 struct tm x; x.tm_zone;
9866 ; return 0; }
9867 EOF
9868 if { (eval echo configure:9869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9869   rm -rf conftest*
9870   ac_cv_type_struct_tm_tm_zone=yes
9871 else
9872   echo "configure: failed program was:" >&5
9873   cat conftest.$ac_ext >&5
9874   rm -rf conftest*
9875   ac_cv_type_struct_tm_tm_zone=no
9876 fi
9877 rm -f conftest*
9878 fi
9879
9880 echo "$ac_t""$ac_cv_type_struct_tm_tm_zone" 1>&6
9881 if test "$ac_cv_type_struct_tm_tm_zone" = yes; then
9882         
9883         cat >> confdefs.h <<\EOF
9884 #define HAVE_STRUCT_TM_TM_ZONE 1
9885 EOF
9886
9887         
9888 fi
9889
9890
9891
9892
9893
9894 echo $ac_n "checking for timezone""... $ac_c" 1>&6
9895 echo "configure:9896: checking for timezone" >&5
9896 if eval "test \"`echo '$''{'ac_cv_var_timezone'+set}'`\" = set"; then
9897   echo $ac_n "(cached) $ac_c" 1>&6
9898 else
9899   
9900 cat > conftest.$ac_ext <<EOF
9901 #line 9902 "configure"
9902 #include "confdefs.h"
9903 extern int timezone;
9904 int foo() { return timezone; }
9905 int main() {
9906 foo()
9907 ; return 0; }
9908 EOF
9909 if { (eval echo configure:9910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9910   rm -rf conftest*
9911   ac_cv_var_timezone=yes
9912 else
9913   echo "configure: failed program was:" >&5
9914   cat conftest.$ac_ext >&5
9915   rm -rf conftest*
9916   ac_cv_var_timezone=no
9917 fi
9918 rm -f conftest*
9919
9920 fi
9921
9922
9923
9924 echo "$ac_t""`eval echo \\$ac_cv_var_timezone`" 1>&6
9925 if test `eval echo \\$ac_cv_var_timezone` = yes; then
9926         cat >> confdefs.h <<EOF
9927 #define HAVE_TIMEZONE 1
9928 EOF
9929
9930         
9931 echo $ac_n "checking if timezone is properly declared""... $ac_c" 1>&6
9932 echo "configure:9933: checking if timezone is properly declared" >&5
9933 if eval "test \"`echo '$''{'ac_cv_var_timezone_declaration'+set}'`\" = set"; then
9934   echo $ac_n "(cached) $ac_c" 1>&6
9935 else
9936   
9937 cat > conftest.$ac_ext <<EOF
9938 #line 9939 "configure"
9939 #include "confdefs.h"
9940 #include <time.h>
9941 extern struct { int foo; } timezone;
9942 int main() {
9943 timezone.foo = 1;
9944 ; return 0; }
9945 EOF
9946 if { (eval echo configure:9947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9947   rm -rf conftest*
9948   eval "ac_cv_var_timezone_declaration=no"
9949 else
9950   echo "configure: failed program was:" >&5
9951   cat conftest.$ac_ext >&5
9952   rm -rf conftest*
9953   eval "ac_cv_var_timezone_declaration=yes"
9954 fi
9955 rm -f conftest*
9956
9957 fi
9958
9959
9960
9961
9962 echo "$ac_t""$ac_cv_var_timezone_declaration" 1>&6
9963 if eval "test \"\$ac_cv_var_timezone_declaration\" = yes"; then
9964         cat >> confdefs.h <<\EOF
9965 #define HAVE_TIMEZONE_DECLARATION 1
9966 EOF
9967
9968 fi
9969
9970
9971 fi
9972
9973
9974
9975
9976 cv=`echo "sa_family_t" | sed 'y%./+- %__p__%'`
9977 echo $ac_n "checking for sa_family_t""... $ac_c" 1>&6
9978 echo "configure:9979: checking for sa_family_t" >&5
9979 if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
9980   echo $ac_n "(cached) $ac_c" 1>&6
9981 else
9982   cat > conftest.$ac_ext <<EOF
9983 #line 9984 "configure"
9984 #include "confdefs.h"
9985 #include <sys/types.h>
9986 #if STDC_HEADERS
9987 #include <stdlib.h>
9988 #include <stddef.h>
9989 #endif
9990 #include <sys/socket.h>
9991 int main() {
9992 sa_family_t foo;
9993 ; return 0; }
9994 EOF
9995 if { (eval echo configure:9996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9996   rm -rf conftest*
9997   eval "ac_cv_type_$cv=yes"
9998 else
9999   echo "configure: failed program was:" >&5
10000   cat conftest.$ac_ext >&5
10001   rm -rf conftest*
10002   eval "ac_cv_type_$cv=no"
10003 fi
10004 rm -f conftest*
10005 fi
10006 echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
10007 if test `eval echo \\$ac_cv_type_$cv` = yes; then
10008   ac_tr_hdr=HAVE_`echo sa_family_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
10009
10010 : << END
10011 @@@funcs="$funcs sa_family_t"@@@
10012 END
10013
10014   cat >> confdefs.h <<EOF
10015 #define $ac_tr_hdr 1
10016 EOF
10017
10018 fi
10019
10020
10021
10022 cv=`echo "socklen_t" | sed 'y%./+- %__p__%'`
10023 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
10024 echo "configure:10025: checking for socklen_t" >&5
10025 if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
10026   echo $ac_n "(cached) $ac_c" 1>&6
10027 else
10028   cat > conftest.$ac_ext <<EOF
10029 #line 10030 "configure"
10030 #include "confdefs.h"
10031 #include <sys/types.h>
10032 #if STDC_HEADERS
10033 #include <stdlib.h>
10034 #include <stddef.h>
10035 #endif
10036 #include <sys/socket.h>
10037 int main() {
10038 socklen_t foo;
10039 ; return 0; }
10040 EOF
10041 if { (eval echo configure:10042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10042   rm -rf conftest*
10043   eval "ac_cv_type_$cv=yes"
10044 else
10045   echo "configure: failed program was:" >&5
10046   cat conftest.$ac_ext >&5
10047   rm -rf conftest*
10048   eval "ac_cv_type_$cv=no"
10049 fi
10050 rm -f conftest*
10051 fi
10052 echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
10053 if test `eval echo \\$ac_cv_type_$cv` = yes; then
10054   ac_tr_hdr=HAVE_`echo socklen_t | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
10055
10056 : << END
10057 @@@funcs="$funcs socklen_t"@@@
10058 END
10059
10060   cat >> confdefs.h <<EOF
10061 #define $ac_tr_hdr 1
10062 EOF
10063
10064 fi
10065
10066  
10067
10068 cv=`echo "struct sockaddr_storage" | sed 'y%./+- %__p__%'`
10069 echo $ac_n "checking for struct sockaddr_storage""... $ac_c" 1>&6
10070 echo "configure:10071: checking for struct sockaddr_storage" >&5
10071 if eval "test \"`echo '$''{'ac_cv_type_$cv'+set}'`\" = set"; then
10072   echo $ac_n "(cached) $ac_c" 1>&6
10073 else
10074   cat > conftest.$ac_ext <<EOF
10075 #line 10076 "configure"
10076 #include "confdefs.h"
10077 #include <sys/types.h>
10078 #if STDC_HEADERS
10079 #include <stdlib.h>
10080 #include <stddef.h>
10081 #endif
10082 #include <sys/socket.h>
10083 int main() {
10084 struct sockaddr_storage foo;
10085 ; return 0; }
10086 EOF
10087 if { (eval echo configure:10088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10088   rm -rf conftest*
10089   eval "ac_cv_type_$cv=yes"
10090 else
10091   echo "configure: failed program was:" >&5
10092   cat conftest.$ac_ext >&5
10093   rm -rf conftest*
10094   eval "ac_cv_type_$cv=no"
10095 fi
10096 rm -f conftest*
10097 fi
10098 echo "$ac_t""`eval echo \\$ac_cv_type_$cv`" 1>&6
10099 if test `eval echo \\$ac_cv_type_$cv` = yes; then
10100   ac_tr_hdr=HAVE_`echo struct sockaddr_storage | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
10101
10102 : << END
10103 @@@funcs="$funcs struct_sockaddr_storage"@@@
10104 END
10105
10106   cat >> confdefs.h <<EOF
10107 #define $ac_tr_hdr 1
10108 EOF
10109
10110 fi
10111
10112
10113
10114 echo $ac_n "checking for struct spwd""... $ac_c" 1>&6
10115 echo "configure:10116: checking for struct spwd" >&5
10116 if eval "test \"`echo '$''{'ac_cv_struct_spwd'+set}'`\" = set"; then
10117   echo $ac_n "(cached) $ac_c" 1>&6
10118 else
10119   
10120 cat > conftest.$ac_ext <<EOF
10121 #line 10122 "configure"
10122 #include "confdefs.h"
10123 #include <pwd.h>
10124 #ifdef HAVE_SHADOW_H
10125 #include <shadow.h>
10126 #endif
10127 int main() {
10128 struct spwd foo;
10129 ; return 0; }
10130 EOF
10131 if { (eval echo configure:10132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10132   rm -rf conftest*
10133   ac_cv_struct_spwd=yes
10134 else
10135   echo "configure: failed program was:" >&5
10136   cat conftest.$ac_ext >&5
10137   rm -rf conftest*
10138   ac_cv_struct_spwd=no
10139 fi
10140 rm -f conftest*
10141
10142 fi
10143
10144 echo "$ac_t""$ac_cv_struct_spwd" 1>&6
10145
10146 if test "$ac_cv_struct_spwd" = "yes"; then
10147   cat >> confdefs.h <<\EOF
10148 #define HAVE_STRUCT_SPWD 1
10149 EOF
10150
10151 fi
10152
10153
10154 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
10155 echo "configure:10156: checking for st_blksize in struct stat" >&5
10156 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
10157   echo $ac_n "(cached) $ac_c" 1>&6
10158 else
10159   cat > conftest.$ac_ext <<EOF
10160 #line 10161 "configure"
10161 #include "confdefs.h"
10162 #include <sys/types.h>
10163 #include <sys/stat.h>
10164 int main() {
10165 struct stat s; s.st_blksize;
10166 ; return 0; }
10167 EOF
10168 if { (eval echo configure:10169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10169   rm -rf conftest*
10170   ac_cv_struct_st_blksize=yes
10171 else
10172   echo "configure: failed program was:" >&5
10173   cat conftest.$ac_ext >&5
10174   rm -rf conftest*
10175   ac_cv_struct_st_blksize=no
10176 fi
10177 rm -f conftest*
10178 fi
10179
10180 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
10181 if test $ac_cv_struct_st_blksize = yes; then
10182   cat >> confdefs.h <<\EOF
10183 #define HAVE_ST_BLKSIZE 1
10184 EOF
10185
10186 fi
10187
10188
10189
10190
10191 echo $ac_n "checking for struct winsize""... $ac_c" 1>&6
10192 echo "configure:10193: checking for struct winsize" >&5
10193 if eval "test \"`echo '$''{'ac_cv_struct_winsize'+set}'`\" = set"; then
10194   echo $ac_n "(cached) $ac_c" 1>&6
10195 else
10196   
10197 ac_cv_struct_winsize=no
10198 for i in sys/termios.h sys/ioctl.h; do
10199 cat > conftest.$ac_ext <<EOF
10200 #line 10201 "configure"
10201 #include "confdefs.h"
10202 #include <$i>
10203 EOF
10204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10205   egrep "struct[        ]*winsize" >/dev/null 2>&1; then
10206   rm -rf conftest*
10207   ac_cv_struct_winsize=yes; break
10208 fi
10209 rm -f conftest*
10210 done
10211
10212 fi
10213
10214 if test "$ac_cv_struct_winsize" = "yes"; then
10215   cat >> confdefs.h <<\EOF
10216 #define HAVE_STRUCT_WINSIZE 1
10217 EOF
10218
10219 fi
10220 echo "$ac_t""$ac_cv_struct_winsize" 1>&6
10221 cat > conftest.$ac_ext <<EOF
10222 #line 10223 "configure"
10223 #include "confdefs.h"
10224 #include <termios.h>
10225 EOF
10226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10227   egrep "ws_xpixel" >/dev/null 2>&1; then
10228   rm -rf conftest*
10229   cat >> confdefs.h <<\EOF
10230 #define HAVE_WS_XPIXEL 1
10231 EOF
10232
10233 fi
10234 rm -f conftest*
10235
10236 cat > conftest.$ac_ext <<EOF
10237 #line 10238 "configure"
10238 #include "confdefs.h"
10239 #include <termios.h>
10240 EOF
10241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10242   egrep "ws_ypixel" >/dev/null 2>&1; then
10243   rm -rf conftest*
10244   cat >> confdefs.h <<\EOF
10245 #define HAVE_WS_YPIXEL 1
10246 EOF
10247
10248 fi
10249 rm -f conftest*
10250
10251
10252
10253
10254 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
10255 echo "configure:10256: checking for pid_t" >&5
10256 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
10257   echo $ac_n "(cached) $ac_c" 1>&6
10258 else
10259   cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 #include <sys/types.h>
10263 #if STDC_HEADERS
10264 #include <stdlib.h>
10265 #include <stddef.h>
10266 #endif
10267 EOF
10268 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10269   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10270   rm -rf conftest*
10271   ac_cv_type_pid_t=yes
10272 else
10273   rm -rf conftest*
10274   ac_cv_type_pid_t=no
10275 fi
10276 rm -f conftest*
10277
10278 fi
10279 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
10280 if test $ac_cv_type_pid_t = no; then
10281   cat >> confdefs.h <<\EOF
10282 #define pid_t int
10283 EOF
10284
10285 fi
10286
10287 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
10288 echo "configure:10289: checking for uid_t in sys/types.h" >&5
10289 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
10290   echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292   cat > conftest.$ac_ext <<EOF
10293 #line 10294 "configure"
10294 #include "confdefs.h"
10295 #include <sys/types.h>
10296 EOF
10297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10298   egrep "uid_t" >/dev/null 2>&1; then
10299   rm -rf conftest*
10300   ac_cv_type_uid_t=yes
10301 else
10302   rm -rf conftest*
10303   ac_cv_type_uid_t=no
10304 fi
10305 rm -f conftest*
10306
10307 fi
10308
10309 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
10310 if test $ac_cv_type_uid_t = no; then
10311   cat >> confdefs.h <<\EOF
10312 #define uid_t int
10313 EOF
10314
10315   cat >> confdefs.h <<\EOF
10316 #define gid_t int
10317 EOF
10318
10319 fi
10320
10321 echo $ac_n "checking for off_t""... $ac_c" 1>&6
10322 echo "configure:10323: checking for off_t" >&5
10323 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
10324   echo $ac_n "(cached) $ac_c" 1>&6
10325 else
10326   cat > conftest.$ac_ext <<EOF
10327 #line 10328 "configure"
10328 #include "confdefs.h"
10329 #include <sys/types.h>
10330 #if STDC_HEADERS
10331 #include <stdlib.h>
10332 #include <stddef.h>
10333 #endif
10334 EOF
10335 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10336   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10337   rm -rf conftest*
10338   ac_cv_type_off_t=yes
10339 else
10340   rm -rf conftest*
10341   ac_cv_type_off_t=no
10342 fi
10343 rm -f conftest*
10344
10345 fi
10346 echo "$ac_t""$ac_cv_type_off_t" 1>&6
10347 if test $ac_cv_type_off_t = no; then
10348   cat >> confdefs.h <<\EOF
10349 #define off_t long
10350 EOF
10351
10352 fi
10353
10354 echo $ac_n "checking for size_t""... $ac_c" 1>&6
10355 echo "configure:10356: checking for size_t" >&5
10356 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
10357   echo $ac_n "(cached) $ac_c" 1>&6
10358 else
10359   cat > conftest.$ac_ext <<EOF
10360 #line 10361 "configure"
10361 #include "confdefs.h"
10362 #include <sys/types.h>
10363 #if STDC_HEADERS
10364 #include <stdlib.h>
10365 #include <stddef.h>
10366 #endif
10367 EOF
10368 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10369   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10370   rm -rf conftest*
10371   ac_cv_type_size_t=yes
10372 else
10373   rm -rf conftest*
10374   ac_cv_type_size_t=no
10375 fi
10376 rm -f conftest*
10377
10378 fi
10379 echo "$ac_t""$ac_cv_type_size_t" 1>&6
10380 if test $ac_cv_type_size_t = no; then
10381   cat >> confdefs.h <<\EOF
10382 #define size_t unsigned
10383 EOF
10384
10385 fi
10386
10387
10388 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
10389 echo "configure:10390: checking for ssize_t" >&5
10390 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
10391   echo $ac_n "(cached) $ac_c" 1>&6
10392 else
10393   cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 #include <sys/types.h>
10397 #if STDC_HEADERS
10398 #include <stdlib.h>
10399 #include <stddef.h>
10400 #endif
10401
10402 #ifdef HAVE_UNISTD_H
10403 #include <unistd.h>
10404 #endif
10405 EOF
10406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10407   egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10408   rm -rf conftest*
10409   ac_cv_type_ssize_t=yes
10410 else
10411   rm -rf conftest*
10412   ac_cv_type_ssize_t=no
10413 fi
10414 rm -f conftest*
10415
10416 fi
10417 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
10418 if test $ac_cv_type_ssize_t = no; then
10419   cat >> confdefs.h <<\EOF
10420 #define ssize_t int
10421 EOF
10422
10423 fi
10424
10425
10426 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
10427 echo "configure:10428: checking for sig_atomic_t" >&5
10428 if eval "test \"`echo '$''{'ac_cv_type_sig_atomic_t'+set}'`\" = set"; then
10429   echo $ac_n "(cached) $ac_c" 1>&6
10430 else
10431   cat > conftest.$ac_ext <<EOF
10432 #line 10433 "configure"
10433 #include "confdefs.h"
10434 #include <sys/types.h>
10435 #if STDC_HEADERS
10436 #include <stdlib.h>
10437 #include <stddef.h>
10438 #endif
10439 #include <signal.h>
10440 EOF
10441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10442   egrep "sig_atomic_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
10443   rm -rf conftest*
10444   ac_cv_type_sig_atomic_t=yes
10445 else
10446   rm -rf conftest*
10447   ac_cv_type_sig_atomic_t=no
10448 fi
10449 rm -f conftest*
10450
10451 fi
10452 echo "$ac_t""$ac_cv_type_sig_atomic_t" 1>&6
10453 if test $ac_cv_type_sig_atomic_t = no; then
10454   cat >> confdefs.h <<\EOF
10455 #define sig_atomic_t int
10456 EOF
10457
10458 fi
10459
10460
10461
10462 echo $ac_n "checking for broken sys/socket.h""... $ac_c" 1>&6
10463 echo "configure:10464: checking for broken sys/socket.h" >&5
10464 if eval "test \"`echo '$''{'krb_cv_header_sys_socket_h_broken'+set}'`\" = set"; then
10465   echo $ac_n "(cached) $ac_c" 1>&6
10466 else
10467   
10468 cat > conftest.$ac_ext <<EOF
10469 #line 10470 "configure"
10470 #include "confdefs.h"
10471 #include <sys/types.h>
10472 #include <sys/socket.h>
10473 #include <sys/socket.h>
10474 int main() {
10475
10476 ; return 0; }
10477 EOF
10478 if { (eval echo configure:10479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10479   rm -rf conftest*
10480   krb_cv_header_sys_socket_h_broken=no
10481 else
10482   echo "configure: failed program was:" >&5
10483   cat conftest.$ac_ext >&5
10484   rm -rf conftest*
10485   krb_cv_header_sys_socket_h_broken=yes
10486 fi
10487 rm -f conftest*
10488 fi
10489
10490 echo "$ac_t""$krb_cv_header_sys_socket_h_broken" 1>&6
10491
10492
10493
10494 echo $ac_n "checking for broken netdb.h""... $ac_c" 1>&6
10495 echo "configure:10496: checking for broken netdb.h" >&5
10496 if eval "test \"`echo '$''{'krb_cv_header_netdb_h_broken'+set}'`\" = set"; then
10497   echo $ac_n "(cached) $ac_c" 1>&6
10498 else
10499   
10500 cat > conftest.$ac_ext <<EOF
10501 #line 10502 "configure"
10502 #include "confdefs.h"
10503 #include <sys/types.h>
10504 #include <netdb.h>
10505 #include <netdb.h>
10506 int main() {
10507
10508 ; return 0; }
10509 EOF
10510 if { (eval echo configure:10511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10511   rm -rf conftest*
10512   krb_cv_header_netdb_h_broken=no
10513 else
10514   echo "configure: failed program was:" >&5
10515   cat conftest.$ac_ext >&5
10516   rm -rf conftest*
10517   krb_cv_header_netdb_h_broken=yes
10518 fi
10519 rm -f conftest*
10520 fi
10521
10522 echo "$ac_t""$krb_cv_header_netdb_h_broken" 1>&6
10523
10524 if test "$krb_cv_header_netdb_h_broken" = "yes"; then
10525   EXTRA_HEADERS="$EXTRA_HEADERS netdb.h"
10526 fi
10527
10528
10529
10530
10531 echo $ac_n "checking for sa_len in struct sockaddr""... $ac_c" 1>&6
10532 echo "configure:10533: checking for sa_len in struct sockaddr" >&5
10533 if eval "test \"`echo '$''{'ac_cv_type_struct_sockaddr_sa_len'+set}'`\" = set"; then
10534   echo $ac_n "(cached) $ac_c" 1>&6
10535 else
10536   
10537 cat > conftest.$ac_ext <<EOF
10538 #line 10539 "configure"
10539 #include "confdefs.h"
10540 #include <sys/types.h>
10541 #include <sys/socket.h>
10542 int main() {
10543 struct sockaddr x; x.sa_len;
10544 ; return 0; }
10545 EOF
10546 if { (eval echo configure:10547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10547   rm -rf conftest*
10548   ac_cv_type_struct_sockaddr_sa_len=yes
10549 else
10550   echo "configure: failed program was:" >&5
10551   cat conftest.$ac_ext >&5
10552   rm -rf conftest*
10553   ac_cv_type_struct_sockaddr_sa_len=no
10554 fi
10555 rm -f conftest*
10556 fi
10557
10558 echo "$ac_t""$ac_cv_type_struct_sockaddr_sa_len" 1>&6
10559 if test "$ac_cv_type_struct_sockaddr_sa_len" = yes; then
10560         
10561         cat >> confdefs.h <<\EOF
10562 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
10563 EOF
10564
10565         
10566 fi
10567
10568
10569
10570
10571 if test "$ac_cv_header_siad_h" = yes; then
10572
10573
10574 echo $ac_n "checking for ouid in SIAENTITY""... $ac_c" 1>&6
10575 echo "configure:10576: checking for ouid in SIAENTITY" >&5
10576 if eval "test \"`echo '$''{'ac_cv_type_siaentity_ouid'+set}'`\" = set"; then
10577   echo $ac_n "(cached) $ac_c" 1>&6
10578 else
10579   
10580 cat > conftest.$ac_ext <<EOF
10581 #line 10582 "configure"
10582 #include "confdefs.h"
10583 #include <siad.h>
10584 int main() {
10585 SIAENTITY x; x.ouid;
10586 ; return 0; }
10587 EOF
10588 if { (eval echo configure:10589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10589   rm -rf conftest*
10590   ac_cv_type_siaentity_ouid=yes
10591 else
10592   echo "configure: failed program was:" >&5
10593   cat conftest.$ac_ext >&5
10594   rm -rf conftest*
10595   ac_cv_type_siaentity_ouid=no
10596 fi
10597 rm -f conftest*
10598 fi
10599
10600 echo "$ac_t""$ac_cv_type_siaentity_ouid" 1>&6
10601 if test "$ac_cv_type_siaentity_ouid" = yes; then
10602         
10603         cat >> confdefs.h <<\EOF
10604 #define HAVE_SIAENTITY_OUID 1
10605 EOF
10606
10607         
10608 fi
10609
10610
10611 fi
10612
10613
10614 echo $ac_n "checking for getmsg""... $ac_c" 1>&6
10615 echo "configure:10616: checking for getmsg" >&5
10616 if eval "test \"`echo '$''{'ac_cv_func_getmsg'+set}'`\" = set"; then
10617   echo $ac_n "(cached) $ac_c" 1>&6
10618 else
10619   cat > conftest.$ac_ext <<EOF
10620 #line 10621 "configure"
10621 #include "confdefs.h"
10622 /* System header to define __stub macros and hopefully few prototypes,
10623     which can conflict with char getmsg(); below.  */
10624 #include <assert.h>
10625 /* Override any gcc2 internal prototype to avoid an error.  */
10626 /* We use char because int might match the return type of a gcc2
10627     builtin and then its argument prototype would still apply.  */
10628 char getmsg();
10629
10630 int main() {
10631
10632 /* The GNU C library defines this for functions which it implements
10633     to always fail with ENOSYS.  Some functions are actually named
10634     something starting with __ and the normal name is an alias.  */
10635 #if defined (__stub_getmsg) || defined (__stub___getmsg)
10636 choke me
10637 #else
10638 getmsg();
10639 #endif
10640
10641 ; return 0; }
10642 EOF
10643 if { (eval echo configure:10644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10644   rm -rf conftest*
10645   eval "ac_cv_func_getmsg=yes"
10646 else
10647   echo "configure: failed program was:" >&5
10648   cat conftest.$ac_ext >&5
10649   rm -rf conftest*
10650   eval "ac_cv_func_getmsg=no"
10651 fi
10652 rm -f conftest*
10653 fi
10654
10655 if eval "test \"`echo '$ac_cv_func_'getmsg`\" = yes"; then
10656   echo "$ac_t""yes" 1>&6
10657   :
10658 else
10659   echo "$ac_t""no" 1>&6
10660 fi
10661
10662
10663 if test "$ac_cv_func_getmsg" = "yes"; then
10664
10665 echo $ac_n "checking for working getmsg""... $ac_c" 1>&6
10666 echo "configure:10667: checking for working getmsg" >&5
10667 if eval "test \"`echo '$''{'ac_cv_func_getmsg_work'+set}'`\" = set"; then
10668   echo $ac_n "(cached) $ac_c" 1>&6
10669 else
10670   if test "$cross_compiling" = yes; then
10671   ac_cv_func_getmsg_work=no
10672 else
10673   cat > conftest.$ac_ext <<EOF
10674 #line 10675 "configure"
10675 #include "confdefs.h"
10676
10677 #include <stdio.h>
10678 #include <errno.h>
10679
10680 int main()
10681 {
10682   int ret;
10683   ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL);
10684   if(ret < 0 && errno == ENOSYS)
10685     return 1;
10686   return 0;
10687 }
10688
10689 EOF
10690 if { (eval echo configure:10691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10691 then
10692   ac_cv_func_getmsg_work=yes
10693 else
10694   echo "configure: failed program was:" >&5
10695   cat conftest.$ac_ext >&5
10696   rm -fr conftest*
10697   ac_cv_func_getmsg_work=no
10698 fi
10699 rm -fr conftest*
10700 fi
10701
10702 fi
10703
10704 echo "$ac_t""$ac_cv_func_getmsg_work" 1>&6
10705 test "$ac_cv_func_getmsg_work" = "yes" &&
10706 cat >> confdefs.h <<\EOF
10707 #define HAVE_GETMSG 1
10708 EOF
10709
10710
10711 fi
10712
10713
10714
10715
10716
10717
10718 echo $ac_n "checking for el_init""... $ac_c" 1>&6
10719 echo "configure:10720: checking for el_init" >&5
10720 if eval "test \"`echo '$''{'ac_cv_funclib_el_init'+set}'`\" = set"; then
10721   echo $ac_n "(cached) $ac_c" 1>&6
10722 else
10723   
10724 if eval "test \"\$ac_cv_func_el_init\" != yes" ; then
10725         ac_save_LIBS="$LIBS"
10726         for ac_lib in "" edit; do
10727                 if test -n "$ac_lib"; then 
10728                         ac_lib="-l$ac_lib"
10729                 else
10730                         ac_lib=""
10731                 fi
10732                 LIBS=" $ac_lib $LIB_tgetent $ac_save_LIBS"
10733                 cat > conftest.$ac_ext <<EOF
10734 #line 10735 "configure"
10735 #include "confdefs.h"
10736
10737 int main() {
10738 el_init()
10739 ; return 0; }
10740 EOF
10741 if { (eval echo configure:10742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10742   rm -rf conftest*
10743   eval "if test -n \"$ac_lib\";then ac_cv_funclib_el_init=$ac_lib; else ac_cv_funclib_el_init=yes; fi";break
10744 else
10745   echo "configure: failed program was:" >&5
10746   cat conftest.$ac_ext >&5
10747 fi
10748 rm -f conftest*
10749         done
10750         eval "ac_cv_funclib_el_init=\${ac_cv_funclib_el_init-no}"
10751         LIBS="$ac_save_LIBS"
10752 fi
10753
10754 fi
10755
10756
10757 eval "ac_res=\$ac_cv_funclib_el_init"
10758
10759 : << END
10760 @@@funcs="$funcs el_init"@@@
10761 @@@libs="$libs "" edit"@@@
10762 END
10763
10764 # el_init
10765 eval "ac_tr_func=HAVE_`echo el_init | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
10766 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
10767 eval "LIB_el_init=$ac_res"
10768
10769 case "$ac_res" in
10770         yes)
10771         eval "ac_cv_func_el_init=yes"
10772         eval "LIB_el_init="
10773         cat >> confdefs.h <<EOF
10774 #define $ac_tr_func 1
10775 EOF
10776
10777         echo "$ac_t""yes" 1>&6
10778         ;;
10779         no)
10780         eval "ac_cv_func_el_init=no"
10781         eval "LIB_el_init="
10782         echo "$ac_t""no" 1>&6
10783         ;;
10784         *)
10785         eval "ac_cv_func_el_init=yes"
10786         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
10787         cat >> confdefs.h <<EOF
10788 #define $ac_tr_func 1
10789 EOF
10790
10791         cat >> confdefs.h <<EOF
10792 #define $ac_tr_lib 1
10793 EOF
10794
10795         echo "$ac_t""yes, in $ac_res" 1>&6
10796         ;;
10797 esac
10798
10799
10800 if test "$ac_cv_func_el_init" = yes ; then
10801         echo $ac_n "checking for four argument el_init""... $ac_c" 1>&6
10802 echo "configure:10803: checking for four argument el_init" >&5
10803 if eval "test \"`echo '$''{'ac_cv_func_el_init_four'+set}'`\" = set"; then
10804   echo $ac_n "(cached) $ac_c" 1>&6
10805 else
10806   
10807                 cat > conftest.$ac_ext <<EOF
10808 #line 10809 "configure"
10809 #include "confdefs.h"
10810 #include <stdio.h>
10811                         #include <histedit.h>
10812 int main() {
10813 el_init("", NULL, NULL, NULL);
10814 ; return 0; }
10815 EOF
10816 if { (eval echo configure:10817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10817   rm -rf conftest*
10818   ac_cv_func_el_init_four=yes
10819 else
10820   echo "configure: failed program was:" >&5
10821   cat conftest.$ac_ext >&5
10822   rm -rf conftest*
10823   ac_cv_func_el_init_four=no
10824 fi
10825 rm -f conftest*
10826 fi
10827
10828 echo "$ac_t""$ac_cv_func_el_init_four" 1>&6
10829         if test "$ac_cv_func_el_init_four" = yes; then
10830                 cat >> confdefs.h <<\EOF
10831 #define HAVE_FOUR_VALUED_EL_INIT 1
10832 EOF
10833
10834         fi
10835 fi
10836
10837
10838 save_LIBS="$LIBS"
10839 LIBS="$LIB_tgetent $LIBS"
10840
10841
10842
10843 echo $ac_n "checking for readline""... $ac_c" 1>&6
10844 echo "configure:10845: checking for readline" >&5
10845 if eval "test \"`echo '$''{'ac_cv_funclib_readline'+set}'`\" = set"; then
10846   echo $ac_n "(cached) $ac_c" 1>&6
10847 else
10848   
10849 if eval "test \"\$ac_cv_func_readline\" != yes" ; then
10850         ac_save_LIBS="$LIBS"
10851         for ac_lib in "" edit readline; do
10852                 if test -n "$ac_lib"; then 
10853                         ac_lib="-l$ac_lib"
10854                 else
10855                         ac_lib=""
10856                 fi
10857                 LIBS=" $ac_lib  $ac_save_LIBS"
10858                 cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861
10862 int main() {
10863 readline()
10864 ; return 0; }
10865 EOF
10866 if { (eval echo configure:10867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10867   rm -rf conftest*
10868   eval "if test -n \"$ac_lib\";then ac_cv_funclib_readline=$ac_lib; else ac_cv_funclib_readline=yes; fi";break
10869 else
10870   echo "configure: failed program was:" >&5
10871   cat conftest.$ac_ext >&5
10872 fi
10873 rm -f conftest*
10874         done
10875         eval "ac_cv_funclib_readline=\${ac_cv_funclib_readline-no}"
10876         LIBS="$ac_save_LIBS"
10877 fi
10878
10879 fi
10880
10881
10882 eval "ac_res=\$ac_cv_funclib_readline"
10883
10884 : << END
10885 @@@funcs="$funcs readline"@@@
10886 @@@libs="$libs "" edit readline"@@@
10887 END
10888
10889 # readline
10890 eval "ac_tr_func=HAVE_`echo readline | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
10891 eval "ac_tr_lib=HAVE_LIB`echo $ac_res | sed -e 's/-l//' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
10892 eval "LIB_readline=$ac_res"
10893
10894 case "$ac_res" in
10895         yes)
10896         eval "ac_cv_func_readline=yes"
10897         eval "LIB_readline="
10898         cat >> confdefs.h <<EOF
10899 #define $ac_tr_func 1
10900 EOF
10901
10902         echo "$ac_t""yes" 1>&6
10903         ;;
10904         no)
10905         eval "ac_cv_func_readline=no"
10906         eval "LIB_readline="
10907         echo "$ac_t""no" 1>&6
10908         ;;
10909         *)
10910         eval "ac_cv_func_readline=yes"
10911         eval "ac_cv_lib_`echo "$ac_res" | sed 's/-l//'`=yes"
10912         cat >> confdefs.h <<EOF
10913 #define $ac_tr_func 1
10914 EOF
10915
10916         cat >> confdefs.h <<EOF
10917 #define $ac_tr_lib 1
10918 EOF
10919
10920         echo "$ac_t""yes, in $ac_res" 1>&6
10921         ;;
10922 esac
10923
10924
10925 LIBS="$save_LIBS"
10926 el_yes="# "
10927 if test "$with_readline" -a "$with_readline" != "no"; then
10928         :
10929 elif test "$ac_cv_func_readline" = yes; then
10930         INCLUDE_readline=
10931 elif test "$ac_cv_func_el_init" = yes; then
10932         el_yes=
10933         LIB_readline="-L\$(top_builddir)/lib/editline -lel_compat $LIB_el_init"
10934         INCLUDE_readline='-I$(top_srcdir)/lib/editline'
10935 else
10936         LIB_readline='-L$(top_builddir)/lib/editline -leditline'
10937         INCLUDE_readline='-I$(top_srcdir)/lib/editline'
10938 fi
10939 LIB_readline="$LIB_readline \$(LIB_tgetent)"
10940 cat >> confdefs.h <<\EOF
10941 #define HAVE_READLINE 1
10942 EOF
10943
10944
10945
10946
10947
10948 cat >> confdefs.h <<\EOF
10949 #define AUTHENTICATION 1
10950 EOF
10951 cat >> confdefs.h <<\EOF
10952 #define KRB4 1
10953 EOF
10954 cat >> confdefs.h <<\EOF
10955 #define ENCRYPTION 1
10956 EOF
10957 cat >> confdefs.h <<\EOF
10958 #define DES_ENCRYPTION 1
10959 EOF
10960 cat >> confdefs.h <<\EOF
10961 #define DIAGNOSTICS 1
10962 EOF
10963 cat >> confdefs.h <<\EOF
10964 #define OLD_ENVIRON 1
10965 EOF
10966
10967 # Simple test for streamspty, based on the existance of getmsg(), alas
10968 # this breaks on SunOS4 which have streams but BSD-like ptys
10969 #
10970 # And also something wierd has happend with dec-osf1, fallback to bsd-ptys
10971
10972 echo $ac_n "checking for streamspty""... $ac_c" 1>&6
10973 echo "configure:10974: checking for streamspty" >&5
10974 case "`uname -sr`" in
10975 SunOS\ 4*|OSF1*|IRIX\ 4*|HP-UX\ ?.1[01].*)
10976         krb_cv_sys_streamspty=no
10977         ;;
10978 AIX*)
10979         os_rel=`uname -v`.`uname -r`
10980         if expr "$os_rel" : "3*" >/dev/null 2>&1; then
10981                 krb_cv_sys_streamspty=no
10982         else
10983                 krb_cv_sys_streamspty="$ac_cv_func_getmsg_work"
10984         fi
10985         ;;
10986 *)
10987         krb_cv_sys_streamspty="$ac_cv_func_getmsg_work"
10988         ;;
10989 esac
10990 if test "$krb_cv_sys_streamspty" = yes; then
10991         cat >> confdefs.h <<\EOF
10992 #define STREAMSPTY 1
10993 EOF
10994
10995 fi
10996 echo "$ac_t""$krb_cv_sys_streamspty" 1>&6
10997
10998 echo $ac_n "checking if /bin/ls takes -A""... $ac_c" 1>&6
10999 echo "configure:11000: checking if /bin/ls takes -A" >&5
11000 if /bin/ls -A > /dev/null 2>&1 ;then
11001         cat >> confdefs.h <<\EOF
11002 #define HAVE_LS_A 1
11003 EOF
11004
11005         krb_ls_a=yes
11006 else
11007         krb_ls_a=no
11008 fi
11009 echo "$ac_t""$krb_ls_a" 1>&6
11010         
11011 echo $ac_n "checking for suffix of preformatted manual pages""... $ac_c" 1>&6
11012 echo "configure:11013: checking for suffix of preformatted manual pages" >&5
11013 if eval "test \"`echo '$''{'krb_cv_sys_cat_suffix'+set}'`\" = set"; then
11014   echo $ac_n "(cached) $ac_c" 1>&6
11015 else
11016   if grep _version /etc/man.conf > /dev/null 2>&1; then
11017         krb_cv_sys_cat_suffix=0
11018 else
11019         krb_cv_sys_cat_suffix=number
11020 fi
11021 fi
11022
11023 echo "$ac_t""$krb_cv_sys_cat_suffix" 1>&6
11024 if test "$krb_cv_sys_cat_suffix" = number; then
11025                 CATSUFFIX='$$s'
11026 else
11027                 CATSUFFIX=0
11028 fi
11029
11030
11031
11032 KRB_KAFS_LIB="-L\$(top_builddir)/lib/kafs -lkafs $AIX_EXTRA_KAFS"
11033
11034
11035
11036
11037 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11038 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11039
11040 for i in bin lib libexec sbin; do
11041         i=${i}dir
11042         foo=`echo $i | tr 'xindiscernible' 'XINDISCERNIBLE'`
11043         x="\$${i}"
11044         eval y="$x"
11045         while test "x$y" != "x$x"; do
11046                 x="$y"
11047                 eval y="$x"
11048         done
11049         cat >> confdefs.h <<EOF
11050 #define $foo "$x"
11051 EOF
11052
11053 done
11054
11055 trap '' 1 2 15
11056 cat > confcache <<\EOF
11057 # This file is a shell script that caches the results of configure
11058 # tests run on this system so they can be shared between configure
11059 # scripts and configure runs.  It is not useful on other systems.
11060 # If it contains results you don't want to keep, you may remove or edit it.
11061 #
11062 # By default, configure uses ./config.cache as the cache file,
11063 # creating it if it does not exist already.  You can give configure
11064 # the --cache-file=FILE option to use a different cache file; that is
11065 # what configure does when it calls configure scripts in
11066 # subdirectories, so they share the cache.
11067 # Giving --cache-file=/dev/null disables caching, for debugging configure.
11068 # config.status only pays attention to the cache file if you give it the
11069 # --recheck option to rerun configure.
11070 #
11071 EOF
11072 # The following way of writing the cache mishandles newlines in values,
11073 # but we know of no workaround that is simple, portable, and efficient.
11074 # So, don't put newlines in cache variables' values.
11075 # Ultrix sh set writes to stderr and can't be redirected directly,
11076 # and sets the high bit in the cache file unless we assign to the vars.
11077 (set) 2>&1 |
11078   case `(ac_space=' '; set | grep ac_space) 2>&1` in
11079   *ac_space=\ *)
11080     # `set' does not quote correctly, so add quotes (double-quote substitution
11081     # turns \\\\ into \\, and sed turns \\ into \).
11082     sed -n \
11083       -e "s/'/'\\\\''/g" \
11084       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
11085     ;;
11086   *)
11087     # `set' quotes correctly as required by POSIX, so do not add quotes.
11088     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11089     ;;
11090   esac >> confcache
11091 if cmp -s $cache_file confcache; then
11092   :
11093 else
11094   if test -w $cache_file; then
11095     echo "updating cache $cache_file"
11096     cat confcache > $cache_file
11097   else
11098     echo "not updating unwritable cache $cache_file"
11099   fi
11100 fi
11101 rm -f confcache
11102
11103 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11104
11105 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11106 # Let make expand exec_prefix.
11107 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11108
11109 # Any assignment to VPATH causes Sun make to only execute
11110 # the first set of double-colon rules, so remove it if not needed.
11111 # If there is a colon in the path, we need to keep it.
11112 if test "x$srcdir" = x.; then
11113   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
11114 fi
11115
11116 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11117
11118 DEFS=-DHAVE_CONFIG_H
11119
11120 # Without the "./", some shells look in PATH for config.status.
11121 : ${CONFIG_STATUS=./config.status}
11122
11123 echo creating $CONFIG_STATUS
11124 rm -f $CONFIG_STATUS
11125 cat > $CONFIG_STATUS <<EOF
11126 #! /bin/sh
11127 # Generated automatically by configure.
11128 # Run this file to recreate the current configuration.
11129 # This directory was configured as follows,
11130 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11131 #
11132 # $0 $ac_configure_args
11133 #
11134 # Compiler output produced by configure, useful for debugging
11135 # configure, is in ./config.log if it exists.
11136
11137 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11138 for ac_option
11139 do
11140   case "\$ac_option" in
11141   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11142     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11143     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11144   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11145     echo "$CONFIG_STATUS generated by autoconf version 2.13"
11146     exit 0 ;;
11147   -help | --help | --hel | --he | --h)
11148     echo "\$ac_cs_usage"; exit 0 ;;
11149   *) echo "\$ac_cs_usage"; exit 1 ;;
11150   esac
11151 done
11152
11153 ac_given_srcdir=$srcdir
11154 ac_given_INSTALL="$INSTALL"
11155
11156 trap 'rm -fr `echo "\
11157 Makefile                                        \
11158 include/Makefile                                \
11159 include/sys/Makefile                            \
11160                                                 \
11161 man/Makefile                                    \
11162                                                 \
11163 lib/Makefile                                    \
11164 lib/com_err/Makefile                            \
11165 lib/des/Makefile                                \
11166 lib/krb/Makefile                                \
11167 lib/kdb/Makefile                                \
11168 lib/kadm/Makefile                               \
11169 lib/acl/Makefile                                \
11170 lib/kafs/Makefile                               \
11171 lib/roken/Makefile                              \
11172 lib/otp/Makefile                                \
11173 lib/sl/Makefile                                 \
11174 lib/editline/Makefile                           \
11175 lib/rxkad/Makefile                              \
11176 lib/auth/Makefile                               \
11177 lib/auth/pam/Makefile                           \
11178 lib/auth/sia/Makefile                           \
11179 lib/auth/afskauthlib/Makefile                   \
11180                                                 \
11181 kuser/Makefile                                  \
11182 server/Makefile                                 \
11183 slave/Makefile                                  \
11184 admin/Makefile                                  \
11185 kadmin/Makefile                                 \
11186                                                 \
11187 appl/Makefile                                   \
11188                                                 \
11189 appl/afsutil/Makefile                           \
11190 appl/ftp/Makefile                               \
11191 appl/ftp/common/Makefile                        \
11192 appl/ftp/ftp/Makefile                           \
11193 appl/ftp/ftpd/Makefile                          \
11194 appl/telnet/Makefile                            \
11195 appl/telnet/libtelnet/Makefile                  \
11196 appl/telnet/telnet/Makefile                     \
11197 appl/telnet/telnetd/Makefile                    \
11198 appl/bsd/Makefile                               \
11199 appl/kauth/Makefile                             \
11200 appl/popper/Makefile                            \
11201 appl/movemail/Makefile                          \
11202 appl/push/Makefile                              \
11203 appl/sample/Makefile                            \
11204 appl/xnlock/Makefile                            \
11205 appl/kx/Makefile                                \
11206 appl/kip/Makefile                               \
11207 appl/otp/Makefile                               \
11208 doc/Makefile                                    \
11209 etc/inetd.conf.changes                          \
11210  include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11211 EOF
11212 cat >> $CONFIG_STATUS <<EOF
11213
11214 # Protect against being on the right side of a sed subst in config.status.
11215 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11216  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11217 $ac_vpsub
11218 $extrasub
11219 s%@SHELL@%$SHELL%g
11220 s%@CFLAGS@%$CFLAGS%g
11221 s%@CPPFLAGS@%$CPPFLAGS%g
11222 s%@CXXFLAGS@%$CXXFLAGS%g
11223 s%@FFLAGS@%$FFLAGS%g
11224 s%@DEFS@%$DEFS%g
11225 s%@LDFLAGS@%$LDFLAGS%g
11226 s%@LIBS@%$LIBS%g
11227 s%@exec_prefix@%$exec_prefix%g
11228 s%@prefix@%$prefix%g
11229 s%@program_transform_name@%$program_transform_name%g
11230 s%@bindir@%$bindir%g
11231 s%@sbindir@%$sbindir%g
11232 s%@libexecdir@%$libexecdir%g
11233 s%@datadir@%$datadir%g
11234 s%@sysconfdir@%$sysconfdir%g
11235 s%@sharedstatedir@%$sharedstatedir%g
11236 s%@localstatedir@%$localstatedir%g
11237 s%@libdir@%$libdir%g
11238 s%@includedir@%$includedir%g
11239 s%@oldincludedir@%$oldincludedir%g
11240 s%@infodir@%$infodir%g
11241 s%@mandir@%$mandir%g
11242 s%@PACKAGE@%$PACKAGE%g
11243 s%@VERSION@%$VERSION%g
11244 s%@host@%$host%g
11245 s%@host_alias@%$host_alias%g
11246 s%@host_cpu@%$host_cpu%g
11247 s%@host_vendor@%$host_vendor%g
11248 s%@host_os@%$host_os%g
11249 s%@CANONICAL_HOST@%$CANONICAL_HOST%g
11250 s%@SET_MAKE@%$SET_MAKE%g
11251 s%@LN_S@%$LN_S%g
11252 s%@CC@%$CC%g
11253 s%@CPP@%$CPP%g
11254 s%@YACC@%$YACC%g
11255 s%@LEX@%$LEX%g
11256 s%@LEXLIB@%$LEXLIB%g
11257 s%@RANLIB@%$RANLIB%g
11258 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11259 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11260 s%@INSTALL_DATA@%$INSTALL_DATA%g
11261 s%@AWK@%$AWK%g
11262 s%@MAKEINFO@%$MAKEINFO%g
11263 s%@WFLAGS@%$WFLAGS%g
11264 s%@WFLAGS_NOUNUSED@%$WFLAGS_NOUNUSED%g
11265 s%@WFLAGS_NOIMPLICITINT@%$WFLAGS_NOIMPLICITINT%g
11266 s%@INCLUDE_socks@%$INCLUDE_socks%g
11267 s%@LIB_socks@%$LIB_socks%g
11268 s%@CRACKLIB@%$CRACKLIB%g
11269 s%@LIB_otp@%$LIB_otp%g
11270 s%@OTP_dir@%$OTP_dir%g
11271 s%@LIB_security@%$LIB_security%g
11272 s%@AFSWS@%$AFSWS%g
11273 s%@LIB_SUBDIRS@%$LIB_SUBDIRS%g
11274 s%@disable_cat_manpages@%$disable_cat_manpages%g
11275 s%@INCLUDE_readline@%$INCLUDE_readline%g
11276 s%@LIB_readline@%$LIB_readline%g
11277 s%@INCLUDE_hesiod@%$INCLUDE_hesiod%g
11278 s%@LIB_hesiod@%$LIB_hesiod%g
11279 s%@LINK@%$LINK%g
11280 s%@lib_deps_yes@%$lib_deps_yes%g
11281 s%@lib_deps_no@%$lib_deps_no%g
11282 s%@REAL_PICFLAGS@%$REAL_PICFLAGS%g
11283 s%@REAL_SHLIBEXT@%$REAL_SHLIBEXT%g
11284 s%@REAL_LD_FLAGS@%$REAL_LD_FLAGS%g
11285 s%@PICFLAGS@%$PICFLAGS%g
11286 s%@SHLIBEXT@%$SHLIBEXT%g
11287 s%@LDSHARED@%$LDSHARED%g
11288 s%@LD_FLAGS@%$LD_FLAGS%g
11289 s%@LIBEXT@%$LIBEXT%g
11290 s%@LIBPREFIX@%$LIBPREFIX%g
11291 s%@EXECSUFFIX@%$EXECSUFFIX%g
11292 s%@build_symlink_command@%$build_symlink_command%g
11293 s%@install_symlink_command@%$install_symlink_command%g
11294 s%@install_symlink_command2@%$install_symlink_command2%g
11295 s%@LIB_dlopen@%$LIB_dlopen%g
11296 s%@AFS_EXTRA_OBJS@%$AFS_EXTRA_OBJS%g
11297 s%@AFS_EXTRA_LIBS@%$AFS_EXTRA_LIBS%g
11298 s%@AFS_EXTRA_LD@%$AFS_EXTRA_LD%g
11299 s%@AFS_EXTRA_DEFS@%$AFS_EXTRA_DEFS%g
11300 s%@AIX_EXTRA_KAFS@%$AIX_EXTRA_KAFS%g
11301 s%@EXTRA_HEADERS@%$EXTRA_HEADERS%g
11302 s%@EXTRA_LOCL_HEADERS@%$EXTRA_LOCL_HEADERS%g
11303 s%@LIB_crypt@%$LIB_crypt%g
11304 s%@LIB_socket@%$LIB_socket%g
11305 s%@LIB_gethostbyname@%$LIB_gethostbyname%g
11306 s%@LIB_odm_initialize@%$LIB_odm_initialize%g
11307 s%@LIB_getattr@%$LIB_getattr%g
11308 s%@LIB_setpcred@%$LIB_setpcred%g
11309 s%@LIB_logwtmp@%$LIB_logwtmp%g
11310 s%@LIB_logout@%$LIB_logout%g
11311 s%@LIB_tgetent@%$LIB_tgetent%g
11312 s%@X_CFLAGS@%$X_CFLAGS%g
11313 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
11314 s%@X_LIBS@%$X_LIBS%g
11315 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
11316 s%@MAKE_X_PROGS_BIN@%$MAKE_X_PROGS_BIN%g
11317 s%@MAKE_X_SCRIPTS_BIN@%$MAKE_X_SCRIPTS_BIN%g
11318 s%@MAKE_X_PROGS_LIBEXEC@%$MAKE_X_PROGS_LIBEXEC%g
11319 s%@LIB_XauWriteAuth@%$LIB_XauWriteAuth%g
11320 s%@LIB_XauReadAuth@%$LIB_XauReadAuth%g
11321 s%@LIB_XauFileName@%$LIB_XauFileName%g
11322 s%@NEED_WRITEAUTH_TRUE@%$NEED_WRITEAUTH_TRUE%g
11323 s%@NEED_WRITEAUTH_FALSE@%$NEED_WRITEAUTH_FALSE%g
11324 s%@LIB_DBM@%$LIB_DBM%g
11325 s%@DBLIB@%$DBLIB%g
11326 s%@LIB_syslog@%$LIB_syslog%g
11327 s%@LIB_getpwnam_r@%$LIB_getpwnam_r%g
11328 s%@LIB_getsockopt@%$LIB_getsockopt%g
11329 s%@LIB_setsockopt@%$LIB_setsockopt%g
11330 s%@LIB_res_search@%$LIB_res_search%g
11331 s%@LIB_dn_expand@%$LIB_dn_expand%g
11332 s%@ALLOCA@%$ALLOCA%g
11333 s%@LIB_hstrerror@%$LIB_hstrerror%g
11334 s%@LIBOBJS@%$LIBOBJS%g
11335 s%@LIB_AUTH_SUBDIRS@%$LIB_AUTH_SUBDIRS%g
11336 s%@krb_cv_header_sys_socket_h_broken@%$krb_cv_header_sys_socket_h_broken%g
11337 s%@krb_cv_header_netdb_h_broken@%$krb_cv_header_netdb_h_broken%g
11338 s%@LIB_el_init@%$LIB_el_init%g
11339 s%@el_yes@%$el_yes%g
11340 s%@CATSUFFIX@%$CATSUFFIX%g
11341 s%@KRB_KAFS_LIB@%$KRB_KAFS_LIB%g
11342
11343 CEOF
11344 EOF
11345
11346 cat >> $CONFIG_STATUS <<\EOF
11347
11348 # Split the substitutions into bite-sized pieces for seds with
11349 # small command number limits, like on Digital OSF/1 and HP-UX.
11350 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11351 ac_file=1 # Number of current file.
11352 ac_beg=1 # First line for current file.
11353 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11354 ac_more_lines=:
11355 ac_sed_cmds=""
11356 while $ac_more_lines; do
11357   if test $ac_beg -gt 1; then
11358     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11359   else
11360     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11361   fi
11362   if test ! -s conftest.s$ac_file; then
11363     ac_more_lines=false
11364     rm -f conftest.s$ac_file
11365   else
11366     if test -z "$ac_sed_cmds"; then
11367       ac_sed_cmds="sed -f conftest.s$ac_file"
11368     else
11369       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11370     fi
11371     ac_file=`expr $ac_file + 1`
11372     ac_beg=$ac_end
11373     ac_end=`expr $ac_end + $ac_max_sed_cmds`
11374   fi
11375 done
11376 if test -z "$ac_sed_cmds"; then
11377   ac_sed_cmds=cat
11378 fi
11379 EOF
11380
11381 cat >> $CONFIG_STATUS <<EOF
11382
11383 CONFIG_FILES=\${CONFIG_FILES-"\
11384 Makefile                                        \
11385 include/Makefile                                \
11386 include/sys/Makefile                            \
11387                                                 \
11388 man/Makefile                                    \
11389                                                 \
11390 lib/Makefile                                    \
11391 lib/com_err/Makefile                            \
11392 lib/des/Makefile                                \
11393 lib/krb/Makefile                                \
11394 lib/kdb/Makefile                                \
11395 lib/kadm/Makefile                               \
11396 lib/acl/Makefile                                \
11397 lib/kafs/Makefile                               \
11398 lib/roken/Makefile                              \
11399 lib/otp/Makefile                                \
11400 lib/sl/Makefile                                 \
11401 lib/editline/Makefile                           \
11402 lib/rxkad/Makefile                              \
11403 lib/auth/Makefile                               \
11404 lib/auth/pam/Makefile                           \
11405 lib/auth/sia/Makefile                           \
11406 lib/auth/afskauthlib/Makefile                   \
11407                                                 \
11408 kuser/Makefile                                  \
11409 server/Makefile                                 \
11410 slave/Makefile                                  \
11411 admin/Makefile                                  \
11412 kadmin/Makefile                                 \
11413                                                 \
11414 appl/Makefile                                   \
11415                                                 \
11416 appl/afsutil/Makefile                           \
11417 appl/ftp/Makefile                               \
11418 appl/ftp/common/Makefile                        \
11419 appl/ftp/ftp/Makefile                           \
11420 appl/ftp/ftpd/Makefile                          \
11421 appl/telnet/Makefile                            \
11422 appl/telnet/libtelnet/Makefile                  \
11423 appl/telnet/telnet/Makefile                     \
11424 appl/telnet/telnetd/Makefile                    \
11425 appl/bsd/Makefile                               \
11426 appl/kauth/Makefile                             \
11427 appl/popper/Makefile                            \
11428 appl/movemail/Makefile                          \
11429 appl/push/Makefile                              \
11430 appl/sample/Makefile                            \
11431 appl/xnlock/Makefile                            \
11432 appl/kx/Makefile                                \
11433 appl/kip/Makefile                               \
11434 appl/otp/Makefile                               \
11435 doc/Makefile                                    \
11436 etc/inetd.conf.changes                          \
11437 "}
11438 EOF
11439 cat >> $CONFIG_STATUS <<\EOF
11440 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11441   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11442   case "$ac_file" in
11443   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11444        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11445   *) ac_file_in="${ac_file}.in" ;;
11446   esac
11447
11448   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11449
11450   # Remove last slash and all that follows it.  Not all systems have dirname.
11451   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11452   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11453     # The file is in a subdirectory.
11454     test ! -d "$ac_dir" && mkdir "$ac_dir"
11455     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11456     # A "../" for each directory in $ac_dir_suffix.
11457     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11458   else
11459     ac_dir_suffix= ac_dots=
11460   fi
11461
11462   case "$ac_given_srcdir" in
11463   .)  srcdir=.
11464       if test -z "$ac_dots"; then top_srcdir=.
11465       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11466   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11467   *) # Relative path.
11468     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11469     top_srcdir="$ac_dots$ac_given_srcdir" ;;
11470   esac
11471
11472   case "$ac_given_INSTALL" in
11473   [/$]*) INSTALL="$ac_given_INSTALL" ;;
11474   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11475   esac
11476
11477   echo creating "$ac_file"
11478   rm -f "$ac_file"
11479   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11480   case "$ac_file" in
11481   *Makefile*) ac_comsub="1i\\
11482 # $configure_input" ;;
11483   *) ac_comsub= ;;
11484   esac
11485
11486   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11487   sed -e "$ac_comsub
11488 s%@configure_input@%$configure_input%g
11489 s%@srcdir@%$srcdir%g
11490 s%@top_srcdir@%$top_srcdir%g
11491 s%@INSTALL@%$INSTALL%g
11492 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11493 fi; done
11494 rm -f conftest.s*
11495
11496 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11497 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11498 #
11499 # ac_d sets the value in "#define NAME VALUE" lines.
11500 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
11501 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
11502 ac_dC='\3'
11503 ac_dD='%g'
11504 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11505 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11506 ac_uB='\([      ]\)%\1#\2define\3'
11507 ac_uC=' '
11508 ac_uD='\4%g'
11509 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11510 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
11511 ac_eB='$%\1#\2define\3'
11512 ac_eC=' '
11513 ac_eD='%g'
11514
11515 if test "${CONFIG_HEADERS+set}" != set; then
11516 EOF
11517 cat >> $CONFIG_STATUS <<EOF
11518   CONFIG_HEADERS="include/config.h"
11519 EOF
11520 cat >> $CONFIG_STATUS <<\EOF
11521 fi
11522 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11523   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11524   case "$ac_file" in
11525   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11526        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11527   *) ac_file_in="${ac_file}.in" ;;
11528   esac
11529
11530   echo creating $ac_file
11531
11532   rm -f conftest.frag conftest.in conftest.out
11533   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11534   cat $ac_file_inputs > conftest.in
11535
11536 EOF
11537
11538 # Transform confdefs.h into a sed script conftest.vals that substitutes
11539 # the proper values into config.h.in to produce config.h.  And first:
11540 # Protect against being on the right side of a sed subst in config.status.
11541 # Protect against being in an unquoted here document in config.status.
11542 rm -f conftest.vals
11543 cat > conftest.hdr <<\EOF
11544 s/[\\&%]/\\&/g
11545 s%[\\$`]%\\&%g
11546 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11547 s%ac_d%ac_u%gp
11548 s%ac_u%ac_e%gp
11549 EOF
11550 sed -n -f conftest.hdr confdefs.h > conftest.vals
11551 rm -f conftest.hdr
11552
11553 # This sed command replaces #undef with comments.  This is necessary, for
11554 # example, in the case of _POSIX_SOURCE, which is predefined and required
11555 # on some systems where configure will not decide to define it.
11556 cat >> conftest.vals <<\EOF
11557 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11558 EOF
11559
11560 # Break up conftest.vals because some shells have a limit on
11561 # the size of here documents, and old seds have small limits too.
11562
11563 rm -f conftest.tail
11564 while :
11565 do
11566   ac_lines=`grep -c . conftest.vals`
11567   # grep -c gives empty output for an empty file on some AIX systems.
11568   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11569   # Write a limited-size here document to conftest.frag.
11570   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11571   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11572   echo 'CEOF
11573   sed -f conftest.frag conftest.in > conftest.out
11574   rm -f conftest.in
11575   mv conftest.out conftest.in
11576 ' >> $CONFIG_STATUS
11577   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11578   rm -f conftest.vals
11579   mv conftest.tail conftest.vals
11580 done
11581 rm -f conftest.vals
11582
11583 cat >> $CONFIG_STATUS <<\EOF
11584   rm -f conftest.frag conftest.h
11585   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
11586   cat conftest.in >> conftest.h
11587   rm -f conftest.in
11588   if cmp -s $ac_file conftest.h 2>/dev/null; then
11589     echo "$ac_file is unchanged"
11590     rm -f conftest.h
11591   else
11592     # Remove last slash and all that follows it.  Not all systems have dirname.
11593       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11594       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11595       # The file is in a subdirectory.
11596       test ! -d "$ac_dir" && mkdir "$ac_dir"
11597     fi
11598     rm -f $ac_file
11599     mv conftest.h $ac_file
11600   fi
11601 fi; done
11602
11603 EOF
11604 cat >> $CONFIG_STATUS <<EOF
11605
11606 EOF
11607 cat >> $CONFIG_STATUS <<\EOF
11608
11609 exit 0
11610 EOF
11611 chmod +x $CONFIG_STATUS
11612 rm -fr confdefs* $ac_clean_files
11613 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11614  
11615
11616 cat > include/newversion.h.in <<FOOBAR
11617 char *${PACKAGE}_long_version = "@(#)\$Version: $PACKAGE-$VERSION by @USER@ on @HOST@ ($host) @DATE@ \$";
11618 char *${PACKAGE}_version = "$PACKAGE-$VERSION";
11619 FOOBAR
11620
11621 if test -f include/version.h && cmp -s include/newversion.h.in include/version.h.in; then
11622         echo "include/version.h is unchanged"
11623         rm -f include/newversion.h.in
11624 else
11625         echo "creating include/version.h"
11626         User=${USER-${LOGNAME}}
11627         Host=`(hostname || uname -n) 2>/dev/null | sed 1q`
11628         Date=`date`
11629         mv -f include/newversion.h.in include/version.h.in
11630         sed -e "s/@USER@/$User/" -e "s/@HOST@/$Host/" -e "s/@DATE@/$Date/" include/version.h.in > include/version.h
11631 fi
11632