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