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