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