xref: /openbsd-src/gnu/usr.bin/cvs/configure (revision b2ea75c1b17e1a9a339660e7ed45cd24946b230e)
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:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --with-krb4=value       set default \$(KRB4) from value"
16ac_help="$ac_help
17  --with-gssapi=value     GSSAPI directory"
18ac_help="$ac_help
19  --enable-encryption     enable encryption support"
20ac_help="$ac_help
21  --enable-client         include code for running as a remote client (default)
22  --disable-client        don't include remote client code"
23ac_help="$ac_help
24  --enable-server         include code for running as a server (default)
25  --disable-server        don't include server code"
26
27# Initialize some variables set by options.
28# The variables have the same names as the options, with
29# dashes changed to underlines.
30build=NONE
31cache_file=./config.cache
32exec_prefix=NONE
33host=NONE
34no_create=
35nonopt=NONE
36no_recursion=
37prefix=NONE
38program_prefix=NONE
39program_suffix=NONE
40program_transform_name=s,x,x,
41silent=
42site=
43srcdir=
44target=NONE
45verbose=
46x_includes=NONE
47x_libraries=NONE
48bindir='${exec_prefix}/bin'
49sbindir='${exec_prefix}/sbin'
50libexecdir='${exec_prefix}/libexec'
51datadir='${prefix}/share'
52sysconfdir='${prefix}/etc'
53sharedstatedir='${prefix}/com'
54localstatedir='${prefix}/var'
55libdir='${exec_prefix}/lib'
56includedir='${prefix}/include'
57oldincludedir='/usr/include'
58infodir='${prefix}/info'
59mandir='${prefix}/man'
60
61# Initialize some other variables.
62subdirs=
63MFLAGS= MAKEFLAGS=
64SHELL=${CONFIG_SHELL-/bin/sh}
65# Maximum number of lines to put in a shell here document.
66ac_max_here_lines=12
67
68ac_prev=
69for ac_option
70do
71
72  # If the previous option needs an argument, assign it.
73  if test -n "$ac_prev"; then
74    eval "$ac_prev=\$ac_option"
75    ac_prev=
76    continue
77  fi
78
79  case "$ac_option" in
80  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81  *) ac_optarg= ;;
82  esac
83
84  # Accept the important Cygnus configure options, so we can diagnose typos.
85
86  case "$ac_option" in
87
88  -bindir | --bindir | --bindi | --bind | --bin | --bi)
89    ac_prev=bindir ;;
90  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
91    bindir="$ac_optarg" ;;
92
93  -build | --build | --buil | --bui | --bu)
94    ac_prev=build ;;
95  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
96    build="$ac_optarg" ;;
97
98  -cache-file | --cache-file | --cache-fil | --cache-fi \
99  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
100    ac_prev=cache_file ;;
101  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
102  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
103    cache_file="$ac_optarg" ;;
104
105  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
106    ac_prev=datadir ;;
107  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
108  | --da=*)
109    datadir="$ac_optarg" ;;
110
111  -disable-* | --disable-*)
112    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
113    # Reject names that are not valid shell variable names.
114    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
115      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
116    fi
117    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
118    eval "enable_${ac_feature}=no" ;;
119
120  -enable-* | --enable-*)
121    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
122    # Reject names that are not valid shell variable names.
123    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
124      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
125    fi
126    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127    case "$ac_option" in
128      *=*) ;;
129      *) ac_optarg=yes ;;
130    esac
131    eval "enable_${ac_feature}='$ac_optarg'" ;;
132
133  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
134  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
135  | --exec | --exe | --ex)
136    ac_prev=exec_prefix ;;
137  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
138  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
139  | --exec=* | --exe=* | --ex=*)
140    exec_prefix="$ac_optarg" ;;
141
142  -gas | --gas | --ga | --g)
143    # Obsolete; use --with-gas.
144    with_gas=yes ;;
145
146  -help | --help | --hel | --he)
147    # Omit some internal or obsolete options to make the list less imposing.
148    # This message is too long to be a string in the A/UX 3.1 sh.
149    cat << EOF
150Usage: configure [options] [host]
151Options: [defaults in brackets after descriptions]
152Configuration:
153  --cache-file=FILE       cache test results in FILE
154  --help                  print this message
155  --no-create             do not create output files
156  --quiet, --silent       do not print \`checking...' messages
157  --version               print the version of autoconf that created configure
158Directory and file names:
159  --prefix=PREFIX         install architecture-independent files in PREFIX
160                          [$ac_default_prefix]
161  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
162                          [same as prefix]
163  --bindir=DIR            user executables in DIR [EPREFIX/bin]
164  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
165  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
166  --datadir=DIR           read-only architecture-independent data in DIR
167                          [PREFIX/share]
168  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
169  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
170                          [PREFIX/com]
171  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
172  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
173  --includedir=DIR        C header files in DIR [PREFIX/include]
174  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
175  --infodir=DIR           info documentation in DIR [PREFIX/info]
176  --mandir=DIR            man documentation in DIR [PREFIX/man]
177  --srcdir=DIR            find the sources in DIR [configure dir or ..]
178  --program-prefix=PREFIX prepend PREFIX to installed program names
179  --program-suffix=SUFFIX append SUFFIX to installed program names
180  --program-transform-name=PROGRAM
181                          run sed PROGRAM on installed program names
182EOF
183    cat << EOF
184Host type:
185  --build=BUILD           configure for building on BUILD [BUILD=HOST]
186  --host=HOST             configure for HOST [guessed]
187  --target=TARGET         configure for TARGET [TARGET=HOST]
188Features and packages:
189  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
190  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
191  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
192  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
193  --x-includes=DIR        X include files are in DIR
194  --x-libraries=DIR       X library files are in DIR
195EOF
196    if test -n "$ac_help"; then
197      echo "--enable and --with options recognized:$ac_help"
198    fi
199    exit 0 ;;
200
201  -host | --host | --hos | --ho)
202    ac_prev=host ;;
203  -host=* | --host=* | --hos=* | --ho=*)
204    host="$ac_optarg" ;;
205
206  -includedir | --includedir | --includedi | --included | --include \
207  | --includ | --inclu | --incl | --inc)
208    ac_prev=includedir ;;
209  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210  | --includ=* | --inclu=* | --incl=* | --inc=*)
211    includedir="$ac_optarg" ;;
212
213  -infodir | --infodir | --infodi | --infod | --info | --inf)
214    ac_prev=infodir ;;
215  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216    infodir="$ac_optarg" ;;
217
218  -libdir | --libdir | --libdi | --libd)
219    ac_prev=libdir ;;
220  -libdir=* | --libdir=* | --libdi=* | --libd=*)
221    libdir="$ac_optarg" ;;
222
223  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224  | --libexe | --libex | --libe)
225    ac_prev=libexecdir ;;
226  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227  | --libexe=* | --libex=* | --libe=*)
228    libexecdir="$ac_optarg" ;;
229
230  -localstatedir | --localstatedir | --localstatedi | --localstated \
231  | --localstate | --localstat | --localsta | --localst \
232  | --locals | --local | --loca | --loc | --lo)
233    ac_prev=localstatedir ;;
234  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237    localstatedir="$ac_optarg" ;;
238
239  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240    ac_prev=mandir ;;
241  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242    mandir="$ac_optarg" ;;
243
244  -nfp | --nfp | --nf)
245    # Obsolete; use --without-fp.
246    with_fp=no ;;
247
248  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
249  | --no-cr | --no-c)
250    no_create=yes ;;
251
252  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254    no_recursion=yes ;;
255
256  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258  | --oldin | --oldi | --old | --ol | --o)
259    ac_prev=oldincludedir ;;
260  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263    oldincludedir="$ac_optarg" ;;
264
265  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266    ac_prev=prefix ;;
267  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268    prefix="$ac_optarg" ;;
269
270  -program-prefix | --program-prefix | --program-prefi | --program-pref \
271  | --program-pre | --program-pr | --program-p)
272    ac_prev=program_prefix ;;
273  -program-prefix=* | --program-prefix=* | --program-prefi=* \
274  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275    program_prefix="$ac_optarg" ;;
276
277  -program-suffix | --program-suffix | --program-suffi | --program-suff \
278  | --program-suf | --program-su | --program-s)
279    ac_prev=program_suffix ;;
280  -program-suffix=* | --program-suffix=* | --program-suffi=* \
281  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282    program_suffix="$ac_optarg" ;;
283
284  -program-transform-name | --program-transform-name \
285  | --program-transform-nam | --program-transform-na \
286  | --program-transform-n | --program-transform- \
287  | --program-transform | --program-transfor \
288  | --program-transfo | --program-transf \
289  | --program-trans | --program-tran \
290  | --progr-tra | --program-tr | --program-t)
291    ac_prev=program_transform_name ;;
292  -program-transform-name=* | --program-transform-name=* \
293  | --program-transform-nam=* | --program-transform-na=* \
294  | --program-transform-n=* | --program-transform-=* \
295  | --program-transform=* | --program-transfor=* \
296  | --program-transfo=* | --program-transf=* \
297  | --program-trans=* | --program-tran=* \
298  | --progr-tra=* | --program-tr=* | --program-t=*)
299    program_transform_name="$ac_optarg" ;;
300
301  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302  | -silent | --silent | --silen | --sile | --sil)
303    silent=yes ;;
304
305  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306    ac_prev=sbindir ;;
307  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308  | --sbi=* | --sb=*)
309    sbindir="$ac_optarg" ;;
310
311  -sharedstatedir | --sharedstatedir | --sharedstatedi \
312  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313  | --sharedst | --shareds | --shared | --share | --shar \
314  | --sha | --sh)
315    ac_prev=sharedstatedir ;;
316  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319  | --sha=* | --sh=*)
320    sharedstatedir="$ac_optarg" ;;
321
322  -site | --site | --sit)
323    ac_prev=site ;;
324  -site=* | --site=* | --sit=*)
325    site="$ac_optarg" ;;
326
327  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328    ac_prev=srcdir ;;
329  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330    srcdir="$ac_optarg" ;;
331
332  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333  | --syscon | --sysco | --sysc | --sys | --sy)
334    ac_prev=sysconfdir ;;
335  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337    sysconfdir="$ac_optarg" ;;
338
339  -target | --target | --targe | --targ | --tar | --ta | --t)
340    ac_prev=target ;;
341  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342    target="$ac_optarg" ;;
343
344  -v | -verbose | --verbose | --verbos | --verbo | --verb)
345    verbose=yes ;;
346
347  -version | --version | --versio | --versi | --vers)
348    echo "configure generated by autoconf version 2.13"
349    exit 0 ;;
350
351  -with-* | --with-*)
352    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353    # Reject names that are not valid shell variable names.
354    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356    fi
357    ac_package=`echo $ac_package| sed 's/-/_/g'`
358    case "$ac_option" in
359      *=*) ;;
360      *) ac_optarg=yes ;;
361    esac
362    eval "with_${ac_package}='$ac_optarg'" ;;
363
364  -without-* | --without-*)
365    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366    # Reject names that are not valid shell variable names.
367    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369    fi
370    ac_package=`echo $ac_package| sed 's/-/_/g'`
371    eval "with_${ac_package}=no" ;;
372
373  --x)
374    # Obsolete; use --with-x.
375    with_x=yes ;;
376
377  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378  | --x-incl | --x-inc | --x-in | --x-i)
379    ac_prev=x_includes ;;
380  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382    x_includes="$ac_optarg" ;;
383
384  -x-libraries | --x-libraries | --x-librarie | --x-librari \
385  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386    ac_prev=x_libraries ;;
387  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389    x_libraries="$ac_optarg" ;;
390
391  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
392    ;;
393
394  *)
395    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396      echo "configure: warning: $ac_option: invalid host type" 1>&2
397    fi
398    if test "x$nonopt" != xNONE; then
399      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
400    fi
401    nonopt="$ac_option"
402    ;;
403
404  esac
405done
406
407if test -n "$ac_prev"; then
408  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409fi
410
411trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
412
413# File descriptor usage:
414# 0 standard input
415# 1 file creation
416# 2 errors and warnings
417# 3 some systems may open it to /dev/tty
418# 4 used on the Kubota Titan
419# 6 checking for... messages and results
420# 5 compiler messages saved in config.log
421if test "$silent" = yes; then
422  exec 6>/dev/null
423else
424  exec 6>&1
425fi
426exec 5>./config.log
427
428echo "\
429This file contains any messages produced by compilers while
430running configure, to aid debugging if configure makes a mistake.
431" 1>&5
432
433# Strip out --no-create and --no-recursion so they do not pile up.
434# Also quote any args containing shell metacharacters.
435ac_configure_args=
436for ac_arg
437do
438  case "$ac_arg" in
439  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440  | --no-cr | --no-c) ;;
441  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
446  esac
447done
448
449# NLS nuisances.
450# Only set these to C if already set.  These must not be set unconditionally
451# because not all systems understand e.g. LANG=C (notably SCO).
452# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453# Non-C LC_CTYPE values break the ctype check.
454if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
455if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
458
459# confdefs.h avoids OS command line length limits that DEFS can exceed.
460rm -rf conftest* confdefs.h
461# AIX cpp loses on an empty file, so make sure it contains at least a newline.
462echo > confdefs.h
463
464# A filename unique to this package, relative to the directory that
465# configure is in, which we can look for to find out if srcdir is correct.
466ac_unique_file=src/cvs.h
467
468# Find the source files, if location was not specified.
469if test -z "$srcdir"; then
470  ac_srcdir_defaulted=yes
471  # Try the directory containing this script, then its parent.
472  ac_prog=$0
473  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475  srcdir=$ac_confdir
476  if test ! -r $srcdir/$ac_unique_file; then
477    srcdir=..
478  fi
479else
480  ac_srcdir_defaulted=no
481fi
482if test ! -r $srcdir/$ac_unique_file; then
483  if test "$ac_srcdir_defaulted" = yes; then
484    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485  else
486    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487  fi
488fi
489srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490
491# Prefer explicitly selected file to automatically selected ones.
492if test -z "$CONFIG_SITE"; then
493  if test "x$prefix" != xNONE; then
494    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495  else
496    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497  fi
498fi
499for ac_site_file in $CONFIG_SITE; do
500  if test -r "$ac_site_file"; then
501    echo "loading site script $ac_site_file"
502    . "$ac_site_file"
503  fi
504done
505
506if test -r "$cache_file"; then
507  echo "loading cache $cache_file"
508  . $cache_file
509else
510  echo "creating cache $cache_file"
511  > $cache_file
512fi
513
514ac_ext=c
515# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516ac_cpp='$CPP $CPPFLAGS'
517ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519cross_compiling=$ac_cv_prog_cc_cross
520
521ac_exeext=
522ac_objext=o
523if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
526    ac_n= ac_c='
527' ac_t='	'
528  else
529    ac_n=-n ac_c= ac_t=
530  fi
531else
532  ac_n= ac_c='\c' ac_t=
533fi
534
535
536
537if test "x$prefix" = xNONE; then
538echo $ac_n "checking for prefix by $ac_c" 1>&6
539# Extract the first word of "cvs", so it can be a program name with args.
540set dummy cvs; ac_word=$2
541echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
542echo "configure:543: checking for $ac_word" >&5
543if eval "test \"`echo '$''{'ac_cv_path_CVS'+set}'`\" = set"; then
544  echo $ac_n "(cached) $ac_c" 1>&6
545else
546  case "$CVS" in
547  /*)
548  ac_cv_path_CVS="$CVS" # Let the user override the test with a path.
549  ;;
550  ?:/*)
551  ac_cv_path_CVS="$CVS" # Let the user override the test with a dos path.
552  ;;
553  *)
554  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
555  ac_dummy="$PATH"
556  for ac_dir in $ac_dummy; do
557    test -z "$ac_dir" && ac_dir=.
558    if test -f $ac_dir/$ac_word; then
559      ac_cv_path_CVS="$ac_dir/$ac_word"
560      break
561    fi
562  done
563  IFS="$ac_save_ifs"
564  ;;
565esac
566fi
567CVS="$ac_cv_path_CVS"
568if test -n "$CVS"; then
569  echo "$ac_t""$CVS" 1>&6
570else
571  echo "$ac_t""no" 1>&6
572fi
573
574  if test -n "$ac_cv_path_CVS"; then
575    prefix=`echo $ac_cv_path_CVS|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
576  fi
577fi
578
579
580
581for ac_prog in mawk gawk nawk awk
582do
583# Extract the first word of "$ac_prog", so it can be a program name with args.
584set dummy $ac_prog; ac_word=$2
585echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
586echo "configure:587: checking for $ac_word" >&5
587if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
588  echo $ac_n "(cached) $ac_c" 1>&6
589else
590  if test -n "$AWK"; then
591  ac_cv_prog_AWK="$AWK" # Let the user override the test.
592else
593  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
594  ac_dummy="$PATH"
595  for ac_dir in $ac_dummy; do
596    test -z "$ac_dir" && ac_dir=.
597    if test -f $ac_dir/$ac_word; then
598      ac_cv_prog_AWK="$ac_prog"
599      break
600    fi
601  done
602  IFS="$ac_save_ifs"
603fi
604fi
605AWK="$ac_cv_prog_AWK"
606if test -n "$AWK"; then
607  echo "$ac_t""$AWK" 1>&6
608else
609  echo "$ac_t""no" 1>&6
610fi
611
612test -n "$AWK" && break
613done
614
615# Extract the first word of "gcc", so it can be a program name with args.
616set dummy gcc; ac_word=$2
617echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
618echo "configure:619: checking for $ac_word" >&5
619if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
620  echo $ac_n "(cached) $ac_c" 1>&6
621else
622  if test -n "$CC"; then
623  ac_cv_prog_CC="$CC" # Let the user override the test.
624else
625  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
626  ac_dummy="$PATH"
627  for ac_dir in $ac_dummy; do
628    test -z "$ac_dir" && ac_dir=.
629    if test -f $ac_dir/$ac_word; then
630      ac_cv_prog_CC="gcc"
631      break
632    fi
633  done
634  IFS="$ac_save_ifs"
635fi
636fi
637CC="$ac_cv_prog_CC"
638if test -n "$CC"; then
639  echo "$ac_t""$CC" 1>&6
640else
641  echo "$ac_t""no" 1>&6
642fi
643
644if test -z "$CC"; then
645  # Extract the first word of "cc", so it can be a program name with args.
646set dummy cc; ac_word=$2
647echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
648echo "configure:649: checking for $ac_word" >&5
649if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
650  echo $ac_n "(cached) $ac_c" 1>&6
651else
652  if test -n "$CC"; then
653  ac_cv_prog_CC="$CC" # Let the user override the test.
654else
655  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
656  ac_prog_rejected=no
657  ac_dummy="$PATH"
658  for ac_dir in $ac_dummy; do
659    test -z "$ac_dir" && ac_dir=.
660    if test -f $ac_dir/$ac_word; then
661      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
662        ac_prog_rejected=yes
663	continue
664      fi
665      ac_cv_prog_CC="cc"
666      break
667    fi
668  done
669  IFS="$ac_save_ifs"
670if test $ac_prog_rejected = yes; then
671  # We found a bogon in the path, so make sure we never use it.
672  set dummy $ac_cv_prog_CC
673  shift
674  if test $# -gt 0; then
675    # We chose a different compiler from the bogus one.
676    # However, it has the same basename, so the bogon will be chosen
677    # first if we set CC to just the basename; use the full file name.
678    shift
679    set dummy "$ac_dir/$ac_word" "$@"
680    shift
681    ac_cv_prog_CC="$@"
682  fi
683fi
684fi
685fi
686CC="$ac_cv_prog_CC"
687if test -n "$CC"; then
688  echo "$ac_t""$CC" 1>&6
689else
690  echo "$ac_t""no" 1>&6
691fi
692
693  if test -z "$CC"; then
694    case "`uname -s`" in
695    *win32* | *WIN32*)
696      # Extract the first word of "cl", so it can be a program name with args.
697set dummy cl; ac_word=$2
698echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
699echo "configure:700: checking for $ac_word" >&5
700if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
701  echo $ac_n "(cached) $ac_c" 1>&6
702else
703  if test -n "$CC"; then
704  ac_cv_prog_CC="$CC" # Let the user override the test.
705else
706  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
707  ac_dummy="$PATH"
708  for ac_dir in $ac_dummy; do
709    test -z "$ac_dir" && ac_dir=.
710    if test -f $ac_dir/$ac_word; then
711      ac_cv_prog_CC="cl"
712      break
713    fi
714  done
715  IFS="$ac_save_ifs"
716fi
717fi
718CC="$ac_cv_prog_CC"
719if test -n "$CC"; then
720  echo "$ac_t""$CC" 1>&6
721else
722  echo "$ac_t""no" 1>&6
723fi
724 ;;
725    esac
726  fi
727  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
728fi
729
730echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
731echo "configure:732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
732
733ac_ext=c
734# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
735ac_cpp='$CPP $CPPFLAGS'
736ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
737ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
738cross_compiling=$ac_cv_prog_cc_cross
739
740cat > conftest.$ac_ext << EOF
741
742#line 743 "configure"
743#include "confdefs.h"
744
745main(){return(0);}
746EOF
747if { (eval echo configure:748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
748  ac_cv_prog_cc_works=yes
749  # If we can't run a trivial program, we are probably using a cross compiler.
750  if (./conftest; exit) 2>/dev/null; then
751    ac_cv_prog_cc_cross=no
752  else
753    ac_cv_prog_cc_cross=yes
754  fi
755else
756  echo "configure: failed program was:" >&5
757  cat conftest.$ac_ext >&5
758  ac_cv_prog_cc_works=no
759fi
760rm -fr conftest*
761ac_ext=c
762# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
763ac_cpp='$CPP $CPPFLAGS'
764ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
765ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
766cross_compiling=$ac_cv_prog_cc_cross
767
768echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
769if test $ac_cv_prog_cc_works = no; then
770  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
771fi
772echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
773echo "configure:774: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
774echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
775cross_compiling=$ac_cv_prog_cc_cross
776
777echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
778echo "configure:779: checking whether we are using GNU C" >&5
779if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
780  echo $ac_n "(cached) $ac_c" 1>&6
781else
782  cat > conftest.c <<EOF
783#ifdef __GNUC__
784  yes;
785#endif
786EOF
787if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
788  ac_cv_prog_gcc=yes
789else
790  ac_cv_prog_gcc=no
791fi
792fi
793
794echo "$ac_t""$ac_cv_prog_gcc" 1>&6
795
796if test $ac_cv_prog_gcc = yes; then
797  GCC=yes
798else
799  GCC=
800fi
801
802ac_test_CFLAGS="${CFLAGS+set}"
803ac_save_CFLAGS="$CFLAGS"
804CFLAGS=
805echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
806echo "configure:807: checking whether ${CC-cc} accepts -g" >&5
807if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
808  echo $ac_n "(cached) $ac_c" 1>&6
809else
810  echo 'void f(){}' > conftest.c
811if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
812  ac_cv_prog_cc_g=yes
813else
814  ac_cv_prog_cc_g=no
815fi
816rm -f conftest*
817
818fi
819
820echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
821if test "$ac_test_CFLAGS" = set; then
822  CFLAGS="$ac_save_CFLAGS"
823elif test $ac_cv_prog_cc_g = yes; then
824  if test "$GCC" = yes; then
825    CFLAGS="-g -O2"
826  else
827    CFLAGS="-g"
828  fi
829else
830  if test "$GCC" = yes; then
831    CFLAGS="-O2"
832  else
833    CFLAGS=
834  fi
835fi
836
837ac_aux_dir=
838for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
839  if test -f $ac_dir/install-sh; then
840    ac_aux_dir=$ac_dir
841    ac_install_sh="$ac_aux_dir/install-sh -c"
842    break
843  elif test -f $ac_dir/install.sh; then
844    ac_aux_dir=$ac_dir
845    ac_install_sh="$ac_aux_dir/install.sh -c"
846    break
847  fi
848done
849if test -z "$ac_aux_dir"; then
850  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
851fi
852ac_config_guess=$ac_aux_dir/config.guess
853ac_config_sub=$ac_aux_dir/config.sub
854ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
855
856# Find a good install program.  We prefer a C program (faster),
857# so one script is as good as another.  But avoid the broken or
858# incompatible versions:
859# SysV /etc/install, /usr/sbin/install
860# SunOS /usr/etc/install
861# IRIX /sbin/install
862# AIX /bin/install
863# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
864# AFS /usr/afsws/bin/install, which mishandles nonexistent args
865# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
866# ./install, which can be erroneously created by make from ./install.sh.
867echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
868echo "configure:869: checking for a BSD compatible install" >&5
869if test -z "$INSTALL"; then
870if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
871  echo $ac_n "(cached) $ac_c" 1>&6
872else
873    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
874  for ac_dir in $PATH; do
875    # Account for people who put trailing slashes in PATH elements.
876    case "$ac_dir/" in
877    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
878    *)
879      # OSF1 and SCO ODT 3.0 have their own names for install.
880      # Don't use installbsd from OSF since it installs stuff as root
881      # by default.
882      for ac_prog in ginstall scoinst install; do
883        if test -f $ac_dir/$ac_prog; then
884	  if test $ac_prog = install &&
885            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
886	    # AIX install.  It has an incompatible calling convention.
887	    :
888	  else
889	    ac_cv_path_install="$ac_dir/$ac_prog -c"
890	    break 2
891	  fi
892	fi
893      done
894      ;;
895    esac
896  done
897  IFS="$ac_save_IFS"
898
899fi
900  if test "${ac_cv_path_install+set}" = set; then
901    INSTALL="$ac_cv_path_install"
902  else
903    # As a last resort, use the slow shell script.  We don't cache a
904    # path for INSTALL within a source directory, because that will
905    # break other packages using the cache if that directory is
906    # removed, or if the path is relative.
907    INSTALL="$ac_install_sh"
908  fi
909fi
910echo "$ac_t""$INSTALL" 1>&6
911
912# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
913# It thinks the first close brace ends the variable substitution.
914test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
915
916test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
917
918test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
919
920echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
921echo "configure:922: checking whether ${MAKE-make} sets \${MAKE}" >&5
922set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
923if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
924  echo $ac_n "(cached) $ac_c" 1>&6
925else
926  cat > conftestmake <<\EOF
927all:
928	@echo 'ac_maketemp="${MAKE}"'
929EOF
930# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
931eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
932if test -n "$ac_maketemp"; then
933  eval ac_cv_prog_make_${ac_make}_set=yes
934else
935  eval ac_cv_prog_make_${ac_make}_set=no
936fi
937rm -f conftestmake
938fi
939if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
940  echo "$ac_t""yes" 1>&6
941  SET_MAKE=
942else
943  echo "$ac_t""no" 1>&6
944  SET_MAKE="MAKE=${MAKE-make}"
945fi
946
947# Extract the first word of "ranlib", so it can be a program name with args.
948set dummy ranlib; ac_word=$2
949echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
950echo "configure:951: checking for $ac_word" >&5
951if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
952  echo $ac_n "(cached) $ac_c" 1>&6
953else
954  if test -n "$RANLIB"; then
955  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
956else
957  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
958  ac_dummy="$PATH"
959  for ac_dir in $ac_dummy; do
960    test -z "$ac_dir" && ac_dir=.
961    if test -f $ac_dir/$ac_word; then
962      ac_cv_prog_RANLIB="ranlib"
963      break
964    fi
965  done
966  IFS="$ac_save_ifs"
967  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
968fi
969fi
970RANLIB="$ac_cv_prog_RANLIB"
971if test -n "$RANLIB"; then
972  echo "$ac_t""$RANLIB" 1>&6
973else
974  echo "$ac_t""no" 1>&6
975fi
976
977for ac_prog in 'bison -y' byacc
978do
979# Extract the first word of "$ac_prog", so it can be a program name with args.
980set dummy $ac_prog; ac_word=$2
981echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
982echo "configure:983: checking for $ac_word" >&5
983if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
984  echo $ac_n "(cached) $ac_c" 1>&6
985else
986  if test -n "$YACC"; then
987  ac_cv_prog_YACC="$YACC" # Let the user override the test.
988else
989  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
990  ac_dummy="$PATH"
991  for ac_dir in $ac_dummy; do
992    test -z "$ac_dir" && ac_dir=.
993    if test -f $ac_dir/$ac_word; then
994      ac_cv_prog_YACC="$ac_prog"
995      break
996    fi
997  done
998  IFS="$ac_save_ifs"
999fi
1000fi
1001YACC="$ac_cv_prog_YACC"
1002if test -n "$YACC"; then
1003  echo "$ac_t""$YACC" 1>&6
1004else
1005  echo "$ac_t""no" 1>&6
1006fi
1007
1008test -n "$YACC" && break
1009done
1010test -n "$YACC" || YACC="yacc"
1011
1012
1013# Extract the first word of "perl", so it can be a program name with args.
1014set dummy perl; ac_word=$2
1015echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1016echo "configure:1017: checking for $ac_word" >&5
1017if eval "test \"`echo '$''{'ac_cv_path_perl_path'+set}'`\" = set"; then
1018  echo $ac_n "(cached) $ac_c" 1>&6
1019else
1020  case "$perl_path" in
1021  /*)
1022  ac_cv_path_perl_path="$perl_path" # Let the user override the test with a path.
1023  ;;
1024  ?:/*)
1025  ac_cv_path_perl_path="$perl_path" # Let the user override the test with a dos path.
1026  ;;
1027  *)
1028  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1029  ac_dummy="$PATH"
1030  for ac_dir in $ac_dummy; do
1031    test -z "$ac_dir" && ac_dir=.
1032    if test -f $ac_dir/$ac_word; then
1033      ac_cv_path_perl_path="$ac_dir/$ac_word"
1034      break
1035    fi
1036  done
1037  IFS="$ac_save_ifs"
1038  test -z "$ac_cv_path_perl_path" && ac_cv_path_perl_path="no"
1039  ;;
1040esac
1041fi
1042perl_path="$ac_cv_path_perl_path"
1043if test -n "$perl_path"; then
1044  echo "$ac_t""$perl_path" 1>&6
1045else
1046  echo "$ac_t""no" 1>&6
1047fi
1048
1049# Extract the first word of "csh", so it can be a program name with args.
1050set dummy csh; ac_word=$2
1051echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1052echo "configure:1053: checking for $ac_word" >&5
1053if eval "test \"`echo '$''{'ac_cv_path_csh_path'+set}'`\" = set"; then
1054  echo $ac_n "(cached) $ac_c" 1>&6
1055else
1056  case "$csh_path" in
1057  /*)
1058  ac_cv_path_csh_path="$csh_path" # Let the user override the test with a path.
1059  ;;
1060  ?:/*)
1061  ac_cv_path_csh_path="$csh_path" # Let the user override the test with a dos path.
1062  ;;
1063  *)
1064  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
1065  ac_dummy="$PATH"
1066  for ac_dir in $ac_dummy; do
1067    test -z "$ac_dir" && ac_dir=.
1068    if test -f $ac_dir/$ac_word; then
1069      ac_cv_path_csh_path="$ac_dir/$ac_word"
1070      break
1071    fi
1072  done
1073  IFS="$ac_save_ifs"
1074  test -z "$ac_cv_path_csh_path" && ac_cv_path_csh_path="no"
1075  ;;
1076esac
1077fi
1078csh_path="$ac_cv_path_csh_path"
1079if test -n "$csh_path"; then
1080  echo "$ac_t""$csh_path" 1>&6
1081else
1082  echo "$ac_t""no" 1>&6
1083fi
1084
1085
1086# Pull the hash mark out of the macro call to avoid m4 problems.
1087ac_msg="whether #! works in shell scripts"
1088echo $ac_n "checking $ac_msg""... $ac_c" 1>&6
1089echo "configure:1090: checking $ac_msg" >&5
1090if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then
1091  echo $ac_n "(cached) $ac_c" 1>&6
1092else
1093  echo '#! /bin/cat
1094exit 69
1095' > conftest
1096chmod u+x conftest
1097(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
1098if test $? -ne 69; then
1099   ac_cv_sys_interpreter=yes
1100else
1101   ac_cv_sys_interpreter=no
1102fi
1103rm -f conftest
1104fi
1105
1106echo "$ac_t""$ac_cv_sys_interpreter" 1>&6
1107interpval="$ac_cv_sys_interpreter"
1108
1109if test X"$ac_cv_sys_interpreter" != X"yes" ; then
1110  # silly trick to avoid problems in AC macros...
1111  ac_msg='perl scripts using #! may not be invoked properly'
1112  echo "configure: warning: $ac_msg" 1>&2
1113fi
1114
1115echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1116echo "configure:1117: checking how to run the C preprocessor" >&5
1117# On Suns, sometimes $CPP names a directory.
1118if test -n "$CPP" && test -d "$CPP"; then
1119  CPP=
1120fi
1121if test -z "$CPP"; then
1122if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1123  echo $ac_n "(cached) $ac_c" 1>&6
1124else
1125    # This must be in double quotes, not single quotes, because CPP may get
1126  # substituted into the Makefile and "${CC-cc}" will confuse make.
1127  CPP="${CC-cc} -E"
1128  # On the NeXT, cc -E runs the code through the compiler's parser,
1129  # not just through cpp.
1130  cat > conftest.$ac_ext <<EOF
1131#line 1132 "configure"
1132#include "confdefs.h"
1133#include <assert.h>
1134Syntax Error
1135EOF
1136ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1137{ (eval echo configure:1138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1138ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1139if test -z "$ac_err"; then
1140  :
1141else
1142  echo "$ac_err" >&5
1143  echo "configure: failed program was:" >&5
1144  cat conftest.$ac_ext >&5
1145  rm -rf conftest*
1146  CPP="${CC-cc} -E -traditional-cpp"
1147  cat > conftest.$ac_ext <<EOF
1148#line 1149 "configure"
1149#include "confdefs.h"
1150#include <assert.h>
1151Syntax Error
1152EOF
1153ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1154{ (eval echo configure:1155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1155ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1156if test -z "$ac_err"; then
1157  :
1158else
1159  echo "$ac_err" >&5
1160  echo "configure: failed program was:" >&5
1161  cat conftest.$ac_ext >&5
1162  rm -rf conftest*
1163  CPP="${CC-cc} -nologo -E"
1164  cat > conftest.$ac_ext <<EOF
1165#line 1166 "configure"
1166#include "confdefs.h"
1167#include <assert.h>
1168Syntax Error
1169EOF
1170ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1171{ (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1172ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1173if test -z "$ac_err"; then
1174  :
1175else
1176  echo "$ac_err" >&5
1177  echo "configure: failed program was:" >&5
1178  cat conftest.$ac_ext >&5
1179  rm -rf conftest*
1180  CPP=/lib/cpp
1181fi
1182rm -f conftest*
1183fi
1184rm -f conftest*
1185fi
1186rm -f conftest*
1187  ac_cv_prog_CPP="$CPP"
1188fi
1189  CPP="$ac_cv_prog_CPP"
1190else
1191  ac_cv_prog_CPP="$CPP"
1192fi
1193echo "$ac_t""$CPP" 1>&6
1194
1195echo $ac_n "checking for AIX""... $ac_c" 1>&6
1196echo "configure:1197: checking for AIX" >&5
1197cat > conftest.$ac_ext <<EOF
1198#line 1199 "configure"
1199#include "confdefs.h"
1200#ifdef _AIX
1201  yes
1202#endif
1203
1204EOF
1205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1206  egrep "yes" >/dev/null 2>&1; then
1207  rm -rf conftest*
1208  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1209#define _ALL_SOURCE 1
1210EOF
1211
1212else
1213  rm -rf conftest*
1214  echo "$ac_t""no" 1>&6
1215fi
1216rm -f conftest*
1217
1218
1219ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1220echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1221echo "configure:1222: checking for minix/config.h" >&5
1222if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1223  echo $ac_n "(cached) $ac_c" 1>&6
1224else
1225  cat > conftest.$ac_ext <<EOF
1226#line 1227 "configure"
1227#include "confdefs.h"
1228#include <minix/config.h>
1229EOF
1230ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1231{ (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1232ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1233if test -z "$ac_err"; then
1234  rm -rf conftest*
1235  eval "ac_cv_header_$ac_safe=yes"
1236else
1237  echo "$ac_err" >&5
1238  echo "configure: failed program was:" >&5
1239  cat conftest.$ac_ext >&5
1240  rm -rf conftest*
1241  eval "ac_cv_header_$ac_safe=no"
1242fi
1243rm -f conftest*
1244fi
1245if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1246  echo "$ac_t""yes" 1>&6
1247  MINIX=yes
1248else
1249  echo "$ac_t""no" 1>&6
1250MINIX=
1251fi
1252
1253if test "$MINIX" = yes; then
1254  cat >> confdefs.h <<\EOF
1255#define _POSIX_SOURCE 1
1256EOF
1257
1258  cat >> confdefs.h <<\EOF
1259#define _POSIX_1_SOURCE 2
1260EOF
1261
1262  cat >> confdefs.h <<\EOF
1263#define _MINIX 1
1264EOF
1265
1266fi
1267
1268echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1269echo "configure:1270: checking for POSIXized ISC" >&5
1270if test -d /etc/conf/kconfig.d &&
1271  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1272then
1273  echo "$ac_t""yes" 1>&6
1274  ISC=yes # If later tests want to check for ISC.
1275  cat >> confdefs.h <<\EOF
1276#define _POSIX_SOURCE 1
1277EOF
1278
1279  if test "$GCC" = yes; then
1280    CC="$CC -posix"
1281  else
1282    CC="$CC -Xp"
1283  fi
1284else
1285  echo "$ac_t""no" 1>&6
1286  ISC=
1287fi
1288
1289if test "$ISC" = yes; then
1290CFLAGS="$CFLAGS -D_SYSV3"
1291LIBS="-lcrypt $LIBS"
1292fi
1293
1294ac_header_dirent=no
1295for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1296do
1297ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1298echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1299echo "configure:1300: checking for $ac_hdr that defines DIR" >&5
1300if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1301  echo $ac_n "(cached) $ac_c" 1>&6
1302else
1303  cat > conftest.$ac_ext <<EOF
1304#line 1305 "configure"
1305#include "confdefs.h"
1306#include <sys/types.h>
1307#include <$ac_hdr>
1308int main() {
1309DIR *dirp = 0;
1310; return 0; }
1311EOF
1312if { (eval echo configure:1313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1313  rm -rf conftest*
1314  eval "ac_cv_header_dirent_$ac_safe=yes"
1315else
1316  echo "configure: failed program was:" >&5
1317  cat conftest.$ac_ext >&5
1318  rm -rf conftest*
1319  eval "ac_cv_header_dirent_$ac_safe=no"
1320fi
1321rm -f conftest*
1322fi
1323if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1324  echo "$ac_t""yes" 1>&6
1325    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1326  cat >> confdefs.h <<EOF
1327#define $ac_tr_hdr 1
1328EOF
1329 ac_header_dirent=$ac_hdr; break
1330else
1331  echo "$ac_t""no" 1>&6
1332fi
1333done
1334# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1335if test $ac_header_dirent = dirent.h; then
1336echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1337echo "configure:1338: checking for opendir in -ldir" >&5
1338ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1339if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1340  echo $ac_n "(cached) $ac_c" 1>&6
1341else
1342  ac_save_LIBS="$LIBS"
1343LIBS="-ldir  $LIBS"
1344cat > conftest.$ac_ext <<EOF
1345#line 1346 "configure"
1346#include "confdefs.h"
1347/* Override any gcc2 internal prototype to avoid an error.  */
1348/* We use char because int might match the return type of a gcc2
1349    builtin and then its argument prototype would still apply.  */
1350char opendir();
1351
1352int main() {
1353opendir()
1354; return 0; }
1355EOF
1356if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1357  rm -rf conftest*
1358  eval "ac_cv_lib_$ac_lib_var=yes"
1359else
1360  echo "configure: failed program was:" >&5
1361  cat conftest.$ac_ext >&5
1362  rm -rf conftest*
1363  eval "ac_cv_lib_$ac_lib_var=no"
1364fi
1365rm -f conftest*
1366LIBS="$ac_save_LIBS"
1367
1368fi
1369if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1370  echo "$ac_t""yes" 1>&6
1371  LIBS="$LIBS -ldir"
1372else
1373  echo "$ac_t""no" 1>&6
1374fi
1375
1376else
1377echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1378echo "configure:1379: checking for opendir in -lx" >&5
1379ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1380if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1381  echo $ac_n "(cached) $ac_c" 1>&6
1382else
1383  ac_save_LIBS="$LIBS"
1384LIBS="-lx  $LIBS"
1385cat > conftest.$ac_ext <<EOF
1386#line 1387 "configure"
1387#include "confdefs.h"
1388/* Override any gcc2 internal prototype to avoid an error.  */
1389/* We use char because int might match the return type of a gcc2
1390    builtin and then its argument prototype would still apply.  */
1391char opendir();
1392
1393int main() {
1394opendir()
1395; return 0; }
1396EOF
1397if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1398  rm -rf conftest*
1399  eval "ac_cv_lib_$ac_lib_var=yes"
1400else
1401  echo "configure: failed program was:" >&5
1402  cat conftest.$ac_ext >&5
1403  rm -rf conftest*
1404  eval "ac_cv_lib_$ac_lib_var=no"
1405fi
1406rm -f conftest*
1407LIBS="$ac_save_LIBS"
1408
1409fi
1410if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1411  echo "$ac_t""yes" 1>&6
1412  LIBS="$LIBS -lx"
1413else
1414  echo "$ac_t""no" 1>&6
1415fi
1416
1417fi
1418
1419echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1420echo "configure:1421: checking for ANSI C header files" >&5
1421if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1422  echo $ac_n "(cached) $ac_c" 1>&6
1423else
1424  cat > conftest.$ac_ext <<EOF
1425#line 1426 "configure"
1426#include "confdefs.h"
1427#include <stdlib.h>
1428#include <stdarg.h>
1429#include <string.h>
1430#include <float.h>
1431EOF
1432ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1433{ (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1434ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1435if test -z "$ac_err"; then
1436  rm -rf conftest*
1437  ac_cv_header_stdc=yes
1438else
1439  echo "$ac_err" >&5
1440  echo "configure: failed program was:" >&5
1441  cat conftest.$ac_ext >&5
1442  rm -rf conftest*
1443  ac_cv_header_stdc=no
1444fi
1445rm -f conftest*
1446
1447if test $ac_cv_header_stdc = yes; then
1448  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1449cat > conftest.$ac_ext <<EOF
1450#line 1451 "configure"
1451#include "confdefs.h"
1452#include <string.h>
1453EOF
1454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1455  egrep "memchr" >/dev/null 2>&1; then
1456  :
1457else
1458  rm -rf conftest*
1459  ac_cv_header_stdc=no
1460fi
1461rm -f conftest*
1462
1463fi
1464
1465if test $ac_cv_header_stdc = yes; then
1466  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1467cat > conftest.$ac_ext <<EOF
1468#line 1469 "configure"
1469#include "confdefs.h"
1470#include <stdlib.h>
1471EOF
1472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1473  egrep "free" >/dev/null 2>&1; then
1474  :
1475else
1476  rm -rf conftest*
1477  ac_cv_header_stdc=no
1478fi
1479rm -f conftest*
1480
1481fi
1482
1483if test $ac_cv_header_stdc = yes; then
1484  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1485if test "$cross_compiling" = yes; then
1486  :
1487else
1488  cat > conftest.$ac_ext <<EOF
1489#line 1490 "configure"
1490#include "confdefs.h"
1491#include <ctype.h>
1492#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1493#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1494#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1495int main () { int i; for (i = 0; i < 256; i++)
1496if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1497exit (0); }
1498
1499EOF
1500if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1501then
1502  :
1503else
1504  echo "configure: failed program was:" >&5
1505  cat conftest.$ac_ext >&5
1506  rm -fr conftest*
1507  ac_cv_header_stdc=no
1508fi
1509rm -fr conftest*
1510fi
1511
1512fi
1513fi
1514
1515echo "$ac_t""$ac_cv_header_stdc" 1>&6
1516if test $ac_cv_header_stdc = yes; then
1517  cat >> confdefs.h <<\EOF
1518#define STDC_HEADERS 1
1519EOF
1520
1521fi
1522
1523echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1524echo "configure:1525: checking for sys/wait.h that is POSIX.1 compatible" >&5
1525if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1526  echo $ac_n "(cached) $ac_c" 1>&6
1527else
1528  cat > conftest.$ac_ext <<EOF
1529#line 1530 "configure"
1530#include "confdefs.h"
1531#include <sys/types.h>
1532#include <sys/wait.h>
1533#ifndef WEXITSTATUS
1534#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1535#endif
1536#ifndef WIFEXITED
1537#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1538#endif
1539int main() {
1540int s;
1541wait (&s);
1542s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1543; return 0; }
1544EOF
1545if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1546  rm -rf conftest*
1547  ac_cv_header_sys_wait_h=yes
1548else
1549  echo "configure: failed program was:" >&5
1550  cat conftest.$ac_ext >&5
1551  rm -rf conftest*
1552  ac_cv_header_sys_wait_h=no
1553fi
1554rm -f conftest*
1555fi
1556
1557echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1558if test $ac_cv_header_sys_wait_h = yes; then
1559  cat >> confdefs.h <<\EOF
1560#define HAVE_SYS_WAIT_H 1
1561EOF
1562
1563fi
1564
1565for ac_hdr in errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
1566		 limits.h sys/file.h \
1567                 sys/param.h sys/select.h sys/time.h sys/timeb.h \
1568                 io.h direct.h sys/bsdtypes.h sys/resource.h
1569do
1570ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1571echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1572echo "configure:1573: checking for $ac_hdr" >&5
1573if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1574  echo $ac_n "(cached) $ac_c" 1>&6
1575else
1576  cat > conftest.$ac_ext <<EOF
1577#line 1578 "configure"
1578#include "confdefs.h"
1579#include <$ac_hdr>
1580EOF
1581ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1582{ (eval echo configure:1583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1583ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1584if test -z "$ac_err"; then
1585  rm -rf conftest*
1586  eval "ac_cv_header_$ac_safe=yes"
1587else
1588  echo "$ac_err" >&5
1589  echo "configure: failed program was:" >&5
1590  cat conftest.$ac_ext >&5
1591  rm -rf conftest*
1592  eval "ac_cv_header_$ac_safe=no"
1593fi
1594rm -f conftest*
1595fi
1596if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1597  echo "$ac_t""yes" 1>&6
1598    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1599  cat >> confdefs.h <<EOF
1600#define $ac_tr_hdr 1
1601EOF
1602
1603else
1604  echo "$ac_t""no" 1>&6
1605fi
1606done
1607
1608echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1609echo "configure:1610: checking whether stat file-mode macros are broken" >&5
1610if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1611  echo $ac_n "(cached) $ac_c" 1>&6
1612else
1613  cat > conftest.$ac_ext <<EOF
1614#line 1615 "configure"
1615#include "confdefs.h"
1616#include <sys/types.h>
1617#include <sys/stat.h>
1618
1619#if defined(S_ISBLK) && defined(S_IFDIR)
1620# if S_ISBLK (S_IFDIR)
1621You lose.
1622# endif
1623#endif
1624
1625#if defined(S_ISBLK) && defined(S_IFCHR)
1626# if S_ISBLK (S_IFCHR)
1627You lose.
1628# endif
1629#endif
1630
1631#if defined(S_ISLNK) && defined(S_IFREG)
1632# if S_ISLNK (S_IFREG)
1633You lose.
1634# endif
1635#endif
1636
1637#if defined(S_ISSOCK) && defined(S_IFREG)
1638# if S_ISSOCK (S_IFREG)
1639You lose.
1640# endif
1641#endif
1642
1643EOF
1644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1645  egrep "You lose" >/dev/null 2>&1; then
1646  rm -rf conftest*
1647  ac_cv_header_stat_broken=yes
1648else
1649  rm -rf conftest*
1650  ac_cv_header_stat_broken=no
1651fi
1652rm -f conftest*
1653
1654fi
1655
1656echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1657if test $ac_cv_header_stat_broken = yes; then
1658  cat >> confdefs.h <<\EOF
1659#define STAT_MACROS_BROKEN 1
1660EOF
1661
1662fi
1663
1664echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1665echo "configure:1666: checking whether time.h and sys/time.h may both be included" >&5
1666if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1667  echo $ac_n "(cached) $ac_c" 1>&6
1668else
1669  cat > conftest.$ac_ext <<EOF
1670#line 1671 "configure"
1671#include "confdefs.h"
1672#include <sys/types.h>
1673#include <sys/time.h>
1674#include <time.h>
1675int main() {
1676struct tm *tp;
1677; return 0; }
1678EOF
1679if { (eval echo configure:1680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1680  rm -rf conftest*
1681  ac_cv_header_time=yes
1682else
1683  echo "configure: failed program was:" >&5
1684  cat conftest.$ac_ext >&5
1685  rm -rf conftest*
1686  ac_cv_header_time=no
1687fi
1688rm -f conftest*
1689fi
1690
1691echo "$ac_t""$ac_cv_header_time" 1>&6
1692if test $ac_cv_header_time = yes; then
1693  cat >> confdefs.h <<\EOF
1694#define TIME_WITH_SYS_TIME 1
1695EOF
1696
1697fi
1698
1699
1700echo $ac_n "checking for working const""... $ac_c" 1>&6
1701echo "configure:1702: checking for working const" >&5
1702if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1703  echo $ac_n "(cached) $ac_c" 1>&6
1704else
1705  cat > conftest.$ac_ext <<EOF
1706#line 1707 "configure"
1707#include "confdefs.h"
1708
1709int main() {
1710
1711/* Ultrix mips cc rejects this.  */
1712typedef int charset[2]; const charset x;
1713/* SunOS 4.1.1 cc rejects this.  */
1714char const *const *ccp;
1715char **p;
1716/* NEC SVR4.0.2 mips cc rejects this.  */
1717struct point {int x, y;};
1718static struct point const zero = {0,0};
1719/* AIX XL C 1.02.0.0 rejects this.
1720   It does not let you subtract one const X* pointer from another in an arm
1721   of an if-expression whose if-part is not a constant expression */
1722const char *g = "string";
1723ccp = &g + (g ? g-g : 0);
1724/* HPUX 7.0 cc rejects these. */
1725++ccp;
1726p = (char**) ccp;
1727ccp = (char const *const *) p;
1728{ /* SCO 3.2v4 cc rejects this.  */
1729  char *t;
1730  char const *s = 0 ? (char *) 0 : (char const *) 0;
1731
1732  *t++ = 0;
1733}
1734{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1735  int x[] = {25, 17};
1736  const int *foo = &x[0];
1737  ++foo;
1738}
1739{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1740  typedef const int *iptr;
1741  iptr p = 0;
1742  ++p;
1743}
1744{ /* AIX XL C 1.02.0.0 rejects this saying
1745     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1746  struct s { int j; const int *ap[3]; };
1747  struct s *b; b->j = 5;
1748}
1749{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1750  const int foo = 10;
1751}
1752
1753; return 0; }
1754EOF
1755if { (eval echo configure:1756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1756  rm -rf conftest*
1757  ac_cv_c_const=yes
1758else
1759  echo "configure: failed program was:" >&5
1760  cat conftest.$ac_ext >&5
1761  rm -rf conftest*
1762  ac_cv_c_const=no
1763fi
1764rm -f conftest*
1765fi
1766
1767echo "$ac_t""$ac_cv_c_const" 1>&6
1768if test $ac_cv_c_const = no; then
1769  cat >> confdefs.h <<\EOF
1770#define const
1771EOF
1772
1773fi
1774
1775echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1776echo "configure:1777: checking for uid_t in sys/types.h" >&5
1777if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1778  echo $ac_n "(cached) $ac_c" 1>&6
1779else
1780  cat > conftest.$ac_ext <<EOF
1781#line 1782 "configure"
1782#include "confdefs.h"
1783#include <sys/types.h>
1784EOF
1785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1786  egrep "uid_t" >/dev/null 2>&1; then
1787  rm -rf conftest*
1788  ac_cv_type_uid_t=yes
1789else
1790  rm -rf conftest*
1791  ac_cv_type_uid_t=no
1792fi
1793rm -f conftest*
1794
1795fi
1796
1797echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1798if test $ac_cv_type_uid_t = no; then
1799  cat >> confdefs.h <<\EOF
1800#define uid_t int
1801EOF
1802
1803  cat >> confdefs.h <<\EOF
1804#define gid_t int
1805EOF
1806
1807fi
1808
1809echo $ac_n "checking for mode_t""... $ac_c" 1>&6
1810echo "configure:1811: checking for mode_t" >&5
1811if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
1812  echo $ac_n "(cached) $ac_c" 1>&6
1813else
1814  cat > conftest.$ac_ext <<EOF
1815#line 1816 "configure"
1816#include "confdefs.h"
1817#include <sys/types.h>
1818#if STDC_HEADERS
1819#include <stdlib.h>
1820#include <stddef.h>
1821#endif
1822EOF
1823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1824  egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1825  rm -rf conftest*
1826  ac_cv_type_mode_t=yes
1827else
1828  rm -rf conftest*
1829  ac_cv_type_mode_t=no
1830fi
1831rm -f conftest*
1832
1833fi
1834echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1835if test $ac_cv_type_mode_t = no; then
1836  cat >> confdefs.h <<\EOF
1837#define mode_t int
1838EOF
1839
1840fi
1841
1842echo $ac_n "checking for pid_t""... $ac_c" 1>&6
1843echo "configure:1844: checking for pid_t" >&5
1844if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
1845  echo $ac_n "(cached) $ac_c" 1>&6
1846else
1847  cat > conftest.$ac_ext <<EOF
1848#line 1849 "configure"
1849#include "confdefs.h"
1850#include <sys/types.h>
1851#if STDC_HEADERS
1852#include <stdlib.h>
1853#include <stddef.h>
1854#endif
1855EOF
1856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1857  egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1858  rm -rf conftest*
1859  ac_cv_type_pid_t=yes
1860else
1861  rm -rf conftest*
1862  ac_cv_type_pid_t=no
1863fi
1864rm -f conftest*
1865
1866fi
1867echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1868if test $ac_cv_type_pid_t = no; then
1869  cat >> confdefs.h <<\EOF
1870#define pid_t int
1871EOF
1872
1873fi
1874
1875echo $ac_n "checking for size_t""... $ac_c" 1>&6
1876echo "configure:1877: checking for size_t" >&5
1877if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1878  echo $ac_n "(cached) $ac_c" 1>&6
1879else
1880  cat > conftest.$ac_ext <<EOF
1881#line 1882 "configure"
1882#include "confdefs.h"
1883#include <sys/types.h>
1884#if STDC_HEADERS
1885#include <stdlib.h>
1886#include <stddef.h>
1887#endif
1888EOF
1889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1890  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1891  rm -rf conftest*
1892  ac_cv_type_size_t=yes
1893else
1894  rm -rf conftest*
1895  ac_cv_type_size_t=no
1896fi
1897rm -f conftest*
1898
1899fi
1900echo "$ac_t""$ac_cv_type_size_t" 1>&6
1901if test $ac_cv_type_size_t = no; then
1902  cat >> confdefs.h <<\EOF
1903#define size_t unsigned
1904EOF
1905
1906fi
1907
1908echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1909echo "configure:1910: checking return type of signal handlers" >&5
1910if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1911  echo $ac_n "(cached) $ac_c" 1>&6
1912else
1913  cat > conftest.$ac_ext <<EOF
1914#line 1915 "configure"
1915#include "confdefs.h"
1916#include <sys/types.h>
1917#include <signal.h>
1918#ifdef signal
1919#undef signal
1920#endif
1921#ifdef __cplusplus
1922extern "C" void (*signal (int, void (*)(int)))(int);
1923#else
1924void (*signal ()) ();
1925#endif
1926
1927int main() {
1928int i;
1929; return 0; }
1930EOF
1931if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1932  rm -rf conftest*
1933  ac_cv_type_signal=void
1934else
1935  echo "configure: failed program was:" >&5
1936  cat conftest.$ac_ext >&5
1937  rm -rf conftest*
1938  ac_cv_type_signal=int
1939fi
1940rm -f conftest*
1941fi
1942
1943echo "$ac_t""$ac_cv_type_signal" 1>&6
1944cat >> confdefs.h <<EOF
1945#define RETSIGTYPE $ac_cv_type_signal
1946EOF
1947
1948
1949
1950echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
1951echo "configure:1952: checking for st_blksize in struct stat" >&5
1952if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
1953  echo $ac_n "(cached) $ac_c" 1>&6
1954else
1955  cat > conftest.$ac_ext <<EOF
1956#line 1957 "configure"
1957#include "confdefs.h"
1958#include <sys/types.h>
1959#include <sys/stat.h>
1960int main() {
1961struct stat s; s.st_blksize;
1962; return 0; }
1963EOF
1964if { (eval echo configure:1965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1965  rm -rf conftest*
1966  ac_cv_struct_st_blksize=yes
1967else
1968  echo "configure: failed program was:" >&5
1969  cat conftest.$ac_ext >&5
1970  rm -rf conftest*
1971  ac_cv_struct_st_blksize=no
1972fi
1973rm -f conftest*
1974fi
1975
1976echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
1977if test $ac_cv_struct_st_blksize = yes; then
1978  cat >> confdefs.h <<\EOF
1979#define HAVE_ST_BLKSIZE 1
1980EOF
1981
1982fi
1983
1984echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
1985echo "configure:1986: checking for st_rdev in struct stat" >&5
1986if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
1987  echo $ac_n "(cached) $ac_c" 1>&6
1988else
1989  cat > conftest.$ac_ext <<EOF
1990#line 1991 "configure"
1991#include "confdefs.h"
1992#include <sys/types.h>
1993#include <sys/stat.h>
1994int main() {
1995struct stat s; s.st_rdev;
1996; return 0; }
1997EOF
1998if { (eval echo configure:1999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1999  rm -rf conftest*
2000  ac_cv_struct_st_rdev=yes
2001else
2002  echo "configure: failed program was:" >&5
2003  cat conftest.$ac_ext >&5
2004  rm -rf conftest*
2005  ac_cv_struct_st_rdev=no
2006fi
2007rm -f conftest*
2008fi
2009
2010echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
2011if test $ac_cv_struct_st_rdev = yes; then
2012  cat >> confdefs.h <<\EOF
2013#define HAVE_ST_RDEV 1
2014EOF
2015
2016fi
2017
2018for ac_func in mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul
2019do
2020echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2021echo "configure:2022: checking for $ac_func" >&5
2022if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2023  echo $ac_n "(cached) $ac_c" 1>&6
2024else
2025  cat > conftest.$ac_ext <<EOF
2026#line 2027 "configure"
2027#include "confdefs.h"
2028/* System header to define __stub macros and hopefully few prototypes,
2029    which can conflict with char $ac_func(); below.  */
2030#include <assert.h>
2031/* Override any gcc2 internal prototype to avoid an error.  */
2032/* We use char because int might match the return type of a gcc2
2033    builtin and then its argument prototype would still apply.  */
2034char $ac_func();
2035
2036int main() {
2037
2038/* The GNU C library defines this for functions which it implements
2039    to always fail with ENOSYS.  Some functions are actually named
2040    something starting with __ and the normal name is an alias.  */
2041#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2042choke me
2043#else
2044$ac_func();
2045#endif
2046
2047; return 0; }
2048EOF
2049if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2050  rm -rf conftest*
2051  eval "ac_cv_func_$ac_func=yes"
2052else
2053  echo "configure: failed program was:" >&5
2054  cat conftest.$ac_ext >&5
2055  rm -rf conftest*
2056  eval "ac_cv_func_$ac_func=no"
2057fi
2058rm -f conftest*
2059fi
2060
2061if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2062  echo "$ac_t""yes" 1>&6
2063    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2064  cat >> confdefs.h <<EOF
2065#define $ac_tr_func 1
2066EOF
2067
2068else
2069  echo "$ac_t""no" 1>&6
2070LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
2071fi
2072done
2073
2074
2075for ac_func in fchmod fsync ftime mktemp putenv vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock tempnam tzset readlink wait3 mknod getpassphrase
2076do
2077echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2078echo "configure:2079: checking for $ac_func" >&5
2079if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2080  echo $ac_n "(cached) $ac_c" 1>&6
2081else
2082  cat > conftest.$ac_ext <<EOF
2083#line 2084 "configure"
2084#include "confdefs.h"
2085/* System header to define __stub macros and hopefully few prototypes,
2086    which can conflict with char $ac_func(); below.  */
2087#include <assert.h>
2088/* Override any gcc2 internal prototype to avoid an error.  */
2089/* We use char because int might match the return type of a gcc2
2090    builtin and then its argument prototype would still apply.  */
2091char $ac_func();
2092
2093int main() {
2094
2095/* The GNU C library defines this for functions which it implements
2096    to always fail with ENOSYS.  Some functions are actually named
2097    something starting with __ and the normal name is an alias.  */
2098#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2099choke me
2100#else
2101$ac_func();
2102#endif
2103
2104; return 0; }
2105EOF
2106if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2107  rm -rf conftest*
2108  eval "ac_cv_func_$ac_func=yes"
2109else
2110  echo "configure: failed program was:" >&5
2111  cat conftest.$ac_ext >&5
2112  rm -rf conftest*
2113  eval "ac_cv_func_$ac_func=no"
2114fi
2115rm -f conftest*
2116fi
2117
2118if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2119  echo "$ac_t""yes" 1>&6
2120    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2121  cat >> confdefs.h <<EOF
2122#define $ac_tr_func 1
2123EOF
2124
2125else
2126  echo "$ac_t""no" 1>&6
2127fi
2128done
2129
2130
2131cat >> confdefs.h <<\EOF
2132#define HAVE_STRCHR 1
2133EOF
2134
2135cat >> confdefs.h <<\EOF
2136#define HAVE_MEMCHR 1
2137EOF
2138
2139
2140cat >> confdefs.h <<\EOF
2141#define REGEX_MALLOC 1
2142EOF
2143
2144cat >> confdefs.h <<\EOF
2145#define _REGEX_RE_COMP 1
2146EOF
2147
2148ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
2149echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
2150echo "configure:2151: checking for vfork.h" >&5
2151if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2152  echo $ac_n "(cached) $ac_c" 1>&6
2153else
2154  cat > conftest.$ac_ext <<EOF
2155#line 2156 "configure"
2156#include "confdefs.h"
2157#include <vfork.h>
2158EOF
2159ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2160{ (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2161ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2162if test -z "$ac_err"; then
2163  rm -rf conftest*
2164  eval "ac_cv_header_$ac_safe=yes"
2165else
2166  echo "$ac_err" >&5
2167  echo "configure: failed program was:" >&5
2168  cat conftest.$ac_ext >&5
2169  rm -rf conftest*
2170  eval "ac_cv_header_$ac_safe=no"
2171fi
2172rm -f conftest*
2173fi
2174if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2175  echo "$ac_t""yes" 1>&6
2176  cat >> confdefs.h <<\EOF
2177#define HAVE_VFORK_H 1
2178EOF
2179
2180else
2181  echo "$ac_t""no" 1>&6
2182fi
2183
2184echo $ac_n "checking for working vfork""... $ac_c" 1>&6
2185echo "configure:2186: checking for working vfork" >&5
2186if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
2187  echo $ac_n "(cached) $ac_c" 1>&6
2188else
2189  if test "$cross_compiling" = yes; then
2190  echo $ac_n "checking for vfork""... $ac_c" 1>&6
2191echo "configure:2192: checking for vfork" >&5
2192if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2193  echo $ac_n "(cached) $ac_c" 1>&6
2194else
2195  cat > conftest.$ac_ext <<EOF
2196#line 2197 "configure"
2197#include "confdefs.h"
2198/* System header to define __stub macros and hopefully few prototypes,
2199    which can conflict with char vfork(); below.  */
2200#include <assert.h>
2201/* Override any gcc2 internal prototype to avoid an error.  */
2202/* We use char because int might match the return type of a gcc2
2203    builtin and then its argument prototype would still apply.  */
2204char vfork();
2205
2206int main() {
2207
2208/* The GNU C library defines this for functions which it implements
2209    to always fail with ENOSYS.  Some functions are actually named
2210    something starting with __ and the normal name is an alias.  */
2211#if defined (__stub_vfork) || defined (__stub___vfork)
2212choke me
2213#else
2214vfork();
2215#endif
2216
2217; return 0; }
2218EOF
2219if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2220  rm -rf conftest*
2221  eval "ac_cv_func_vfork=yes"
2222else
2223  echo "configure: failed program was:" >&5
2224  cat conftest.$ac_ext >&5
2225  rm -rf conftest*
2226  eval "ac_cv_func_vfork=no"
2227fi
2228rm -f conftest*
2229fi
2230
2231if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
2232  echo "$ac_t""yes" 1>&6
2233  :
2234else
2235  echo "$ac_t""no" 1>&6
2236fi
2237
2238ac_cv_func_vfork_works=$ac_cv_func_vfork
2239else
2240  cat > conftest.$ac_ext <<EOF
2241#line 2242 "configure"
2242#include "confdefs.h"
2243/* Thanks to Paul Eggert for this test.  */
2244#include <stdio.h>
2245#include <sys/types.h>
2246#include <sys/stat.h>
2247#ifdef HAVE_UNISTD_H
2248#include <unistd.h>
2249#endif
2250#ifdef HAVE_VFORK_H
2251#include <vfork.h>
2252#endif
2253/* On some sparc systems, changes by the child to local and incoming
2254   argument registers are propagated back to the parent.
2255   The compiler is told about this with #include <vfork.h>,
2256   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
2257   Test for this by using a static variable whose address
2258   is put into a register that is clobbered by the vfork.  */
2259static
2260#ifdef __cplusplus
2261sparc_address_test (int arg)
2262#else
2263sparc_address_test (arg) int arg;
2264#endif
2265{
2266  static pid_t child;
2267  if (!child) {
2268    child = vfork ();
2269    if (child < 0) {
2270      perror ("vfork");
2271      _exit(2);
2272    }
2273    if (!child) {
2274      arg = getpid();
2275      write(-1, "", 0);
2276      _exit (arg);
2277    }
2278  }
2279}
2280main() {
2281  pid_t parent = getpid ();
2282  pid_t child;
2283
2284  sparc_address_test ();
2285
2286  child = vfork ();
2287
2288  if (child == 0) {
2289    /* Here is another test for sparc vfork register problems.
2290       This test uses lots of local variables, at least
2291       as many local variables as main has allocated so far
2292       including compiler temporaries.  4 locals are enough for
2293       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
2294       A buggy compiler should reuse the register of parent
2295       for one of the local variables, since it will think that
2296       parent can't possibly be used any more in this routine.
2297       Assigning to the local variable will thus munge parent
2298       in the parent process.  */
2299    pid_t
2300      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
2301      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
2302    /* Convince the compiler that p..p7 are live; otherwise, it might
2303       use the same hardware register for all 8 local variables.  */
2304    if (p != p1 || p != p2 || p != p3 || p != p4
2305	|| p != p5 || p != p6 || p != p7)
2306      _exit(1);
2307
2308    /* On some systems (e.g. IRIX 3.3),
2309       vfork doesn't separate parent from child file descriptors.
2310       If the child closes a descriptor before it execs or exits,
2311       this munges the parent's descriptor as well.
2312       Test for this by closing stdout in the child.  */
2313    _exit(close(fileno(stdout)) != 0);
2314  } else {
2315    int status;
2316    struct stat st;
2317
2318    while (wait(&status) != child)
2319      ;
2320    exit(
2321	 /* Was there some problem with vforking?  */
2322	 child < 0
2323
2324	 /* Did the child fail?  (This shouldn't happen.)  */
2325	 || status
2326
2327	 /* Did the vfork/compiler bug occur?  */
2328	 || parent != getpid()
2329
2330	 /* Did the file descriptor bug occur?  */
2331	 || fstat(fileno(stdout), &st) != 0
2332	 );
2333  }
2334}
2335EOF
2336if { (eval echo configure:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2337then
2338  ac_cv_func_vfork_works=yes
2339else
2340  echo "configure: failed program was:" >&5
2341  cat conftest.$ac_ext >&5
2342  rm -fr conftest*
2343  ac_cv_func_vfork_works=no
2344fi
2345rm -fr conftest*
2346fi
2347
2348fi
2349
2350echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
2351if test $ac_cv_func_vfork_works = no; then
2352  cat >> confdefs.h <<\EOF
2353#define vfork fork
2354EOF
2355
2356fi
2357
2358echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
2359echo "configure:2360: checking whether closedir returns void" >&5
2360if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
2361  echo $ac_n "(cached) $ac_c" 1>&6
2362else
2363  if test "$cross_compiling" = yes; then
2364  ac_cv_func_closedir_void=yes
2365else
2366  cat > conftest.$ac_ext <<EOF
2367#line 2368 "configure"
2368#include "confdefs.h"
2369#include <sys/types.h>
2370#include <$ac_header_dirent>
2371int closedir(); main() { exit(closedir(opendir(".")) != 0); }
2372EOF
2373if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2374then
2375  ac_cv_func_closedir_void=no
2376else
2377  echo "configure: failed program was:" >&5
2378  cat conftest.$ac_ext >&5
2379  rm -fr conftest*
2380  ac_cv_func_closedir_void=yes
2381fi
2382rm -fr conftest*
2383fi
2384
2385fi
2386
2387echo "$ac_t""$ac_cv_func_closedir_void" 1>&6
2388if test $ac_cv_func_closedir_void = yes; then
2389  cat >> confdefs.h <<\EOF
2390#define CLOSEDIR_VOID 1
2391EOF
2392
2393fi
2394
2395
2396
2397echo $ac_n "checking for library containing getspnam""... $ac_c" 1>&6
2398echo "configure:2399: checking for library containing getspnam" >&5
2399if eval "test \"`echo '$''{'ac_cv_search_getspnam'+set}'`\" = set"; then
2400  echo $ac_n "(cached) $ac_c" 1>&6
2401else
2402  ac_func_search_save_LIBS="$LIBS"
2403ac_cv_search_getspnam="no"
2404cat > conftest.$ac_ext <<EOF
2405#line 2406 "configure"
2406#include "confdefs.h"
2407/* Override any gcc2 internal prototype to avoid an error.  */
2408/* We use char because int might match the return type of a gcc2
2409    builtin and then its argument prototype would still apply.  */
2410char getspnam();
2411
2412int main() {
2413getspnam()
2414; return 0; }
2415EOF
2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2417  rm -rf conftest*
2418  ac_cv_search_getspnam="none required"
2419else
2420  echo "configure: failed program was:" >&5
2421  cat conftest.$ac_ext >&5
2422fi
2423rm -f conftest*
2424test "$ac_cv_search_getspnam" = "no" && for i in sec gen; do
2425LIBS="-l$i  $ac_func_search_save_LIBS"
2426cat > conftest.$ac_ext <<EOF
2427#line 2428 "configure"
2428#include "confdefs.h"
2429/* Override any gcc2 internal prototype to avoid an error.  */
2430/* We use char because int might match the return type of a gcc2
2431    builtin and then its argument prototype would still apply.  */
2432char getspnam();
2433
2434int main() {
2435getspnam()
2436; return 0; }
2437EOF
2438if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2439  rm -rf conftest*
2440  ac_cv_search_getspnam="-l$i"
2441break
2442else
2443  echo "configure: failed program was:" >&5
2444  cat conftest.$ac_ext >&5
2445fi
2446rm -f conftest*
2447done
2448LIBS="$ac_func_search_save_LIBS"
2449fi
2450
2451echo "$ac_t""$ac_cv_search_getspnam" 1>&6
2452if test "$ac_cv_search_getspnam" != "no"; then
2453  test "$ac_cv_search_getspnam" = "none required" || LIBS="$ac_cv_search_getspnam $LIBS"
2454  cat >> confdefs.h <<\EOF
2455#define HAVE_GETSPNAM 1
2456EOF
2457
2458else :
2459
2460fi
2461
2462echo $ac_n "checking for zlibVersion in -lz""... $ac_c" 1>&6
2463echo "configure:2464: checking for zlibVersion in -lz" >&5
2464ac_lib_var=`echo z'_'zlibVersion | sed 'y%./+-%__p_%'`
2465if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2466  echo $ac_n "(cached) $ac_c" 1>&6
2467else
2468  ac_save_LIBS="$LIBS"
2469LIBS="-lz  $LIBS"
2470cat > conftest.$ac_ext <<EOF
2471#line 2472 "configure"
2472#include "confdefs.h"
2473/* Override any gcc2 internal prototype to avoid an error.  */
2474/* We use char because int might match the return type of a gcc2
2475    builtin and then its argument prototype would still apply.  */
2476char zlibVersion();
2477
2478int main() {
2479zlibVersion()
2480; return 0; }
2481EOF
2482if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2483  rm -rf conftest*
2484  eval "ac_cv_lib_$ac_lib_var=yes"
2485else
2486  echo "configure: failed program was:" >&5
2487  cat conftest.$ac_ext >&5
2488  rm -rf conftest*
2489  eval "ac_cv_lib_$ac_lib_var=no"
2490fi
2491rm -f conftest*
2492LIBS="$ac_save_LIBS"
2493
2494fi
2495if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2496  echo "$ac_t""yes" 1>&6
2497  ZLIB=-lz
2498else
2499  echo "$ac_t""no" 1>&6
2500ZLIBSUBDIRS=zlib ZLIB=$srcdir/zlib/libz.a ZLIB_INCLUDES=-I$srcdir/zlib
2501fi
2502
2503
2504
2505
2506
2507echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
2508echo "configure:2509: checking whether utime accepts a null argument" >&5
2509if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
2510  echo $ac_n "(cached) $ac_c" 1>&6
2511else
2512  rm -f conftestdata; > conftestdata
2513# Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
2514if test "$cross_compiling" = yes; then
2515  ac_cv_func_utime_null=no
2516else
2517  cat > conftest.$ac_ext <<EOF
2518#line 2519 "configure"
2519#include "confdefs.h"
2520#include <sys/types.h>
2521#include <sys/stat.h>
2522main() {
2523struct stat s, t;
2524exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
2525&& stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
2526&& t.st_mtime - s.st_mtime < 120));
2527}
2528EOF
2529if { (eval echo configure:2530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2530then
2531  ac_cv_func_utime_null=yes
2532else
2533  echo "configure: failed program was:" >&5
2534  cat conftest.$ac_ext >&5
2535  rm -fr conftest*
2536  ac_cv_func_utime_null=no
2537fi
2538rm -fr conftest*
2539fi
2540
2541rm -f core core.* *.core
2542fi
2543
2544echo "$ac_t""$ac_cv_func_utime_null" 1>&6
2545if test $ac_cv_func_utime_null = yes; then
2546  cat >> confdefs.h <<\EOF
2547#define HAVE_UTIME_NULL 1
2548EOF
2549
2550fi
2551
2552echo $ac_n "checking for long file names""... $ac_c" 1>&6
2553echo "configure:2554: checking for long file names" >&5
2554if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
2555  echo $ac_n "(cached) $ac_c" 1>&6
2556else
2557  ac_cv_sys_long_file_names=yes
2558# Test for long file names in all the places we know might matter:
2559#      .		the current directory, where building will happen
2560#      $prefix/lib	where we will be installing things
2561#      $exec_prefix/lib	likewise
2562# eval it to expand exec_prefix.
2563#      $TMPDIR		if set, where it might want to write temporary files
2564# if $TMPDIR is not set:
2565#      /tmp		where it might want to write temporary files
2566#      /var/tmp		likewise
2567#      /usr/tmp		likewise
2568if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
2569  ac_tmpdirs="$TMPDIR"
2570else
2571  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
2572fi
2573for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
2574  test -d $ac_dir || continue
2575  test -w $ac_dir || continue # It is less confusing to not echo anything here.
2576  (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
2577  (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
2578  val=`cat $ac_dir/conftest9012345 2>/dev/null`
2579  if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
2580    ac_cv_sys_long_file_names=no
2581    rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2582    break
2583  fi
2584  rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
2585done
2586fi
2587
2588echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
2589if test $ac_cv_sys_long_file_names = yes; then
2590  cat >> confdefs.h <<\EOF
2591#define HAVE_LONG_FILE_NAMES 1
2592EOF
2593
2594fi
2595
2596
2597echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
2598echo "configure:2599: checking for working fnmatch" >&5
2599if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
2600  echo $ac_n "(cached) $ac_c" 1>&6
2601else
2602  # Some versions of Solaris or SCO have a broken fnmatch function.
2603# So we run a test program.  If we are cross-compiling, take no chance.
2604# Thanks to John Oleynick and Franc,ois Pinard for this test.
2605if test "$cross_compiling" = yes; then
2606  ac_cv_func_fnmatch_works=no
2607else
2608  cat > conftest.$ac_ext <<EOF
2609#line 2610 "configure"
2610#include "confdefs.h"
2611main() { exit (fnmatch ("a*", "abc", 0) != 0); }
2612EOF
2613if { (eval echo configure:2614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2614then
2615  ac_cv_func_fnmatch_works=yes
2616else
2617  echo "configure: failed program was:" >&5
2618  cat conftest.$ac_ext >&5
2619  rm -fr conftest*
2620  ac_cv_func_fnmatch_works=no
2621fi
2622rm -fr conftest*
2623fi
2624
2625fi
2626
2627echo "$ac_t""$ac_cv_func_fnmatch_works" 1>&6
2628if test $ac_cv_func_fnmatch_works = yes; then
2629  cat >> confdefs.h <<\EOF
2630#define HAVE_FNMATCH 1
2631EOF
2632
2633fi
2634
2635if test "$ac_cv_func_fnmatch_works" = no; then
2636  LIBOBJS="$LIBOBJS fnmatch.o"
2637fi
2638
2639# Try to find connect and gethostbyname.
2640echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
2641echo "configure:2642: checking for main in -lnsl" >&5
2642ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
2643if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2644  echo $ac_n "(cached) $ac_c" 1>&6
2645else
2646  ac_save_LIBS="$LIBS"
2647LIBS="-lnsl  $LIBS"
2648cat > conftest.$ac_ext <<EOF
2649#line 2650 "configure"
2650#include "confdefs.h"
2651
2652int main() {
2653main()
2654; return 0; }
2655EOF
2656if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2657  rm -rf conftest*
2658  eval "ac_cv_lib_$ac_lib_var=yes"
2659else
2660  echo "configure: failed program was:" >&5
2661  cat conftest.$ac_ext >&5
2662  rm -rf conftest*
2663  eval "ac_cv_lib_$ac_lib_var=no"
2664fi
2665rm -f conftest*
2666LIBS="$ac_save_LIBS"
2667
2668fi
2669if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2670  echo "$ac_t""yes" 1>&6
2671
2672echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
2673echo "configure:2674: checking for library containing connect" >&5
2674if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then
2675  echo $ac_n "(cached) $ac_c" 1>&6
2676else
2677  ac_func_search_save_LIBS="$LIBS"
2678ac_cv_search_connect="no"
2679cat > conftest.$ac_ext <<EOF
2680#line 2681 "configure"
2681#include "confdefs.h"
2682/* Override any gcc2 internal prototype to avoid an error.  */
2683/* We use char because int might match the return type of a gcc2
2684    builtin and then its argument prototype would still apply.  */
2685char connect();
2686
2687int main() {
2688connect()
2689; return 0; }
2690EOF
2691if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2692  rm -rf conftest*
2693  ac_cv_search_connect="none required"
2694else
2695  echo "configure: failed program was:" >&5
2696  cat conftest.$ac_ext >&5
2697fi
2698rm -f conftest*
2699test "$ac_cv_search_connect" = "no" && for i in xnet socket inet; do
2700LIBS="-l$i -lnsl $ac_func_search_save_LIBS"
2701cat > conftest.$ac_ext <<EOF
2702#line 2703 "configure"
2703#include "confdefs.h"
2704/* Override any gcc2 internal prototype to avoid an error.  */
2705/* We use char because int might match the return type of a gcc2
2706    builtin and then its argument prototype would still apply.  */
2707char connect();
2708
2709int main() {
2710connect()
2711; return 0; }
2712EOF
2713if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2714  rm -rf conftest*
2715  ac_cv_search_connect="-l$i"
2716break
2717else
2718  echo "configure: failed program was:" >&5
2719  cat conftest.$ac_ext >&5
2720fi
2721rm -f conftest*
2722done
2723LIBS="$ac_func_search_save_LIBS"
2724fi
2725
2726echo "$ac_t""$ac_cv_search_connect" 1>&6
2727if test "$ac_cv_search_connect" != "no"; then
2728  test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS"
2729  cat >> confdefs.h <<\EOF
2730#define HAVE_CONNECT 1
2731EOF
2732
2733else :
2734
2735fi
2736else
2737  echo "$ac_t""no" 1>&6
2738
2739echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
2740echo "configure:2741: checking for library containing connect" >&5
2741if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then
2742  echo $ac_n "(cached) $ac_c" 1>&6
2743else
2744  ac_func_search_save_LIBS="$LIBS"
2745ac_cv_search_connect="no"
2746cat > conftest.$ac_ext <<EOF
2747#line 2748 "configure"
2748#include "confdefs.h"
2749/* Override any gcc2 internal prototype to avoid an error.  */
2750/* We use char because int might match the return type of a gcc2
2751    builtin and then its argument prototype would still apply.  */
2752char connect();
2753
2754int main() {
2755connect()
2756; return 0; }
2757EOF
2758if { (eval echo configure:2759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2759  rm -rf conftest*
2760  ac_cv_search_connect="none required"
2761else
2762  echo "configure: failed program was:" >&5
2763  cat conftest.$ac_ext >&5
2764fi
2765rm -f conftest*
2766test "$ac_cv_search_connect" = "no" && for i in xnet socket inet; do
2767LIBS="-l$i  $ac_func_search_save_LIBS"
2768cat > conftest.$ac_ext <<EOF
2769#line 2770 "configure"
2770#include "confdefs.h"
2771/* Override any gcc2 internal prototype to avoid an error.  */
2772/* We use char because int might match the return type of a gcc2
2773    builtin and then its argument prototype would still apply.  */
2774char connect();
2775
2776int main() {
2777connect()
2778; return 0; }
2779EOF
2780if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2781  rm -rf conftest*
2782  ac_cv_search_connect="-l$i"
2783break
2784else
2785  echo "configure: failed program was:" >&5
2786  cat conftest.$ac_ext >&5
2787fi
2788rm -f conftest*
2789done
2790LIBS="$ac_func_search_save_LIBS"
2791fi
2792
2793echo "$ac_t""$ac_cv_search_connect" 1>&6
2794if test "$ac_cv_search_connect" != "no"; then
2795  test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS"
2796  cat >> confdefs.h <<\EOF
2797#define HAVE_CONNECT 1
2798EOF
2799
2800else :
2801
2802fi
2803fi
2804
2805
2806echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
2807echo "configure:2808: checking for library containing gethostbyname" >&5
2808if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
2809  echo $ac_n "(cached) $ac_c" 1>&6
2810else
2811  ac_func_search_save_LIBS="$LIBS"
2812ac_cv_search_gethostbyname="no"
2813cat > conftest.$ac_ext <<EOF
2814#line 2815 "configure"
2815#include "confdefs.h"
2816/* Override any gcc2 internal prototype to avoid an error.  */
2817/* We use char because int might match the return type of a gcc2
2818    builtin and then its argument prototype would still apply.  */
2819char gethostbyname();
2820
2821int main() {
2822gethostbyname()
2823; return 0; }
2824EOF
2825if { (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2826  rm -rf conftest*
2827  ac_cv_search_gethostbyname="none required"
2828else
2829  echo "configure: failed program was:" >&5
2830  cat conftest.$ac_ext >&5
2831fi
2832rm -f conftest*
2833test "$ac_cv_search_gethostbyname" = "no" && for i in netinet nsl; do
2834LIBS="-l$i  $ac_func_search_save_LIBS"
2835cat > conftest.$ac_ext <<EOF
2836#line 2837 "configure"
2837#include "confdefs.h"
2838/* Override any gcc2 internal prototype to avoid an error.  */
2839/* We use char because int might match the return type of a gcc2
2840    builtin and then its argument prototype would still apply.  */
2841char gethostbyname();
2842
2843int main() {
2844gethostbyname()
2845; return 0; }
2846EOF
2847if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2848  rm -rf conftest*
2849  ac_cv_search_gethostbyname="-l$i"
2850break
2851else
2852  echo "configure: failed program was:" >&5
2853  cat conftest.$ac_ext >&5
2854fi
2855rm -f conftest*
2856done
2857LIBS="$ac_func_search_save_LIBS"
2858fi
2859
2860echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
2861if test "$ac_cv_search_gethostbyname" != "no"; then
2862  test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
2863
2864else :
2865
2866fi
2867
2868KRB4=/usr/kerberos
2869
2870# Check whether --with-krb4 or --without-krb4 was given.
2871if test "${with_krb4+set}" = set; then
2872  withval="$with_krb4"
2873  KRB4=$withval
2874fi
2875echo "default place for krb4 is $KRB4"
2876
2877
2878krb_h=
2879echo $ac_n "checking for krb.h""... $ac_c" 1>&6
2880echo "configure:2881: checking for krb.h" >&5
2881if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
2882   hold_cflags=$CFLAGS
2883   CFLAGS="$CFLAGS -I$KRB4/include"
2884   cat > conftest.$ac_ext <<EOF
2885#line 2886 "configure"
2886#include "confdefs.h"
2887#include <krb.h>
2888int main() {
2889int i;
2890; return 0; }
2891EOF
2892if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2893  rm -rf conftest*
2894  krb_h=yes krb_incdir=$KRB4/include
2895else
2896  echo "configure: failed program was:" >&5
2897  cat conftest.$ac_ext >&5
2898  rm -rf conftest*
2899  CFLAGS=$hold_cflags
2900           cat > conftest.$ac_ext <<EOF
2901#line 2902 "configure"
2902#include "confdefs.h"
2903#include <krb.h>
2904int main() {
2905int i;
2906; return 0; }
2907EOF
2908if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2909  rm -rf conftest*
2910  krb_h=yes krb_incdir=
2911else
2912  echo "configure: failed program was:" >&5
2913  cat conftest.$ac_ext >&5
2914fi
2915rm -f conftest*
2916fi
2917rm -f conftest*
2918   CFLAGS=$hold_cflags
2919else
2920   cat > conftest.$ac_ext <<EOF
2921#line 2922 "configure"
2922#include "confdefs.h"
2923#include <krb.h>
2924int main() {
2925int i;
2926; return 0; }
2927EOF
2928if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2929  rm -rf conftest*
2930  krb_h=yes krb_incdir=
2931else
2932  echo "configure: failed program was:" >&5
2933  cat conftest.$ac_ext >&5
2934fi
2935rm -f conftest*
2936fi
2937if test -z "$krb_h"; then
2938  cat > conftest.$ac_ext <<EOF
2939#line 2940 "configure"
2940#include "confdefs.h"
2941#include <krb.h>
2942int main() {
2943int i;
2944; return 0; }
2945EOF
2946if { (eval echo configure:2947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2947  rm -rf conftest*
2948  krb_h=yes krb_incdir=
2949else
2950  echo "configure: failed program was:" >&5
2951  cat conftest.$ac_ext >&5
2952  rm -rf conftest*
2953  if test "$cross_compiling" != yes && test -r $KRB4/include/kerberosIV/krb.h; then
2954       hold_cflags=$CFLAGS
2955       CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
2956       cat > conftest.$ac_ext <<EOF
2957#line 2958 "configure"
2958#include "confdefs.h"
2959#include <krb.h>
2960int main() {
2961int i;
2962; return 0; }
2963EOF
2964if { (eval echo configure:2965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2965  rm -rf conftest*
2966  krb_h=yes krb_incdir=$KRB4/include/kerberosIV
2967else
2968  echo "configure: failed program was:" >&5
2969  cat conftest.$ac_ext >&5
2970fi
2971rm -f conftest*
2972       CFLAGS=$hold_cflags
2973     fi
2974fi
2975rm -f conftest*
2976fi
2977echo "$ac_t""$krb_h" 1>&6
2978
2979includeopt=
2980
2981if test -n "$krb_h"; then
2982  krb_lib=
2983  if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
2984       hold_ldflags=$LDFLAGS
2985       LDFLAGS="-L${KRB4}/lib $LDFLAGS"
2986       echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6
2987echo "configure:2988: checking for printf in -lkrb" >&5
2988ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'`
2989if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2990  echo $ac_n "(cached) $ac_c" 1>&6
2991else
2992  ac_save_LIBS="$LIBS"
2993LIBS="-lkrb  $LIBS"
2994cat > conftest.$ac_ext <<EOF
2995#line 2996 "configure"
2996#include "confdefs.h"
2997/* Override any gcc2 internal prototype to avoid an error.  */
2998/* We use char because int might match the return type of a gcc2
2999    builtin and then its argument prototype would still apply.  */
3000char printf();
3001
3002int main() {
3003printf()
3004; return 0; }
3005EOF
3006if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3007  rm -rf conftest*
3008  eval "ac_cv_lib_$ac_lib_var=yes"
3009else
3010  echo "configure: failed program was:" >&5
3011  cat conftest.$ac_ext >&5
3012  rm -rf conftest*
3013  eval "ac_cv_lib_$ac_lib_var=no"
3014fi
3015rm -f conftest*
3016LIBS="$ac_save_LIBS"
3017
3018fi
3019if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3020  echo "$ac_t""yes" 1>&6
3021  krb_lib=yes krb_libdir=${KRB4}/lib
3022else
3023  echo "$ac_t""no" 1>&6
3024LDFLAGS=$hold_ldflags
3025            # Using open here instead of printf so we don't
3026            # get confused by the cached value for printf from above.
3027            echo $ac_n "checking for open in -lkrb""... $ac_c" 1>&6
3028echo "configure:3029: checking for open in -lkrb" >&5
3029ac_lib_var=`echo krb'_'open | sed 'y%./+-%__p_%'`
3030if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3031  echo $ac_n "(cached) $ac_c" 1>&6
3032else
3033  ac_save_LIBS="$LIBS"
3034LIBS="-lkrb  $LIBS"
3035cat > conftest.$ac_ext <<EOF
3036#line 3037 "configure"
3037#include "confdefs.h"
3038/* Override any gcc2 internal prototype to avoid an error.  */
3039/* We use char because int might match the return type of a gcc2
3040    builtin and then its argument prototype would still apply.  */
3041char open();
3042
3043int main() {
3044open()
3045; return 0; }
3046EOF
3047if { (eval echo configure:3048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3048  rm -rf conftest*
3049  eval "ac_cv_lib_$ac_lib_var=yes"
3050else
3051  echo "configure: failed program was:" >&5
3052  cat conftest.$ac_ext >&5
3053  rm -rf conftest*
3054  eval "ac_cv_lib_$ac_lib_var=no"
3055fi
3056rm -f conftest*
3057LIBS="$ac_save_LIBS"
3058
3059fi
3060if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3061  echo "$ac_t""yes" 1>&6
3062  krb_lib=yes krb_libdir=
3063else
3064  echo "$ac_t""no" 1>&6
3065fi
3066
3067fi
3068
3069       LDFLAGS=$hold_ldflags
3070  else
3071       echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6
3072echo "configure:3073: checking for printf in -lkrb" >&5
3073ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'`
3074if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3075  echo $ac_n "(cached) $ac_c" 1>&6
3076else
3077  ac_save_LIBS="$LIBS"
3078LIBS="-lkrb  $LIBS"
3079cat > conftest.$ac_ext <<EOF
3080#line 3081 "configure"
3081#include "confdefs.h"
3082/* Override any gcc2 internal prototype to avoid an error.  */
3083/* We use char because int might match the return type of a gcc2
3084    builtin and then its argument prototype would still apply.  */
3085char printf();
3086
3087int main() {
3088printf()
3089; return 0; }
3090EOF
3091if { (eval echo configure:3092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3092  rm -rf conftest*
3093  eval "ac_cv_lib_$ac_lib_var=yes"
3094else
3095  echo "configure: failed program was:" >&5
3096  cat conftest.$ac_ext >&5
3097  rm -rf conftest*
3098  eval "ac_cv_lib_$ac_lib_var=no"
3099fi
3100rm -f conftest*
3101LIBS="$ac_save_LIBS"
3102
3103fi
3104if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3105  echo "$ac_t""yes" 1>&6
3106  krb_lib=yes krb_libdir=
3107else
3108  echo "$ac_t""no" 1>&6
3109fi
3110
3111  fi
3112  if test -n "$krb_lib"; then
3113    cat >> confdefs.h <<\EOF
3114#define HAVE_KERBEROS 1
3115EOF
3116
3117    test -n "${krb_libdir}" && LIBS="${LIBS} -L${krb_libdir}"
3118    LIBS="${LIBS} -lkrb"
3119    # Put -L${krb_libdir} in LDFLAGS temporarily so that it appears before
3120    # -ldes in the command line.  Don't do it permanently so that we honor
3121    # the user's setting for LDFLAGS
3122    hold_ldflags=$LDFLAGS
3123    test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
3124    echo $ac_n "checking for printf in -ldes""... $ac_c" 1>&6
3125echo "configure:3126: checking for printf in -ldes" >&5
3126ac_lib_var=`echo des'_'printf | sed 'y%./+-%__p_%'`
3127if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3128  echo $ac_n "(cached) $ac_c" 1>&6
3129else
3130  ac_save_LIBS="$LIBS"
3131LIBS="-ldes  $LIBS"
3132cat > conftest.$ac_ext <<EOF
3133#line 3134 "configure"
3134#include "confdefs.h"
3135/* Override any gcc2 internal prototype to avoid an error.  */
3136/* We use char because int might match the return type of a gcc2
3137    builtin and then its argument prototype would still apply.  */
3138char printf();
3139
3140int main() {
3141printf()
3142; return 0; }
3143EOF
3144if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3145  rm -rf conftest*
3146  eval "ac_cv_lib_$ac_lib_var=yes"
3147else
3148  echo "configure: failed program was:" >&5
3149  cat conftest.$ac_ext >&5
3150  rm -rf conftest*
3151  eval "ac_cv_lib_$ac_lib_var=no"
3152fi
3153rm -f conftest*
3154LIBS="$ac_save_LIBS"
3155
3156fi
3157if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3158  echo "$ac_t""yes" 1>&6
3159  LIBS="${LIBS} -ldes"
3160else
3161  echo "$ac_t""no" 1>&6
3162fi
3163
3164    LDFLAGS=$hold_ldflags
3165    if test -n "$krb_incdir"; then
3166      includeopt="${includeopt} -I$krb_incdir"
3167    fi
3168  fi
3169fi
3170for ac_func in krb_get_err_text
3171do
3172echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3173echo "configure:3174: checking for $ac_func" >&5
3174if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3175  echo $ac_n "(cached) $ac_c" 1>&6
3176else
3177  cat > conftest.$ac_ext <<EOF
3178#line 3179 "configure"
3179#include "confdefs.h"
3180/* System header to define __stub macros and hopefully few prototypes,
3181    which can conflict with char $ac_func(); below.  */
3182#include <assert.h>
3183/* Override any gcc2 internal prototype to avoid an error.  */
3184/* We use char because int might match the return type of a gcc2
3185    builtin and then its argument prototype would still apply.  */
3186char $ac_func();
3187
3188int main() {
3189
3190/* The GNU C library defines this for functions which it implements
3191    to always fail with ENOSYS.  Some functions are actually named
3192    something starting with __ and the normal name is an alias.  */
3193#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3194choke me
3195#else
3196$ac_func();
3197#endif
3198
3199; return 0; }
3200EOF
3201if { (eval echo configure:3202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3202  rm -rf conftest*
3203  eval "ac_cv_func_$ac_func=yes"
3204else
3205  echo "configure: failed program was:" >&5
3206  cat conftest.$ac_ext >&5
3207  rm -rf conftest*
3208  eval "ac_cv_func_$ac_func=no"
3209fi
3210rm -f conftest*
3211fi
3212
3213if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3214  echo "$ac_t""yes" 1>&6
3215    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3216  cat >> confdefs.h <<EOF
3217#define $ac_tr_func 1
3218EOF
3219
3220else
3221  echo "$ac_t""no" 1>&6
3222fi
3223done
3224
3225
3226GSSAPI=/usr/cygnus/kerbnet
3227
3228# Check whether --with-gssapi or --without-gssapi was given.
3229if test "${with_gssapi+set}" = set; then
3230  withval="$with_gssapi"
3231  GSSAPI=$withval
3232fi
3233echo "default place for GSSAPI is $GSSAPI"
3234
3235
3236hold_cppflags=$CPPFLAGS
3237CPPFLAGS="$CPPFLAGS -I$GSSAPI/include/kerberosV "
3238for ac_hdr in krb5.h gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h
3239do
3240ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3241echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3242echo "configure:3243: checking for $ac_hdr" >&5
3243if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3244  echo $ac_n "(cached) $ac_c" 1>&6
3245else
3246  cat > conftest.$ac_ext <<EOF
3247#line 3248 "configure"
3248#include "confdefs.h"
3249#include <$ac_hdr>
3250EOF
3251ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3252{ (eval echo configure:3253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3253ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3254if test -z "$ac_err"; then
3255  rm -rf conftest*
3256  eval "ac_cv_header_$ac_safe=yes"
3257else
3258  echo "$ac_err" >&5
3259  echo "configure: failed program was:" >&5
3260  cat conftest.$ac_ext >&5
3261  rm -rf conftest*
3262  eval "ac_cv_header_$ac_safe=no"
3263fi
3264rm -f conftest*
3265fi
3266if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3267  echo "$ac_t""yes" 1>&6
3268    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3269  cat >> confdefs.h <<EOF
3270#define $ac_tr_hdr 1
3271EOF
3272
3273else
3274  echo "$ac_t""no" 1>&6
3275fi
3276done
3277
3278CPPFLAGS=$hold_cppflags
3279
3280if test "$ac_cv_header_krb5_h" = "yes" &&
3281   (test "$ac_cv_header_gssapi_h" = "yes" ||
3282    test "$ac_cv_header_gssapi_gssapi_h" = "yes"); then
3283  cat >> confdefs.h <<\EOF
3284#define HAVE_GSSAPI 1
3285EOF
3286
3287  includeopt="${includeopt} -I$GSSAPI/include/kerberosV"
3288  # FIXME: This is ugly, but these things don't seem to be standardized.
3289  if test "$ac_cv_header_gssapi_h" = "yes"; then
3290    LIBS="$LIBS -L$GSSAPI/lib -lgssapi -lkrb -lkrb5 -lasn1 -lcrypto -lcom_err -lkafs"
3291  else
3292    LIBS="$LIBS -L$GSSAPI/lib -lgssapi_krb5 -lkrb -lkrb5 -lcrypto -lcom_err -lkafs"
3293  fi
3294  save_CPPFLAGS=$CPPFLAGS
3295  CPPFLAGS="-I$GSSAPI/include/kerberosV $CPPFLAGS"
3296  if test "$ac_cv_header_gssapi_h" = "yes"; then
3297    cat > conftest.$ac_ext <<EOF
3298#line 3299 "configure"
3299#include "confdefs.h"
3300#include <gssapi.h>
3301EOF
3302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3303  egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
3304  rm -rf conftest*
3305  cat >> confdefs.h <<\EOF
3306#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
3307EOF
3308
3309fi
3310rm -f conftest*
3311
3312  else
3313    cat > conftest.$ac_ext <<EOF
3314#line 3315 "configure"
3315#include "confdefs.h"
3316#include <gssapi/gssapi.h>
3317EOF
3318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3319  egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
3320  rm -rf conftest*
3321  cat >> confdefs.h <<\EOF
3322#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
3323EOF
3324
3325fi
3326rm -f conftest*
3327
3328  fi
3329  CPPFLAGS=$save_CPPFLAGS
3330  # This is necessary on Irix 5.3, in order to link against libkrb5 --
3331  # there, an_to_ln.o refers to things defined only in -lgen.
3332  echo $ac_n "checking for compile in -lgen""... $ac_c" 1>&6
3333echo "configure:3334: checking for compile in -lgen" >&5
3334ac_lib_var=`echo gen'_'compile | sed 'y%./+-%__p_%'`
3335if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3336  echo $ac_n "(cached) $ac_c" 1>&6
3337else
3338  ac_save_LIBS="$LIBS"
3339LIBS="-lgen  $LIBS"
3340cat > conftest.$ac_ext <<EOF
3341#line 3342 "configure"
3342#include "confdefs.h"
3343/* Override any gcc2 internal prototype to avoid an error.  */
3344/* We use char because int might match the return type of a gcc2
3345    builtin and then its argument prototype would still apply.  */
3346char compile();
3347
3348int main() {
3349compile()
3350; return 0; }
3351EOF
3352if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3353  rm -rf conftest*
3354  eval "ac_cv_lib_$ac_lib_var=yes"
3355else
3356  echo "configure: failed program was:" >&5
3357  cat conftest.$ac_ext >&5
3358  rm -rf conftest*
3359  eval "ac_cv_lib_$ac_lib_var=no"
3360fi
3361rm -f conftest*
3362LIBS="$ac_save_LIBS"
3363
3364fi
3365if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3366  echo "$ac_t""yes" 1>&6
3367    ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3368    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3369  cat >> confdefs.h <<EOF
3370#define $ac_tr_lib 1
3371EOF
3372
3373  LIBS="-lgen $LIBS"
3374
3375else
3376  echo "$ac_t""no" 1>&6
3377fi
3378
3379fi
3380
3381# Check whether --enable-encryption or --disable-encryption was given.
3382if test "${enable_encryption+set}" = set; then
3383  enableval="$enable_encryption"
3384  case "${enableval}" in
3385    yes) encryption=true ;;
3386    no) encryption=false ;;
3387    *) { echo "configure: error: bad value ${enableval} for encryption option" 1>&2; exit 1; } ;;
3388   esac
3389else
3390  encryption=false
3391fi
3392
3393if test "$encryption" = "true"; then
3394  cat >> confdefs.h <<\EOF
3395#define ENCRYPTION 1
3396EOF
3397
3398fi
3399
3400echo $ac_n "checking for gethostname""... $ac_c" 1>&6
3401echo "configure:3402: checking for gethostname" >&5
3402if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
3403  echo $ac_n "(cached) $ac_c" 1>&6
3404else
3405  cat > conftest.$ac_ext <<EOF
3406#line 3407 "configure"
3407#include "confdefs.h"
3408/* System header to define __stub macros and hopefully few prototypes,
3409    which can conflict with char gethostname(); below.  */
3410#include <assert.h>
3411/* Override any gcc2 internal prototype to avoid an error.  */
3412/* We use char because int might match the return type of a gcc2
3413    builtin and then its argument prototype would still apply.  */
3414char gethostname();
3415
3416int main() {
3417
3418/* The GNU C library defines this for functions which it implements
3419    to always fail with ENOSYS.  Some functions are actually named
3420    something starting with __ and the normal name is an alias.  */
3421#if defined (__stub_gethostname) || defined (__stub___gethostname)
3422choke me
3423#else
3424gethostname();
3425#endif
3426
3427; return 0; }
3428EOF
3429if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3430  rm -rf conftest*
3431  eval "ac_cv_func_gethostname=yes"
3432else
3433  echo "configure: failed program was:" >&5
3434  cat conftest.$ac_ext >&5
3435  rm -rf conftest*
3436  eval "ac_cv_func_gethostname=no"
3437fi
3438rm -f conftest*
3439fi
3440
3441if eval "test \"`echo '$ac_cv_func_'gethostname`\" = yes"; then
3442  echo "$ac_t""yes" 1>&6
3443  :
3444else
3445  echo "$ac_t""no" 1>&6
3446LIBOBJS="$LIBOBJS hostname.o"
3447fi
3448
3449
3450# Check for options requesting client and server feature. If none are
3451# given and we have connect(), we want the full client & server arrangement.
3452# Check whether --enable-client or --disable-client was given.
3453if test "${enable_client+set}" = set; then
3454  enableval="$enable_client"
3455  if test "$enable_client" = yes; then
3456  cat >> confdefs.h <<\EOF
3457#define CLIENT_SUPPORT 1
3458EOF
3459
3460fi
3461else
3462  if test "$ac_cv_search_connect" != no; then
3463  cat >> confdefs.h <<\EOF
3464#define CLIENT_SUPPORT 1
3465EOF
3466
3467fi
3468fi
3469
3470# Check whether --enable-server or --disable-server was given.
3471if test "${enable_server+set}" = set; then
3472  enableval="$enable_server"
3473  if test "$enable_server" = yes; then
3474  cat >> confdefs.h <<\EOF
3475#define SERVER_SUPPORT 1
3476EOF
3477
3478fi
3479else
3480  if test "$ac_cv_search_connect" != no; then
3481  cat >> confdefs.h <<\EOF
3482#define SERVER_SUPPORT 1
3483EOF
3484
3485  enable_server=yes
3486fi
3487fi
3488
3489
3490### The auth server needs to be able to check passwords against passwd
3491### file entries, so we only #define AUTH_SERVER_SUPPORT if we can
3492### find the crypt function.
3493###
3494### We used to test for crypt in libc first, and only add -lcrypt if
3495### we couldn't find it, but that interacts badly with the cache
3496### variables, the 'unset' command isn't portable, and I'm not sure
3497### there's any harm in just testing for -lcrypt first.
3498###
3499### XXX OpenBSD has crypt in libc, but don't carry libcrypt.  However
3500### XXX it used to have libcrypt which means old systems that hasn't
3501### XXX explicitly removed libcrypt will establish dependencies on the
3502### XXX obsolete library.
3503
3504if test "$enable_server" = yes; then
3505for ac_func in crypt
3506do
3507echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3508echo "configure:3509: checking for $ac_func" >&5
3509if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3510  echo $ac_n "(cached) $ac_c" 1>&6
3511else
3512  cat > conftest.$ac_ext <<EOF
3513#line 3514 "configure"
3514#include "confdefs.h"
3515/* System header to define __stub macros and hopefully few prototypes,
3516    which can conflict with char $ac_func(); below.  */
3517#include <assert.h>
3518/* Override any gcc2 internal prototype to avoid an error.  */
3519/* We use char because int might match the return type of a gcc2
3520    builtin and then its argument prototype would still apply.  */
3521char $ac_func();
3522
3523int main() {
3524
3525/* The GNU C library defines this for functions which it implements
3526    to always fail with ENOSYS.  Some functions are actually named
3527    something starting with __ and the normal name is an alias.  */
3528#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3529choke me
3530#else
3531$ac_func();
3532#endif
3533
3534; return 0; }
3535EOF
3536if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3537  rm -rf conftest*
3538  eval "ac_cv_func_$ac_func=yes"
3539else
3540  echo "configure: failed program was:" >&5
3541  cat conftest.$ac_ext >&5
3542  rm -rf conftest*
3543  eval "ac_cv_func_$ac_func=no"
3544fi
3545rm -f conftest*
3546fi
3547
3548if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3549  echo "$ac_t""yes" 1>&6
3550    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3551  cat >> confdefs.h <<EOF
3552#define $ac_tr_func 1
3553EOF
3554
3555else
3556  echo "$ac_t""no" 1>&6
3557fi
3558done
3559
3560if test "$ac_cv_func_crypt" = no; then
3561echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
3562echo "configure:3563: checking for crypt in -lcrypt" >&5
3563ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3564if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3565  echo $ac_n "(cached) $ac_c" 1>&6
3566else
3567  ac_save_LIBS="$LIBS"
3568LIBS="-lcrypt  $LIBS"
3569cat > conftest.$ac_ext <<EOF
3570#line 3571 "configure"
3571#include "confdefs.h"
3572/* Override any gcc2 internal prototype to avoid an error.  */
3573/* We use char because int might match the return type of a gcc2
3574    builtin and then its argument prototype would still apply.  */
3575char crypt();
3576
3577int main() {
3578crypt()
3579; return 0; }
3580EOF
3581if { (eval echo configure:3582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3582  rm -rf conftest*
3583  eval "ac_cv_lib_$ac_lib_var=yes"
3584else
3585  echo "configure: failed program was:" >&5
3586  cat conftest.$ac_ext >&5
3587  rm -rf conftest*
3588  eval "ac_cv_lib_$ac_lib_var=no"
3589fi
3590rm -f conftest*
3591LIBS="$ac_save_LIBS"
3592
3593fi
3594if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3595  echo "$ac_t""yes" 1>&6
3596    ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3597    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3598  cat >> confdefs.h <<EOF
3599#define $ac_tr_lib 1
3600EOF
3601
3602  LIBS="-lcrypt $LIBS"
3603
3604else
3605  echo "$ac_t""no" 1>&6
3606fi
3607
3608for ac_func in crypt
3609do
3610echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3611echo "configure:3612: checking for $ac_func" >&5
3612if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3613  echo $ac_n "(cached) $ac_c" 1>&6
3614else
3615  cat > conftest.$ac_ext <<EOF
3616#line 3617 "configure"
3617#include "confdefs.h"
3618/* System header to define __stub macros and hopefully few prototypes,
3619    which can conflict with char $ac_func(); below.  */
3620#include <assert.h>
3621/* Override any gcc2 internal prototype to avoid an error.  */
3622/* We use char because int might match the return type of a gcc2
3623    builtin and then its argument prototype would still apply.  */
3624char $ac_func();
3625
3626int main() {
3627
3628/* The GNU C library defines this for functions which it implements
3629    to always fail with ENOSYS.  Some functions are actually named
3630    something starting with __ and the normal name is an alias.  */
3631#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3632choke me
3633#else
3634$ac_func();
3635#endif
3636
3637; return 0; }
3638EOF
3639if { (eval echo configure:3640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3640  rm -rf conftest*
3641  eval "ac_cv_func_$ac_func=yes"
3642else
3643  echo "configure: failed program was:" >&5
3644  cat conftest.$ac_ext >&5
3645  rm -rf conftest*
3646  eval "ac_cv_func_$ac_func=no"
3647fi
3648rm -f conftest*
3649fi
3650
3651if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3652  echo "$ac_t""yes" 1>&6
3653    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3654  cat >> confdefs.h <<EOF
3655#define $ac_tr_func 1
3656EOF
3657
3658else
3659  echo "$ac_t""no" 1>&6
3660fi
3661done
3662
3663fi
3664
3665if test "$ac_cv_func_crypt" = yes; then
3666  cat >> confdefs.h <<\EOF
3667#define AUTH_SERVER_SUPPORT 1
3668EOF
3669
3670fi
3671fi # enable_server
3672
3673
3674echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
3675echo "configure:3676: checking for cygwin32" >&5
3676if eval "test \"`echo '$''{'ccvs_cv_sys_cygwin32'+set}'`\" = set"; then
3677  echo $ac_n "(cached) $ac_c" 1>&6
3678else
3679  cat > conftest.$ac_ext <<EOF
3680#line 3681 "configure"
3681#include "confdefs.h"
3682
3683int main() {
3684return __CYGWIN32__;
3685; return 0; }
3686EOF
3687if { (eval echo configure:3688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3688  rm -rf conftest*
3689  ccvs_cv_sys_cygwin32=yes
3690else
3691  echo "configure: failed program was:" >&5
3692  cat conftest.$ac_ext >&5
3693  rm -rf conftest*
3694  ccvs_cv_sys_cygwin32=no
3695fi
3696rm -f conftest*
3697fi
3698
3699echo "$ac_t""$ccvs_cv_sys_cygwin32" 1>&6
3700if test $ccvs_cv_sys_cygwin32 = yes; then
3701  LIBOBJS="$LIBOBJS fncase.o"
3702  LIBS="$LIBS -ladvapi32"
3703
3704        cat >> confdefs.h <<\EOF
3705#define UTIME_EXPECTS_WRITABLE 1
3706EOF
3707
3708
3709      cat >> confdefs.h <<\EOF
3710#define USE_SETMODE_STDOUT 1
3711EOF
3712
3713  cat >> confdefs.h <<\EOF
3714#define HAVE_SETMODE 1
3715EOF
3716
3717fi
3718
3719test -f src/options.h && (
3720  echo "configure: warning: saving ./src/options.h in ./src/options.h-SAVED" 1>&2
3721  echo "configure: warning: You may wish to check that local options have not been lost." 1>&2
3722  echo "configure: warning: Do not re-run ./configure or ./config.status until you have...." 1>&2
3723  cp ./src/options.h ./src/options.h-SAVED
3724)
3725
3726trap '' 1 2 15
3727cat > confcache <<\EOF
3728# This file is a shell script that caches the results of configure
3729# tests run on this system so they can be shared between configure
3730# scripts and configure runs.  It is not useful on other systems.
3731# If it contains results you don't want to keep, you may remove or edit it.
3732#
3733# By default, configure uses ./config.cache as the cache file,
3734# creating it if it does not exist already.  You can give configure
3735# the --cache-file=FILE option to use a different cache file; that is
3736# what configure does when it calls configure scripts in
3737# subdirectories, so they share the cache.
3738# Giving --cache-file=/dev/null disables caching, for debugging configure.
3739# config.status only pays attention to the cache file if you give it the
3740# --recheck option to rerun configure.
3741#
3742EOF
3743# The following way of writing the cache mishandles newlines in values,
3744# but we know of no workaround that is simple, portable, and efficient.
3745# So, don't put newlines in cache variables' values.
3746# Ultrix sh set writes to stderr and can't be redirected directly,
3747# and sets the high bit in the cache file unless we assign to the vars.
3748(set) 2>&1 |
3749  case `(ac_space=' '; set | grep ac_space) 2>&1` in
3750  *ac_space=\ *)
3751    # `set' does not quote correctly, so add quotes (double-quote substitution
3752    # turns \\\\ into \\, and sed turns \\ into \).
3753    sed -n \
3754      -e "s/'/'\\\\''/g" \
3755      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3756    ;;
3757  *)
3758    # `set' quotes correctly as required by POSIX, so do not add quotes.
3759    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3760    ;;
3761  esac >> confcache
3762if cmp -s $cache_file confcache; then
3763  :
3764else
3765  if test -w $cache_file; then
3766    echo "updating cache $cache_file"
3767    cat confcache > $cache_file
3768  else
3769    echo "not updating unwritable cache $cache_file"
3770  fi
3771fi
3772rm -f confcache
3773
3774trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3775
3776test "x$prefix" = xNONE && prefix=$ac_default_prefix
3777# Let make expand exec_prefix.
3778test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3779
3780# Any assignment to VPATH causes Sun make to only execute
3781# the first set of double-colon rules, so remove it if not needed.
3782# If there is a colon in the path, we need to keep it.
3783if test "x$srcdir" = x.; then
3784  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
3785fi
3786
3787trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3788
3789DEFS=-DHAVE_CONFIG_H
3790
3791# Without the "./", some shells look in PATH for config.status.
3792: ${CONFIG_STATUS=./config.status}
3793
3794echo creating $CONFIG_STATUS
3795rm -f $CONFIG_STATUS
3796cat > $CONFIG_STATUS <<EOF
3797#! /bin/sh
3798# Generated automatically by configure.
3799# Run this file to recreate the current configuration.
3800# This directory was configured as follows,
3801# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3802#
3803# $0 $ac_configure_args
3804#
3805# Compiler output produced by configure, useful for debugging
3806# configure, is in ./config.log if it exists.
3807
3808ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3809for ac_option
3810do
3811  case "\$ac_option" in
3812  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3813    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3814    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3815  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3816    echo "$CONFIG_STATUS generated by autoconf version 2.13"
3817    exit 0 ;;
3818  -help | --help | --hel | --he | --h)
3819    echo "\$ac_cs_usage"; exit 0 ;;
3820  *) echo "\$ac_cs_usage"; exit 1 ;;
3821  esac
3822done
3823
3824ac_given_srcdir=$srcdir
3825ac_given_INSTALL="$INSTALL"
3826
3827trap 'rm -fr `echo "Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
3828	  man/Makefile tools/Makefile \
3829	  contrib/Makefile \
3830	  windows-NT/Makefile windows-NT/SCC/Makefile \
3831	  os2/Makefile emx/Makefile vms/Makefile \
3832	  stamp-h config.h src/options.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3833EOF
3834cat >> $CONFIG_STATUS <<EOF
3835
3836# Protect against being on the right side of a sed subst in config.status.
3837sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3838 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3839$ac_vpsub
3840$extrasub
3841s%@SHELL@%$SHELL%g
3842s%@CFLAGS@%$CFLAGS%g
3843s%@CPPFLAGS@%$CPPFLAGS%g
3844s%@CXXFLAGS@%$CXXFLAGS%g
3845s%@FFLAGS@%$FFLAGS%g
3846s%@DEFS@%$DEFS%g
3847s%@LDFLAGS@%$LDFLAGS%g
3848s%@LIBS@%$LIBS%g
3849s%@exec_prefix@%$exec_prefix%g
3850s%@prefix@%$prefix%g
3851s%@program_transform_name@%$program_transform_name%g
3852s%@bindir@%$bindir%g
3853s%@sbindir@%$sbindir%g
3854s%@libexecdir@%$libexecdir%g
3855s%@datadir@%$datadir%g
3856s%@sysconfdir@%$sysconfdir%g
3857s%@sharedstatedir@%$sharedstatedir%g
3858s%@localstatedir@%$localstatedir%g
3859s%@libdir@%$libdir%g
3860s%@includedir@%$includedir%g
3861s%@oldincludedir@%$oldincludedir%g
3862s%@infodir@%$infodir%g
3863s%@mandir@%$mandir%g
3864s%@CVS@%$CVS%g
3865s%@AWK@%$AWK%g
3866s%@CC@%$CC%g
3867s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3868s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3869s%@INSTALL_DATA@%$INSTALL_DATA%g
3870s%@SET_MAKE@%$SET_MAKE%g
3871s%@RANLIB@%$RANLIB%g
3872s%@YACC@%$YACC%g
3873s%@perl_path@%$perl_path%g
3874s%@csh_path@%$csh_path%g
3875s%@CPP@%$CPP%g
3876s%@LIBOBJS@%$LIBOBJS%g
3877s%@ZLIB@%$ZLIB%g
3878s%@ZLIBSUBDIRS@%$ZLIBSUBDIRS%g
3879s%@ZLIB_INCLUDES@%$ZLIB_INCLUDES%g
3880s%@KRB4@%$KRB4%g
3881s%@includeopt@%$includeopt%g
3882s%@GSSAPI@%$GSSAPI%g
3883
3884CEOF
3885EOF
3886
3887cat >> $CONFIG_STATUS <<\EOF
3888
3889# Split the substitutions into bite-sized pieces for seds with
3890# small command number limits, like on Digital OSF/1 and HP-UX.
3891ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3892ac_file=1 # Number of current file.
3893ac_beg=1 # First line for current file.
3894ac_end=$ac_max_sed_cmds # Line after last line for current file.
3895ac_more_lines=:
3896ac_sed_cmds=""
3897while $ac_more_lines; do
3898  if test $ac_beg -gt 1; then
3899    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3900  else
3901    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3902  fi
3903  if test ! -s conftest.s$ac_file; then
3904    ac_more_lines=false
3905    rm -f conftest.s$ac_file
3906  else
3907    if test -z "$ac_sed_cmds"; then
3908      ac_sed_cmds="sed -f conftest.s$ac_file"
3909    else
3910      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3911    fi
3912    ac_file=`expr $ac_file + 1`
3913    ac_beg=$ac_end
3914    ac_end=`expr $ac_end + $ac_max_sed_cmds`
3915  fi
3916done
3917if test -z "$ac_sed_cmds"; then
3918  ac_sed_cmds=cat
3919fi
3920EOF
3921
3922cat >> $CONFIG_STATUS <<EOF
3923
3924CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
3925	  man/Makefile tools/Makefile \
3926	  contrib/Makefile \
3927	  windows-NT/Makefile windows-NT/SCC/Makefile \
3928	  os2/Makefile emx/Makefile vms/Makefile \
3929	  stamp-h"}
3930EOF
3931cat >> $CONFIG_STATUS <<\EOF
3932for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3933  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3934  case "$ac_file" in
3935  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3936       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3937  *) ac_file_in="${ac_file}.in" ;;
3938  esac
3939
3940  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3941
3942  # Remove last slash and all that follows it.  Not all systems have dirname.
3943  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3944  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3945    # The file is in a subdirectory.
3946    test ! -d "$ac_dir" && mkdir "$ac_dir"
3947    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3948    # A "../" for each directory in $ac_dir_suffix.
3949    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3950  else
3951    ac_dir_suffix= ac_dots=
3952  fi
3953
3954  case "$ac_given_srcdir" in
3955  .)  srcdir=.
3956      if test -z "$ac_dots"; then top_srcdir=.
3957      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3958  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3959  *) # Relative path.
3960    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3961    top_srcdir="$ac_dots$ac_given_srcdir" ;;
3962  esac
3963
3964  case "$ac_given_INSTALL" in
3965  [/$]*) INSTALL="$ac_given_INSTALL" ;;
3966  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3967  esac
3968
3969  echo creating "$ac_file"
3970  rm -f "$ac_file"
3971  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3972  case "$ac_file" in
3973  *Makefile*) ac_comsub="1i\\
3974# $configure_input" ;;
3975  *) ac_comsub= ;;
3976  esac
3977
3978  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3979  sed -e "$ac_comsub
3980s%@configure_input@%$configure_input%g
3981s%@srcdir@%$srcdir%g
3982s%@top_srcdir@%$top_srcdir%g
3983s%@INSTALL@%$INSTALL%g
3984" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3985fi; done
3986rm -f conftest.s*
3987
3988# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3989# NAME is the cpp macro being defined and VALUE is the value it is being given.
3990#
3991# ac_d sets the value in "#define NAME VALUE" lines.
3992ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
3993ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
3994ac_dC='\3'
3995ac_dD='%g'
3996# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3997ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
3998ac_uB='\([ 	]\)%\1#\2define\3'
3999ac_uC=' '
4000ac_uD='\4%g'
4001# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4002ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
4003ac_eB='$%\1#\2define\3'
4004ac_eC=' '
4005ac_eD='%g'
4006
4007if test "${CONFIG_HEADERS+set}" != set; then
4008EOF
4009cat >> $CONFIG_STATUS <<EOF
4010  CONFIG_HEADERS="config.h src/options.h"
4011EOF
4012cat >> $CONFIG_STATUS <<\EOF
4013fi
4014for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4015  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4016  case "$ac_file" in
4017  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4018       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4019  *) ac_file_in="${ac_file}.in" ;;
4020  esac
4021
4022  echo creating $ac_file
4023
4024  rm -f conftest.frag conftest.in conftest.out
4025  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4026  cat $ac_file_inputs > conftest.in
4027
4028EOF
4029
4030# Transform confdefs.h into a sed script conftest.vals that substitutes
4031# the proper values into config.h.in to produce config.h.  And first:
4032# Protect against being on the right side of a sed subst in config.status.
4033# Protect against being in an unquoted here document in config.status.
4034rm -f conftest.vals
4035cat > conftest.hdr <<\EOF
4036s/[\\&%]/\\&/g
4037s%[\\$`]%\\&%g
4038s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4039s%ac_d%ac_u%gp
4040s%ac_u%ac_e%gp
4041EOF
4042sed -n -f conftest.hdr confdefs.h > conftest.vals
4043rm -f conftest.hdr
4044
4045# This sed command replaces #undef with comments.  This is necessary, for
4046# example, in the case of _POSIX_SOURCE, which is predefined and required
4047# on some systems where configure will not decide to define it.
4048cat >> conftest.vals <<\EOF
4049s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4050EOF
4051
4052# Break up conftest.vals because some shells have a limit on
4053# the size of here documents, and old seds have small limits too.
4054
4055rm -f conftest.tail
4056while :
4057do
4058  ac_lines=`grep -c . conftest.vals`
4059  # grep -c gives empty output for an empty file on some AIX systems.
4060  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4061  # Write a limited-size here document to conftest.frag.
4062  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4063  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4064  echo 'CEOF
4065  sed -f conftest.frag conftest.in > conftest.out
4066  rm -f conftest.in
4067  mv conftest.out conftest.in
4068' >> $CONFIG_STATUS
4069  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4070  rm -f conftest.vals
4071  mv conftest.tail conftest.vals
4072done
4073rm -f conftest.vals
4074
4075cat >> $CONFIG_STATUS <<\EOF
4076  rm -f conftest.frag conftest.h
4077  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4078  cat conftest.in >> conftest.h
4079  rm -f conftest.in
4080  if cmp -s $ac_file conftest.h 2>/dev/null; then
4081    echo "$ac_file is unchanged"
4082    rm -f conftest.h
4083  else
4084    # Remove last slash and all that follows it.  Not all systems have dirname.
4085      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4086      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4087      # The file is in a subdirectory.
4088      test ! -d "$ac_dir" && mkdir "$ac_dir"
4089    fi
4090    rm -f $ac_file
4091    mv conftest.h $ac_file
4092  fi
4093fi; done
4094
4095EOF
4096cat >> $CONFIG_STATUS <<EOF
4097
4098EOF
4099cat >> $CONFIG_STATUS <<\EOF
4100
4101exit 0
4102EOF
4103chmod +x $CONFIG_STATUS
4104rm -fr confdefs* $ac_clean_files
4105test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4106
4107