]> git.decadent.org.uk Git - nfs-utils.git/blob - configure
9732c28604a876bcc8ae17b2ee57a27d56e6f96d
[nfs-utils.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr
15 ac_help="$ac_help
16   --with-release=XXX      set release to XXX [1]"
17 ac_help="$ac_help
18   --with-statedir=/foo    use state dir /foo [/var/lib/nfs]"
19 ac_help="$ac_help
20   --with-statduser=rpcuser user for statd to run under [rpcuser or nobody]"
21 ac_help="$ac_help
22   --enable-nfsv3          enable support for NFSv3"
23 ac_help="$ac_help
24   --enable-nfsv4          enable support for NFSv4"
25 ac_help="$ac_help
26   --enable-gss           enable support for rpcsec_gss"
27 ac_help="$ac_help
28   --enable-kprefix       install progs as rpc.knfsd etc"
29 ac_help="$ac_help
30   --enable-secure-statd  Only lockd can use statd (security)"
31 ac_help="$ac_help
32   --enable-rquotad          enable rquotad"
33 ac_help="$ac_help
34   --with-krb5=DIR         use Kerberos v5 installation in DIR"
35
36 # Initialize some variables set by options.
37 # The variables have the same names as the options, with
38 # dashes changed to underlines.
39 build=NONE
40 cache_file=./config.cache
41 exec_prefix=NONE
42 host=NONE
43 no_create=
44 nonopt=NONE
45 no_recursion=
46 prefix=NONE
47 program_prefix=NONE
48 program_suffix=NONE
49 program_transform_name=s,x,x,
50 silent=
51 site=
52 srcdir=
53 target=NONE
54 verbose=
55 x_includes=NONE
56 x_libraries=NONE
57 bindir='${exec_prefix}/bin'
58 sbindir='${exec_prefix}/sbin'
59 libexecdir='${exec_prefix}/libexec'
60 datadir='${prefix}/share'
61 sysconfdir='${prefix}/etc'
62 sharedstatedir='${prefix}/com'
63 localstatedir='${prefix}/var'
64 libdir='${exec_prefix}/lib'
65 includedir='${prefix}/include'
66 oldincludedir='/usr/include'
67 infodir='${prefix}/info'
68 mandir='${prefix}/man'
69
70 # Initialize some other variables.
71 subdirs=
72 MFLAGS= MAKEFLAGS=
73 SHELL=${CONFIG_SHELL-/bin/sh}
74 # Maximum number of lines to put in a shell here document.
75 ac_max_here_lines=12
76
77 ac_prev=
78 for ac_option
79 do
80
81   # If the previous option needs an argument, assign it.
82   if test -n "$ac_prev"; then
83     eval "$ac_prev=\$ac_option"
84     ac_prev=
85     continue
86   fi
87
88   case "$ac_option" in
89   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
90   *) ac_optarg= ;;
91   esac
92
93   # Accept the important Cygnus configure options, so we can diagnose typos.
94
95   case "$ac_option" in
96
97   -bindir | --bindir | --bindi | --bind | --bin | --bi)
98     ac_prev=bindir ;;
99   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
100     bindir="$ac_optarg" ;;
101
102   -build | --build | --buil | --bui | --bu)
103     ac_prev=build ;;
104   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
105     build="$ac_optarg" ;;
106
107   -cache-file | --cache-file | --cache-fil | --cache-fi \
108   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
109     ac_prev=cache_file ;;
110   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
111   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
112     cache_file="$ac_optarg" ;;
113
114   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
115     ac_prev=datadir ;;
116   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
117   | --da=*)
118     datadir="$ac_optarg" ;;
119
120   -disable-* | --disable-*)
121     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
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     eval "enable_${ac_feature}=no" ;;
128
129   -enable-* | --enable-*)
130     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
131     # Reject names that are not valid shell variable names.
132     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
133       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
134     fi
135     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136     case "$ac_option" in
137       *=*) ;;
138       *) ac_optarg=yes ;;
139     esac
140     eval "enable_${ac_feature}='$ac_optarg'" ;;
141
142   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
143   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
144   | --exec | --exe | --ex)
145     ac_prev=exec_prefix ;;
146   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
147   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
148   | --exec=* | --exe=* | --ex=*)
149     exec_prefix="$ac_optarg" ;;
150
151   -gas | --gas | --ga | --g)
152     # Obsolete; use --with-gas.
153     with_gas=yes ;;
154
155   -help | --help | --hel | --he)
156     # Omit some internal or obsolete options to make the list less imposing.
157     # This message is too long to be a string in the A/UX 3.1 sh.
158     cat << EOF
159 Usage: configure [options] [host]
160 Options: [defaults in brackets after descriptions]
161 Configuration:
162   --cache-file=FILE       cache test results in FILE
163   --help                  print this message
164   --no-create             do not create output files
165   --quiet, --silent       do not print \`checking...' messages
166   --version               print the version of autoconf that created configure
167 Directory and file names:
168   --prefix=PREFIX         install architecture-independent files in PREFIX
169                           [$ac_default_prefix]
170   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
171                           [same as prefix]
172   --bindir=DIR            user executables in DIR [EPREFIX/bin]
173   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
174   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
175   --datadir=DIR           read-only architecture-independent data in DIR
176                           [PREFIX/share]
177   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
178   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
179                           [PREFIX/com]
180   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
181   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
182   --includedir=DIR        C header files in DIR [PREFIX/include]
183   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
184   --infodir=DIR           info documentation in DIR [PREFIX/info]
185   --mandir=DIR            man documentation in DIR [PREFIX/man]
186   --srcdir=DIR            find the sources in DIR [configure dir or ..]
187   --program-prefix=PREFIX prepend PREFIX to installed program names
188   --program-suffix=SUFFIX append SUFFIX to installed program names
189   --program-transform-name=PROGRAM
190                           run sed PROGRAM on installed program names
191 EOF
192     cat << EOF
193 Host type:
194   --build=BUILD           configure for building on BUILD [BUILD=HOST]
195   --host=HOST             configure for HOST [guessed]
196   --target=TARGET         configure for TARGET [TARGET=HOST]
197 Features and packages:
198   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
199   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
200   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
201   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
202   --x-includes=DIR        X include files are in DIR
203   --x-libraries=DIR       X library files are in DIR
204 EOF
205     if test -n "$ac_help"; then
206       echo "--enable and --with options recognized:$ac_help"
207     fi
208     exit 0 ;;
209
210   -host | --host | --hos | --ho)
211     ac_prev=host ;;
212   -host=* | --host=* | --hos=* | --ho=*)
213     host="$ac_optarg" ;;
214
215   -includedir | --includedir | --includedi | --included | --include \
216   | --includ | --inclu | --incl | --inc)
217     ac_prev=includedir ;;
218   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
219   | --includ=* | --inclu=* | --incl=* | --inc=*)
220     includedir="$ac_optarg" ;;
221
222   -infodir | --infodir | --infodi | --infod | --info | --inf)
223     ac_prev=infodir ;;
224   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
225     infodir="$ac_optarg" ;;
226
227   -libdir | --libdir | --libdi | --libd)
228     ac_prev=libdir ;;
229   -libdir=* | --libdir=* | --libdi=* | --libd=*)
230     libdir="$ac_optarg" ;;
231
232   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
233   | --libexe | --libex | --libe)
234     ac_prev=libexecdir ;;
235   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
236   | --libexe=* | --libex=* | --libe=*)
237     libexecdir="$ac_optarg" ;;
238
239   -localstatedir | --localstatedir | --localstatedi | --localstated \
240   | --localstate | --localstat | --localsta | --localst \
241   | --locals | --local | --loca | --loc | --lo)
242     ac_prev=localstatedir ;;
243   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
244   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
245   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
246     localstatedir="$ac_optarg" ;;
247
248   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
249     ac_prev=mandir ;;
250   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
251     mandir="$ac_optarg" ;;
252
253   -nfp | --nfp | --nf)
254     # Obsolete; use --without-fp.
255     with_fp=no ;;
256
257   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
258   | --no-cr | --no-c)
259     no_create=yes ;;
260
261   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
262   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
263     no_recursion=yes ;;
264
265   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
266   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
267   | --oldin | --oldi | --old | --ol | --o)
268     ac_prev=oldincludedir ;;
269   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
270   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
271   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
272     oldincludedir="$ac_optarg" ;;
273
274   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
275     ac_prev=prefix ;;
276   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
277     prefix="$ac_optarg" ;;
278
279   -program-prefix | --program-prefix | --program-prefi | --program-pref \
280   | --program-pre | --program-pr | --program-p)
281     ac_prev=program_prefix ;;
282   -program-prefix=* | --program-prefix=* | --program-prefi=* \
283   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
284     program_prefix="$ac_optarg" ;;
285
286   -program-suffix | --program-suffix | --program-suffi | --program-suff \
287   | --program-suf | --program-su | --program-s)
288     ac_prev=program_suffix ;;
289   -program-suffix=* | --program-suffix=* | --program-suffi=* \
290   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
291     program_suffix="$ac_optarg" ;;
292
293   -program-transform-name | --program-transform-name \
294   | --program-transform-nam | --program-transform-na \
295   | --program-transform-n | --program-transform- \
296   | --program-transform | --program-transfor \
297   | --program-transfo | --program-transf \
298   | --program-trans | --program-tran \
299   | --progr-tra | --program-tr | --program-t)
300     ac_prev=program_transform_name ;;
301   -program-transform-name=* | --program-transform-name=* \
302   | --program-transform-nam=* | --program-transform-na=* \
303   | --program-transform-n=* | --program-transform-=* \
304   | --program-transform=* | --program-transfor=* \
305   | --program-transfo=* | --program-transf=* \
306   | --program-trans=* | --program-tran=* \
307   | --progr-tra=* | --program-tr=* | --program-t=*)
308     program_transform_name="$ac_optarg" ;;
309
310   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
311   | -silent | --silent | --silen | --sile | --sil)
312     silent=yes ;;
313
314   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
315     ac_prev=sbindir ;;
316   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
317   | --sbi=* | --sb=*)
318     sbindir="$ac_optarg" ;;
319
320   -sharedstatedir | --sharedstatedir | --sharedstatedi \
321   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
322   | --sharedst | --shareds | --shared | --share | --shar \
323   | --sha | --sh)
324     ac_prev=sharedstatedir ;;
325   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
326   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
327   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
328   | --sha=* | --sh=*)
329     sharedstatedir="$ac_optarg" ;;
330
331   -site | --site | --sit)
332     ac_prev=site ;;
333   -site=* | --site=* | --sit=*)
334     site="$ac_optarg" ;;
335
336   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
337     ac_prev=srcdir ;;
338   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
339     srcdir="$ac_optarg" ;;
340
341   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
342   | --syscon | --sysco | --sysc | --sys | --sy)
343     ac_prev=sysconfdir ;;
344   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
345   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
346     sysconfdir="$ac_optarg" ;;
347
348   -target | --target | --targe | --targ | --tar | --ta | --t)
349     ac_prev=target ;;
350   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
351     target="$ac_optarg" ;;
352
353   -v | -verbose | --verbose | --verbos | --verbo | --verb)
354     verbose=yes ;;
355
356   -version | --version | --versio | --versi | --vers)
357     echo "configure generated by autoconf version 2.13"
358     exit 0 ;;
359
360   -with-* | --with-*)
361     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
362     # Reject names that are not valid shell variable names.
363     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
364       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
365     fi
366     ac_package=`echo $ac_package| sed 's/-/_/g'`
367     case "$ac_option" in
368       *=*) ;;
369       *) ac_optarg=yes ;;
370     esac
371     eval "with_${ac_package}='$ac_optarg'" ;;
372
373   -without-* | --without-*)
374     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
375     # Reject names that are not valid shell variable names.
376     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
377       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
378     fi
379     ac_package=`echo $ac_package| sed 's/-/_/g'`
380     eval "with_${ac_package}=no" ;;
381
382   --x)
383     # Obsolete; use --with-x.
384     with_x=yes ;;
385
386   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
387   | --x-incl | --x-inc | --x-in | --x-i)
388     ac_prev=x_includes ;;
389   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
390   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
391     x_includes="$ac_optarg" ;;
392
393   -x-libraries | --x-libraries | --x-librarie | --x-librari \
394   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
395     ac_prev=x_libraries ;;
396   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
397   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
398     x_libraries="$ac_optarg" ;;
399
400   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
401     ;;
402
403   *)
404     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
405       echo "configure: warning: $ac_option: invalid host type" 1>&2
406     fi
407     if test "x$nonopt" != xNONE; then
408       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
409     fi
410     nonopt="$ac_option"
411     ;;
412
413   esac
414 done
415
416 if test -n "$ac_prev"; then
417   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
418 fi
419
420 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
421
422 # File descriptor usage:
423 # 0 standard input
424 # 1 file creation
425 # 2 errors and warnings
426 # 3 some systems may open it to /dev/tty
427 # 4 used on the Kubota Titan
428 # 6 checking for... messages and results
429 # 5 compiler messages saved in config.log
430 if test "$silent" = yes; then
431   exec 6>/dev/null
432 else
433   exec 6>&1
434 fi
435 exec 5>./config.log
436
437 echo "\
438 This file contains any messages produced by compilers while
439 running configure, to aid debugging if configure makes a mistake.
440 " 1>&5
441
442 # Strip out --no-create and --no-recursion so they do not pile up.
443 # Also quote any args containing shell metacharacters.
444 ac_configure_args=
445 for ac_arg
446 do
447   case "$ac_arg" in
448   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
449   | --no-cr | --no-c) ;;
450   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
451   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
452   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
453   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
454   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
455   esac
456 done
457
458 # NLS nuisances.
459 # Only set these to C if already set.  These must not be set unconditionally
460 # because not all systems understand e.g. LANG=C (notably SCO).
461 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
462 # Non-C LC_CTYPE values break the ctype check.
463 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
464 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
465 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
466 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
467
468 # confdefs.h avoids OS command line length limits that DEFS can exceed.
469 rm -rf conftest* confdefs.h
470 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
471 echo > confdefs.h
472
473 # A filename unique to this package, relative to the directory that
474 # configure is in, which we can look for to find out if srcdir is correct.
475 ac_unique_file=rules.mk
476
477 # Find the source files, if location was not specified.
478 if test -z "$srcdir"; then
479   ac_srcdir_defaulted=yes
480   # Try the directory containing this script, then its parent.
481   ac_prog=$0
482   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
483   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
484   srcdir=$ac_confdir
485   if test ! -r $srcdir/$ac_unique_file; then
486     srcdir=..
487   fi
488 else
489   ac_srcdir_defaulted=no
490 fi
491 if test ! -r $srcdir/$ac_unique_file; then
492   if test "$ac_srcdir_defaulted" = yes; then
493     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
494   else
495     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
496   fi
497 fi
498 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
499
500 # Prefer explicitly selected file to automatically selected ones.
501 if test -z "$CONFIG_SITE"; then
502   if test "x$prefix" != xNONE; then
503     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
504   else
505     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
506   fi
507 fi
508 for ac_site_file in $CONFIG_SITE; do
509   if test -r "$ac_site_file"; then
510     echo "loading site script $ac_site_file"
511     . "$ac_site_file"
512   fi
513 done
514
515 if test -r "$cache_file"; then
516   echo "loading cache $cache_file"
517   . $cache_file
518 else
519   echo "creating cache $cache_file"
520   > $cache_file
521 fi
522
523 ac_ext=c
524 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
525 ac_cpp='$CPP $CPPFLAGS'
526 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
527 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
528 cross_compiling=$ac_cv_prog_cc_cross
529
530 ac_exeext=
531 ac_objext=o
532 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
533   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
534   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
535     ac_n= ac_c='
536 ' ac_t='        '
537   else
538     ac_n=-n ac_c= ac_t=
539   fi
540 else
541   ac_n= ac_c='\c' ac_t=
542 fi
543
544
545
546
547 # The nfs-utils version
548 VERSION="1.0.7"
549
550
551 # Check whether --with-release or --without-release was given.
552 if test "${with_release+set}" = set; then
553   withval="$with_release"
554   RELEASE=$withval
555 else
556   RELEASE=1
557 fi
558
559         
560 # Check whether --with-statedir or --without-statedir was given.
561 if test "${with_statedir+set}" = set; then
562   withval="$with_statedir"
563   statedir=$withval
564 else
565   statedir=/var/lib/nfs
566 fi
567
568         
569 # Check whether --with-statduser or --without-statduser was given.
570 if test "${with_statduser+set}" = set; then
571   withval="$with_statduser"
572   statduser=$withval
573 else
574   if grep -s '^rpcuser:' /etc/passwd > /dev/null; then
575                 statduser=rpcuser
576         else
577                 statduser=nobody
578         fi
579 fi
580
581         
582 # Check whether --enable-nfsv3 or --disable-nfsv3 was given.
583 if test "${enable_nfsv3+set}" = set; then
584   enableval="$enable_nfsv3"
585   enable_nfsv3=$enableval
586 else
587   enable_nfsv3=yes
588 fi
589
590         if test "$enable_nfsv3" = yes; then
591                 cat >> confdefs.h <<\EOF
592 #define NFS3_SUPPORTED 1
593 EOF
594
595         else
596                 enable_nfsv3=
597         fi
598         
599 # Check whether --enable-nfsv4 or --disable-nfsv4 was given.
600 if test "${enable_nfsv4+set}" = set; then
601   enableval="$enable_nfsv4"
602   enable_nfsv4=$enableval
603 else
604   enable_nfsv4=yes
605 fi
606
607         if test "$enable_nfsv4" = yes; then
608                 cat >> confdefs.h <<\EOF
609 #define NFS4_SUPPORTED 1
610 EOF
611
612                 IDMAPD=idmapd
613         else
614                 enable_nfsv4=
615                 IDMAPD=
616         fi
617         
618         
619 # Check whether --enable-gss or --disable-gss was given.
620 if test "${enable_gss+set}" = set; then
621   enableval="$enable_gss"
622   enable_gss=$enableval
623 else
624   enable_gss=yes
625 fi
626
627         if test "$enable_gss" = yes; then
628                 cat >> confdefs.h <<\EOF
629 #define GSS_SUPPORTED 1
630 EOF
631
632                 GSSD=gssd
633                 SVCGSSD=svcgssd
634         else
635                 enable_gss=
636                 GSSD=
637                 SVCGSSD=
638         fi
639         
640         
641         
642 # Check whether --enable-kprefix or --disable-kprefix was given.
643 if test "${enable_kprefix+set}" = set; then
644   enableval="$enable_kprefix"
645   test "$enableval" = "yes" && kprefix=k
646 else
647   kprefix=
648 fi
649
650         
651 # Check whether --enable-secure-statd or --disable-secure-statd was given.
652 if test "${enable_secure_statd+set}" = set; then
653   enableval="$enable_secure_statd"
654   test "$enableval" = "yes" && secure_statd=yes
655 else
656   secure_statd=no
657 fi
658
659         if test "$secure_statd" = yes; then
660                 cat >> confdefs.h <<\EOF
661 #define RESTRICTED_STATD 1
662 EOF
663
664         fi
665         
666 # Check whether --enable-rquotad or --disable-rquotad was given.
667 if test "${enable_rquotad+set}" = set; then
668   enableval="$enable_rquotad"
669   enable_rquotad=$enableval
670 else
671   enable_rquotad=yes
672 fi
673
674         if test "$enable_rquotad" = yes; then
675                 RQUOTAD=rquotad
676         else
677                 RQUOTAD=
678         fi
679         
680
681
682 # Extract the first word of "gcc", so it can be a program name with args.
683 set dummy gcc; ac_word=$2
684 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
685 echo "configure:686: checking for $ac_word" >&5
686 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
687   echo $ac_n "(cached) $ac_c" 1>&6
688 else
689   if test -n "$CC"; then
690   ac_cv_prog_CC="$CC" # Let the user override the test.
691 else
692   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
693   ac_dummy="$PATH"
694   for ac_dir in $ac_dummy; do
695     test -z "$ac_dir" && ac_dir=.
696     if test -f $ac_dir/$ac_word; then
697       ac_cv_prog_CC="gcc"
698       break
699     fi
700   done
701   IFS="$ac_save_ifs"
702 fi
703 fi
704 CC="$ac_cv_prog_CC"
705 if test -n "$CC"; then
706   echo "$ac_t""$CC" 1>&6
707 else
708   echo "$ac_t""no" 1>&6
709 fi
710
711 if test -z "$CC"; then
712   # Extract the first word of "cc", so it can be a program name with args.
713 set dummy cc; ac_word=$2
714 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715 echo "configure:716: checking for $ac_word" >&5
716 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
717   echo $ac_n "(cached) $ac_c" 1>&6
718 else
719   if test -n "$CC"; then
720   ac_cv_prog_CC="$CC" # Let the user override the test.
721 else
722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
723   ac_prog_rejected=no
724   ac_dummy="$PATH"
725   for ac_dir in $ac_dummy; do
726     test -z "$ac_dir" && ac_dir=.
727     if test -f $ac_dir/$ac_word; then
728       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
729         ac_prog_rejected=yes
730         continue
731       fi
732       ac_cv_prog_CC="cc"
733       break
734     fi
735   done
736   IFS="$ac_save_ifs"
737 if test $ac_prog_rejected = yes; then
738   # We found a bogon in the path, so make sure we never use it.
739   set dummy $ac_cv_prog_CC
740   shift
741   if test $# -gt 0; then
742     # We chose a different compiler from the bogus one.
743     # However, it has the same basename, so the bogon will be chosen
744     # first if we set CC to just the basename; use the full file name.
745     shift
746     set dummy "$ac_dir/$ac_word" "$@"
747     shift
748     ac_cv_prog_CC="$@"
749   fi
750 fi
751 fi
752 fi
753 CC="$ac_cv_prog_CC"
754 if test -n "$CC"; then
755   echo "$ac_t""$CC" 1>&6
756 else
757   echo "$ac_t""no" 1>&6
758 fi
759
760   if test -z "$CC"; then
761     case "`uname -s`" in
762     *win32* | *WIN32*)
763       # Extract the first word of "cl", so it can be a program name with args.
764 set dummy cl; ac_word=$2
765 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
766 echo "configure:767: checking for $ac_word" >&5
767 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
768   echo $ac_n "(cached) $ac_c" 1>&6
769 else
770   if test -n "$CC"; then
771   ac_cv_prog_CC="$CC" # Let the user override the test.
772 else
773   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
774   ac_dummy="$PATH"
775   for ac_dir in $ac_dummy; do
776     test -z "$ac_dir" && ac_dir=.
777     if test -f $ac_dir/$ac_word; then
778       ac_cv_prog_CC="cl"
779       break
780     fi
781   done
782   IFS="$ac_save_ifs"
783 fi
784 fi
785 CC="$ac_cv_prog_CC"
786 if test -n "$CC"; then
787   echo "$ac_t""$CC" 1>&6
788 else
789   echo "$ac_t""no" 1>&6
790 fi
791  ;;
792     esac
793   fi
794   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
795 fi
796
797 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
798 echo "configure:799: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
799
800 ac_ext=c
801 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802 ac_cpp='$CPP $CPPFLAGS'
803 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805 cross_compiling=$ac_cv_prog_cc_cross
806
807 cat > conftest.$ac_ext << EOF
808
809 #line 810 "configure"
810 #include "confdefs.h"
811
812 main(){return(0);}
813 EOF
814 if { (eval echo configure:815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
815   ac_cv_prog_cc_works=yes
816   # If we can't run a trivial program, we are probably using a cross compiler.
817   if (./conftest; exit) 2>/dev/null; then
818     ac_cv_prog_cc_cross=no
819   else
820     ac_cv_prog_cc_cross=yes
821   fi
822 else
823   echo "configure: failed program was:" >&5
824   cat conftest.$ac_ext >&5
825   ac_cv_prog_cc_works=no
826 fi
827 rm -fr conftest*
828 ac_ext=c
829 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
830 ac_cpp='$CPP $CPPFLAGS'
831 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
832 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
833 cross_compiling=$ac_cv_prog_cc_cross
834
835 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
836 if test $ac_cv_prog_cc_works = no; then
837   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
838 fi
839 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
840 echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
841 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
842 cross_compiling=$ac_cv_prog_cc_cross
843
844 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
845 echo "configure:846: checking whether we are using GNU C" >&5
846 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
847   echo $ac_n "(cached) $ac_c" 1>&6
848 else
849   cat > conftest.c <<EOF
850 #ifdef __GNUC__
851   yes;
852 #endif
853 EOF
854 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
855   ac_cv_prog_gcc=yes
856 else
857   ac_cv_prog_gcc=no
858 fi
859 fi
860
861 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
862
863 if test $ac_cv_prog_gcc = yes; then
864   GCC=yes
865 else
866   GCC=
867 fi
868
869 ac_test_CFLAGS="${CFLAGS+set}"
870 ac_save_CFLAGS="$CFLAGS"
871 CFLAGS=
872 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
873 echo "configure:874: checking whether ${CC-cc} accepts -g" >&5
874 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
875   echo $ac_n "(cached) $ac_c" 1>&6
876 else
877   echo 'void f(){}' > conftest.c
878 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
879   ac_cv_prog_cc_g=yes
880 else
881   ac_cv_prog_cc_g=no
882 fi
883 rm -f conftest*
884
885 fi
886
887 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
888 if test "$ac_test_CFLAGS" = set; then
889   CFLAGS="$ac_save_CFLAGS"
890 elif test $ac_cv_prog_cc_g = yes; then
891   if test "$GCC" = yes; then
892     CFLAGS="-g -O2"
893   else
894     CFLAGS="-g"
895   fi
896 else
897   if test "$GCC" = yes; then
898     CFLAGS="-O2"
899   else
900     CFLAGS=
901   fi
902 fi
903
904 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
905 echo "configure:906: checking how to run the C preprocessor" >&5
906 # On Suns, sometimes $CPP names a directory.
907 if test -n "$CPP" && test -d "$CPP"; then
908   CPP=
909 fi
910 if test -z "$CPP"; then
911 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
912   echo $ac_n "(cached) $ac_c" 1>&6
913 else
914     # This must be in double quotes, not single quotes, because CPP may get
915   # substituted into the Makefile and "${CC-cc}" will confuse make.
916   CPP="${CC-cc} -E"
917   # On the NeXT, cc -E runs the code through the compiler's parser,
918   # not just through cpp.
919   cat > conftest.$ac_ext <<EOF
920 #line 921 "configure"
921 #include "confdefs.h"
922 #include <assert.h>
923 Syntax Error
924 EOF
925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
926 { (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
928 if test -z "$ac_err"; then
929   :
930 else
931   echo "$ac_err" >&5
932   echo "configure: failed program was:" >&5
933   cat conftest.$ac_ext >&5
934   rm -rf conftest*
935   CPP="${CC-cc} -E -traditional-cpp"
936   cat > conftest.$ac_ext <<EOF
937 #line 938 "configure"
938 #include "confdefs.h"
939 #include <assert.h>
940 Syntax Error
941 EOF
942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
943 { (eval echo configure:944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
945 if test -z "$ac_err"; then
946   :
947 else
948   echo "$ac_err" >&5
949   echo "configure: failed program was:" >&5
950   cat conftest.$ac_ext >&5
951   rm -rf conftest*
952   CPP="${CC-cc} -nologo -E"
953   cat > conftest.$ac_ext <<EOF
954 #line 955 "configure"
955 #include "confdefs.h"
956 #include <assert.h>
957 Syntax Error
958 EOF
959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
960 { (eval echo configure:961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
962 if test -z "$ac_err"; then
963   :
964 else
965   echo "$ac_err" >&5
966   echo "configure: failed program was:" >&5
967   cat conftest.$ac_ext >&5
968   rm -rf conftest*
969   CPP=/lib/cpp
970 fi
971 rm -f conftest*
972 fi
973 rm -f conftest*
974 fi
975 rm -f conftest*
976   ac_cv_prog_CPP="$CPP"
977 fi
978   CPP="$ac_cv_prog_CPP"
979 else
980   ac_cv_prog_CPP="$CPP"
981 fi
982 echo "$ac_t""$CPP" 1>&6
983
984 ac_aux_dir=
985 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
986   if test -f $ac_dir/install-sh; then
987     ac_aux_dir=$ac_dir
988     ac_install_sh="$ac_aux_dir/install-sh -c"
989     break
990   elif test -f $ac_dir/install.sh; then
991     ac_aux_dir=$ac_dir
992     ac_install_sh="$ac_aux_dir/install.sh -c"
993     break
994   fi
995 done
996 if test -z "$ac_aux_dir"; then
997   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
998 fi
999 ac_config_guess=$ac_aux_dir/config.guess
1000 ac_config_sub=$ac_aux_dir/config.sub
1001 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1002
1003 # Find a good install program.  We prefer a C program (faster),
1004 # so one script is as good as another.  But avoid the broken or
1005 # incompatible versions:
1006 # SysV /etc/install, /usr/sbin/install
1007 # SunOS /usr/etc/install
1008 # IRIX /sbin/install
1009 # AIX /bin/install
1010 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1011 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1012 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1013 # ./install, which can be erroneously created by make from ./install.sh.
1014 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1015 echo "configure:1016: checking for a BSD compatible install" >&5
1016 if test -z "$INSTALL"; then
1017 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1018   echo $ac_n "(cached) $ac_c" 1>&6
1019 else
1020     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1021   for ac_dir in $PATH; do
1022     # Account for people who put trailing slashes in PATH elements.
1023     case "$ac_dir/" in
1024     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1025     *)
1026       # OSF1 and SCO ODT 3.0 have their own names for install.
1027       # Don't use installbsd from OSF since it installs stuff as root
1028       # by default.
1029       for ac_prog in ginstall scoinst install; do
1030         if test -f $ac_dir/$ac_prog; then
1031           if test $ac_prog = install &&
1032             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1033             # AIX install.  It has an incompatible calling convention.
1034             :
1035           else
1036             ac_cv_path_install="$ac_dir/$ac_prog -c"
1037             break 2
1038           fi
1039         fi
1040       done
1041       ;;
1042     esac
1043   done
1044   IFS="$ac_save_IFS"
1045
1046 fi
1047   if test "${ac_cv_path_install+set}" = set; then
1048     INSTALL="$ac_cv_path_install"
1049   else
1050     # As a last resort, use the slow shell script.  We don't cache a
1051     # path for INSTALL within a source directory, because that will
1052     # break other packages using the cache if that directory is
1053     # removed, or if the path is relative.
1054     INSTALL="$ac_install_sh"
1055   fi
1056 fi
1057 echo "$ac_t""$INSTALL" 1>&6
1058
1059 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1060 # It thinks the first close brace ends the variable substitution.
1061 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1062
1063 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1064
1065 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1066
1067
1068 test "${CC_FOR_BUILD+set}" = set || CC_FOR_BUILD="$CC"
1069
1070
1071
1072 # Make sure we can run config.sub.
1073 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1074 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1075 fi
1076
1077 echo $ac_n "checking host system type""... $ac_c" 1>&6
1078 echo "configure:1079: checking host system type" >&5
1079
1080 host_alias=$host
1081 case "$host_alias" in
1082 NONE)
1083   case $nonopt in
1084   NONE)
1085     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1086     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1087     fi ;;
1088   *) host_alias=$nonopt ;;
1089   esac ;;
1090 esac
1091
1092 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1093 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1094 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1095 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1096 echo "$ac_t""$host" 1>&6
1097
1098 echo $ac_n "checking build system type""... $ac_c" 1>&6
1099 echo "configure:1100: checking build system type" >&5
1100
1101 build_alias=$build
1102 case "$build_alias" in
1103 NONE)
1104   case $nonopt in
1105   NONE) build_alias=$host_alias ;;
1106   *) build_alias=$nonopt ;;
1107   esac ;;
1108 esac
1109
1110 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1111 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1112 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1113 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1114 echo "$ac_t""$build" 1>&6
1115
1116 if test $host != $build; then
1117   ac_tool_prefix=${host_alias}-
1118 else
1119   ac_tool_prefix=
1120 fi
1121
1122 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1123 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1124 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1125 echo "configure:1126: checking for $ac_word" >&5
1126 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1127   echo $ac_n "(cached) $ac_c" 1>&6
1128 else
1129   if test -n "$RANLIB"; then
1130   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1131 else
1132   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1133   ac_dummy="$PATH"
1134   for ac_dir in $ac_dummy; do
1135     test -z "$ac_dir" && ac_dir=.
1136     if test -f $ac_dir/$ac_word; then
1137       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1138       break
1139     fi
1140   done
1141   IFS="$ac_save_ifs"
1142 fi
1143 fi
1144 RANLIB="$ac_cv_prog_RANLIB"
1145 if test -n "$RANLIB"; then
1146   echo "$ac_t""$RANLIB" 1>&6
1147 else
1148   echo "$ac_t""no" 1>&6
1149 fi
1150
1151
1152 if test -z "$ac_cv_prog_RANLIB"; then
1153 if test -n "$ac_tool_prefix"; then
1154   # Extract the first word of "ranlib", so it can be a program name with args.
1155 set dummy ranlib; ac_word=$2
1156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1157 echo "configure:1158: checking for $ac_word" >&5
1158 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1159   echo $ac_n "(cached) $ac_c" 1>&6
1160 else
1161   if test -n "$RANLIB"; then
1162   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1163 else
1164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1165   ac_dummy="$PATH"
1166   for ac_dir in $ac_dummy; do
1167     test -z "$ac_dir" && ac_dir=.
1168     if test -f $ac_dir/$ac_word; then
1169       ac_cv_prog_RANLIB="ranlib"
1170       break
1171     fi
1172   done
1173   IFS="$ac_save_ifs"
1174   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1175 fi
1176 fi
1177 RANLIB="$ac_cv_prog_RANLIB"
1178 if test -n "$RANLIB"; then
1179   echo "$ac_t""$RANLIB" 1>&6
1180 else
1181   echo "$ac_t""no" 1>&6
1182 fi
1183
1184 else
1185   RANLIB=":"
1186 fi
1187 fi
1188
1189 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1190 set dummy ${ac_tool_prefix}ar; ac_word=$2
1191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1192 echo "configure:1193: checking for $ac_word" >&5
1193 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1194   echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196   if test -n "$AR"; then
1197   ac_cv_prog_AR="$AR" # Let the user override the test.
1198 else
1199   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1200   ac_dummy="$PATH"
1201   for ac_dir in $ac_dummy; do
1202     test -z "$ac_dir" && ac_dir=.
1203     if test -f $ac_dir/$ac_word; then
1204       ac_cv_prog_AR="${ac_tool_prefix}ar"
1205       break
1206     fi
1207   done
1208   IFS="$ac_save_ifs"
1209   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1210 fi
1211 fi
1212 AR="$ac_cv_prog_AR"
1213 if test -n "$AR"; then
1214   echo "$ac_t""$AR" 1>&6
1215 else
1216   echo "$ac_t""no" 1>&6
1217 fi
1218
1219
1220
1221 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
1222 set dummy ${ac_tool_prefix}ld; ac_word=$2
1223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1224 echo "configure:1225: checking for $ac_word" >&5
1225 if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
1226   echo $ac_n "(cached) $ac_c" 1>&6
1227 else
1228   if test -n "$LD"; then
1229   ac_cv_prog_LD="$LD" # Let the user override the test.
1230 else
1231   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1232   ac_dummy="$PATH"
1233   for ac_dir in $ac_dummy; do
1234     test -z "$ac_dir" && ac_dir=.
1235     if test -f $ac_dir/$ac_word; then
1236       ac_cv_prog_LD="${ac_tool_prefix}ld"
1237       break
1238     fi
1239   done
1240   IFS="$ac_save_ifs"
1241   test -z "$ac_cv_prog_LD" && ac_cv_prog_LD="ld"
1242 fi
1243 fi
1244 LD="$ac_cv_prog_LD"
1245 if test -n "$LD"; then
1246   echo "$ac_t""$LD" 1>&6
1247 else
1248   echo "$ac_t""no" 1>&6
1249 fi
1250
1251
1252
1253
1254 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1255 echo "configure:1256: checking for ANSI C header files" >&5
1256 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1257   echo $ac_n "(cached) $ac_c" 1>&6
1258 else
1259   cat > conftest.$ac_ext <<EOF
1260 #line 1261 "configure"
1261 #include "confdefs.h"
1262 #include <stdlib.h>
1263 #include <stdarg.h>
1264 #include <string.h>
1265 #include <float.h>
1266 EOF
1267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1268 { (eval echo configure:1269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1270 if test -z "$ac_err"; then
1271   rm -rf conftest*
1272   ac_cv_header_stdc=yes
1273 else
1274   echo "$ac_err" >&5
1275   echo "configure: failed program was:" >&5
1276   cat conftest.$ac_ext >&5
1277   rm -rf conftest*
1278   ac_cv_header_stdc=no
1279 fi
1280 rm -f conftest*
1281
1282 if test $ac_cv_header_stdc = yes; then
1283   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1284 cat > conftest.$ac_ext <<EOF
1285 #line 1286 "configure"
1286 #include "confdefs.h"
1287 #include <string.h>
1288 EOF
1289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1290   egrep "memchr" >/dev/null 2>&1; then
1291   :
1292 else
1293   rm -rf conftest*
1294   ac_cv_header_stdc=no
1295 fi
1296 rm -f conftest*
1297
1298 fi
1299
1300 if test $ac_cv_header_stdc = yes; then
1301   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1302 cat > conftest.$ac_ext <<EOF
1303 #line 1304 "configure"
1304 #include "confdefs.h"
1305 #include <stdlib.h>
1306 EOF
1307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1308   egrep "free" >/dev/null 2>&1; then
1309   :
1310 else
1311   rm -rf conftest*
1312   ac_cv_header_stdc=no
1313 fi
1314 rm -f conftest*
1315
1316 fi
1317
1318 if test $ac_cv_header_stdc = yes; then
1319   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1320 if test "$cross_compiling" = yes; then
1321   :
1322 else
1323   cat > conftest.$ac_ext <<EOF
1324 #line 1325 "configure"
1325 #include "confdefs.h"
1326 #include <ctype.h>
1327 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1328 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1329 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1330 int main () { int i; for (i = 0; i < 256; i++)
1331 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1332 exit (0); }
1333
1334 EOF
1335 if { (eval echo configure:1336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1336 then
1337   :
1338 else
1339   echo "configure: failed program was:" >&5
1340   cat conftest.$ac_ext >&5
1341   rm -fr conftest*
1342   ac_cv_header_stdc=no
1343 fi
1344 rm -fr conftest*
1345 fi
1346
1347 fi
1348 fi
1349
1350 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1351 if test $ac_cv_header_stdc = yes; then
1352   cat >> confdefs.h <<\EOF
1353 #define STDC_HEADERS 1
1354 EOF
1355
1356 fi
1357
1358 echo $ac_n "checking for GNU libc2""... $ac_c" 1>&6
1359 echo "configure:1360: checking for GNU libc2" >&5
1360   if eval "test \"`echo '$''{'knfsd_cv_glibc2'+set}'`\" = set"; then
1361   echo $ac_n "(cached) $ac_c" 1>&6
1362 else
1363   cat > conftest.$ac_ext <<EOF
1364 #line 1365 "configure"
1365 #include "confdefs.h"
1366
1367       #include <features.h>
1368       #if !defined(__GLIBC__)
1369       # error Nope
1370       #endif
1371 EOF
1372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1373 { (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1375 if test -z "$ac_err"; then
1376   rm -rf conftest*
1377   knfsd_cv_glibc2=yes
1378 else
1379   echo "$ac_err" >&5
1380   echo "configure: failed program was:" >&5
1381   cat conftest.$ac_ext >&5
1382   rm -rf conftest*
1383   knfsd_cv_glibc2=no
1384 fi
1385 rm -f conftest*
1386 fi
1387
1388   echo "$ac_t""$knfsd_cv_glibc2" 1>&6
1389   if test $knfsd_cv_glibc2 = yes; then
1390     CFLAGS="$CFLAGS -D_GNU_SOURCE"
1391     CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"
1392   fi
1393
1394
1395 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1396 echo "configure:1397: checking for main in -lsocket" >&5
1397 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1398 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1399   echo $ac_n "(cached) $ac_c" 1>&6
1400 else
1401   ac_save_LIBS="$LIBS"
1402 LIBS="-lsocket  $LIBS"
1403 cat > conftest.$ac_ext <<EOF
1404 #line 1405 "configure"
1405 #include "confdefs.h"
1406
1407 int main() {
1408 main()
1409 ; return 0; }
1410 EOF
1411 if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1412   rm -rf conftest*
1413   eval "ac_cv_lib_$ac_lib_var=yes"
1414 else
1415   echo "configure: failed program was:" >&5
1416   cat conftest.$ac_ext >&5
1417   rm -rf conftest*
1418   eval "ac_cv_lib_$ac_lib_var=no"
1419 fi
1420 rm -f conftest*
1421 LIBS="$ac_save_LIBS"
1422
1423 fi
1424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1425   echo "$ac_t""yes" 1>&6
1426   LIBSOCKET="-lnsl"
1427 else
1428   echo "$ac_t""no" 1>&6
1429 fi
1430
1431 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1432 echo "configure:1433: checking for main in -lnsl" >&5
1433 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1434 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1435   echo $ac_n "(cached) $ac_c" 1>&6
1436 else
1437   ac_save_LIBS="$LIBS"
1438 LIBS="-lnsl  $LIBS"
1439 cat > conftest.$ac_ext <<EOF
1440 #line 1441 "configure"
1441 #include "confdefs.h"
1442
1443 int main() {
1444 main()
1445 ; return 0; }
1446 EOF
1447 if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1448   rm -rf conftest*
1449   eval "ac_cv_lib_$ac_lib_var=yes"
1450 else
1451   echo "configure: failed program was:" >&5
1452   cat conftest.$ac_ext >&5
1453   rm -rf conftest*
1454   eval "ac_cv_lib_$ac_lib_var=no"
1455 fi
1456 rm -f conftest*
1457 LIBS="$ac_save_LIBS"
1458
1459 fi
1460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1461   echo "$ac_t""yes" 1>&6
1462   LIBNSL="-lnsl"
1463 else
1464   echo "$ac_t""no" 1>&6
1465 fi
1466
1467 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
1468 echo "configure:1469: checking for crypt in -lcrypt" >&5
1469 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
1470 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1471   echo $ac_n "(cached) $ac_c" 1>&6
1472 else
1473   ac_save_LIBS="$LIBS"
1474 LIBS="-lcrypt  $LIBS"
1475 cat > conftest.$ac_ext <<EOF
1476 #line 1477 "configure"
1477 #include "confdefs.h"
1478 /* Override any gcc2 internal prototype to avoid an error.  */
1479 /* We use char because int might match the return type of a gcc2
1480     builtin and then its argument prototype would still apply.  */
1481 char crypt();
1482
1483 int main() {
1484 crypt()
1485 ; return 0; }
1486 EOF
1487 if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1488   rm -rf conftest*
1489   eval "ac_cv_lib_$ac_lib_var=yes"
1490 else
1491   echo "configure: failed program was:" >&5
1492   cat conftest.$ac_ext >&5
1493   rm -rf conftest*
1494   eval "ac_cv_lib_$ac_lib_var=no"
1495 fi
1496 rm -f conftest*
1497 LIBS="$ac_save_LIBS"
1498
1499 fi
1500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1501   echo "$ac_t""yes" 1>&6
1502   LIBCRYPT="-lcrypt"
1503 else
1504   echo "$ac_t""no" 1>&6
1505 fi
1506
1507 if test "$enable_nfsv4" = yes; then
1508     echo $ac_n "checking for event_dispatch in -levent""... $ac_c" 1>&6
1509 echo "configure:1510: checking for event_dispatch in -levent" >&5
1510 ac_lib_var=`echo event'_'event_dispatch | sed 'y%./+-%__p_%'`
1511 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1512   echo $ac_n "(cached) $ac_c" 1>&6
1513 else
1514   ac_save_LIBS="$LIBS"
1515 LIBS="-levent  $LIBS"
1516 cat > conftest.$ac_ext <<EOF
1517 #line 1518 "configure"
1518 #include "confdefs.h"
1519 /* Override any gcc2 internal prototype to avoid an error.  */
1520 /* We use char because int might match the return type of a gcc2
1521     builtin and then its argument prototype would still apply.  */
1522 char event_dispatch();
1523
1524 int main() {
1525 event_dispatch()
1526 ; return 0; }
1527 EOF
1528 if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1529   rm -rf conftest*
1530   eval "ac_cv_lib_$ac_lib_var=yes"
1531 else
1532   echo "configure: failed program was:" >&5
1533   cat conftest.$ac_ext >&5
1534   rm -rf conftest*
1535   eval "ac_cv_lib_$ac_lib_var=no"
1536 fi
1537 rm -f conftest*
1538 LIBS="$ac_save_LIBS"
1539
1540 fi
1541 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1542   echo "$ac_t""yes" 1>&6
1543     ac_tr_lib=HAVE_LIB`echo event | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1544     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1545   cat >> confdefs.h <<EOF
1546 #define $ac_tr_lib 1
1547 EOF
1548
1549   LIBS="-levent $LIBS"
1550
1551 else
1552   echo "$ac_t""no" 1>&6
1553 { echo "configure: error: libevent needed for nfsv4 support" 1>&2; exit 1; }
1554 fi
1555
1556     echo $ac_n "checking for nfs4_init_name_mapping in -lnfsidmap""... $ac_c" 1>&6
1557 echo "configure:1558: checking for nfs4_init_name_mapping in -lnfsidmap" >&5
1558 ac_lib_var=`echo nfsidmap'_'nfs4_init_name_mapping | sed 'y%./+-%__p_%'`
1559 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1560   echo $ac_n "(cached) $ac_c" 1>&6
1561 else
1562   ac_save_LIBS="$LIBS"
1563 LIBS="-lnfsidmap  $LIBS"
1564 cat > conftest.$ac_ext <<EOF
1565 #line 1566 "configure"
1566 #include "confdefs.h"
1567 /* Override any gcc2 internal prototype to avoid an error.  */
1568 /* We use char because int might match the return type of a gcc2
1569     builtin and then its argument prototype would still apply.  */
1570 char nfs4_init_name_mapping();
1571
1572 int main() {
1573 nfs4_init_name_mapping()
1574 ; return 0; }
1575 EOF
1576 if { (eval echo configure:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1577   rm -rf conftest*
1578   eval "ac_cv_lib_$ac_lib_var=yes"
1579 else
1580   echo "configure: failed program was:" >&5
1581   cat conftest.$ac_ext >&5
1582   rm -rf conftest*
1583   eval "ac_cv_lib_$ac_lib_var=no"
1584 fi
1585 rm -f conftest*
1586 LIBS="$ac_save_LIBS"
1587
1588 fi
1589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1590   echo "$ac_t""yes" 1>&6
1591     ac_tr_lib=HAVE_LIB`echo nfsidmap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1592     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1593   cat >> confdefs.h <<EOF
1594 #define $ac_tr_lib 1
1595 EOF
1596
1597   LIBS="-lnfsidmap $LIBS"
1598
1599 else
1600   echo "$ac_t""no" 1>&6
1601 { echo "configure: error: libnfsidmap needed for nfsv4 support" 1>&2; exit 1; }
1602 fi
1603
1604     for ac_hdr in event.h
1605 do
1606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1608 echo "configure:1609: checking for $ac_hdr" >&5
1609 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1610   echo $ac_n "(cached) $ac_c" 1>&6
1611 else
1612   cat > conftest.$ac_ext <<EOF
1613 #line 1614 "configure"
1614 #include "confdefs.h"
1615 #include <$ac_hdr>
1616 EOF
1617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1618 { (eval echo configure:1619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1620 if test -z "$ac_err"; then
1621   rm -rf conftest*
1622   eval "ac_cv_header_$ac_safe=yes"
1623 else
1624   echo "$ac_err" >&5
1625   echo "configure: failed program was:" >&5
1626   cat conftest.$ac_ext >&5
1627   rm -rf conftest*
1628   eval "ac_cv_header_$ac_safe=no"
1629 fi
1630 rm -f conftest*
1631 fi
1632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1633   echo "$ac_t""yes" 1>&6
1634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1635   cat >> confdefs.h <<EOF
1636 #define $ac_tr_hdr 1
1637 EOF
1638  
1639 else
1640   echo "$ac_t""no" 1>&6
1641 { echo "configure: error: libevent needed for nfsv4 support" 1>&2; exit 1; }
1642 fi
1643 done
1644
1645     for ac_hdr in nfsidmap.h
1646 do
1647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1649 echo "configure:1650: checking for $ac_hdr" >&5
1650 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1651   echo $ac_n "(cached) $ac_c" 1>&6
1652 else
1653   cat > conftest.$ac_ext <<EOF
1654 #line 1655 "configure"
1655 #include "confdefs.h"
1656 #include <$ac_hdr>
1657 EOF
1658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1659 { (eval echo configure:1660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1661 if test -z "$ac_err"; then
1662   rm -rf conftest*
1663   eval "ac_cv_header_$ac_safe=yes"
1664 else
1665   echo "$ac_err" >&5
1666   echo "configure: failed program was:" >&5
1667   cat conftest.$ac_ext >&5
1668   rm -rf conftest*
1669   eval "ac_cv_header_$ac_safe=no"
1670 fi
1671 rm -f conftest*
1672 fi
1673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1674   echo "$ac_t""yes" 1>&6
1675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1676   cat >> confdefs.h <<EOF
1677 #define $ac_tr_hdr 1
1678 EOF
1679  
1680 else
1681   echo "$ac_t""no" 1>&6
1682 { echo "configure: error: libnfsidmap needed for nfsv4 support" 1>&2; exit 1; }
1683 fi
1684 done
1685
1686 fi
1687 if test "$knfsd_cv_glibc2" = no; then
1688     echo $ac_n "checking for daemon in -lbsd""... $ac_c" 1>&6
1689 echo "configure:1690: checking for daemon in -lbsd" >&5
1690 ac_lib_var=`echo bsd'_'daemon | sed 'y%./+-%__p_%'`
1691 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1692   echo $ac_n "(cached) $ac_c" 1>&6
1693 else
1694   ac_save_LIBS="$LIBS"
1695 LIBS="-lbsd  $LIBS"
1696 cat > conftest.$ac_ext <<EOF
1697 #line 1698 "configure"
1698 #include "confdefs.h"
1699 /* Override any gcc2 internal prototype to avoid an error.  */
1700 /* We use char because int might match the return type of a gcc2
1701     builtin and then its argument prototype would still apply.  */
1702 char daemon();
1703
1704 int main() {
1705 daemon()
1706 ; return 0; }
1707 EOF
1708 if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1709   rm -rf conftest*
1710   eval "ac_cv_lib_$ac_lib_var=yes"
1711 else
1712   echo "configure: failed program was:" >&5
1713   cat conftest.$ac_ext >&5
1714   rm -rf conftest*
1715   eval "ac_cv_lib_$ac_lib_var=no"
1716 fi
1717 rm -f conftest*
1718 LIBS="$ac_save_LIBS"
1719
1720 fi
1721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1722   echo "$ac_t""yes" 1>&6
1723   LIBBSD="-lbsd"
1724 else
1725   echo "$ac_t""no" 1>&6
1726 fi
1727
1728 fi
1729
1730
1731
1732
1733
1734 echo $ac_n "checking for the tcp wrapper library""... $ac_c" 1>&6
1735 echo "configure:1736: checking for the tcp wrapper library" >&5
1736   if eval "test \"`echo '$''{'knfsd_cv_tcp_wrapper'+set}'`\" = set"; then
1737   echo $ac_n "(cached) $ac_c" 1>&6
1738 else
1739   old_LIBS="$LIBS"
1740    LIBS="$LIBS -lwrap $LIBNSL"
1741    cat > conftest.$ac_ext <<EOF
1742 #line 1743 "configure"
1743 #include "confdefs.h"
1744
1745       int deny_severity = 0;
1746       int allow_severity = 0;
1747 int main() {
1748 return hosts_ctl ("nfsd", "", "")
1749 ; return 0; }
1750 EOF
1751 if { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1752   rm -rf conftest*
1753   knfsd_cv_tcp_wrapper=yes
1754 else
1755   echo "configure: failed program was:" >&5
1756   cat conftest.$ac_ext >&5
1757   rm -rf conftest*
1758   knfsd_cv_tcp_wrapper=no
1759 fi
1760 rm -f conftest*
1761    LIBS="$old_LIBS"
1762 fi
1763
1764   echo "$ac_t""$knfsd_cv_tcp_wrapper" 1>&6
1765   if test "$knfsd_cv_tcp_wrapper" = yes; then
1766     CFLAGS="$CFLAGS -DHAVE_TCP_WRAPPER"
1767     CXXFLAGS="$CXXFLAGS -DHAVE_TCP_WRAPPER"
1768     LIBWRAP="-lwrap"
1769   fi
1770
1771
1772
1773 if test "$enable_gss" = yes; then
1774     for ac_hdr in nfsidmap.h
1775 do
1776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1778 echo "configure:1779: checking for $ac_hdr" >&5
1779 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1780   echo $ac_n "(cached) $ac_c" 1>&6
1781 else
1782   cat > conftest.$ac_ext <<EOF
1783 #line 1784 "configure"
1784 #include "confdefs.h"
1785 #include <$ac_hdr>
1786 EOF
1787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1788 { (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1790 if test -z "$ac_err"; then
1791   rm -rf conftest*
1792   eval "ac_cv_header_$ac_safe=yes"
1793 else
1794   echo "$ac_err" >&5
1795   echo "configure: failed program was:" >&5
1796   cat conftest.$ac_ext >&5
1797   rm -rf conftest*
1798   eval "ac_cv_header_$ac_safe=no"
1799 fi
1800 rm -f conftest*
1801 fi
1802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1803   echo "$ac_t""yes" 1>&6
1804     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1805   cat >> confdefs.h <<EOF
1806 #define $ac_tr_hdr 1
1807 EOF
1808  
1809 else
1810   echo "$ac_t""no" 1>&6
1811 { echo "configure: error: libnfsidmap needed for gss support" 1>&2; exit 1; }
1812 fi
1813 done
1814
1815   
1816             echo $ac_n "checking for Kerberos v5""... $ac_c" 1>&6
1817 echo "configure:1818: checking for Kerberos v5" >&5
1818   # Check whether --with-krb5 or --without-krb5 was given.
1819 if test "${with_krb5+set}" = set; then
1820   withval="$with_krb5"
1821    case "$withval" in
1822     yes|no)
1823        krb5_with=""
1824        ;;
1825     *)
1826        krb5_with="$withval"
1827        ;;
1828     esac 
1829   
1830 fi
1831
1832
1833   for dir in $krb5_with /usr/kerberos /usr/local /usr/local/krb5 /usr/krb5 \
1834              /usr/heimdal /usr/local/heimdal /usr/athena /usr ; do
1835             K5CONFIG=""
1836     if test -f $dir/bin/krb5-config; then
1837       K5CONFIG=$dir/bin/krb5-config
1838     elif test -f "/usr/kerberos/bin/krb5-config"; then
1839       K5CONFIG="/usr/kerberos/bin/krb5-config"
1840     fi
1841     if test "$K5CONFIG" != ""; then
1842       if test -f $dir/include/gssapi/gssapi_krb5.h -a \
1843               \( -f $dir/lib/libgssapi_krb5.a -o \
1844             -f $dir/lib/libgssapi_krb5.so \) ; then
1845          cat >> confdefs.h <<\EOF
1846 #define HAVE_KRB5 1
1847 EOF
1848
1849          KRBDIR="$dir"
1850          K5VERS=`$K5CONFIG --version | awk '{split($4,v,"."); print v[1]v[2]v[3] }'`
1851          cat >> confdefs.h <<EOF
1852 #define KRB5_VERSION $K5VERS
1853 EOF
1854
1855          KRBLIB=`$K5CONFIG --libs gssapi`
1856          if test $K5VERS -le 131; then
1857            cat >> confdefs.h <<\EOF
1858 #define USE_PRIVATE_KRB5_FUNCTIONS 1
1859 EOF
1860
1861          fi
1862          echo $ac_n "checking for gss_krb5_export_lucid_sec_context in -lgssapi_krb5""... $ac_c" 1>&6
1863 echo "configure:1864: checking for gss_krb5_export_lucid_sec_context in -lgssapi_krb5" >&5
1864 ac_lib_var=`echo gssapi_krb5'_'gss_krb5_export_lucid_sec_context | sed 'y%./+-%__p_%'`
1865 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1866   echo $ac_n "(cached) $ac_c" 1>&6
1867 else
1868   ac_save_LIBS="$LIBS"
1869 LIBS="-lgssapi_krb5 $KRBLIB $LIBS"
1870 cat > conftest.$ac_ext <<EOF
1871 #line 1872 "configure"
1872 #include "confdefs.h"
1873 /* Override any gcc2 internal prototype to avoid an error.  */
1874 /* We use char because int might match the return type of a gcc2
1875     builtin and then its argument prototype would still apply.  */
1876 char gss_krb5_export_lucid_sec_context();
1877
1878 int main() {
1879 gss_krb5_export_lucid_sec_context()
1880 ; return 0; }
1881 EOF
1882 if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1883   rm -rf conftest*
1884   eval "ac_cv_lib_$ac_lib_var=yes"
1885 else
1886   echo "configure: failed program was:" >&5
1887   cat conftest.$ac_ext >&5
1888   rm -rf conftest*
1889   eval "ac_cv_lib_$ac_lib_var=no"
1890 fi
1891 rm -f conftest*
1892 LIBS="$ac_save_LIBS"
1893
1894 fi
1895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1896   echo "$ac_t""yes" 1>&6
1897   cat >> confdefs.h <<\EOF
1898 #define HAVE_LUCID_CONTEXT_SUPPORT 1
1899 EOF
1900
1901 else
1902   echo "$ac_t""no" 1>&6
1903 fi
1904
1905          echo $ac_n "checking for gss_krb5_set_allowable_enctypes in -lgssapi_krb5""... $ac_c" 1>&6
1906 echo "configure:1907: checking for gss_krb5_set_allowable_enctypes in -lgssapi_krb5" >&5
1907 ac_lib_var=`echo gssapi_krb5'_'gss_krb5_set_allowable_enctypes | sed 'y%./+-%__p_%'`
1908 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1909   echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911   ac_save_LIBS="$LIBS"
1912 LIBS="-lgssapi_krb5 $KRBLIB $LIBS"
1913 cat > conftest.$ac_ext <<EOF
1914 #line 1915 "configure"
1915 #include "confdefs.h"
1916 /* Override any gcc2 internal prototype to avoid an error.  */
1917 /* We use char because int might match the return type of a gcc2
1918     builtin and then its argument prototype would still apply.  */
1919 char gss_krb5_set_allowable_enctypes();
1920
1921 int main() {
1922 gss_krb5_set_allowable_enctypes()
1923 ; return 0; }
1924 EOF
1925 if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1926   rm -rf conftest*
1927   eval "ac_cv_lib_$ac_lib_var=yes"
1928 else
1929   echo "configure: failed program was:" >&5
1930   cat conftest.$ac_ext >&5
1931   rm -rf conftest*
1932   eval "ac_cv_lib_$ac_lib_var=no"
1933 fi
1934 rm -f conftest*
1935 LIBS="$ac_save_LIBS"
1936
1937 fi
1938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1939   echo "$ac_t""yes" 1>&6
1940   cat >> confdefs.h <<\EOF
1941 #define HAVE_SET_ALLOWABLE_ENCTYPES 1
1942 EOF
1943
1944 else
1945   echo "$ac_t""no" 1>&6
1946 fi
1947
1948          echo $ac_n "checking for gss_krb5_ccache_name in -lgssapi_krb5""... $ac_c" 1>&6
1949 echo "configure:1950: checking for gss_krb5_ccache_name in -lgssapi_krb5" >&5
1950 ac_lib_var=`echo gssapi_krb5'_'gss_krb5_ccache_name | sed 'y%./+-%__p_%'`
1951 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1952   echo $ac_n "(cached) $ac_c" 1>&6
1953 else
1954   ac_save_LIBS="$LIBS"
1955 LIBS="-lgssapi_krb5 $KRBLIB $LIBS"
1956 cat > conftest.$ac_ext <<EOF
1957 #line 1958 "configure"
1958 #include "confdefs.h"
1959 /* Override any gcc2 internal prototype to avoid an error.  */
1960 /* We use char because int might match the return type of a gcc2
1961     builtin and then its argument prototype would still apply.  */
1962 char gss_krb5_ccache_name();
1963
1964 int main() {
1965 gss_krb5_ccache_name()
1966 ; return 0; }
1967 EOF
1968 if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1969   rm -rf conftest*
1970   eval "ac_cv_lib_$ac_lib_var=yes"
1971 else
1972   echo "configure: failed program was:" >&5
1973   cat conftest.$ac_ext >&5
1974   rm -rf conftest*
1975   eval "ac_cv_lib_$ac_lib_var=no"
1976 fi
1977 rm -f conftest*
1978 LIBS="$ac_save_LIBS"
1979
1980 fi
1981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1982   echo "$ac_t""yes" 1>&6
1983   cat >> confdefs.h <<\EOF
1984 #define HAVE_GSS_KRB5_CCACHE_NAME 1
1985 EOF
1986
1987 else
1988   echo "$ac_t""no" 1>&6
1989 fi
1990
1991          break
1992                   elif test \( -f $dir/include/heim_err.h -o\
1993                  -f $dir/include/heimdal/heim_err.h \) -a \
1994                 -f $dir/lib/libroken.a; then
1995          cat >> confdefs.h <<\EOF
1996 #define HAVE_HEIMDAL 1
1997 EOF
1998
1999          KRBDIR="$dir"
2000          K5VERS=`$K5CONFIG --version | head -1 | awk '{split($2,v,"."); print v[1]v[2]v[3] }'`
2001          cat >> confdefs.h <<EOF
2002 #define KRB5_VERSION $K5VERS
2003 EOF
2004
2005          KRBLIB=`$K5CONFIG --libs gssapi`
2006          echo $ac_n "checking for gss_krb5_export_lucid_sec_context in -lgssapi""... $ac_c" 1>&6
2007 echo "configure:2008: checking for gss_krb5_export_lucid_sec_context in -lgssapi" >&5
2008 ac_lib_var=`echo gssapi'_'gss_krb5_export_lucid_sec_context | sed 'y%./+-%__p_%'`
2009 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2010   echo $ac_n "(cached) $ac_c" 1>&6
2011 else
2012   ac_save_LIBS="$LIBS"
2013 LIBS="-lgssapi $KRBLIB $LIBS"
2014 cat > conftest.$ac_ext <<EOF
2015 #line 2016 "configure"
2016 #include "confdefs.h"
2017 /* Override any gcc2 internal prototype to avoid an error.  */
2018 /* We use char because int might match the return type of a gcc2
2019     builtin and then its argument prototype would still apply.  */
2020 char gss_krb5_export_lucid_sec_context();
2021
2022 int main() {
2023 gss_krb5_export_lucid_sec_context()
2024 ; return 0; }
2025 EOF
2026 if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2027   rm -rf conftest*
2028   eval "ac_cv_lib_$ac_lib_var=yes"
2029 else
2030   echo "configure: failed program was:" >&5
2031   cat conftest.$ac_ext >&5
2032   rm -rf conftest*
2033   eval "ac_cv_lib_$ac_lib_var=no"
2034 fi
2035 rm -f conftest*
2036 LIBS="$ac_save_LIBS"
2037
2038 fi
2039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2040   echo "$ac_t""yes" 1>&6
2041   cat >> confdefs.h <<\EOF
2042 #define HAVE_LUCID_CONTEXT_SUPPORT 1
2043 EOF
2044
2045 else
2046   echo "$ac_t""no" 1>&6
2047 fi
2048
2049          echo $ac_n "checking for gss_krb5_set_allowable_enctypes in -lgssapi""... $ac_c" 1>&6
2050 echo "configure:2051: checking for gss_krb5_set_allowable_enctypes in -lgssapi" >&5
2051 ac_lib_var=`echo gssapi'_'gss_krb5_set_allowable_enctypes | sed 'y%./+-%__p_%'`
2052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2053   echo $ac_n "(cached) $ac_c" 1>&6
2054 else
2055   ac_save_LIBS="$LIBS"
2056 LIBS="-lgssapi $KRBLIB $LIBS"
2057 cat > conftest.$ac_ext <<EOF
2058 #line 2059 "configure"
2059 #include "confdefs.h"
2060 /* Override any gcc2 internal prototype to avoid an error.  */
2061 /* We use char because int might match the return type of a gcc2
2062     builtin and then its argument prototype would still apply.  */
2063 char gss_krb5_set_allowable_enctypes();
2064
2065 int main() {
2066 gss_krb5_set_allowable_enctypes()
2067 ; return 0; }
2068 EOF
2069 if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2070   rm -rf conftest*
2071   eval "ac_cv_lib_$ac_lib_var=yes"
2072 else
2073   echo "configure: failed program was:" >&5
2074   cat conftest.$ac_ext >&5
2075   rm -rf conftest*
2076   eval "ac_cv_lib_$ac_lib_var=no"
2077 fi
2078 rm -f conftest*
2079 LIBS="$ac_save_LIBS"
2080
2081 fi
2082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2083   echo "$ac_t""yes" 1>&6
2084   cat >> confdefs.h <<\EOF
2085 #define HAVE_SET_ALLOWABLE_ENCTYPES 1
2086 EOF
2087
2088 else
2089   echo "$ac_t""no" 1>&6
2090 fi
2091
2092          echo $ac_n "checking for gss_krb5_ccache_name in -lgssapi""... $ac_c" 1>&6
2093 echo "configure:2094: checking for gss_krb5_ccache_name in -lgssapi" >&5
2094 ac_lib_var=`echo gssapi'_'gss_krb5_ccache_name | sed 'y%./+-%__p_%'`
2095 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2096   echo $ac_n "(cached) $ac_c" 1>&6
2097 else
2098   ac_save_LIBS="$LIBS"
2099 LIBS="-lgssapi $KRBLIB $LIBS"
2100 cat > conftest.$ac_ext <<EOF
2101 #line 2102 "configure"
2102 #include "confdefs.h"
2103 /* Override any gcc2 internal prototype to avoid an error.  */
2104 /* We use char because int might match the return type of a gcc2
2105     builtin and then its argument prototype would still apply.  */
2106 char gss_krb5_ccache_name();
2107
2108 int main() {
2109 gss_krb5_ccache_name()
2110 ; return 0; }
2111 EOF
2112 if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2113   rm -rf conftest*
2114   eval "ac_cv_lib_$ac_lib_var=yes"
2115 else
2116   echo "configure: failed program was:" >&5
2117   cat conftest.$ac_ext >&5
2118   rm -rf conftest*
2119   eval "ac_cv_lib_$ac_lib_var=no"
2120 fi
2121 rm -f conftest*
2122 LIBS="$ac_save_LIBS"
2123
2124 fi
2125 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2126   echo "$ac_t""yes" 1>&6
2127   cat >> confdefs.h <<\EOF
2128 #define HAVE_GSS_KRB5_CCACHE_NAME 1
2129 EOF
2130
2131 else
2132   echo "$ac_t""no" 1>&6
2133 fi
2134
2135         break
2136       fi
2137       CFLAGS=$CFLAGS `$K5CONFIG --cflags`
2138     fi
2139   done
2140     if test "x$KRBDIR" = "x"; then
2141     echo "$ac_t"""no"" 1>&6
2142     if test "x$krb5_with" = "x"; then
2143       { echo "configure: error: Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=" 1>&2; exit 1; }
2144     else
2145       { echo "configure: error: Kerberos v5 with GSS support not found at $krb5_with" 1>&2; exit 1; }
2146     fi
2147   fi
2148   echo "$ac_t""$KRBDIR" 1>&6
2149     if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then
2150     echo "configure: warning: Using $KRBDIR instead of requested value of $krb5_with for Kerberos!" 1>&2
2151   fi
2152
2153   
2154   
2155   
2156 fi
2157
2158
2159 for ac_func in innetgr
2160 do
2161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2162 echo "configure:2163: checking for $ac_func" >&5
2163 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2164   echo $ac_n "(cached) $ac_c" 1>&6
2165 else
2166   cat > conftest.$ac_ext <<EOF
2167 #line 2168 "configure"
2168 #include "confdefs.h"
2169 /* System header to define __stub macros and hopefully few prototypes,
2170     which can conflict with char $ac_func(); below.  */
2171 #include <assert.h>
2172 /* Override any gcc2 internal prototype to avoid an error.  */
2173 /* We use char because int might match the return type of a gcc2
2174     builtin and then its argument prototype would still apply.  */
2175 char $ac_func();
2176
2177 int main() {
2178
2179 /* The GNU C library defines this for functions which it implements
2180     to always fail with ENOSYS.  Some functions are actually named
2181     something starting with __ and the normal name is an alias.  */
2182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2183 choke me
2184 #else
2185 $ac_func();
2186 #endif
2187
2188 ; return 0; }
2189 EOF
2190 if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2191   rm -rf conftest*
2192   eval "ac_cv_func_$ac_func=yes"
2193 else
2194   echo "configure: failed program was:" >&5
2195   cat conftest.$ac_ext >&5
2196   rm -rf conftest*
2197   eval "ac_cv_func_$ac_func=no"
2198 fi
2199 rm -f conftest*
2200 fi
2201
2202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2203   echo "$ac_t""yes" 1>&6
2204     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2205   cat >> confdefs.h <<EOF
2206 #define $ac_tr_func 1
2207 EOF
2208  
2209 else
2210   echo "$ac_t""no" 1>&6
2211 fi
2212 done
2213
2214
2215 cat >> confdefs.h <<EOF
2216 #define NFS_STATEDIR "$statedir"
2217 EOF
2218
2219
2220
2221
2222
2223 trap '' 1 2 15
2224 cat > confcache <<\EOF
2225 # This file is a shell script that caches the results of configure
2226 # tests run on this system so they can be shared between configure
2227 # scripts and configure runs.  It is not useful on other systems.
2228 # If it contains results you don't want to keep, you may remove or edit it.
2229 #
2230 # By default, configure uses ./config.cache as the cache file,
2231 # creating it if it does not exist already.  You can give configure
2232 # the --cache-file=FILE option to use a different cache file; that is
2233 # what configure does when it calls configure scripts in
2234 # subdirectories, so they share the cache.
2235 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2236 # config.status only pays attention to the cache file if you give it the
2237 # --recheck option to rerun configure.
2238 #
2239 EOF
2240 # The following way of writing the cache mishandles newlines in values,
2241 # but we know of no workaround that is simple, portable, and efficient.
2242 # So, don't put newlines in cache variables' values.
2243 # Ultrix sh set writes to stderr and can't be redirected directly,
2244 # and sets the high bit in the cache file unless we assign to the vars.
2245 (set) 2>&1 |
2246   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2247   *ac_space=\ *)
2248     # `set' does not quote correctly, so add quotes (double-quote substitution
2249     # turns \\\\ into \\, and sed turns \\ into \).
2250     sed -n \
2251       -e "s/'/'\\\\''/g" \
2252       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2253     ;;
2254   *)
2255     # `set' quotes correctly as required by POSIX, so do not add quotes.
2256     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2257     ;;
2258   esac >> confcache
2259 if cmp -s $cache_file confcache; then
2260   :
2261 else
2262   if test -w $cache_file; then
2263     echo "updating cache $cache_file"
2264     cat confcache > $cache_file
2265   else
2266     echo "not updating unwritable cache $cache_file"
2267   fi
2268 fi
2269 rm -f confcache
2270
2271 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2272
2273 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2274 # Let make expand exec_prefix.
2275 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2276
2277 # Any assignment to VPATH causes Sun make to only execute
2278 # the first set of double-colon rules, so remove it if not needed.
2279 # If there is a colon in the path, we need to keep it.
2280 if test "x$srcdir" = x.; then
2281   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2282 fi
2283
2284 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2285
2286 DEFS=-DHAVE_CONFIG_H
2287
2288 # Without the "./", some shells look in PATH for config.status.
2289 : ${CONFIG_STATUS=./config.status}
2290
2291 echo creating $CONFIG_STATUS
2292 rm -f $CONFIG_STATUS
2293 cat > $CONFIG_STATUS <<EOF
2294 #! /bin/sh
2295 # Generated automatically by configure.
2296 # Run this file to recreate the current configuration.
2297 # This directory was configured as follows,
2298 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2299 #
2300 # $0 $ac_configure_args
2301 #
2302 # Compiler output produced by configure, useful for debugging
2303 # configure, is in ./config.log if it exists.
2304
2305 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2306 for ac_option
2307 do
2308   case "\$ac_option" in
2309   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2310     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2311     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2312   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2313     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2314     exit 0 ;;
2315   -help | --help | --hel | --he | --h)
2316     echo "\$ac_cs_usage"; exit 0 ;;
2317   *) echo "\$ac_cs_usage"; exit 1 ;;
2318   esac
2319 done
2320
2321 ac_given_srcdir=$srcdir
2322 ac_given_INSTALL="$INSTALL"
2323
2324 trap 'rm -fr `echo "config.mk utils/Makefile support/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2325 EOF
2326 cat >> $CONFIG_STATUS <<EOF
2327
2328 # Protect against being on the right side of a sed subst in config.status.
2329 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2330  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2331 $ac_vpsub
2332 $extrasub
2333 s%@SHELL@%$SHELL%g
2334 s%@CFLAGS@%$CFLAGS%g
2335 s%@CPPFLAGS@%$CPPFLAGS%g
2336 s%@CXXFLAGS@%$CXXFLAGS%g
2337 s%@FFLAGS@%$FFLAGS%g
2338 s%@DEFS@%$DEFS%g
2339 s%@LDFLAGS@%$LDFLAGS%g
2340 s%@LIBS@%$LIBS%g
2341 s%@exec_prefix@%$exec_prefix%g
2342 s%@prefix@%$prefix%g
2343 s%@program_transform_name@%$program_transform_name%g
2344 s%@bindir@%$bindir%g
2345 s%@sbindir@%$sbindir%g
2346 s%@libexecdir@%$libexecdir%g
2347 s%@datadir@%$datadir%g
2348 s%@sysconfdir@%$sysconfdir%g
2349 s%@sharedstatedir@%$sharedstatedir%g
2350 s%@localstatedir@%$localstatedir%g
2351 s%@libdir@%$libdir%g
2352 s%@includedir@%$includedir%g
2353 s%@oldincludedir@%$oldincludedir%g
2354 s%@infodir@%$infodir%g
2355 s%@mandir@%$mandir%g
2356 s%@VERSION@%$VERSION%g
2357 s%@RELEASE@%$RELEASE%g
2358 s%@statedir@%$statedir%g
2359 s%@statduser@%$statduser%g
2360 s%@enable_nfsv3@%$enable_nfsv3%g
2361 s%@IDMAPD@%$IDMAPD%g
2362 s%@enable_nfsv4@%$enable_nfsv4%g
2363 s%@GSSD@%$GSSD%g
2364 s%@SVCGSSD@%$SVCGSSD%g
2365 s%@enable_gss@%$enable_gss%g
2366 s%@kprefix@%$kprefix%g
2367 s%@secure_statd@%$secure_statd%g
2368 s%@RQUOTAD@%$RQUOTAD%g
2369 s%@CC@%$CC%g
2370 s%@CPP@%$CPP%g
2371 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2372 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2373 s%@INSTALL_DATA@%$INSTALL_DATA%g
2374 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
2375 s%@host@%$host%g
2376 s%@host_alias@%$host_alias%g
2377 s%@host_cpu@%$host_cpu%g
2378 s%@host_vendor@%$host_vendor%g
2379 s%@host_os@%$host_os%g
2380 s%@build@%$build%g
2381 s%@build_alias@%$build_alias%g
2382 s%@build_cpu@%$build_cpu%g
2383 s%@build_vendor@%$build_vendor%g
2384 s%@build_os@%$build_os%g
2385 s%@RANLIB@%$RANLIB%g
2386 s%@AR@%$AR%g
2387 s%@LD@%$LD%g
2388 s%@LIBSOCKET@%$LIBSOCKET%g
2389 s%@LIBNSL@%$LIBNSL%g
2390 s%@LIBCRYPT@%$LIBCRYPT%g
2391 s%@LIBBSD@%$LIBBSD%g
2392 s%@LIBWRAP@%$LIBWRAP%g
2393 s%@KRBDIR@%$KRBDIR%g
2394 s%@KRBLIB@%$KRBLIB%g
2395 s%@K5VERS@%$K5VERS%g
2396
2397 CEOF
2398 EOF
2399
2400 cat >> $CONFIG_STATUS <<\EOF
2401
2402 # Split the substitutions into bite-sized pieces for seds with
2403 # small command number limits, like on Digital OSF/1 and HP-UX.
2404 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2405 ac_file=1 # Number of current file.
2406 ac_beg=1 # First line for current file.
2407 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2408 ac_more_lines=:
2409 ac_sed_cmds=""
2410 while $ac_more_lines; do
2411   if test $ac_beg -gt 1; then
2412     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2413   else
2414     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2415   fi
2416   if test ! -s conftest.s$ac_file; then
2417     ac_more_lines=false
2418     rm -f conftest.s$ac_file
2419   else
2420     if test -z "$ac_sed_cmds"; then
2421       ac_sed_cmds="sed -f conftest.s$ac_file"
2422     else
2423       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2424     fi
2425     ac_file=`expr $ac_file + 1`
2426     ac_beg=$ac_end
2427     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2428   fi
2429 done
2430 if test -z "$ac_sed_cmds"; then
2431   ac_sed_cmds=cat
2432 fi
2433 EOF
2434
2435 cat >> $CONFIG_STATUS <<EOF
2436
2437 CONFIG_FILES=\${CONFIG_FILES-"config.mk utils/Makefile"}
2438 EOF
2439 cat >> $CONFIG_STATUS <<\EOF
2440 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2441   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2442   case "$ac_file" in
2443   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2444        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2445   *) ac_file_in="${ac_file}.in" ;;
2446   esac
2447
2448   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2449
2450   # Remove last slash and all that follows it.  Not all systems have dirname.
2451   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2452   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2453     # The file is in a subdirectory.
2454     test ! -d "$ac_dir" && mkdir "$ac_dir"
2455     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2456     # A "../" for each directory in $ac_dir_suffix.
2457     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2458   else
2459     ac_dir_suffix= ac_dots=
2460   fi
2461
2462   case "$ac_given_srcdir" in
2463   .)  srcdir=.
2464       if test -z "$ac_dots"; then top_srcdir=.
2465       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2466   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2467   *) # Relative path.
2468     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2469     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2470   esac
2471
2472   case "$ac_given_INSTALL" in
2473   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2474   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2475   esac
2476
2477   echo creating "$ac_file"
2478   rm -f "$ac_file"
2479   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2480   case "$ac_file" in
2481   *Makefile*) ac_comsub="1i\\
2482 # $configure_input" ;;
2483   *) ac_comsub= ;;
2484   esac
2485
2486   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2487   sed -e "$ac_comsub
2488 s%@configure_input@%$configure_input%g
2489 s%@srcdir@%$srcdir%g
2490 s%@top_srcdir@%$top_srcdir%g
2491 s%@INSTALL@%$INSTALL%g
2492 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2493 fi; done
2494 rm -f conftest.s*
2495
2496 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2497 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2498 #
2499 # ac_d sets the value in "#define NAME VALUE" lines.
2500 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2501 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2502 ac_dC='\3'
2503 ac_dD='%g'
2504 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2505 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2506 ac_uB='\([      ]\)%\1#\2define\3'
2507 ac_uC=' '
2508 ac_uD='\4%g'
2509 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2510 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2511 ac_eB='$%\1#\2define\3'
2512 ac_eC=' '
2513 ac_eD='%g'
2514
2515 if test "${CONFIG_HEADERS+set}" != set; then
2516 EOF
2517 cat >> $CONFIG_STATUS <<EOF
2518   CONFIG_HEADERS="support/include/config.h"
2519 EOF
2520 cat >> $CONFIG_STATUS <<\EOF
2521 fi
2522 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2523   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2524   case "$ac_file" in
2525   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2526        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2527   *) ac_file_in="${ac_file}.in" ;;
2528   esac
2529
2530   echo creating $ac_file
2531
2532   rm -f conftest.frag conftest.in conftest.out
2533   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2534   cat $ac_file_inputs > conftest.in
2535
2536 EOF
2537
2538 # Transform confdefs.h into a sed script conftest.vals that substitutes
2539 # the proper values into config.h.in to produce config.h.  And first:
2540 # Protect against being on the right side of a sed subst in config.status.
2541 # Protect against being in an unquoted here document in config.status.
2542 rm -f conftest.vals
2543 cat > conftest.hdr <<\EOF
2544 s/[\\&%]/\\&/g
2545 s%[\\$`]%\\&%g
2546 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2547 s%ac_d%ac_u%gp
2548 s%ac_u%ac_e%gp
2549 EOF
2550 sed -n -f conftest.hdr confdefs.h > conftest.vals
2551 rm -f conftest.hdr
2552
2553 # This sed command replaces #undef with comments.  This is necessary, for
2554 # example, in the case of _POSIX_SOURCE, which is predefined and required
2555 # on some systems where configure will not decide to define it.
2556 cat >> conftest.vals <<\EOF
2557 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2558 EOF
2559
2560 # Break up conftest.vals because some shells have a limit on
2561 # the size of here documents, and old seds have small limits too.
2562
2563 rm -f conftest.tail
2564 while :
2565 do
2566   ac_lines=`grep -c . conftest.vals`
2567   # grep -c gives empty output for an empty file on some AIX systems.
2568   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2569   # Write a limited-size here document to conftest.frag.
2570   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2571   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2572   echo 'CEOF
2573   sed -f conftest.frag conftest.in > conftest.out
2574   rm -f conftest.in
2575   mv conftest.out conftest.in
2576 ' >> $CONFIG_STATUS
2577   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2578   rm -f conftest.vals
2579   mv conftest.tail conftest.vals
2580 done
2581 rm -f conftest.vals
2582
2583 cat >> $CONFIG_STATUS <<\EOF
2584   rm -f conftest.frag conftest.h
2585   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2586   cat conftest.in >> conftest.h
2587   rm -f conftest.in
2588   if cmp -s $ac_file conftest.h 2>/dev/null; then
2589     echo "$ac_file is unchanged"
2590     rm -f conftest.h
2591   else
2592     # Remove last slash and all that follows it.  Not all systems have dirname.
2593       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2594       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2595       # The file is in a subdirectory.
2596       test ! -d "$ac_dir" && mkdir "$ac_dir"
2597     fi
2598     rm -f $ac_file
2599     mv conftest.h $ac_file
2600   fi
2601 fi; done
2602
2603 EOF
2604 cat >> $CONFIG_STATUS <<EOF
2605
2606 EOF
2607 cat >> $CONFIG_STATUS <<\EOF
2608
2609 exit 0
2610 EOF
2611 chmod +x $CONFIG_STATUS
2612 rm -fr confdefs* $ac_clean_files
2613 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2614