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