]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/cvs/configure
This commit was generated by cvs2svn to compensate for changes in r96364,
[FreeBSD/FreeBSD.git] / contrib / cvs / 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   --disable-dependency-tracking Speeds up one-time builds
16   --enable-dependency-tracking  Do not reject slow dependency extractors"
17 ac_help="$ac_help
18   --with-krb4=value       set default \$(KRB4) from value"
19 ac_help="$ac_help
20   --with-gssapi=value     GSSAPI directory"
21 ac_help="$ac_help
22   --enable-encryption     enable encryption support"
23 ac_help="$ac_help
24   --enable-client         include code for running as a remote client (default)
25   --disable-client        don't include remote client code"
26 ac_help="$ac_help
27   --enable-server         include code for running as a server (default)
28   --disable-server        don't include server code"
29
30 # Initialize some variables set by options.
31 # The variables have the same names as the options, with
32 # dashes changed to underlines.
33 build=NONE
34 cache_file=./config.cache
35 exec_prefix=NONE
36 host=NONE
37 no_create=
38 nonopt=NONE
39 no_recursion=
40 prefix=NONE
41 program_prefix=NONE
42 program_suffix=NONE
43 program_transform_name=s,x,x,
44 silent=
45 site=
46 srcdir=
47 target=NONE
48 verbose=
49 x_includes=NONE
50 x_libraries=NONE
51 bindir='${exec_prefix}/bin'
52 sbindir='${exec_prefix}/sbin'
53 libexecdir='${exec_prefix}/libexec'
54 datadir='${prefix}/share'
55 sysconfdir='${prefix}/etc'
56 sharedstatedir='${prefix}/com'
57 localstatedir='${prefix}/var'
58 libdir='${exec_prefix}/lib'
59 includedir='${prefix}/include'
60 oldincludedir='/usr/include'
61 infodir='${prefix}/info'
62 mandir='${prefix}/man'
63
64 # Initialize some other variables.
65 subdirs=
66 MFLAGS= MAKEFLAGS=
67 SHELL=${CONFIG_SHELL-/bin/sh}
68 # Maximum number of lines to put in a shell here document.
69 ac_max_here_lines=12
70
71 ac_prev=
72 for ac_option
73 do
74
75   # If the previous option needs an argument, assign it.
76   if test -n "$ac_prev"; then
77     eval "$ac_prev=\$ac_option"
78     ac_prev=
79     continue
80   fi
81
82   case "$ac_option" in
83   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
84   *) ac_optarg= ;;
85   esac
86
87   # Accept the important Cygnus configure options, so we can diagnose typos.
88
89   case "$ac_option" in
90
91   -bindir | --bindir | --bindi | --bind | --bin | --bi)
92     ac_prev=bindir ;;
93   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
94     bindir="$ac_optarg" ;;
95
96   -build | --build | --buil | --bui | --bu)
97     ac_prev=build ;;
98   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
99     build="$ac_optarg" ;;
100
101   -cache-file | --cache-file | --cache-fil | --cache-fi \
102   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
103     ac_prev=cache_file ;;
104   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
105   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
106     cache_file="$ac_optarg" ;;
107
108   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
109     ac_prev=datadir ;;
110   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
111   | --da=*)
112     datadir="$ac_optarg" ;;
113
114   -disable-* | --disable-*)
115     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
116     # Reject names that are not valid shell variable names.
117     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
118       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
119     fi
120     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
121     eval "enable_${ac_feature}=no" ;;
122
123   -enable-* | --enable-*)
124     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
125     # Reject names that are not valid shell variable names.
126     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
127       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
128     fi
129     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
130     case "$ac_option" in
131       *=*) ;;
132       *) ac_optarg=yes ;;
133     esac
134     eval "enable_${ac_feature}='$ac_optarg'" ;;
135
136   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
137   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
138   | --exec | --exe | --ex)
139     ac_prev=exec_prefix ;;
140   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
141   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
142   | --exec=* | --exe=* | --ex=*)
143     exec_prefix="$ac_optarg" ;;
144
145   -gas | --gas | --ga | --g)
146     # Obsolete; use --with-gas.
147     with_gas=yes ;;
148
149   -help | --help | --hel | --he)
150     # Omit some internal or obsolete options to make the list less imposing.
151     # This message is too long to be a string in the A/UX 3.1 sh.
152     cat << EOF
153 Usage: configure [options] [host]
154 Options: [defaults in brackets after descriptions]
155 Configuration:
156   --cache-file=FILE       cache test results in FILE
157   --help                  print this message
158   --no-create             do not create output files
159   --quiet, --silent       do not print \`checking...' messages
160   --version               print the version of autoconf that created configure
161 Directory and file names:
162   --prefix=PREFIX         install architecture-independent files in PREFIX
163                           [$ac_default_prefix]
164   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
165                           [same as prefix]
166   --bindir=DIR            user executables in DIR [EPREFIX/bin]
167   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
168   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
169   --datadir=DIR           read-only architecture-independent data in DIR
170                           [PREFIX/share]
171   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
172   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
173                           [PREFIX/com]
174   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
175   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
176   --includedir=DIR        C header files in DIR [PREFIX/include]
177   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
178   --infodir=DIR           info documentation in DIR [PREFIX/info]
179   --mandir=DIR            man documentation in DIR [PREFIX/man]
180   --srcdir=DIR            find the sources in DIR [configure dir or ..]
181   --program-prefix=PREFIX prepend PREFIX to installed program names
182   --program-suffix=SUFFIX append SUFFIX to installed program names
183   --program-transform-name=PROGRAM
184                           run sed PROGRAM on installed program names
185 EOF
186     cat << EOF
187 Host type:
188   --build=BUILD           configure for building on BUILD [BUILD=HOST]
189   --host=HOST             configure for HOST [guessed]
190   --target=TARGET         configure for TARGET [TARGET=HOST]
191 Features and packages:
192   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
193   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
194   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
195   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
196   --x-includes=DIR        X include files are in DIR
197   --x-libraries=DIR       X library files are in DIR
198 EOF
199     if test -n "$ac_help"; then
200       echo "--enable and --with options recognized:$ac_help"
201     fi
202     exit 0 ;;
203
204   -host | --host | --hos | --ho)
205     ac_prev=host ;;
206   -host=* | --host=* | --hos=* | --ho=*)
207     host="$ac_optarg" ;;
208
209   -includedir | --includedir | --includedi | --included | --include \
210   | --includ | --inclu | --incl | --inc)
211     ac_prev=includedir ;;
212   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
213   | --includ=* | --inclu=* | --incl=* | --inc=*)
214     includedir="$ac_optarg" ;;
215
216   -infodir | --infodir | --infodi | --infod | --info | --inf)
217     ac_prev=infodir ;;
218   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
219     infodir="$ac_optarg" ;;
220
221   -libdir | --libdir | --libdi | --libd)
222     ac_prev=libdir ;;
223   -libdir=* | --libdir=* | --libdi=* | --libd=*)
224     libdir="$ac_optarg" ;;
225
226   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
227   | --libexe | --libex | --libe)
228     ac_prev=libexecdir ;;
229   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
230   | --libexe=* | --libex=* | --libe=*)
231     libexecdir="$ac_optarg" ;;
232
233   -localstatedir | --localstatedir | --localstatedi | --localstated \
234   | --localstate | --localstat | --localsta | --localst \
235   | --locals | --local | --loca | --loc | --lo)
236     ac_prev=localstatedir ;;
237   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
238   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
239   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
240     localstatedir="$ac_optarg" ;;
241
242   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
243     ac_prev=mandir ;;
244   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
245     mandir="$ac_optarg" ;;
246
247   -nfp | --nfp | --nf)
248     # Obsolete; use --without-fp.
249     with_fp=no ;;
250
251   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
252   | --no-cr | --no-c)
253     no_create=yes ;;
254
255   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
256   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
257     no_recursion=yes ;;
258
259   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
260   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
261   | --oldin | --oldi | --old | --ol | --o)
262     ac_prev=oldincludedir ;;
263   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
264   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
265   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
266     oldincludedir="$ac_optarg" ;;
267
268   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
269     ac_prev=prefix ;;
270   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
271     prefix="$ac_optarg" ;;
272
273   -program-prefix | --program-prefix | --program-prefi | --program-pref \
274   | --program-pre | --program-pr | --program-p)
275     ac_prev=program_prefix ;;
276   -program-prefix=* | --program-prefix=* | --program-prefi=* \
277   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
278     program_prefix="$ac_optarg" ;;
279
280   -program-suffix | --program-suffix | --program-suffi | --program-suff \
281   | --program-suf | --program-su | --program-s)
282     ac_prev=program_suffix ;;
283   -program-suffix=* | --program-suffix=* | --program-suffi=* \
284   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
285     program_suffix="$ac_optarg" ;;
286
287   -program-transform-name | --program-transform-name \
288   | --program-transform-nam | --program-transform-na \
289   | --program-transform-n | --program-transform- \
290   | --program-transform | --program-transfor \
291   | --program-transfo | --program-transf \
292   | --program-trans | --program-tran \
293   | --progr-tra | --program-tr | --program-t)
294     ac_prev=program_transform_name ;;
295   -program-transform-name=* | --program-transform-name=* \
296   | --program-transform-nam=* | --program-transform-na=* \
297   | --program-transform-n=* | --program-transform-=* \
298   | --program-transform=* | --program-transfor=* \
299   | --program-transfo=* | --program-transf=* \
300   | --program-trans=* | --program-tran=* \
301   | --progr-tra=* | --program-tr=* | --program-t=*)
302     program_transform_name="$ac_optarg" ;;
303
304   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
305   | -silent | --silent | --silen | --sile | --sil)
306     silent=yes ;;
307
308   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
309     ac_prev=sbindir ;;
310   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
311   | --sbi=* | --sb=*)
312     sbindir="$ac_optarg" ;;
313
314   -sharedstatedir | --sharedstatedir | --sharedstatedi \
315   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
316   | --sharedst | --shareds | --shared | --share | --shar \
317   | --sha | --sh)
318     ac_prev=sharedstatedir ;;
319   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
320   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
321   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
322   | --sha=* | --sh=*)
323     sharedstatedir="$ac_optarg" ;;
324
325   -site | --site | --sit)
326     ac_prev=site ;;
327   -site=* | --site=* | --sit=*)
328     site="$ac_optarg" ;;
329
330   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
331     ac_prev=srcdir ;;
332   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
333     srcdir="$ac_optarg" ;;
334
335   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
336   | --syscon | --sysco | --sysc | --sys | --sy)
337     ac_prev=sysconfdir ;;
338   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
339   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
340     sysconfdir="$ac_optarg" ;;
341
342   -target | --target | --targe | --targ | --tar | --ta | --t)
343     ac_prev=target ;;
344   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
345     target="$ac_optarg" ;;
346
347   -v | -verbose | --verbose | --verbos | --verbo | --verb)
348     verbose=yes ;;
349
350   -version | --version | --versio | --versi | --vers)
351     echo "configure generated by autoconf version 2.13"
352     exit 0 ;;
353
354   -with-* | --with-*)
355     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
356     # Reject names that are not valid shell variable names.
357     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
358       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
359     fi
360     ac_package=`echo $ac_package| sed 's/-/_/g'`
361     case "$ac_option" in
362       *=*) ;;
363       *) ac_optarg=yes ;;
364     esac
365     eval "with_${ac_package}='$ac_optarg'" ;;
366
367   -without-* | --without-*)
368     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
369     # Reject names that are not valid shell variable names.
370     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
371       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
372     fi
373     ac_package=`echo $ac_package| sed 's/-/_/g'`
374     eval "with_${ac_package}=no" ;;
375
376   --x)
377     # Obsolete; use --with-x.
378     with_x=yes ;;
379
380   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
381   | --x-incl | --x-inc | --x-in | --x-i)
382     ac_prev=x_includes ;;
383   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
384   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
385     x_includes="$ac_optarg" ;;
386
387   -x-libraries | --x-libraries | --x-librarie | --x-librari \
388   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
389     ac_prev=x_libraries ;;
390   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
391   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
392     x_libraries="$ac_optarg" ;;
393
394   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
395     ;;
396
397   *)
398     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
399       echo "configure: warning: $ac_option: invalid host type" 1>&2
400     fi
401     if test "x$nonopt" != xNONE; then
402       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
403     fi
404     nonopt="$ac_option"
405     ;;
406
407   esac
408 done
409
410 if test -n "$ac_prev"; then
411   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
412 fi
413
414 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
415
416 # File descriptor usage:
417 # 0 standard input
418 # 1 file creation
419 # 2 errors and warnings
420 # 3 some systems may open it to /dev/tty
421 # 4 used on the Kubota Titan
422 # 6 checking for... messages and results
423 # 5 compiler messages saved in config.log
424 if test "$silent" = yes; then
425   exec 6>/dev/null
426 else
427   exec 6>&1
428 fi
429 exec 5>./config.log
430
431 echo "\
432 This file contains any messages produced by compilers while
433 running configure, to aid debugging if configure makes a mistake.
434 " 1>&5
435
436 # Strip out --no-create and --no-recursion so they do not pile up.
437 # Also quote any args containing shell metacharacters.
438 ac_configure_args=
439 for ac_arg
440 do
441   case "$ac_arg" in
442   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
443   | --no-cr | --no-c) ;;
444   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
445   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
446   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
447   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
448   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
449   esac
450 done
451
452 # NLS nuisances.
453 # Only set these to C if already set.  These must not be set unconditionally
454 # because not all systems understand e.g. LANG=C (notably SCO).
455 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
456 # Non-C LC_CTYPE values break the ctype check.
457 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
458 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
459 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
460 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
461
462 # confdefs.h avoids OS command line length limits that DEFS can exceed.
463 rm -rf conftest* confdefs.h
464 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
465 echo > confdefs.h
466
467 # A filename unique to this package, relative to the directory that
468 # configure is in, which we can look for to find out if srcdir is correct.
469 ac_unique_file=src/cvs.h
470
471 # Find the source files, if location was not specified.
472 if test -z "$srcdir"; then
473   ac_srcdir_defaulted=yes
474   # Try the directory containing this script, then its parent.
475   ac_prog=$0
476   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
477   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
478   srcdir=$ac_confdir
479   if test ! -r $srcdir/$ac_unique_file; then
480     srcdir=..
481   fi
482 else
483   ac_srcdir_defaulted=no
484 fi
485 if test ! -r $srcdir/$ac_unique_file; then
486   if test "$ac_srcdir_defaulted" = yes; then
487     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
488   else
489     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
490   fi
491 fi
492 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
493
494 # Prefer explicitly selected file to automatically selected ones.
495 if test -z "$CONFIG_SITE"; then
496   if test "x$prefix" != xNONE; then
497     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
498   else
499     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
500   fi
501 fi
502 for ac_site_file in $CONFIG_SITE; do
503   if test -r "$ac_site_file"; then
504     echo "loading site script $ac_site_file"
505     . "$ac_site_file"
506   fi
507 done
508
509 if test -r "$cache_file"; then
510   echo "loading cache $cache_file"
511   . $cache_file
512 else
513   echo "creating cache $cache_file"
514   > $cache_file
515 fi
516
517 ac_ext=c
518 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
519 ac_cpp='$CPP $CPPFLAGS'
520 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
521 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
522 cross_compiling=$ac_cv_prog_cc_cross
523
524 ac_exeext=
525 ac_objext=o
526 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
527   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
528   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
529     ac_n= ac_c='
530 ' ac_t='        '
531   else
532     ac_n=-n ac_c= ac_t=
533   fi
534 else
535   ac_n= ac_c='\c' ac_t=
536 fi
537
538
539 ac_aux_dir=
540 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
541   if test -f $ac_dir/install-sh; then
542     ac_aux_dir=$ac_dir
543     ac_install_sh="$ac_aux_dir/install-sh -c"
544     break
545   elif test -f $ac_dir/install.sh; then
546     ac_aux_dir=$ac_dir
547     ac_install_sh="$ac_aux_dir/install.sh -c"
548     break
549   fi
550 done
551 if test -z "$ac_aux_dir"; then
552   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
553 fi
554 ac_config_guess=$ac_aux_dir/config.guess
555 ac_config_sub=$ac_aux_dir/config.sub
556 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
557
558 # Find a good install program.  We prefer a C program (faster),
559 # so one script is as good as another.  But avoid the broken or
560 # incompatible versions:
561 # SysV /etc/install, /usr/sbin/install
562 # SunOS /usr/etc/install
563 # IRIX /sbin/install
564 # AIX /bin/install
565 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
566 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
567 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
568 # ./install, which can be erroneously created by make from ./install.sh.
569 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
570 echo "configure:571: checking for a BSD compatible install" >&5
571 if test -z "$INSTALL"; then
572 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
573   echo $ac_n "(cached) $ac_c" 1>&6
574 else
575     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
576   for ac_dir in $PATH; do
577     # Account for people who put trailing slashes in PATH elements.
578     case "$ac_dir/" in
579     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
580     *)
581       # OSF1 and SCO ODT 3.0 have their own names for install.
582       # Don't use installbsd from OSF since it installs stuff as root
583       # by default.
584       for ac_prog in ginstall scoinst install; do
585         if test -f $ac_dir/$ac_prog; then
586           if test $ac_prog = install &&
587             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
588             # AIX install.  It has an incompatible calling convention.
589             :
590           else
591             ac_cv_path_install="$ac_dir/$ac_prog -c"
592             break 2
593           fi
594         fi
595       done
596       ;;
597     esac
598   done
599   IFS="$ac_save_IFS"
600
601 fi
602   if test "${ac_cv_path_install+set}" = set; then
603     INSTALL="$ac_cv_path_install"
604   else
605     # As a last resort, use the slow shell script.  We don't cache a
606     # path for INSTALL within a source directory, because that will
607     # break other packages using the cache if that directory is
608     # removed, or if the path is relative.
609     INSTALL="$ac_install_sh"
610   fi
611 fi
612 echo "$ac_t""$INSTALL" 1>&6
613
614 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
615 # It thinks the first close brace ends the variable substitution.
616 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
617
618 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
619
620 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
621
622 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
623 echo "configure:624: checking whether build environment is sane" >&5
624 # Just in case
625 sleep 1
626 echo timestamp > conftest.file
627 # Do `set' in a subshell so we don't clobber the current shell's
628 # arguments.  Must try -L first in case configure is actually a
629 # symlink; some systems play weird games with the mod time of symlinks
630 # (eg FreeBSD returns the mod time of the symlink's containing
631 # directory).
632 if (
633    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
634    if test "$*" = "X"; then
635       # -L didn't work.
636       set X `ls -t $srcdir/configure conftest.file`
637    fi
638    if test "$*" != "X $srcdir/configure conftest.file" \
639       && test "$*" != "X conftest.file $srcdir/configure"; then
640
641       # If neither matched, then we have a broken ls.  This can happen
642       # if, for instance, CONFIG_SHELL is bash and it inherits a
643       # broken ls alias from the environment.  This has actually
644       # happened.  Such a system could not be considered "sane".
645       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
646 alias in your environment" 1>&2; exit 1; }
647    fi
648
649    test "$2" = conftest.file
650    )
651 then
652    # Ok.
653    :
654 else
655    { echo "configure: error: newly created file is older than distributed files!
656 Check your system clock" 1>&2; exit 1; }
657 fi
658 rm -f conftest*
659 echo "$ac_t""yes" 1>&6
660 if test "$program_transform_name" = s,x,x,; then
661   program_transform_name=
662 else
663   # Double any \ or $.  echo might interpret backslashes.
664   cat <<\EOF_SED > conftestsed
665 s,\\,\\\\,g; s,\$,$$,g
666 EOF_SED
667   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
668   rm -f conftestsed
669 fi
670 test "$program_prefix" != NONE &&
671   program_transform_name="s,^,${program_prefix},; $program_transform_name"
672 # Use a double $ so make ignores it.
673 test "$program_suffix" != NONE &&
674   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
675
676 # sed with no file args requires a program.
677 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
678
679 test x"${MISSING+set}" = xset ||
680   MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
681 # Use eval to expand $SHELL
682 if eval "$MISSING --run true"; then
683   am_missing_run="$MISSING --run "
684 else
685   am_missing_run=
686   am_backtick='`'
687   echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
688 fi
689
690 for ac_prog in gawk mawk nawk awk
691 do
692 # Extract the first word of "$ac_prog", so it can be a program name with args.
693 set dummy $ac_prog; ac_word=$2
694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
695 echo "configure:696: checking for $ac_word" >&5
696 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
697   echo $ac_n "(cached) $ac_c" 1>&6
698 else
699   if test -n "$AWK"; then
700   ac_cv_prog_AWK="$AWK" # Let the user override the test.
701 else
702   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
703   ac_dummy="$PATH"
704   for ac_dir in $ac_dummy; do
705     test -z "$ac_dir" && ac_dir=.
706     if test -f $ac_dir/$ac_word; then
707       ac_cv_prog_AWK="$ac_prog"
708       break
709     fi
710   done
711   IFS="$ac_save_ifs"
712 fi
713 fi
714 AWK="$ac_cv_prog_AWK"
715 if test -n "$AWK"; then
716   echo "$ac_t""$AWK" 1>&6
717 else
718   echo "$ac_t""no" 1>&6
719 fi
720
721 test -n "$AWK" && break
722 done
723
724 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
725 echo "configure:726: checking whether ${MAKE-make} sets \${MAKE}" >&5
726 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
727 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
728   echo $ac_n "(cached) $ac_c" 1>&6
729 else
730   cat > conftestmake <<\EOF
731 all:
732         @echo 'ac_maketemp="${MAKE}"'
733 EOF
734 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
735 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
736 if test -n "$ac_maketemp"; then
737   eval ac_cv_prog_make_${ac_make}_set=yes
738 else
739   eval ac_cv_prog_make_${ac_make}_set=no
740 fi
741 rm -f conftestmake
742 fi
743 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
744   echo "$ac_t""yes" 1>&6
745   SET_MAKE=
746 else
747   echo "$ac_t""no" 1>&6
748   SET_MAKE="MAKE=${MAKE-make}"
749 fi
750
751 # Extract the first word of "etags", so it can be a program name with args.
752 set dummy etags; ac_word=$2
753 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
754 echo "configure:755: checking for $ac_word" >&5
755 if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
756   echo $ac_n "(cached) $ac_c" 1>&6
757 else
758   if test -n "$ETAGS"; then
759   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
760 else
761   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
762   ac_dummy="$PATH"
763   for ac_dir in $ac_dummy; do
764     test -z "$ac_dir" && ac_dir=.
765     if test -f $ac_dir/$ac_word; then
766       ac_cv_prog_ETAGS="etags"
767       break
768     fi
769   done
770   IFS="$ac_save_ifs"
771 fi
772 fi
773 ETAGS="$ac_cv_prog_ETAGS"
774 if test -n "$ETAGS"; then
775   echo "$ac_t""$ETAGS" 1>&6
776 else
777   echo "$ac_t""no" 1>&6
778 fi
779
780 if test -z "$ETAGS"; then
781   # Extract the first word of "ctags", so it can be a program name with args.
782 set dummy ctags; ac_word=$2
783 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
784 echo "configure:785: checking for $ac_word" >&5
785 if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
786   echo $ac_n "(cached) $ac_c" 1>&6
787 else
788   if test -n "$ETAGS"; then
789   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
790 else
791   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
792   ac_dummy="$PATH"
793   for ac_dir in $ac_dummy; do
794     test -z "$ac_dir" && ac_dir=.
795     if test -f $ac_dir/$ac_word; then
796       ac_cv_prog_ETAGS="ctags -e"
797       break
798     fi
799   done
800   IFS="$ac_save_ifs"
801 fi
802 fi
803 ETAGS="$ac_cv_prog_ETAGS"
804 if test -n "$ETAGS"; then
805   echo "$ac_t""$ETAGS" 1>&6
806 else
807   echo "$ac_t""no" 1>&6
808 fi
809
810 fi
811 if test -n "$ETAGS"; then
812         echo $ac_n "checking whether ${ETAGS-etags} works""... $ac_c" 1>&6
813 echo "configure:814: checking whether ${ETAGS-etags} works" >&5
814 if eval "test \"`echo '$''{'am_cv_prog_etags_works'+set}'`\" = set"; then
815   echo $ac_n "(cached) $ac_c" 1>&6
816 else
817   cat >conftest.c <<EOF
818 int globalvar;
819 EOF
820 if { ac_try='${ETAGS-etags} -f - conftest.c |egrep ^int\ globalvar\; >&2'; { (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
821         am_cv_prog_etags_works=yes
822 else
823         am_cv_prog_etags_works=no
824 fi
825 rm -f conftest.c
826 fi
827
828 echo "$ac_t""$am_cv_prog_etags_works" 1>&6
829         if test "$am_cv_prog_etags_works" = yes ; then
830                 if test "$am_cv_prog_etags_works" = yes ; then
831         echo $ac_n "checking for etags include option""... $ac_c" 1>&6
832 echo "configure:833: checking for etags include option" >&5
833 if eval "test \"`echo '$''{'am_cv_prog_etags_include_option'+set}'`\" = set"; then
834   echo $ac_n "(cached) $ac_c" 1>&6
835 else
836   cat >conftest.c <<EOF
837 int globalvar;
838 EOF
839         if { ac_try='${ETAGS-etags} --etags-include=TAGS.inc -f - conftest.c |egrep ^TAGS.inc,include\$ >&2'; { (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
840                 am_cv_prog_etags_include_option=--etags-include=
841         elif { ac_try='${ETAGS-etags} -i TAGS.inc -f - conftest.c |egrep ^TAGS.inc,include\$ >&2'; { (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
842                 am_cv_prog_etags_include_option='"-i "'
843         else :
844                 # AC_MSG_ERROR(unfamiliar etags implementation)
845         fi
846         rm -f conftest.c
847 fi
848
849 echo "$ac_t""$am_cv_prog_etags_include_option" 1>&6
850 else
851         :
852 fi
853 ETAGS_INCLUDE_OPTION="$am_cv_prog_etags_include_option"
854
855         else
856                 
857 ETAGS=${ETAGS-"${am_missing_run}etags"}
858
859         fi
860 else
861         
862 ETAGS=${ETAGS-"${am_missing_run}etags"}
863
864 fi
865 # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
866 if test "${enable_dependency_tracking+set}" = set; then
867   enableval="$enable_dependency_tracking"
868   :
869 fi
870
871 if test "x$enable_dependency_tracking" != xno; then
872   am_depcomp="$ac_aux_dir/depcomp"
873   AMDEPBACKSLASH='\'
874 fi
875
876
877 if test "x$enable_dependency_tracking" != xno; then
878   AMDEP_TRUE=
879   AMDEP_FALSE='#'
880 else
881   AMDEP_TRUE='#'
882   AMDEP_FALSE=
883 fi
884
885
886
887
888 if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
889   DEPDIR=.deps
890   # We redirect because .deps might already exist and be populated.
891   # In this situation we don't want to see an error.
892   rmdir .deps > /dev/null 2>&1
893 else
894   DEPDIR=_deps
895 fi
896
897
898 # test to see if srcdir already configured
899 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
900    test -f $srcdir/config.status; then
901   { echo "configure: error: source directory already configured; run \"make distclean\" there first" 1>&2; exit 1; }
902 fi
903
904 # Define the identity of the package.
905 PACKAGE=cvs
906 VERSION=1.11.1p1
907 cat >> confdefs.h <<EOF
908 #define PACKAGE "$PACKAGE"
909 EOF
910
911 cat >> confdefs.h <<EOF
912 #define VERSION "$VERSION"
913 EOF
914
915
916 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
917 # the ones we care about.
918
919 # Some tools Automake needs.
920
921 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
922
923
924 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
925
926
927 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
928
929
930 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
931
932
933 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
934
935
936 AMTAR=${AMTAR-"${am_missing_run}tar"}
937
938
939 if test -z "$install_sh"; then
940    for install_sh in "$ac_aux_dir/install-sh" \
941                      "$ac_aux_dir/install.sh" \
942                      "${am_missing_run}${ac_auxdir}/install-sh";
943    do
944      test -f "$install_sh" && break
945    done
946    # FIXME: an evil hack: we remove the SHELL invocation from
947    # install_sh because automake adds it back in.  Sigh.
948    install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
949 fi
950
951
952 # We'd like to do this but we can't because it will unconditionally
953 # require config.guess.  One way would be if autoconf had the capability
954 # to let us compile in this code only when config.guess was already
955 # a possibility.
956 #if test "$cross_compiling" != no; then
957 #  # since we are cross-compiling, we need to check for a suitable `strip'
958 #  AM_PROG_STRIP
959 #  if test -z "$STRIP"; then
960 #    AC_MSG_WARN([strip missing, install-strip will not strip binaries])
961 #  fi
962 #fi
963
964 # If $STRIP is defined (either by the user, or by AM_PROG_STRIP),
965 # instruct install-strip to use install-sh and the given $STRIP program.
966 # Otherwise, just use ${INSTALL}: the idea is to use the vendor install
967 # as much as possible, because it's faster.
968 if test -z "$STRIP"; then
969   # The top level make will set INSTALL_PROGRAM=$(INSTALL_STRIP_PROGRAM)
970   # and the double dolard below is there to make sure that ${INSTALL}
971   # is substitued in the sub-makes, not at the top-level; this is
972   # needed if ${INSTALL} is a relative path (ajusted in each subdirectory
973   # by config.status).
974   INSTALL_STRIP_PROGRAM='$${INSTALL} -s'
975   INSTALL_STRIP_PROGRAM_ENV=''
976 else
977   _am_dirpart="`echo $install_sh | sed -e 's,//*[^/]*$,,'`"
978   INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
979   INSTALL_STRIP_PROGRAM_ENV="STRIPPROG='\$(STRIP)'"
980 fi
981
982
983
984 # We need awk for the "check" target.  The system "awk" is bad on
985 # some platforms.
986
987
988 if test "x$prefix" = xNONE; then
989 echo $ac_n "checking for prefix by $ac_c" 1>&6
990 # Extract the first word of "cvs", so it can be a program name with args.
991 set dummy cvs; ac_word=$2
992 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
993 echo "configure:994: checking for $ac_word" >&5
994 if eval "test \"`echo '$''{'ac_cv_path_CVS'+set}'`\" = set"; then
995   echo $ac_n "(cached) $ac_c" 1>&6
996 else
997   case "$CVS" in
998   /*)
999   ac_cv_path_CVS="$CVS" # Let the user override the test with a path.
1000   ;;
1001   ?:/*)                  
1002   ac_cv_path_CVS="$CVS" # Let the user override the test with a dos path.
1003   ;;
1004   *)
1005   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1006   ac_dummy="$PATH"
1007   for ac_dir in $ac_dummy; do 
1008     test -z "$ac_dir" && ac_dir=.
1009     if test -f $ac_dir/$ac_word; then
1010       ac_cv_path_CVS="$ac_dir/$ac_word"
1011       break
1012     fi
1013   done
1014   IFS="$ac_save_ifs"
1015   ;;
1016 esac
1017 fi
1018 CVS="$ac_cv_path_CVS"
1019 if test -n "$CVS"; then
1020   echo "$ac_t""$CVS" 1>&6
1021 else
1022   echo "$ac_t""no" 1>&6
1023 fi
1024
1025   if test -n "$ac_cv_path_CVS"; then
1026     prefix=`echo $ac_cv_path_CVS|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
1027   fi
1028 fi
1029
1030
1031   
1032
1033
1034 for ac_prog in gawk mawk nawk awk
1035 do
1036 # Extract the first word of "$ac_prog", so it can be a program name with args.
1037 set dummy $ac_prog; ac_word=$2
1038 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1039 echo "configure:1040: checking for $ac_word" >&5
1040 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1041   echo $ac_n "(cached) $ac_c" 1>&6
1042 else
1043   if test -n "$AWK"; then
1044   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1045 else
1046   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1047   ac_dummy="$PATH"
1048   for ac_dir in $ac_dummy; do
1049     test -z "$ac_dir" && ac_dir=.
1050     if test -f $ac_dir/$ac_word; then
1051       ac_cv_prog_AWK="$ac_prog"
1052       break
1053     fi
1054   done
1055   IFS="$ac_save_ifs"
1056 fi
1057 fi
1058 AWK="$ac_cv_prog_AWK"
1059 if test -n "$AWK"; then
1060   echo "$ac_t""$AWK" 1>&6
1061 else
1062   echo "$ac_t""no" 1>&6
1063 fi
1064
1065 test -n "$AWK" && break
1066 done
1067
1068 # Extract the first word of "gcc", so it can be a program name with args.
1069 set dummy gcc; ac_word=$2
1070 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1071 echo "configure:1072: checking for $ac_word" >&5
1072 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1073   echo $ac_n "(cached) $ac_c" 1>&6
1074 else
1075   if test -n "$CC"; then
1076   ac_cv_prog_CC="$CC" # Let the user override the test.
1077 else
1078   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1079   ac_dummy="$PATH"
1080   for ac_dir in $ac_dummy; do
1081     test -z "$ac_dir" && ac_dir=.
1082     if test -f $ac_dir/$ac_word; then
1083       ac_cv_prog_CC="gcc"
1084       break
1085     fi
1086   done
1087   IFS="$ac_save_ifs"
1088 fi
1089 fi
1090 CC="$ac_cv_prog_CC"
1091 if test -n "$CC"; then
1092   echo "$ac_t""$CC" 1>&6
1093 else
1094   echo "$ac_t""no" 1>&6
1095 fi
1096
1097 if test -z "$CC"; then
1098   # Extract the first word of "cc", so it can be a program name with args.
1099 set dummy cc; ac_word=$2
1100 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1101 echo "configure:1102: checking for $ac_word" >&5
1102 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1103   echo $ac_n "(cached) $ac_c" 1>&6
1104 else
1105   if test -n "$CC"; then
1106   ac_cv_prog_CC="$CC" # Let the user override the test.
1107 else
1108   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1109   ac_prog_rejected=no
1110   ac_dummy="$PATH"
1111   for ac_dir in $ac_dummy; do
1112     test -z "$ac_dir" && ac_dir=.
1113     if test -f $ac_dir/$ac_word; then
1114       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1115         ac_prog_rejected=yes
1116         continue
1117       fi
1118       ac_cv_prog_CC="cc"
1119       break
1120     fi
1121   done
1122   IFS="$ac_save_ifs"
1123 if test $ac_prog_rejected = yes; then
1124   # We found a bogon in the path, so make sure we never use it.
1125   set dummy $ac_cv_prog_CC
1126   shift
1127   if test $# -gt 0; then
1128     # We chose a different compiler from the bogus one.
1129     # However, it has the same basename, so the bogon will be chosen
1130     # first if we set CC to just the basename; use the full file name.
1131     shift
1132     set dummy "$ac_dir/$ac_word" "$@"
1133     shift
1134     ac_cv_prog_CC="$@"
1135   fi
1136 fi
1137 fi
1138 fi
1139 CC="$ac_cv_prog_CC"
1140 if test -n "$CC"; then
1141   echo "$ac_t""$CC" 1>&6
1142 else
1143   echo "$ac_t""no" 1>&6
1144 fi
1145
1146   if test -z "$CC"; then
1147     case "`uname -s`" in
1148     *win32* | *WIN32*)
1149       # Extract the first word of "cl", so it can be a program name with args.
1150 set dummy cl; ac_word=$2
1151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1152 echo "configure:1153: checking for $ac_word" >&5
1153 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1154   echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156   if test -n "$CC"; then
1157   ac_cv_prog_CC="$CC" # Let the user override the test.
1158 else
1159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1160   ac_dummy="$PATH"
1161   for ac_dir in $ac_dummy; do
1162     test -z "$ac_dir" && ac_dir=.
1163     if test -f $ac_dir/$ac_word; then
1164       ac_cv_prog_CC="cl"
1165       break
1166     fi
1167   done
1168   IFS="$ac_save_ifs"
1169 fi
1170 fi
1171 CC="$ac_cv_prog_CC"
1172 if test -n "$CC"; then
1173   echo "$ac_t""$CC" 1>&6
1174 else
1175   echo "$ac_t""no" 1>&6
1176 fi
1177  ;;
1178     esac
1179   fi
1180   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1181 fi
1182
1183 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1184 echo "configure:1185: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1185
1186 ac_ext=c
1187 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1188 ac_cpp='$CPP $CPPFLAGS'
1189 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1190 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1191 cross_compiling=$ac_cv_prog_cc_cross
1192
1193 cat > conftest.$ac_ext << EOF
1194
1195 #line 1196 "configure"
1196 #include "confdefs.h"
1197
1198 main(){return(0);}
1199 EOF
1200 if { (eval echo configure:1201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1201   ac_cv_prog_cc_works=yes
1202   # If we can't run a trivial program, we are probably using a cross compiler.
1203   if (./conftest; exit) 2>/dev/null; then
1204     ac_cv_prog_cc_cross=no
1205   else
1206     ac_cv_prog_cc_cross=yes
1207   fi
1208 else
1209   echo "configure: failed program was:" >&5
1210   cat conftest.$ac_ext >&5
1211   ac_cv_prog_cc_works=no
1212 fi
1213 rm -fr conftest*
1214 ac_ext=c
1215 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1216 ac_cpp='$CPP $CPPFLAGS'
1217 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1218 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1219 cross_compiling=$ac_cv_prog_cc_cross
1220
1221 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1222 if test $ac_cv_prog_cc_works = no; then
1223   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1224 fi
1225 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1226 echo "configure:1227: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1227 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1228 cross_compiling=$ac_cv_prog_cc_cross
1229
1230 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1231 echo "configure:1232: checking whether we are using GNU C" >&5
1232 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1233   echo $ac_n "(cached) $ac_c" 1>&6
1234 else
1235   cat > conftest.c <<EOF
1236 #ifdef __GNUC__
1237   yes;
1238 #endif
1239 EOF
1240 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1241   ac_cv_prog_gcc=yes
1242 else
1243   ac_cv_prog_gcc=no
1244 fi
1245 fi
1246
1247 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1248
1249 if test $ac_cv_prog_gcc = yes; then
1250   GCC=yes
1251 else
1252   GCC=
1253 fi
1254
1255 ac_test_CFLAGS="${CFLAGS+set}"
1256 ac_save_CFLAGS="$CFLAGS"
1257 CFLAGS=
1258 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1259 echo "configure:1260: checking whether ${CC-cc} accepts -g" >&5
1260 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1261   echo $ac_n "(cached) $ac_c" 1>&6
1262 else
1263   echo 'void f(){}' > conftest.c
1264 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1265   ac_cv_prog_cc_g=yes
1266 else
1267   ac_cv_prog_cc_g=no
1268 fi
1269 rm -f conftest*
1270
1271 fi
1272
1273 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1274 if test "$ac_test_CFLAGS" = set; then
1275   CFLAGS="$ac_save_CFLAGS"
1276 elif test $ac_cv_prog_cc_g = yes; then
1277   if test "$GCC" = yes; then
1278     CFLAGS="-g -O2"
1279   else
1280     CFLAGS="-g"
1281   fi
1282 else
1283   if test "$GCC" = yes; then
1284     CFLAGS="-O2"
1285   else
1286     CFLAGS=
1287   fi
1288 fi
1289
1290
1291 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1292 echo "configure:1293: checking how to run the C preprocessor" >&5
1293 # On Suns, sometimes $CPP names a directory.
1294 if test -n "$CPP" && test -d "$CPP"; then
1295   CPP=
1296 fi
1297 if test -z "$CPP"; then
1298 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1299   echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301     # This must be in double quotes, not single quotes, because CPP may get
1302   # substituted into the Makefile and "${CC-cc}" will confuse make.
1303   CPP="${CC-cc} -E"
1304   # On the NeXT, cc -E runs the code through the compiler's parser,
1305   # not just through cpp.
1306   cat > conftest.$ac_ext <<EOF
1307 #line 1308 "configure"
1308 #include "confdefs.h"
1309 #include <assert.h>
1310 Syntax Error
1311 EOF
1312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1313 { (eval echo configure:1314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1314 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1315 if test -z "$ac_err"; then
1316   :
1317 else
1318   echo "$ac_err" >&5
1319   echo "configure: failed program was:" >&5
1320   cat conftest.$ac_ext >&5
1321   rm -rf conftest*
1322   CPP="${CC-cc} -E -traditional-cpp"
1323   cat > conftest.$ac_ext <<EOF
1324 #line 1325 "configure"
1325 #include "confdefs.h"
1326 #include <assert.h>
1327 Syntax Error
1328 EOF
1329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1330 { (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1332 if test -z "$ac_err"; then
1333   :
1334 else
1335   echo "$ac_err" >&5
1336   echo "configure: failed program was:" >&5
1337   cat conftest.$ac_ext >&5
1338   rm -rf conftest*
1339   CPP="${CC-cc} -nologo -E"
1340   cat > conftest.$ac_ext <<EOF
1341 #line 1342 "configure"
1342 #include "confdefs.h"
1343 #include <assert.h>
1344 Syntax Error
1345 EOF
1346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1347 { (eval echo configure:1348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1349 if test -z "$ac_err"; then
1350   :
1351 else
1352   echo "$ac_err" >&5
1353   echo "configure: failed program was:" >&5
1354   cat conftest.$ac_ext >&5
1355   rm -rf conftest*
1356   CPP=/lib/cpp
1357 fi
1358 rm -f conftest*
1359 fi
1360 rm -f conftest*
1361 fi
1362 rm -f conftest*
1363   ac_cv_prog_CPP="$CPP"
1364 fi
1365   CPP="$ac_cv_prog_CPP"
1366 else
1367   ac_cv_prog_CPP="$CPP"
1368 fi
1369 echo "$ac_t""$CPP" 1>&6
1370
1371 am_make=${MAKE-make}
1372 cat > confinc << 'END'
1373 doit:
1374         @echo done
1375 END
1376 # If we don't find an include directive, just comment out the code.
1377 echo $ac_n "checking for style of include used by $am_make""... $ac_c" 1>&6
1378 echo "configure:1379: checking for style of include used by $am_make" >&5
1379 _am_include='#'
1380 _am_quote=
1381 _am_result=none
1382 # First try GNU make style include.
1383 echo "include confinc" > confmf
1384 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1385    _am_include=include
1386    _am_quote=
1387    _am_result=GNU
1388 fi
1389 # Now try BSD make style include.
1390 if test "$_am_include" = "#"; then
1391    echo '.include "confinc"' > confmf
1392    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1393       _am_include=.include
1394       _am_quote='"'
1395       _am_result=BSD
1396    fi
1397 fi
1398
1399
1400 echo "$ac_t""$_am_result" 1>&6
1401 rm -f confinc confmf
1402
1403
1404 depcc="$CC"
1405 depcpp="$CPP"
1406
1407
1408
1409 echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
1410 echo "configure:1411: checking dependency style of $depcc" >&5
1411 if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then
1412   echo $ac_n "(cached) $ac_c" 1>&6
1413 else
1414   if test -z "$AMDEP"; then
1415   # We make a subdir and do the tests there.  Otherwise we can end up
1416   # making bogus files that we don't know about and never remove.  For
1417   # instance it was reported that on HP-UX the gcc test will end up
1418   # making a dummy file named `D' -- because `-MD' means `put the output
1419   # in D'.
1420   mkdir confdir
1421   # Copy depcomp to subdir because otherwise we won't find it if we're
1422   # using a relative directory.
1423   cp "$am_depcomp" confdir
1424   cd confdir
1425
1426   am_cv_CC_dependencies_compiler_type=none
1427   for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "./depcomp"`; do
1428     # We need to recreate these files for each test, as the compiler may
1429     # overwrite some of them when testing with obscure command lines.
1430     # This happens at least with the AIX C compiler.
1431     echo '#include "conftest.h"' > conftest.c
1432     echo 'int i;' > conftest.h
1433
1434     case "$depmode" in
1435     nosideeffect)
1436       # after this tag, mechanisms are not by side-effect, so they'll
1437       # only be used when explicitly requested
1438       if test "x$enable_dependency_tracking" = xyes; then
1439         continue
1440       else
1441         break
1442       fi
1443       ;;
1444     none) break ;;
1445     esac
1446     # We check with `-c' and `-o' for the sake of the "dashmstdout"
1447     # mode.  It turns out that the SunPro C++ compiler does not properly
1448     # handle `-M -o', and we need to detect this.
1449     if depmode="$depmode" \
1450        source=conftest.c object=conftest.o \
1451        depfile=conftest.Po tmpdepfile=conftest.TPo \
1452        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
1453        grep conftest.h conftest.Po > /dev/null 2>&1; then
1454       am_cv_CC_dependencies_compiler_type="$depmode"
1455       break
1456     fi
1457   done
1458
1459   cd ..
1460   rm -rf confdir
1461 else
1462   am_cv_CC_dependencies_compiler_type=none
1463 fi
1464
1465 fi
1466
1467 echo "$ac_t""$am_cv_CC_dependencies_compiler_type" 1>&6
1468 CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
1469
1470
1471 # Find a good install program.  We prefer a C program (faster),
1472 # so one script is as good as another.  But avoid the broken or
1473 # incompatible versions:
1474 # SysV /etc/install, /usr/sbin/install
1475 # SunOS /usr/etc/install
1476 # IRIX /sbin/install
1477 # AIX /bin/install
1478 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1479 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1480 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1481 # ./install, which can be erroneously created by make from ./install.sh.
1482 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1483 echo "configure:1484: checking for a BSD compatible install" >&5
1484 if test -z "$INSTALL"; then
1485 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1486   echo $ac_n "(cached) $ac_c" 1>&6
1487 else
1488     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1489   for ac_dir in $PATH; do
1490     # Account for people who put trailing slashes in PATH elements.
1491     case "$ac_dir/" in
1492     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1493     *)
1494       # OSF1 and SCO ODT 3.0 have their own names for install.
1495       # Don't use installbsd from OSF since it installs stuff as root
1496       # by default.
1497       for ac_prog in ginstall scoinst install; do
1498         if test -f $ac_dir/$ac_prog; then
1499           if test $ac_prog = install &&
1500             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1501             # AIX install.  It has an incompatible calling convention.
1502             :
1503           else
1504             ac_cv_path_install="$ac_dir/$ac_prog -c"
1505             break 2
1506           fi
1507         fi
1508       done
1509       ;;
1510     esac
1511   done
1512   IFS="$ac_save_IFS"
1513
1514 fi
1515   if test "${ac_cv_path_install+set}" = set; then
1516     INSTALL="$ac_cv_path_install"
1517   else
1518     # As a last resort, use the slow shell script.  We don't cache a
1519     # path for INSTALL within a source directory, because that will
1520     # break other packages using the cache if that directory is
1521     # removed, or if the path is relative.
1522     INSTALL="$ac_install_sh"
1523   fi
1524 fi
1525 echo "$ac_t""$INSTALL" 1>&6
1526
1527 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1528 # It thinks the first close brace ends the variable substitution.
1529 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1530
1531 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1532
1533 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1534
1535 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1536 echo "configure:1537: checking whether ${MAKE-make} sets \${MAKE}" >&5
1537 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1538 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1539   echo $ac_n "(cached) $ac_c" 1>&6
1540 else
1541   cat > conftestmake <<\EOF
1542 all:
1543         @echo 'ac_maketemp="${MAKE}"'
1544 EOF
1545 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1546 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1547 if test -n "$ac_maketemp"; then
1548   eval ac_cv_prog_make_${ac_make}_set=yes
1549 else
1550   eval ac_cv_prog_make_${ac_make}_set=no
1551 fi
1552 rm -f conftestmake
1553 fi
1554 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1555   echo "$ac_t""yes" 1>&6
1556   SET_MAKE=
1557 else
1558   echo "$ac_t""no" 1>&6
1559   SET_MAKE="MAKE=${MAKE-make}"
1560 fi
1561
1562 # Automake's more advanced version of AC_PROG_RANLIB
1563 # Extract the first word of "ranlib", so it can be a program name with args.
1564 set dummy ranlib; ac_word=$2
1565 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1566 echo "configure:1567: checking for $ac_word" >&5
1567 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1568   echo $ac_n "(cached) $ac_c" 1>&6
1569 else
1570   if test -n "$RANLIB"; then
1571   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1572 else
1573   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1574   ac_dummy="$PATH"
1575   for ac_dir in $ac_dummy; do
1576     test -z "$ac_dir" && ac_dir=.
1577     if test -f $ac_dir/$ac_word; then
1578       ac_cv_prog_RANLIB="ranlib"
1579       break
1580     fi
1581   done
1582   IFS="$ac_save_ifs"
1583   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1584 fi
1585 fi
1586 RANLIB="$ac_cv_prog_RANLIB"
1587 if test -n "$RANLIB"; then
1588   echo "$ac_t""$RANLIB" 1>&6
1589 else
1590   echo "$ac_t""no" 1>&6
1591 fi
1592
1593 for ac_prog in 'bison -y' byacc
1594 do
1595 # Extract the first word of "$ac_prog", so it can be a program name with args.
1596 set dummy $ac_prog; ac_word=$2
1597 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1598 echo "configure:1599: checking for $ac_word" >&5
1599 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1600   echo $ac_n "(cached) $ac_c" 1>&6
1601 else
1602   if test -n "$YACC"; then
1603   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1604 else
1605   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1606   ac_dummy="$PATH"
1607   for ac_dir in $ac_dummy; do
1608     test -z "$ac_dir" && ac_dir=.
1609     if test -f $ac_dir/$ac_word; then
1610       ac_cv_prog_YACC="$ac_prog"
1611       break
1612     fi
1613   done
1614   IFS="$ac_save_ifs"
1615 fi
1616 fi
1617 YACC="$ac_cv_prog_YACC"
1618 if test -n "$YACC"; then
1619   echo "$ac_t""$YACC" 1>&6
1620 else
1621   echo "$ac_t""no" 1>&6
1622 fi
1623
1624 test -n "$YACC" && break
1625 done
1626 test -n "$YACC" || YACC="yacc"
1627
1628 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1629 echo "configure:1630: checking whether ln -s works" >&5
1630 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1631   echo $ac_n "(cached) $ac_c" 1>&6
1632 else
1633   rm -f conftestdata
1634 if ln -s X conftestdata 2>/dev/null
1635 then
1636   rm -f conftestdata
1637   ac_cv_prog_LN_S="ln -s"
1638 else
1639   ac_cv_prog_LN_S=ln
1640 fi
1641 fi
1642 LN_S="$ac_cv_prog_LN_S"
1643 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1644   echo "$ac_t""yes" 1>&6
1645 else
1646   echo "$ac_t""no" 1>&6
1647 fi
1648
1649
1650 # Extract the first word of "perl", so it can be a program name with args.
1651 set dummy perl; ac_word=$2
1652 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1653 echo "configure:1654: checking for $ac_word" >&5
1654 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
1655   echo $ac_n "(cached) $ac_c" 1>&6
1656 else
1657   case "$PERL" in
1658   /*)
1659   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
1660   ;;
1661   ?:/*)                  
1662   ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
1663   ;;
1664   *)
1665   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1666   ac_dummy="$PATH"
1667   for ac_dir in $ac_dummy; do 
1668     test -z "$ac_dir" && ac_dir=.
1669     if test -f $ac_dir/$ac_word; then
1670       ac_cv_path_PERL="$ac_dir/$ac_word"
1671       break
1672     fi
1673   done
1674   IFS="$ac_save_ifs"
1675   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
1676   ;;
1677 esac
1678 fi
1679 PERL="$ac_cv_path_PERL"
1680 if test -n "$PERL"; then
1681   echo "$ac_t""$PERL" 1>&6
1682 else
1683   echo "$ac_t""no" 1>&6
1684 fi
1685
1686 # Extract the first word of "csh", so it can be a program name with args.
1687 set dummy csh; ac_word=$2
1688 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1689 echo "configure:1690: checking for $ac_word" >&5
1690 if eval "test \"`echo '$''{'ac_cv_path_CSH'+set}'`\" = set"; then
1691   echo $ac_n "(cached) $ac_c" 1>&6
1692 else
1693   case "$CSH" in
1694   /*)
1695   ac_cv_path_CSH="$CSH" # Let the user override the test with a path.
1696   ;;
1697   ?:/*)                  
1698   ac_cv_path_CSH="$CSH" # Let the user override the test with a dos path.
1699   ;;
1700   *)
1701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1702   ac_dummy="$PATH"
1703   for ac_dir in $ac_dummy; do 
1704     test -z "$ac_dir" && ac_dir=.
1705     if test -f $ac_dir/$ac_word; then
1706       ac_cv_path_CSH="$ac_dir/$ac_word"
1707       break
1708     fi
1709   done
1710   IFS="$ac_save_ifs"
1711   test -z "$ac_cv_path_CSH" && ac_cv_path_CSH="no"
1712   ;;
1713 esac
1714 fi
1715 CSH="$ac_cv_path_CSH"
1716 if test -n "$CSH"; then
1717   echo "$ac_t""$CSH" 1>&6
1718 else
1719   echo "$ac_t""no" 1>&6
1720 fi
1721
1722 # Extract the first word of "pr", so it can be a program name with args.
1723 set dummy pr; ac_word=$2
1724 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1725 echo "configure:1726: checking for $ac_word" >&5
1726 if eval "test \"`echo '$''{'ac_cv_path_PR'+set}'`\" = set"; then
1727   echo $ac_n "(cached) $ac_c" 1>&6
1728 else
1729   case "$PR" in
1730   /*)
1731   ac_cv_path_PR="$PR" # Let the user override the test with a path.
1732   ;;
1733   ?:/*)                  
1734   ac_cv_path_PR="$PR" # Let the user override the test with a dos path.
1735   ;;
1736   *)
1737   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1738   ac_dummy="$PATH"
1739   for ac_dir in $ac_dummy; do 
1740     test -z "$ac_dir" && ac_dir=.
1741     if test -f $ac_dir/$ac_word; then
1742       ac_cv_path_PR="$ac_dir/$ac_word"
1743       break
1744     fi
1745   done
1746   IFS="$ac_save_ifs"
1747   test -z "$ac_cv_path_PR" && ac_cv_path_PR="no"
1748   ;;
1749 esac
1750 fi
1751 PR="$ac_cv_path_PR"
1752 if test -n "$PR"; then
1753   echo "$ac_t""$PR" 1>&6
1754 else
1755   echo "$ac_t""no" 1>&6
1756 fi
1757
1758 # For diff/util.c
1759 if test x"$PR" != xno; then
1760         cat >> confdefs.h <<EOF
1761 #define PR_PROGRAM "$PR"
1762 EOF
1763
1764 fi
1765
1766 missing_dir=`cd $ac_aux_dir && pwd`
1767 glocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin"
1768 for ac_prog in groff roff
1769 do
1770 # Extract the first word of "$ac_prog", so it can be a program name with args.
1771 set dummy $ac_prog; ac_word=$2
1772 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1773 echo "configure:1774: checking for $ac_word" >&5
1774 if eval "test \"`echo '$''{'ac_cv_path_ROFF'+set}'`\" = set"; then
1775   echo $ac_n "(cached) $ac_c" 1>&6
1776 else
1777   case "$ROFF" in
1778   /*)
1779   ac_cv_path_ROFF="$ROFF" # Let the user override the test with a path.
1780   ;;
1781   ?:/*)                  
1782   ac_cv_path_ROFF="$ROFF" # Let the user override the test with a dos path.
1783   ;;
1784   *)
1785   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1786   ac_dummy="$glocs"
1787   for ac_dir in $ac_dummy; do 
1788     test -z "$ac_dir" && ac_dir=.
1789     if test -f $ac_dir/$ac_word; then
1790       ac_cv_path_ROFF="$ac_dir/$ac_word"
1791       break
1792     fi
1793   done
1794   IFS="$ac_save_ifs"
1795   ;;
1796 esac
1797 fi
1798 ROFF="$ac_cv_path_ROFF"
1799 if test -n "$ROFF"; then
1800   echo "$ac_t""$ROFF" 1>&6
1801 else
1802   echo "$ac_t""no" 1>&6
1803 fi
1804
1805 test -n "$ROFF" && break
1806 done
1807 test -n "$ROFF" || ROFF="$missing_dir/missing roff"
1808
1809 # Extract the first word of "ps2pdf", so it can be a program name with args.
1810 set dummy ps2pdf; ac_word=$2
1811 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1812 echo "configure:1813: checking for $ac_word" >&5
1813 if eval "test \"`echo '$''{'ac_cv_path_PS2PDF'+set}'`\" = set"; then
1814   echo $ac_n "(cached) $ac_c" 1>&6
1815 else
1816   case "$PS2PDF" in
1817   /*)
1818   ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path.
1819   ;;
1820   ?:/*)                  
1821   ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a dos path.
1822   ;;
1823   *)
1824   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1825   ac_dummy="$PATH"
1826   for ac_dir in $ac_dummy; do 
1827     test -z "$ac_dir" && ac_dir=.
1828     if test -f $ac_dir/$ac_word; then
1829       ac_cv_path_PS2PDF="$ac_dir/$ac_word"
1830       break
1831     fi
1832   done
1833   IFS="$ac_save_ifs"
1834   test -z "$ac_cv_path_PS2PDF" && ac_cv_path_PS2PDF="$missing_dir/missing ps2pdf"
1835   ;;
1836 esac
1837 fi
1838 PS2PDF="$ac_cv_path_PS2PDF"
1839 if test -n "$PS2PDF"; then
1840   echo "$ac_t""$PS2PDF" 1>&6
1841 else
1842   echo "$ac_t""no" 1>&6
1843 fi
1844
1845 # Extract the first word of "texi2dvi", so it can be a program name with args.
1846 set dummy texi2dvi; ac_word=$2
1847 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1848 echo "configure:1849: checking for $ac_word" >&5
1849 if eval "test \"`echo '$''{'ac_cv_path_TEXI2DVI'+set}'`\" = set"; then
1850   echo $ac_n "(cached) $ac_c" 1>&6
1851 else
1852   case "$TEXI2DVI" in
1853   /*)
1854   ac_cv_path_TEXI2DVI="$TEXI2DVI" # Let the user override the test with a path.
1855   ;;
1856   ?:/*)                  
1857   ac_cv_path_TEXI2DVI="$TEXI2DVI" # Let the user override the test with a dos path.
1858   ;;
1859   *)
1860   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1861   ac_dummy="$PATH"
1862   for ac_dir in $ac_dummy; do 
1863     test -z "$ac_dir" && ac_dir=.
1864     if test -f $ac_dir/$ac_word; then
1865       ac_cv_path_TEXI2DVI="$ac_dir/$ac_word"
1866       break
1867     fi
1868   done
1869   IFS="$ac_save_ifs"
1870   test -z "$ac_cv_path_TEXI2DVI" && ac_cv_path_TEXI2DVI="$missing_dir/missing texi2dvi"
1871   ;;
1872 esac
1873 fi
1874 TEXI2DVI="$ac_cv_path_TEXI2DVI"
1875 if test -n "$TEXI2DVI"; then
1876   echo "$ac_t""$TEXI2DVI" 1>&6
1877 else
1878   echo "$ac_t""no" 1>&6
1879 fi
1880
1881
1882 # Pull the hash mark out of the macro call to avoid m4 problems.
1883 ac_msg="whether #! works in shell scripts"
1884 echo $ac_n "checking $ac_msg""... $ac_c" 1>&6
1885 echo "configure:1886: checking $ac_msg" >&5
1886 if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then
1887   echo $ac_n "(cached) $ac_c" 1>&6
1888 else
1889   echo '#! /bin/cat
1890 exit 69
1891 ' > conftest
1892 chmod u+x conftest
1893 (SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
1894 if test $? -ne 69; then
1895    ac_cv_sys_interpreter=yes
1896 else
1897    ac_cv_sys_interpreter=no
1898 fi
1899 rm -f conftest
1900 fi
1901
1902 echo "$ac_t""$ac_cv_sys_interpreter" 1>&6
1903 interpval="$ac_cv_sys_interpreter"
1904
1905 if test X"$ac_cv_sys_interpreter" != X"yes" ; then
1906   # silly trick to avoid problems in AC macros...
1907   ac_msg='perl scripts using #! may not be invoked properly'
1908   echo "configure: warning: $ac_msg" 1>&2
1909 fi
1910
1911 # BSD's logo is a devil for a reason, hey?
1912 echo $ac_n "checking for BSD VPATH bug in make""... $ac_c" 1>&6
1913 echo "configure:1914: checking for BSD VPATH bug in make" >&5
1914 if eval "test \"`echo '$''{'ccvs_cv_bsd_make_vpath_bug'+set}'`\" = set"; then
1915   echo $ac_n "(cached) $ac_c" 1>&6
1916 else
1917   if test ! -d ac_test_dir ; then
1918         { ac_try='mkdir ac_test_dir'; { (eval echo configure:1919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
1919 fi
1920 cat >conftestmake <<EOF
1921 VPATH = ac_test_dir
1922 ac_test_target: ac_test_dep
1923         echo BSD VPATH bug present >&2
1924 ac_test_dep: ac_test_dep_dep
1925 EOF
1926 touch ac_test_dir/ac_test_dep_dep
1927 touch ac_test_dir/ac_test_dep
1928 touch ac_test_target
1929 # Don't know why, but the following test doesn't work under FreeBSD 4.2
1930 # without this sleep command
1931 sleep 1
1932 if { ac_try='make -f conftestmake 2>&1 >/dev/null |grep ^BSD\ VPATH\ bug\ present\$ >/dev/null'; { (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then
1933         ccvs_cv_bsd_make_vpath_bug=yes
1934 else
1935         ccvs_cv_bsd_make_vpath_bug=no
1936 fi
1937 { ac_try='rm -rf ac_test_dir ac_test_target conftestmake'; { (eval echo configure:1938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
1938 fi
1939
1940 echo "$ac_t""$ccvs_cv_bsd_make_vpath_bug" 1>&6
1941 # We also don't need to worry about the bug when $srcdir = $builddir
1942
1943
1944 if \
1945                 test $ccvs_cv_bsd_make_vpath_bug = no \
1946                 || test $srcdir = .; then
1947   MAKE_TARGETS_IN_VPATH_TRUE=
1948   MAKE_TARGETS_IN_VPATH_FALSE='#'
1949 else
1950   MAKE_TARGETS_IN_VPATH_TRUE='#'
1951   MAKE_TARGETS_IN_VPATH_FALSE=
1952 fi
1953
1954 echo $ac_n "checking for AIX""... $ac_c" 1>&6
1955 echo "configure:1956: checking for AIX" >&5
1956 cat > conftest.$ac_ext <<EOF
1957 #line 1958 "configure"
1958 #include "confdefs.h"
1959 #ifdef _AIX
1960   yes
1961 #endif
1962
1963 EOF
1964 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1965   egrep "yes" >/dev/null 2>&1; then
1966   rm -rf conftest*
1967   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1968 #define _ALL_SOURCE 1
1969 EOF
1970
1971 else
1972   rm -rf conftest*
1973   echo "$ac_t""no" 1>&6
1974 fi
1975 rm -f conftest*
1976
1977
1978 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1979 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1980 echo "configure:1981: checking for minix/config.h" >&5
1981 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1982   echo $ac_n "(cached) $ac_c" 1>&6
1983 else
1984   cat > conftest.$ac_ext <<EOF
1985 #line 1986 "configure"
1986 #include "confdefs.h"
1987 #include <minix/config.h>
1988 EOF
1989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1990 { (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1992 if test -z "$ac_err"; then
1993   rm -rf conftest*
1994   eval "ac_cv_header_$ac_safe=yes"
1995 else
1996   echo "$ac_err" >&5
1997   echo "configure: failed program was:" >&5
1998   cat conftest.$ac_ext >&5
1999   rm -rf conftest*
2000   eval "ac_cv_header_$ac_safe=no"
2001 fi
2002 rm -f conftest*
2003 fi
2004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2005   echo "$ac_t""yes" 1>&6
2006   MINIX=yes
2007 else
2008   echo "$ac_t""no" 1>&6
2009 MINIX=
2010 fi
2011
2012 if test "$MINIX" = yes; then
2013   cat >> confdefs.h <<\EOF
2014 #define _POSIX_SOURCE 1
2015 EOF
2016
2017   cat >> confdefs.h <<\EOF
2018 #define _POSIX_1_SOURCE 2
2019 EOF
2020
2021   cat >> confdefs.h <<\EOF
2022 #define _MINIX 1
2023 EOF
2024
2025 fi
2026
2027 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2028 echo "configure:2029: checking for POSIXized ISC" >&5
2029 if test -d /etc/conf/kconfig.d &&
2030   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2031 then
2032   echo "$ac_t""yes" 1>&6
2033   ISC=yes # If later tests want to check for ISC.
2034   cat >> confdefs.h <<\EOF
2035 #define _POSIX_SOURCE 1
2036 EOF
2037
2038   if test "$GCC" = yes; then
2039     CC="$CC -posix"
2040   else
2041     CC="$CC -Xp"
2042   fi
2043 else
2044   echo "$ac_t""no" 1>&6
2045   ISC=
2046 fi
2047
2048 if test "$ISC" = yes; then
2049 CFLAGS="$CFLAGS -D_SYSV3"
2050 LIBS="-lcrypt $LIBS"
2051 fi
2052
2053 ac_header_dirent=no
2054 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2055 do
2056 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2057 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2058 echo "configure:2059: checking for $ac_hdr that defines DIR" >&5
2059 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2060   echo $ac_n "(cached) $ac_c" 1>&6
2061 else
2062   cat > conftest.$ac_ext <<EOF
2063 #line 2064 "configure"
2064 #include "confdefs.h"
2065 #include <sys/types.h>
2066 #include <$ac_hdr>
2067 int main() {
2068 DIR *dirp = 0;
2069 ; return 0; }
2070 EOF
2071 if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2072   rm -rf conftest*
2073   eval "ac_cv_header_dirent_$ac_safe=yes"
2074 else
2075   echo "configure: failed program was:" >&5
2076   cat conftest.$ac_ext >&5
2077   rm -rf conftest*
2078   eval "ac_cv_header_dirent_$ac_safe=no"
2079 fi
2080 rm -f conftest*
2081 fi
2082 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2083   echo "$ac_t""yes" 1>&6
2084     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2085   cat >> confdefs.h <<EOF
2086 #define $ac_tr_hdr 1
2087 EOF
2088  ac_header_dirent=$ac_hdr; break
2089 else
2090   echo "$ac_t""no" 1>&6
2091 fi
2092 done
2093 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2094 if test $ac_header_dirent = dirent.h; then
2095 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2096 echo "configure:2097: checking for opendir in -ldir" >&5
2097 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2098 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2099   echo $ac_n "(cached) $ac_c" 1>&6
2100 else
2101   ac_save_LIBS="$LIBS"
2102 LIBS="-ldir  $LIBS"
2103 cat > conftest.$ac_ext <<EOF
2104 #line 2105 "configure"
2105 #include "confdefs.h"
2106 /* Override any gcc2 internal prototype to avoid an error.  */
2107 /* We use char because int might match the return type of a gcc2
2108     builtin and then its argument prototype would still apply.  */
2109 char opendir();
2110
2111 int main() {
2112 opendir()
2113 ; return 0; }
2114 EOF
2115 if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2116   rm -rf conftest*
2117   eval "ac_cv_lib_$ac_lib_var=yes"
2118 else
2119   echo "configure: failed program was:" >&5
2120   cat conftest.$ac_ext >&5
2121   rm -rf conftest*
2122   eval "ac_cv_lib_$ac_lib_var=no"
2123 fi
2124 rm -f conftest*
2125 LIBS="$ac_save_LIBS"
2126
2127 fi
2128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2129   echo "$ac_t""yes" 1>&6
2130   LIBS="$LIBS -ldir"
2131 else
2132   echo "$ac_t""no" 1>&6
2133 fi
2134
2135 else
2136 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2137 echo "configure:2138: checking for opendir in -lx" >&5
2138 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2139 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2140   echo $ac_n "(cached) $ac_c" 1>&6
2141 else
2142   ac_save_LIBS="$LIBS"
2143 LIBS="-lx  $LIBS"
2144 cat > conftest.$ac_ext <<EOF
2145 #line 2146 "configure"
2146 #include "confdefs.h"
2147 /* Override any gcc2 internal prototype to avoid an error.  */
2148 /* We use char because int might match the return type of a gcc2
2149     builtin and then its argument prototype would still apply.  */
2150 char opendir();
2151
2152 int main() {
2153 opendir()
2154 ; return 0; }
2155 EOF
2156 if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2157   rm -rf conftest*
2158   eval "ac_cv_lib_$ac_lib_var=yes"
2159 else
2160   echo "configure: failed program was:" >&5
2161   cat conftest.$ac_ext >&5
2162   rm -rf conftest*
2163   eval "ac_cv_lib_$ac_lib_var=no"
2164 fi
2165 rm -f conftest*
2166 LIBS="$ac_save_LIBS"
2167
2168 fi
2169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2170   echo "$ac_t""yes" 1>&6
2171   LIBS="$LIBS -lx"
2172 else
2173   echo "$ac_t""no" 1>&6
2174 fi
2175
2176 fi
2177
2178 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2179 echo "configure:2180: checking for ANSI C header files" >&5
2180 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2181   echo $ac_n "(cached) $ac_c" 1>&6
2182 else
2183   cat > conftest.$ac_ext <<EOF
2184 #line 2185 "configure"
2185 #include "confdefs.h"
2186 #include <stdlib.h>
2187 #include <stdarg.h>
2188 #include <string.h>
2189 #include <float.h>
2190 EOF
2191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2192 { (eval echo configure:2193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2194 if test -z "$ac_err"; then
2195   rm -rf conftest*
2196   ac_cv_header_stdc=yes
2197 else
2198   echo "$ac_err" >&5
2199   echo "configure: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201   rm -rf conftest*
2202   ac_cv_header_stdc=no
2203 fi
2204 rm -f conftest*
2205
2206 if test $ac_cv_header_stdc = yes; then
2207   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2208 cat > conftest.$ac_ext <<EOF
2209 #line 2210 "configure"
2210 #include "confdefs.h"
2211 #include <string.h>
2212 EOF
2213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2214   egrep "memchr" >/dev/null 2>&1; then
2215   :
2216 else
2217   rm -rf conftest*
2218   ac_cv_header_stdc=no
2219 fi
2220 rm -f conftest*
2221
2222 fi
2223
2224 if test $ac_cv_header_stdc = yes; then
2225   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2226 cat > conftest.$ac_ext <<EOF
2227 #line 2228 "configure"
2228 #include "confdefs.h"
2229 #include <stdlib.h>
2230 EOF
2231 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2232   egrep "free" >/dev/null 2>&1; then
2233   :
2234 else
2235   rm -rf conftest*
2236   ac_cv_header_stdc=no
2237 fi
2238 rm -f conftest*
2239
2240 fi
2241
2242 if test $ac_cv_header_stdc = yes; then
2243   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2244 if test "$cross_compiling" = yes; then
2245   :
2246 else
2247   cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2250 #include <ctype.h>
2251 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2252 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2253 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2254 int main () { int i; for (i = 0; i < 256; i++)
2255 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2256 exit (0); }
2257
2258 EOF
2259 if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2260 then
2261   :
2262 else
2263   echo "configure: failed program was:" >&5
2264   cat conftest.$ac_ext >&5
2265   rm -fr conftest*
2266   ac_cv_header_stdc=no
2267 fi
2268 rm -fr conftest*
2269 fi
2270
2271 fi
2272 fi
2273
2274 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2275 if test $ac_cv_header_stdc = yes; then
2276   cat >> confdefs.h <<\EOF
2277 #define STDC_HEADERS 1
2278 EOF
2279
2280 fi
2281
2282 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2283 echo "configure:2284: checking for sys/wait.h that is POSIX.1 compatible" >&5
2284 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2285   echo $ac_n "(cached) $ac_c" 1>&6
2286 else
2287   cat > conftest.$ac_ext <<EOF
2288 #line 2289 "configure"
2289 #include "confdefs.h"
2290 #include <sys/types.h>
2291 #include <sys/wait.h>
2292 #ifndef WEXITSTATUS
2293 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2294 #endif
2295 #ifndef WIFEXITED
2296 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2297 #endif
2298 int main() {
2299 int s;
2300 wait (&s);
2301 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2302 ; return 0; }
2303 EOF
2304 if { (eval echo configure:2305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2305   rm -rf conftest*
2306   ac_cv_header_sys_wait_h=yes
2307 else
2308   echo "configure: failed program was:" >&5
2309   cat conftest.$ac_ext >&5
2310   rm -rf conftest*
2311   ac_cv_header_sys_wait_h=no
2312 fi
2313 rm -f conftest*
2314 fi
2315
2316 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2317 if test $ac_cv_header_sys_wait_h = yes; then
2318   cat >> confdefs.h <<\EOF
2319 #define HAVE_SYS_WAIT_H 1
2320 EOF
2321
2322 fi
2323
2324 for ac_hdr in errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
2325                  limits.h sys/file.h \
2326                  sys/param.h sys/select.h sys/time.h sys/timeb.h \
2327                  io.h direct.h sys/bsdtypes.h sys/resource.h syslog.h
2328 do
2329 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2330 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2331 echo "configure:2332: checking for $ac_hdr" >&5
2332 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2333   echo $ac_n "(cached) $ac_c" 1>&6
2334 else
2335   cat > conftest.$ac_ext <<EOF
2336 #line 2337 "configure"
2337 #include "confdefs.h"
2338 #include <$ac_hdr>
2339 EOF
2340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2341 { (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2343 if test -z "$ac_err"; then
2344   rm -rf conftest*
2345   eval "ac_cv_header_$ac_safe=yes"
2346 else
2347   echo "$ac_err" >&5
2348   echo "configure: failed program was:" >&5
2349   cat conftest.$ac_ext >&5
2350   rm -rf conftest*
2351   eval "ac_cv_header_$ac_safe=no"
2352 fi
2353 rm -f conftest*
2354 fi
2355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2356   echo "$ac_t""yes" 1>&6
2357     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2358   cat >> confdefs.h <<EOF
2359 #define $ac_tr_hdr 1
2360 EOF
2361  
2362 else
2363   echo "$ac_t""no" 1>&6
2364 fi
2365 done
2366
2367 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
2368 echo "configure:2369: checking whether stat file-mode macros are broken" >&5
2369 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
2370   echo $ac_n "(cached) $ac_c" 1>&6
2371 else
2372   cat > conftest.$ac_ext <<EOF
2373 #line 2374 "configure"
2374 #include "confdefs.h"
2375 #include <sys/types.h>
2376 #include <sys/stat.h>
2377
2378 #if defined(S_ISBLK) && defined(S_IFDIR)
2379 # if S_ISBLK (S_IFDIR)
2380 You lose.
2381 # endif
2382 #endif
2383
2384 #if defined(S_ISBLK) && defined(S_IFCHR)
2385 # if S_ISBLK (S_IFCHR)
2386 You lose.
2387 # endif
2388 #endif
2389
2390 #if defined(S_ISLNK) && defined(S_IFREG)
2391 # if S_ISLNK (S_IFREG)
2392 You lose.
2393 # endif
2394 #endif
2395
2396 #if defined(S_ISSOCK) && defined(S_IFREG)
2397 # if S_ISSOCK (S_IFREG)
2398 You lose.
2399 # endif
2400 #endif
2401
2402 EOF
2403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2404   egrep "You lose" >/dev/null 2>&1; then
2405   rm -rf conftest*
2406   ac_cv_header_stat_broken=yes
2407 else
2408   rm -rf conftest*
2409   ac_cv_header_stat_broken=no
2410 fi
2411 rm -f conftest*
2412
2413 fi
2414
2415 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
2416 if test $ac_cv_header_stat_broken = yes; then
2417   cat >> confdefs.h <<\EOF
2418 #define STAT_MACROS_BROKEN 1
2419 EOF
2420
2421 fi
2422
2423 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2424 echo "configure:2425: checking whether time.h and sys/time.h may both be included" >&5
2425 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2426   echo $ac_n "(cached) $ac_c" 1>&6
2427 else
2428   cat > conftest.$ac_ext <<EOF
2429 #line 2430 "configure"
2430 #include "confdefs.h"
2431 #include <sys/types.h>
2432 #include <sys/time.h>
2433 #include <time.h>
2434 int main() {
2435 struct tm *tp;
2436 ; return 0; }
2437 EOF
2438 if { (eval echo configure:2439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2439   rm -rf conftest*
2440   ac_cv_header_time=yes
2441 else
2442   echo "configure: failed program was:" >&5
2443   cat conftest.$ac_ext >&5
2444   rm -rf conftest*
2445   ac_cv_header_time=no
2446 fi
2447 rm -f conftest*
2448 fi
2449
2450 echo "$ac_t""$ac_cv_header_time" 1>&6
2451 if test $ac_cv_header_time = yes; then
2452   cat >> confdefs.h <<\EOF
2453 #define TIME_WITH_SYS_TIME 1
2454 EOF
2455
2456 fi
2457
2458
2459 echo $ac_n "checking for working const""... $ac_c" 1>&6
2460 echo "configure:2461: checking for working const" >&5
2461 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2462   echo $ac_n "(cached) $ac_c" 1>&6
2463 else
2464   cat > conftest.$ac_ext <<EOF
2465 #line 2466 "configure"
2466 #include "confdefs.h"
2467
2468 int main() {
2469
2470 /* Ultrix mips cc rejects this.  */
2471 typedef int charset[2]; const charset x;
2472 /* SunOS 4.1.1 cc rejects this.  */
2473 char const *const *ccp;
2474 char **p;
2475 /* NEC SVR4.0.2 mips cc rejects this.  */
2476 struct point {int x, y;};
2477 static struct point const zero = {0,0};
2478 /* AIX XL C 1.02.0.0 rejects this.
2479    It does not let you subtract one const X* pointer from another in an arm
2480    of an if-expression whose if-part is not a constant expression */
2481 const char *g = "string";
2482 ccp = &g + (g ? g-g : 0);
2483 /* HPUX 7.0 cc rejects these. */
2484 ++ccp;
2485 p = (char**) ccp;
2486 ccp = (char const *const *) p;
2487 { /* SCO 3.2v4 cc rejects this.  */
2488   char *t;
2489   char const *s = 0 ? (char *) 0 : (char const *) 0;
2490
2491   *t++ = 0;
2492 }
2493 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2494   int x[] = {25, 17};
2495   const int *foo = &x[0];
2496   ++foo;
2497 }
2498 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2499   typedef const int *iptr;
2500   iptr p = 0;
2501   ++p;
2502 }
2503 { /* AIX XL C 1.02.0.0 rejects this saying
2504      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2505   struct s { int j; const int *ap[3]; };
2506   struct s *b; b->j = 5;
2507 }
2508 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2509   const int foo = 10;
2510 }
2511
2512 ; return 0; }
2513 EOF
2514 if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2515   rm -rf conftest*
2516   ac_cv_c_const=yes
2517 else
2518   echo "configure: failed program was:" >&5
2519   cat conftest.$ac_ext >&5
2520   rm -rf conftest*
2521   ac_cv_c_const=no
2522 fi
2523 rm -f conftest*
2524 fi
2525
2526 echo "$ac_t""$ac_cv_c_const" 1>&6
2527 if test $ac_cv_c_const = no; then
2528   cat >> confdefs.h <<\EOF
2529 #define const 
2530 EOF
2531
2532 fi
2533
2534 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2535 echo "configure:2536: checking for uid_t in sys/types.h" >&5
2536 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2537   echo $ac_n "(cached) $ac_c" 1>&6
2538 else
2539   cat > conftest.$ac_ext <<EOF
2540 #line 2541 "configure"
2541 #include "confdefs.h"
2542 #include <sys/types.h>
2543 EOF
2544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2545   egrep "uid_t" >/dev/null 2>&1; then
2546   rm -rf conftest*
2547   ac_cv_type_uid_t=yes
2548 else
2549   rm -rf conftest*
2550   ac_cv_type_uid_t=no
2551 fi
2552 rm -f conftest*
2553
2554 fi
2555
2556 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2557 if test $ac_cv_type_uid_t = no; then
2558   cat >> confdefs.h <<\EOF
2559 #define uid_t int
2560 EOF
2561
2562   cat >> confdefs.h <<\EOF
2563 #define gid_t int
2564 EOF
2565
2566 fi
2567
2568 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2569 echo "configure:2570: checking for mode_t" >&5
2570 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2571   echo $ac_n "(cached) $ac_c" 1>&6
2572 else
2573   cat > conftest.$ac_ext <<EOF
2574 #line 2575 "configure"
2575 #include "confdefs.h"
2576 #include <sys/types.h>
2577 #if STDC_HEADERS
2578 #include <stdlib.h>
2579 #include <stddef.h>
2580 #endif
2581 EOF
2582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2583   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2584   rm -rf conftest*
2585   ac_cv_type_mode_t=yes
2586 else
2587   rm -rf conftest*
2588   ac_cv_type_mode_t=no
2589 fi
2590 rm -f conftest*
2591
2592 fi
2593 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2594 if test $ac_cv_type_mode_t = no; then
2595   cat >> confdefs.h <<\EOF
2596 #define mode_t int
2597 EOF
2598
2599 fi
2600
2601 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2602 echo "configure:2603: checking for pid_t" >&5
2603 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2604   echo $ac_n "(cached) $ac_c" 1>&6
2605 else
2606   cat > conftest.$ac_ext <<EOF
2607 #line 2608 "configure"
2608 #include "confdefs.h"
2609 #include <sys/types.h>
2610 #if STDC_HEADERS
2611 #include <stdlib.h>
2612 #include <stddef.h>
2613 #endif
2614 EOF
2615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2616   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2617   rm -rf conftest*
2618   ac_cv_type_pid_t=yes
2619 else
2620   rm -rf conftest*
2621   ac_cv_type_pid_t=no
2622 fi
2623 rm -f conftest*
2624
2625 fi
2626 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2627 if test $ac_cv_type_pid_t = no; then
2628   cat >> confdefs.h <<\EOF
2629 #define pid_t int
2630 EOF
2631
2632 fi
2633
2634 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2635 echo "configure:2636: checking for size_t" >&5
2636 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2637   echo $ac_n "(cached) $ac_c" 1>&6
2638 else
2639   cat > conftest.$ac_ext <<EOF
2640 #line 2641 "configure"
2641 #include "confdefs.h"
2642 #include <sys/types.h>
2643 #if STDC_HEADERS
2644 #include <stdlib.h>
2645 #include <stddef.h>
2646 #endif
2647 EOF
2648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2649   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2650   rm -rf conftest*
2651   ac_cv_type_size_t=yes
2652 else
2653   rm -rf conftest*
2654   ac_cv_type_size_t=no
2655 fi
2656 rm -f conftest*
2657
2658 fi
2659 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2660 if test $ac_cv_type_size_t = no; then
2661   cat >> confdefs.h <<\EOF
2662 #define size_t unsigned
2663 EOF
2664
2665 fi
2666
2667 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2668 echo "configure:2669: checking return type of signal handlers" >&5
2669 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2670   echo $ac_n "(cached) $ac_c" 1>&6
2671 else
2672   cat > conftest.$ac_ext <<EOF
2673 #line 2674 "configure"
2674 #include "confdefs.h"
2675 #include <sys/types.h>
2676 #include <signal.h>
2677 #ifdef signal
2678 #undef signal
2679 #endif
2680 #ifdef __cplusplus
2681 extern "C" void (*signal (int, void (*)(int)))(int);
2682 #else
2683 void (*signal ()) ();
2684 #endif
2685
2686 int main() {
2687 int i;
2688 ; return 0; }
2689 EOF
2690 if { (eval echo configure:2691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2691   rm -rf conftest*
2692   ac_cv_type_signal=void
2693 else
2694   echo "configure: failed program was:" >&5
2695   cat conftest.$ac_ext >&5
2696   rm -rf conftest*
2697   ac_cv_type_signal=int
2698 fi
2699 rm -f conftest*
2700 fi
2701
2702 echo "$ac_t""$ac_cv_type_signal" 1>&6
2703 cat >> confdefs.h <<EOF
2704 #define RETSIGTYPE $ac_cv_type_signal
2705 EOF
2706
2707
2708
2709 echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
2710 echo "configure:2711: checking for st_blksize in struct stat" >&5
2711 if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
2712   echo $ac_n "(cached) $ac_c" 1>&6
2713 else
2714   cat > conftest.$ac_ext <<EOF
2715 #line 2716 "configure"
2716 #include "confdefs.h"
2717 #include <sys/types.h>
2718 #include <sys/stat.h>
2719 int main() {
2720 struct stat s; s.st_blksize;
2721 ; return 0; }
2722 EOF
2723 if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2724   rm -rf conftest*
2725   ac_cv_struct_st_blksize=yes
2726 else
2727   echo "configure: failed program was:" >&5
2728   cat conftest.$ac_ext >&5
2729   rm -rf conftest*
2730   ac_cv_struct_st_blksize=no
2731 fi
2732 rm -f conftest*
2733 fi
2734
2735 echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
2736 if test $ac_cv_struct_st_blksize = yes; then
2737   cat >> confdefs.h <<\EOF
2738 #define HAVE_ST_BLKSIZE 1
2739 EOF
2740
2741 fi
2742
2743 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
2744 echo "configure:2745: checking for st_rdev in struct stat" >&5
2745 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
2746   echo $ac_n "(cached) $ac_c" 1>&6
2747 else
2748   cat > conftest.$ac_ext <<EOF
2749 #line 2750 "configure"
2750 #include "confdefs.h"
2751 #include <sys/types.h>
2752 #include <sys/stat.h>
2753 int main() {
2754 struct stat s; s.st_rdev;
2755 ; return 0; }
2756 EOF
2757 if { (eval echo configure:2758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2758   rm -rf conftest*
2759   ac_cv_struct_st_rdev=yes
2760 else
2761   echo "configure: failed program was:" >&5
2762   cat conftest.$ac_ext >&5
2763   rm -rf conftest*
2764   ac_cv_struct_st_rdev=no
2765 fi
2766 rm -f conftest*
2767 fi
2768
2769 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2770 if test $ac_cv_struct_st_rdev = yes; then
2771   cat >> confdefs.h <<\EOF
2772 #define HAVE_ST_RDEV 1
2773 EOF
2774
2775 fi
2776
2777 for ac_func in mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul
2778 do
2779 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2780 echo "configure:2781: checking for $ac_func" >&5
2781 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2782   echo $ac_n "(cached) $ac_c" 1>&6
2783 else
2784   cat > conftest.$ac_ext <<EOF
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787 /* System header to define __stub macros and hopefully few prototypes,
2788     which can conflict with char $ac_func(); below.  */
2789 #include <assert.h>
2790 /* Override any gcc2 internal prototype to avoid an error.  */
2791 /* We use char because int might match the return type of a gcc2
2792     builtin and then its argument prototype would still apply.  */
2793 char $ac_func();
2794
2795 int main() {
2796
2797 /* The GNU C library defines this for functions which it implements
2798     to always fail with ENOSYS.  Some functions are actually named
2799     something starting with __ and the normal name is an alias.  */
2800 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2801 choke me
2802 #else
2803 $ac_func();
2804 #endif
2805
2806 ; return 0; }
2807 EOF
2808 if { (eval echo configure:2809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2809   rm -rf conftest*
2810   eval "ac_cv_func_$ac_func=yes"
2811 else
2812   echo "configure: failed program was:" >&5
2813   cat conftest.$ac_ext >&5
2814   rm -rf conftest*
2815   eval "ac_cv_func_$ac_func=no"
2816 fi
2817 rm -f conftest*
2818 fi
2819
2820 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2821   echo "$ac_t""yes" 1>&6
2822     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2823   cat >> confdefs.h <<EOF
2824 #define $ac_tr_func 1
2825 EOF
2826  
2827 else
2828   echo "$ac_t""no" 1>&6
2829 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2830 fi
2831 done
2832
2833
2834 for ac_func in \
2835         fchdir \
2836         fchmod \
2837         fsync \
2838         ftime \
2839         ftruncate \
2840         getgroups \
2841         getpagesize \
2842         getpassphrase \
2843         gettimeofday \
2844         initgroups \
2845         mknod \
2846         mkstemp \
2847         mktemp \
2848         putenv \
2849         readlink \
2850         sigaction \
2851         sigblock \
2852         sigprocmask \
2853         sigsetmask \
2854         sigvec \
2855         tempnam \
2856         timezone \
2857         tzset \
2858         vprintf \
2859         wait3 \
2860
2861 do
2862 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2863 echo "configure:2864: checking for $ac_func" >&5
2864 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2865   echo $ac_n "(cached) $ac_c" 1>&6
2866 else
2867   cat > conftest.$ac_ext <<EOF
2868 #line 2869 "configure"
2869 #include "confdefs.h"
2870 /* System header to define __stub macros and hopefully few prototypes,
2871     which can conflict with char $ac_func(); below.  */
2872 #include <assert.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 $ac_func();
2877
2878 int main() {
2879
2880 /* The GNU C library defines this for functions which it implements
2881     to always fail with ENOSYS.  Some functions are actually named
2882     something starting with __ and the normal name is an alias.  */
2883 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2884 choke me
2885 #else
2886 $ac_func();
2887 #endif
2888
2889 ; return 0; }
2890 EOF
2891 if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2892   rm -rf conftest*
2893   eval "ac_cv_func_$ac_func=yes"
2894 else
2895   echo "configure: failed program was:" >&5
2896   cat conftest.$ac_ext >&5
2897   rm -rf conftest*
2898   eval "ac_cv_func_$ac_func=no"
2899 fi
2900 rm -f conftest*
2901 fi
2902
2903 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2904   echo "$ac_t""yes" 1>&6
2905     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2906   cat >> confdefs.h <<EOF
2907 #define $ac_tr_func 1
2908 EOF
2909  
2910 else
2911   echo "$ac_t""no" 1>&6
2912 fi
2913 done
2914
2915 # we only need one of the following
2916 for ac_func in \
2917         nanosleep \
2918         usleep \
2919         select \
2920
2921 do
2922 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2923 echo "configure:2924: checking for $ac_func" >&5
2924 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2925   echo $ac_n "(cached) $ac_c" 1>&6
2926 else
2927   cat > conftest.$ac_ext <<EOF
2928 #line 2929 "configure"
2929 #include "confdefs.h"
2930 /* System header to define __stub macros and hopefully few prototypes,
2931     which can conflict with char $ac_func(); below.  */
2932 #include <assert.h>
2933 /* Override any gcc2 internal prototype to avoid an error.  */
2934 /* We use char because int might match the return type of a gcc2
2935     builtin and then its argument prototype would still apply.  */
2936 char $ac_func();
2937
2938 int main() {
2939
2940 /* The GNU C library defines this for functions which it implements
2941     to always fail with ENOSYS.  Some functions are actually named
2942     something starting with __ and the normal name is an alias.  */
2943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2944 choke me
2945 #else
2946 $ac_func();
2947 #endif
2948
2949 ; return 0; }
2950 EOF
2951 if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2952   rm -rf conftest*
2953   eval "ac_cv_func_$ac_func=yes"
2954 else
2955   echo "configure: failed program was:" >&5
2956   cat conftest.$ac_ext >&5
2957   rm -rf conftest*
2958   eval "ac_cv_func_$ac_func=no"
2959 fi
2960 rm -f conftest*
2961 fi
2962
2963 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2964   echo "$ac_t""yes" 1>&6
2965     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2966   cat >> confdefs.h <<EOF
2967 #define $ac_tr_func 1
2968 EOF
2969  break
2970 else
2971   echo "$ac_t""no" 1>&6
2972 fi
2973 done
2974
2975
2976 cat >> confdefs.h <<\EOF
2977 #define HAVE_STRCHR 1
2978 EOF
2979
2980 cat >> confdefs.h <<\EOF
2981 #define HAVE_MEMCHR 1
2982 EOF
2983
2984
2985 cat >> confdefs.h <<\EOF
2986 #define REGEX_MALLOC 1
2987 EOF
2988
2989 cat >> confdefs.h <<\EOF
2990 #define _REGEX_RE_COMP 1
2991 EOF
2992
2993 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2994 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
2995 echo "configure:2996: checking for vfork.h" >&5
2996 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2997   echo $ac_n "(cached) $ac_c" 1>&6
2998 else
2999   cat > conftest.$ac_ext <<EOF
3000 #line 3001 "configure"
3001 #include "confdefs.h"
3002 #include <vfork.h>
3003 EOF
3004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3005 { (eval echo configure:3006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3007 if test -z "$ac_err"; then
3008   rm -rf conftest*
3009   eval "ac_cv_header_$ac_safe=yes"
3010 else
3011   echo "$ac_err" >&5
3012   echo "configure: failed program was:" >&5
3013   cat conftest.$ac_ext >&5
3014   rm -rf conftest*
3015   eval "ac_cv_header_$ac_safe=no"
3016 fi
3017 rm -f conftest*
3018 fi
3019 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3020   echo "$ac_t""yes" 1>&6
3021   cat >> confdefs.h <<\EOF
3022 #define HAVE_VFORK_H 1
3023 EOF
3024
3025 else
3026   echo "$ac_t""no" 1>&6
3027 fi
3028
3029 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3030 echo "configure:3031: checking for working vfork" >&5
3031 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3032   echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034   if test "$cross_compiling" = yes; then
3035   echo $ac_n "checking for vfork""... $ac_c" 1>&6
3036 echo "configure:3037: checking for vfork" >&5
3037 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3038   echo $ac_n "(cached) $ac_c" 1>&6
3039 else
3040   cat > conftest.$ac_ext <<EOF
3041 #line 3042 "configure"
3042 #include "confdefs.h"
3043 /* System header to define __stub macros and hopefully few prototypes,
3044     which can conflict with char vfork(); below.  */
3045 #include <assert.h>
3046 /* Override any gcc2 internal prototype to avoid an error.  */
3047 /* We use char because int might match the return type of a gcc2
3048     builtin and then its argument prototype would still apply.  */
3049 char vfork();
3050
3051 int main() {
3052
3053 /* The GNU C library defines this for functions which it implements
3054     to always fail with ENOSYS.  Some functions are actually named
3055     something starting with __ and the normal name is an alias.  */
3056 #if defined (__stub_vfork) || defined (__stub___vfork)
3057 choke me
3058 #else
3059 vfork();
3060 #endif
3061
3062 ; return 0; }
3063 EOF
3064 if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3065   rm -rf conftest*
3066   eval "ac_cv_func_vfork=yes"
3067 else
3068   echo "configure: failed program was:" >&5
3069   cat conftest.$ac_ext >&5
3070   rm -rf conftest*
3071   eval "ac_cv_func_vfork=no"
3072 fi
3073 rm -f conftest*
3074 fi
3075
3076 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3077   echo "$ac_t""yes" 1>&6
3078   :
3079 else
3080   echo "$ac_t""no" 1>&6
3081 fi
3082
3083 ac_cv_func_vfork_works=$ac_cv_func_vfork
3084 else
3085   cat > conftest.$ac_ext <<EOF
3086 #line 3087 "configure"
3087 #include "confdefs.h"
3088 /* Thanks to Paul Eggert for this test.  */
3089 #include <stdio.h>
3090 #include <sys/types.h>
3091 #include <sys/stat.h>
3092 #ifdef HAVE_UNISTD_H
3093 #include <unistd.h>
3094 #endif
3095 #ifdef HAVE_VFORK_H
3096 #include <vfork.h>
3097 #endif
3098 /* On some sparc systems, changes by the child to local and incoming
3099    argument registers are propagated back to the parent.
3100    The compiler is told about this with #include <vfork.h>,
3101    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3102    Test for this by using a static variable whose address
3103    is put into a register that is clobbered by the vfork.  */
3104 static
3105 #ifdef __cplusplus
3106 sparc_address_test (int arg)
3107 #else
3108 sparc_address_test (arg) int arg;
3109 #endif
3110 {
3111   static pid_t child;
3112   if (!child) {
3113     child = vfork ();
3114     if (child < 0) {
3115       perror ("vfork");
3116       _exit(2);
3117     }
3118     if (!child) {
3119       arg = getpid();
3120       write(-1, "", 0);
3121       _exit (arg);
3122     }
3123   }
3124 }
3125 main() {
3126   pid_t parent = getpid ();
3127   pid_t child;
3128
3129   sparc_address_test ();
3130
3131   child = vfork ();
3132
3133   if (child == 0) {
3134     /* Here is another test for sparc vfork register problems.
3135        This test uses lots of local variables, at least
3136        as many local variables as main has allocated so far
3137        including compiler temporaries.  4 locals are enough for
3138        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3139        A buggy compiler should reuse the register of parent
3140        for one of the local variables, since it will think that
3141        parent can't possibly be used any more in this routine.
3142        Assigning to the local variable will thus munge parent
3143        in the parent process.  */
3144     pid_t
3145       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3146       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3147     /* Convince the compiler that p..p7 are live; otherwise, it might
3148        use the same hardware register for all 8 local variables.  */
3149     if (p != p1 || p != p2 || p != p3 || p != p4
3150         || p != p5 || p != p6 || p != p7)
3151       _exit(1);
3152
3153     /* On some systems (e.g. IRIX 3.3),
3154        vfork doesn't separate parent from child file descriptors.
3155        If the child closes a descriptor before it execs or exits,
3156        this munges the parent's descriptor as well.
3157        Test for this by closing stdout in the child.  */
3158     _exit(close(fileno(stdout)) != 0);
3159   } else {
3160     int status;
3161     struct stat st;
3162
3163     while (wait(&status) != child)
3164       ;
3165     exit(
3166          /* Was there some problem with vforking?  */
3167          child < 0
3168
3169          /* Did the child fail?  (This shouldn't happen.)  */
3170          || status
3171
3172          /* Did the vfork/compiler bug occur?  */
3173          || parent != getpid()
3174
3175          /* Did the file descriptor bug occur?  */
3176          || fstat(fileno(stdout), &st) != 0
3177          );
3178   }
3179 }
3180 EOF
3181 if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3182 then
3183   ac_cv_func_vfork_works=yes
3184 else
3185   echo "configure: failed program was:" >&5
3186   cat conftest.$ac_ext >&5
3187   rm -fr conftest*
3188   ac_cv_func_vfork_works=no
3189 fi
3190 rm -fr conftest*
3191 fi
3192
3193 fi
3194
3195 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3196 if test $ac_cv_func_vfork_works = no; then
3197   cat >> confdefs.h <<\EOF
3198 #define vfork fork
3199 EOF
3200
3201 fi
3202
3203 echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
3204 echo "configure:3205: checking whether closedir returns void" >&5
3205 if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208   if test "$cross_compiling" = yes; then
3209   ac_cv_func_closedir_void=yes
3210 else
3211   cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214 #include <sys/types.h>
3215 #include <$ac_header_dirent>
3216 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
3217 EOF
3218 if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3219 then
3220   ac_cv_func_closedir_void=no
3221 else
3222   echo "configure: failed program was:" >&5
3223   cat conftest.$ac_ext >&5
3224   rm -fr conftest*
3225   ac_cv_func_closedir_void=yes
3226 fi
3227 rm -fr conftest*
3228 fi
3229
3230 fi
3231
3232 echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
3233 if test $ac_cv_func_closedir_void = yes; then
3234   cat >> confdefs.h <<\EOF
3235 #define CLOSEDIR_VOID 1
3236 EOF
3237
3238 fi
3239
3240
3241
3242 echo $ac_n "checking for library containing getspnam""... $ac_c" 1>&6
3243 echo "configure:3244: checking for library containing getspnam" >&5
3244 if eval "test \"`echo '$''{'ac_cv_search_getspnam'+set}'`\" = set"; then
3245   echo $ac_n "(cached) $ac_c" 1>&6
3246 else
3247   ac_func_search_save_LIBS="$LIBS"
3248 ac_cv_search_getspnam="no"
3249 cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 /* Override any gcc2 internal prototype to avoid an error.  */
3253 /* We use char because int might match the return type of a gcc2
3254     builtin and then its argument prototype would still apply.  */
3255 char getspnam();
3256
3257 int main() {
3258 getspnam()
3259 ; return 0; }
3260 EOF
3261 if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3262   rm -rf conftest*
3263   ac_cv_search_getspnam="none required"
3264 else
3265   echo "configure: failed program was:" >&5
3266   cat conftest.$ac_ext >&5
3267 fi
3268 rm -f conftest*
3269 test "$ac_cv_search_getspnam" = "no" && for i in sec gen; do
3270 LIBS="-l$i  $ac_func_search_save_LIBS"
3271 cat > conftest.$ac_ext <<EOF
3272 #line 3273 "configure"
3273 #include "confdefs.h"
3274 /* Override any gcc2 internal prototype to avoid an error.  */
3275 /* We use char because int might match the return type of a gcc2
3276     builtin and then its argument prototype would still apply.  */
3277 char getspnam();
3278
3279 int main() {
3280 getspnam()
3281 ; return 0; }
3282 EOF
3283 if { (eval echo configure:3284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3284   rm -rf conftest*
3285   ac_cv_search_getspnam="-l$i"
3286 break
3287 else
3288   echo "configure: failed program was:" >&5
3289   cat conftest.$ac_ext >&5
3290 fi
3291 rm -f conftest*
3292 done
3293 LIBS="$ac_func_search_save_LIBS"
3294 fi
3295
3296 echo "$ac_t""$ac_cv_search_getspnam" 1>&6
3297 if test "$ac_cv_search_getspnam" != "no"; then
3298   test "$ac_cv_search_getspnam" = "none required" || LIBS="$ac_cv_search_getspnam $LIBS"
3299   cat >> confdefs.h <<\EOF
3300 #define HAVE_GETSPNAM 1
3301 EOF
3302
3303 else :
3304   
3305 fi
3306
3307 echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
3308 echo "configure:3309: checking whether utime accepts a null argument" >&5
3309 if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
3310   echo $ac_n "(cached) $ac_c" 1>&6
3311 else
3312   rm -f conftestdata; > conftestdata
3313 # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
3314 if test "$cross_compiling" = yes; then
3315   ac_cv_func_utime_null=no
3316 else
3317   cat > conftest.$ac_ext <<EOF
3318 #line 3319 "configure"
3319 #include "confdefs.h"
3320 #include <sys/types.h>
3321 #include <sys/stat.h>
3322 main() {
3323 struct stat s, t;
3324 exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
3325 && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
3326 && t.st_mtime - s.st_mtime < 120));
3327 }
3328 EOF
3329 if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3330 then
3331   ac_cv_func_utime_null=yes
3332 else
3333   echo "configure: failed program was:" >&5
3334   cat conftest.$ac_ext >&5
3335   rm -fr conftest*
3336   ac_cv_func_utime_null=no
3337 fi
3338 rm -fr conftest*
3339 fi
3340
3341 rm -f core core.* *.core
3342 fi
3343
3344 echo "$ac_t""$ac_cv_func_utime_null" 1>&6
3345 if test $ac_cv_func_utime_null = yes; then
3346   cat >> confdefs.h <<\EOF
3347 #define HAVE_UTIME_NULL 1
3348 EOF
3349
3350 fi
3351
3352 echo $ac_n "checking for long file names""... $ac_c" 1>&6
3353 echo "configure:3354: checking for long file names" >&5
3354 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   ac_cv_sys_long_file_names=yes
3358 # Test for long file names in all the places we know might matter:
3359 #      .                the current directory, where building will happen
3360 #      $prefix/lib      where we will be installing things
3361 #      $exec_prefix/lib likewise
3362 # eval it to expand exec_prefix.
3363 #      $TMPDIR          if set, where it might want to write temporary files
3364 # if $TMPDIR is not set:
3365 #      /tmp             where it might want to write temporary files
3366 #      /var/tmp         likewise
3367 #      /usr/tmp         likewise
3368 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3369   ac_tmpdirs="$TMPDIR"
3370 else
3371   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3372 fi
3373 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3374   test -d $ac_dir || continue
3375   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3376   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
3377   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
3378   val=`cat $ac_dir/conftest9012345 2>/dev/null`
3379   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
3380     ac_cv_sys_long_file_names=no
3381     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3382     break
3383   fi
3384   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
3385 done
3386 fi
3387
3388 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
3389 if test $ac_cv_sys_long_file_names = yes; then
3390   cat >> confdefs.h <<\EOF
3391 #define HAVE_LONG_FILE_NAMES 1
3392 EOF
3393
3394 fi
3395
3396
3397 echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
3398 echo "configure:3399: checking for working fnmatch" >&5
3399 if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
3400   echo $ac_n "(cached) $ac_c" 1>&6
3401 else
3402   # Some versions of Solaris or SCO have a broken fnmatch function.
3403 # So we run a test program.  If we are cross-compiling, take no chance.
3404 # Thanks to John Oleynick and Franc,ois Pinard for this test.
3405 if test "$cross_compiling" = yes; then
3406   ac_cv_func_fnmatch_works=no
3407 else
3408   cat > conftest.$ac_ext <<EOF
3409 #line 3410 "configure"
3410 #include "confdefs.h"
3411 main() { exit (fnmatch ("a*", "abc", 0) != 0); }
3412 EOF
3413 if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3414 then
3415   ac_cv_func_fnmatch_works=yes
3416 else
3417   echo "configure: failed program was:" >&5
3418   cat conftest.$ac_ext >&5
3419   rm -fr conftest*
3420   ac_cv_func_fnmatch_works=no
3421 fi
3422 rm -fr conftest*
3423 fi
3424
3425 fi
3426
3427 echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
3428 if test $ac_cv_func_fnmatch_works = yes; then
3429   cat >> confdefs.h <<\EOF
3430 #define HAVE_FNMATCH 1
3431 EOF
3432
3433 fi
3434
3435 if test "$ac_cv_func_fnmatch_works" = no; then
3436   LIBOBJS="$LIBOBJS fnmatch.o"
3437 fi
3438
3439 # Try to find connect and gethostbyname.
3440 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
3441 echo "configure:3442: checking for main in -lnsl" >&5
3442 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
3443 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3444   echo $ac_n "(cached) $ac_c" 1>&6
3445 else
3446   ac_save_LIBS="$LIBS"
3447 LIBS="-lnsl  $LIBS"
3448 cat > conftest.$ac_ext <<EOF
3449 #line 3450 "configure"
3450 #include "confdefs.h"
3451
3452 int main() {
3453 main()
3454 ; return 0; }
3455 EOF
3456 if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3457   rm -rf conftest*
3458   eval "ac_cv_lib_$ac_lib_var=yes"
3459 else
3460   echo "configure: failed program was:" >&5
3461   cat conftest.$ac_ext >&5
3462   rm -rf conftest*
3463   eval "ac_cv_lib_$ac_lib_var=no"
3464 fi
3465 rm -f conftest*
3466 LIBS="$ac_save_LIBS"
3467
3468 fi
3469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3470   echo "$ac_t""yes" 1>&6
3471   
3472 echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
3473 echo "configure:3474: checking for library containing connect" >&5
3474 if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then
3475   echo $ac_n "(cached) $ac_c" 1>&6
3476 else
3477   ac_func_search_save_LIBS="$LIBS"
3478 ac_cv_search_connect="no"
3479 cat > conftest.$ac_ext <<EOF
3480 #line 3481 "configure"
3481 #include "confdefs.h"
3482 /* Override any gcc2 internal prototype to avoid an error.  */
3483 /* We use char because int might match the return type of a gcc2
3484     builtin and then its argument prototype would still apply.  */
3485 char connect();
3486
3487 int main() {
3488 connect()
3489 ; return 0; }
3490 EOF
3491 if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3492   rm -rf conftest*
3493   ac_cv_search_connect="none required"
3494 else
3495   echo "configure: failed program was:" >&5
3496   cat conftest.$ac_ext >&5
3497 fi
3498 rm -f conftest*
3499 test "$ac_cv_search_connect" = "no" && for i in xnet socket inet; do
3500 LIBS="-l$i -lnsl $ac_func_search_save_LIBS"
3501 cat > conftest.$ac_ext <<EOF
3502 #line 3503 "configure"
3503 #include "confdefs.h"
3504 /* Override any gcc2 internal prototype to avoid an error.  */
3505 /* We use char because int might match the return type of a gcc2
3506     builtin and then its argument prototype would still apply.  */
3507 char connect();
3508
3509 int main() {
3510 connect()
3511 ; return 0; }
3512 EOF
3513 if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3514   rm -rf conftest*
3515   ac_cv_search_connect="-l$i"
3516 break
3517 else
3518   echo "configure: failed program was:" >&5
3519   cat conftest.$ac_ext >&5
3520 fi
3521 rm -f conftest*
3522 done
3523 LIBS="$ac_func_search_save_LIBS"
3524 fi
3525
3526 echo "$ac_t""$ac_cv_search_connect" 1>&6
3527 if test "$ac_cv_search_connect" != "no"; then
3528   test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS"
3529   cat >> confdefs.h <<\EOF
3530 #define HAVE_CONNECT 1
3531 EOF
3532
3533 else :
3534   
3535 fi
3536 else
3537   echo "$ac_t""no" 1>&6
3538
3539 echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
3540 echo "configure:3541: checking for library containing connect" >&5
3541 if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   ac_func_search_save_LIBS="$LIBS"
3545 ac_cv_search_connect="no"
3546 cat > conftest.$ac_ext <<EOF
3547 #line 3548 "configure"
3548 #include "confdefs.h"
3549 /* Override any gcc2 internal prototype to avoid an error.  */
3550 /* We use char because int might match the return type of a gcc2
3551     builtin and then its argument prototype would still apply.  */
3552 char connect();
3553
3554 int main() {
3555 connect()
3556 ; return 0; }
3557 EOF
3558 if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3559   rm -rf conftest*
3560   ac_cv_search_connect="none required"
3561 else
3562   echo "configure: failed program was:" >&5
3563   cat conftest.$ac_ext >&5
3564 fi
3565 rm -f conftest*
3566 test "$ac_cv_search_connect" = "no" && for i in xnet socket inet; do
3567 LIBS="-l$i  $ac_func_search_save_LIBS"
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 /* Override any gcc2 internal prototype to avoid an error.  */
3572 /* We use char because int might match the return type of a gcc2
3573     builtin and then its argument prototype would still apply.  */
3574 char connect();
3575
3576 int main() {
3577 connect()
3578 ; return 0; }
3579 EOF
3580 if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3581   rm -rf conftest*
3582   ac_cv_search_connect="-l$i"
3583 break
3584 else
3585   echo "configure: failed program was:" >&5
3586   cat conftest.$ac_ext >&5
3587 fi
3588 rm -f conftest*
3589 done
3590 LIBS="$ac_func_search_save_LIBS"
3591 fi
3592
3593 echo "$ac_t""$ac_cv_search_connect" 1>&6
3594 if test "$ac_cv_search_connect" != "no"; then
3595   test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS"
3596   cat >> confdefs.h <<\EOF
3597 #define HAVE_CONNECT 1
3598 EOF
3599
3600 else :
3601   
3602 fi
3603 fi
3604
3605
3606 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3607 echo "configure:3608: checking for library containing gethostbyname" >&5
3608 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3609   echo $ac_n "(cached) $ac_c" 1>&6
3610 else
3611   ac_func_search_save_LIBS="$LIBS"
3612 ac_cv_search_gethostbyname="no"
3613 cat > conftest.$ac_ext <<EOF
3614 #line 3615 "configure"
3615 #include "confdefs.h"
3616 /* Override any gcc2 internal prototype to avoid an error.  */
3617 /* We use char because int might match the return type of a gcc2
3618     builtin and then its argument prototype would still apply.  */
3619 char gethostbyname();
3620
3621 int main() {
3622 gethostbyname()
3623 ; return 0; }
3624 EOF
3625 if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3626   rm -rf conftest*
3627   ac_cv_search_gethostbyname="none required"
3628 else
3629   echo "configure: failed program was:" >&5
3630   cat conftest.$ac_ext >&5
3631 fi
3632 rm -f conftest*
3633 test "$ac_cv_search_gethostbyname" = "no" && for i in netinet nsl; do
3634 LIBS="-l$i  $ac_func_search_save_LIBS"
3635 cat > conftest.$ac_ext <<EOF
3636 #line 3637 "configure"
3637 #include "confdefs.h"
3638 /* Override any gcc2 internal prototype to avoid an error.  */
3639 /* We use char because int might match the return type of a gcc2
3640     builtin and then its argument prototype would still apply.  */
3641 char gethostbyname();
3642
3643 int main() {
3644 gethostbyname()
3645 ; return 0; }
3646 EOF
3647 if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3648   rm -rf conftest*
3649   ac_cv_search_gethostbyname="-l$i"
3650 break
3651 else
3652   echo "configure: failed program was:" >&5
3653   cat conftest.$ac_ext >&5
3654 fi
3655 rm -f conftest*
3656 done
3657 LIBS="$ac_func_search_save_LIBS"
3658 fi
3659
3660 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3661 if test "$ac_cv_search_gethostbyname" != "no"; then
3662   test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3663   
3664 else :
3665   
3666 fi
3667
3668 KRB4=/usr/kerberos
3669
3670 # Check whether --with-krb4 or --without-krb4 was given.
3671 if test "${with_krb4+set}" = set; then
3672   withval="$with_krb4"
3673   KRB4=$withval
3674 fi
3675 echo "default place for krb4 is $KRB4"
3676
3677
3678 krb_h=
3679 echo $ac_n "checking for krb.h""... $ac_c" 1>&6
3680 echo "configure:3681: checking for krb.h" >&5
3681 if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
3682    hold_cflags=$CFLAGS
3683    CFLAGS="$CFLAGS -I$KRB4/include"
3684    cat > conftest.$ac_ext <<EOF
3685 #line 3686 "configure"
3686 #include "confdefs.h"
3687 #include <krb.h>
3688 int main() {
3689 int i;
3690 ; return 0; }
3691 EOF
3692 if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3693   rm -rf conftest*
3694   krb_h=yes krb_incdir=$KRB4/include
3695 else
3696   echo "configure: failed program was:" >&5
3697   cat conftest.$ac_ext >&5
3698   rm -rf conftest*
3699   CFLAGS=$hold_cflags
3700            cat > conftest.$ac_ext <<EOF
3701 #line 3702 "configure"
3702 #include "confdefs.h"
3703 #include <krb.h>
3704 int main() {
3705 int i;
3706 ; return 0; }
3707 EOF
3708 if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3709   rm -rf conftest*
3710   krb_h=yes krb_incdir=
3711 else
3712   echo "configure: failed program was:" >&5
3713   cat conftest.$ac_ext >&5
3714 fi
3715 rm -f conftest*
3716 fi
3717 rm -f conftest*
3718    CFLAGS=$hold_cflags
3719 else
3720    cat > conftest.$ac_ext <<EOF
3721 #line 3722 "configure"
3722 #include "confdefs.h"
3723 #include <krb.h>
3724 int main() {
3725 int i;
3726 ; return 0; }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3729   rm -rf conftest*
3730   krb_h=yes krb_incdir=
3731 else
3732   echo "configure: failed program was:" >&5
3733   cat conftest.$ac_ext >&5
3734 fi
3735 rm -f conftest*
3736 fi
3737 if test -z "$krb_h"; then
3738   cat > conftest.$ac_ext <<EOF
3739 #line 3740 "configure"
3740 #include "confdefs.h"
3741 #include <krb.h>
3742 int main() {
3743 int i;
3744 ; return 0; }
3745 EOF
3746 if { (eval echo configure:3747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3747   rm -rf conftest*
3748   krb_h=yes krb_incdir=
3749 else
3750   echo "configure: failed program was:" >&5
3751   cat conftest.$ac_ext >&5
3752   rm -rf conftest*
3753   if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then
3754        hold_cflags=$CFLAGS
3755        CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
3756        cat > conftest.$ac_ext <<EOF
3757 #line 3758 "configure"
3758 #include "confdefs.h"
3759 #include <krb.h>
3760 int main() {
3761 int i;
3762 ; return 0; }
3763 EOF
3764 if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3765   rm -rf conftest*
3766   krb_h=yes krb_incdir=$KRB4/include/kerberosIV
3767 else
3768   echo "configure: failed program was:" >&5
3769   cat conftest.$ac_ext >&5
3770 fi
3771 rm -f conftest*
3772        CFLAGS=$hold_cflags
3773      fi
3774 fi
3775 rm -f conftest*
3776 fi
3777 echo "$ac_t""$krb_h" 1>&6
3778
3779 includeopt=
3780
3781 if test -n "$krb_h"; then
3782   krb_lib=
3783   if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
3784        hold_ldflags=$LDFLAGS
3785        LDFLAGS="-L${KRB4}/lib $LDFLAGS"
3786        echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6
3787 echo "configure:3788: checking for printf in -lkrb" >&5
3788 ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'`
3789 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3790   echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792   ac_save_LIBS="$LIBS"
3793 LIBS="-lkrb  $LIBS"
3794 cat > conftest.$ac_ext <<EOF
3795 #line 3796 "configure"
3796 #include "confdefs.h"
3797 /* Override any gcc2 internal prototype to avoid an error.  */
3798 /* We use char because int might match the return type of a gcc2
3799     builtin and then its argument prototype would still apply.  */
3800 char printf();
3801
3802 int main() {
3803 printf()
3804 ; return 0; }
3805 EOF
3806 if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3807   rm -rf conftest*
3808   eval "ac_cv_lib_$ac_lib_var=yes"
3809 else
3810   echo "configure: failed program was:" >&5
3811   cat conftest.$ac_ext >&5
3812   rm -rf conftest*
3813   eval "ac_cv_lib_$ac_lib_var=no"
3814 fi
3815 rm -f conftest*
3816 LIBS="$ac_save_LIBS"
3817
3818 fi
3819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3820   echo "$ac_t""yes" 1>&6
3821   krb_lib=yes krb_libdir=${KRB4}/lib
3822 else
3823   echo "$ac_t""no" 1>&6
3824 LDFLAGS=$hold_ldflags
3825             # Using open here instead of printf so we don't
3826             # get confused by the cached value for printf from above.
3827             echo $ac_n "checking for open in -lkrb""... $ac_c" 1>&6
3828 echo "configure:3829: checking for open in -lkrb" >&5
3829 ac_lib_var=`echo krb'_'open | sed 'y%./+-%__p_%'`
3830 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3831   echo $ac_n "(cached) $ac_c" 1>&6
3832 else
3833   ac_save_LIBS="$LIBS"
3834 LIBS="-lkrb  $LIBS"
3835 cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 /* Override any gcc2 internal prototype to avoid an error.  */
3839 /* We use char because int might match the return type of a gcc2
3840     builtin and then its argument prototype would still apply.  */
3841 char open();
3842
3843 int main() {
3844 open()
3845 ; return 0; }
3846 EOF
3847 if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3848   rm -rf conftest*
3849   eval "ac_cv_lib_$ac_lib_var=yes"
3850 else
3851   echo "configure: failed program was:" >&5
3852   cat conftest.$ac_ext >&5
3853   rm -rf conftest*
3854   eval "ac_cv_lib_$ac_lib_var=no"
3855 fi
3856 rm -f conftest*
3857 LIBS="$ac_save_LIBS"
3858
3859 fi
3860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3861   echo "$ac_t""yes" 1>&6
3862   krb_lib=yes krb_libdir=
3863 else
3864   echo "$ac_t""no" 1>&6
3865 fi
3866
3867 fi
3868
3869        LDFLAGS=$hold_ldflags
3870   else
3871        echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6
3872 echo "configure:3873: checking for printf in -lkrb" >&5
3873 ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'`
3874 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   ac_save_LIBS="$LIBS"
3878 LIBS="-lkrb  $LIBS"
3879 cat > conftest.$ac_ext <<EOF
3880 #line 3881 "configure"
3881 #include "confdefs.h"
3882 /* Override any gcc2 internal prototype to avoid an error.  */
3883 /* We use char because int might match the return type of a gcc2
3884     builtin and then its argument prototype would still apply.  */
3885 char printf();
3886
3887 int main() {
3888 printf()
3889 ; return 0; }
3890 EOF
3891 if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3892   rm -rf conftest*
3893   eval "ac_cv_lib_$ac_lib_var=yes"
3894 else
3895   echo "configure: failed program was:" >&5
3896   cat conftest.$ac_ext >&5
3897   rm -rf conftest*
3898   eval "ac_cv_lib_$ac_lib_var=no"
3899 fi
3900 rm -f conftest*
3901 LIBS="$ac_save_LIBS"
3902
3903 fi
3904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3905   echo "$ac_t""yes" 1>&6
3906   krb_lib=yes krb_libdir=
3907 else
3908   echo "$ac_t""no" 1>&6
3909 fi
3910
3911   fi
3912   if test -n "$krb_lib"; then
3913     cat >> confdefs.h <<\EOF
3914 #define HAVE_KERBEROS 1
3915 EOF
3916
3917     test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
3918     LIBS="${LIBS} -lkrb"
3919     # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
3920     # -ldes in the command line.  Don't do it permanently so that we honor
3921     # the user's setting for LDFLAGS
3922     hold_ldflags=$LDFLAGS
3923     test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
3924     echo $ac_n "checking for printf in -ldes""... $ac_c" 1>&6
3925 echo "configure:3926: checking for printf in -ldes" >&5
3926 ac_lib_var=`echo des'_'printf | sed 'y%./+-%__p_%'`
3927 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3928   echo $ac_n "(cached) $ac_c" 1>&6
3929 else
3930   ac_save_LIBS="$LIBS"
3931 LIBS="-ldes  $LIBS"
3932 cat > conftest.$ac_ext <<EOF
3933 #line 3934 "configure"
3934 #include "confdefs.h"
3935 /* Override any gcc2 internal prototype to avoid an error.  */
3936 /* We use char because int might match the return type of a gcc2
3937     builtin and then its argument prototype would still apply.  */
3938 char printf();
3939
3940 int main() {
3941 printf()
3942 ; return 0; }
3943 EOF
3944 if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3945   rm -rf conftest*
3946   eval "ac_cv_lib_$ac_lib_var=yes"
3947 else
3948   echo "configure: failed program was:" >&5
3949   cat conftest.$ac_ext >&5
3950   rm -rf conftest*
3951   eval "ac_cv_lib_$ac_lib_var=no"
3952 fi
3953 rm -f conftest*
3954 LIBS="$ac_save_LIBS"
3955
3956 fi
3957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3958   echo "$ac_t""yes" 1>&6
3959   LIBS="${LIBS} -ldes"
3960 else
3961   echo "$ac_t""no" 1>&6
3962 fi
3963
3964     LDFLAGS=$hold_ldflags
3965     if test -n "$krb_incdir"; then
3966       includeopt="${includeopt} -I$krb_incdir"
3967     fi
3968   fi
3969 fi
3970 for ac_func in krb_get_err_text
3971 do
3972 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3973 echo "configure:3974: checking for $ac_func" >&5
3974 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3975   echo $ac_n "(cached) $ac_c" 1>&6
3976 else
3977   cat > conftest.$ac_ext <<EOF
3978 #line 3979 "configure"
3979 #include "confdefs.h"
3980 /* System header to define __stub macros and hopefully few prototypes,
3981     which can conflict with char $ac_func(); below.  */
3982 #include <assert.h>
3983 /* Override any gcc2 internal prototype to avoid an error.  */
3984 /* We use char because int might match the return type of a gcc2
3985     builtin and then its argument prototype would still apply.  */
3986 char $ac_func();
3987
3988 int main() {
3989
3990 /* The GNU C library defines this for functions which it implements
3991     to always fail with ENOSYS.  Some functions are actually named
3992     something starting with __ and the normal name is an alias.  */
3993 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3994 choke me
3995 #else
3996 $ac_func();
3997 #endif
3998
3999 ; return 0; }
4000 EOF
4001 if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4002   rm -rf conftest*
4003   eval "ac_cv_func_$ac_func=yes"
4004 else
4005   echo "configure: failed program was:" >&5
4006   cat conftest.$ac_ext >&5
4007   rm -rf conftest*
4008   eval "ac_cv_func_$ac_func=no"
4009 fi
4010 rm -f conftest*
4011 fi
4012
4013 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4014   echo "$ac_t""yes" 1>&6
4015     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4016   cat >> confdefs.h <<EOF
4017 #define $ac_tr_func 1
4018 EOF
4019  
4020 else
4021   echo "$ac_t""no" 1>&6
4022 fi
4023 done
4024
4025
4026
4027 #
4028 # Use --with-gssapi[=DIR] to enable GSSAPI support.
4029 #
4030 # defaults to enabled with DIR in default list below
4031 #
4032 # Search for /SUNHEA/ and read the comments about this default below.
4033 #
4034 # Check whether --with-gssapi or --without-gssapi was given.
4035 if test "${with_gssapi+set}" = set; then
4036   withval="$with_gssapi"
4037   acx_gssapi_withgssapi=$withval
4038 else
4039   acx_gssapi_withgssapi=yes
4040 fi
4041
4042 #
4043 # Try to locate a GSSAPI installation if no location was specified, assuming
4044 # GSSAPI was enabled (the default).
4045
4046 if test -n "$acx_gssapi_cv_gssapi"; then
4047   # Granted, this is a slightly ugly way to print this info, but the
4048   # AC_CHECK_HEADER used in the search for a GSSAPI installation makes using
4049   # AC_CACHE_CHECK worse
4050   echo $ac_n "checking for GSSAPI""... $ac_c" 1>&6
4051 echo "configure:4052: checking for GSSAPI" >&5
4052 else :; fi
4053 if eval "test \"`echo '$''{'acx_gssapi_cv_gssapi'+set}'`\" = set"; then
4054   echo $ac_n "(cached) $ac_c" 1>&6
4055 else
4056   
4057 if test x$acx_gssapi_withgssapi = xyes; then
4058   # --with but no location specified
4059   # assume a gssapi.h or gssapi/gssapi.h locates our install.
4060   #
4061   # This isn't always strictly true.  For instance Solaris 7's SUNHEA (header)
4062   # package installs gssapi.h whether or not the necessary libraries are
4063   # installed.  I'm still not sure whether to consider this a bug.  The long
4064   # way around is to not consider GSSPAI installed unless gss_import_name is
4065   # found, but that brings up a lot of other hassles, like continuing to let
4066   # gcc & ld generate the error messages when the user uses --with-gssapi=dir
4067   # as a debugging aid.  The short way around is to disable GSSAPI by default,
4068   # but I think Sun users have been faced with this for awhile and I haven't
4069   # heard many complaints.
4070   acx_gssapi_save_CPPFLAGS=$CPPFLAGS
4071   for acx_gssapi_cv_gssapi in yes /usr/kerberos /usr/cygnus/kerbnet no; do
4072     if test x$acx_gssapi_cv_gssapi = xno; then
4073       break
4074     fi
4075     if test x$acx_gssapi_cv_gssapi = xyes; then
4076       echo "checking for GSSAPI" 1>&6
4077 echo "configure:4078: checking for GSSAPI" >&5
4078     else
4079       CPPFLAGS="$acx_gssapi_save_CPPFLAGS -I$acx_gssapi_cv_gssapi/include"
4080       echo "checking for GSSAPI in $acx_gssapi_cv_gssapi" 1>&6
4081 echo "configure:4082: checking for GSSAPI in $acx_gssapi_cv_gssapi" >&5
4082     fi
4083     unset ac_cv_header_gssapi_h
4084     unset ac_cv_header_gssapi_gssapi_h
4085     for ac_hdr in gssapi.h gssapi/gssapi.h
4086 do
4087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4089 echo "configure:4090: checking for $ac_hdr" >&5
4090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4091   echo $ac_n "(cached) $ac_c" 1>&6
4092 else
4093   cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096 #include <$ac_hdr>
4097 EOF
4098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4099 { (eval echo configure:4100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4101 if test -z "$ac_err"; then
4102   rm -rf conftest*
4103   eval "ac_cv_header_$ac_safe=yes"
4104 else
4105   echo "$ac_err" >&5
4106   echo "configure: failed program was:" >&5
4107   cat conftest.$ac_ext >&5
4108   rm -rf conftest*
4109   eval "ac_cv_header_$ac_safe=no"
4110 fi
4111 rm -f conftest*
4112 fi
4113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4114   echo "$ac_t""yes" 1>&6
4115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4116   cat >> confdefs.h <<EOF
4117 #define $ac_tr_hdr 1
4118 EOF
4119  
4120 else
4121   echo "$ac_t""no" 1>&6
4122 fi
4123 done
4124
4125     if test "$ac_cv_header_gssapi_h" = "yes" ||
4126         test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
4127       break
4128     fi
4129   done
4130   CPPFLAGS=$acx_gssapi_save_CPPFLAGS
4131 else
4132   acx_gssapi_cv_gssapi=$acx_gssapi_withgssapi
4133 fi
4134 echo $ac_n "checking for GSSAPI""... $ac_c" 1>&6
4135 echo "configure:4136: checking for GSSAPI" >&5
4136
4137 fi
4138 echo "$ac_t""$acx_gssapi_cv_gssapi" 1>&6
4139
4140 #
4141 # Set up GSSAPI includes for later use.  We don't bother to check for
4142 # $acx_gssapi_cv_gssapi=no here since that will be caught later.
4143 #
4144 if test x$acx_gssapi_cv_gssapi = yes; then
4145   # no special includes necessary
4146   GSSAPI_INCLUDES=""
4147 else
4148   # GSSAPI at $acx_gssapi_cv_gssapi (could be 'no')
4149   GSSAPI_INCLUDES=" -I$acx_gssapi_cv_gssapi/include"
4150 fi
4151
4152 #
4153 # Get the rest of the information CVS needs to compile with GSSAPI support
4154 #
4155 if test x$acx_gssapi_cv_gssapi != xno; then
4156   # define HAVE_GSSAPI and set up the includes
4157   cat >> confdefs.h <<\EOF
4158 #define HAVE_GSSAPI 
4159 EOF
4160
4161   includeopt=$includeopt$GSSAPI_INCLUDES
4162
4163   # locate any other headers
4164   acx_gssapi_save_CPPFLAGS=$CPPFLAGS
4165   CPPFLAGS=$CPPFLAGS$GSSAPI_INCLUDES
4166       for ac_hdr in gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h krb5.h
4167 do
4168 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4169 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4170 echo "configure:4171: checking for $ac_hdr" >&5
4171 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4172   echo $ac_n "(cached) $ac_c" 1>&6
4173 else
4174   cat > conftest.$ac_ext <<EOF
4175 #line 4176 "configure"
4176 #include "confdefs.h"
4177 #include <$ac_hdr>
4178 EOF
4179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4180 { (eval echo configure:4181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4182 if test -z "$ac_err"; then
4183   rm -rf conftest*
4184   eval "ac_cv_header_$ac_safe=yes"
4185 else
4186   echo "$ac_err" >&5
4187   echo "configure: failed program was:" >&5
4188   cat conftest.$ac_ext >&5
4189   rm -rf conftest*
4190   eval "ac_cv_header_$ac_safe=no"
4191 fi
4192 rm -f conftest*
4193 fi
4194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4195   echo "$ac_t""yes" 1>&6
4196     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4197   cat >> confdefs.h <<EOF
4198 #define $ac_tr_hdr 1
4199 EOF
4200  
4201 else
4202   echo "$ac_t""no" 1>&6
4203 fi
4204 done
4205
4206   # And look through them for GSS_C_NT_HOSTBASED_SERVICE or its alternatives
4207   echo $ac_n "checking for GSS_C_NT_HOSTBASED_SERVICE""... $ac_c" 1>&6
4208 echo "configure:4209: checking for GSS_C_NT_HOSTBASED_SERVICE" >&5
4209 if eval "test \"`echo '$''{'acx_gssapi_cv_gss_c_nt_hostbased_service'+set}'`\" = set"; then
4210   echo $ac_n "(cached) $ac_c" 1>&6
4211 else
4212   acx_gssapi_cv_gss_c_nt_hostbased_service=no
4213     if test "$ac_cv_header_gssapi_h" = "yes"; then
4214       cat > conftest.$ac_ext <<EOF
4215 #line 4216 "configure"
4216 #include "confdefs.h"
4217 #include <gssapi.h>
4218 EOF
4219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4220   egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
4221   rm -rf conftest*
4222   acx_gssapi_cv_gss_c_nt_hostbased_service=yes
4223 else
4224   rm -rf conftest*
4225   cat > conftest.$ac_ext <<EOF
4226 #line 4227 "configure"
4227 #include "confdefs.h"
4228 #include <gssapi.h>
4229 EOF
4230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4231   egrep "gss_nt_service_name" >/dev/null 2>&1; then
4232   rm -rf conftest*
4233   acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name
4234 fi
4235 rm -f conftest*
4236
4237 fi
4238 rm -f conftest*
4239
4240     fi
4241     if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
4242         test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
4243       cat > conftest.$ac_ext <<EOF
4244 #line 4245 "configure"
4245 #include "confdefs.h"
4246 #include <gssapi/gssapi.h>
4247 EOF
4248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4249   egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
4250   rm -rf conftest*
4251   acx_gssapi_cv_gss_c_nt_hostbased_service
4252 else
4253   rm -rf conftest*
4254   cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257 #include <gssapi/gssapi.h>
4258 EOF
4259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4260   egrep "gss_nt_service_name" >/dev/null 2>&1; then
4261   rm -rf conftest*
4262   acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name
4263 fi
4264 rm -f conftest*
4265
4266 fi
4267 rm -f conftest*
4268
4269     fi
4270     if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
4271         test "$ac_cv_header_gssapi_gssapi_generic_h" = "yes"; then
4272       cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275 #include <gssapi/gssapi_generic.h>
4276 EOF
4277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4278   egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
4279   rm -rf conftest*
4280   acx_gssapi_cv_gss_c_nt_hostbased_service
4281 else
4282   rm -rf conftest*
4283   cat > conftest.$ac_ext <<EOF
4284 #line 4285 "configure"
4285 #include "confdefs.h"
4286 #include <gssapi/gssapi_generic.h>
4287 EOF
4288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4289   egrep "gss_nt_service_name" >/dev/null 2>&1; then
4290   rm -rf conftest*
4291   acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name
4292 fi
4293 rm -f conftest*
4294
4295 fi
4296 rm -f conftest*
4297
4298     fi
4299 fi
4300
4301 echo "$ac_t""$acx_gssapi_cv_gss_c_nt_hostbased_service" 1>&6
4302   if test $acx_gssapi_cv_gss_c_nt_hostbased_service != yes &&
4303       test $acx_gssapi_cv_gss_c_nt_hostbased_service != no; then
4304     # don't define for yes since that means it already means something and
4305     # don't define for no since we'd rather the compiler catch the error
4306     cat >> confdefs.h <<EOF
4307 #define GSS_C_NT_HOSTBASED_SERVICE $acx_gssapi_cv_gss_c_nt_hostbased_service
4308 EOF
4309
4310   fi
4311   CPPFLAGS=$acx_gssapi_save_CPPFLAGS
4312
4313   # Expect the libs to be installed parallel to the headers
4314   #
4315   # We could try once with and once without, but I'm not sure it's worth the
4316   # trouble.
4317   if test x$acx_gssapi_cv_gssapi != xyes; then
4318     if test -z "$LIBS"; then
4319       LIBS="-L$acx_gssapi_cv_gssapi/lib"
4320     else
4321       LIBS="-L$acx_gssapi_cv_gssapi/lib $LIBS"
4322     fi
4323   else :; fi
4324
4325       #
4326   # Some of the order below is particular due to library dependencies
4327   #
4328
4329   #
4330   # des                 Heimdal K 0.3d, but Heimdal seems to be set up such
4331   #                     that it could have been installed from elsewhere.
4332   #
4333   
4334 echo $ac_n "checking for library containing des_set_odd_parity""... $ac_c" 1>&6
4335 echo "configure:4336: checking for library containing des_set_odd_parity" >&5
4336 if eval "test \"`echo '$''{'ac_cv_search_des_set_odd_parity'+set}'`\" = set"; then
4337   echo $ac_n "(cached) $ac_c" 1>&6
4338 else
4339   ac_func_search_save_LIBS="$LIBS"
4340 ac_cv_search_des_set_odd_parity="no"
4341 cat > conftest.$ac_ext <<EOF
4342 #line 4343 "configure"
4343 #include "confdefs.h"
4344 /* Override any gcc2 internal prototype to avoid an error.  */
4345 /* We use char because int might match the return type of a gcc2
4346     builtin and then its argument prototype would still apply.  */
4347 char des_set_odd_parity();
4348
4349 int main() {
4350 des_set_odd_parity()
4351 ; return 0; }
4352 EOF
4353 if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4354   rm -rf conftest*
4355   ac_cv_search_des_set_odd_parity="none required"
4356 else
4357   echo "configure: failed program was:" >&5
4358   cat conftest.$ac_ext >&5
4359 fi
4360 rm -f conftest*
4361 test "$ac_cv_search_des_set_odd_parity" = "no" && for i in des; do
4362 LIBS="-l$i  $ac_func_search_save_LIBS"
4363 cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366 /* Override any gcc2 internal prototype to avoid an error.  */
4367 /* We use char because int might match the return type of a gcc2
4368     builtin and then its argument prototype would still apply.  */
4369 char des_set_odd_parity();
4370
4371 int main() {
4372 des_set_odd_parity()
4373 ; return 0; }
4374 EOF
4375 if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4376   rm -rf conftest*
4377   ac_cv_search_des_set_odd_parity="-l$i"
4378 break
4379 else
4380   echo "configure: failed program was:" >&5
4381   cat conftest.$ac_ext >&5
4382 fi
4383 rm -f conftest*
4384 done
4385 LIBS="$ac_func_search_save_LIBS"
4386 fi
4387
4388 echo "$ac_t""$ac_cv_search_des_set_odd_parity" 1>&6
4389 if test "$ac_cv_search_des_set_odd_parity" != "no"; then
4390   test "$ac_cv_search_des_set_odd_parity" = "none required" || LIBS="$ac_cv_search_des_set_odd_parity $LIBS"
4391   
4392 else :
4393   
4394 fi
4395
4396   #
4397   # com_err             Heimdal K 0.3d
4398   #
4399   # com_err             MIT K5 v1.2.2-beta1
4400   #
4401   
4402 echo $ac_n "checking for library containing com_err""... $ac_c" 1>&6
4403 echo "configure:4404: checking for library containing com_err" >&5
4404 if eval "test \"`echo '$''{'ac_cv_search_com_err'+set}'`\" = set"; then
4405   echo $ac_n "(cached) $ac_c" 1>&6
4406 else
4407   ac_func_search_save_LIBS="$LIBS"
4408 ac_cv_search_com_err="no"
4409 cat > conftest.$ac_ext <<EOF
4410 #line 4411 "configure"
4411 #include "confdefs.h"
4412 /* Override any gcc2 internal prototype to avoid an error.  */
4413 /* We use char because int might match the return type of a gcc2
4414     builtin and then its argument prototype would still apply.  */
4415 char com_err();
4416
4417 int main() {
4418 com_err()
4419 ; return 0; }
4420 EOF
4421 if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4422   rm -rf conftest*
4423   ac_cv_search_com_err="none required"
4424 else
4425   echo "configure: failed program was:" >&5
4426   cat conftest.$ac_ext >&5
4427 fi
4428 rm -f conftest*
4429 test "$ac_cv_search_com_err" = "no" && for i in com_err; do
4430 LIBS="-l$i  $ac_func_search_save_LIBS"
4431 cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434 /* Override any gcc2 internal prototype to avoid an error.  */
4435 /* We use char because int might match the return type of a gcc2
4436     builtin and then its argument prototype would still apply.  */
4437 char com_err();
4438
4439 int main() {
4440 com_err()
4441 ; return 0; }
4442 EOF
4443 if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4444   rm -rf conftest*
4445   ac_cv_search_com_err="-l$i"
4446 break
4447 else
4448   echo "configure: failed program was:" >&5
4449   cat conftest.$ac_ext >&5
4450 fi
4451 rm -f conftest*
4452 done
4453 LIBS="$ac_func_search_save_LIBS"
4454 fi
4455
4456 echo "$ac_t""$ac_cv_search_com_err" 1>&6
4457 if test "$ac_cv_search_com_err" != "no"; then
4458   test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
4459   
4460 else :
4461   
4462 fi
4463
4464   #
4465   # asn1                Heimdal K 0.3d          -lcom_err
4466   #
4467   
4468 echo $ac_n "checking for library containing initialize_asn1_error_table_r""... $ac_c" 1>&6
4469 echo "configure:4470: checking for library containing initialize_asn1_error_table_r" >&5
4470 if eval "test \"`echo '$''{'ac_cv_search_initialize_asn1_error_table_r'+set}'`\" = set"; then
4471   echo $ac_n "(cached) $ac_c" 1>&6
4472 else
4473   ac_func_search_save_LIBS="$LIBS"
4474 ac_cv_search_initialize_asn1_error_table_r="no"
4475 cat > conftest.$ac_ext <<EOF
4476 #line 4477 "configure"
4477 #include "confdefs.h"
4478 /* Override any gcc2 internal prototype to avoid an error.  */
4479 /* We use char because int might match the return type of a gcc2
4480     builtin and then its argument prototype would still apply.  */
4481 char initialize_asn1_error_table_r();
4482
4483 int main() {
4484 initialize_asn1_error_table_r()
4485 ; return 0; }
4486 EOF
4487 if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4488   rm -rf conftest*
4489   ac_cv_search_initialize_asn1_error_table_r="none required"
4490 else
4491   echo "configure: failed program was:" >&5
4492   cat conftest.$ac_ext >&5
4493 fi
4494 rm -f conftest*
4495 test "$ac_cv_search_initialize_asn1_error_table_r" = "no" && for i in asn1; do
4496 LIBS="-l$i  $ac_func_search_save_LIBS"
4497 cat > conftest.$ac_ext <<EOF
4498 #line 4499 "configure"
4499 #include "confdefs.h"
4500 /* Override any gcc2 internal prototype to avoid an error.  */
4501 /* We use char because int might match the return type of a gcc2
4502     builtin and then its argument prototype would still apply.  */
4503 char initialize_asn1_error_table_r();
4504
4505 int main() {
4506 initialize_asn1_error_table_r()
4507 ; return 0; }
4508 EOF
4509 if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4510   rm -rf conftest*
4511   ac_cv_search_initialize_asn1_error_table_r="-l$i"
4512 break
4513 else
4514   echo "configure: failed program was:" >&5
4515   cat conftest.$ac_ext >&5
4516 fi
4517 rm -f conftest*
4518 done
4519 LIBS="$ac_func_search_save_LIBS"
4520 fi
4521
4522 echo "$ac_t""$ac_cv_search_initialize_asn1_error_table_r" 1>&6
4523 if test "$ac_cv_search_initialize_asn1_error_table_r" != "no"; then
4524   test "$ac_cv_search_initialize_asn1_error_table_r" = "none required" || LIBS="$ac_cv_search_initialize_asn1_error_table_r $LIBS"
4525   
4526 else :
4527   
4528 fi
4529
4530   #
4531   # resolv              required, but not installed by Heimdal K 0.3d
4532   #
4533   # resolv              MIT K5 1.2.2-beta1
4534   #                     Linux 2.2.17
4535   #
4536   
4537 echo $ac_n "checking for library containing __dn_expand""... $ac_c" 1>&6
4538 echo "configure:4539: checking for library containing __dn_expand" >&5
4539 if eval "test \"`echo '$''{'ac_cv_search___dn_expand'+set}'`\" = set"; then
4540   echo $ac_n "(cached) $ac_c" 1>&6
4541 else
4542   ac_func_search_save_LIBS="$LIBS"
4543 ac_cv_search___dn_expand="no"
4544 cat > conftest.$ac_ext <<EOF
4545 #line 4546 "configure"
4546 #include "confdefs.h"
4547 /* Override any gcc2 internal prototype to avoid an error.  */
4548 /* We use char because int might match the return type of a gcc2
4549     builtin and then its argument prototype would still apply.  */
4550 char __dn_expand();
4551
4552 int main() {
4553 __dn_expand()
4554 ; return 0; }
4555 EOF
4556 if { (eval echo configure:4557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4557   rm -rf conftest*
4558   ac_cv_search___dn_expand="none required"
4559 else
4560   echo "configure: failed program was:" >&5
4561   cat conftest.$ac_ext >&5
4562 fi
4563 rm -f conftest*
4564 test "$ac_cv_search___dn_expand" = "no" && for i in resolv; do
4565 LIBS="-l$i  $ac_func_search_save_LIBS"
4566 cat > conftest.$ac_ext <<EOF
4567 #line 4568 "configure"
4568 #include "confdefs.h"
4569 /* Override any gcc2 internal prototype to avoid an error.  */
4570 /* We use char because int might match the return type of a gcc2
4571     builtin and then its argument prototype would still apply.  */
4572 char __dn_expand();
4573
4574 int main() {
4575 __dn_expand()
4576 ; return 0; }
4577 EOF
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4579   rm -rf conftest*
4580   ac_cv_search___dn_expand="-l$i"
4581 break
4582 else
4583   echo "configure: failed program was:" >&5
4584   cat conftest.$ac_ext >&5
4585 fi
4586 rm -f conftest*
4587 done
4588 LIBS="$ac_func_search_save_LIBS"
4589 fi
4590
4591 echo "$ac_t""$ac_cv_search___dn_expand" 1>&6
4592 if test "$ac_cv_search___dn_expand" != "no"; then
4593   test "$ac_cv_search___dn_expand" = "none required" || LIBS="$ac_cv_search___dn_expand $LIBS"
4594   
4595 else :
4596   
4597 fi
4598
4599   #
4600   # roken               Heimdal K 0.3d          -lresolv
4601   #
4602   
4603 echo $ac_n "checking for library containing roken_gethostbyaddr""... $ac_c" 1>&6
4604 echo "configure:4605: checking for library containing roken_gethostbyaddr" >&5
4605 if eval "test \"`echo '$''{'ac_cv_search_roken_gethostbyaddr'+set}'`\" = set"; then
4606   echo $ac_n "(cached) $ac_c" 1>&6
4607 else
4608   ac_func_search_save_LIBS="$LIBS"
4609 ac_cv_search_roken_gethostbyaddr="no"
4610 cat > conftest.$ac_ext <<EOF
4611 #line 4612 "configure"
4612 #include "confdefs.h"
4613 /* Override any gcc2 internal prototype to avoid an error.  */
4614 /* We use char because int might match the return type of a gcc2
4615     builtin and then its argument prototype would still apply.  */
4616 char roken_gethostbyaddr();
4617
4618 int main() {
4619 roken_gethostbyaddr()
4620 ; return 0; }
4621 EOF
4622 if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4623   rm -rf conftest*
4624   ac_cv_search_roken_gethostbyaddr="none required"
4625 else
4626   echo "configure: failed program was:" >&5
4627   cat conftest.$ac_ext >&5
4628 fi
4629 rm -f conftest*
4630 test "$ac_cv_search_roken_gethostbyaddr" = "no" && for i in roken; do
4631 LIBS="-l$i  $ac_func_search_save_LIBS"
4632 cat > conftest.$ac_ext <<EOF
4633 #line 4634 "configure"
4634 #include "confdefs.h"
4635 /* Override any gcc2 internal prototype to avoid an error.  */
4636 /* We use char because int might match the return type of a gcc2
4637     builtin and then its argument prototype would still apply.  */
4638 char roken_gethostbyaddr();
4639
4640 int main() {
4641 roken_gethostbyaddr()
4642 ; return 0; }
4643 EOF
4644 if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4645   rm -rf conftest*
4646   ac_cv_search_roken_gethostbyaddr="-l$i"
4647 break
4648 else
4649   echo "configure: failed program was:" >&5
4650   cat conftest.$ac_ext >&5
4651 fi
4652 rm -f conftest*
4653 done
4654 LIBS="$ac_func_search_save_LIBS"
4655 fi
4656
4657 echo "$ac_t""$ac_cv_search_roken_gethostbyaddr" 1>&6
4658 if test "$ac_cv_search_roken_gethostbyaddr" != "no"; then
4659   test "$ac_cv_search_roken_gethostbyaddr" = "none required" || LIBS="$ac_cv_search_roken_gethostbyaddr $LIBS"
4660   
4661 else :
4662   
4663 fi
4664
4665   #
4666   # k5crypto            MIT K5 v1.2.2-beta1
4667   #
4668   
4669 echo $ac_n "checking for library containing valid_enctype""... $ac_c" 1>&6
4670 echo "configure:4671: checking for library containing valid_enctype" >&5
4671 if eval "test \"`echo '$''{'ac_cv_search_valid_enctype'+set}'`\" = set"; then
4672   echo $ac_n "(cached) $ac_c" 1>&6
4673 else
4674   ac_func_search_save_LIBS="$LIBS"
4675 ac_cv_search_valid_enctype="no"
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 /* Override any gcc2 internal prototype to avoid an error.  */
4680 /* We use char because int might match the return type of a gcc2
4681     builtin and then its argument prototype would still apply.  */
4682 char valid_enctype();
4683
4684 int main() {
4685 valid_enctype()
4686 ; return 0; }
4687 EOF
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4689   rm -rf conftest*
4690   ac_cv_search_valid_enctype="none required"
4691 else
4692   echo "configure: failed program was:" >&5
4693   cat conftest.$ac_ext >&5
4694 fi
4695 rm -f conftest*
4696 test "$ac_cv_search_valid_enctype" = "no" && for i in k5crypto; do
4697 LIBS="-l$i  $ac_func_search_save_LIBS"
4698 cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 /* Override any gcc2 internal prototype to avoid an error.  */
4702 /* We use char because int might match the return type of a gcc2
4703     builtin and then its argument prototype would still apply.  */
4704 char valid_enctype();
4705
4706 int main() {
4707 valid_enctype()
4708 ; return 0; }
4709 EOF
4710 if { (eval echo configure:4711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4711   rm -rf conftest*
4712   ac_cv_search_valid_enctype="-l$i"
4713 break
4714 else
4715   echo "configure: failed program was:" >&5
4716   cat conftest.$ac_ext >&5
4717 fi
4718 rm -f conftest*
4719 done
4720 LIBS="$ac_func_search_save_LIBS"
4721 fi
4722
4723 echo "$ac_t""$ac_cv_search_valid_enctype" 1>&6
4724 if test "$ac_cv_search_valid_enctype" != "no"; then
4725   test "$ac_cv_search_valid_enctype" = "none required" || LIBS="$ac_cv_search_valid_enctype $LIBS"
4726   
4727 else :
4728   
4729 fi
4730
4731   #
4732   # gen                 ? ? ?                   Needed on Irix 5.3 with some
4733   #                     Irix 5.3                version of Kerberos.  I'm not
4734   #                                             sure which since Irix didn't
4735   #                                             get any testing this time
4736   #                                             around.  Original comment:
4737   #
4738   # This is necessary on Irix 5.3, in order to link against libkrb5 --
4739   # there, an_to_ln.o refers to things defined only in -lgen.
4740   #
4741   
4742 echo $ac_n "checking for library containing compile""... $ac_c" 1>&6
4743 echo "configure:4744: checking for library containing compile" >&5
4744 if eval "test \"`echo '$''{'ac_cv_search_compile'+set}'`\" = set"; then
4745   echo $ac_n "(cached) $ac_c" 1>&6
4746 else
4747   ac_func_search_save_LIBS="$LIBS"
4748 ac_cv_search_compile="no"
4749 cat > conftest.$ac_ext <<EOF
4750 #line 4751 "configure"
4751 #include "confdefs.h"
4752 /* Override any gcc2 internal prototype to avoid an error.  */
4753 /* We use char because int might match the return type of a gcc2
4754     builtin and then its argument prototype would still apply.  */
4755 char compile();
4756
4757 int main() {
4758 compile()
4759 ; return 0; }
4760 EOF
4761 if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4762   rm -rf conftest*
4763   ac_cv_search_compile="none required"
4764 else
4765   echo "configure: failed program was:" >&5
4766   cat conftest.$ac_ext >&5
4767 fi
4768 rm -f conftest*
4769 test "$ac_cv_search_compile" = "no" && for i in gen; do
4770 LIBS="-l$i  $ac_func_search_save_LIBS"
4771 cat > conftest.$ac_ext <<EOF
4772 #line 4773 "configure"
4773 #include "confdefs.h"
4774 /* Override any gcc2 internal prototype to avoid an error.  */
4775 /* We use char because int might match the return type of a gcc2
4776     builtin and then its argument prototype would still apply.  */
4777 char compile();
4778
4779 int main() {
4780 compile()
4781 ; return 0; }
4782 EOF
4783 if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4784   rm -rf conftest*
4785   ac_cv_search_compile="-l$i"
4786 break
4787 else
4788   echo "configure: failed program was:" >&5
4789   cat conftest.$ac_ext >&5
4790 fi
4791 rm -f conftest*
4792 done
4793 LIBS="$ac_func_search_save_LIBS"
4794 fi
4795
4796 echo "$ac_t""$ac_cv_search_compile" 1>&6
4797 if test "$ac_cv_search_compile" != "no"; then
4798   test "$ac_cv_search_compile" = "none required" || LIBS="$ac_cv_search_compile $LIBS"
4799   
4800 else :
4801   
4802 fi
4803
4804   #
4805   # krb5                ? ? ?                   -lgen -l???
4806   #                     Irix 5.3
4807   #
4808   # krb5                MIT K5 v1.1.1
4809   #
4810   # krb5                MIT K5 v1.2.2-beta1     -lcrypto -lcom_err
4811   #                     Linux 2.2.17
4812   #
4813   # krb5                MIT K5 v1.2.2-beta1     -lcrypto -lcom_err -lresolv
4814   #
4815   # krb5                Heimdal K 0.3d          -lasn1 -lroken -ldes
4816   #
4817   
4818 echo $ac_n "checking for library containing krb5_free_context""... $ac_c" 1>&6
4819 echo "configure:4820: checking for library containing krb5_free_context" >&5
4820 if eval "test \"`echo '$''{'ac_cv_search_krb5_free_context'+set}'`\" = set"; then
4821   echo $ac_n "(cached) $ac_c" 1>&6
4822 else
4823   ac_func_search_save_LIBS="$LIBS"
4824 ac_cv_search_krb5_free_context="no"
4825 cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828 /* Override any gcc2 internal prototype to avoid an error.  */
4829 /* We use char because int might match the return type of a gcc2
4830     builtin and then its argument prototype would still apply.  */
4831 char krb5_free_context();
4832
4833 int main() {
4834 krb5_free_context()
4835 ; return 0; }
4836 EOF
4837 if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4838   rm -rf conftest*
4839   ac_cv_search_krb5_free_context="none required"
4840 else
4841   echo "configure: failed program was:" >&5
4842   cat conftest.$ac_ext >&5
4843 fi
4844 rm -f conftest*
4845 test "$ac_cv_search_krb5_free_context" = "no" && for i in krb5; do
4846 LIBS="-l$i  $ac_func_search_save_LIBS"
4847 cat > conftest.$ac_ext <<EOF
4848 #line 4849 "configure"
4849 #include "confdefs.h"
4850 /* Override any gcc2 internal prototype to avoid an error.  */
4851 /* We use char because int might match the return type of a gcc2
4852     builtin and then its argument prototype would still apply.  */
4853 char krb5_free_context();
4854
4855 int main() {
4856 krb5_free_context()
4857 ; return 0; }
4858 EOF
4859 if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4860   rm -rf conftest*
4861   ac_cv_search_krb5_free_context="-l$i"
4862 break
4863 else
4864   echo "configure: failed program was:" >&5
4865   cat conftest.$ac_ext >&5
4866 fi
4867 rm -f conftest*
4868 done
4869 LIBS="$ac_func_search_save_LIBS"
4870 fi
4871
4872 echo "$ac_t""$ac_cv_search_krb5_free_context" 1>&6
4873 if test "$ac_cv_search_krb5_free_context" != "no"; then
4874   test "$ac_cv_search_krb5_free_context" = "none required" || LIBS="$ac_cv_search_krb5_free_context $LIBS"
4875   
4876 else :
4877   
4878 fi
4879
4880   #
4881   # gssapi_krb5         Only lib needed with MIT K5 v1.2.1, so find it first in
4882   #                     order to prefer MIT Kerberos.  If both MIT & Heimdal
4883   #                     Kerberos are installed and in the path, this will leave
4884   #                     some of the libraries above in LIBS unnecessarily, but
4885   #                     noone would ever do that, right?
4886   #
4887   # gssapi_krb5         MIT K5 v1.2.2-beta1     -lkrb5
4888   #
4889   # gssapi              Heimdal K 0.3d          -lkrb5
4890   #
4891   
4892 echo $ac_n "checking for library containing gss_import_name""... $ac_c" 1>&6
4893 echo "configure:4894: checking for library containing gss_import_name" >&5
4894 if eval "test \"`echo '$''{'ac_cv_search_gss_import_name'+set}'`\" = set"; then
4895   echo $ac_n "(cached) $ac_c" 1>&6
4896 else
4897   ac_func_search_save_LIBS="$LIBS"
4898 ac_cv_search_gss_import_name="no"
4899 cat > conftest.$ac_ext <<EOF
4900 #line 4901 "configure"
4901 #include "confdefs.h"
4902 /* Override any gcc2 internal prototype to avoid an error.  */
4903 /* We use char because int might match the return type of a gcc2
4904     builtin and then its argument prototype would still apply.  */
4905 char gss_import_name();
4906
4907 int main() {
4908 gss_import_name()
4909 ; return 0; }
4910 EOF
4911 if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4912   rm -rf conftest*
4913   ac_cv_search_gss_import_name="none required"
4914 else
4915   echo "configure: failed program was:" >&5
4916   cat conftest.$ac_ext >&5
4917 fi
4918 rm -f conftest*
4919 test "$ac_cv_search_gss_import_name" = "no" && for i in gssapi_krb5 gssapi; do
4920 LIBS="-l$i  $ac_func_search_save_LIBS"
4921 cat > conftest.$ac_ext <<EOF
4922 #line 4923 "configure"
4923 #include "confdefs.h"
4924 /* Override any gcc2 internal prototype to avoid an error.  */
4925 /* We use char because int might match the return type of a gcc2
4926     builtin and then its argument prototype would still apply.  */
4927 char gss_import_name();
4928
4929 int main() {
4930 gss_import_name()
4931 ; return 0; }
4932 EOF
4933 if { (eval echo configure:4934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4934   rm -rf conftest*
4935   ac_cv_search_gss_import_name="-l$i"
4936 break
4937 else
4938   echo "configure: failed program was:" >&5
4939   cat conftest.$ac_ext >&5
4940 fi
4941 rm -f conftest*
4942 done
4943 LIBS="$ac_func_search_save_LIBS"
4944 fi
4945
4946 echo "$ac_t""$ac_cv_search_gss_import_name" 1>&6
4947 if test "$ac_cv_search_gss_import_name" != "no"; then
4948   test "$ac_cv_search_gss_import_name" = "none required" || LIBS="$ac_cv_search_gss_import_name $LIBS"
4949   
4950 else :
4951   
4952 fi
4953 fi
4954
4955
4956 # Check whether --enable-encryption or --disable-encryption was given.
4957 if test "${enable_encryption+set}" = set; then
4958   enableval="$enable_encryption"
4959   case "${enableval}" in
4960     yes) encryption=true ;;
4961     no) encryption=false ;;
4962     *) { echo "configure: error: bad value ${enableval} for encryption option" 1>&2; exit 1; } ;;
4963    esac
4964 else
4965   encryption=false
4966 fi
4967
4968 if test "$encryption" = "true"; then
4969   cat >> confdefs.h <<\EOF
4970 #define ENCRYPTION 1
4971 EOF
4972
4973 fi
4974
4975 echo $ac_n "checking for gethostname""... $ac_c" 1>&6
4976 echo "configure:4977: checking for gethostname" >&5
4977 if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
4978   echo $ac_n "(cached) $ac_c" 1>&6
4979 else
4980   cat > conftest.$ac_ext <<EOF
4981 #line 4982 "configure"
4982 #include "confdefs.h"
4983 /* System header to define __stub macros and hopefully few prototypes,
4984     which can conflict with char gethostname(); below.  */
4985 #include <assert.h>
4986 /* Override any gcc2 internal prototype to avoid an error.  */
4987 /* We use char because int might match the return type of a gcc2
4988     builtin and then its argument prototype would still apply.  */
4989 char gethostname();
4990
4991 int main() {
4992
4993 /* The GNU C library defines this for functions which it implements
4994     to always fail with ENOSYS.  Some functions are actually named
4995     something starting with __ and the normal name is an alias.  */
4996 #if defined (__stub_gethostname) || defined (__stub___gethostname)
4997 choke me
4998 #else
4999 gethostname();
5000 #endif
5001
5002 ; return 0; }
5003 EOF
5004 if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5005   rm -rf conftest*
5006   eval "ac_cv_func_gethostname=yes"
5007 else
5008   echo "configure: failed program was:" >&5
5009   cat conftest.$ac_ext >&5
5010   rm -rf conftest*
5011   eval "ac_cv_func_gethostname=no"
5012 fi
5013 rm -f conftest*
5014 fi
5015
5016 if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
5017   echo "$ac_t""yes" 1>&6
5018   :
5019 else
5020   echo "$ac_t""no" 1>&6
5021 LIBOBJS="$LIBOBJS hostname.o"
5022 fi
5023
5024
5025 # Check for options requesting client and server feature. If none are
5026 # given and we have connect(), we want the full client & server arrangement.
5027 # Check whether --enable-client or --disable-client was given.
5028 if test "${enable_client+set}" = set; then
5029   enableval="$enable_client"
5030   if test "$enable_client" = yes; then
5031   cat >> confdefs.h <<\EOF
5032 #define CLIENT_SUPPORT 1
5033 EOF
5034
5035 fi
5036 else
5037   if test "$ac_cv_search_connect" != no; then
5038   cat >> confdefs.h <<\EOF
5039 #define CLIENT_SUPPORT 1
5040 EOF
5041
5042 fi
5043 fi
5044
5045 # Check whether --enable-server or --disable-server was given.
5046 if test "${enable_server+set}" = set; then
5047   enableval="$enable_server"
5048   if test "$enable_server" = yes; then
5049   cat >> confdefs.h <<\EOF
5050 #define SERVER_SUPPORT 1
5051 EOF
5052
5053 fi
5054 else
5055   if test "$ac_cv_search_connect" != no; then
5056   cat >> confdefs.h <<\EOF
5057 #define SERVER_SUPPORT 1
5058 EOF
5059
5060   enable_server=yes
5061 fi
5062 fi
5063
5064
5065
5066 if test "$enable_server" = yes; then
5067
5068 echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
5069 echo "configure:5070: checking for library containing crypt" >&5
5070 if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
5071   echo $ac_n "(cached) $ac_c" 1>&6
5072 else
5073   ac_func_search_save_LIBS="$LIBS"
5074 ac_cv_search_crypt="no"
5075 cat > conftest.$ac_ext <<EOF
5076 #line 5077 "configure"
5077 #include "confdefs.h"
5078 /* Override any gcc2 internal prototype to avoid an error.  */
5079 /* We use char because int might match the return type of a gcc2
5080     builtin and then its argument prototype would still apply.  */
5081 char crypt();
5082
5083 int main() {
5084 crypt()
5085 ; return 0; }
5086 EOF
5087 if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5088   rm -rf conftest*
5089   ac_cv_search_crypt="none required"
5090 else
5091   echo "configure: failed program was:" >&5
5092   cat conftest.$ac_ext >&5
5093 fi
5094 rm -f conftest*
5095 test "$ac_cv_search_crypt" = "no" && for i in crypt; do
5096 LIBS="-l$i  $ac_func_search_save_LIBS"
5097 cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 /* Override any gcc2 internal prototype to avoid an error.  */
5101 /* We use char because int might match the return type of a gcc2
5102     builtin and then its argument prototype would still apply.  */
5103 char crypt();
5104
5105 int main() {
5106 crypt()
5107 ; return 0; }
5108 EOF
5109 if { (eval echo configure:5110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5110   rm -rf conftest*
5111   ac_cv_search_crypt="-l$i"
5112 break
5113 else
5114   echo "configure: failed program was:" >&5
5115   cat conftest.$ac_ext >&5
5116 fi
5117 rm -f conftest*
5118 done
5119 LIBS="$ac_func_search_save_LIBS"
5120 fi
5121
5122 echo "$ac_t""$ac_cv_search_crypt" 1>&6
5123 if test "$ac_cv_search_crypt" != "no"; then
5124   test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
5125   cat >> confdefs.h <<\EOF
5126 #define HAVE_CRYPT 1
5127 EOF
5128  cat >> confdefs.h <<\EOF
5129 #define AUTH_SERVER_SUPPORT 1
5130 EOF
5131
5132 else :
5133   
5134 fi
5135 fi # enable_server
5136
5137
5138 echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
5139 echo "configure:5140: checking for cygwin32" >&5
5140 if eval "test \"`echo '$''{'ccvs_cv_sys_cygwin32'+set}'`\" = set"; then
5141   echo $ac_n "(cached) $ac_c" 1>&6
5142 else
5143   cat > conftest.$ac_ext <<EOF
5144 #line 5145 "configure"
5145 #include "confdefs.h"
5146
5147 int main() {
5148 return __CYGWIN32__;
5149 ; return 0; }
5150 EOF
5151 if { (eval echo configure:5152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5152   rm -rf conftest*
5153   ccvs_cv_sys_cygwin32=yes
5154 else
5155   echo "configure: failed program was:" >&5
5156   cat conftest.$ac_ext >&5
5157   rm -rf conftest*
5158   ccvs_cv_sys_cygwin32=no
5159 fi
5160 rm -f conftest*
5161 fi
5162
5163 echo "$ac_t""$ccvs_cv_sys_cygwin32" 1>&6
5164 if test $ccvs_cv_sys_cygwin32 = yes; then
5165   LIBOBJS="$LIBOBJS fncase.o"
5166   LIBS="$LIBS -ladvapi32"
5167
5168         cat >> confdefs.h <<\EOF
5169 #define UTIME_EXPECTS_WRITABLE 1
5170 EOF
5171
5172
5173       cat >> confdefs.h <<\EOF
5174 #define USE_SETMODE_STDOUT 1
5175 EOF
5176
5177   cat >> confdefs.h <<\EOF
5178 #define HAVE_SETMODE 1
5179 EOF
5180
5181 fi
5182
5183 test -f src/options.h && (
5184   echo "configure: warning: saving ./src/options.h in ./src/options.h-SAVED" 1>&2
5185   echo "configure: warning: You may wish to check that local options have not been lost." 1>&2
5186   echo "configure: warning: Do not re-run ./configure or ./config.status until you have...." 1>&2
5187   cp ./src/options.h ./src/options.h-SAVED
5188 )
5189
5190 trap '' 1 2 15
5191 cat > confcache <<\EOF
5192 # This file is a shell script that caches the results of configure
5193 # tests run on this system so they can be shared between configure
5194 # scripts and configure runs.  It is not useful on other systems.
5195 # If it contains results you don't want to keep, you may remove or edit it.
5196 #
5197 # By default, configure uses ./config.cache as the cache file,
5198 # creating it if it does not exist already.  You can give configure
5199 # the --cache-file=FILE option to use a different cache file; that is
5200 # what configure does when it calls configure scripts in
5201 # subdirectories, so they share the cache.
5202 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5203 # config.status only pays attention to the cache file if you give it the
5204 # --recheck option to rerun configure.
5205 #
5206 EOF
5207 # The following way of writing the cache mishandles newlines in values,
5208 # but we know of no workaround that is simple, portable, and efficient.
5209 # So, don't put newlines in cache variables' values.
5210 # Ultrix sh set writes to stderr and can't be redirected directly,
5211 # and sets the high bit in the cache file unless we assign to the vars.
5212 (set) 2>&1 |
5213   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5214   *ac_space=\ *)
5215     # `set' does not quote correctly, so add quotes (double-quote substitution
5216     # turns \\\\ into \\, and sed turns \\ into \).
5217     sed -n \
5218       -e "s/'/'\\\\''/g" \
5219       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5220     ;;
5221   *)
5222     # `set' quotes correctly as required by POSIX, so do not add quotes.
5223     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5224     ;;
5225   esac >> confcache
5226 if cmp -s $cache_file confcache; then
5227   :
5228 else
5229   if test -w $cache_file; then
5230     echo "updating cache $cache_file"
5231     cat confcache > $cache_file
5232   else
5233     echo "not updating unwritable cache $cache_file"
5234   fi
5235 fi
5236 rm -f confcache
5237
5238 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5239
5240 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5241 # Let make expand exec_prefix.
5242 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5243
5244 # Any assignment to VPATH causes Sun make to only execute
5245 # the first set of double-colon rules, so remove it if not needed.
5246 # If there is a colon in the path, we need to keep it.
5247 if test "x$srcdir" = x.; then
5248   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5249 fi
5250
5251 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5252
5253 DEFS=-DHAVE_CONFIG_H
5254
5255 # Without the "./", some shells look in PATH for config.status.
5256 : ${CONFIG_STATUS=./config.status}
5257
5258 echo creating $CONFIG_STATUS
5259 rm -f $CONFIG_STATUS
5260 cat > $CONFIG_STATUS <<EOF
5261 #! /bin/sh
5262 # Generated automatically by configure.
5263 # Run this file to recreate the current configuration.
5264 # This directory was configured as follows,
5265 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5266 #
5267 # $0 $ac_configure_args
5268 #
5269 # Compiler output produced by configure, useful for debugging
5270 # configure, is in ./config.log if it exists.
5271
5272 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5273 for ac_option
5274 do
5275   case "\$ac_option" in
5276   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5277     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5278     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5279   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5280     echo "$CONFIG_STATUS generated by autoconf version 2.13"
5281     exit 0 ;;
5282   -help | --help | --hel | --he | --h)
5283     echo "\$ac_cs_usage"; exit 0 ;;
5284   *) echo "\$ac_cs_usage"; exit 1 ;;
5285   esac
5286 done
5287
5288 ac_given_srcdir=$srcdir
5289 ac_given_INSTALL="$INSTALL"
5290
5291 trap 'rm -fr `echo "Makefile \
5292           contrib/Makefile \
5293           contrib/clmerge \
5294           contrib/cln_hist \
5295           contrib/commit_prep \
5296           contrib/cvs_acls \
5297           contrib/log \
5298           contrib/log_accum \
5299           contrib/mfpipe \
5300           contrib/rcslock \
5301           contrib/sccs2rcs \
5302           diff/Makefile \
5303           doc/Makefile \
5304           emx/Makefile \
5305           lib/Makefile \
5306           man/Makefile \
5307           os2/Makefile \
5308           src/Makefile \
5309           src/cvsbug \
5310           tools/Makefile \
5311           vms/Makefile \
5312           windows-NT/Makefile \
5313           windows-NT/SCC/Makefile \
5314           zlib/Makefile config.h src/options.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5315 EOF
5316 cat >> $CONFIG_STATUS <<EOF
5317
5318 # Protect against being on the right side of a sed subst in config.status.
5319 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5320  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5321 $ac_vpsub
5322 $extrasub
5323 s%@SHELL@%$SHELL%g
5324 s%@CFLAGS@%$CFLAGS%g
5325 s%@CPPFLAGS@%$CPPFLAGS%g
5326 s%@CXXFLAGS@%$CXXFLAGS%g
5327 s%@FFLAGS@%$FFLAGS%g
5328 s%@DEFS@%$DEFS%g
5329 s%@LDFLAGS@%$LDFLAGS%g
5330 s%@LIBS@%$LIBS%g
5331 s%@exec_prefix@%$exec_prefix%g
5332 s%@prefix@%$prefix%g
5333 s%@program_transform_name@%$program_transform_name%g
5334 s%@bindir@%$bindir%g
5335 s%@sbindir@%$sbindir%g
5336 s%@libexecdir@%$libexecdir%g
5337 s%@datadir@%$datadir%g
5338 s%@sysconfdir@%$sysconfdir%g
5339 s%@sharedstatedir@%$sharedstatedir%g
5340 s%@localstatedir@%$localstatedir%g
5341 s%@libdir@%$libdir%g
5342 s%@includedir@%$includedir%g
5343 s%@oldincludedir@%$oldincludedir%g
5344 s%@infodir@%$infodir%g
5345 s%@mandir@%$mandir%g
5346 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5347 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5348 s%@INSTALL_DATA@%$INSTALL_DATA%g
5349 s%@PACKAGE@%$PACKAGE%g
5350 s%@VERSION@%$VERSION%g
5351 s%@ACLOCAL@%$ACLOCAL%g
5352 s%@AUTOCONF@%$AUTOCONF%g
5353 s%@AUTOMAKE@%$AUTOMAKE%g
5354 s%@AUTOHEADER@%$AUTOHEADER%g
5355 s%@MAKEINFO@%$MAKEINFO%g
5356 s%@AMTAR@%$AMTAR%g
5357 s%@install_sh@%$install_sh%g
5358 s%@STRIP@%$STRIP%g
5359 s%@INSTALL_STRIP_PROGRAM@%$INSTALL_STRIP_PROGRAM%g
5360 s%@INSTALL_STRIP_PROGRAM_ENV@%$INSTALL_STRIP_PROGRAM_ENV%g
5361 s%@AWK@%$AWK%g
5362 s%@SET_MAKE@%$SET_MAKE%g
5363 s%@ETAGS@%$ETAGS%g
5364 s%@ETAGS_INCLUDE_OPTION@%$ETAGS_INCLUDE_OPTION%g
5365 s%@AMDEP_TRUE@%$AMDEP_TRUE%g
5366 s%@AMDEP_FALSE@%$AMDEP_FALSE%g
5367 s%@AMDEPBACKSLASH@%$AMDEPBACKSLASH%g
5368 s%@DEPDIR@%$DEPDIR%g
5369 s%@CVS@%$CVS%g
5370 s%@CC@%$CC%g
5371 s%@CPP@%$CPP%g
5372 s%@_am_include@%$_am_include%g
5373 s%@_am_quote@%$_am_quote%g
5374 s%@CCDEPMODE@%$CCDEPMODE%g
5375 s%@RANLIB@%$RANLIB%g
5376 s%@YACC@%$YACC%g
5377 s%@LN_S@%$LN_S%g
5378 s%@PERL@%$PERL%g
5379 s%@CSH@%$CSH%g
5380 s%@PR@%$PR%g
5381 s%@ROFF@%$ROFF%g
5382 s%@PS2PDF@%$PS2PDF%g
5383 s%@TEXI2DVI@%$TEXI2DVI%g
5384 s%@MAKE_TARGETS_IN_VPATH_TRUE@%$MAKE_TARGETS_IN_VPATH_TRUE%g
5385 s%@MAKE_TARGETS_IN_VPATH_FALSE@%$MAKE_TARGETS_IN_VPATH_FALSE%g
5386 s%@LIBOBJS@%$LIBOBJS%g
5387 s%@KRB4@%$KRB4%g
5388 s%@includeopt@%$includeopt%g
5389
5390 CEOF
5391 EOF
5392
5393 cat >> $CONFIG_STATUS <<\EOF
5394
5395 # Split the substitutions into bite-sized pieces for seds with
5396 # small command number limits, like on Digital OSF/1 and HP-UX.
5397 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5398 ac_file=1 # Number of current file.
5399 ac_beg=1 # First line for current file.
5400 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5401 ac_more_lines=:
5402 ac_sed_cmds=""
5403 while $ac_more_lines; do
5404   if test $ac_beg -gt 1; then
5405     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5406   else
5407     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5408   fi
5409   if test ! -s conftest.s$ac_file; then
5410     ac_more_lines=false
5411     rm -f conftest.s$ac_file
5412   else
5413     if test -z "$ac_sed_cmds"; then
5414       ac_sed_cmds="sed -f conftest.s$ac_file"
5415     else
5416       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5417     fi
5418     ac_file=`expr $ac_file + 1`
5419     ac_beg=$ac_end
5420     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5421   fi
5422 done
5423 if test -z "$ac_sed_cmds"; then
5424   ac_sed_cmds=cat
5425 fi
5426 EOF
5427
5428 cat >> $CONFIG_STATUS <<EOF
5429
5430 CONFIG_FILES=\${CONFIG_FILES-"Makefile \
5431           contrib/Makefile \
5432           contrib/clmerge \
5433           contrib/cln_hist \
5434           contrib/commit_prep \
5435           contrib/cvs_acls \
5436           contrib/log \
5437           contrib/log_accum \
5438           contrib/mfpipe \
5439           contrib/rcslock \
5440           contrib/sccs2rcs \
5441           diff/Makefile \
5442           doc/Makefile \
5443           emx/Makefile \
5444           lib/Makefile \
5445           man/Makefile \
5446           os2/Makefile \
5447           src/Makefile \
5448           src/cvsbug \
5449           tools/Makefile \
5450           vms/Makefile \
5451           windows-NT/Makefile \
5452           windows-NT/SCC/Makefile \
5453           zlib/Makefile"}
5454 EOF
5455 cat >> $CONFIG_STATUS <<\EOF
5456 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5457   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5458   case "$ac_file" in
5459   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5460        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5461   *) ac_file_in="${ac_file}.in" ;;
5462   esac
5463
5464   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5465
5466   # Remove last slash and all that follows it.  Not all systems have dirname.
5467   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5468   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5469     # The file is in a subdirectory.
5470     test ! -d "$ac_dir" && mkdir "$ac_dir"
5471     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5472     # A "../" for each directory in $ac_dir_suffix.
5473     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5474   else
5475     ac_dir_suffix= ac_dots=
5476   fi
5477
5478   case "$ac_given_srcdir" in
5479   .)  srcdir=.
5480       if test -z "$ac_dots"; then top_srcdir=.
5481       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5482   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5483   *) # Relative path.
5484     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5485     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5486   esac
5487
5488   case "$ac_given_INSTALL" in
5489   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5490   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5491   esac
5492
5493   echo creating "$ac_file"
5494   rm -f "$ac_file"
5495   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5496   case "$ac_file" in
5497   *Makefile*) ac_comsub="1i\\
5498 # $configure_input" ;;
5499   *) ac_comsub= ;;
5500   esac
5501
5502   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5503   sed -e "$ac_comsub
5504 s%@configure_input@%$configure_input%g
5505 s%@srcdir@%$srcdir%g
5506 s%@top_srcdir@%$top_srcdir%g
5507 s%@INSTALL@%$INSTALL%g
5508 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5509 fi; done
5510 rm -f conftest.s*
5511
5512 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5513 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5514 #
5515 # ac_d sets the value in "#define NAME VALUE" lines.
5516 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5517 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5518 ac_dC='\3'
5519 ac_dD='%g'
5520 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5521 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5522 ac_uB='\([      ]\)%\1#\2define\3'
5523 ac_uC=' '
5524 ac_uD='\4%g'
5525 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5526 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5527 ac_eB='$%\1#\2define\3'
5528 ac_eC=' '
5529 ac_eD='%g'
5530
5531 if test "${CONFIG_HEADERS+set}" != set; then
5532 EOF
5533 cat >> $CONFIG_STATUS <<EOF
5534   CONFIG_HEADERS="config.h src/options.h"
5535 EOF
5536 cat >> $CONFIG_STATUS <<\EOF
5537 fi
5538 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5539   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5540   case "$ac_file" in
5541   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5542        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5543   *) ac_file_in="${ac_file}.in" ;;
5544   esac
5545
5546   echo creating $ac_file
5547
5548   rm -f conftest.frag conftest.in conftest.out
5549   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5550   cat $ac_file_inputs > conftest.in
5551
5552 EOF
5553
5554 # Transform confdefs.h into a sed script conftest.vals that substitutes
5555 # the proper values into config.h.in to produce config.h.  And first:
5556 # Protect against being on the right side of a sed subst in config.status.
5557 # Protect against being in an unquoted here document in config.status.
5558 rm -f conftest.vals
5559 cat > conftest.hdr <<\EOF
5560 s/[\\&%]/\\&/g
5561 s%[\\$`]%\\&%g
5562 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5563 s%ac_d%ac_u%gp
5564 s%ac_u%ac_e%gp
5565 EOF
5566 sed -n -f conftest.hdr confdefs.h > conftest.vals
5567 rm -f conftest.hdr
5568
5569 # This sed command replaces #undef with comments.  This is necessary, for
5570 # example, in the case of _POSIX_SOURCE, which is predefined and required
5571 # on some systems where configure will not decide to define it.
5572 cat >> conftest.vals <<\EOF
5573 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5574 EOF
5575
5576 # Break up conftest.vals because some shells have a limit on
5577 # the size of here documents, and old seds have small limits too.
5578
5579 rm -f conftest.tail
5580 while :
5581 do
5582   ac_lines=`grep -c . conftest.vals`
5583   # grep -c gives empty output for an empty file on some AIX systems.
5584   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5585   # Write a limited-size here document to conftest.frag.
5586   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5587   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5588   echo 'CEOF
5589   sed -f conftest.frag conftest.in > conftest.out
5590   rm -f conftest.in
5591   mv conftest.out conftest.in
5592 ' >> $CONFIG_STATUS
5593   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5594   rm -f conftest.vals
5595   mv conftest.tail conftest.vals
5596 done
5597 rm -f conftest.vals
5598
5599 cat >> $CONFIG_STATUS <<\EOF
5600   rm -f conftest.frag conftest.h
5601   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5602   cat conftest.in >> conftest.h
5603   rm -f conftest.in
5604   if cmp -s $ac_file conftest.h 2>/dev/null; then
5605     echo "$ac_file is unchanged"
5606     rm -f conftest.h
5607   else
5608     # Remove last slash and all that follows it.  Not all systems have dirname.
5609       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5610       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5611       # The file is in a subdirectory.
5612       test ! -d "$ac_dir" && mkdir "$ac_dir"
5613     fi
5614     rm -f $ac_file
5615     mv conftest.h $ac_file
5616   fi
5617 fi; done
5618
5619 EOF
5620 cat >> $CONFIG_STATUS <<EOF
5621 am_indx=1
5622 for am_file in config.h src/options.h; do
5623   case " \$CONFIG_HEADERS " in
5624   *" \$am_file "*)
5625     am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
5626     if test -n "\$am_dir"; then
5627       am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
5628       for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
5629         am_tmpdir=\$am_tmpdir\$am_subdir/
5630         if test ! -d \$am_tmpdir; then
5631           mkdir \$am_tmpdir
5632         fi
5633       done
5634     fi
5635     echo timestamp > "\$am_dir"stamp-h\$am_indx
5636     ;;
5637   esac
5638   am_indx=\`expr \$am_indx + 1\`
5639 done
5640 AMDEP="$AMDEP"
5641 ac_aux_dir="$ac_aux_dir"
5642
5643 EOF
5644 cat >> $CONFIG_STATUS <<\EOF
5645
5646
5647 test x"$AMDEP" != x"" ||
5648 for mf in $CONFIG_FILES; do
5649   case "$mf" in
5650   Makefile) dirpart=.;;
5651   */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
5652   *) continue;;
5653   esac
5654   grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
5655   # Extract the definition of DEP_FILES from the Makefile without
5656   # running `make'.
5657   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
5658   test -z "$DEPDIR" && continue
5659   # When using ansi2knr, U may be empty or an underscore; expand it
5660   U=`sed -n -e '/^U = / s///p' < "$mf"`
5661   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
5662   # We invoke sed twice because it is the simplest approach to
5663   # changing $(DEPDIR) to its actual value in the expansion.
5664   for file in `sed -n -e '
5665     /^DEP_FILES = .*\\\\$/ {
5666       s/^DEP_FILES = //
5667       :loop
5668         s/\\\\$//
5669         p
5670         n
5671         /\\\\$/ b loop
5672       p
5673     }
5674     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
5675        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
5676     # Make sure the directory exists.
5677     test -f "$dirpart/$file" && continue
5678     fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
5679     $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
5680     # echo "creating $dirpart/$file"
5681     echo '# dummy' > "$dirpart/$file"
5682   done
5683 done
5684
5685 chmod -f +x \
5686           contrib/clmerge \
5687           contrib/cln_hist \
5688           contrib/commit_prep \
5689           contrib/cvs_acls \
5690           contrib/log \
5691           contrib/log_accum \
5692           contrib/mfpipe \
5693           contrib/rcslock \
5694           contrib/sccs2rcs \
5695           src/cvsbug
5696 exit 0
5697 EOF
5698 chmod +x $CONFIG_STATUS
5699 rm -fr confdefs* $ac_clean_files
5700 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5701