]> git.decadent.org.uk Git - nfs-utils.git/blob - configure
2001-03-11 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 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1131 echo "configure:1132: checking for ANSI C header files" >&5
1132 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1133   echo $ac_n "(cached) $ac_c" 1>&6
1134 else
1135   cat > conftest.$ac_ext <<EOF
1136 #line 1137 "configure"
1137 #include "confdefs.h"
1138 #include <stdlib.h>
1139 #include <stdarg.h>
1140 #include <string.h>
1141 #include <float.h>
1142 EOF
1143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1144 { (eval echo configure:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1146 if test -z "$ac_err"; then
1147   rm -rf conftest*
1148   ac_cv_header_stdc=yes
1149 else
1150   echo "$ac_err" >&5
1151   echo "configure: failed program was:" >&5
1152   cat conftest.$ac_ext >&5
1153   rm -rf conftest*
1154   ac_cv_header_stdc=no
1155 fi
1156 rm -f conftest*
1157
1158 if test $ac_cv_header_stdc = yes; then
1159   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1160 cat > conftest.$ac_ext <<EOF
1161 #line 1162 "configure"
1162 #include "confdefs.h"
1163 #include <string.h>
1164 EOF
1165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1166   egrep "memchr" >/dev/null 2>&1; then
1167   :
1168 else
1169   rm -rf conftest*
1170   ac_cv_header_stdc=no
1171 fi
1172 rm -f conftest*
1173
1174 fi
1175
1176 if test $ac_cv_header_stdc = yes; then
1177   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1178 cat > conftest.$ac_ext <<EOF
1179 #line 1180 "configure"
1180 #include "confdefs.h"
1181 #include <stdlib.h>
1182 EOF
1183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1184   egrep "free" >/dev/null 2>&1; then
1185   :
1186 else
1187   rm -rf conftest*
1188   ac_cv_header_stdc=no
1189 fi
1190 rm -f conftest*
1191
1192 fi
1193
1194 if test $ac_cv_header_stdc = yes; then
1195   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1196 if test "$cross_compiling" = yes; then
1197   :
1198 else
1199   cat > conftest.$ac_ext <<EOF
1200 #line 1201 "configure"
1201 #include "confdefs.h"
1202 #include <ctype.h>
1203 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1204 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1205 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1206 int main () { int i; for (i = 0; i < 256; i++)
1207 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1208 exit (0); }
1209
1210 EOF
1211 if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1212 then
1213   :
1214 else
1215   echo "configure: failed program was:" >&5
1216   cat conftest.$ac_ext >&5
1217   rm -fr conftest*
1218   ac_cv_header_stdc=no
1219 fi
1220 rm -fr conftest*
1221 fi
1222
1223 fi
1224 fi
1225
1226 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1227 if test $ac_cv_header_stdc = yes; then
1228   cat >> confdefs.h <<\EOF
1229 #define STDC_HEADERS 1
1230 EOF
1231
1232 fi
1233
1234 echo $ac_n "checking for GNU libc2""... $ac_c" 1>&6
1235 echo "configure:1236: checking for GNU libc2" >&5
1236   if eval "test \"`echo '$''{'knfsd_cv_glibc2'+set}'`\" = set"; then
1237   echo $ac_n "(cached) $ac_c" 1>&6
1238 else
1239   cat > conftest.$ac_ext <<EOF
1240 #line 1241 "configure"
1241 #include "confdefs.h"
1242
1243       #include <features.h>
1244       #if !defined(__GLIBC__)
1245       # error Nope
1246       #endif
1247 EOF
1248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1249 { (eval echo configure:1250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1251 if test -z "$ac_err"; then
1252   rm -rf conftest*
1253   knfsd_cv_glibc2=yes
1254 else
1255   echo "$ac_err" >&5
1256   echo "configure: failed program was:" >&5
1257   cat conftest.$ac_ext >&5
1258   rm -rf conftest*
1259   knfsd_cv_glibc2=no
1260 fi
1261 rm -f conftest*
1262 fi
1263
1264   echo "$ac_t""$knfsd_cv_glibc2" 1>&6
1265   if test $knfsd_cv_glibc2 = yes; then
1266     CFLAGS="$CFLAGS -D_GNU_SOURCE"
1267     CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE"
1268   fi
1269
1270
1271 echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1272 echo "configure:1273: checking for main in -lsocket" >&5
1273 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1274 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1275   echo $ac_n "(cached) $ac_c" 1>&6
1276 else
1277   ac_save_LIBS="$LIBS"
1278 LIBS="-lsocket  $LIBS"
1279 cat > conftest.$ac_ext <<EOF
1280 #line 1281 "configure"
1281 #include "confdefs.h"
1282
1283 int main() {
1284 main()
1285 ; return 0; }
1286 EOF
1287 if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1288   rm -rf conftest*
1289   eval "ac_cv_lib_$ac_lib_var=yes"
1290 else
1291   echo "configure: failed program was:" >&5
1292   cat conftest.$ac_ext >&5
1293   rm -rf conftest*
1294   eval "ac_cv_lib_$ac_lib_var=no"
1295 fi
1296 rm -f conftest*
1297 LIBS="$ac_save_LIBS"
1298
1299 fi
1300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1301   echo "$ac_t""yes" 1>&6
1302   LIBSOCKET="-lnsl"
1303 else
1304   echo "$ac_t""no" 1>&6
1305 fi
1306
1307 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1308 echo "configure:1309: checking for main in -lnsl" >&5
1309 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1310 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1311   echo $ac_n "(cached) $ac_c" 1>&6
1312 else
1313   ac_save_LIBS="$LIBS"
1314 LIBS="-lnsl  $LIBS"
1315 cat > conftest.$ac_ext <<EOF
1316 #line 1317 "configure"
1317 #include "confdefs.h"
1318
1319 int main() {
1320 main()
1321 ; return 0; }
1322 EOF
1323 if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1324   rm -rf conftest*
1325   eval "ac_cv_lib_$ac_lib_var=yes"
1326 else
1327   echo "configure: failed program was:" >&5
1328   cat conftest.$ac_ext >&5
1329   rm -rf conftest*
1330   eval "ac_cv_lib_$ac_lib_var=no"
1331 fi
1332 rm -f conftest*
1333 LIBS="$ac_save_LIBS"
1334
1335 fi
1336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1337   echo "$ac_t""yes" 1>&6
1338   LIBNSL="-lnsl"
1339 else
1340   echo "$ac_t""no" 1>&6
1341 fi
1342
1343 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
1344 echo "configure:1345: checking for crypt in -lcrypt" >&5
1345 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
1346 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1347   echo $ac_n "(cached) $ac_c" 1>&6
1348 else
1349   ac_save_LIBS="$LIBS"
1350 LIBS="-lcrypt  $LIBS"
1351 cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354 /* Override any gcc2 internal prototype to avoid an error.  */
1355 /* We use char because int might match the return type of a gcc2
1356     builtin and then its argument prototype would still apply.  */
1357 char crypt();
1358
1359 int main() {
1360 crypt()
1361 ; return 0; }
1362 EOF
1363 if { (eval echo configure:1364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1364   rm -rf conftest*
1365   eval "ac_cv_lib_$ac_lib_var=yes"
1366 else
1367   echo "configure: failed program was:" >&5
1368   cat conftest.$ac_ext >&5
1369   rm -rf conftest*
1370   eval "ac_cv_lib_$ac_lib_var=no"
1371 fi
1372 rm -f conftest*
1373 LIBS="$ac_save_LIBS"
1374
1375 fi
1376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1377   echo "$ac_t""yes" 1>&6
1378   LIBCRYPT="-lcrypt"
1379 else
1380   echo "$ac_t""no" 1>&6
1381 fi
1382
1383 if test "$knfsd_cv_glibc2" = no; then
1384     echo $ac_n "checking for daemon in -lbsd""... $ac_c" 1>&6
1385 echo "configure:1386: checking for daemon in -lbsd" >&5
1386 ac_lib_var=`echo bsd'_'daemon | sed 'y%./+-%__p_%'`
1387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1388   echo $ac_n "(cached) $ac_c" 1>&6
1389 else
1390   ac_save_LIBS="$LIBS"
1391 LIBS="-lbsd  $LIBS"
1392 cat > conftest.$ac_ext <<EOF
1393 #line 1394 "configure"
1394 #include "confdefs.h"
1395 /* Override any gcc2 internal prototype to avoid an error.  */
1396 /* We use char because int might match the return type of a gcc2
1397     builtin and then its argument prototype would still apply.  */
1398 char daemon();
1399
1400 int main() {
1401 daemon()
1402 ; return 0; }
1403 EOF
1404 if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1405   rm -rf conftest*
1406   eval "ac_cv_lib_$ac_lib_var=yes"
1407 else
1408   echo "configure: failed program was:" >&5
1409   cat conftest.$ac_ext >&5
1410   rm -rf conftest*
1411   eval "ac_cv_lib_$ac_lib_var=no"
1412 fi
1413 rm -f conftest*
1414 LIBS="$ac_save_LIBS"
1415
1416 fi
1417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1418   echo "$ac_t""yes" 1>&6
1419   LIBBSD="-lbsd"
1420 else
1421   echo "$ac_t""no" 1>&6
1422 fi
1423
1424 fi
1425
1426
1427
1428
1429
1430 echo $ac_n "checking for the tcp wrapper library""... $ac_c" 1>&6
1431 echo "configure:1432: checking for the tcp wrapper library" >&5
1432   if eval "test \"`echo '$''{'knfsd_cv_tcp_wrapper'+set}'`\" = set"; then
1433   echo $ac_n "(cached) $ac_c" 1>&6
1434 else
1435   old_LIBS="$LIBS"
1436    LIBS="$LIBS -lwrap $LIBNSL"
1437    cat > conftest.$ac_ext <<EOF
1438 #line 1439 "configure"
1439 #include "confdefs.h"
1440
1441       int deny_severity = 0;
1442       int allow_severity = 0;
1443 int main() {
1444 return hosts_ctl ("nfsd", "", "")
1445 ; return 0; }
1446 EOF
1447 if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1448   rm -rf conftest*
1449   knfsd_cv_tcp_wrapper=yes
1450 else
1451   echo "configure: failed program was:" >&5
1452   cat conftest.$ac_ext >&5
1453   rm -rf conftest*
1454   knfsd_cv_tcp_wrapper=no
1455 fi
1456 rm -f conftest*
1457    LIBS="$old_LIBS"
1458 fi
1459
1460   echo "$ac_t""$knfsd_cv_tcp_wrapper" 1>&6
1461   if test "$knfsd_cv_tcp_wrapper" = yes; then
1462     CFLAGS="$CFLAGS -DHAVE_TCP_WRAPPER"
1463     CXXFLAGS="$CXXFLAGS -DHAVE_TCP_WRAPPER"
1464     LIBWRAP="-lwrap"
1465   fi
1466
1467
1468
1469
1470 for ac_func in innetgr
1471 do
1472 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1473 echo "configure:1474: checking for $ac_func" >&5
1474 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1475   echo $ac_n "(cached) $ac_c" 1>&6
1476 else
1477   cat > conftest.$ac_ext <<EOF
1478 #line 1479 "configure"
1479 #include "confdefs.h"
1480 /* System header to define __stub macros and hopefully few prototypes,
1481     which can conflict with char $ac_func(); below.  */
1482 #include <assert.h>
1483 /* Override any gcc2 internal prototype to avoid an error.  */
1484 /* We use char because int might match the return type of a gcc2
1485     builtin and then its argument prototype would still apply.  */
1486 char $ac_func();
1487
1488 int main() {
1489
1490 /* The GNU C library defines this for functions which it implements
1491     to always fail with ENOSYS.  Some functions are actually named
1492     something starting with __ and the normal name is an alias.  */
1493 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1494 choke me
1495 #else
1496 $ac_func();
1497 #endif
1498
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_func_$ac_func=yes"
1504 else
1505   echo "configure: failed program was:" >&5
1506   cat conftest.$ac_ext >&5
1507   rm -rf conftest*
1508   eval "ac_cv_func_$ac_func=no"
1509 fi
1510 rm -f conftest*
1511 fi
1512
1513 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1514   echo "$ac_t""yes" 1>&6
1515     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1516   cat >> confdefs.h <<EOF
1517 #define $ac_tr_func 1
1518 EOF
1519  
1520 else
1521   echo "$ac_t""no" 1>&6
1522 fi
1523 done
1524
1525
1526 cat >> confdefs.h <<EOF
1527 #define NFS_STATEDIR "$statedir"
1528 EOF
1529
1530
1531
1532
1533
1534 trap '' 1 2 15
1535 cat > confcache <<\EOF
1536 # This file is a shell script that caches the results of configure
1537 # tests run on this system so they can be shared between configure
1538 # scripts and configure runs.  It is not useful on other systems.
1539 # If it contains results you don't want to keep, you may remove or edit it.
1540 #
1541 # By default, configure uses ./config.cache as the cache file,
1542 # creating it if it does not exist already.  You can give configure
1543 # the --cache-file=FILE option to use a different cache file; that is
1544 # what configure does when it calls configure scripts in
1545 # subdirectories, so they share the cache.
1546 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1547 # config.status only pays attention to the cache file if you give it the
1548 # --recheck option to rerun configure.
1549 #
1550 EOF
1551 # The following way of writing the cache mishandles newlines in values,
1552 # but we know of no workaround that is simple, portable, and efficient.
1553 # So, don't put newlines in cache variables' values.
1554 # Ultrix sh set writes to stderr and can't be redirected directly,
1555 # and sets the high bit in the cache file unless we assign to the vars.
1556 (set) 2>&1 |
1557   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1558   *ac_space=\ *)
1559     # `set' does not quote correctly, so add quotes (double-quote substitution
1560     # turns \\\\ into \\, and sed turns \\ into \).
1561     sed -n \
1562       -e "s/'/'\\\\''/g" \
1563       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1564     ;;
1565   *)
1566     # `set' quotes correctly as required by POSIX, so do not add quotes.
1567     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1568     ;;
1569   esac >> confcache
1570 if cmp -s $cache_file confcache; then
1571   :
1572 else
1573   if test -w $cache_file; then
1574     echo "updating cache $cache_file"
1575     cat confcache > $cache_file
1576   else
1577     echo "not updating unwritable cache $cache_file"
1578   fi
1579 fi
1580 rm -f confcache
1581
1582 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1583
1584 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1585 # Let make expand exec_prefix.
1586 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1587
1588 # Any assignment to VPATH causes Sun make to only execute
1589 # the first set of double-colon rules, so remove it if not needed.
1590 # If there is a colon in the path, we need to keep it.
1591 if test "x$srcdir" = x.; then
1592   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1593 fi
1594
1595 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1596
1597 DEFS=-DHAVE_CONFIG_H
1598
1599 # Without the "./", some shells look in PATH for config.status.
1600 : ${CONFIG_STATUS=./config.status}
1601
1602 echo creating $CONFIG_STATUS
1603 rm -f $CONFIG_STATUS
1604 cat > $CONFIG_STATUS <<EOF
1605 #! /bin/sh
1606 # Generated automatically by configure.
1607 # Run this file to recreate the current configuration.
1608 # This directory was configured as follows,
1609 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1610 #
1611 # $0 $ac_configure_args
1612 #
1613 # Compiler output produced by configure, useful for debugging
1614 # configure, is in ./config.log if it exists.
1615
1616 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1617 for ac_option
1618 do
1619   case "\$ac_option" in
1620   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1621     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1622     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1623   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1624     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1625     exit 0 ;;
1626   -help | --help | --hel | --he | --h)
1627     echo "\$ac_cs_usage"; exit 0 ;;
1628   *) echo "\$ac_cs_usage"; exit 1 ;;
1629   esac
1630 done
1631
1632 ac_given_srcdir=$srcdir
1633 ac_given_INSTALL="$INSTALL"
1634
1635 trap 'rm -fr `echo "config.mk nfs-utils.spec support/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1636 EOF
1637 cat >> $CONFIG_STATUS <<EOF
1638
1639 # Protect against being on the right side of a sed subst in config.status.
1640 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1641  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1642 $ac_vpsub
1643 $extrasub
1644 s%@SHELL@%$SHELL%g
1645 s%@CFLAGS@%$CFLAGS%g
1646 s%@CPPFLAGS@%$CPPFLAGS%g
1647 s%@CXXFLAGS@%$CXXFLAGS%g
1648 s%@FFLAGS@%$FFLAGS%g
1649 s%@DEFS@%$DEFS%g
1650 s%@LDFLAGS@%$LDFLAGS%g
1651 s%@LIBS@%$LIBS%g
1652 s%@exec_prefix@%$exec_prefix%g
1653 s%@prefix@%$prefix%g
1654 s%@program_transform_name@%$program_transform_name%g
1655 s%@bindir@%$bindir%g
1656 s%@sbindir@%$sbindir%g
1657 s%@libexecdir@%$libexecdir%g
1658 s%@datadir@%$datadir%g
1659 s%@sysconfdir@%$sysconfdir%g
1660 s%@sharedstatedir@%$sharedstatedir%g
1661 s%@localstatedir@%$localstatedir%g
1662 s%@libdir@%$libdir%g
1663 s%@includedir@%$includedir%g
1664 s%@oldincludedir@%$oldincludedir%g
1665 s%@infodir@%$infodir%g
1666 s%@mandir@%$mandir%g
1667 s%@VERSION@%$VERSION%g
1668 s%@RELEASE@%$RELEASE%g
1669 s%@statedir@%$statedir%g
1670 s%@enable_nfsv3@%$enable_nfsv3%g
1671 s%@kprefix@%$kprefix%g
1672 s%@secure_statd@%$secure_statd%g
1673 s%@CC@%$CC%g
1674 s%@CXX@%$CXX%g
1675 s%@CPP@%$CPP%g
1676 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1677 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
1678 s%@INSTALL_DATA@%$INSTALL_DATA%g
1679 s%@LIBSOCKET@%$LIBSOCKET%g
1680 s%@LIBNSL@%$LIBNSL%g
1681 s%@LIBCRYPT@%$LIBCRYPT%g
1682 s%@LIBBSD@%$LIBBSD%g
1683 s%@LIBWRAP@%$LIBWRAP%g
1684
1685 CEOF
1686 EOF
1687
1688 cat >> $CONFIG_STATUS <<\EOF
1689
1690 # Split the substitutions into bite-sized pieces for seds with
1691 # small command number limits, like on Digital OSF/1 and HP-UX.
1692 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1693 ac_file=1 # Number of current file.
1694 ac_beg=1 # First line for current file.
1695 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1696 ac_more_lines=:
1697 ac_sed_cmds=""
1698 while $ac_more_lines; do
1699   if test $ac_beg -gt 1; then
1700     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1701   else
1702     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1703   fi
1704   if test ! -s conftest.s$ac_file; then
1705     ac_more_lines=false
1706     rm -f conftest.s$ac_file
1707   else
1708     if test -z "$ac_sed_cmds"; then
1709       ac_sed_cmds="sed -f conftest.s$ac_file"
1710     else
1711       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1712     fi
1713     ac_file=`expr $ac_file + 1`
1714     ac_beg=$ac_end
1715     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1716   fi
1717 done
1718 if test -z "$ac_sed_cmds"; then
1719   ac_sed_cmds=cat
1720 fi
1721 EOF
1722
1723 cat >> $CONFIG_STATUS <<EOF
1724
1725 CONFIG_FILES=\${CONFIG_FILES-"config.mk nfs-utils.spec"}
1726 EOF
1727 cat >> $CONFIG_STATUS <<\EOF
1728 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1729   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1730   case "$ac_file" in
1731   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1732        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1733   *) ac_file_in="${ac_file}.in" ;;
1734   esac
1735
1736   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1737
1738   # Remove last slash and all that follows it.  Not all systems have dirname.
1739   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1740   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1741     # The file is in a subdirectory.
1742     test ! -d "$ac_dir" && mkdir "$ac_dir"
1743     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1744     # A "../" for each directory in $ac_dir_suffix.
1745     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1746   else
1747     ac_dir_suffix= ac_dots=
1748   fi
1749
1750   case "$ac_given_srcdir" in
1751   .)  srcdir=.
1752       if test -z "$ac_dots"; then top_srcdir=.
1753       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1754   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1755   *) # Relative path.
1756     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1757     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1758   esac
1759
1760   case "$ac_given_INSTALL" in
1761   [/$]*) INSTALL="$ac_given_INSTALL" ;;
1762   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1763   esac
1764
1765   echo creating "$ac_file"
1766   rm -f "$ac_file"
1767   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1768   case "$ac_file" in
1769   *Makefile*) ac_comsub="1i\\
1770 # $configure_input" ;;
1771   *) ac_comsub= ;;
1772   esac
1773
1774   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1775   sed -e "$ac_comsub
1776 s%@configure_input@%$configure_input%g
1777 s%@srcdir@%$srcdir%g
1778 s%@top_srcdir@%$top_srcdir%g
1779 s%@INSTALL@%$INSTALL%g
1780 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1781 fi; done
1782 rm -f conftest.s*
1783
1784 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1785 # NAME is the cpp macro being defined and VALUE is the value it is being given.
1786 #
1787 # ac_d sets the value in "#define NAME VALUE" lines.
1788 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
1789 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
1790 ac_dC='\3'
1791 ac_dD='%g'
1792 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1793 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1794 ac_uB='\([      ]\)%\1#\2define\3'
1795 ac_uC=' '
1796 ac_uD='\4%g'
1797 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1798 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
1799 ac_eB='$%\1#\2define\3'
1800 ac_eC=' '
1801 ac_eD='%g'
1802
1803 if test "${CONFIG_HEADERS+set}" != set; then
1804 EOF
1805 cat >> $CONFIG_STATUS <<EOF
1806   CONFIG_HEADERS="support/include/config.h"
1807 EOF
1808 cat >> $CONFIG_STATUS <<\EOF
1809 fi
1810 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1811   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1812   case "$ac_file" in
1813   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1814        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1815   *) ac_file_in="${ac_file}.in" ;;
1816   esac
1817
1818   echo creating $ac_file
1819
1820   rm -f conftest.frag conftest.in conftest.out
1821   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1822   cat $ac_file_inputs > conftest.in
1823
1824 EOF
1825
1826 # Transform confdefs.h into a sed script conftest.vals that substitutes
1827 # the proper values into config.h.in to produce config.h.  And first:
1828 # Protect against being on the right side of a sed subst in config.status.
1829 # Protect against being in an unquoted here document in config.status.
1830 rm -f conftest.vals
1831 cat > conftest.hdr <<\EOF
1832 s/[\\&%]/\\&/g
1833 s%[\\$`]%\\&%g
1834 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1835 s%ac_d%ac_u%gp
1836 s%ac_u%ac_e%gp
1837 EOF
1838 sed -n -f conftest.hdr confdefs.h > conftest.vals
1839 rm -f conftest.hdr
1840
1841 # This sed command replaces #undef with comments.  This is necessary, for
1842 # example, in the case of _POSIX_SOURCE, which is predefined and required
1843 # on some systems where configure will not decide to define it.
1844 cat >> conftest.vals <<\EOF
1845 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1846 EOF
1847
1848 # Break up conftest.vals because some shells have a limit on
1849 # the size of here documents, and old seds have small limits too.
1850
1851 rm -f conftest.tail
1852 while :
1853 do
1854   ac_lines=`grep -c . conftest.vals`
1855   # grep -c gives empty output for an empty file on some AIX systems.
1856   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1857   # Write a limited-size here document to conftest.frag.
1858   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1859   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1860   echo 'CEOF
1861   sed -f conftest.frag conftest.in > conftest.out
1862   rm -f conftest.in
1863   mv conftest.out conftest.in
1864 ' >> $CONFIG_STATUS
1865   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1866   rm -f conftest.vals
1867   mv conftest.tail conftest.vals
1868 done
1869 rm -f conftest.vals
1870
1871 cat >> $CONFIG_STATUS <<\EOF
1872   rm -f conftest.frag conftest.h
1873   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
1874   cat conftest.in >> conftest.h
1875   rm -f conftest.in
1876   if cmp -s $ac_file conftest.h 2>/dev/null; then
1877     echo "$ac_file is unchanged"
1878     rm -f conftest.h
1879   else
1880     # Remove last slash and all that follows it.  Not all systems have dirname.
1881       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1882       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1883       # The file is in a subdirectory.
1884       test ! -d "$ac_dir" && mkdir "$ac_dir"
1885     fi
1886     rm -f $ac_file
1887     mv conftest.h $ac_file
1888   fi
1889 fi; done
1890
1891 EOF
1892 cat >> $CONFIG_STATUS <<EOF
1893
1894 EOF
1895 cat >> $CONFIG_STATUS <<\EOF
1896
1897 exit 0
1898 EOF
1899 chmod +x $CONFIG_STATUS
1900 rm -fr confdefs* $ac_clean_files
1901 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1902