]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - configure
change ZChecksum_t to be an int, because it's more likely to be 4 bytes
[1ts-debian.git] / 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 main()
2381 {
2382   FILE *f=fopen("conftestval", "w");
2383   if (!f) exit(1);
2384   fprintf(f, "%d\n", sizeof(short));
2385   exit(0);
2386 }
2387 EOF
2388 if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2389 then
2390   ac_cv_sizeof_short=`cat conftestval`
2391 else
2392   echo "configure: failed program was:" >&5
2393   cat conftest.$ac_ext >&5
2394   rm -fr conftest*
2395   ac_cv_sizeof_short=0
2396 fi
2397 rm -fr conftest*
2398 fi
2399
2400 fi
2401 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2402 cat >> confdefs.h <<EOF
2403 #define SIZEOF_SHORT $ac_cv_sizeof_short
2404 EOF
2405
2406
2407 echo $ac_n "checking size of int""... $ac_c" 1>&6
2408 echo "configure:2409: checking size of int" >&5
2409 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2410   echo $ac_n "(cached) $ac_c" 1>&6
2411 else
2412   if test "$cross_compiling" = yes; then
2413     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2414 else
2415   cat > conftest.$ac_ext <<EOF
2416 #line 2417 "configure"
2417 #include "confdefs.h"
2418 #include <stdio.h>
2419 main()
2420 {
2421   FILE *f=fopen("conftestval", "w");
2422   if (!f) exit(1);
2423   fprintf(f, "%d\n", sizeof(int));
2424   exit(0);
2425 }
2426 EOF
2427 if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2428 then
2429   ac_cv_sizeof_int=`cat conftestval`
2430 else
2431   echo "configure: failed program was:" >&5
2432   cat conftest.$ac_ext >&5
2433   rm -fr conftest*
2434   ac_cv_sizeof_int=0
2435 fi
2436 rm -fr conftest*
2437 fi
2438
2439 fi
2440 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2441 cat >> confdefs.h <<EOF
2442 #define SIZEOF_INT $ac_cv_sizeof_int
2443 EOF
2444
2445
2446 echo $ac_n "checking size of long""... $ac_c" 1>&6
2447 echo "configure:2448: checking size of long" >&5
2448 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2449   echo $ac_n "(cached) $ac_c" 1>&6
2450 else
2451   if test "$cross_compiling" = yes; then
2452     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2453 else
2454   cat > conftest.$ac_ext <<EOF
2455 #line 2456 "configure"
2456 #include "confdefs.h"
2457 #include <stdio.h>
2458 main()
2459 {
2460   FILE *f=fopen("conftestval", "w");
2461   if (!f) exit(1);
2462   fprintf(f, "%d\n", sizeof(long));
2463   exit(0);
2464 }
2465 EOF
2466 if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2467 then
2468   ac_cv_sizeof_long=`cat conftestval`
2469 else
2470   echo "configure: failed program was:" >&5
2471   cat conftest.$ac_ext >&5
2472   rm -fr conftest*
2473   ac_cv_sizeof_long=0
2474 fi
2475 rm -fr conftest*
2476 fi
2477
2478 fi
2479 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2480 cat >> confdefs.h <<EOF
2481 #define SIZEOF_LONG $ac_cv_sizeof_long
2482 EOF
2483
2484
2485 echo $ac_n "checking for 32-bit integer type""... $ac_c" 1>&6
2486 echo "configure:2487: checking for 32-bit integer type" >&5
2487 if test "$ac_cv_sizeof_long" = 4; then
2488         int32=long
2489 elif test "$ac_cv_sizeof_int" = 4; then
2490         int32=int
2491 elif test "$ac_cv_sizeof_short" = 4; then
2492         int32=short
2493 else
2494         echo "configure: warning: Can't find 32-bit type, using long" 1>&2
2495         int32=long
2496 fi
2497 cat >> confdefs.h <<EOF
2498 #define ZEPHYR_INT32 ${int32}
2499 EOF
2500
2501 echo "$ac_t""${int32}" 1>&6
2502
2503 echo $ac_n "checking for wslen in -lw""... $ac_c" 1>&6
2504 echo "configure:2505: checking for wslen in -lw" >&5
2505 ac_lib_var=`echo w'_'wslen | sed 'y%./+-%__p_%'`
2506 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2507   echo $ac_n "(cached) $ac_c" 1>&6
2508 else
2509   ac_save_LIBS="$LIBS"
2510 LIBS="-lw  $LIBS"
2511 cat > conftest.$ac_ext <<EOF
2512 #line 2513 "configure"
2513 #include "confdefs.h"
2514 /* Override any gcc2 internal prototype to avoid an error.  */
2515 /* We use char because int might match the return type of a gcc2
2516     builtin and then its argument prototype would still apply.  */
2517 char wslen();
2518
2519 int main() {
2520 wslen()
2521 ; return 0; }
2522 EOF
2523 if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2524   rm -rf conftest*
2525   eval "ac_cv_lib_$ac_lib_var=yes"
2526 else
2527   echo "configure: failed program was:" >&5
2528   cat conftest.$ac_ext >&5
2529   rm -rf conftest*
2530   eval "ac_cv_lib_$ac_lib_var=no"
2531 fi
2532 rm -f conftest*
2533 LIBS="$ac_save_LIBS"
2534
2535 fi
2536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2537   echo "$ac_t""yes" 1>&6
2538     ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2539     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2540   cat >> confdefs.h <<EOF
2541 #define $ac_tr_lib 1
2542 EOF
2543
2544   LIBS="-lw $LIBS"
2545
2546 else
2547   echo "$ac_t""no" 1>&6
2548 fi
2549
2550 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2551 echo "configure:2552: checking for dlopen in -ldl" >&5
2552 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2553 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2554   echo $ac_n "(cached) $ac_c" 1>&6
2555 else
2556   ac_save_LIBS="$LIBS"
2557 LIBS="-ldl  $LIBS"
2558 cat > conftest.$ac_ext <<EOF
2559 #line 2560 "configure"
2560 #include "confdefs.h"
2561 /* Override any gcc2 internal prototype to avoid an error.  */
2562 /* We use char because int might match the return type of a gcc2
2563     builtin and then its argument prototype would still apply.  */
2564 char dlopen();
2565
2566 int main() {
2567 dlopen()
2568 ; return 0; }
2569 EOF
2570 if { (eval echo configure:2571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2571   rm -rf conftest*
2572   eval "ac_cv_lib_$ac_lib_var=yes"
2573 else
2574   echo "configure: failed program was:" >&5
2575   cat conftest.$ac_ext >&5
2576   rm -rf conftest*
2577   eval "ac_cv_lib_$ac_lib_var=no"
2578 fi
2579 rm -f conftest*
2580 LIBS="$ac_save_LIBS"
2581
2582 fi
2583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2584   echo "$ac_t""yes" 1>&6
2585     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2586     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2587   cat >> confdefs.h <<EOF
2588 #define $ac_tr_lib 1
2589 EOF
2590
2591   LIBS="-ldl $LIBS"
2592
2593 else
2594   echo "$ac_t""no" 1>&6
2595 fi
2596
2597
2598
2599 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
2600 echo "configure:2601: checking for library containing gethostbyname" >&5
2601 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
2602   echo $ac_n "(cached) $ac_c" 1>&6
2603 else
2604   ac_func_search_save_LIBS="$LIBS"
2605 ac_cv_search_gethostbyname="no"
2606 cat > conftest.$ac_ext <<EOF
2607 #line 2608 "configure"
2608 #include "confdefs.h"
2609 /* Override any gcc2 internal prototype to avoid an error.  */
2610 /* We use char because int might match the return type of a gcc2
2611     builtin and then its argument prototype would still apply.  */
2612 char gethostbyname();
2613
2614 int main() {
2615 gethostbyname()
2616 ; return 0; }
2617 EOF
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2619   rm -rf conftest*
2620   ac_cv_search_gethostbyname="none required"
2621 else
2622   echo "configure: failed program was:" >&5
2623   cat conftest.$ac_ext >&5
2624 fi
2625 rm -f conftest*
2626 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
2627 LIBS="-l$i  $ac_func_search_save_LIBS"
2628 cat > conftest.$ac_ext <<EOF
2629 #line 2630 "configure"
2630 #include "confdefs.h"
2631 /* Override any gcc2 internal prototype to avoid an error.  */
2632 /* We use char because int might match the return type of a gcc2
2633     builtin and then its argument prototype would still apply.  */
2634 char gethostbyname();
2635
2636 int main() {
2637 gethostbyname()
2638 ; return 0; }
2639 EOF
2640 if { (eval echo configure:2641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2641   rm -rf conftest*
2642   ac_cv_search_gethostbyname="-l$i"
2643 break
2644 else
2645   echo "configure: failed program was:" >&5
2646   cat conftest.$ac_ext >&5
2647 fi
2648 rm -f conftest*
2649 done
2650 LIBS="$ac_func_search_save_LIBS"
2651 fi
2652
2653 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
2654 if test "$ac_cv_search_gethostbyname" != "no"; then
2655   test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
2656   
2657 else :
2658   
2659 fi
2660
2661 echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
2662 echo "configure:2663: checking for library containing socket" >&5
2663 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
2664   echo $ac_n "(cached) $ac_c" 1>&6
2665 else
2666   ac_func_search_save_LIBS="$LIBS"
2667 ac_cv_search_socket="no"
2668 cat > conftest.$ac_ext <<EOF
2669 #line 2670 "configure"
2670 #include "confdefs.h"
2671 /* Override any gcc2 internal prototype to avoid an error.  */
2672 /* We use char because int might match the return type of a gcc2
2673     builtin and then its argument prototype would still apply.  */
2674 char socket();
2675
2676 int main() {
2677 socket()
2678 ; return 0; }
2679 EOF
2680 if { (eval echo configure:2681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2681   rm -rf conftest*
2682   ac_cv_search_socket="none required"
2683 else
2684   echo "configure: failed program was:" >&5
2685   cat conftest.$ac_ext >&5
2686 fi
2687 rm -f conftest*
2688 test "$ac_cv_search_socket" = "no" && for i in socket; do
2689 LIBS="-l$i  $ac_func_search_save_LIBS"
2690 cat > conftest.$ac_ext <<EOF
2691 #line 2692 "configure"
2692 #include "confdefs.h"
2693 /* Override any gcc2 internal prototype to avoid an error.  */
2694 /* We use char because int might match the return type of a gcc2
2695     builtin and then its argument prototype would still apply.  */
2696 char socket();
2697
2698 int main() {
2699 socket()
2700 ; return 0; }
2701 EOF
2702 if { (eval echo configure:2703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2703   rm -rf conftest*
2704   ac_cv_search_socket="-l$i"
2705 break
2706 else
2707   echo "configure: failed program was:" >&5
2708   cat conftest.$ac_ext >&5
2709 fi
2710 rm -f conftest*
2711 done
2712 LIBS="$ac_func_search_save_LIBS"
2713 fi
2714
2715 echo "$ac_t""$ac_cv_search_socket" 1>&6
2716 if test "$ac_cv_search_socket" != "no"; then
2717   test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS"
2718   
2719 else :
2720   
2721 fi
2722
2723 # Hesiod needs -lresolv on Sun systems for res_send.
2724 if test "$hesiod" != "no"; then
2725         echo $ac_n "checking for strerror in -l44bsd""... $ac_c" 1>&6
2726 echo "configure:2727: checking for strerror in -l44bsd" >&5
2727 ac_lib_var=`echo 44bsd'_'strerror | sed 'y%./+-%__p_%'`
2728 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2729   echo $ac_n "(cached) $ac_c" 1>&6
2730 else
2731   ac_save_LIBS="$LIBS"
2732 LIBS="-l44bsd  $LIBS"
2733 cat > conftest.$ac_ext <<EOF
2734 #line 2735 "configure"
2735 #include "confdefs.h"
2736 /* Override any gcc2 internal prototype to avoid an error.  */
2737 /* We use char because int might match the return type of a gcc2
2738     builtin and then its argument prototype would still apply.  */
2739 char strerror();
2740
2741 int main() {
2742 strerror()
2743 ; return 0; }
2744 EOF
2745 if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2746   rm -rf conftest*
2747   eval "ac_cv_lib_$ac_lib_var=yes"
2748 else
2749   echo "configure: failed program was:" >&5
2750   cat conftest.$ac_ext >&5
2751   rm -rf conftest*
2752   eval "ac_cv_lib_$ac_lib_var=no"
2753 fi
2754 rm -f conftest*
2755 LIBS="$ac_save_LIBS"
2756
2757 fi
2758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2759   echo "$ac_t""yes" 1>&6
2760     ac_tr_lib=HAVE_LIB`echo 44bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2761     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2762   cat >> confdefs.h <<EOF
2763 #define $ac_tr_lib 1
2764 EOF
2765
2766   LIBS="-l44bsd $LIBS"
2767
2768 else
2769   echo "$ac_t""no" 1>&6
2770 fi
2771
2772         echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
2773 echo "configure:2774: checking for res_send in -lresolv" >&5
2774 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
2775 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2776   echo $ac_n "(cached) $ac_c" 1>&6
2777 else
2778   ac_save_LIBS="$LIBS"
2779 LIBS="-lresolv  $LIBS"
2780 cat > conftest.$ac_ext <<EOF
2781 #line 2782 "configure"
2782 #include "confdefs.h"
2783 /* Override any gcc2 internal prototype to avoid an error.  */
2784 /* We use char because int might match the return type of a gcc2
2785     builtin and then its argument prototype would still apply.  */
2786 char res_send();
2787
2788 int main() {
2789 res_send()
2790 ; return 0; }
2791 EOF
2792 if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2793   rm -rf conftest*
2794   eval "ac_cv_lib_$ac_lib_var=yes"
2795 else
2796   echo "configure: failed program was:" >&5
2797   cat conftest.$ac_ext >&5
2798   rm -rf conftest*
2799   eval "ac_cv_lib_$ac_lib_var=no"
2800 fi
2801 rm -f conftest*
2802 LIBS="$ac_save_LIBS"
2803
2804 fi
2805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2806   echo "$ac_t""yes" 1>&6
2807     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2808     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2809   cat >> confdefs.h <<EOF
2810 #define $ac_tr_lib 1
2811 EOF
2812
2813   LIBS="-lresolv $LIBS"
2814
2815 else
2816   echo "$ac_t""no" 1>&6
2817 fi
2818
2819 fi
2820
2821 echo $ac_n "checking for tgetstr in -lcurses""... $ac_c" 1>&6
2822 echo "configure:2823: checking for tgetstr in -lcurses" >&5
2823 ac_lib_var=`echo curses'_'tgetstr | sed 'y%./+-%__p_%'`
2824 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2825   echo $ac_n "(cached) $ac_c" 1>&6
2826 else
2827   ac_save_LIBS="$LIBS"
2828 LIBS="-lcurses  $LIBS"
2829 cat > conftest.$ac_ext <<EOF
2830 #line 2831 "configure"
2831 #include "confdefs.h"
2832 /* Override any gcc2 internal prototype to avoid an error.  */
2833 /* We use char because int might match the return type of a gcc2
2834     builtin and then its argument prototype would still apply.  */
2835 char tgetstr();
2836
2837 int main() {
2838 tgetstr()
2839 ; return 0; }
2840 EOF
2841 if { (eval echo configure:2842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2842   rm -rf conftest*
2843   eval "ac_cv_lib_$ac_lib_var=yes"
2844 else
2845   echo "configure: failed program was:" >&5
2846   cat conftest.$ac_ext >&5
2847   rm -rf conftest*
2848   eval "ac_cv_lib_$ac_lib_var=no"
2849 fi
2850 rm -f conftest*
2851 LIBS="$ac_save_LIBS"
2852
2853 fi
2854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2855   echo "$ac_t""yes" 1>&6
2856   TLIB=-lcurses
2857 else
2858   echo "$ac_t""no" 1>&6
2859 TLIB=-ltermcap
2860 fi
2861
2862 echo $ac_n "checking for srcsrpy in -lsrc""... $ac_c" 1>&6
2863 echo "configure:2864: checking for srcsrpy in -lsrc" >&5
2864 ac_lib_var=`echo src'_'srcsrpy | sed 'y%./+-%__p_%'`
2865 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2866   echo $ac_n "(cached) $ac_c" 1>&6
2867 else
2868   ac_save_LIBS="$LIBS"
2869 LIBS="-lsrc  $LIBS"
2870 cat > conftest.$ac_ext <<EOF
2871 #line 2872 "configure"
2872 #include "confdefs.h"
2873 /* Override any gcc2 internal prototype to avoid an error.  */
2874 /* We use char because int might match the return type of a gcc2
2875     builtin and then its argument prototype would still apply.  */
2876 char srcsrpy();
2877
2878 int main() {
2879 srcsrpy()
2880 ; return 0; }
2881 EOF
2882 if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2883   rm -rf conftest*
2884   eval "ac_cv_lib_$ac_lib_var=yes"
2885 else
2886   echo "configure: failed program was:" >&5
2887   cat conftest.$ac_ext >&5
2888   rm -rf conftest*
2889   eval "ac_cv_lib_$ac_lib_var=no"
2890 fi
2891 rm -f conftest*
2892 LIBS="$ac_save_LIBS"
2893
2894 fi
2895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2896   echo "$ac_t""yes" 1>&6
2897   SLIB=-lsrc; cat >> confdefs.h <<\EOF
2898 #define HAVE_SRC 1
2899 EOF
2900
2901 else
2902   echo "$ac_t""no" 1>&6
2903 fi
2904
2905
2906
2907
2908
2909 # Check whether --with-krb4 or --without-krb4 was given.
2910 if test "${with_krb4+set}" = set; then
2911   withval="$with_krb4"
2912   krb4="$withval"
2913 else
2914   krb4=no
2915 fi
2916
2917 if test "$krb4" != no; then
2918         echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
2919 echo "configure:2920: checking for gethostbyname" >&5
2920 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
2921   echo $ac_n "(cached) $ac_c" 1>&6
2922 else
2923   cat > conftest.$ac_ext <<EOF
2924 #line 2925 "configure"
2925 #include "confdefs.h"
2926 /* System header to define __stub macros and hopefully few prototypes,
2927     which can conflict with char gethostbyname(); below.  */
2928 #include <assert.h>
2929 /* Override any gcc2 internal prototype to avoid an error.  */
2930 /* We use char because int might match the return type of a gcc2
2931     builtin and then its argument prototype would still apply.  */
2932 char gethostbyname();
2933
2934 int main() {
2935
2936 /* The GNU C library defines this for functions which it implements
2937     to always fail with ENOSYS.  Some functions are actually named
2938     something starting with __ and the normal name is an alias.  */
2939 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
2940 choke me
2941 #else
2942 gethostbyname();
2943 #endif
2944
2945 ; return 0; }
2946 EOF
2947 if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2948   rm -rf conftest*
2949   eval "ac_cv_func_gethostbyname=yes"
2950 else
2951   echo "configure: failed program was:" >&5
2952   cat conftest.$ac_ext >&5
2953   rm -rf conftest*
2954   eval "ac_cv_func_gethostbyname=no"
2955 fi
2956 rm -f conftest*
2957 fi
2958
2959 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
2960   echo "$ac_t""yes" 1>&6
2961   :
2962 else
2963   echo "$ac_t""no" 1>&6
2964 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
2965 echo "configure:2966: checking for gethostbyname in -lnsl" >&5
2966 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
2967 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2968   echo $ac_n "(cached) $ac_c" 1>&6
2969 else
2970   ac_save_LIBS="$LIBS"
2971 LIBS="-lnsl  $LIBS"
2972 cat > conftest.$ac_ext <<EOF
2973 #line 2974 "configure"
2974 #include "confdefs.h"
2975 /* Override any gcc2 internal prototype to avoid an error.  */
2976 /* We use char because int might match the return type of a gcc2
2977     builtin and then its argument prototype would still apply.  */
2978 char gethostbyname();
2979
2980 int main() {
2981 gethostbyname()
2982 ; return 0; }
2983 EOF
2984 if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2985   rm -rf conftest*
2986   eval "ac_cv_lib_$ac_lib_var=yes"
2987 else
2988   echo "configure: failed program was:" >&5
2989   cat conftest.$ac_ext >&5
2990   rm -rf conftest*
2991   eval "ac_cv_lib_$ac_lib_var=no"
2992 fi
2993 rm -f conftest*
2994 LIBS="$ac_save_LIBS"
2995
2996 fi
2997 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2998   echo "$ac_t""yes" 1>&6
2999     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/^a-zA-Z0-9_/_/g' \
3000     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3001   cat >> confdefs.h <<EOF
3002 #define $ac_tr_lib 1
3003 EOF
3004
3005   LIBS="-lnsl $LIBS"
3006
3007 else
3008   echo "$ac_t""no" 1>&6
3009 fi
3010
3011 fi
3012
3013 echo $ac_n "checking for socket""... $ac_c" 1>&6
3014 echo "configure:3015: checking for socket" >&5
3015 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then
3016   echo $ac_n "(cached) $ac_c" 1>&6
3017 else
3018   cat > conftest.$ac_ext <<EOF
3019 #line 3020 "configure"
3020 #include "confdefs.h"
3021 /* System header to define __stub macros and hopefully few prototypes,
3022     which can conflict with char socket(); below.  */
3023 #include <assert.h>
3024 /* Override any gcc2 internal prototype to avoid an error.  */
3025 /* We use char because int might match the return type of a gcc2
3026     builtin and then its argument prototype would still apply.  */
3027 char socket();
3028
3029 int main() {
3030
3031 /* The GNU C library defines this for functions which it implements
3032     to always fail with ENOSYS.  Some functions are actually named
3033     something starting with __ and the normal name is an alias.  */
3034 #if defined (__stub_socket) || defined (__stub___socket)
3035 choke me
3036 #else
3037 socket();
3038 #endif
3039
3040 ; return 0; }
3041 EOF
3042 if { (eval echo configure:3043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3043   rm -rf conftest*
3044   eval "ac_cv_func_socket=yes"
3045 else
3046   echo "configure: failed program was:" >&5
3047   cat conftest.$ac_ext >&5
3048   rm -rf conftest*
3049   eval "ac_cv_func_socket=no"
3050 fi
3051 rm -f conftest*
3052 fi
3053
3054 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
3055   echo "$ac_t""yes" 1>&6
3056   :
3057 else
3058   echo "$ac_t""no" 1>&6
3059 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
3060 echo "configure:3061: checking for socket in -lsocket" >&5
3061 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3062 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   ac_save_LIBS="$LIBS"
3066 LIBS="-lsocket  $LIBS"
3067 cat > conftest.$ac_ext <<EOF
3068 #line 3069 "configure"
3069 #include "confdefs.h"
3070 /* Override any gcc2 internal prototype to avoid an error.  */
3071 /* We use char because int might match the return type of a gcc2
3072     builtin and then its argument prototype would still apply.  */
3073 char socket();
3074
3075 int main() {
3076 socket()
3077 ; return 0; }
3078 EOF
3079 if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3080   rm -rf conftest*
3081   eval "ac_cv_lib_$ac_lib_var=yes"
3082 else
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085   rm -rf conftest*
3086   eval "ac_cv_lib_$ac_lib_var=no"
3087 fi
3088 rm -f conftest*
3089 LIBS="$ac_save_LIBS"
3090
3091 fi
3092 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3093   echo "$ac_t""yes" 1>&6
3094     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/^a-zA-Z0-9_/_/g' \
3095     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3096   cat >> confdefs.h <<EOF
3097 #define $ac_tr_lib 1
3098 EOF
3099
3100   LIBS="-lsocket $LIBS"
3101
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 fi
3107
3108 echo $ac_n "checking for compile in -lgen""... $ac_c" 1>&6
3109 echo "configure:3110: checking for compile in -lgen" >&5
3110 ac_lib_var=`echo gen'_'compile | sed 'y%./+-%__p_%'`
3111 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3112   echo $ac_n "(cached) $ac_c" 1>&6
3113 else
3114   ac_save_LIBS="$LIBS"
3115 LIBS="-lgen  $LIBS"
3116 cat > conftest.$ac_ext <<EOF
3117 #line 3118 "configure"
3118 #include "confdefs.h"
3119 /* Override any gcc2 internal prototype to avoid an error.  */
3120 /* We use char because int might match the return type of a gcc2
3121     builtin and then its argument prototype would still apply.  */
3122 char compile();
3123
3124 int main() {
3125 compile()
3126 ; return 0; }
3127 EOF
3128 if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3129   rm -rf conftest*
3130   eval "ac_cv_lib_$ac_lib_var=yes"
3131 else
3132   echo "configure: failed program was:" >&5
3133   cat conftest.$ac_ext >&5
3134   rm -rf conftest*
3135   eval "ac_cv_lib_$ac_lib_var=no"
3136 fi
3137 rm -f conftest*
3138 LIBS="$ac_save_LIBS"
3139
3140 fi
3141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3142   echo "$ac_t""yes" 1>&6
3143     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3144     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3145   cat >> confdefs.h <<EOF
3146 #define $ac_tr_lib 1
3147 EOF
3148
3149   LIBS="-lgen $LIBS"
3150
3151 else
3152   echo "$ac_t""no" 1>&6
3153 fi
3154
3155 if test "$krb4" != yes; then
3156         CPPFLAGS="$CPPFLAGS -I$krb4/include"
3157         if test -d "$krb4/include/kerberosIV"; then
3158                 CPPFLAGS="$CPPFLAGS -I$krb4/include/kerberosIV"
3159         fi
3160         LDFLAGS="$LDFLAGS -L$krb4/lib"
3161 fi
3162 echo $ac_n "checking for krb_rd_req in -lkrb4""... $ac_c" 1>&6
3163 echo "configure:3164: checking for krb_rd_req in -lkrb4" >&5
3164 ac_lib_var=`echo krb4'_'krb_rd_req | sed 'y%./+-%__p_%'`
3165 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3166   echo $ac_n "(cached) $ac_c" 1>&6
3167 else
3168   ac_save_LIBS="$LIBS"
3169 LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err $LIBS"
3170 cat > conftest.$ac_ext <<EOF
3171 #line 3172 "configure"
3172 #include "confdefs.h"
3173 /* Override any gcc2 internal prototype to avoid an error.  */
3174 /* We use char because int might match the return type of a gcc2
3175     builtin and then its argument prototype would still apply.  */
3176 char krb_rd_req();
3177
3178 int main() {
3179 krb_rd_req()
3180 ; return 0; }
3181 EOF
3182 if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3183   rm -rf conftest*
3184   eval "ac_cv_lib_$ac_lib_var=yes"
3185 else
3186   echo "configure: failed program was:" >&5
3187   cat conftest.$ac_ext >&5
3188   rm -rf conftest*
3189   eval "ac_cv_lib_$ac_lib_var=no"
3190 fi
3191 rm -f conftest*
3192 LIBS="$ac_save_LIBS"
3193
3194 fi
3195 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3196   echo "$ac_t""yes" 1>&6
3197   KRB4_LIBS="-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err"
3198 else
3199   echo "$ac_t""no" 1>&6
3200 echo $ac_n "checking for krb_rd_req in -lkrb""... $ac_c" 1>&6
3201 echo "configure:3202: checking for krb_rd_req in -lkrb" >&5
3202 ac_lib_var=`echo krb'_'krb_rd_req | sed 'y%./+-%__p_%'`
3203 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3204   echo $ac_n "(cached) $ac_c" 1>&6
3205 else
3206   ac_save_LIBS="$LIBS"
3207 LIBS="-lkrb -ldes $LIBS"
3208 cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211 /* Override any gcc2 internal prototype to avoid an error.  */
3212 /* We use char because int might match the return type of a gcc2
3213     builtin and then its argument prototype would still apply.  */
3214 char krb_rd_req();
3215
3216 int main() {
3217 krb_rd_req()
3218 ; return 0; }
3219 EOF
3220 if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3221   rm -rf conftest*
3222   eval "ac_cv_lib_$ac_lib_var=yes"
3223 else
3224   echo "configure: failed program was:" >&5
3225   cat conftest.$ac_ext >&5
3226   rm -rf conftest*
3227   eval "ac_cv_lib_$ac_lib_var=no"
3228 fi
3229 rm -f conftest*
3230 LIBS="$ac_save_LIBS"
3231
3232 fi
3233 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3234   echo "$ac_t""yes" 1>&6
3235   KRB4_LIBS="-lkrb -ldes"
3236 else
3237   echo "$ac_t""no" 1>&6
3238 { echo "configure: error: Kerberos 4 libraries not found" 1>&2; exit 1; }
3239 fi
3240
3241 fi
3242
3243         cat >> confdefs.h <<\EOF
3244 #define HAVE_KRB4 1
3245 EOF
3246
3247 fi
3248
3249 # Check whether --with-hesiod or --without-hesiod was given.
3250 if test "${with_hesiod+set}" = set; then
3251   withval="$with_hesiod"
3252   hesiod="$withval"
3253 else
3254   hesiod=no
3255 fi
3256
3257 if test "$hesiod" != no; then
3258         echo $ac_n "checking for res_send""... $ac_c" 1>&6
3259 echo "configure:3260: checking for res_send" >&5
3260 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263   cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3266 /* System header to define __stub macros and hopefully few prototypes,
3267     which can conflict with char res_send(); below.  */
3268 #include <assert.h>
3269 /* Override any gcc2 internal prototype to avoid an error.  */
3270 /* We use char because int might match the return type of a gcc2
3271     builtin and then its argument prototype would still apply.  */
3272 char res_send();
3273
3274 int main() {
3275
3276 /* The GNU C library defines this for functions which it implements
3277     to always fail with ENOSYS.  Some functions are actually named
3278     something starting with __ and the normal name is an alias.  */
3279 #if defined (__stub_res_send) || defined (__stub___res_send)
3280 choke me
3281 #else
3282 res_send();
3283 #endif
3284
3285 ; return 0; }
3286 EOF
3287 if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3288   rm -rf conftest*
3289   eval "ac_cv_func_res_send=yes"
3290 else
3291   echo "configure: failed program was:" >&5
3292   cat conftest.$ac_ext >&5
3293   rm -rf conftest*
3294   eval "ac_cv_func_res_send=no"
3295 fi
3296 rm -f conftest*
3297 fi
3298
3299 if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
3300   echo "$ac_t""yes" 1>&6
3301   :
3302 else
3303   echo "$ac_t""no" 1>&6
3304 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
3305 echo "configure:3306: checking for res_send in -lresolv" >&5
3306 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
3307 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3308   echo $ac_n "(cached) $ac_c" 1>&6
3309 else
3310   ac_save_LIBS="$LIBS"
3311 LIBS="-lresolv  $LIBS"
3312 cat > conftest.$ac_ext <<EOF
3313 #line 3314 "configure"
3314 #include "confdefs.h"
3315 /* Override any gcc2 internal prototype to avoid an error.  */
3316 /* We use char because int might match the return type of a gcc2
3317     builtin and then its argument prototype would still apply.  */
3318 char res_send();
3319
3320 int main() {
3321 res_send()
3322 ; return 0; }
3323 EOF
3324 if { (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3325   rm -rf conftest*
3326   eval "ac_cv_lib_$ac_lib_var=yes"
3327 else
3328   echo "configure: failed program was:" >&5
3329   cat conftest.$ac_ext >&5
3330   rm -rf conftest*
3331   eval "ac_cv_lib_$ac_lib_var=no"
3332 fi
3333 rm -f conftest*
3334 LIBS="$ac_save_LIBS"
3335
3336 fi
3337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3338   echo "$ac_t""yes" 1>&6
3339     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
3340     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3341   cat >> confdefs.h <<EOF
3342 #define $ac_tr_lib 1
3343 EOF
3344
3345   LIBS="-lresolv $LIBS"
3346
3347 else
3348   echo "$ac_t""no" 1>&6
3349 fi
3350
3351 fi
3352
3353 if test "$hesiod" != yes; then
3354         CPPFLAGS="$CPPFLAGS -I$hesiod/include"
3355         LDFLAGS="$LDFLAGS -L$hesiod/lib"
3356 fi
3357 echo $ac_n "checking for hes_resolve in -lhesiod""... $ac_c" 1>&6
3358 echo "configure:3359: checking for hes_resolve in -lhesiod" >&5
3359 ac_lib_var=`echo hesiod'_'hes_resolve | sed 'y%./+-%__p_%'`
3360 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3361   echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363   ac_save_LIBS="$LIBS"
3364 LIBS="-lhesiod  $LIBS"
3365 cat > conftest.$ac_ext <<EOF
3366 #line 3367 "configure"
3367 #include "confdefs.h"
3368 /* Override any gcc2 internal prototype to avoid an error.  */
3369 /* We use char because int might match the return type of a gcc2
3370     builtin and then its argument prototype would still apply.  */
3371 char hes_resolve();
3372
3373 int main() {
3374 hes_resolve()
3375 ; return 0; }
3376 EOF
3377 if { (eval echo configure:3378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3378   rm -rf conftest*
3379   eval "ac_cv_lib_$ac_lib_var=yes"
3380 else
3381   echo "configure: failed program was:" >&5
3382   cat conftest.$ac_ext >&5
3383   rm -rf conftest*
3384   eval "ac_cv_lib_$ac_lib_var=no"
3385 fi
3386 rm -f conftest*
3387 LIBS="$ac_save_LIBS"
3388
3389 fi
3390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3391   echo "$ac_t""yes" 1>&6
3392   :
3393 else
3394   echo "$ac_t""no" 1>&6
3395 { echo "configure: error: Hesiod library not found" 1>&2; exit 1; }
3396 fi
3397
3398         HESIOD_LIBS="-lhesiod"
3399         cat >> confdefs.h <<\EOF
3400 #define HAVE_HESIOD 1
3401 EOF
3402
3403 fi
3404
3405 # Check whether --with-regex or --without-regex was given.
3406 if test "${with_regex+set}" = set; then
3407   withval="$with_regex"
3408   regex="$withval"
3409 else
3410   regex=no
3411 fi
3412
3413 if test "$regex" != no; then
3414         if test "$regex" != yes; then
3415                 CPPFLAGS="$CPPFLAGS -I$regex/include"
3416                 LDFLAGS="$LDFLAGS -L$regex/lib"
3417         fi
3418         echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
3419 echo "configure:3420: checking for regcomp in -lregex" >&5
3420 ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
3421 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   ac_save_LIBS="$LIBS"
3425 LIBS="-lregex  $LIBS"
3426 cat > conftest.$ac_ext <<EOF
3427 #line 3428 "configure"
3428 #include "confdefs.h"
3429 /* Override any gcc2 internal prototype to avoid an error.  */
3430 /* We use char because int might match the return type of a gcc2
3431     builtin and then its argument prototype would still apply.  */
3432 char regcomp();
3433
3434 int main() {
3435 regcomp()
3436 ; return 0; }
3437 EOF
3438 if { (eval echo configure:3439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3439   rm -rf conftest*
3440   eval "ac_cv_lib_$ac_lib_var=yes"
3441 else
3442   echo "configure: failed program was:" >&5
3443   cat conftest.$ac_ext >&5
3444   rm -rf conftest*
3445   eval "ac_cv_lib_$ac_lib_var=no"
3446 fi
3447 rm -f conftest*
3448 LIBS="$ac_save_LIBS"
3449
3450 fi
3451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3452   echo "$ac_t""yes" 1>&6
3453   REGEX_LIBS=-lregex
3454 else
3455   echo "$ac_t""no" 1>&6
3456 { echo "configure: error: regex library not found" 1>&2; exit 1; }
3457 fi
3458
3459 else
3460         echo $ac_n "checking for regcomp""... $ac_c" 1>&6
3461 echo "configure:3462: checking for regcomp" >&5
3462 if eval "test \"`echo '$''{'ac_cv_func_regcomp'+set}'`\" = set"; then
3463   echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465   cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 /* System header to define __stub macros and hopefully few prototypes,
3469     which can conflict with char regcomp(); below.  */
3470 #include <assert.h>
3471 /* Override any gcc2 internal prototype to avoid an error.  */
3472 /* We use char because int might match the return type of a gcc2
3473     builtin and then its argument prototype would still apply.  */
3474 char regcomp();
3475
3476 int main() {
3477
3478 /* The GNU C library defines this for functions which it implements
3479     to always fail with ENOSYS.  Some functions are actually named
3480     something starting with __ and the normal name is an alias.  */
3481 #if defined (__stub_regcomp) || defined (__stub___regcomp)
3482 choke me
3483 #else
3484 regcomp();
3485 #endif
3486
3487 ; return 0; }
3488 EOF
3489 if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3490   rm -rf conftest*
3491   eval "ac_cv_func_regcomp=yes"
3492 else
3493   echo "configure: failed program was:" >&5
3494   cat conftest.$ac_ext >&5
3495   rm -rf conftest*
3496   eval "ac_cv_func_regcomp=no"
3497 fi
3498 rm -f conftest*
3499 fi
3500
3501 if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
3502   echo "$ac_t""yes" 1>&6
3503   :
3504 else
3505   echo "$ac_t""no" 1>&6
3506 { echo "configure: error: can't find POSIX regexp support" 1>&2; exit 1; }
3507 fi
3508
3509 fi
3510
3511 # Check whether --with-ares or --without-ares was given.
3512 if test "${with_ares+set}" = set; then
3513   withval="$with_ares"
3514   ares="$withval"
3515 else
3516   ares=no
3517 fi
3518
3519 if test "$ares" != no; then
3520         echo $ac_n "checking for res_send""... $ac_c" 1>&6
3521 echo "configure:3522: checking for res_send" >&5
3522 if eval "test \"`echo '$''{'ac_cv_func_res_send'+set}'`\" = set"; then
3523   echo $ac_n "(cached) $ac_c" 1>&6
3524 else
3525   cat > conftest.$ac_ext <<EOF
3526 #line 3527 "configure"
3527 #include "confdefs.h"
3528 /* System header to define __stub macros and hopefully few prototypes,
3529     which can conflict with char res_send(); below.  */
3530 #include <assert.h>
3531 /* Override any gcc2 internal prototype to avoid an error.  */
3532 /* We use char because int might match the return type of a gcc2
3533     builtin and then its argument prototype would still apply.  */
3534 char res_send();
3535
3536 int main() {
3537
3538 /* The GNU C library defines this for functions which it implements
3539     to always fail with ENOSYS.  Some functions are actually named
3540     something starting with __ and the normal name is an alias.  */
3541 #if defined (__stub_res_send) || defined (__stub___res_send)
3542 choke me
3543 #else
3544 res_send();
3545 #endif
3546
3547 ; return 0; }
3548 EOF
3549 if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3550   rm -rf conftest*
3551   eval "ac_cv_func_res_send=yes"
3552 else
3553   echo "configure: failed program was:" >&5
3554   cat conftest.$ac_ext >&5
3555   rm -rf conftest*
3556   eval "ac_cv_func_res_send=no"
3557 fi
3558 rm -f conftest*
3559 fi
3560
3561 if eval "test \"`echo '$ac_cv_func_'res_send`\" = yes"; then
3562   echo "$ac_t""yes" 1>&6
3563   :
3564 else
3565   echo "$ac_t""no" 1>&6
3566 echo $ac_n "checking for res_send in -lresolv""... $ac_c" 1>&6
3567 echo "configure:3568: checking for res_send in -lresolv" >&5
3568 ac_lib_var=`echo resolv'_'res_send | sed 'y%./+-%__p_%'`
3569 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3570   echo $ac_n "(cached) $ac_c" 1>&6
3571 else
3572   ac_save_LIBS="$LIBS"
3573 LIBS="-lresolv  $LIBS"
3574 cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577 /* Override any gcc2 internal prototype to avoid an error.  */
3578 /* We use char because int might match the return type of a gcc2
3579     builtin and then its argument prototype would still apply.  */
3580 char res_send();
3581
3582 int main() {
3583 res_send()
3584 ; return 0; }
3585 EOF
3586 if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3587   rm -rf conftest*
3588   eval "ac_cv_lib_$ac_lib_var=yes"
3589 else
3590   echo "configure: failed program was:" >&5
3591   cat conftest.$ac_ext >&5
3592   rm -rf conftest*
3593   eval "ac_cv_lib_$ac_lib_var=no"
3594 fi
3595 rm -f conftest*
3596 LIBS="$ac_save_LIBS"
3597
3598 fi
3599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3600   echo "$ac_t""yes" 1>&6
3601     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
3602     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3603   cat >> confdefs.h <<EOF
3604 #define $ac_tr_lib 1
3605 EOF
3606
3607   LIBS="-lresolv $LIBS"
3608
3609 else
3610   echo "$ac_t""no" 1>&6
3611 fi
3612
3613 fi
3614
3615 if test "$ares" != yes; then
3616         CPPFLAGS="$CPPFLAGS -I$ares/include"
3617         LDFLAGS="$LDFLAGS -L$ares/lib"
3618 fi
3619 echo $ac_n "checking for ares_init in -lares""... $ac_c" 1>&6
3620 echo "configure:3621: checking for ares_init in -lares" >&5
3621 ac_lib_var=`echo ares'_'ares_init | sed 'y%./+-%__p_%'`
3622 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3623   echo $ac_n "(cached) $ac_c" 1>&6
3624 else
3625   ac_save_LIBS="$LIBS"
3626 LIBS="-lares  $LIBS"
3627 cat > conftest.$ac_ext <<EOF
3628 #line 3629 "configure"
3629 #include "confdefs.h"
3630 /* Override any gcc2 internal prototype to avoid an error.  */
3631 /* We use char because int might match the return type of a gcc2
3632     builtin and then its argument prototype would still apply.  */
3633 char ares_init();
3634
3635 int main() {
3636 ares_init()
3637 ; return 0; }
3638 EOF
3639 if { (eval echo configure:3640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3640   rm -rf conftest*
3641   eval "ac_cv_lib_$ac_lib_var=yes"
3642 else
3643   echo "configure: failed program was:" >&5
3644   cat conftest.$ac_ext >&5
3645   rm -rf conftest*
3646   eval "ac_cv_lib_$ac_lib_var=no"
3647 fi
3648 rm -f conftest*
3649 LIBS="$ac_save_LIBS"
3650
3651 fi
3652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3653   echo "$ac_t""yes" 1>&6
3654   :
3655 else
3656   echo "$ac_t""no" 1>&6
3657 { echo "configure: error: libares not found" 1>&2; exit 1; }
3658 fi
3659
3660         ARES_LIBS="-lares"
3661         cat >> confdefs.h <<\EOF
3662 #define HAVE_ARES 1
3663 EOF
3664
3665 fi
3666
3667 # Check whether --with-com_err or --without-com_err was given.
3668 if test "${with_com_err+set}" = set; then
3669   withval="$with_com_err"
3670   com_err="$withval"
3671 else
3672   com_err=yes
3673 fi
3674
3675 if test "$com_err" != no; then
3676         if test "$com_err" != yes; then
3677                 CPPFLAGS="$CPPFLAGS -I$com_err/include"
3678                 LDFLAGS="$LDFLAGS -L$com_err/lib"
3679         fi
3680         echo $ac_n "checking for com_err in -lcom_err""... $ac_c" 1>&6
3681 echo "configure:3682: checking for com_err in -lcom_err" >&5
3682 ac_lib_var=`echo com_err'_'com_err | sed 'y%./+-%__p_%'`
3683 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3684   echo $ac_n "(cached) $ac_c" 1>&6
3685 else
3686   ac_save_LIBS="$LIBS"
3687 LIBS="-lcom_err  $LIBS"
3688 cat > conftest.$ac_ext <<EOF
3689 #line 3690 "configure"
3690 #include "confdefs.h"
3691 /* Override any gcc2 internal prototype to avoid an error.  */
3692 /* We use char because int might match the return type of a gcc2
3693     builtin and then its argument prototype would still apply.  */
3694 char com_err();
3695
3696 int main() {
3697 com_err()
3698 ; return 0; }
3699 EOF
3700 if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3701   rm -rf conftest*
3702   eval "ac_cv_lib_$ac_lib_var=yes"
3703 else
3704   echo "configure: failed program was:" >&5
3705   cat conftest.$ac_ext >&5
3706   rm -rf conftest*
3707   eval "ac_cv_lib_$ac_lib_var=no"
3708 fi
3709 rm -f conftest*
3710 LIBS="$ac_save_LIBS"
3711
3712 fi
3713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3714   echo "$ac_t""yes" 1>&6
3715   :
3716 else
3717   echo "$ac_t""no" 1>&6
3718 { echo "configure: error: com_err library not found" 1>&2; exit 1; }
3719 fi
3720
3721 else
3722         { echo "configure: error: This package requires com_err." 1>&2; exit 1; }
3723 fi
3724 # Check whether --with-ss or --without-ss was given.
3725 if test "${with_ss+set}" = set; then
3726   withval="$with_ss"
3727   ss="$withval"
3728 else
3729   ss=yes
3730 fi
3731
3732 if test "$ss" != no; then
3733         if test "$ss" != yes; then
3734                 CPPFLAGS="$CPPFLAGS -I$ss/include"
3735                 LDFLAGS="$LDFLAGS -L$ss/lib"
3736         fi
3737         echo $ac_n "checking for ss_perror in -lss""... $ac_c" 1>&6
3738 echo "configure:3739: checking for ss_perror in -lss" >&5
3739 ac_lib_var=`echo ss'_'ss_perror | sed 'y%./+-%__p_%'`
3740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3741   echo $ac_n "(cached) $ac_c" 1>&6
3742 else
3743   ac_save_LIBS="$LIBS"
3744 LIBS="-lss -lcom_err $LIBS"
3745 cat > conftest.$ac_ext <<EOF
3746 #line 3747 "configure"
3747 #include "confdefs.h"
3748 /* Override any gcc2 internal prototype to avoid an error.  */
3749 /* We use char because int might match the return type of a gcc2
3750     builtin and then its argument prototype would still apply.  */
3751 char ss_perror();
3752
3753 int main() {
3754 ss_perror()
3755 ; return 0; }
3756 EOF
3757 if { (eval echo configure:3758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3758   rm -rf conftest*
3759   eval "ac_cv_lib_$ac_lib_var=yes"
3760 else
3761   echo "configure: failed program was:" >&5
3762   cat conftest.$ac_ext >&5
3763   rm -rf conftest*
3764   eval "ac_cv_lib_$ac_lib_var=no"
3765 fi
3766 rm -f conftest*
3767 LIBS="$ac_save_LIBS"
3768
3769 fi
3770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3771   echo "$ac_t""yes" 1>&6
3772   :
3773 else
3774   echo "$ac_t""no" 1>&6
3775 { echo "configure: error: ss library not found" 1>&2; exit 1; }
3776 fi
3777
3778 else
3779         { echo "configure: error: This package requires ss." 1>&2; exit 1; }
3780 fi
3781 LIBS="$KRB4_LIBS $HESIOD_LIBS $LIBS"
3782
3783 if test $ac_cv_prog_gcc = yes; then
3784     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
3785 echo "configure:3786: checking whether ${CC-cc} needs -traditional" >&5
3786 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
3787   echo $ac_n "(cached) $ac_c" 1>&6
3788 else
3789     ac_pattern="Autoconf.*'x'"
3790   cat > conftest.$ac_ext <<EOF
3791 #line 3792 "configure"
3792 #include "confdefs.h"
3793 #include <sgtty.h>
3794 Autoconf TIOCGETP
3795 EOF
3796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3797   egrep "$ac_pattern" >/dev/null 2>&1; then
3798   rm -rf conftest*
3799   ac_cv_prog_gcc_traditional=yes
3800 else
3801   rm -rf conftest*
3802   ac_cv_prog_gcc_traditional=no
3803 fi
3804 rm -f conftest*
3805
3806
3807   if test $ac_cv_prog_gcc_traditional = no; then
3808     cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811 #include <termio.h>
3812 Autoconf TCGETA
3813 EOF
3814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3815   egrep "$ac_pattern" >/dev/null 2>&1; then
3816   rm -rf conftest*
3817   ac_cv_prog_gcc_traditional=yes
3818 fi
3819 rm -f conftest*
3820
3821   fi
3822 fi
3823
3824 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
3825   if test $ac_cv_prog_gcc_traditional = yes; then
3826     CC="$CC -traditional"
3827   fi
3828 fi
3829
3830 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
3831 echo "configure:3832: checking for vprintf" >&5
3832 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
3833   echo $ac_n "(cached) $ac_c" 1>&6
3834 else
3835   cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 /* System header to define __stub macros and hopefully few prototypes,
3839     which can conflict with char vprintf(); below.  */
3840 #include <assert.h>
3841 /* Override any gcc2 internal prototype to avoid an error.  */
3842 /* We use char because int might match the return type of a gcc2
3843     builtin and then its argument prototype would still apply.  */
3844 char vprintf();
3845
3846 int main() {
3847
3848 /* The GNU C library defines this for functions which it implements
3849     to always fail with ENOSYS.  Some functions are actually named
3850     something starting with __ and the normal name is an alias.  */
3851 #if defined (__stub_vprintf) || defined (__stub___vprintf)
3852 choke me
3853 #else
3854 vprintf();
3855 #endif
3856
3857 ; return 0; }
3858 EOF
3859 if { (eval echo configure:3860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3860   rm -rf conftest*
3861   eval "ac_cv_func_vprintf=yes"
3862 else
3863   echo "configure: failed program was:" >&5
3864   cat conftest.$ac_ext >&5
3865   rm -rf conftest*
3866   eval "ac_cv_func_vprintf=no"
3867 fi
3868 rm -f conftest*
3869 fi
3870
3871 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
3872   echo "$ac_t""yes" 1>&6
3873   cat >> confdefs.h <<\EOF
3874 #define HAVE_VPRINTF 1
3875 EOF
3876
3877 else
3878   echo "$ac_t""no" 1>&6
3879 fi
3880
3881 if test "$ac_cv_func_vprintf" != yes; then
3882 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
3883 echo "configure:3884: checking for _doprnt" >&5
3884 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
3885   echo $ac_n "(cached) $ac_c" 1>&6
3886 else
3887   cat > conftest.$ac_ext <<EOF
3888 #line 3889 "configure"
3889 #include "confdefs.h"
3890 /* System header to define __stub macros and hopefully few prototypes,
3891     which can conflict with char _doprnt(); below.  */
3892 #include <assert.h>
3893 /* Override any gcc2 internal prototype to avoid an error.  */
3894 /* We use char because int might match the return type of a gcc2
3895     builtin and then its argument prototype would still apply.  */
3896 char _doprnt();
3897
3898 int main() {
3899
3900 /* The GNU C library defines this for functions which it implements
3901     to always fail with ENOSYS.  Some functions are actually named
3902     something starting with __ and the normal name is an alias.  */
3903 #if defined (__stub__doprnt) || defined (__stub____doprnt)
3904 choke me
3905 #else
3906 _doprnt();
3907 #endif
3908
3909 ; return 0; }
3910 EOF
3911 if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3912   rm -rf conftest*
3913   eval "ac_cv_func__doprnt=yes"
3914 else
3915   echo "configure: failed program was:" >&5
3916   cat conftest.$ac_ext >&5
3917   rm -rf conftest*
3918   eval "ac_cv_func__doprnt=no"
3919 fi
3920 rm -f conftest*
3921 fi
3922
3923 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
3924   echo "$ac_t""yes" 1>&6
3925   cat >> confdefs.h <<\EOF
3926 #define HAVE_DOPRNT 1
3927 EOF
3928
3929 else
3930   echo "$ac_t""no" 1>&6
3931 fi
3932
3933 fi
3934
3935 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
3936 echo "configure:3937: checking whether getpgrp takes no argument" >&5
3937 if eval "test \"`echo '$''{'ac_cv_func_getpgrp_void'+set}'`\" = set"; then
3938   echo $ac_n "(cached) $ac_c" 1>&6
3939 else
3940   if test "$cross_compiling" = yes; then
3941   { echo "configure: error: cannot check getpgrp if cross compiling" 1>&2; exit 1; }
3942 else
3943   cat > conftest.$ac_ext <<EOF
3944 #line 3945 "configure"
3945 #include "confdefs.h"
3946
3947 /*
3948  * If this system has a BSD-style getpgrp(),
3949  * which takes a pid argument, exit unsuccessfully.
3950  *
3951  * Snarfed from Chet Ramey's bash pgrp.c test program
3952  */
3953 #include <stdio.h>
3954 #include <sys/types.h>
3955
3956 int     pid;
3957 int     pg1, pg2, pg3, pg4;
3958 int     ng, np, s, child;
3959
3960 main()
3961 {
3962         pid = getpid();
3963         pg1 = getpgrp(0);
3964         pg2 = getpgrp();
3965         pg3 = getpgrp(pid);
3966         pg4 = getpgrp(1);
3967
3968         /*
3969          * If all of these values are the same, it's pretty sure that
3970          * we're on a system that ignores getpgrp's first argument.
3971          */
3972         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
3973                 exit(0);
3974
3975         child = fork();
3976         if (child < 0)
3977                 exit(1);
3978         else if (child == 0) {
3979                 np = getpid();
3980                 /*
3981                  * If this is Sys V, this will not work; pgrp will be
3982                  * set to np because setpgrp just changes a pgrp to be
3983                  * the same as the pid.
3984                  */
3985                 setpgrp(np, pg1);
3986                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
3987                 if (ng == pg1) {
3988                         exit(1);
3989                 } else {
3990                         exit(0);
3991                 }
3992         } else {
3993                 wait(&s);
3994                 exit(s>>8);
3995         }
3996 }
3997
3998 EOF
3999 if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4000 then
4001   ac_cv_func_getpgrp_void=yes
4002 else
4003   echo "configure: failed program was:" >&5
4004   cat conftest.$ac_ext >&5
4005   rm -fr conftest*
4006   ac_cv_func_getpgrp_void=no
4007 fi
4008 rm -fr conftest*
4009 fi
4010
4011
4012 fi
4013
4014 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
4015 if test $ac_cv_func_getpgrp_void = yes; then
4016   cat >> confdefs.h <<\EOF
4017 #define GETPGRP_VOID 1
4018 EOF
4019
4020 fi
4021
4022 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4023 echo "configure:4024: checking whether setpgrp takes no argument" >&5
4024 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4025   echo $ac_n "(cached) $ac_c" 1>&6
4026 else
4027   if test "$cross_compiling" = yes; then
4028   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
4029 else
4030   cat > conftest.$ac_ext <<EOF
4031 #line 4032 "configure"
4032 #include "confdefs.h"
4033
4034 #ifdef HAVE_UNISTD_H
4035 #include <unistd.h>
4036 #endif
4037
4038 /*
4039  * If this system has a BSD-style setpgrp, which takes arguments, exit
4040  * successfully.
4041  */
4042 main()
4043 {
4044     if (setpgrp(1,1) == -1)
4045         exit(0);
4046     else
4047         exit(1);
4048 }
4049
4050 EOF
4051 if { (eval echo configure:4052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4052 then
4053   ac_cv_func_setpgrp_void=no
4054 else
4055   echo "configure: failed program was:" >&5
4056   cat conftest.$ac_ext >&5
4057   rm -fr conftest*
4058   ac_cv_func_setpgrp_void=yes
4059 fi
4060 rm -fr conftest*
4061 fi
4062
4063
4064 fi
4065
4066 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4067 if test $ac_cv_func_setpgrp_void = yes; then
4068   cat >> confdefs.h <<\EOF
4069 #define SETPGRP_VOID 1
4070 EOF
4071
4072 fi
4073
4074 for ac_func in putenv strchr memcpy memmove waitpid getlogin strerror random
4075 do
4076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4077 echo "configure:4078: checking for $ac_func" >&5
4078 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4079   echo $ac_n "(cached) $ac_c" 1>&6
4080 else
4081   cat > conftest.$ac_ext <<EOF
4082 #line 4083 "configure"
4083 #include "confdefs.h"
4084 /* System header to define __stub macros and hopefully few prototypes,
4085     which can conflict with char $ac_func(); below.  */
4086 #include <assert.h>
4087 /* Override any gcc2 internal prototype to avoid an error.  */
4088 /* We use char because int might match the return type of a gcc2
4089     builtin and then its argument prototype would still apply.  */
4090 char $ac_func();
4091
4092 int main() {
4093
4094 /* The GNU C library defines this for functions which it implements
4095     to always fail with ENOSYS.  Some functions are actually named
4096     something starting with __ and the normal name is an alias.  */
4097 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4098 choke me
4099 #else
4100 $ac_func();
4101 #endif
4102
4103 ; return 0; }
4104 EOF
4105 if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4106   rm -rf conftest*
4107   eval "ac_cv_func_$ac_func=yes"
4108 else
4109   echo "configure: failed program was:" >&5
4110   cat conftest.$ac_ext >&5
4111   rm -rf conftest*
4112   eval "ac_cv_func_$ac_func=no"
4113 fi
4114 rm -f conftest*
4115 fi
4116
4117 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4118   echo "$ac_t""yes" 1>&6
4119     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4120   cat >> confdefs.h <<EOF
4121 #define $ac_tr_func 1
4122 EOF
4123  
4124 else
4125   echo "$ac_t""no" 1>&6
4126 fi
4127 done
4128
4129 for ac_func in lrand48 gethostid getsid getpgid krb_get_err_text krb_log
4130 do
4131 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4132 echo "configure:4133: checking for $ac_func" >&5
4133 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4134   echo $ac_n "(cached) $ac_c" 1>&6
4135 else
4136   cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 /* System header to define __stub macros and hopefully few prototypes,
4140     which can conflict with char $ac_func(); below.  */
4141 #include <assert.h>
4142 /* Override any gcc2 internal prototype to avoid an error.  */
4143 /* We use char because int might match the return type of a gcc2
4144     builtin and then its argument prototype would still apply.  */
4145 char $ac_func();
4146
4147 int main() {
4148
4149 /* The GNU C library defines this for functions which it implements
4150     to always fail with ENOSYS.  Some functions are actually named
4151     something starting with __ and the normal name is an alias.  */
4152 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4153 choke me
4154 #else
4155 $ac_func();
4156 #endif
4157
4158 ; return 0; }
4159 EOF
4160 if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4161   rm -rf conftest*
4162   eval "ac_cv_func_$ac_func=yes"
4163 else
4164   echo "configure: failed program was:" >&5
4165   cat conftest.$ac_ext >&5
4166   rm -rf conftest*
4167   eval "ac_cv_func_$ac_func=no"
4168 fi
4169 rm -f conftest*
4170 fi
4171
4172 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4173   echo "$ac_t""yes" 1>&6
4174     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4175   cat >> confdefs.h <<EOF
4176 #define $ac_tr_func 1
4177 EOF
4178  
4179 else
4180   echo "$ac_t""no" 1>&6
4181 fi
4182 done
4183
4184
4185
4186 trap '' 1 2 15
4187 cat > confcache <<\EOF
4188 # This file is a shell script that caches the results of configure
4189 # tests run on this system so they can be shared between configure
4190 # scripts and configure runs.  It is not useful on other systems.
4191 # If it contains results you don't want to keep, you may remove or edit it.
4192 #
4193 # By default, configure uses ./config.cache as the cache file,
4194 # creating it if it does not exist already.  You can give configure
4195 # the --cache-file=FILE option to use a different cache file; that is
4196 # what configure does when it calls configure scripts in
4197 # subdirectories, so they share the cache.
4198 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4199 # config.status only pays attention to the cache file if you give it the
4200 # --recheck option to rerun configure.
4201 #
4202 EOF
4203 # The following way of writing the cache mishandles newlines in values,
4204 # but we know of no workaround that is simple, portable, and efficient.
4205 # So, don't put newlines in cache variables' values.
4206 # Ultrix sh set writes to stderr and can't be redirected directly,
4207 # and sets the high bit in the cache file unless we assign to the vars.
4208 (set) 2>&1 |
4209   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4210   *ac_space=\ *)
4211     # `set' does not quote correctly, so add quotes (double-quote substitution
4212     # turns \\\\ into \\, and sed turns \\ into \).
4213     sed -n \
4214       -e "s/'/'\\\\''/g" \
4215       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4216     ;;
4217   *)
4218     # `set' quotes correctly as required by POSIX, so do not add quotes.
4219     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4220     ;;
4221   esac >> confcache
4222 if cmp -s $cache_file confcache; then
4223   :
4224 else
4225   if test -w $cache_file; then
4226     echo "updating cache $cache_file"
4227     cat confcache > $cache_file
4228   else
4229     echo "not updating unwritable cache $cache_file"
4230   fi
4231 fi
4232 rm -f confcache
4233
4234 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4235
4236 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4237 # Let make expand exec_prefix.
4238 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4239
4240 # Any assignment to VPATH causes Sun make to only execute
4241 # the first set of double-colon rules, so remove it if not needed.
4242 # If there is a colon in the path, we need to keep it.
4243 if test "x$srcdir" = x.; then
4244   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4245 fi
4246
4247 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4248
4249 DEFS=-DHAVE_CONFIG_H
4250
4251 # Without the "./", some shells look in PATH for config.status.
4252 : ${CONFIG_STATUS=./config.status}
4253
4254 echo creating $CONFIG_STATUS
4255 rm -f $CONFIG_STATUS
4256 cat > $CONFIG_STATUS <<EOF
4257 #! /bin/sh
4258 # Generated automatically by configure.
4259 # Run this file to recreate the current configuration.
4260 # This directory was configured as follows,
4261 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4262 #
4263 # $0 $ac_configure_args
4264 #
4265 # Compiler output produced by configure, useful for debugging
4266 # configure, is in ./config.log if it exists.
4267
4268 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4269 for ac_option
4270 do
4271   case "\$ac_option" in
4272   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4273     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4274     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4275   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4276     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4277     exit 0 ;;
4278   -help | --help | --hel | --he | --h)
4279     echo "\$ac_cs_usage"; exit 0 ;;
4280   *) echo "\$ac_cs_usage"; exit 1 ;;
4281   esac
4282 done
4283
4284 ac_given_srcdir=$srcdir
4285 ac_given_INSTALL="$INSTALL"
4286
4287 trap 'rm -fr `echo "Makefile clients/Makefile clients/xzwrite/Makefile
4288           clients/zaway/Makefile clients/zctl/Makefile
4289           clients/zleave/Makefile clients/zlocate/Makefile
4290           clients/zmailnotify/Makefile clients/znol/Makefile
4291           clients/zpopnotify/Makefile clients/zshutdown_notify/Makefile
4292           clients/zstat/Makefile clients/zwrite/Makefile lib/Makefile
4293           libdyn/Makefile server/Makefile zhm/Makefile zwgc/Makefile h/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4294 EOF
4295 cat >> $CONFIG_STATUS <<EOF
4296
4297 # Protect against being on the right side of a sed subst in config.status.
4298 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4299  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4300 $ac_vpsub
4301 $extrasub
4302 s%@SHELL@%$SHELL%g
4303 s%@CFLAGS@%$CFLAGS%g
4304 s%@CPPFLAGS@%$CPPFLAGS%g
4305 s%@CXXFLAGS@%$CXXFLAGS%g
4306 s%@FFLAGS@%$FFLAGS%g
4307 s%@DEFS@%$DEFS%g
4308 s%@LDFLAGS@%$LDFLAGS%g
4309 s%@LIBS@%$LIBS%g
4310 s%@exec_prefix@%$exec_prefix%g
4311 s%@prefix@%$prefix%g
4312 s%@program_transform_name@%$program_transform_name%g
4313 s%@bindir@%$bindir%g
4314 s%@sbindir@%$sbindir%g
4315 s%@libexecdir@%$libexecdir%g
4316 s%@datadir@%$datadir%g
4317 s%@sysconfdir@%$sysconfdir%g
4318 s%@sharedstatedir@%$sharedstatedir%g
4319 s%@localstatedir@%$localstatedir%g
4320 s%@libdir@%$libdir%g
4321 s%@includedir@%$includedir%g
4322 s%@oldincludedir@%$oldincludedir%g
4323 s%@infodir@%$infodir%g
4324 s%@mandir@%$mandir%g
4325 s%@lbindir@%$lbindir%g
4326 s%@lsbindir@%$lsbindir%g
4327 s%@host@%$host%g
4328 s%@host_alias@%$host_alias%g
4329 s%@host_cpu@%$host_cpu%g
4330 s%@host_vendor@%$host_vendor%g
4331 s%@host_os@%$host_os%g
4332 s%@target@%$target%g
4333 s%@target_alias@%$target_alias%g
4334 s%@target_cpu@%$target_cpu%g
4335 s%@target_vendor@%$target_vendor%g
4336 s%@target_os@%$target_os%g
4337 s%@build@%$build%g
4338 s%@build_alias@%$build_alias%g
4339 s%@build_cpu@%$build_cpu%g
4340 s%@build_vendor@%$build_vendor%g
4341 s%@build_os@%$build_os%g
4342 s%@CC@%$CC%g
4343 s%@YACC@%$YACC%g
4344 s%@LEX@%$LEX%g
4345 s%@LEXLIB@%$LEXLIB%g
4346 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4347 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4348 s%@INSTALL_DATA@%$INSTALL_DATA%g
4349 s%@RANLIB@%$RANLIB%g
4350 s%@CPP@%$CPP%g
4351 s%@X_CFLAGS@%$X_CFLAGS%g
4352 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
4353 s%@X_LIBS@%$X_LIBS%g
4354 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
4355 s%@XCLIENTS@%$XCLIENTS%g
4356 s%@ZWGC_LIBX11@%$ZWGC_LIBX11%g
4357 s%@TLIB@%$TLIB%g
4358 s%@RLIB@%$RLIB%g
4359 s%@SLIB@%$SLIB%g
4360 s%@KRB4_LIBS@%$KRB4_LIBS%g
4361 s%@HESIOD_LIBS@%$HESIOD_LIBS%g
4362 s%@REGEX_LIBS@%$REGEX_LIBS%g
4363 s%@ARES_LIBS@%$ARES_LIBS%g
4364
4365 CEOF
4366 EOF
4367
4368 cat >> $CONFIG_STATUS <<\EOF
4369
4370 # Split the substitutions into bite-sized pieces for seds with
4371 # small command number limits, like on Digital OSF/1 and HP-UX.
4372 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4373 ac_file=1 # Number of current file.
4374 ac_beg=1 # First line for current file.
4375 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4376 ac_more_lines=:
4377 ac_sed_cmds=""
4378 while $ac_more_lines; do
4379   if test $ac_beg -gt 1; then
4380     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4381   else
4382     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4383   fi
4384   if test ! -s conftest.s$ac_file; then
4385     ac_more_lines=false
4386     rm -f conftest.s$ac_file
4387   else
4388     if test -z "$ac_sed_cmds"; then
4389       ac_sed_cmds="sed -f conftest.s$ac_file"
4390     else
4391       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4392     fi
4393     ac_file=`expr $ac_file + 1`
4394     ac_beg=$ac_end
4395     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4396   fi
4397 done
4398 if test -z "$ac_sed_cmds"; then
4399   ac_sed_cmds=cat
4400 fi
4401 EOF
4402
4403 cat >> $CONFIG_STATUS <<EOF
4404
4405 CONFIG_FILES=\${CONFIG_FILES-"Makefile clients/Makefile clients/xzwrite/Makefile
4406           clients/zaway/Makefile clients/zctl/Makefile
4407           clients/zleave/Makefile clients/zlocate/Makefile
4408           clients/zmailnotify/Makefile clients/znol/Makefile
4409           clients/zpopnotify/Makefile clients/zshutdown_notify/Makefile
4410           clients/zstat/Makefile clients/zwrite/Makefile lib/Makefile
4411           libdyn/Makefile server/Makefile zhm/Makefile zwgc/Makefile"}
4412 EOF
4413 cat >> $CONFIG_STATUS <<\EOF
4414 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4415   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4416   case "$ac_file" in
4417   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4418        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4419   *) ac_file_in="${ac_file}.in" ;;
4420   esac
4421
4422   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4423
4424   # Remove last slash and all that follows it.  Not all systems have dirname.
4425   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4426   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4427     # The file is in a subdirectory.
4428     test ! -d "$ac_dir" && mkdir "$ac_dir"
4429     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4430     # A "../" for each directory in $ac_dir_suffix.
4431     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4432   else
4433     ac_dir_suffix= ac_dots=
4434   fi
4435
4436   case "$ac_given_srcdir" in
4437   .)  srcdir=.
4438       if test -z "$ac_dots"; then top_srcdir=.
4439       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4440   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4441   *) # Relative path.
4442     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4443     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4444   esac
4445
4446   case "$ac_given_INSTALL" in
4447   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4448   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4449   esac
4450
4451   echo creating "$ac_file"
4452   rm -f "$ac_file"
4453   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4454   case "$ac_file" in
4455   *Makefile*) ac_comsub="1i\\
4456 # $configure_input" ;;
4457   *) ac_comsub= ;;
4458   esac
4459
4460   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4461   sed -e "$ac_comsub
4462 s%@configure_input@%$configure_input%g
4463 s%@srcdir@%$srcdir%g
4464 s%@top_srcdir@%$top_srcdir%g
4465 s%@INSTALL@%$INSTALL%g
4466 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4467 fi; done
4468 rm -f conftest.s*
4469
4470 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4471 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4472 #
4473 # ac_d sets the value in "#define NAME VALUE" lines.
4474 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4475 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4476 ac_dC='\3'
4477 ac_dD='%g'
4478 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4479 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4480 ac_uB='\([      ]\)%\1#\2define\3'
4481 ac_uC=' '
4482 ac_uD='\4%g'
4483 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4484 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4485 ac_eB='$%\1#\2define\3'
4486 ac_eC=' '
4487 ac_eD='%g'
4488
4489 if test "${CONFIG_HEADERS+set}" != set; then
4490 EOF
4491 cat >> $CONFIG_STATUS <<EOF
4492   CONFIG_HEADERS="h/config.h"
4493 EOF
4494 cat >> $CONFIG_STATUS <<\EOF
4495 fi
4496 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4497   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4498   case "$ac_file" in
4499   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4500        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4501   *) ac_file_in="${ac_file}.in" ;;
4502   esac
4503
4504   echo creating $ac_file
4505
4506   rm -f conftest.frag conftest.in conftest.out
4507   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4508   cat $ac_file_inputs > conftest.in
4509
4510 EOF
4511
4512 # Transform confdefs.h into a sed script conftest.vals that substitutes
4513 # the proper values into config.h.in to produce config.h.  And first:
4514 # Protect against being on the right side of a sed subst in config.status.
4515 # Protect against being in an unquoted here document in config.status.
4516 rm -f conftest.vals
4517 cat > conftest.hdr <<\EOF
4518 s/[\\&%]/\\&/g
4519 s%[\\$`]%\\&%g
4520 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4521 s%ac_d%ac_u%gp
4522 s%ac_u%ac_e%gp
4523 EOF
4524 sed -n -f conftest.hdr confdefs.h > conftest.vals
4525 rm -f conftest.hdr
4526
4527 # This sed command replaces #undef with comments.  This is necessary, for
4528 # example, in the case of _POSIX_SOURCE, which is predefined and required
4529 # on some systems where configure will not decide to define it.
4530 cat >> conftest.vals <<\EOF
4531 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4532 EOF
4533
4534 # Break up conftest.vals because some shells have a limit on
4535 # the size of here documents, and old seds have small limits too.
4536
4537 rm -f conftest.tail
4538 while :
4539 do
4540   ac_lines=`grep -c . conftest.vals`
4541   # grep -c gives empty output for an empty file on some AIX systems.
4542   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4543   # Write a limited-size here document to conftest.frag.
4544   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4545   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4546   echo 'CEOF
4547   sed -f conftest.frag conftest.in > conftest.out
4548   rm -f conftest.in
4549   mv conftest.out conftest.in
4550 ' >> $CONFIG_STATUS
4551   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4552   rm -f conftest.vals
4553   mv conftest.tail conftest.vals
4554 done
4555 rm -f conftest.vals
4556
4557 cat >> $CONFIG_STATUS <<\EOF
4558   rm -f conftest.frag conftest.h
4559   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4560   cat conftest.in >> conftest.h
4561   rm -f conftest.in
4562   if cmp -s $ac_file conftest.h 2>/dev/null; then
4563     echo "$ac_file is unchanged"
4564     rm -f conftest.h
4565   else
4566     # Remove last slash and all that follows it.  Not all systems have dirname.
4567       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4568       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4569       # The file is in a subdirectory.
4570       test ! -d "$ac_dir" && mkdir "$ac_dir"
4571     fi
4572     rm -f $ac_file
4573     mv conftest.h $ac_file
4574   fi
4575 fi; done
4576
4577 EOF
4578 cat >> $CONFIG_STATUS <<EOF
4579
4580 EOF
4581 cat >> $CONFIG_STATUS <<\EOF
4582
4583 exit 0
4584 EOF
4585 chmod +x $CONFIG_STATUS
4586 rm -fr confdefs* $ac_clean_files
4587 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4588