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