]>
Commit | Line | Data |
---|---|---|
66b40a0b AM |
1 | |
2 | ||
3 | The complete set of CITI nfs-utils patches rolled into one patch. | |
4 | ||
5 | Changes since 1.0.7-CITI_NFS4_ALL-1: | |
6 | * Clean up configure, especially for Kerberos checking | |
7 | * Fixes for gss context serialization on 64-bit machines | |
8 | * Properly limit the encryption types when using MIT | |
9 | Kerberos 1.4 or later | |
10 | * Add options to turn on rpcsec_gss library debugging | |
11 | if supported by the library | |
12 | * Changes that allow compiling with Heimdal Kerberos | |
13 | libraries. | |
14 | NOTE: There are still run-time problems when using | |
15 | the Heimdal libraries. | |
16 | ||
17 | ||
18 | --- | |
19 | ||
20 | /dev/null | 4185 --------- | |
21 | nfs-utils-1.0.7-kwc/config.mk.in | 1 | |
22 | nfs-utils-1.0.7-kwc/configure | 7206 +++++++++++++---- | |
23 | nfs-utils-1.0.7-kwc/configure.in | 83 | |
24 | nfs-utils-1.0.7-kwc/debian/control | 2 | |
25 | nfs-utils-1.0.7-kwc/debian/nfs-common.conffiles | 1 | |
26 | nfs-utils-1.0.7-kwc/debian/nfs-common.install | 1 | |
27 | nfs-utils-1.0.7-kwc/support/Makefile | 2 | |
28 | nfs-utils-1.0.7-kwc/support/include/config.h.in | 31 | |
29 | nfs-utils-1.0.7-kwc/support/include/gssapi/gssapi.h | 24 | |
30 | nfs-utils-1.0.7-kwc/support/rpc/include/rpc/auth_gss.h | 3 | |
31 | nfs-utils-1.0.7-kwc/utils/gssd/Makefile | 3 | |
32 | nfs-utils-1.0.7-kwc/utils/gssd/context_heimdal.c | 25 | |
33 | nfs-utils-1.0.7-kwc/utils/gssd/gss_oids.h | 1 | |
34 | nfs-utils-1.0.7-kwc/utils/gssd/gssd.c | 17 | |
35 | nfs-utils-1.0.7-kwc/utils/gssd/gssd.man | 6 | |
36 | nfs-utils-1.0.7-kwc/utils/gssd/krb5_util.c | 114 | |
37 | nfs-utils-1.0.7-kwc/utils/gssd/write_bytes.h | 18 | |
38 | nfs-utils-1.0.7-kwc/utils/idmapd/idmapd.c | 59 | |
39 | nfs-utils-1.0.7-kwc/utils/mountd/mountd.c | 8 | |
40 | nfs-utils-1.0.7-kwc/utils/svcgssd/Makefile | 25 | |
41 | nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd.c | 17 | |
42 | nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd.man | 6 | |
43 | nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd_main_loop.c | 11 | |
44 | nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd_proc.c | 33 | |
45 | 25 files changed, 5864 insertions(+), 6018 deletions(-) | |
46 | ||
47 | diff -puN config.mk.in~CITI_NFS4_ALL config.mk.in | |
48 | --- nfs-utils-1.0.7/config.mk.in~CITI_NFS4_ALL 2005-05-06 15:19:22.201567000 -0400 | |
49 | +++ nfs-utils-1.0.7-kwc/config.mk.in 2005-05-06 15:19:22.465320000 -0400 | |
50 | @@ -61,7 +61,6 @@ INSTALL = install | |
51 | MAN2PS = groff -Tps -man | |
52 | ||
53 | AFLAGS = -I$(TOP)support/include \ | |
54 | - -I$(KRBDIR)/include \ | |
55 | -Wall $(ARCHFLAGS) -pipe | |
56 | ifdef KERNEL_INCDIR | |
57 | AFLAGS += -I$(KERNEL_INCDIR) | |
58 | diff -puN configure~CITI_NFS4_ALL configure | |
59 | --- nfs-utils-1.0.7/configure~CITI_NFS4_ALL 2005-05-06 15:19:22.266501000 -0400 | |
60 | +++ nfs-utils-1.0.7-kwc/configure 2005-05-06 15:19:26.618156000 -0400 | |
61 | @@ -1,47 +1,326 @@ | |
62 | #! /bin/sh | |
63 | - | |
64 | # Guess values for system-dependent variables and create Makefiles. | |
65 | -# Generated automatically using autoconf version 2.13 | |
66 | -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. | |
67 | +# Generated by GNU Autoconf 2.59. | |
68 | # | |
69 | +# Copyright (C) 2003 Free Software Foundation, Inc. | |
70 | # This configure script is free software; the Free Software Foundation | |
71 | # gives unlimited permission to copy, distribute and modify it. | |
72 | +## --------------------- ## | |
73 | +## M4sh Initialization. ## | |
74 | +## --------------------- ## | |
75 | + | |
76 | +# Be Bourne compatible | |
77 | +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
78 | + emulate sh | |
79 | + NULLCMD=: | |
80 | + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
81 | + # is contrary to our usage. Disable this feature. | |
82 | + alias -g '${1+"$@"}'='"$@"' | |
83 | +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
84 | + set -o posix | |
85 | +fi | |
86 | +DUALCASE=1; export DUALCASE # for MKS sh | |
87 | + | |
88 | +# Support unset when possible. | |
89 | +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
90 | + as_unset=unset | |
91 | +else | |
92 | + as_unset=false | |
93 | +fi | |
94 | + | |
95 | + | |
96 | +# Work around bugs in pre-3.0 UWIN ksh. | |
97 | +$as_unset ENV MAIL MAILPATH | |
98 | +PS1='$ ' | |
99 | +PS2='> ' | |
100 | +PS4='+ ' | |
101 | + | |
102 | +# NLS nuisances. | |
103 | +for as_var in \ | |
104 | + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
105 | + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
106 | + LC_TELEPHONE LC_TIME | |
107 | +do | |
108 | + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then | |
109 | + eval $as_var=C; export $as_var | |
110 | + else | |
111 | + $as_unset $as_var | |
112 | + fi | |
113 | +done | |
114 | + | |
115 | +# Required to use basename. | |
116 | +if expr a : '\(a\)' >/dev/null 2>&1; then | |
117 | + as_expr=expr | |
118 | +else | |
119 | + as_expr=false | |
120 | +fi | |
121 | + | |
122 | +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then | |
123 | + as_basename=basename | |
124 | +else | |
125 | + as_basename=false | |
126 | +fi | |
127 | + | |
128 | + | |
129 | +# Name of the executable. | |
130 | +as_me=`$as_basename "$0" || | |
131 | +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
132 | + X"$0" : 'X\(//\)$' \| \ | |
133 | + X"$0" : 'X\(/\)$' \| \ | |
134 | + . : '\(.\)' 2>/dev/null || | |
135 | +echo X/"$0" | | |
136 | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
137 | + /^X\/\(\/\/\)$/{ s//\1/; q; } | |
138 | + /^X\/\(\/\).*/{ s//\1/; q; } | |
139 | + s/.*/./; q'` | |
140 | + | |
141 | + | |
142 | +# PATH needs CR, and LINENO needs CR and PATH. | |
143 | +# Avoid depending upon Character Ranges. | |
144 | +as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
145 | +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
146 | +as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
147 | +as_cr_digits='0123456789' | |
148 | +as_cr_alnum=$as_cr_Letters$as_cr_digits | |
149 | + | |
150 | +# The user is always right. | |
151 | +if test "${PATH_SEPARATOR+set}" != set; then | |
152 | + echo "#! /bin/sh" >conf$$.sh | |
153 | + echo "exit 0" >>conf$$.sh | |
154 | + chmod +x conf$$.sh | |
155 | + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
156 | + PATH_SEPARATOR=';' | |
157 | + else | |
158 | + PATH_SEPARATOR=: | |
159 | + fi | |
160 | + rm -f conf$$.sh | |
161 | +fi | |
162 | + | |
163 | + | |
164 | + as_lineno_1=$LINENO | |
165 | + as_lineno_2=$LINENO | |
166 | + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
167 | + test "x$as_lineno_1" != "x$as_lineno_2" && | |
168 | + test "x$as_lineno_3" = "x$as_lineno_2" || { | |
169 | + # Find who we are. Look in the path if we contain no path at all | |
170 | + # relative or not. | |
171 | + case $0 in | |
172 | + *[\\/]* ) as_myself=$0 ;; | |
173 | + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
174 | +for as_dir in $PATH | |
175 | +do | |
176 | + IFS=$as_save_IFS | |
177 | + test -z "$as_dir" && as_dir=. | |
178 | + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
179 | +done | |
180 | + | |
181 | + ;; | |
182 | + esac | |
183 | + # We did not find ourselves, most probably we were run as `sh COMMAND' | |
184 | + # in which case we are not to be found in the path. | |
185 | + if test "x$as_myself" = x; then | |
186 | + as_myself=$0 | |
187 | + fi | |
188 | + if test ! -f "$as_myself"; then | |
189 | + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 | |
190 | + { (exit 1); exit 1; }; } | |
191 | + fi | |
192 | + case $CONFIG_SHELL in | |
193 | + '') | |
194 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
195 | +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
196 | +do | |
197 | + IFS=$as_save_IFS | |
198 | + test -z "$as_dir" && as_dir=. | |
199 | + for as_base in sh bash ksh sh5; do | |
200 | + case $as_dir in | |
201 | + /*) | |
202 | + if ("$as_dir/$as_base" -c ' | |
203 | + as_lineno_1=$LINENO | |
204 | + as_lineno_2=$LINENO | |
205 | + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
206 | + test "x$as_lineno_1" != "x$as_lineno_2" && | |
207 | + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
208 | + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
209 | + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
210 | + CONFIG_SHELL=$as_dir/$as_base | |
211 | + export CONFIG_SHELL | |
212 | + exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
213 | + fi;; | |
214 | + esac | |
215 | + done | |
216 | +done | |
217 | +;; | |
218 | + esac | |
219 | + | |
220 | + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
221 | + # uniformly replaced by the line number. The first 'sed' inserts a | |
222 | + # line-number line before each line; the second 'sed' does the real | |
223 | + # work. The second script uses 'N' to pair each line-number line | |
224 | + # with the numbered line, and appends trailing '-' during | |
225 | + # substitution so that $LINENO is not a special case at line end. | |
226 | + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
227 | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
228 | + sed '=' <$as_myself | | |
229 | + sed ' | |
230 | + N | |
231 | + s,$,-, | |
232 | + : loop | |
233 | + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
234 | + t loop | |
235 | + s,-$,, | |
236 | + s,^['$as_cr_digits']*\n,, | |
237 | + ' >$as_me.lineno && | |
238 | + chmod +x $as_me.lineno || | |
239 | + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 | |
240 | + { (exit 1); exit 1; }; } | |
241 | + | |
242 | + # Don't try to exec as it changes $[0], causing all sort of problems | |
243 | + # (the dirname of $[0] is not the place where we might find the | |
244 | + # original and so on. Autoconf is especially sensible to this). | |
245 | + . ./$as_me.lineno | |
246 | + # Exit status is that of the last command. | |
247 | + exit | |
248 | +} | |
249 | + | |
250 | + | |
251 | +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
252 | + *c*,-n*) ECHO_N= ECHO_C=' | |
253 | +' ECHO_T=' ' ;; | |
254 | + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
255 | + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
256 | +esac | |
257 | + | |
258 | +if expr a : '\(a\)' >/dev/null 2>&1; then | |
259 | + as_expr=expr | |
260 | +else | |
261 | + as_expr=false | |
262 | +fi | |
263 | + | |
264 | +rm -f conf$$ conf$$.exe conf$$.file | |
265 | +echo >conf$$.file | |
266 | +if ln -s conf$$.file conf$$ 2>/dev/null; then | |
267 | + # We could just check for DJGPP; but this test a) works b) is more generic | |
268 | + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
269 | + if test -f conf$$.exe; then | |
270 | + # Don't use ln at all; we don't have any links | |
271 | + as_ln_s='cp -p' | |
272 | + else | |
273 | + as_ln_s='ln -s' | |
274 | + fi | |
275 | +elif ln conf$$.file conf$$ 2>/dev/null; then | |
276 | + as_ln_s=ln | |
277 | +else | |
278 | + as_ln_s='cp -p' | |
279 | +fi | |
280 | +rm -f conf$$ conf$$.exe conf$$.file | |
281 | + | |
282 | +if mkdir -p . 2>/dev/null; then | |
283 | + as_mkdir_p=: | |
284 | +else | |
285 | + test -d ./-p && rmdir ./-p | |
286 | + as_mkdir_p=false | |
287 | +fi | |
288 | + | |
289 | +as_executable_p="test -f" | |
290 | + | |
291 | +# Sed expression to map a string onto a valid CPP name. | |
292 | +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
293 | + | |
294 | +# Sed expression to map a string onto a valid variable name. | |
295 | +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
296 | + | |
297 | + | |
298 | +# IFS | |
299 | +# We need space, tab and new line, in precisely that order. | |
300 | +as_nl=' | |
301 | +' | |
302 | +IFS=" $as_nl" | |
303 | + | |
304 | +# CDPATH. | |
305 | +$as_unset CDPATH | |
306 | ||
307 | -# Defaults: | |
308 | -ac_help= | |
309 | + | |
310 | +# Name of the host. | |
311 | +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | |
312 | +# so uname gets run too. | |
313 | +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
314 | + | |
315 | +exec 6>&1 | |
316 | + | |
317 | +# | |
318 | +# Initializations. | |
319 | +# | |
320 | ac_default_prefix=/usr/local | |
321 | -# Any additions from configure.in: | |
322 | +ac_config_libobj_dir=. | |
323 | +cross_compiling=no | |
324 | +subdirs= | |
325 | +MFLAGS= | |
326 | +MAKEFLAGS= | |
327 | +SHELL=${CONFIG_SHELL-/bin/sh} | |
328 | + | |
329 | +# Maximum number of lines to put in a shell here document. | |
330 | +# This variable seems obsolete. It should probably be removed, and | |
331 | +# only ac_max_sed_lines should be used. | |
332 | +: ${ac_max_here_lines=38} | |
333 | + | |
334 | +# Identity of this package. | |
335 | +PACKAGE_NAME= | |
336 | +PACKAGE_TARNAME= | |
337 | +PACKAGE_VERSION= | |
338 | +PACKAGE_STRING= | |
339 | +PACKAGE_BUGREPORT= | |
340 | + | |
341 | +ac_unique_file="rules.mk" | |
342 | ac_default_prefix=/usr | |
343 | -ac_help="$ac_help | |
344 | - --with-release=XXX set release to XXX [1]" | |
345 | -ac_help="$ac_help | |
346 | - --with-statedir=/foo use state dir /foo [/var/lib/nfs]" | |
347 | -ac_help="$ac_help | |
348 | - --with-statduser=rpcuser user for statd to run under [rpcuser or nobody]" | |
349 | -ac_help="$ac_help | |
350 | - --enable-nfsv3 enable support for NFSv3" | |
351 | -ac_help="$ac_help | |
352 | - --enable-nfsv4 enable support for NFSv4" | |
353 | -ac_help="$ac_help | |
354 | - --enable-gss enable support for rpcsec_gss" | |
355 | -ac_help="$ac_help | |
356 | - --enable-kprefix install progs as rpc.knfsd etc" | |
357 | -ac_help="$ac_help | |
358 | - --enable-secure-statd Only lockd can use statd (security)" | |
359 | -ac_help="$ac_help | |
360 | - --enable-rquotad enable rquotad" | |
361 | -ac_help="$ac_help | |
362 | - --with-krb5=DIR use Kerberos v5 installation in DIR" | |
363 | +# Factoring default headers for most tests. | |
364 | +ac_includes_default="\ | |
365 | +#include <stdio.h> | |
366 | +#if HAVE_SYS_TYPES_H | |
367 | +# include <sys/types.h> | |
368 | +#endif | |
369 | +#if HAVE_SYS_STAT_H | |
370 | +# include <sys/stat.h> | |
371 | +#endif | |
372 | +#if STDC_HEADERS | |
373 | +# include <stdlib.h> | |
374 | +# include <stddef.h> | |
375 | +#else | |
376 | +# if HAVE_STDLIB_H | |
377 | +# include <stdlib.h> | |
378 | +# endif | |
379 | +#endif | |
380 | +#if HAVE_STRING_H | |
381 | +# if !STDC_HEADERS && HAVE_MEMORY_H | |
382 | +# include <memory.h> | |
383 | +# endif | |
384 | +# include <string.h> | |
385 | +#endif | |
386 | +#if HAVE_STRINGS_H | |
387 | +# include <strings.h> | |
388 | +#endif | |
389 | +#if HAVE_INTTYPES_H | |
390 | +# include <inttypes.h> | |
391 | +#else | |
392 | +# if HAVE_STDINT_H | |
393 | +# include <stdint.h> | |
394 | +# endif | |
395 | +#endif | |
396 | +#if HAVE_UNISTD_H | |
397 | +# include <unistd.h> | |
398 | +#endif" | |
399 | + | |
400 | +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION RELEASE statedir statduser enable_nfsv3 IDMAPD enable_nfsv4 GSSD SVCGSSD enable_gss kprefix secure_statd RQUOTAD CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC_FOR_BUILD RANLIB ac_ct_RANLIB AR ac_ct_AR LD ac_ct_LD EGREP LIBSOCKET LIBNSL LIBCRYPT LIBBSD LIBWRAP KRBDIR KRBLIB KRBINC K5VERS CXXFLAGS LIBOBJS LTLIBOBJS' | |
401 | +ac_subst_files='' | |
402 | ||
403 | # Initialize some variables set by options. | |
404 | +ac_init_help= | |
405 | +ac_init_version=false | |
406 | # The variables have the same names as the options, with | |
407 | # dashes changed to underlines. | |
408 | -build=NONE | |
409 | -cache_file=./config.cache | |
410 | +cache_file=/dev/null | |
411 | exec_prefix=NONE | |
412 | -host=NONE | |
413 | no_create= | |
414 | -nonopt=NONE | |
415 | no_recursion= | |
416 | prefix=NONE | |
417 | program_prefix=NONE | |
418 | @@ -50,10 +329,15 @@ program_transform_name=s,x,x, | |
419 | silent= | |
420 | site= | |
421 | srcdir= | |
422 | -target=NONE | |
423 | verbose= | |
424 | x_includes=NONE | |
425 | x_libraries=NONE | |
426 | + | |
427 | +# Installation directory options. | |
428 | +# These are left unexpanded so users can "make install exec_prefix=/foo" | |
429 | +# and all the variables that are supposed to be based on exec_prefix | |
430 | +# by default will actually change. | |
431 | +# Use braces instead of parens because sh, perl, etc. also accept them. | |
432 | bindir='${exec_prefix}/bin' | |
433 | sbindir='${exec_prefix}/sbin' | |
434 | libexecdir='${exec_prefix}/libexec' | |
435 | @@ -67,17 +351,9 @@ oldincludedir='/usr/include' | |
436 | infodir='${prefix}/info' | |
437 | mandir='${prefix}/man' | |
438 | ||
439 | -# Initialize some other variables. | |
440 | -subdirs= | |
441 | -MFLAGS= MAKEFLAGS= | |
442 | -SHELL=${CONFIG_SHELL-/bin/sh} | |
443 | -# Maximum number of lines to put in a shell here document. | |
444 | -ac_max_here_lines=12 | |
445 | - | |
446 | ac_prev= | |
447 | for ac_option | |
448 | do | |
449 | - | |
450 | # If the previous option needs an argument, assign it. | |
451 | if test -n "$ac_prev"; then | |
452 | eval "$ac_prev=\$ac_option" | |
453 | @@ -85,59 +361,59 @@ do | |
454 | continue | |
455 | fi | |
456 | ||
457 | - case "$ac_option" in | |
458 | - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
459 | - *) ac_optarg= ;; | |
460 | - esac | |
461 | + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` | |
462 | ||
463 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
464 | ||
465 | - case "$ac_option" in | |
466 | + case $ac_option in | |
467 | ||
468 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
469 | ac_prev=bindir ;; | |
470 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
471 | - bindir="$ac_optarg" ;; | |
472 | + bindir=$ac_optarg ;; | |
473 | ||
474 | -build | --build | --buil | --bui | --bu) | |
475 | - ac_prev=build ;; | |
476 | + ac_prev=build_alias ;; | |
477 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
478 | - build="$ac_optarg" ;; | |
479 | + build_alias=$ac_optarg ;; | |
480 | ||
481 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
482 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
483 | ac_prev=cache_file ;; | |
484 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
485 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
486 | - cache_file="$ac_optarg" ;; | |
487 | + cache_file=$ac_optarg ;; | |
488 | + | |
489 | + --config-cache | -C) | |
490 | + cache_file=config.cache ;; | |
491 | ||
492 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
493 | ac_prev=datadir ;; | |
494 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
495 | | --da=*) | |
496 | - datadir="$ac_optarg" ;; | |
497 | + datadir=$ac_optarg ;; | |
498 | ||
499 | -disable-* | --disable-*) | |
500 | - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
501 | + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
502 | # Reject names that are not valid shell variable names. | |
503 | - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
504 | - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
505 | - fi | |
506 | - ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
507 | - eval "enable_${ac_feature}=no" ;; | |
508 | + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && | |
509 | + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
510 | + { (exit 1); exit 1; }; } | |
511 | + ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
512 | + eval "enable_$ac_feature=no" ;; | |
513 | ||
514 | -enable-* | --enable-*) | |
515 | - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
516 | + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
517 | # Reject names that are not valid shell variable names. | |
518 | - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
519 | - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
520 | - fi | |
521 | - ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
522 | - case "$ac_option" in | |
523 | - *=*) ;; | |
524 | + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && | |
525 | + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | |
526 | + { (exit 1); exit 1; }; } | |
527 | + ac_feature=`echo $ac_feature | sed 's/-/_/g'` | |
528 | + case $ac_option in | |
529 | + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
530 | *) ac_optarg=yes ;; | |
531 | esac | |
532 | - eval "enable_${ac_feature}='$ac_optarg'" ;; | |
533 | + eval "enable_$ac_feature='$ac_optarg'" ;; | |
534 | ||
535 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
536 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
537 | @@ -146,95 +422,47 @@ do | |
538 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
539 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
540 | | --exec=* | --exe=* | --ex=*) | |
541 | - exec_prefix="$ac_optarg" ;; | |
542 | + exec_prefix=$ac_optarg ;; | |
543 | ||
544 | -gas | --gas | --ga | --g) | |
545 | # Obsolete; use --with-gas. | |
546 | with_gas=yes ;; | |
547 | ||
548 | - -help | --help | --hel | --he) | |
549 | - # Omit some internal or obsolete options to make the list less imposing. | |
550 | - # This message is too long to be a string in the A/UX 3.1 sh. | |
551 | - cat << EOF | |
552 | -Usage: configure [options] [host] | |
553 | -Options: [defaults in brackets after descriptions] | |
554 | -Configuration: | |
555 | - --cache-file=FILE cache test results in FILE | |
556 | - --help print this message | |
557 | - --no-create do not create output files | |
558 | - --quiet, --silent do not print \`checking...' messages | |
559 | - --version print the version of autoconf that created configure | |
560 | -Directory and file names: | |
561 | - --prefix=PREFIX install architecture-independent files in PREFIX | |
562 | - [$ac_default_prefix] | |
563 | - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
564 | - [same as prefix] | |
565 | - --bindir=DIR user executables in DIR [EPREFIX/bin] | |
566 | - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
567 | - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
568 | - --datadir=DIR read-only architecture-independent data in DIR | |
569 | - [PREFIX/share] | |
570 | - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
571 | - --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
572 | - [PREFIX/com] | |
573 | - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
574 | - --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
575 | - --includedir=DIR C header files in DIR [PREFIX/include] | |
576 | - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
577 | - --infodir=DIR info documentation in DIR [PREFIX/info] | |
578 | - --mandir=DIR man documentation in DIR [PREFIX/man] | |
579 | - --srcdir=DIR find the sources in DIR [configure dir or ..] | |
580 | - --program-prefix=PREFIX prepend PREFIX to installed program names | |
581 | - --program-suffix=SUFFIX append SUFFIX to installed program names | |
582 | - --program-transform-name=PROGRAM | |
583 | - run sed PROGRAM on installed program names | |
584 | -EOF | |
585 | - cat << EOF | |
586 | -Host type: | |
587 | - --build=BUILD configure for building on BUILD [BUILD=HOST] | |
588 | - --host=HOST configure for HOST [guessed] | |
589 | - --target=TARGET configure for TARGET [TARGET=HOST] | |
590 | -Features and packages: | |
591 | - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
592 | - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
593 | - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
594 | - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
595 | - --x-includes=DIR X include files are in DIR | |
596 | - --x-libraries=DIR X library files are in DIR | |
597 | -EOF | |
598 | - if test -n "$ac_help"; then | |
599 | - echo "--enable and --with options recognized:$ac_help" | |
600 | - fi | |
601 | - exit 0 ;; | |
602 | + -help | --help | --hel | --he | -h) | |
603 | + ac_init_help=long ;; | |
604 | + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
605 | + ac_init_help=recursive ;; | |
606 | + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
607 | + ac_init_help=short ;; | |
608 | ||
609 | -host | --host | --hos | --ho) | |
610 | - ac_prev=host ;; | |
611 | + ac_prev=host_alias ;; | |
612 | -host=* | --host=* | --hos=* | --ho=*) | |
613 | - host="$ac_optarg" ;; | |
614 | + host_alias=$ac_optarg ;; | |
615 | ||
616 | -includedir | --includedir | --includedi | --included | --include \ | |
617 | | --includ | --inclu | --incl | --inc) | |
618 | ac_prev=includedir ;; | |
619 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
620 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
621 | - includedir="$ac_optarg" ;; | |
622 | + includedir=$ac_optarg ;; | |
623 | ||
624 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
625 | ac_prev=infodir ;; | |
626 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
627 | - infodir="$ac_optarg" ;; | |
628 | + infodir=$ac_optarg ;; | |
629 | ||
630 | -libdir | --libdir | --libdi | --libd) | |
631 | ac_prev=libdir ;; | |
632 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
633 | - libdir="$ac_optarg" ;; | |
634 | + libdir=$ac_optarg ;; | |
635 | ||
636 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
637 | | --libexe | --libex | --libe) | |
638 | ac_prev=libexecdir ;; | |
639 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
640 | | --libexe=* | --libex=* | --libe=*) | |
641 | - libexecdir="$ac_optarg" ;; | |
642 | + libexecdir=$ac_optarg ;; | |
643 | ||
644 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
645 | | --localstate | --localstat | --localsta | --localst \ | |
646 | @@ -243,19 +471,19 @@ EOF | |
647 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
648 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
649 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
650 | - localstatedir="$ac_optarg" ;; | |
651 | + localstatedir=$ac_optarg ;; | |
652 | ||
653 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
654 | ac_prev=mandir ;; | |
655 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
656 | - mandir="$ac_optarg" ;; | |
657 | + mandir=$ac_optarg ;; | |
658 | ||
659 | -nfp | --nfp | --nf) | |
660 | # Obsolete; use --without-fp. | |
661 | with_fp=no ;; | |
662 | ||
663 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
664 | - | --no-cr | --no-c) | |
665 | + | --no-cr | --no-c | -n) | |
666 | no_create=yes ;; | |
667 | ||
668 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
669 | @@ -269,26 +497,26 @@ EOF | |
670 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
671 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
672 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
673 | - oldincludedir="$ac_optarg" ;; | |
674 | + oldincludedir=$ac_optarg ;; | |
675 | ||
676 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
677 | ac_prev=prefix ;; | |
678 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
679 | - prefix="$ac_optarg" ;; | |
680 | + prefix=$ac_optarg ;; | |
681 | ||
682 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
683 | | --program-pre | --program-pr | --program-p) | |
684 | ac_prev=program_prefix ;; | |
685 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
686 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
687 | - program_prefix="$ac_optarg" ;; | |
688 | + program_prefix=$ac_optarg ;; | |
689 | ||
690 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
691 | | --program-suf | --program-su | --program-s) | |
692 | ac_prev=program_suffix ;; | |
693 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
694 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
695 | - program_suffix="$ac_optarg" ;; | |
696 | + program_suffix=$ac_optarg ;; | |
697 | ||
698 | -program-transform-name | --program-transform-name \ | |
699 | | --program-transform-nam | --program-transform-na \ | |
700 | @@ -305,7 +533,7 @@ EOF | |
701 | | --program-transfo=* | --program-transf=* \ | |
702 | | --program-trans=* | --program-tran=* \ | |
703 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
704 | - program_transform_name="$ac_optarg" ;; | |
705 | + program_transform_name=$ac_optarg ;; | |
706 | ||
707 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
708 | | -silent | --silent | --silen | --sile | --sil) | |
709 | @@ -315,7 +543,7 @@ EOF | |
710 | ac_prev=sbindir ;; | |
711 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
712 | | --sbi=* | --sb=*) | |
713 | - sbindir="$ac_optarg" ;; | |
714 | + sbindir=$ac_optarg ;; | |
715 | ||
716 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
717 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
718 | @@ -326,58 +554,57 @@ EOF | |
719 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
720 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
721 | | --sha=* | --sh=*) | |
722 | - sharedstatedir="$ac_optarg" ;; | |
723 | + sharedstatedir=$ac_optarg ;; | |
724 | ||
725 | -site | --site | --sit) | |
726 | ac_prev=site ;; | |
727 | -site=* | --site=* | --sit=*) | |
728 | - site="$ac_optarg" ;; | |
729 | + site=$ac_optarg ;; | |
730 | ||
731 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
732 | ac_prev=srcdir ;; | |
733 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
734 | - srcdir="$ac_optarg" ;; | |
735 | + srcdir=$ac_optarg ;; | |
736 | ||
737 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
738 | | --syscon | --sysco | --sysc | --sys | --sy) | |
739 | ac_prev=sysconfdir ;; | |
740 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
741 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
742 | - sysconfdir="$ac_optarg" ;; | |
743 | + sysconfdir=$ac_optarg ;; | |
744 | ||
745 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
746 | - ac_prev=target ;; | |
747 | + ac_prev=target_alias ;; | |
748 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
749 | - target="$ac_optarg" ;; | |
750 | + target_alias=$ac_optarg ;; | |
751 | ||
752 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
753 | verbose=yes ;; | |
754 | ||
755 | - -version | --version | --versio | --versi | --vers) | |
756 | - echo "configure generated by autoconf version 2.13" | |
757 | - exit 0 ;; | |
758 | + -version | --version | --versio | --versi | --vers | -V) | |
759 | + ac_init_version=: ;; | |
760 | ||
761 | -with-* | --with-*) | |
762 | - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
763 | + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
764 | # Reject names that are not valid shell variable names. | |
765 | - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
766 | - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
767 | - fi | |
768 | + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && | |
769 | + { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
770 | + { (exit 1); exit 1; }; } | |
771 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
772 | - case "$ac_option" in | |
773 | - *=*) ;; | |
774 | + case $ac_option in | |
775 | + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | |
776 | *) ac_optarg=yes ;; | |
777 | esac | |
778 | - eval "with_${ac_package}='$ac_optarg'" ;; | |
779 | + eval "with_$ac_package='$ac_optarg'" ;; | |
780 | ||
781 | -without-* | --without-*) | |
782 | - ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
783 | + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
784 | # Reject names that are not valid shell variable names. | |
785 | - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
786 | - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
787 | - fi | |
788 | - ac_package=`echo $ac_package| sed 's/-/_/g'` | |
789 | - eval "with_${ac_package}=no" ;; | |
790 | + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && | |
791 | + { echo "$as_me: error: invalid package name: $ac_package" >&2 | |
792 | + { (exit 1); exit 1; }; } | |
793 | + ac_package=`echo $ac_package | sed 's/-/_/g'` | |
794 | + eval "with_$ac_package=no" ;; | |
795 | ||
796 | --x) | |
797 | # Obsolete; use --with-x. | |
798 | @@ -388,99 +615,110 @@ EOF | |
799 | ac_prev=x_includes ;; | |
800 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
801 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
802 | - x_includes="$ac_optarg" ;; | |
803 | + x_includes=$ac_optarg ;; | |
804 | ||
805 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
806 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
807 | ac_prev=x_libraries ;; | |
808 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
809 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
810 | - x_libraries="$ac_optarg" ;; | |
811 | + x_libraries=$ac_optarg ;; | |
812 | ||
813 | - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
814 | + -*) { echo "$as_me: error: unrecognized option: $ac_option | |
815 | +Try \`$0 --help' for more information." >&2 | |
816 | + { (exit 1); exit 1; }; } | |
817 | ;; | |
818 | ||
819 | + *=*) | |
820 | + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
821 | + # Reject names that are not valid shell variable names. | |
822 | + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | |
823 | + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | |
824 | + { (exit 1); exit 1; }; } | |
825 | + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` | |
826 | + eval "$ac_envvar='$ac_optarg'" | |
827 | + export $ac_envvar ;; | |
828 | + | |
829 | *) | |
830 | - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
831 | - echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
832 | - fi | |
833 | - if test "x$nonopt" != xNONE; then | |
834 | - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
835 | - fi | |
836 | - nonopt="$ac_option" | |
837 | + # FIXME: should be removed in autoconf 3.0. | |
838 | + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
839 | + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
840 | + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
841 | + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | |
842 | ;; | |
843 | ||
844 | esac | |
845 | done | |
846 | ||
847 | if test -n "$ac_prev"; then | |
848 | - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
849 | -fi | |
850 | - | |
851 | -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
852 | - | |
853 | -# File descriptor usage: | |
854 | -# 0 standard input | |
855 | -# 1 file creation | |
856 | -# 2 errors and warnings | |
857 | -# 3 some systems may open it to /dev/tty | |
858 | -# 4 used on the Kubota Titan | |
859 | -# 6 checking for... messages and results | |
860 | -# 5 compiler messages saved in config.log | |
861 | -if test "$silent" = yes; then | |
862 | - exec 6>/dev/null | |
863 | -else | |
864 | - exec 6>&1 | |
865 | + ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
866 | + { echo "$as_me: error: missing argument to $ac_option" >&2 | |
867 | + { (exit 1); exit 1; }; } | |
868 | fi | |
869 | -exec 5>./config.log | |
870 | ||
871 | -echo "\ | |
872 | -This file contains any messages produced by compilers while | |
873 | -running configure, to aid debugging if configure makes a mistake. | |
874 | -" 1>&5 | |
875 | +# Be sure to have absolute paths. | |
876 | +for ac_var in exec_prefix prefix | |
877 | +do | |
878 | + eval ac_val=$`echo $ac_var` | |
879 | + case $ac_val in | |
880 | + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; | |
881 | + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
882 | + { (exit 1); exit 1; }; };; | |
883 | + esac | |
884 | +done | |
885 | ||
886 | -# Strip out --no-create and --no-recursion so they do not pile up. | |
887 | -# Also quote any args containing shell metacharacters. | |
888 | -ac_configure_args= | |
889 | -for ac_arg | |
890 | +# Be sure to have absolute paths. | |
891 | +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | |
892 | + localstatedir libdir includedir oldincludedir infodir mandir | |
893 | do | |
894 | - case "$ac_arg" in | |
895 | - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
896 | - | --no-cr | --no-c) ;; | |
897 | - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
898 | - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
899 | - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
900 | - ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
901 | - *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
902 | + eval ac_val=$`echo $ac_var` | |
903 | + case $ac_val in | |
904 | + [\\/$]* | ?:[\\/]* ) ;; | |
905 | + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | |
906 | + { (exit 1); exit 1; }; };; | |
907 | esac | |
908 | done | |
909 | ||
910 | -# NLS nuisances. | |
911 | -# Only set these to C if already set. These must not be set unconditionally | |
912 | -# because not all systems understand e.g. LANG=C (notably SCO). | |
913 | -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
914 | -# Non-C LC_CTYPE values break the ctype check. | |
915 | -if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
916 | -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
917 | -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
918 | -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
919 | +# There might be people who depend on the old broken behavior: `$host' | |
920 | +# used to hold the argument of --host etc. | |
921 | +# FIXME: To remove some day. | |
922 | +build=$build_alias | |
923 | +host=$host_alias | |
924 | +target=$target_alias | |
925 | + | |
926 | +# FIXME: To remove some day. | |
927 | +if test "x$host_alias" != x; then | |
928 | + if test "x$build_alias" = x; then | |
929 | + cross_compiling=maybe | |
930 | + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | |
931 | + If a cross compiler is detected then cross compile mode will be used." >&2 | |
932 | + elif test "x$build_alias" != "x$host_alias"; then | |
933 | + cross_compiling=yes | |
934 | + fi | |
935 | +fi | |
936 | ||
937 | -# confdefs.h avoids OS command line length limits that DEFS can exceed. | |
938 | -rm -rf conftest* confdefs.h | |
939 | -# AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
940 | -echo > confdefs.h | |
941 | +ac_tool_prefix= | |
942 | +test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
943 | + | |
944 | +test "$silent" = yes && exec 6>/dev/null | |
945 | ||
946 | -# A filename unique to this package, relative to the directory that | |
947 | -# configure is in, which we can look for to find out if srcdir is correct. | |
948 | -ac_unique_file=rules.mk | |
949 | ||
950 | # Find the source files, if location was not specified. | |
951 | if test -z "$srcdir"; then | |
952 | ac_srcdir_defaulted=yes | |
953 | # Try the directory containing this script, then its parent. | |
954 | - ac_prog=$0 | |
955 | - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
956 | - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
957 | + ac_confdir=`(dirname "$0") 2>/dev/null || | |
958 | +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
959 | + X"$0" : 'X\(//\)[^/]' \| \ | |
960 | + X"$0" : 'X\(//\)$' \| \ | |
961 | + X"$0" : 'X\(/\)' \| \ | |
962 | + . : '\(.\)' 2>/dev/null || | |
963 | +echo X"$0" | | |
964 | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
965 | + /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
966 | + /^X\(\/\/\)$/{ s//\1/; q; } | |
967 | + /^X\(\/\).*/{ s//\1/; q; } | |
968 | + s/.*/./; q'` | |
969 | srcdir=$ac_confdir | |
970 | if test ! -r $srcdir/$ac_unique_file; then | |
971 | srcdir=.. | |
972 | @@ -490,13 +728,472 @@ else | |
973 | fi | |
974 | if test ! -r $srcdir/$ac_unique_file; then | |
975 | if test "$ac_srcdir_defaulted" = yes; then | |
976 | - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
977 | + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 | |
978 | + { (exit 1); exit 1; }; } | |
979 | else | |
980 | - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
981 | + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 | |
982 | + { (exit 1); exit 1; }; } | |
983 | fi | |
984 | fi | |
985 | -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
986 | +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || | |
987 | + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 | |
988 | + { (exit 1); exit 1; }; } | |
989 | +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` | |
990 | +ac_env_build_alias_set=${build_alias+set} | |
991 | +ac_env_build_alias_value=$build_alias | |
992 | +ac_cv_env_build_alias_set=${build_alias+set} | |
993 | +ac_cv_env_build_alias_value=$build_alias | |
994 | +ac_env_host_alias_set=${host_alias+set} | |
995 | +ac_env_host_alias_value=$host_alias | |
996 | +ac_cv_env_host_alias_set=${host_alias+set} | |
997 | +ac_cv_env_host_alias_value=$host_alias | |
998 | +ac_env_target_alias_set=${target_alias+set} | |
999 | +ac_env_target_alias_value=$target_alias | |
1000 | +ac_cv_env_target_alias_set=${target_alias+set} | |
1001 | +ac_cv_env_target_alias_value=$target_alias | |
1002 | +ac_env_CC_set=${CC+set} | |
1003 | +ac_env_CC_value=$CC | |
1004 | +ac_cv_env_CC_set=${CC+set} | |
1005 | +ac_cv_env_CC_value=$CC | |
1006 | +ac_env_CFLAGS_set=${CFLAGS+set} | |
1007 | +ac_env_CFLAGS_value=$CFLAGS | |
1008 | +ac_cv_env_CFLAGS_set=${CFLAGS+set} | |
1009 | +ac_cv_env_CFLAGS_value=$CFLAGS | |
1010 | +ac_env_LDFLAGS_set=${LDFLAGS+set} | |
1011 | +ac_env_LDFLAGS_value=$LDFLAGS | |
1012 | +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} | |
1013 | +ac_cv_env_LDFLAGS_value=$LDFLAGS | |
1014 | +ac_env_CPPFLAGS_set=${CPPFLAGS+set} | |
1015 | +ac_env_CPPFLAGS_value=$CPPFLAGS | |
1016 | +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} | |
1017 | +ac_cv_env_CPPFLAGS_value=$CPPFLAGS | |
1018 | +ac_env_CPP_set=${CPP+set} | |
1019 | +ac_env_CPP_value=$CPP | |
1020 | +ac_cv_env_CPP_set=${CPP+set} | |
1021 | +ac_cv_env_CPP_value=$CPP | |
1022 | + | |
1023 | +# | |
1024 | +# Report the --help message. | |
1025 | +# | |
1026 | +if test "$ac_init_help" = "long"; then | |
1027 | + # Omit some internal or obsolete options to make the list less imposing. | |
1028 | + # This message is too long to be a string in the A/UX 3.1 sh. | |
1029 | + cat <<_ACEOF | |
1030 | +\`configure' configures this package to adapt to many kinds of systems. | |
1031 | + | |
1032 | +Usage: $0 [OPTION]... [VAR=VALUE]... | |
1033 | + | |
1034 | +To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
1035 | +VAR=VALUE. See below for descriptions of some of the useful variables. | |
1036 | + | |
1037 | +Defaults for the options are specified in brackets. | |
1038 | + | |
1039 | +Configuration: | |
1040 | + -h, --help display this help and exit | |
1041 | + --help=short display options specific to this package | |
1042 | + --help=recursive display the short help of all the included packages | |
1043 | + -V, --version display version information and exit | |
1044 | + -q, --quiet, --silent do not print \`checking...' messages | |
1045 | + --cache-file=FILE cache test results in FILE [disabled] | |
1046 | + -C, --config-cache alias for \`--cache-file=config.cache' | |
1047 | + -n, --no-create do not create output files | |
1048 | + --srcdir=DIR find the sources in DIR [configure dir or \`..'] | |
1049 | + | |
1050 | +_ACEOF | |
1051 | + | |
1052 | + cat <<_ACEOF | |
1053 | +Installation directories: | |
1054 | + --prefix=PREFIX install architecture-independent files in PREFIX | |
1055 | + [$ac_default_prefix] | |
1056 | + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
1057 | + [PREFIX] | |
1058 | + | |
1059 | +By default, \`make install' will install all the files in | |
1060 | +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | |
1061 | +an installation prefix other than \`$ac_default_prefix' using \`--prefix', | |
1062 | +for instance \`--prefix=\$HOME'. | |
1063 | + | |
1064 | +For better control, use the options below. | |
1065 | + | |
1066 | +Fine tuning of the installation directories: | |
1067 | + --bindir=DIR user executables [EPREFIX/bin] | |
1068 | + --sbindir=DIR system admin executables [EPREFIX/sbin] | |
1069 | + --libexecdir=DIR program executables [EPREFIX/libexec] | |
1070 | + --datadir=DIR read-only architecture-independent data [PREFIX/share] | |
1071 | + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
1072 | + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
1073 | + --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
1074 | + --libdir=DIR object code libraries [EPREFIX/lib] | |
1075 | + --includedir=DIR C header files [PREFIX/include] | |
1076 | + --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
1077 | + --infodir=DIR info documentation [PREFIX/info] | |
1078 | + --mandir=DIR man documentation [PREFIX/man] | |
1079 | +_ACEOF | |
1080 | + | |
1081 | + cat <<\_ACEOF | |
1082 | +_ACEOF | |
1083 | +fi | |
1084 | + | |
1085 | +if test -n "$ac_init_help"; then | |
1086 | + | |
1087 | + cat <<\_ACEOF | |
1088 | + | |
1089 | +Optional Features: | |
1090 | + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
1091 | + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
1092 | + --enable-nfsv3 enable support for NFSv3 | |
1093 | + --enable-nfsv4 enable support for NFSv4 | |
1094 | + --enable-gss enable support for rpcsec_gss | |
1095 | + --enable-kprefix install progs as rpc.knfsd etc | |
1096 | + --enable-secure-statd Only lockd can use statd (security) | |
1097 | + --enable-rquotad enable rquotad | |
1098 | + | |
1099 | +Optional Packages: | |
1100 | + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
1101 | + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
1102 | + --with-release=XXX set release to XXX 1 | |
1103 | + --with-statedir=/foo use state dir /foo /var/lib/nfs | |
1104 | + --with-statduser=rpcuser user for statd to run under rpcuser or nobody | |
1105 | + --with-krb5=DIR use Kerberos v5 installation in DIR | |
1106 | + | |
1107 | +Some influential environment variables: | |
1108 | + CC C compiler command | |
1109 | + CFLAGS C compiler flags | |
1110 | + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
1111 | + nonstandard directory <lib dir> | |
1112 | + CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | |
1113 | + headers in a nonstandard directory <include dir> | |
1114 | + CPP C preprocessor | |
1115 | + | |
1116 | +Use these variables to override the choices made by `configure' or to help | |
1117 | +it to find libraries and programs with nonstandard names/locations. | |
1118 | + | |
1119 | +_ACEOF | |
1120 | +fi | |
1121 | + | |
1122 | +if test "$ac_init_help" = "recursive"; then | |
1123 | + # If there are subdirs, report their specific --help. | |
1124 | + ac_popdir=`pwd` | |
1125 | + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
1126 | + test -d $ac_dir || continue | |
1127 | + ac_builddir=. | |
1128 | + | |
1129 | +if test "$ac_dir" != .; then | |
1130 | + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
1131 | + # A "../" for each directory in $ac_dir_suffix. | |
1132 | + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
1133 | +else | |
1134 | + ac_dir_suffix= ac_top_builddir= | |
1135 | +fi | |
1136 | + | |
1137 | +case $srcdir in | |
1138 | + .) # No --srcdir option. We are building in place. | |
1139 | + ac_srcdir=. | |
1140 | + if test -z "$ac_top_builddir"; then | |
1141 | + ac_top_srcdir=. | |
1142 | + else | |
1143 | + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
1144 | + fi ;; | |
1145 | + [\\/]* | ?:[\\/]* ) # Absolute path. | |
1146 | + ac_srcdir=$srcdir$ac_dir_suffix; | |
1147 | + ac_top_srcdir=$srcdir ;; | |
1148 | + *) # Relative path. | |
1149 | + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
1150 | + ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
1151 | +esac | |
1152 | + | |
1153 | +# Do not use `cd foo && pwd` to compute absolute paths, because | |
1154 | +# the directories may not exist. | |
1155 | +case `pwd` in | |
1156 | +.) ac_abs_builddir="$ac_dir";; | |
1157 | +*) | |
1158 | + case "$ac_dir" in | |
1159 | + .) ac_abs_builddir=`pwd`;; | |
1160 | + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
1161 | + *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
1162 | + esac;; | |
1163 | +esac | |
1164 | +case $ac_abs_builddir in | |
1165 | +.) ac_abs_top_builddir=${ac_top_builddir}.;; | |
1166 | +*) | |
1167 | + case ${ac_top_builddir}. in | |
1168 | + .) ac_abs_top_builddir=$ac_abs_builddir;; | |
1169 | + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
1170 | + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
1171 | + esac;; | |
1172 | +esac | |
1173 | +case $ac_abs_builddir in | |
1174 | +.) ac_abs_srcdir=$ac_srcdir;; | |
1175 | +*) | |
1176 | + case $ac_srcdir in | |
1177 | + .) ac_abs_srcdir=$ac_abs_builddir;; | |
1178 | + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
1179 | + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
1180 | + esac;; | |
1181 | +esac | |
1182 | +case $ac_abs_builddir in | |
1183 | +.) ac_abs_top_srcdir=$ac_top_srcdir;; | |
1184 | +*) | |
1185 | + case $ac_top_srcdir in | |
1186 | + .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
1187 | + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
1188 | + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
1189 | + esac;; | |
1190 | +esac | |
1191 | + | |
1192 | + cd $ac_dir | |
1193 | + # Check for guested configure; otherwise get Cygnus style configure. | |
1194 | + if test -f $ac_srcdir/configure.gnu; then | |
1195 | + echo | |
1196 | + $SHELL $ac_srcdir/configure.gnu --help=recursive | |
1197 | + elif test -f $ac_srcdir/configure; then | |
1198 | + echo | |
1199 | + $SHELL $ac_srcdir/configure --help=recursive | |
1200 | + elif test -f $ac_srcdir/configure.ac || | |
1201 | + test -f $ac_srcdir/configure.in; then | |
1202 | + echo | |
1203 | + $ac_configure --help | |
1204 | + else | |
1205 | + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
1206 | + fi | |
1207 | + cd $ac_popdir | |
1208 | + done | |
1209 | +fi | |
1210 | + | |
1211 | +test -n "$ac_init_help" && exit 0 | |
1212 | +if $ac_init_version; then | |
1213 | + cat <<\_ACEOF | |
1214 | + | |
1215 | +Copyright (C) 2003 Free Software Foundation, Inc. | |
1216 | +This configure script is free software; the Free Software Foundation | |
1217 | +gives unlimited permission to copy, distribute and modify it. | |
1218 | +_ACEOF | |
1219 | + exit 0 | |
1220 | +fi | |
1221 | +exec 5>config.log | |
1222 | +cat >&5 <<_ACEOF | |
1223 | +This file contains any messages produced by compilers while | |
1224 | +running configure, to aid debugging if configure makes a mistake. | |
1225 | + | |
1226 | +It was created by $as_me, which was | |
1227 | +generated by GNU Autoconf 2.59. Invocation command line was | |
1228 | + | |
1229 | + $ $0 $@ | |
1230 | + | |
1231 | +_ACEOF | |
1232 | +{ | |
1233 | +cat <<_ASUNAME | |
1234 | +## --------- ## | |
1235 | +## Platform. ## | |
1236 | +## --------- ## | |
1237 | + | |
1238 | +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
1239 | +uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
1240 | +uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
1241 | +uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
1242 | +uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
1243 | + | |
1244 | +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
1245 | +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
1246 | + | |
1247 | +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
1248 | +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
1249 | +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
1250 | +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | |
1251 | +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
1252 | +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
1253 | +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
1254 | + | |
1255 | +_ASUNAME | |
1256 | + | |
1257 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1258 | +for as_dir in $PATH | |
1259 | +do | |
1260 | + IFS=$as_save_IFS | |
1261 | + test -z "$as_dir" && as_dir=. | |
1262 | + echo "PATH: $as_dir" | |
1263 | +done | |
1264 | + | |
1265 | +} >&5 | |
1266 | + | |
1267 | +cat >&5 <<_ACEOF | |
1268 | + | |
1269 | + | |
1270 | +## ----------- ## | |
1271 | +## Core tests. ## | |
1272 | +## ----------- ## | |
1273 | + | |
1274 | +_ACEOF | |
1275 | + | |
1276 | + | |
1277 | +# Keep a trace of the command line. | |
1278 | +# Strip out --no-create and --no-recursion so they do not pile up. | |
1279 | +# Strip out --silent because we don't want to record it for future runs. | |
1280 | +# Also quote any args containing shell meta-characters. | |
1281 | +# Make two passes to allow for proper duplicate-argument suppression. | |
1282 | +ac_configure_args= | |
1283 | +ac_configure_args0= | |
1284 | +ac_configure_args1= | |
1285 | +ac_sep= | |
1286 | +ac_must_keep_next=false | |
1287 | +for ac_pass in 1 2 | |
1288 | +do | |
1289 | + for ac_arg | |
1290 | + do | |
1291 | + case $ac_arg in | |
1292 | + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
1293 | + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
1294 | + | -silent | --silent | --silen | --sile | --sil) | |
1295 | + continue ;; | |
1296 | + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1297 | + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1298 | + esac | |
1299 | + case $ac_pass in | |
1300 | + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | |
1301 | + 2) | |
1302 | + ac_configure_args1="$ac_configure_args1 '$ac_arg'" | |
1303 | + if test $ac_must_keep_next = true; then | |
1304 | + ac_must_keep_next=false # Got value, back to normal. | |
1305 | + else | |
1306 | + case $ac_arg in | |
1307 | + *=* | --config-cache | -C | -disable-* | --disable-* \ | |
1308 | + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
1309 | + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
1310 | + | -with-* | --with-* | -without-* | --without-* | --x) | |
1311 | + case "$ac_configure_args0 " in | |
1312 | + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
1313 | + esac | |
1314 | + ;; | |
1315 | + -* ) ac_must_keep_next=true ;; | |
1316 | + esac | |
1317 | + fi | |
1318 | + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | |
1319 | + # Get rid of the leading space. | |
1320 | + ac_sep=" " | |
1321 | + ;; | |
1322 | + esac | |
1323 | + done | |
1324 | +done | |
1325 | +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | |
1326 | +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | |
1327 | + | |
1328 | +# When interrupted or exit'd, cleanup temporary files, and complete | |
1329 | +# config.log. We remove comments because anyway the quotes in there | |
1330 | +# would cause problems or look ugly. | |
1331 | +# WARNING: Be sure not to use single quotes in there, as some shells, | |
1332 | +# such as our DU 5.0 friend, will then `close' the trap. | |
1333 | +trap 'exit_status=$? | |
1334 | + # Save into config.log some information that might help in debugging. | |
1335 | + { | |
1336 | + echo | |
1337 | + | |
1338 | + cat <<\_ASBOX | |
1339 | +## ---------------- ## | |
1340 | +## Cache variables. ## | |
1341 | +## ---------------- ## | |
1342 | +_ASBOX | |
1343 | + echo | |
1344 | + # The following way of writing the cache mishandles newlines in values, | |
1345 | +{ | |
1346 | + (set) 2>&1 | | |
1347 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | |
1348 | + *ac_space=\ *) | |
1349 | + sed -n \ | |
1350 | + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; | |
1351 | + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | |
1352 | + ;; | |
1353 | + *) | |
1354 | + sed -n \ | |
1355 | + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | |
1356 | + ;; | |
1357 | + esac; | |
1358 | +} | |
1359 | + echo | |
1360 | + | |
1361 | + cat <<\_ASBOX | |
1362 | +## ----------------- ## | |
1363 | +## Output variables. ## | |
1364 | +## ----------------- ## | |
1365 | +_ASBOX | |
1366 | + echo | |
1367 | + for ac_var in $ac_subst_vars | |
1368 | + do | |
1369 | + eval ac_val=$`echo $ac_var` | |
1370 | + echo "$ac_var='"'"'$ac_val'"'"'" | |
1371 | + done | sort | |
1372 | + echo | |
1373 | + | |
1374 | + if test -n "$ac_subst_files"; then | |
1375 | + cat <<\_ASBOX | |
1376 | +## ------------- ## | |
1377 | +## Output files. ## | |
1378 | +## ------------- ## | |
1379 | +_ASBOX | |
1380 | + echo | |
1381 | + for ac_var in $ac_subst_files | |
1382 | + do | |
1383 | + eval ac_val=$`echo $ac_var` | |
1384 | + echo "$ac_var='"'"'$ac_val'"'"'" | |
1385 | + done | sort | |
1386 | + echo | |
1387 | + fi | |
1388 | + | |
1389 | + if test -s confdefs.h; then | |
1390 | + cat <<\_ASBOX | |
1391 | +## ----------- ## | |
1392 | +## confdefs.h. ## | |
1393 | +## ----------- ## | |
1394 | +_ASBOX | |
1395 | + echo | |
1396 | + sed "/^$/d" confdefs.h | sort | |
1397 | + echo | |
1398 | + fi | |
1399 | + test "$ac_signal" != 0 && | |
1400 | + echo "$as_me: caught signal $ac_signal" | |
1401 | + echo "$as_me: exit $exit_status" | |
1402 | + } >&5 | |
1403 | + rm -f core *.core && | |
1404 | + rm -rf conftest* confdefs* conf$$* $ac_clean_files && | |
1405 | + exit $exit_status | |
1406 | + ' 0 | |
1407 | +for ac_signal in 1 2 13 15; do | |
1408 | + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | |
1409 | +done | |
1410 | +ac_signal=0 | |
1411 | + | |
1412 | +# confdefs.h avoids OS command line length limits that DEFS can exceed. | |
1413 | +rm -rf conftest* confdefs.h | |
1414 | +# AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
1415 | +echo >confdefs.h | |
1416 | + | |
1417 | +# Predefined preprocessor variables. | |
1418 | + | |
1419 | +cat >>confdefs.h <<_ACEOF | |
1420 | +#define PACKAGE_NAME "$PACKAGE_NAME" | |
1421 | +_ACEOF | |
1422 | + | |
1423 | + | |
1424 | +cat >>confdefs.h <<_ACEOF | |
1425 | +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" | |
1426 | +_ACEOF | |
1427 | ||
1428 | + | |
1429 | +cat >>confdefs.h <<_ACEOF | |
1430 | +#define PACKAGE_VERSION "$PACKAGE_VERSION" | |
1431 | +_ACEOF | |
1432 | + | |
1433 | + | |
1434 | +cat >>confdefs.h <<_ACEOF | |
1435 | +#define PACKAGE_STRING "$PACKAGE_STRING" | |
1436 | +_ACEOF | |
1437 | + | |
1438 | + | |
1439 | +cat >>confdefs.h <<_ACEOF | |
1440 | +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | |
1441 | +_ACEOF | |
1442 | + | |
1443 | + | |
1444 | +# Let the site file select an alternate cache file if it wants to. | |
1445 | # Prefer explicitly selected file to automatically selected ones. | |
1446 | if test -z "$CONFIG_SITE"; then | |
1447 | if test "x$prefix" != xNONE; then | |
1448 | @@ -507,39 +1204,103 @@ if test -z "$CONFIG_SITE"; then | |
1449 | fi | |
1450 | for ac_site_file in $CONFIG_SITE; do | |
1451 | if test -r "$ac_site_file"; then | |
1452 | - echo "loading site script $ac_site_file" | |
1453 | + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | |
1454 | +echo "$as_me: loading site script $ac_site_file" >&6;} | |
1455 | + sed 's/^/| /' "$ac_site_file" >&5 | |
1456 | . "$ac_site_file" | |
1457 | fi | |
1458 | done | |
1459 | ||
1460 | if test -r "$cache_file"; then | |
1461 | - echo "loading cache $cache_file" | |
1462 | - . $cache_file | |
1463 | + # Some versions of bash will fail to source /dev/null (special | |
1464 | + # files actually), so we avoid doing that. | |
1465 | + if test -f "$cache_file"; then | |
1466 | + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | |
1467 | +echo "$as_me: loading cache $cache_file" >&6;} | |
1468 | + case $cache_file in | |
1469 | + [\\/]* | ?:[\\/]* ) . $cache_file;; | |
1470 | + *) . ./$cache_file;; | |
1471 | + esac | |
1472 | + fi | |
1473 | else | |
1474 | - echo "creating cache $cache_file" | |
1475 | - > $cache_file | |
1476 | + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | |
1477 | +echo "$as_me: creating cache $cache_file" >&6;} | |
1478 | + >$cache_file | |
1479 | +fi | |
1480 | + | |
1481 | +# Check that the precious variables saved in the cache have kept the same | |
1482 | +# value. | |
1483 | +ac_cache_corrupted=false | |
1484 | +for ac_var in `(set) 2>&1 | | |
1485 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do | |
1486 | + eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
1487 | + eval ac_new_set=\$ac_env_${ac_var}_set | |
1488 | + eval ac_old_val="\$ac_cv_env_${ac_var}_value" | |
1489 | + eval ac_new_val="\$ac_env_${ac_var}_value" | |
1490 | + case $ac_old_set,$ac_new_set in | |
1491 | + set,) | |
1492 | + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | |
1493 | +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | |
1494 | + ac_cache_corrupted=: ;; | |
1495 | + ,set) | |
1496 | + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | |
1497 | +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | |
1498 | + ac_cache_corrupted=: ;; | |
1499 | + ,);; | |
1500 | + *) | |
1501 | + if test "x$ac_old_val" != "x$ac_new_val"; then | |
1502 | + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 | |
1503 | +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | |
1504 | + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 | |
1505 | +echo "$as_me: former value: $ac_old_val" >&2;} | |
1506 | + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 | |
1507 | +echo "$as_me: current value: $ac_new_val" >&2;} | |
1508 | + ac_cache_corrupted=: | |
1509 | + fi;; | |
1510 | + esac | |
1511 | + # Pass precious variables to config.status. | |
1512 | + if test "$ac_new_set" = set; then | |
1513 | + case $ac_new_val in | |
1514 | + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | |
1515 | + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
1516 | + *) ac_arg=$ac_var=$ac_new_val ;; | |
1517 | + esac | |
1518 | + case " $ac_configure_args " in | |
1519 | + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
1520 | + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
1521 | + esac | |
1522 | + fi | |
1523 | +done | |
1524 | +if $ac_cache_corrupted; then | |
1525 | + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | |
1526 | +echo "$as_me: error: changes in the environment can compromise the build" >&2;} | |
1527 | + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | |
1528 | +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | |
1529 | + { (exit 1); exit 1; }; } | |
1530 | fi | |
1531 | ||
1532 | ac_ext=c | |
1533 | -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1534 | ac_cpp='$CPP $CPPFLAGS' | |
1535 | -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1536 | -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1537 | -cross_compiling=$ac_cv_prog_cc_cross | |
1538 | - | |
1539 | -ac_exeext= | |
1540 | -ac_objext=o | |
1541 | -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
1542 | - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
1543 | - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
1544 | - ac_n= ac_c=' | |
1545 | -' ac_t=' ' | |
1546 | - else | |
1547 | - ac_n=-n ac_c= ac_t= | |
1548 | - fi | |
1549 | -else | |
1550 | - ac_n= ac_c='\c' ac_t= | |
1551 | -fi | |
1552 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1553 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1554 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1555 | + | |
1556 | + | |
1557 | + | |
1558 | + | |
1559 | + | |
1560 | + | |
1561 | + | |
1562 | + | |
1563 | + | |
1564 | + | |
1565 | + | |
1566 | + | |
1567 | + | |
1568 | + | |
1569 | + | |
1570 | + | |
1571 | + | |
1572 | ||
1573 | ||
1574 | ||
1575 | @@ -548,24 +1309,25 @@ fi | |
1576 | VERSION="1.0.7" | |
1577 | ||
1578 | ||
1579 | + | |
1580 | # Check whether --with-release or --without-release was given. | |
1581 | if test "${with_release+set}" = set; then | |
1582 | withval="$with_release" | |
1583 | RELEASE=$withval | |
1584 | else | |
1585 | RELEASE=1 | |
1586 | -fi | |
1587 | +fi; | |
1588 | + | |
1589 | ||
1590 | - | |
1591 | # Check whether --with-statedir or --without-statedir was given. | |
1592 | if test "${with_statedir+set}" = set; then | |
1593 | withval="$with_statedir" | |
1594 | statedir=$withval | |
1595 | else | |
1596 | statedir=/var/lib/nfs | |
1597 | -fi | |
1598 | +fi; | |
1599 | + | |
1600 | ||
1601 | - | |
1602 | # Check whether --with-statduser or --without-statduser was given. | |
1603 | if test "${with_statduser+set}" = set; then | |
1604 | withval="$with_statduser" | |
1605 | @@ -576,58 +1338,57 @@ else | |
1606 | else | |
1607 | statduser=nobody | |
1608 | fi | |
1609 | -fi | |
1610 | +fi; | |
1611 | ||
1612 | - | |
1613 | # Check whether --enable-nfsv3 or --disable-nfsv3 was given. | |
1614 | if test "${enable_nfsv3+set}" = set; then | |
1615 | enableval="$enable_nfsv3" | |
1616 | enable_nfsv3=$enableval | |
1617 | else | |
1618 | enable_nfsv3=yes | |
1619 | -fi | |
1620 | - | |
1621 | +fi; | |
1622 | if test "$enable_nfsv3" = yes; then | |
1623 | - cat >> confdefs.h <<\EOF | |
1624 | + | |
1625 | +cat >>confdefs.h <<\_ACEOF | |
1626 | #define NFS3_SUPPORTED 1 | |
1627 | -EOF | |
1628 | +_ACEOF | |
1629 | ||
1630 | else | |
1631 | enable_nfsv3= | |
1632 | fi | |
1633 | - | |
1634 | + | |
1635 | # Check whether --enable-nfsv4 or --disable-nfsv4 was given. | |
1636 | if test "${enable_nfsv4+set}" = set; then | |
1637 | enableval="$enable_nfsv4" | |
1638 | enable_nfsv4=$enableval | |
1639 | else | |
1640 | enable_nfsv4=yes | |
1641 | -fi | |
1642 | - | |
1643 | +fi; | |
1644 | if test "$enable_nfsv4" = yes; then | |
1645 | - cat >> confdefs.h <<\EOF | |
1646 | + | |
1647 | +cat >>confdefs.h <<\_ACEOF | |
1648 | #define NFS4_SUPPORTED 1 | |
1649 | -EOF | |
1650 | +_ACEOF | |
1651 | ||
1652 | IDMAPD=idmapd | |
1653 | else | |
1654 | enable_nfsv4= | |
1655 | IDMAPD= | |
1656 | fi | |
1657 | - | |
1658 | - | |
1659 | + | |
1660 | + | |
1661 | # Check whether --enable-gss or --disable-gss was given. | |
1662 | if test "${enable_gss+set}" = set; then | |
1663 | enableval="$enable_gss" | |
1664 | enable_gss=$enableval | |
1665 | else | |
1666 | enable_gss=yes | |
1667 | -fi | |
1668 | - | |
1669 | +fi; | |
1670 | if test "$enable_gss" = yes; then | |
1671 | - cat >> confdefs.h <<\EOF | |
1672 | + | |
1673 | +cat >>confdefs.h <<\_ACEOF | |
1674 | #define GSS_SUPPORTED 1 | |
1675 | -EOF | |
1676 | +_ACEOF | |
1677 | ||
1678 | GSSD=gssd | |
1679 | SVCGSSD=svcgssd | |
1680 | @@ -636,257 +1397,701 @@ EOF | |
1681 | GSSD= | |
1682 | SVCGSSD= | |
1683 | fi | |
1684 | - | |
1685 | - | |
1686 | - | |
1687 | + | |
1688 | + | |
1689 | + | |
1690 | # Check whether --enable-kprefix or --disable-kprefix was given. | |
1691 | if test "${enable_kprefix+set}" = set; then | |
1692 | enableval="$enable_kprefix" | |
1693 | test "$enableval" = "yes" && kprefix=k | |
1694 | else | |
1695 | kprefix= | |
1696 | -fi | |
1697 | +fi; | |
1698 | ||
1699 | - | |
1700 | # Check whether --enable-secure-statd or --disable-secure-statd was given. | |
1701 | if test "${enable_secure_statd+set}" = set; then | |
1702 | enableval="$enable_secure_statd" | |
1703 | test "$enableval" = "yes" && secure_statd=yes | |
1704 | else | |
1705 | secure_statd=no | |
1706 | -fi | |
1707 | - | |
1708 | +fi; | |
1709 | if test "$secure_statd" = yes; then | |
1710 | - cat >> confdefs.h <<\EOF | |
1711 | + | |
1712 | +cat >>confdefs.h <<\_ACEOF | |
1713 | #define RESTRICTED_STATD 1 | |
1714 | -EOF | |
1715 | +_ACEOF | |
1716 | ||
1717 | fi | |
1718 | - | |
1719 | + | |
1720 | # Check whether --enable-rquotad or --disable-rquotad was given. | |
1721 | if test "${enable_rquotad+set}" = set; then | |
1722 | enableval="$enable_rquotad" | |
1723 | enable_rquotad=$enableval | |
1724 | else | |
1725 | enable_rquotad=yes | |
1726 | -fi | |
1727 | - | |
1728 | +fi; | |
1729 | if test "$enable_rquotad" = yes; then | |
1730 | RQUOTAD=rquotad | |
1731 | else | |
1732 | RQUOTAD= | |
1733 | fi | |
1734 | - | |
1735 | ||
1736 | + ac_config_headers="$ac_config_headers support/include/config.h" | |
1737 | ||
1738 | -# Extract the first word of "gcc", so it can be a program name with args. | |
1739 | + | |
1740 | +ac_ext=c | |
1741 | +ac_cpp='$CPP $CPPFLAGS' | |
1742 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
1743 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
1744 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
1745 | +if test -n "$ac_tool_prefix"; then | |
1746 | + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
1747 | +set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
1748 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1749 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1750 | +if test "${ac_cv_prog_CC+set}" = set; then | |
1751 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1752 | +else | |
1753 | + if test -n "$CC"; then | |
1754 | + ac_cv_prog_CC="$CC" # Let the user override the test. | |
1755 | +else | |
1756 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1757 | +for as_dir in $PATH | |
1758 | +do | |
1759 | + IFS=$as_save_IFS | |
1760 | + test -z "$as_dir" && as_dir=. | |
1761 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
1762 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1763 | + ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
1764 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1765 | + break 2 | |
1766 | + fi | |
1767 | +done | |
1768 | +done | |
1769 | + | |
1770 | +fi | |
1771 | +fi | |
1772 | +CC=$ac_cv_prog_CC | |
1773 | +if test -n "$CC"; then | |
1774 | + echo "$as_me:$LINENO: result: $CC" >&5 | |
1775 | +echo "${ECHO_T}$CC" >&6 | |
1776 | +else | |
1777 | + echo "$as_me:$LINENO: result: no" >&5 | |
1778 | +echo "${ECHO_T}no" >&6 | |
1779 | +fi | |
1780 | + | |
1781 | +fi | |
1782 | +if test -z "$ac_cv_prog_CC"; then | |
1783 | + ac_ct_CC=$CC | |
1784 | + # Extract the first word of "gcc", so it can be a program name with args. | |
1785 | set dummy gcc; ac_word=$2 | |
1786 | -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1787 | -echo "configure:686: checking for $ac_word" >&5 | |
1788 | -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
1789 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
1790 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1791 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1792 | +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1793 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1794 | +else | |
1795 | + if test -n "$ac_ct_CC"; then | |
1796 | + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1797 | +else | |
1798 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1799 | +for as_dir in $PATH | |
1800 | +do | |
1801 | + IFS=$as_save_IFS | |
1802 | + test -z "$as_dir" && as_dir=. | |
1803 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
1804 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1805 | + ac_cv_prog_ac_ct_CC="gcc" | |
1806 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1807 | + break 2 | |
1808 | + fi | |
1809 | +done | |
1810 | +done | |
1811 | + | |
1812 | +fi | |
1813 | +fi | |
1814 | +ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1815 | +if test -n "$ac_ct_CC"; then | |
1816 | + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1817 | +echo "${ECHO_T}$ac_ct_CC" >&6 | |
1818 | +else | |
1819 | + echo "$as_me:$LINENO: result: no" >&5 | |
1820 | +echo "${ECHO_T}no" >&6 | |
1821 | +fi | |
1822 | + | |
1823 | + CC=$ac_ct_CC | |
1824 | +else | |
1825 | + CC="$ac_cv_prog_CC" | |
1826 | +fi | |
1827 | + | |
1828 | +if test -z "$CC"; then | |
1829 | + if test -n "$ac_tool_prefix"; then | |
1830 | + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
1831 | +set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
1832 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1833 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1834 | +if test "${ac_cv_prog_CC+set}" = set; then | |
1835 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1836 | else | |
1837 | if test -n "$CC"; then | |
1838 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1839 | else | |
1840 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1841 | - ac_dummy="$PATH" | |
1842 | - for ac_dir in $ac_dummy; do | |
1843 | - test -z "$ac_dir" && ac_dir=. | |
1844 | - if test -f $ac_dir/$ac_word; then | |
1845 | - ac_cv_prog_CC="gcc" | |
1846 | - break | |
1847 | - fi | |
1848 | - done | |
1849 | - IFS="$ac_save_ifs" | |
1850 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1851 | +for as_dir in $PATH | |
1852 | +do | |
1853 | + IFS=$as_save_IFS | |
1854 | + test -z "$as_dir" && as_dir=. | |
1855 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
1856 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1857 | + ac_cv_prog_CC="${ac_tool_prefix}cc" | |
1858 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1859 | + break 2 | |
1860 | + fi | |
1861 | +done | |
1862 | +done | |
1863 | + | |
1864 | fi | |
1865 | fi | |
1866 | -CC="$ac_cv_prog_CC" | |
1867 | +CC=$ac_cv_prog_CC | |
1868 | if test -n "$CC"; then | |
1869 | - echo "$ac_t""$CC" 1>&6 | |
1870 | + echo "$as_me:$LINENO: result: $CC" >&5 | |
1871 | +echo "${ECHO_T}$CC" >&6 | |
1872 | +else | |
1873 | + echo "$as_me:$LINENO: result: no" >&5 | |
1874 | +echo "${ECHO_T}no" >&6 | |
1875 | +fi | |
1876 | + | |
1877 | +fi | |
1878 | +if test -z "$ac_cv_prog_CC"; then | |
1879 | + ac_ct_CC=$CC | |
1880 | + # Extract the first word of "cc", so it can be a program name with args. | |
1881 | +set dummy cc; ac_word=$2 | |
1882 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1883 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1884 | +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
1885 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1886 | +else | |
1887 | + if test -n "$ac_ct_CC"; then | |
1888 | + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
1889 | +else | |
1890 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1891 | +for as_dir in $PATH | |
1892 | +do | |
1893 | + IFS=$as_save_IFS | |
1894 | + test -z "$as_dir" && as_dir=. | |
1895 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
1896 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1897 | + ac_cv_prog_ac_ct_CC="cc" | |
1898 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1899 | + break 2 | |
1900 | + fi | |
1901 | +done | |
1902 | +done | |
1903 | + | |
1904 | +fi | |
1905 | +fi | |
1906 | +ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
1907 | +if test -n "$ac_ct_CC"; then | |
1908 | + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
1909 | +echo "${ECHO_T}$ac_ct_CC" >&6 | |
1910 | +else | |
1911 | + echo "$as_me:$LINENO: result: no" >&5 | |
1912 | +echo "${ECHO_T}no" >&6 | |
1913 | +fi | |
1914 | + | |
1915 | + CC=$ac_ct_CC | |
1916 | else | |
1917 | - echo "$ac_t""no" 1>&6 | |
1918 | + CC="$ac_cv_prog_CC" | |
1919 | fi | |
1920 | ||
1921 | +fi | |
1922 | if test -z "$CC"; then | |
1923 | # Extract the first word of "cc", so it can be a program name with args. | |
1924 | set dummy cc; ac_word=$2 | |
1925 | -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
1926 | -echo "configure:716: checking for $ac_word" >&5 | |
1927 | -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
1928 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
1929 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
1930 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
1931 | +if test "${ac_cv_prog_CC+set}" = set; then | |
1932 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
1933 | else | |
1934 | if test -n "$CC"; then | |
1935 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1936 | else | |
1937 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1938 | ac_prog_rejected=no | |
1939 | - ac_dummy="$PATH" | |
1940 | - for ac_dir in $ac_dummy; do | |
1941 | - test -z "$ac_dir" && ac_dir=. | |
1942 | - if test -f $ac_dir/$ac_word; then | |
1943 | - if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1944 | - ac_prog_rejected=yes | |
1945 | - continue | |
1946 | - fi | |
1947 | - ac_cv_prog_CC="cc" | |
1948 | - break | |
1949 | - fi | |
1950 | - done | |
1951 | - IFS="$ac_save_ifs" | |
1952 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
1953 | +for as_dir in $PATH | |
1954 | +do | |
1955 | + IFS=$as_save_IFS | |
1956 | + test -z "$as_dir" && as_dir=. | |
1957 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
1958 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
1959 | + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
1960 | + ac_prog_rejected=yes | |
1961 | + continue | |
1962 | + fi | |
1963 | + ac_cv_prog_CC="cc" | |
1964 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
1965 | + break 2 | |
1966 | + fi | |
1967 | +done | |
1968 | +done | |
1969 | + | |
1970 | if test $ac_prog_rejected = yes; then | |
1971 | # We found a bogon in the path, so make sure we never use it. | |
1972 | set dummy $ac_cv_prog_CC | |
1973 | shift | |
1974 | - if test $# -gt 0; then | |
1975 | + if test $# != 0; then | |
1976 | # We chose a different compiler from the bogus one. | |
1977 | # However, it has the same basename, so the bogon will be chosen | |
1978 | # first if we set CC to just the basename; use the full file name. | |
1979 | shift | |
1980 | - set dummy "$ac_dir/$ac_word" "$@" | |
1981 | - shift | |
1982 | - ac_cv_prog_CC="$@" | |
1983 | + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | |
1984 | fi | |
1985 | fi | |
1986 | fi | |
1987 | fi | |
1988 | -CC="$ac_cv_prog_CC" | |
1989 | +CC=$ac_cv_prog_CC | |
1990 | if test -n "$CC"; then | |
1991 | - echo "$ac_t""$CC" 1>&6 | |
1992 | + echo "$as_me:$LINENO: result: $CC" >&5 | |
1993 | +echo "${ECHO_T}$CC" >&6 | |
1994 | else | |
1995 | - echo "$ac_t""no" 1>&6 | |
1996 | + echo "$as_me:$LINENO: result: no" >&5 | |
1997 | +echo "${ECHO_T}no" >&6 | |
1998 | fi | |
1999 | ||
2000 | - if test -z "$CC"; then | |
2001 | - case "`uname -s`" in | |
2002 | - *win32* | *WIN32*) | |
2003 | - # Extract the first word of "cl", so it can be a program name with args. | |
2004 | -set dummy cl; ac_word=$2 | |
2005 | -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
2006 | -echo "configure:767: checking for $ac_word" >&5 | |
2007 | -if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then | |
2008 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
2009 | +fi | |
2010 | +if test -z "$CC"; then | |
2011 | + if test -n "$ac_tool_prefix"; then | |
2012 | + for ac_prog in cl | |
2013 | + do | |
2014 | + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
2015 | +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
2016 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2017 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2018 | +if test "${ac_cv_prog_CC+set}" = set; then | |
2019 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2020 | else | |
2021 | if test -n "$CC"; then | |
2022 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2023 | else | |
2024 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2025 | - ac_dummy="$PATH" | |
2026 | - for ac_dir in $ac_dummy; do | |
2027 | - test -z "$ac_dir" && ac_dir=. | |
2028 | - if test -f $ac_dir/$ac_word; then | |
2029 | - ac_cv_prog_CC="cl" | |
2030 | - break | |
2031 | - fi | |
2032 | - done | |
2033 | - IFS="$ac_save_ifs" | |
2034 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2035 | +for as_dir in $PATH | |
2036 | +do | |
2037 | + IFS=$as_save_IFS | |
2038 | + test -z "$as_dir" && as_dir=. | |
2039 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
2040 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2041 | + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
2042 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2043 | + break 2 | |
2044 | + fi | |
2045 | +done | |
2046 | +done | |
2047 | + | |
2048 | fi | |
2049 | fi | |
2050 | -CC="$ac_cv_prog_CC" | |
2051 | +CC=$ac_cv_prog_CC | |
2052 | if test -n "$CC"; then | |
2053 | - echo "$ac_t""$CC" 1>&6 | |
2054 | + echo "$as_me:$LINENO: result: $CC" >&5 | |
2055 | +echo "${ECHO_T}$CC" >&6 | |
2056 | else | |
2057 | - echo "$ac_t""no" 1>&6 | |
2058 | + echo "$as_me:$LINENO: result: no" >&5 | |
2059 | +echo "${ECHO_T}no" >&6 | |
2060 | fi | |
2061 | - ;; | |
2062 | - esac | |
2063 | + | |
2064 | + test -n "$CC" && break | |
2065 | + done | |
2066 | +fi | |
2067 | +if test -z "$CC"; then | |
2068 | + ac_ct_CC=$CC | |
2069 | + for ac_prog in cl | |
2070 | +do | |
2071 | + # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2072 | +set dummy $ac_prog; ac_word=$2 | |
2073 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
2074 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
2075 | +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | |
2076 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2077 | +else | |
2078 | + if test -n "$ac_ct_CC"; then | |
2079 | + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
2080 | +else | |
2081 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
2082 | +for as_dir in $PATH | |
2083 | +do | |
2084 | + IFS=$as_save_IFS | |
2085 | + test -z "$as_dir" && as_dir=. | |
2086 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
2087 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
2088 | + ac_cv_prog_ac_ct_CC="$ac_prog" | |
2089 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
2090 | + break 2 | |
2091 | fi | |
2092 | - test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
2093 | +done | |
2094 | +done | |
2095 | + | |
2096 | fi | |
2097 | +fi | |
2098 | +ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
2099 | +if test -n "$ac_ct_CC"; then | |
2100 | + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | |
2101 | +echo "${ECHO_T}$ac_ct_CC" >&6 | |
2102 | +else | |
2103 | + echo "$as_me:$LINENO: result: no" >&5 | |
2104 | +echo "${ECHO_T}no" >&6 | |
2105 | +fi | |
2106 | + | |
2107 | + test -n "$ac_ct_CC" && break | |
2108 | +done | |
2109 | ||
2110 | -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | |
2111 | -echo "configure:799: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 | |
2112 | + CC=$ac_ct_CC | |
2113 | +fi | |
2114 | ||
2115 | -ac_ext=c | |
2116 | -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2117 | -ac_cpp='$CPP $CPPFLAGS' | |
2118 | -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2119 | -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2120 | -cross_compiling=$ac_cv_prog_cc_cross | |
2121 | +fi | |
2122 | ||
2123 | -cat > conftest.$ac_ext << EOF | |
2124 | ||
2125 | -#line 810 "configure" | |
2126 | -#include "confdefs.h" | |
2127 | +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | |
2128 | +See \`config.log' for more details." >&5 | |
2129 | +echo "$as_me: error: no acceptable C compiler found in \$PATH | |
2130 | +See \`config.log' for more details." >&2;} | |
2131 | + { (exit 1); exit 1; }; } | |
2132 | + | |
2133 | +# Provide some information about the compiler. | |
2134 | +echo "$as_me:$LINENO:" \ | |
2135 | + "checking for C compiler version" >&5 | |
2136 | +ac_compiler=`set X $ac_compile; echo $2` | |
2137 | +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | |
2138 | + (eval $ac_compiler --version </dev/null >&5) 2>&5 | |
2139 | + ac_status=$? | |
2140 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2141 | + (exit $ac_status); } | |
2142 | +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | |
2143 | + (eval $ac_compiler -v </dev/null >&5) 2>&5 | |
2144 | + ac_status=$? | |
2145 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2146 | + (exit $ac_status); } | |
2147 | +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | |
2148 | + (eval $ac_compiler -V </dev/null >&5) 2>&5 | |
2149 | + ac_status=$? | |
2150 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2151 | + (exit $ac_status); } | |
2152 | + | |
2153 | +cat >conftest.$ac_ext <<_ACEOF | |
2154 | +/* confdefs.h. */ | |
2155 | +_ACEOF | |
2156 | +cat confdefs.h >>conftest.$ac_ext | |
2157 | +cat >>conftest.$ac_ext <<_ACEOF | |
2158 | +/* end confdefs.h. */ | |
2159 | + | |
2160 | +int | |
2161 | +main () | |
2162 | +{ | |
2163 | + | |
2164 | + ; | |
2165 | + return 0; | |
2166 | +} | |
2167 | +_ACEOF | |
2168 | +ac_clean_files_save=$ac_clean_files | |
2169 | +ac_clean_files="$ac_clean_files a.out a.exe b.out" | |
2170 | +# Try to create an executable without -o first, disregard a.out. | |
2171 | +# It will help us diagnose broken compilers, and finding out an intuition | |
2172 | +# of exeext. | |
2173 | +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 | |
2174 | +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | |
2175 | +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
2176 | +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | |
2177 | + (eval $ac_link_default) 2>&5 | |
2178 | + ac_status=$? | |
2179 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2180 | + (exit $ac_status); }; then | |
2181 | + # Find the output, starting from the most likely. This scheme is | |
2182 | +# not robust to junk in `.', hence go to wildcards (a.*) only as a last | |
2183 | +# resort. | |
2184 | + | |
2185 | +# Be careful to initialize this variable, since it used to be cached. | |
2186 | +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | |
2187 | +ac_cv_exeext= | |
2188 | +# b.out is created by i960 compilers. | |
2189 | +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | |
2190 | +do | |
2191 | + test -f "$ac_file" || continue | |
2192 | + case $ac_file in | |
2193 | + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | |
2194 | + ;; | |
2195 | + conftest.$ac_ext ) | |
2196 | + # This is the source file. | |
2197 | + ;; | |
2198 | + [ab].out ) | |
2199 | + # We found the default executable, but exeext='' is most | |
2200 | + # certainly right. | |
2201 | + break;; | |
2202 | + *.* ) | |
2203 | + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
2204 | + # FIXME: I believe we export ac_cv_exeext for Libtool, | |
2205 | + # but it would be cool to find out if it's true. Does anybody | |
2206 | + # maintain Libtool? --akim. | |
2207 | + export ac_cv_exeext | |
2208 | + break;; | |
2209 | + * ) | |
2210 | + break;; | |
2211 | + esac | |
2212 | +done | |
2213 | +else | |
2214 | + echo "$as_me: failed program was:" >&5 | |
2215 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2216 | ||
2217 | -main(){return(0);} | |
2218 | -EOF | |
2219 | -if { (eval echo configure:815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
2220 | - ac_cv_prog_cc_works=yes | |
2221 | - # If we can't run a trivial program, we are probably using a cross compiler. | |
2222 | - if (./conftest; exit) 2>/dev/null; then | |
2223 | - ac_cv_prog_cc_cross=no | |
2224 | +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables | |
2225 | +See \`config.log' for more details." >&5 | |
2226 | +echo "$as_me: error: C compiler cannot create executables | |
2227 | +See \`config.log' for more details." >&2;} | |
2228 | + { (exit 77); exit 77; }; } | |
2229 | +fi | |
2230 | + | |
2231 | +ac_exeext=$ac_cv_exeext | |
2232 | +echo "$as_me:$LINENO: result: $ac_file" >&5 | |
2233 | +echo "${ECHO_T}$ac_file" >&6 | |
2234 | + | |
2235 | +# Check the compiler produces executables we can run. If not, either | |
2236 | +# the compiler is broken, or we cross compile. | |
2237 | +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | |
2238 | +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | |
2239 | +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | |
2240 | +# If not cross compiling, check that we can run a simple program. | |
2241 | +if test "$cross_compiling" != yes; then | |
2242 | + if { ac_try='./$ac_file' | |
2243 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2244 | + (eval $ac_try) 2>&5 | |
2245 | + ac_status=$? | |
2246 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2247 | + (exit $ac_status); }; }; then | |
2248 | + cross_compiling=no | |
2249 | else | |
2250 | - ac_cv_prog_cc_cross=yes | |
2251 | + if test "$cross_compiling" = maybe; then | |
2252 | + cross_compiling=yes | |
2253 | + else | |
2254 | + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | |
2255 | +If you meant to cross compile, use \`--host'. | |
2256 | +See \`config.log' for more details." >&5 | |
2257 | +echo "$as_me: error: cannot run C compiled programs. | |
2258 | +If you meant to cross compile, use \`--host'. | |
2259 | +See \`config.log' for more details." >&2;} | |
2260 | + { (exit 1); exit 1; }; } | |
2261 | + fi | |
2262 | fi | |
2263 | -else | |
2264 | - echo "configure: failed program was:" >&5 | |
2265 | - cat conftest.$ac_ext >&5 | |
2266 | - ac_cv_prog_cc_works=no | |
2267 | -fi | |
2268 | -rm -fr conftest* | |
2269 | -ac_ext=c | |
2270 | -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2271 | -ac_cpp='$CPP $CPPFLAGS' | |
2272 | -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2273 | -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2274 | -cross_compiling=$ac_cv_prog_cc_cross | |
2275 | - | |
2276 | -echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
2277 | -if test $ac_cv_prog_cc_works = no; then | |
2278 | - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
2279 | fi | |
2280 | -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | |
2281 | -echo "configure:841: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 | |
2282 | -echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 | |
2283 | -cross_compiling=$ac_cv_prog_cc_cross | |
2284 | +echo "$as_me:$LINENO: result: yes" >&5 | |
2285 | +echo "${ECHO_T}yes" >&6 | |
2286 | ||
2287 | -echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
2288 | -echo "configure:846: checking whether we are using GNU C" >&5 | |
2289 | -if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then | |
2290 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
2291 | +rm -f a.out a.exe conftest$ac_cv_exeext b.out | |
2292 | +ac_clean_files=$ac_clean_files_save | |
2293 | +# Check the compiler produces executables we can run. If not, either | |
2294 | +# the compiler is broken, or we cross compile. | |
2295 | +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | |
2296 | +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | |
2297 | +echo "$as_me:$LINENO: result: $cross_compiling" >&5 | |
2298 | +echo "${ECHO_T}$cross_compiling" >&6 | |
2299 | + | |
2300 | +echo "$as_me:$LINENO: checking for suffix of executables" >&5 | |
2301 | +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | |
2302 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
2303 | + (eval $ac_link) 2>&5 | |
2304 | + ac_status=$? | |
2305 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2306 | + (exit $ac_status); }; then | |
2307 | + # If both `conftest.exe' and `conftest' are `present' (well, observable) | |
2308 | +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | |
2309 | +# work properly (i.e., refer to `conftest.exe'), while it won't with | |
2310 | +# `rm'. | |
2311 | +for ac_file in conftest.exe conftest conftest.*; do | |
2312 | + test -f "$ac_file" || continue | |
2313 | + case $ac_file in | |
2314 | + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | |
2315 | + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
2316 | + export ac_cv_exeext | |
2317 | + break;; | |
2318 | + * ) break;; | |
2319 | + esac | |
2320 | +done | |
2321 | else | |
2322 | - cat > conftest.c <<EOF | |
2323 | -#ifdef __GNUC__ | |
2324 | - yes; | |
2325 | -#endif | |
2326 | -EOF | |
2327 | -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then | |
2328 | - ac_cv_prog_gcc=yes | |
2329 | + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link | |
2330 | +See \`config.log' for more details." >&5 | |
2331 | +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | |
2332 | +See \`config.log' for more details." >&2;} | |
2333 | + { (exit 1); exit 1; }; } | |
2334 | +fi | |
2335 | + | |
2336 | +rm -f conftest$ac_cv_exeext | |
2337 | +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | |
2338 | +echo "${ECHO_T}$ac_cv_exeext" >&6 | |
2339 | + | |
2340 | +rm -f conftest.$ac_ext | |
2341 | +EXEEXT=$ac_cv_exeext | |
2342 | +ac_exeext=$EXEEXT | |
2343 | +echo "$as_me:$LINENO: checking for suffix of object files" >&5 | |
2344 | +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | |
2345 | +if test "${ac_cv_objext+set}" = set; then | |
2346 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2347 | +else | |
2348 | + cat >conftest.$ac_ext <<_ACEOF | |
2349 | +/* confdefs.h. */ | |
2350 | +_ACEOF | |
2351 | +cat confdefs.h >>conftest.$ac_ext | |
2352 | +cat >>conftest.$ac_ext <<_ACEOF | |
2353 | +/* end confdefs.h. */ | |
2354 | + | |
2355 | +int | |
2356 | +main () | |
2357 | +{ | |
2358 | + | |
2359 | + ; | |
2360 | + return 0; | |
2361 | +} | |
2362 | +_ACEOF | |
2363 | +rm -f conftest.o conftest.obj | |
2364 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2365 | + (eval $ac_compile) 2>&5 | |
2366 | + ac_status=$? | |
2367 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2368 | + (exit $ac_status); }; then | |
2369 | + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | |
2370 | + case $ac_file in | |
2371 | + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | |
2372 | + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
2373 | + break;; | |
2374 | + esac | |
2375 | +done | |
2376 | else | |
2377 | - ac_cv_prog_gcc=no | |
2378 | -fi | |
2379 | -fi | |
2380 | - | |
2381 | -echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
2382 | + echo "$as_me: failed program was:" >&5 | |
2383 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2384 | ||
2385 | -if test $ac_cv_prog_gcc = yes; then | |
2386 | - GCC=yes | |
2387 | -else | |
2388 | - GCC= | |
2389 | -fi | |
2390 | +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | |
2391 | +See \`config.log' for more details." >&5 | |
2392 | +echo "$as_me: error: cannot compute suffix of object files: cannot compile | |
2393 | +See \`config.log' for more details." >&2;} | |
2394 | + { (exit 1); exit 1; }; } | |
2395 | +fi | |
2396 | + | |
2397 | +rm -f conftest.$ac_cv_objext conftest.$ac_ext | |
2398 | +fi | |
2399 | +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | |
2400 | +echo "${ECHO_T}$ac_cv_objext" >&6 | |
2401 | +OBJEXT=$ac_cv_objext | |
2402 | +ac_objext=$OBJEXT | |
2403 | +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | |
2404 | +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | |
2405 | +if test "${ac_cv_c_compiler_gnu+set}" = set; then | |
2406 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2407 | +else | |
2408 | + cat >conftest.$ac_ext <<_ACEOF | |
2409 | +/* confdefs.h. */ | |
2410 | +_ACEOF | |
2411 | +cat confdefs.h >>conftest.$ac_ext | |
2412 | +cat >>conftest.$ac_ext <<_ACEOF | |
2413 | +/* end confdefs.h. */ | |
2414 | + | |
2415 | +int | |
2416 | +main () | |
2417 | +{ | |
2418 | +#ifndef __GNUC__ | |
2419 | + choke me | |
2420 | +#endif | |
2421 | ||
2422 | -ac_test_CFLAGS="${CFLAGS+set}" | |
2423 | -ac_save_CFLAGS="$CFLAGS" | |
2424 | -CFLAGS= | |
2425 | -echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
2426 | -echo "configure:874: checking whether ${CC-cc} accepts -g" >&5 | |
2427 | -if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then | |
2428 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
2429 | -else | |
2430 | - echo 'void f(){}' > conftest.c | |
2431 | -if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
2432 | + ; | |
2433 | + return 0; | |
2434 | +} | |
2435 | +_ACEOF | |
2436 | +rm -f conftest.$ac_objext | |
2437 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2438 | + (eval $ac_compile) 2>conftest.er1 | |
2439 | + ac_status=$? | |
2440 | + grep -v '^ *+' conftest.er1 >conftest.err | |
2441 | + rm -f conftest.er1 | |
2442 | + cat conftest.err >&5 | |
2443 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2444 | + (exit $ac_status); } && | |
2445 | + { ac_try='test -z "$ac_c_werror_flag" | |
2446 | + || test ! -s conftest.err' | |
2447 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2448 | + (eval $ac_try) 2>&5 | |
2449 | + ac_status=$? | |
2450 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2451 | + (exit $ac_status); }; } && | |
2452 | + { ac_try='test -s conftest.$ac_objext' | |
2453 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2454 | + (eval $ac_try) 2>&5 | |
2455 | + ac_status=$? | |
2456 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2457 | + (exit $ac_status); }; }; then | |
2458 | + ac_compiler_gnu=yes | |
2459 | +else | |
2460 | + echo "$as_me: failed program was:" >&5 | |
2461 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2462 | + | |
2463 | +ac_compiler_gnu=no | |
2464 | +fi | |
2465 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
2466 | +ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
2467 | + | |
2468 | +fi | |
2469 | +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | |
2470 | +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | |
2471 | +GCC=`test $ac_compiler_gnu = yes && echo yes` | |
2472 | +ac_test_CFLAGS=${CFLAGS+set} | |
2473 | +ac_save_CFLAGS=$CFLAGS | |
2474 | +CFLAGS="-g" | |
2475 | +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | |
2476 | +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | |
2477 | +if test "${ac_cv_prog_cc_g+set}" = set; then | |
2478 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2479 | +else | |
2480 | + cat >conftest.$ac_ext <<_ACEOF | |
2481 | +/* confdefs.h. */ | |
2482 | +_ACEOF | |
2483 | +cat confdefs.h >>conftest.$ac_ext | |
2484 | +cat >>conftest.$ac_ext <<_ACEOF | |
2485 | +/* end confdefs.h. */ | |
2486 | + | |
2487 | +int | |
2488 | +main () | |
2489 | +{ | |
2490 | + | |
2491 | + ; | |
2492 | + return 0; | |
2493 | +} | |
2494 | +_ACEOF | |
2495 | +rm -f conftest.$ac_objext | |
2496 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2497 | + (eval $ac_compile) 2>conftest.er1 | |
2498 | + ac_status=$? | |
2499 | + grep -v '^ *+' conftest.er1 >conftest.err | |
2500 | + rm -f conftest.er1 | |
2501 | + cat conftest.err >&5 | |
2502 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2503 | + (exit $ac_status); } && | |
2504 | + { ac_try='test -z "$ac_c_werror_flag" | |
2505 | + || test ! -s conftest.err' | |
2506 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2507 | + (eval $ac_try) 2>&5 | |
2508 | + ac_status=$? | |
2509 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2510 | + (exit $ac_status); }; } && | |
2511 | + { ac_try='test -s conftest.$ac_objext' | |
2512 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2513 | + (eval $ac_try) 2>&5 | |
2514 | + ac_status=$? | |
2515 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2516 | + (exit $ac_status); }; }; then | |
2517 | ac_cv_prog_cc_g=yes | |
2518 | else | |
2519 | - ac_cv_prog_cc_g=no | |
2520 | -fi | |
2521 | -rm -f conftest* | |
2522 | + echo "$as_me: failed program was:" >&5 | |
2523 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2524 | ||
2525 | +ac_cv_prog_cc_g=no | |
2526 | fi | |
2527 | - | |
2528 | -echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
2529 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
2530 | +fi | |
2531 | +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | |
2532 | +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | |
2533 | if test "$ac_test_CFLAGS" = set; then | |
2534 | - CFLAGS="$ac_save_CFLAGS" | |
2535 | + CFLAGS=$ac_save_CFLAGS | |
2536 | elif test $ac_cv_prog_cc_g = yes; then | |
2537 | if test "$GCC" = yes; then | |
2538 | CFLAGS="-g -O2" | |
2539 | @@ -900,86 +2105,503 @@ else | |
2540 | CFLAGS= | |
2541 | fi | |
2542 | fi | |
2543 | +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 | |
2544 | +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | |
2545 | +if test "${ac_cv_prog_cc_stdc+set}" = set; then | |
2546 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2547 | +else | |
2548 | + ac_cv_prog_cc_stdc=no | |
2549 | +ac_save_CC=$CC | |
2550 | +cat >conftest.$ac_ext <<_ACEOF | |
2551 | +/* confdefs.h. */ | |
2552 | +_ACEOF | |
2553 | +cat confdefs.h >>conftest.$ac_ext | |
2554 | +cat >>conftest.$ac_ext <<_ACEOF | |
2555 | +/* end confdefs.h. */ | |
2556 | +#include <stdarg.h> | |
2557 | +#include <stdio.h> | |
2558 | +#include <sys/types.h> | |
2559 | +#include <sys/stat.h> | |
2560 | +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | |
2561 | +struct buf { int x; }; | |
2562 | +FILE * (*rcsopen) (struct buf *, struct stat *, int); | |
2563 | +static char *e (p, i) | |
2564 | + char **p; | |
2565 | + int i; | |
2566 | +{ | |
2567 | + return p[i]; | |
2568 | +} | |
2569 | +static char *f (char * (*g) (char **, int), char **p, ...) | |
2570 | +{ | |
2571 | + char *s; | |
2572 | + va_list v; | |
2573 | + va_start (v,p); | |
2574 | + s = g (p, va_arg (v,int)); | |
2575 | + va_end (v); | |
2576 | + return s; | |
2577 | +} | |
2578 | + | |
2579 | +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
2580 | + function prototypes and stuff, but not '\xHH' hex character constants. | |
2581 | + These don't provoke an error unfortunately, instead are silently treated | |
2582 | + as 'x'. The following induces an error, until -std1 is added to get | |
2583 | + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | |
2584 | + array size at least. It's necessary to write '\x00'==0 to get something | |
2585 | + that's true only with -std1. */ | |
2586 | +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | |
2587 | + | |
2588 | +int test (int i, double x); | |
2589 | +struct s1 {int (*f) (int a);}; | |
2590 | +struct s2 {int (*f) (double a);}; | |
2591 | +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | |
2592 | +int argc; | |
2593 | +char **argv; | |
2594 | +int | |
2595 | +main () | |
2596 | +{ | |
2597 | +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | |
2598 | + ; | |
2599 | + return 0; | |
2600 | +} | |
2601 | +_ACEOF | |
2602 | +# Don't try gcc -ansi; that turns off useful extensions and | |
2603 | +# breaks some systems' header files. | |
2604 | +# AIX -qlanglvl=ansi | |
2605 | +# Ultrix and OSF/1 -std1 | |
2606 | +# HP-UX 10.20 and later -Ae | |
2607 | +# HP-UX older versions -Aa -D_HPUX_SOURCE | |
2608 | +# SVR4 -Xc -D__EXTENSIONS__ | |
2609 | +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
2610 | +do | |
2611 | + CC="$ac_save_CC $ac_arg" | |
2612 | + rm -f conftest.$ac_objext | |
2613 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2614 | + (eval $ac_compile) 2>conftest.er1 | |
2615 | + ac_status=$? | |
2616 | + grep -v '^ *+' conftest.er1 >conftest.err | |
2617 | + rm -f conftest.er1 | |
2618 | + cat conftest.err >&5 | |
2619 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2620 | + (exit $ac_status); } && | |
2621 | + { ac_try='test -z "$ac_c_werror_flag" | |
2622 | + || test ! -s conftest.err' | |
2623 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2624 | + (eval $ac_try) 2>&5 | |
2625 | + ac_status=$? | |
2626 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2627 | + (exit $ac_status); }; } && | |
2628 | + { ac_try='test -s conftest.$ac_objext' | |
2629 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2630 | + (eval $ac_try) 2>&5 | |
2631 | + ac_status=$? | |
2632 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2633 | + (exit $ac_status); }; }; then | |
2634 | + ac_cv_prog_cc_stdc=$ac_arg | |
2635 | +break | |
2636 | +else | |
2637 | + echo "$as_me: failed program was:" >&5 | |
2638 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2639 | + | |
2640 | +fi | |
2641 | +rm -f conftest.err conftest.$ac_objext | |
2642 | +done | |
2643 | +rm -f conftest.$ac_ext conftest.$ac_objext | |
2644 | +CC=$ac_save_CC | |
2645 | + | |
2646 | +fi | |
2647 | + | |
2648 | +case "x$ac_cv_prog_cc_stdc" in | |
2649 | + x|xno) | |
2650 | + echo "$as_me:$LINENO: result: none needed" >&5 | |
2651 | +echo "${ECHO_T}none needed" >&6 ;; | |
2652 | + *) | |
2653 | + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | |
2654 | +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | |
2655 | + CC="$CC $ac_cv_prog_cc_stdc" ;; | |
2656 | +esac | |
2657 | + | |
2658 | +# Some people use a C++ compiler to compile C. Since we use `exit', | |
2659 | +# in C++ we need to declare it. In case someone uses the same compiler | |
2660 | +# for both compiling C and C++ we need to have the C++ compiler decide | |
2661 | +# the declaration of exit, since it's the most demanding environment. | |
2662 | +cat >conftest.$ac_ext <<_ACEOF | |
2663 | +#ifndef __cplusplus | |
2664 | + choke me | |
2665 | +#endif | |
2666 | +_ACEOF | |
2667 | +rm -f conftest.$ac_objext | |
2668 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2669 | + (eval $ac_compile) 2>conftest.er1 | |
2670 | + ac_status=$? | |
2671 | + grep -v '^ *+' conftest.er1 >conftest.err | |
2672 | + rm -f conftest.er1 | |
2673 | + cat conftest.err >&5 | |
2674 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2675 | + (exit $ac_status); } && | |
2676 | + { ac_try='test -z "$ac_c_werror_flag" | |
2677 | + || test ! -s conftest.err' | |
2678 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2679 | + (eval $ac_try) 2>&5 | |
2680 | + ac_status=$? | |
2681 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2682 | + (exit $ac_status); }; } && | |
2683 | + { ac_try='test -s conftest.$ac_objext' | |
2684 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2685 | + (eval $ac_try) 2>&5 | |
2686 | + ac_status=$? | |
2687 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2688 | + (exit $ac_status); }; }; then | |
2689 | + for ac_declaration in \ | |
2690 | + '' \ | |
2691 | + 'extern "C" void std::exit (int) throw (); using std::exit;' \ | |
2692 | + 'extern "C" void std::exit (int); using std::exit;' \ | |
2693 | + 'extern "C" void exit (int) throw ();' \ | |
2694 | + 'extern "C" void exit (int);' \ | |
2695 | + 'void exit (int);' | |
2696 | +do | |
2697 | + cat >conftest.$ac_ext <<_ACEOF | |
2698 | +/* confdefs.h. */ | |
2699 | +_ACEOF | |
2700 | +cat confdefs.h >>conftest.$ac_ext | |
2701 | +cat >>conftest.$ac_ext <<_ACEOF | |
2702 | +/* end confdefs.h. */ | |
2703 | +$ac_declaration | |
2704 | +#include <stdlib.h> | |
2705 | +int | |
2706 | +main () | |
2707 | +{ | |
2708 | +exit (42); | |
2709 | + ; | |
2710 | + return 0; | |
2711 | +} | |
2712 | +_ACEOF | |
2713 | +rm -f conftest.$ac_objext | |
2714 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2715 | + (eval $ac_compile) 2>conftest.er1 | |
2716 | + ac_status=$? | |
2717 | + grep -v '^ *+' conftest.er1 >conftest.err | |
2718 | + rm -f conftest.er1 | |
2719 | + cat conftest.err >&5 | |
2720 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2721 | + (exit $ac_status); } && | |
2722 | + { ac_try='test -z "$ac_c_werror_flag" | |
2723 | + || test ! -s conftest.err' | |
2724 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2725 | + (eval $ac_try) 2>&5 | |
2726 | + ac_status=$? | |
2727 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2728 | + (exit $ac_status); }; } && | |
2729 | + { ac_try='test -s conftest.$ac_objext' | |
2730 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2731 | + (eval $ac_try) 2>&5 | |
2732 | + ac_status=$? | |
2733 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2734 | + (exit $ac_status); }; }; then | |
2735 | + : | |
2736 | +else | |
2737 | + echo "$as_me: failed program was:" >&5 | |
2738 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2739 | + | |
2740 | +continue | |
2741 | +fi | |
2742 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
2743 | + cat >conftest.$ac_ext <<_ACEOF | |
2744 | +/* confdefs.h. */ | |
2745 | +_ACEOF | |
2746 | +cat confdefs.h >>conftest.$ac_ext | |
2747 | +cat >>conftest.$ac_ext <<_ACEOF | |
2748 | +/* end confdefs.h. */ | |
2749 | +$ac_declaration | |
2750 | +int | |
2751 | +main () | |
2752 | +{ | |
2753 | +exit (42); | |
2754 | + ; | |
2755 | + return 0; | |
2756 | +} | |
2757 | +_ACEOF | |
2758 | +rm -f conftest.$ac_objext | |
2759 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
2760 | + (eval $ac_compile) 2>conftest.er1 | |
2761 | + ac_status=$? | |
2762 | + grep -v '^ *+' conftest.er1 >conftest.err | |
2763 | + rm -f conftest.er1 | |
2764 | + cat conftest.err >&5 | |
2765 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2766 | + (exit $ac_status); } && | |
2767 | + { ac_try='test -z "$ac_c_werror_flag" | |
2768 | + || test ! -s conftest.err' | |
2769 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2770 | + (eval $ac_try) 2>&5 | |
2771 | + ac_status=$? | |
2772 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2773 | + (exit $ac_status); }; } && | |
2774 | + { ac_try='test -s conftest.$ac_objext' | |
2775 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
2776 | + (eval $ac_try) 2>&5 | |
2777 | + ac_status=$? | |
2778 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2779 | + (exit $ac_status); }; }; then | |
2780 | + break | |
2781 | +else | |
2782 | + echo "$as_me: failed program was:" >&5 | |
2783 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2784 | + | |
2785 | +fi | |
2786 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
2787 | +done | |
2788 | +rm -f conftest* | |
2789 | +if test -n "$ac_declaration"; then | |
2790 | + echo '#ifdef __cplusplus' >>confdefs.h | |
2791 | + echo $ac_declaration >>confdefs.h | |
2792 | + echo '#endif' >>confdefs.h | |
2793 | +fi | |
2794 | + | |
2795 | +else | |
2796 | + echo "$as_me: failed program was:" >&5 | |
2797 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2798 | + | |
2799 | +fi | |
2800 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
2801 | +ac_ext=c | |
2802 | +ac_cpp='$CPP $CPPFLAGS' | |
2803 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2804 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2805 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2806 | ||
2807 | -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
2808 | -echo "configure:906: checking how to run the C preprocessor" >&5 | |
2809 | +ac_ext=c | |
2810 | +ac_cpp='$CPP $CPPFLAGS' | |
2811 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
2812 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
2813 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
2814 | +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | |
2815 | +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | |
2816 | # On Suns, sometimes $CPP names a directory. | |
2817 | if test -n "$CPP" && test -d "$CPP"; then | |
2818 | CPP= | |
2819 | fi | |
2820 | if test -z "$CPP"; then | |
2821 | -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then | |
2822 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
2823 | + if test "${ac_cv_prog_CPP+set}" = set; then | |
2824 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
2825 | else | |
2826 | - # This must be in double quotes, not single quotes, because CPP may get | |
2827 | - # substituted into the Makefile and "${CC-cc}" will confuse make. | |
2828 | - CPP="${CC-cc} -E" | |
2829 | + # Double quotes because CPP needs to be expanded | |
2830 | + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | |
2831 | + do | |
2832 | + ac_preproc_ok=false | |
2833 | +for ac_c_preproc_warn_flag in '' yes | |
2834 | +do | |
2835 | + # Use a header file that comes with gcc, so configuring glibc | |
2836 | + # with a fresh cross-compiler works. | |
2837 | + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2838 | + # <limits.h> exists even on freestanding compilers. | |
2839 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2840 | - # not just through cpp. | |
2841 | - cat > conftest.$ac_ext <<EOF | |
2842 | -#line 921 "configure" | |
2843 | -#include "confdefs.h" | |
2844 | -#include <assert.h> | |
2845 | -Syntax Error | |
2846 | -EOF | |
2847 | -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2848 | -{ (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2849 | -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
2850 | -if test -z "$ac_err"; then | |
2851 | - : | |
2852 | + # not just through cpp. "Syntax error" is here to catch this case. | |
2853 | + cat >conftest.$ac_ext <<_ACEOF | |
2854 | +/* confdefs.h. */ | |
2855 | +_ACEOF | |
2856 | +cat confdefs.h >>conftest.$ac_ext | |
2857 | +cat >>conftest.$ac_ext <<_ACEOF | |
2858 | +/* end confdefs.h. */ | |
2859 | +#ifdef __STDC__ | |
2860 | +# include <limits.h> | |
2861 | +#else | |
2862 | +# include <assert.h> | |
2863 | +#endif | |
2864 | + Syntax error | |
2865 | +_ACEOF | |
2866 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2867 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2868 | + ac_status=$? | |
2869 | + grep -v '^ *+' conftest.er1 >conftest.err | |
2870 | + rm -f conftest.er1 | |
2871 | + cat conftest.err >&5 | |
2872 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2873 | + (exit $ac_status); } >/dev/null; then | |
2874 | + if test -s conftest.err; then | |
2875 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
2876 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
2877 | + else | |
2878 | + ac_cpp_err= | |
2879 | + fi | |
2880 | else | |
2881 | - echo "$ac_err" >&5 | |
2882 | - echo "configure: failed program was:" >&5 | |
2883 | - cat conftest.$ac_ext >&5 | |
2884 | - rm -rf conftest* | |
2885 | - CPP="${CC-cc} -E -traditional-cpp" | |
2886 | - cat > conftest.$ac_ext <<EOF | |
2887 | -#line 938 "configure" | |
2888 | -#include "confdefs.h" | |
2889 | -#include <assert.h> | |
2890 | -Syntax Error | |
2891 | -EOF | |
2892 | -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2893 | -{ (eval echo configure:944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2894 | -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
2895 | -if test -z "$ac_err"; then | |
2896 | + ac_cpp_err=yes | |
2897 | +fi | |
2898 | +if test -z "$ac_cpp_err"; then | |
2899 | : | |
2900 | else | |
2901 | - echo "$ac_err" >&5 | |
2902 | - echo "configure: failed program was:" >&5 | |
2903 | - cat conftest.$ac_ext >&5 | |
2904 | - rm -rf conftest* | |
2905 | - CPP="${CC-cc} -nologo -E" | |
2906 | - cat > conftest.$ac_ext <<EOF | |
2907 | -#line 955 "configure" | |
2908 | -#include "confdefs.h" | |
2909 | -#include <assert.h> | |
2910 | -Syntax Error | |
2911 | -EOF | |
2912 | -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
2913 | -{ (eval echo configure:961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
2914 | -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
2915 | -if test -z "$ac_err"; then | |
2916 | - : | |
2917 | + echo "$as_me: failed program was:" >&5 | |
2918 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2919 | + | |
2920 | + # Broken: fails on valid input. | |
2921 | +continue | |
2922 | +fi | |
2923 | +rm -f conftest.err conftest.$ac_ext | |
2924 | + | |
2925 | + # OK, works on sane cases. Now check whether non-existent headers | |
2926 | + # can be detected and how. | |
2927 | + cat >conftest.$ac_ext <<_ACEOF | |
2928 | +/* confdefs.h. */ | |
2929 | +_ACEOF | |
2930 | +cat confdefs.h >>conftest.$ac_ext | |
2931 | +cat >>conftest.$ac_ext <<_ACEOF | |
2932 | +/* end confdefs.h. */ | |
2933 | +#include <ac_nonexistent.h> | |
2934 | +_ACEOF | |
2935 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
2936 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
2937 | + ac_status=$? | |
2938 | + grep -v '^ *+' conftest.er1 >conftest.err | |
2939 | + rm -f conftest.er1 | |
2940 | + cat conftest.err >&5 | |
2941 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
2942 | + (exit $ac_status); } >/dev/null; then | |
2943 | + if test -s conftest.err; then | |
2944 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
2945 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
2946 | + else | |
2947 | + ac_cpp_err= | |
2948 | + fi | |
2949 | else | |
2950 | - echo "$ac_err" >&5 | |
2951 | - echo "configure: failed program was:" >&5 | |
2952 | - cat conftest.$ac_ext >&5 | |
2953 | - rm -rf conftest* | |
2954 | - CPP=/lib/cpp | |
2955 | + ac_cpp_err=yes | |
2956 | fi | |
2957 | -rm -f conftest* | |
2958 | +if test -z "$ac_cpp_err"; then | |
2959 | + # Broken: success on invalid input. | |
2960 | +continue | |
2961 | +else | |
2962 | + echo "$as_me: failed program was:" >&5 | |
2963 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
2964 | + | |
2965 | + # Passes both tests. | |
2966 | +ac_preproc_ok=: | |
2967 | +break | |
2968 | fi | |
2969 | -rm -f conftest* | |
2970 | +rm -f conftest.err conftest.$ac_ext | |
2971 | + | |
2972 | +done | |
2973 | +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
2974 | +rm -f conftest.err conftest.$ac_ext | |
2975 | +if $ac_preproc_ok; then | |
2976 | + break | |
2977 | fi | |
2978 | -rm -f conftest* | |
2979 | - ac_cv_prog_CPP="$CPP" | |
2980 | + | |
2981 | + done | |
2982 | + ac_cv_prog_CPP=$CPP | |
2983 | + | |
2984 | +fi | |
2985 | + CPP=$ac_cv_prog_CPP | |
2986 | +else | |
2987 | + ac_cv_prog_CPP=$CPP | |
2988 | +fi | |
2989 | +echo "$as_me:$LINENO: result: $CPP" >&5 | |
2990 | +echo "${ECHO_T}$CPP" >&6 | |
2991 | +ac_preproc_ok=false | |
2992 | +for ac_c_preproc_warn_flag in '' yes | |
2993 | +do | |
2994 | + # Use a header file that comes with gcc, so configuring glibc | |
2995 | + # with a fresh cross-compiler works. | |
2996 | + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
2997 | + # <limits.h> exists even on freestanding compilers. | |
2998 | + # On the NeXT, cc -E runs the code through the compiler's parser, | |
2999 | + # not just through cpp. "Syntax error" is here to catch this case. | |
3000 | + cat >conftest.$ac_ext <<_ACEOF | |
3001 | +/* confdefs.h. */ | |
3002 | +_ACEOF | |
3003 | +cat confdefs.h >>conftest.$ac_ext | |
3004 | +cat >>conftest.$ac_ext <<_ACEOF | |
3005 | +/* end confdefs.h. */ | |
3006 | +#ifdef __STDC__ | |
3007 | +# include <limits.h> | |
3008 | +#else | |
3009 | +# include <assert.h> | |
3010 | +#endif | |
3011 | + Syntax error | |
3012 | +_ACEOF | |
3013 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3014 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3015 | + ac_status=$? | |
3016 | + grep -v '^ *+' conftest.er1 >conftest.err | |
3017 | + rm -f conftest.er1 | |
3018 | + cat conftest.err >&5 | |
3019 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3020 | + (exit $ac_status); } >/dev/null; then | |
3021 | + if test -s conftest.err; then | |
3022 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
3023 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
3024 | + else | |
3025 | + ac_cpp_err= | |
3026 | + fi | |
3027 | +else | |
3028 | + ac_cpp_err=yes | |
3029 | +fi | |
3030 | +if test -z "$ac_cpp_err"; then | |
3031 | + : | |
3032 | +else | |
3033 | + echo "$as_me: failed program was:" >&5 | |
3034 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
3035 | + | |
3036 | + # Broken: fails on valid input. | |
3037 | +continue | |
3038 | +fi | |
3039 | +rm -f conftest.err conftest.$ac_ext | |
3040 | + | |
3041 | + # OK, works on sane cases. Now check whether non-existent headers | |
3042 | + # can be detected and how. | |
3043 | + cat >conftest.$ac_ext <<_ACEOF | |
3044 | +/* confdefs.h. */ | |
3045 | +_ACEOF | |
3046 | +cat confdefs.h >>conftest.$ac_ext | |
3047 | +cat >>conftest.$ac_ext <<_ACEOF | |
3048 | +/* end confdefs.h. */ | |
3049 | +#include <ac_nonexistent.h> | |
3050 | +_ACEOF | |
3051 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3052 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3053 | + ac_status=$? | |
3054 | + grep -v '^ *+' conftest.er1 >conftest.err | |
3055 | + rm -f conftest.er1 | |
3056 | + cat conftest.err >&5 | |
3057 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3058 | + (exit $ac_status); } >/dev/null; then | |
3059 | + if test -s conftest.err; then | |
3060 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
3061 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
3062 | + else | |
3063 | + ac_cpp_err= | |
3064 | + fi | |
3065 | +else | |
3066 | + ac_cpp_err=yes | |
3067 | +fi | |
3068 | +if test -z "$ac_cpp_err"; then | |
3069 | + # Broken: success on invalid input. | |
3070 | +continue | |
3071 | +else | |
3072 | + echo "$as_me: failed program was:" >&5 | |
3073 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
3074 | + | |
3075 | + # Passes both tests. | |
3076 | +ac_preproc_ok=: | |
3077 | +break | |
3078 | fi | |
3079 | - CPP="$ac_cv_prog_CPP" | |
3080 | +rm -f conftest.err conftest.$ac_ext | |
3081 | + | |
3082 | +done | |
3083 | +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
3084 | +rm -f conftest.err conftest.$ac_ext | |
3085 | +if $ac_preproc_ok; then | |
3086 | + : | |
3087 | else | |
3088 | - ac_cv_prog_CPP="$CPP" | |
3089 | + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check | |
3090 | +See \`config.log' for more details." >&5 | |
3091 | +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | |
3092 | +See \`config.log' for more details." >&2;} | |
3093 | + { (exit 1); exit 1; }; } | |
3094 | fi | |
3095 | -echo "$ac_t""$CPP" 1>&6 | |
3096 | + | |
3097 | +ac_ext=c | |
3098 | +ac_cpp='$CPP $CPPFLAGS' | |
3099 | +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
3100 | +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
3101 | +ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
3102 | ||
3103 | ac_aux_dir= | |
3104 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
3105 | @@ -991,14 +2613,20 @@ for ac_dir in $srcdir $srcdir/.. $srcdir | |
3106 | ac_aux_dir=$ac_dir | |
3107 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
3108 | break | |
3109 | + elif test -f $ac_dir/shtool; then | |
3110 | + ac_aux_dir=$ac_dir | |
3111 | + ac_install_sh="$ac_aux_dir/shtool install -c" | |
3112 | + break | |
3113 | fi | |
3114 | done | |
3115 | if test -z "$ac_aux_dir"; then | |
3116 | - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
3117 | -fi | |
3118 | -ac_config_guess=$ac_aux_dir/config.guess | |
3119 | -ac_config_sub=$ac_aux_dir/config.sub | |
3120 | -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
3121 | + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 | |
3122 | +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} | |
3123 | + { (exit 1); exit 1; }; } | |
3124 | +fi | |
3125 | +ac_config_guess="$SHELL $ac_aux_dir/config.guess" | |
3126 | +ac_config_sub="$SHELL $ac_aux_dir/config.sub" | |
3127 | +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | |
3128 | ||
3129 | # Find a good install program. We prefer a C program (faster), | |
3130 | # so one script is as good as another. But avoid the broken or | |
3131 | @@ -1007,60 +2635,75 @@ ac_configure=$ac_aux_dir/configure # Thi | |
3132 | # SunOS /usr/etc/install | |
3133 | # IRIX /sbin/install | |
3134 | # AIX /bin/install | |
3135 | +# AmigaOS /C/install, which installs bootblocks on floppy discs | |
3136 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
3137 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
3138 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
3139 | +# OS/2's system install, which has a completely different semantic | |
3140 | # ./install, which can be erroneously created by make from ./install.sh. | |
3141 | -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
3142 | -echo "configure:1016: checking for a BSD compatible install" >&5 | |
3143 | +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 | |
3144 | +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 | |
3145 | if test -z "$INSTALL"; then | |
3146 | -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then | |
3147 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
3148 | +if test "${ac_cv_path_install+set}" = set; then | |
3149 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3150 | else | |
3151 | - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
3152 | - for ac_dir in $PATH; do | |
3153 | - # Account for people who put trailing slashes in PATH elements. | |
3154 | - case "$ac_dir/" in | |
3155 | - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
3156 | - *) | |
3157 | - # OSF1 and SCO ODT 3.0 have their own names for install. | |
3158 | - # Don't use installbsd from OSF since it installs stuff as root | |
3159 | - # by default. | |
3160 | - for ac_prog in ginstall scoinst install; do | |
3161 | - if test -f $ac_dir/$ac_prog; then | |
3162 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3163 | +for as_dir in $PATH | |
3164 | +do | |
3165 | + IFS=$as_save_IFS | |
3166 | + test -z "$as_dir" && as_dir=. | |
3167 | + # Account for people who put trailing slashes in PATH elements. | |
3168 | +case $as_dir/ in | |
3169 | + ./ | .// | /cC/* | \ | |
3170 | + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
3171 | + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ | |
3172 | + /usr/ucb/* ) ;; | |
3173 | + *) | |
3174 | + # OSF1 and SCO ODT 3.0 have their own names for install. | |
3175 | + # Don't use installbsd from OSF since it installs stuff as root | |
3176 | + # by default. | |
3177 | + for ac_prog in ginstall scoinst install; do | |
3178 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3179 | + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then | |
3180 | if test $ac_prog = install && | |
3181 | - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
3182 | + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3183 | # AIX install. It has an incompatible calling convention. | |
3184 | : | |
3185 | + elif test $ac_prog = install && | |
3186 | + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
3187 | + # program-specific install script used by HP pwplus--don't use. | |
3188 | + : | |
3189 | else | |
3190 | - ac_cv_path_install="$ac_dir/$ac_prog -c" | |
3191 | - break 2 | |
3192 | + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | |
3193 | + break 3 | |
3194 | fi | |
3195 | fi | |
3196 | done | |
3197 | - ;; | |
3198 | - esac | |
3199 | - done | |
3200 | - IFS="$ac_save_IFS" | |
3201 | + done | |
3202 | + ;; | |
3203 | +esac | |
3204 | +done | |
3205 | + | |
3206 | ||
3207 | fi | |
3208 | if test "${ac_cv_path_install+set}" = set; then | |
3209 | - INSTALL="$ac_cv_path_install" | |
3210 | + INSTALL=$ac_cv_path_install | |
3211 | else | |
3212 | # As a last resort, use the slow shell script. We don't cache a | |
3213 | # path for INSTALL within a source directory, because that will | |
3214 | # break other packages using the cache if that directory is | |
3215 | # removed, or if the path is relative. | |
3216 | - INSTALL="$ac_install_sh" | |
3217 | + INSTALL=$ac_install_sh | |
3218 | fi | |
3219 | fi | |
3220 | -echo "$ac_t""$INSTALL" 1>&6 | |
3221 | +echo "$as_me:$LINENO: result: $INSTALL" >&5 | |
3222 | +echo "${ECHO_T}$INSTALL" >&6 | |
3223 | ||
3224 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
3225 | # It thinks the first close brace ends the variable substitution. | |
3226 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
3227 | ||
3228 | -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' | |
3229 | +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
3230 | ||
3231 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
3232 | ||
3233 | @@ -1068,229 +2711,332 @@ test -z "$INSTALL_DATA" && INSTALL_DATA= | |
3234 | test "${CC_FOR_BUILD+set}" = set || CC_FOR_BUILD="$CC" | |
3235 | ||
3236 | ||
3237 | - | |
3238 | -# Make sure we can run config.sub. | |
3239 | -if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
3240 | -else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
3241 | -fi | |
3242 | - | |
3243 | -echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
3244 | -echo "configure:1079: checking host system type" >&5 | |
3245 | - | |
3246 | -host_alias=$host | |
3247 | -case "$host_alias" in | |
3248 | -NONE) | |
3249 | - case $nonopt in | |
3250 | - NONE) | |
3251 | - if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
3252 | - else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
3253 | - fi ;; | |
3254 | - *) host_alias=$nonopt ;; | |
3255 | - esac ;; | |
3256 | -esac | |
3257 | - | |
3258 | -host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
3259 | -host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
3260 | -host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
3261 | -host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
3262 | -echo "$ac_t""$host" 1>&6 | |
3263 | - | |
3264 | -echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
3265 | -echo "configure:1100: checking build system type" >&5 | |
3266 | - | |
3267 | -build_alias=$build | |
3268 | -case "$build_alias" in | |
3269 | -NONE) | |
3270 | - case $nonopt in | |
3271 | - NONE) build_alias=$host_alias ;; | |
3272 | - *) build_alias=$nonopt ;; | |
3273 | - esac ;; | |
3274 | -esac | |
3275 | - | |
3276 | -build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
3277 | -build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
3278 | -build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
3279 | -build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
3280 | -echo "$ac_t""$build" 1>&6 | |
3281 | - | |
3282 | -if test $host != $build; then | |
3283 | - ac_tool_prefix=${host_alias}- | |
3284 | -else | |
3285 | - ac_tool_prefix= | |
3286 | -fi | |
3287 | - | |
3288 | -# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
3289 | +if test -n "$ac_tool_prefix"; then | |
3290 | + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
3291 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
3292 | -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3293 | -echo "configure:1126: checking for $ac_word" >&5 | |
3294 | -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
3295 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
3296 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
3297 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
3298 | +if test "${ac_cv_prog_RANLIB+set}" = set; then | |
3299 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3300 | else | |
3301 | if test -n "$RANLIB"; then | |
3302 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3303 | else | |
3304 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3305 | - ac_dummy="$PATH" | |
3306 | - for ac_dir in $ac_dummy; do | |
3307 | - test -z "$ac_dir" && ac_dir=. | |
3308 | - if test -f $ac_dir/$ac_word; then | |
3309 | - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
3310 | - break | |
3311 | - fi | |
3312 | - done | |
3313 | - IFS="$ac_save_ifs" | |
3314 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3315 | +for as_dir in $PATH | |
3316 | +do | |
3317 | + IFS=$as_save_IFS | |
3318 | + test -z "$as_dir" && as_dir=. | |
3319 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3320 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3321 | + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
3322 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3323 | + break 2 | |
3324 | + fi | |
3325 | +done | |
3326 | +done | |
3327 | + | |
3328 | fi | |
3329 | fi | |
3330 | -RANLIB="$ac_cv_prog_RANLIB" | |
3331 | +RANLIB=$ac_cv_prog_RANLIB | |
3332 | if test -n "$RANLIB"; then | |
3333 | - echo "$ac_t""$RANLIB" 1>&6 | |
3334 | + echo "$as_me:$LINENO: result: $RANLIB" >&5 | |
3335 | +echo "${ECHO_T}$RANLIB" >&6 | |
3336 | else | |
3337 | - echo "$ac_t""no" 1>&6 | |
3338 | + echo "$as_me:$LINENO: result: no" >&5 | |
3339 | +echo "${ECHO_T}no" >&6 | |
3340 | fi | |
3341 | ||
3342 | - | |
3343 | +fi | |
3344 | if test -z "$ac_cv_prog_RANLIB"; then | |
3345 | -if test -n "$ac_tool_prefix"; then | |
3346 | + ac_ct_RANLIB=$RANLIB | |
3347 | # Extract the first word of "ranlib", so it can be a program name with args. | |
3348 | set dummy ranlib; ac_word=$2 | |
3349 | -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3350 | -echo "configure:1158: checking for $ac_word" >&5 | |
3351 | -if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then | |
3352 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
3353 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
3354 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
3355 | +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | |
3356 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3357 | else | |
3358 | - if test -n "$RANLIB"; then | |
3359 | - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
3360 | -else | |
3361 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3362 | - ac_dummy="$PATH" | |
3363 | - for ac_dir in $ac_dummy; do | |
3364 | - test -z "$ac_dir" && ac_dir=. | |
3365 | - if test -f $ac_dir/$ac_word; then | |
3366 | - ac_cv_prog_RANLIB="ranlib" | |
3367 | - break | |
3368 | - fi | |
3369 | - done | |
3370 | - IFS="$ac_save_ifs" | |
3371 | - test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
3372 | -fi | |
3373 | -fi | |
3374 | -RANLIB="$ac_cv_prog_RANLIB" | |
3375 | -if test -n "$RANLIB"; then | |
3376 | - echo "$ac_t""$RANLIB" 1>&6 | |
3377 | + if test -n "$ac_ct_RANLIB"; then | |
3378 | + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
3379 | else | |
3380 | - echo "$ac_t""no" 1>&6 | |
3381 | -fi | |
3382 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3383 | +for as_dir in $PATH | |
3384 | +do | |
3385 | + IFS=$as_save_IFS | |
3386 | + test -z "$as_dir" && as_dir=. | |
3387 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3388 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3389 | + ac_cv_prog_ac_ct_RANLIB="ranlib" | |
3390 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3391 | + break 2 | |
3392 | + fi | |
3393 | +done | |
3394 | +done | |
3395 | ||
3396 | + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | |
3397 | +fi | |
3398 | +fi | |
3399 | +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
3400 | +if test -n "$ac_ct_RANLIB"; then | |
3401 | + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | |
3402 | +echo "${ECHO_T}$ac_ct_RANLIB" >&6 | |
3403 | else | |
3404 | - RANLIB=":" | |
3405 | + echo "$as_me:$LINENO: result: no" >&5 | |
3406 | +echo "${ECHO_T}no" >&6 | |
3407 | fi | |
3408 | + | |
3409 | + RANLIB=$ac_ct_RANLIB | |
3410 | +else | |
3411 | + RANLIB="$ac_cv_prog_RANLIB" | |
3412 | fi | |
3413 | ||
3414 | -# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3415 | +if test -n "$ac_tool_prefix"; then | |
3416 | + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
3417 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
3418 | -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3419 | -echo "configure:1193: checking for $ac_word" >&5 | |
3420 | -if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then | |
3421 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
3422 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
3423 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
3424 | +if test "${ac_cv_prog_AR+set}" = set; then | |
3425 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3426 | else | |
3427 | if test -n "$AR"; then | |
3428 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
3429 | else | |
3430 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3431 | - ac_dummy="$PATH" | |
3432 | - for ac_dir in $ac_dummy; do | |
3433 | - test -z "$ac_dir" && ac_dir=. | |
3434 | - if test -f $ac_dir/$ac_word; then | |
3435 | - ac_cv_prog_AR="${ac_tool_prefix}ar" | |
3436 | - break | |
3437 | - fi | |
3438 | - done | |
3439 | - IFS="$ac_save_ifs" | |
3440 | - test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" | |
3441 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3442 | +for as_dir in $PATH | |
3443 | +do | |
3444 | + IFS=$as_save_IFS | |
3445 | + test -z "$as_dir" && as_dir=. | |
3446 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3447 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3448 | + ac_cv_prog_AR="${ac_tool_prefix}ar" | |
3449 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3450 | + break 2 | |
3451 | + fi | |
3452 | +done | |
3453 | +done | |
3454 | + | |
3455 | fi | |
3456 | fi | |
3457 | -AR="$ac_cv_prog_AR" | |
3458 | +AR=$ac_cv_prog_AR | |
3459 | if test -n "$AR"; then | |
3460 | - echo "$ac_t""$AR" 1>&6 | |
3461 | + echo "$as_me:$LINENO: result: $AR" >&5 | |
3462 | +echo "${ECHO_T}$AR" >&6 | |
3463 | else | |
3464 | - echo "$ac_t""no" 1>&6 | |
3465 | + echo "$as_me:$LINENO: result: no" >&5 | |
3466 | +echo "${ECHO_T}no" >&6 | |
3467 | fi | |
3468 | ||
3469 | +fi | |
3470 | +if test -z "$ac_cv_prog_AR"; then | |
3471 | + ac_ct_AR=$AR | |
3472 | + # Extract the first word of "ar", so it can be a program name with args. | |
3473 | +set dummy ar; ac_word=$2 | |
3474 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
3475 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
3476 | +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then | |
3477 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3478 | +else | |
3479 | + if test -n "$ac_ct_AR"; then | |
3480 | + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
3481 | +else | |
3482 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3483 | +for as_dir in $PATH | |
3484 | +do | |
3485 | + IFS=$as_save_IFS | |
3486 | + test -z "$as_dir" && as_dir=. | |
3487 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3488 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3489 | + ac_cv_prog_ac_ct_AR="ar" | |
3490 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3491 | + break 2 | |
3492 | + fi | |
3493 | +done | |
3494 | +done | |
3495 | ||
3496 | +fi | |
3497 | +fi | |
3498 | +ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
3499 | +if test -n "$ac_ct_AR"; then | |
3500 | + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 | |
3501 | +echo "${ECHO_T}$ac_ct_AR" >&6 | |
3502 | +else | |
3503 | + echo "$as_me:$LINENO: result: no" >&5 | |
3504 | +echo "${ECHO_T}no" >&6 | |
3505 | +fi | |
3506 | + | |
3507 | + AR=$ac_ct_AR | |
3508 | +else | |
3509 | + AR="$ac_cv_prog_AR" | |
3510 | +fi | |
3511 | ||
3512 | -# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. | |
3513 | +if test -n "$ac_tool_prefix"; then | |
3514 | + # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args. | |
3515 | set dummy ${ac_tool_prefix}ld; ac_word=$2 | |
3516 | -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
3517 | -echo "configure:1225: checking for $ac_word" >&5 | |
3518 | -if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then | |
3519 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
3520 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
3521 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
3522 | +if test "${ac_cv_prog_LD+set}" = set; then | |
3523 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3524 | else | |
3525 | if test -n "$LD"; then | |
3526 | ac_cv_prog_LD="$LD" # Let the user override the test. | |
3527 | else | |
3528 | - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3529 | - ac_dummy="$PATH" | |
3530 | - for ac_dir in $ac_dummy; do | |
3531 | - test -z "$ac_dir" && ac_dir=. | |
3532 | - if test -f $ac_dir/$ac_word; then | |
3533 | - ac_cv_prog_LD="${ac_tool_prefix}ld" | |
3534 | - break | |
3535 | - fi | |
3536 | - done | |
3537 | - IFS="$ac_save_ifs" | |
3538 | - test -z "$ac_cv_prog_LD" && ac_cv_prog_LD="ld" | |
3539 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3540 | +for as_dir in $PATH | |
3541 | +do | |
3542 | + IFS=$as_save_IFS | |
3543 | + test -z "$as_dir" && as_dir=. | |
3544 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3545 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3546 | + ac_cv_prog_LD="${ac_tool_prefix}ld" | |
3547 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3548 | + break 2 | |
3549 | + fi | |
3550 | +done | |
3551 | +done | |
3552 | + | |
3553 | fi | |
3554 | fi | |
3555 | -LD="$ac_cv_prog_LD" | |
3556 | +LD=$ac_cv_prog_LD | |
3557 | if test -n "$LD"; then | |
3558 | - echo "$ac_t""$LD" 1>&6 | |
3559 | + echo "$as_me:$LINENO: result: $LD" >&5 | |
3560 | +echo "${ECHO_T}$LD" >&6 | |
3561 | +else | |
3562 | + echo "$as_me:$LINENO: result: no" >&5 | |
3563 | +echo "${ECHO_T}no" >&6 | |
3564 | +fi | |
3565 | + | |
3566 | +fi | |
3567 | +if test -z "$ac_cv_prog_LD"; then | |
3568 | + ac_ct_LD=$LD | |
3569 | + # Extract the first word of "ld", so it can be a program name with args. | |
3570 | +set dummy ld; ac_word=$2 | |
3571 | +echo "$as_me:$LINENO: checking for $ac_word" >&5 | |
3572 | +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | |
3573 | +if test "${ac_cv_prog_ac_ct_LD+set}" = set; then | |
3574 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3575 | +else | |
3576 | + if test -n "$ac_ct_LD"; then | |
3577 | + ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test. | |
3578 | +else | |
3579 | +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
3580 | +for as_dir in $PATH | |
3581 | +do | |
3582 | + IFS=$as_save_IFS | |
3583 | + test -z "$as_dir" && as_dir=. | |
3584 | + for ac_exec_ext in '' $ac_executable_extensions; do | |
3585 | + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
3586 | + ac_cv_prog_ac_ct_LD="ld" | |
3587 | + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
3588 | + break 2 | |
3589 | + fi | |
3590 | +done | |
3591 | +done | |
3592 | + | |
3593 | +fi | |
3594 | +fi | |
3595 | +ac_ct_LD=$ac_cv_prog_ac_ct_LD | |
3596 | +if test -n "$ac_ct_LD"; then | |
3597 | + echo "$as_me:$LINENO: result: $ac_ct_LD" >&5 | |
3598 | +echo "${ECHO_T}$ac_ct_LD" >&6 | |
3599 | else | |
3600 | - echo "$ac_t""no" 1>&6 | |
3601 | + echo "$as_me:$LINENO: result: no" >&5 | |
3602 | +echo "${ECHO_T}no" >&6 | |
3603 | fi | |
3604 | ||
3605 | + LD=$ac_ct_LD | |
3606 | +else | |
3607 | + LD="$ac_cv_prog_LD" | |
3608 | +fi | |
3609 | ||
3610 | ||
3611 | ||
3612 | -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
3613 | -echo "configure:1256: checking for ANSI C header files" >&5 | |
3614 | -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then | |
3615 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
3616 | + | |
3617 | +echo "$as_me:$LINENO: checking for egrep" >&5 | |
3618 | +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | |
3619 | +if test "${ac_cv_prog_egrep+set}" = set; then | |
3620 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3621 | else | |
3622 | - cat > conftest.$ac_ext <<EOF | |
3623 | -#line 1261 "configure" | |
3624 | -#include "confdefs.h" | |
3625 | + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | |
3626 | + then ac_cv_prog_egrep='grep -E' | |
3627 | + else ac_cv_prog_egrep='egrep' | |
3628 | + fi | |
3629 | +fi | |
3630 | +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | |
3631 | +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | |
3632 | + EGREP=$ac_cv_prog_egrep | |
3633 | + | |
3634 | + | |
3635 | +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | |
3636 | +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | |
3637 | +if test "${ac_cv_header_stdc+set}" = set; then | |
3638 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3639 | +else | |
3640 | + cat >conftest.$ac_ext <<_ACEOF | |
3641 | +/* confdefs.h. */ | |
3642 | +_ACEOF | |
3643 | +cat confdefs.h >>conftest.$ac_ext | |
3644 | +cat >>conftest.$ac_ext <<_ACEOF | |
3645 | +/* end confdefs.h. */ | |
3646 | #include <stdlib.h> | |
3647 | #include <stdarg.h> | |
3648 | #include <string.h> | |
3649 | #include <float.h> | |
3650 | -EOF | |
3651 | -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3652 | -{ (eval echo configure:1269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3653 | -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3654 | -if test -z "$ac_err"; then | |
3655 | - rm -rf conftest* | |
3656 | + | |
3657 | +int | |
3658 | +main () | |
3659 | +{ | |
3660 | + | |
3661 | + ; | |
3662 | + return 0; | |
3663 | +} | |
3664 | +_ACEOF | |
3665 | +rm -f conftest.$ac_objext | |
3666 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
3667 | + (eval $ac_compile) 2>conftest.er1 | |
3668 | + ac_status=$? | |
3669 | + grep -v '^ *+' conftest.er1 >conftest.err | |
3670 | + rm -f conftest.er1 | |
3671 | + cat conftest.err >&5 | |
3672 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3673 | + (exit $ac_status); } && | |
3674 | + { ac_try='test -z "$ac_c_werror_flag" | |
3675 | + || test ! -s conftest.err' | |
3676 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3677 | + (eval $ac_try) 2>&5 | |
3678 | + ac_status=$? | |
3679 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3680 | + (exit $ac_status); }; } && | |
3681 | + { ac_try='test -s conftest.$ac_objext' | |
3682 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3683 | + (eval $ac_try) 2>&5 | |
3684 | + ac_status=$? | |
3685 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3686 | + (exit $ac_status); }; }; then | |
3687 | ac_cv_header_stdc=yes | |
3688 | else | |
3689 | - echo "$ac_err" >&5 | |
3690 | - echo "configure: failed program was:" >&5 | |
3691 | - cat conftest.$ac_ext >&5 | |
3692 | - rm -rf conftest* | |
3693 | - ac_cv_header_stdc=no | |
3694 | + echo "$as_me: failed program was:" >&5 | |
3695 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
3696 | + | |
3697 | +ac_cv_header_stdc=no | |
3698 | fi | |
3699 | -rm -f conftest* | |
3700 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
3701 | ||
3702 | if test $ac_cv_header_stdc = yes; then | |
3703 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
3704 | -cat > conftest.$ac_ext <<EOF | |
3705 | -#line 1286 "configure" | |
3706 | -#include "confdefs.h" | |
3707 | + cat >conftest.$ac_ext <<_ACEOF | |
3708 | +/* confdefs.h. */ | |
3709 | +_ACEOF | |
3710 | +cat confdefs.h >>conftest.$ac_ext | |
3711 | +cat >>conftest.$ac_ext <<_ACEOF | |
3712 | +/* end confdefs.h. */ | |
3713 | #include <string.h> | |
3714 | -EOF | |
3715 | + | |
3716 | +_ACEOF | |
3717 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3718 | - egrep "memchr" >/dev/null 2>&1; then | |
3719 | + $EGREP "memchr" >/dev/null 2>&1; then | |
3720 | : | |
3721 | else | |
3722 | - rm -rf conftest* | |
3723 | ac_cv_header_stdc=no | |
3724 | fi | |
3725 | rm -f conftest* | |
3726 | @@ -1299,16 +3045,19 @@ fi | |
3727 | ||
3728 | if test $ac_cv_header_stdc = yes; then | |
3729 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
3730 | -cat > conftest.$ac_ext <<EOF | |
3731 | -#line 1304 "configure" | |
3732 | -#include "confdefs.h" | |
3733 | + cat >conftest.$ac_ext <<_ACEOF | |
3734 | +/* confdefs.h. */ | |
3735 | +_ACEOF | |
3736 | +cat confdefs.h >>conftest.$ac_ext | |
3737 | +cat >>conftest.$ac_ext <<_ACEOF | |
3738 | +/* end confdefs.h. */ | |
3739 | #include <stdlib.h> | |
3740 | -EOF | |
3741 | + | |
3742 | +_ACEOF | |
3743 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3744 | - egrep "free" >/dev/null 2>&1; then | |
3745 | + $EGREP "free" >/dev/null 2>&1; then | |
3746 | : | |
3747 | else | |
3748 | - rm -rf conftest* | |
3749 | ac_cv_header_stdc=no | |
3750 | fi | |
3751 | rm -f conftest* | |
3752 | @@ -1317,412 +3066,911 @@ fi | |
3753 | ||
3754 | if test $ac_cv_header_stdc = yes; then | |
3755 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3756 | -if test "$cross_compiling" = yes; then | |
3757 | + if test "$cross_compiling" = yes; then | |
3758 | : | |
3759 | else | |
3760 | - cat > conftest.$ac_ext <<EOF | |
3761 | -#line 1325 "configure" | |
3762 | -#include "confdefs.h" | |
3763 | + cat >conftest.$ac_ext <<_ACEOF | |
3764 | +/* confdefs.h. */ | |
3765 | +_ACEOF | |
3766 | +cat confdefs.h >>conftest.$ac_ext | |
3767 | +cat >>conftest.$ac_ext <<_ACEOF | |
3768 | +/* end confdefs.h. */ | |
3769 | #include <ctype.h> | |
3770 | -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3771 | -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3772 | +#if ((' ' & 0x0FF) == 0x020) | |
3773 | +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3774 | +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3775 | +#else | |
3776 | +# define ISLOWER(c) \ | |
3777 | + (('a' <= (c) && (c) <= 'i') \ | |
3778 | + || ('j' <= (c) && (c) <= 'r') \ | |
3779 | + || ('s' <= (c) && (c) <= 'z')) | |
3780 | +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | |
3781 | +#endif | |
3782 | + | |
3783 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3784 | -int main () { int i; for (i = 0; i < 256; i++) | |
3785 | -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3786 | -exit (0); } | |
3787 | - | |
3788 | -EOF | |
3789 | -if { (eval echo configure:1336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null | |
3790 | -then | |
3791 | +int | |
3792 | +main () | |
3793 | +{ | |
3794 | + int i; | |
3795 | + for (i = 0; i < 256; i++) | |
3796 | + if (XOR (islower (i), ISLOWER (i)) | |
3797 | + || toupper (i) != TOUPPER (i)) | |
3798 | + exit(2); | |
3799 | + exit (0); | |
3800 | +} | |
3801 | +_ACEOF | |
3802 | +rm -f conftest$ac_exeext | |
3803 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3804 | + (eval $ac_link) 2>&5 | |
3805 | + ac_status=$? | |
3806 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3807 | + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
3808 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3809 | + (eval $ac_try) 2>&5 | |
3810 | + ac_status=$? | |
3811 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3812 | + (exit $ac_status); }; }; then | |
3813 | : | |
3814 | else | |
3815 | - echo "configure: failed program was:" >&5 | |
3816 | - cat conftest.$ac_ext >&5 | |
3817 | - rm -fr conftest* | |
3818 | - ac_cv_header_stdc=no | |
3819 | + echo "$as_me: program exited with status $ac_status" >&5 | |
3820 | +echo "$as_me: failed program was:" >&5 | |
3821 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
3822 | + | |
3823 | +( exit $ac_status ) | |
3824 | +ac_cv_header_stdc=no | |
3825 | fi | |
3826 | -rm -fr conftest* | |
3827 | +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
3828 | fi | |
3829 | - | |
3830 | fi | |
3831 | fi | |
3832 | - | |
3833 | -echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3834 | +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | |
3835 | +echo "${ECHO_T}$ac_cv_header_stdc" >&6 | |
3836 | if test $ac_cv_header_stdc = yes; then | |
3837 | - cat >> confdefs.h <<\EOF | |
3838 | + | |
3839 | +cat >>confdefs.h <<\_ACEOF | |
3840 | #define STDC_HEADERS 1 | |
3841 | -EOF | |
3842 | +_ACEOF | |
3843 | ||
3844 | fi | |
3845 | ||
3846 | -echo $ac_n "checking for GNU libc2""... $ac_c" 1>&6 | |
3847 | -echo "configure:1360: checking for GNU libc2" >&5 | |
3848 | - if eval "test \"`echo '$''{'knfsd_cv_glibc2'+set}'`\" = set"; then | |
3849 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
3850 | +echo "$as_me:$LINENO: checking for GNU libc2" >&5 | |
3851 | +echo $ECHO_N "checking for GNU libc2... $ECHO_C" >&6 | |
3852 | + if test "${knfsd_cv_glibc2+set}" = set; then | |
3853 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3854 | else | |
3855 | - cat > conftest.$ac_ext <<EOF | |
3856 | -#line 1365 "configure" | |
3857 | -#include "confdefs.h" | |
3858 | + cat >conftest.$ac_ext <<_ACEOF | |
3859 | +/* confdefs.h. */ | |
3860 | +_ACEOF | |
3861 | +cat confdefs.h >>conftest.$ac_ext | |
3862 | +cat >>conftest.$ac_ext <<_ACEOF | |
3863 | +/* end confdefs.h. */ | |
3864 | ||
3865 | #include <features.h> | |
3866 | #if !defined(__GLIBC__) | |
3867 | # error Nope | |
3868 | #endif | |
3869 | -EOF | |
3870 | -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
3871 | -{ (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
3872 | -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
3873 | -if test -z "$ac_err"; then | |
3874 | - rm -rf conftest* | |
3875 | +_ACEOF | |
3876 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
3877 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
3878 | + ac_status=$? | |
3879 | + grep -v '^ *+' conftest.er1 >conftest.err | |
3880 | + rm -f conftest.er1 | |
3881 | + cat conftest.err >&5 | |
3882 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3883 | + (exit $ac_status); } >/dev/null; then | |
3884 | + if test -s conftest.err; then | |
3885 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
3886 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
3887 | + else | |
3888 | + ac_cpp_err= | |
3889 | + fi | |
3890 | +else | |
3891 | + ac_cpp_err=yes | |
3892 | +fi | |
3893 | +if test -z "$ac_cpp_err"; then | |
3894 | knfsd_cv_glibc2=yes | |
3895 | else | |
3896 | - echo "$ac_err" >&5 | |
3897 | - echo "configure: failed program was:" >&5 | |
3898 | - cat conftest.$ac_ext >&5 | |
3899 | - rm -rf conftest* | |
3900 | + echo "$as_me: failed program was:" >&5 | |
3901 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
3902 | + | |
3903 | knfsd_cv_glibc2=no | |
3904 | fi | |
3905 | -rm -f conftest* | |
3906 | +rm -f conftest.err conftest.$ac_ext | |
3907 | fi | |
3908 | ||
3909 | - echo "$ac_t""$knfsd_cv_glibc2" 1>&6 | |
3910 | + echo "$as_me:$LINENO: result: $knfsd_cv_glibc2" >&5 | |
3911 | +echo "${ECHO_T}$knfsd_cv_glibc2" >&6 | |
3912 | if test $knfsd_cv_glibc2 = yes; then | |
3913 | CFLAGS="$CFLAGS -D_GNU_SOURCE" | |
3914 | CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE" | |
3915 | fi | |
3916 | ||
3917 | ||
3918 | -echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 | |
3919 | -echo "configure:1397: checking for main in -lsocket" >&5 | |
3920 | -ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` | |
3921 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
3922 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
3923 | +echo "$as_me:$LINENO: checking for main in -lsocket" >&5 | |
3924 | +echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6 | |
3925 | +if test "${ac_cv_lib_socket_main+set}" = set; then | |
3926 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
3927 | else | |
3928 | - ac_save_LIBS="$LIBS" | |
3929 | + ac_check_lib_save_LIBS=$LIBS | |
3930 | LIBS="-lsocket $LIBS" | |
3931 | -cat > conftest.$ac_ext <<EOF | |
3932 | -#line 1405 "configure" | |
3933 | -#include "confdefs.h" | |
3934 | - | |
3935 | -int main() { | |
3936 | -main() | |
3937 | -; return 0; } | |
3938 | -EOF | |
3939 | -if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
3940 | - rm -rf conftest* | |
3941 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
3942 | -else | |
3943 | - echo "configure: failed program was:" >&5 | |
3944 | - cat conftest.$ac_ext >&5 | |
3945 | - rm -rf conftest* | |
3946 | - eval "ac_cv_lib_$ac_lib_var=no" | |
3947 | -fi | |
3948 | -rm -f conftest* | |
3949 | -LIBS="$ac_save_LIBS" | |
3950 | - | |
3951 | -fi | |
3952 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
3953 | - echo "$ac_t""yes" 1>&6 | |
3954 | +cat >conftest.$ac_ext <<_ACEOF | |
3955 | +/* confdefs.h. */ | |
3956 | +_ACEOF | |
3957 | +cat confdefs.h >>conftest.$ac_ext | |
3958 | +cat >>conftest.$ac_ext <<_ACEOF | |
3959 | +/* end confdefs.h. */ | |
3960 | + | |
3961 | + | |
3962 | +int | |
3963 | +main () | |
3964 | +{ | |
3965 | +main (); | |
3966 | + ; | |
3967 | + return 0; | |
3968 | +} | |
3969 | +_ACEOF | |
3970 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
3971 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
3972 | + (eval $ac_link) 2>conftest.er1 | |
3973 | + ac_status=$? | |
3974 | + grep -v '^ *+' conftest.er1 >conftest.err | |
3975 | + rm -f conftest.er1 | |
3976 | + cat conftest.err >&5 | |
3977 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3978 | + (exit $ac_status); } && | |
3979 | + { ac_try='test -z "$ac_c_werror_flag" | |
3980 | + || test ! -s conftest.err' | |
3981 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3982 | + (eval $ac_try) 2>&5 | |
3983 | + ac_status=$? | |
3984 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3985 | + (exit $ac_status); }; } && | |
3986 | + { ac_try='test -s conftest$ac_exeext' | |
3987 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
3988 | + (eval $ac_try) 2>&5 | |
3989 | + ac_status=$? | |
3990 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
3991 | + (exit $ac_status); }; }; then | |
3992 | + ac_cv_lib_socket_main=yes | |
3993 | +else | |
3994 | + echo "$as_me: failed program was:" >&5 | |
3995 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
3996 | + | |
3997 | +ac_cv_lib_socket_main=no | |
3998 | +fi | |
3999 | +rm -f conftest.err conftest.$ac_objext \ | |
4000 | + conftest$ac_exeext conftest.$ac_ext | |
4001 | +LIBS=$ac_check_lib_save_LIBS | |
4002 | +fi | |
4003 | +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5 | |
4004 | +echo "${ECHO_T}$ac_cv_lib_socket_main" >&6 | |
4005 | +if test $ac_cv_lib_socket_main = yes; then | |
4006 | LIBSOCKET="-lnsl" | |
4007 | -else | |
4008 | - echo "$ac_t""no" 1>&6 | |
4009 | fi | |
4010 | ||
4011 | -echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 | |
4012 | -echo "configure:1433: checking for main in -lnsl" >&5 | |
4013 | -ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` | |
4014 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4015 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
4016 | +echo "$as_me:$LINENO: checking for main in -lnsl" >&5 | |
4017 | +echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6 | |
4018 | +if test "${ac_cv_lib_nsl_main+set}" = set; then | |
4019 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4020 | else | |
4021 | - ac_save_LIBS="$LIBS" | |
4022 | + ac_check_lib_save_LIBS=$LIBS | |
4023 | LIBS="-lnsl $LIBS" | |
4024 | -cat > conftest.$ac_ext <<EOF | |
4025 | -#line 1441 "configure" | |
4026 | -#include "confdefs.h" | |
4027 | - | |
4028 | -int main() { | |
4029 | -main() | |
4030 | -; return 0; } | |
4031 | -EOF | |
4032 | -if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4033 | - rm -rf conftest* | |
4034 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
4035 | -else | |
4036 | - echo "configure: failed program was:" >&5 | |
4037 | - cat conftest.$ac_ext >&5 | |
4038 | - rm -rf conftest* | |
4039 | - eval "ac_cv_lib_$ac_lib_var=no" | |
4040 | -fi | |
4041 | -rm -f conftest* | |
4042 | -LIBS="$ac_save_LIBS" | |
4043 | - | |
4044 | -fi | |
4045 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4046 | - echo "$ac_t""yes" 1>&6 | |
4047 | +cat >conftest.$ac_ext <<_ACEOF | |
4048 | +/* confdefs.h. */ | |
4049 | +_ACEOF | |
4050 | +cat confdefs.h >>conftest.$ac_ext | |
4051 | +cat >>conftest.$ac_ext <<_ACEOF | |
4052 | +/* end confdefs.h. */ | |
4053 | + | |
4054 | + | |
4055 | +int | |
4056 | +main () | |
4057 | +{ | |
4058 | +main (); | |
4059 | + ; | |
4060 | + return 0; | |
4061 | +} | |
4062 | +_ACEOF | |
4063 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
4064 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4065 | + (eval $ac_link) 2>conftest.er1 | |
4066 | + ac_status=$? | |
4067 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4068 | + rm -f conftest.er1 | |
4069 | + cat conftest.err >&5 | |
4070 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4071 | + (exit $ac_status); } && | |
4072 | + { ac_try='test -z "$ac_c_werror_flag" | |
4073 | + || test ! -s conftest.err' | |
4074 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4075 | + (eval $ac_try) 2>&5 | |
4076 | + ac_status=$? | |
4077 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4078 | + (exit $ac_status); }; } && | |
4079 | + { ac_try='test -s conftest$ac_exeext' | |
4080 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4081 | + (eval $ac_try) 2>&5 | |
4082 | + ac_status=$? | |
4083 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4084 | + (exit $ac_status); }; }; then | |
4085 | + ac_cv_lib_nsl_main=yes | |
4086 | +else | |
4087 | + echo "$as_me: failed program was:" >&5 | |
4088 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4089 | + | |
4090 | +ac_cv_lib_nsl_main=no | |
4091 | +fi | |
4092 | +rm -f conftest.err conftest.$ac_objext \ | |
4093 | + conftest$ac_exeext conftest.$ac_ext | |
4094 | +LIBS=$ac_check_lib_save_LIBS | |
4095 | +fi | |
4096 | +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5 | |
4097 | +echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6 | |
4098 | +if test $ac_cv_lib_nsl_main = yes; then | |
4099 | LIBNSL="-lnsl" | |
4100 | -else | |
4101 | - echo "$ac_t""no" 1>&6 | |
4102 | fi | |
4103 | ||
4104 | -echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 | |
4105 | -echo "configure:1469: checking for crypt in -lcrypt" >&5 | |
4106 | -ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` | |
4107 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4108 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
4109 | +echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 | |
4110 | +echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6 | |
4111 | +if test "${ac_cv_lib_crypt_crypt+set}" = set; then | |
4112 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4113 | else | |
4114 | - ac_save_LIBS="$LIBS" | |
4115 | + ac_check_lib_save_LIBS=$LIBS | |
4116 | LIBS="-lcrypt $LIBS" | |
4117 | -cat > conftest.$ac_ext <<EOF | |
4118 | -#line 1477 "configure" | |
4119 | -#include "confdefs.h" | |
4120 | +cat >conftest.$ac_ext <<_ACEOF | |
4121 | +/* confdefs.h. */ | |
4122 | +_ACEOF | |
4123 | +cat confdefs.h >>conftest.$ac_ext | |
4124 | +cat >>conftest.$ac_ext <<_ACEOF | |
4125 | +/* end confdefs.h. */ | |
4126 | + | |
4127 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4128 | +#ifdef __cplusplus | |
4129 | +extern "C" | |
4130 | +#endif | |
4131 | /* We use char because int might match the return type of a gcc2 | |
4132 | - builtin and then its argument prototype would still apply. */ | |
4133 | -char crypt(); | |
4134 | - | |
4135 | -int main() { | |
4136 | -crypt() | |
4137 | -; return 0; } | |
4138 | -EOF | |
4139 | -if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4140 | - rm -rf conftest* | |
4141 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
4142 | -else | |
4143 | - echo "configure: failed program was:" >&5 | |
4144 | - cat conftest.$ac_ext >&5 | |
4145 | - rm -rf conftest* | |
4146 | - eval "ac_cv_lib_$ac_lib_var=no" | |
4147 | -fi | |
4148 | -rm -f conftest* | |
4149 | -LIBS="$ac_save_LIBS" | |
4150 | - | |
4151 | -fi | |
4152 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4153 | - echo "$ac_t""yes" 1>&6 | |
4154 | + builtin and then its argument prototype would still apply. */ | |
4155 | +char crypt (); | |
4156 | +int | |
4157 | +main () | |
4158 | +{ | |
4159 | +crypt (); | |
4160 | + ; | |
4161 | + return 0; | |
4162 | +} | |
4163 | +_ACEOF | |
4164 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
4165 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4166 | + (eval $ac_link) 2>conftest.er1 | |
4167 | + ac_status=$? | |
4168 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4169 | + rm -f conftest.er1 | |
4170 | + cat conftest.err >&5 | |
4171 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4172 | + (exit $ac_status); } && | |
4173 | + { ac_try='test -z "$ac_c_werror_flag" | |
4174 | + || test ! -s conftest.err' | |
4175 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4176 | + (eval $ac_try) 2>&5 | |
4177 | + ac_status=$? | |
4178 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4179 | + (exit $ac_status); }; } && | |
4180 | + { ac_try='test -s conftest$ac_exeext' | |
4181 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4182 | + (eval $ac_try) 2>&5 | |
4183 | + ac_status=$? | |
4184 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4185 | + (exit $ac_status); }; }; then | |
4186 | + ac_cv_lib_crypt_crypt=yes | |
4187 | +else | |
4188 | + echo "$as_me: failed program was:" >&5 | |
4189 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4190 | + | |
4191 | +ac_cv_lib_crypt_crypt=no | |
4192 | +fi | |
4193 | +rm -f conftest.err conftest.$ac_objext \ | |
4194 | + conftest$ac_exeext conftest.$ac_ext | |
4195 | +LIBS=$ac_check_lib_save_LIBS | |
4196 | +fi | |
4197 | +echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 | |
4198 | +echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6 | |
4199 | +if test $ac_cv_lib_crypt_crypt = yes; then | |
4200 | LIBCRYPT="-lcrypt" | |
4201 | -else | |
4202 | - echo "$ac_t""no" 1>&6 | |
4203 | fi | |
4204 | ||
4205 | if test "$enable_nfsv4" = yes; then | |
4206 | - echo $ac_n "checking for event_dispatch in -levent""... $ac_c" 1>&6 | |
4207 | -echo "configure:1510: checking for event_dispatch in -levent" >&5 | |
4208 | -ac_lib_var=`echo event'_'event_dispatch | sed 'y%./+-%__p_%'` | |
4209 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4210 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
4211 | + echo "$as_me:$LINENO: checking for event_dispatch in -levent" >&5 | |
4212 | +echo $ECHO_N "checking for event_dispatch in -levent... $ECHO_C" >&6 | |
4213 | +if test "${ac_cv_lib_event_event_dispatch+set}" = set; then | |
4214 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4215 | else | |
4216 | - ac_save_LIBS="$LIBS" | |
4217 | + ac_check_lib_save_LIBS=$LIBS | |
4218 | LIBS="-levent $LIBS" | |
4219 | -cat > conftest.$ac_ext <<EOF | |
4220 | -#line 1518 "configure" | |
4221 | -#include "confdefs.h" | |
4222 | +cat >conftest.$ac_ext <<_ACEOF | |
4223 | +/* confdefs.h. */ | |
4224 | +_ACEOF | |
4225 | +cat confdefs.h >>conftest.$ac_ext | |
4226 | +cat >>conftest.$ac_ext <<_ACEOF | |
4227 | +/* end confdefs.h. */ | |
4228 | + | |
4229 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4230 | +#ifdef __cplusplus | |
4231 | +extern "C" | |
4232 | +#endif | |
4233 | /* We use char because int might match the return type of a gcc2 | |
4234 | - builtin and then its argument prototype would still apply. */ | |
4235 | -char event_dispatch(); | |
4236 | + builtin and then its argument prototype would still apply. */ | |
4237 | +char event_dispatch (); | |
4238 | +int | |
4239 | +main () | |
4240 | +{ | |
4241 | +event_dispatch (); | |
4242 | + ; | |
4243 | + return 0; | |
4244 | +} | |
4245 | +_ACEOF | |
4246 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
4247 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4248 | + (eval $ac_link) 2>conftest.er1 | |
4249 | + ac_status=$? | |
4250 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4251 | + rm -f conftest.er1 | |
4252 | + cat conftest.err >&5 | |
4253 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4254 | + (exit $ac_status); } && | |
4255 | + { ac_try='test -z "$ac_c_werror_flag" | |
4256 | + || test ! -s conftest.err' | |
4257 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4258 | + (eval $ac_try) 2>&5 | |
4259 | + ac_status=$? | |
4260 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4261 | + (exit $ac_status); }; } && | |
4262 | + { ac_try='test -s conftest$ac_exeext' | |
4263 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4264 | + (eval $ac_try) 2>&5 | |
4265 | + ac_status=$? | |
4266 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4267 | + (exit $ac_status); }; }; then | |
4268 | + ac_cv_lib_event_event_dispatch=yes | |
4269 | +else | |
4270 | + echo "$as_me: failed program was:" >&5 | |
4271 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4272 | + | |
4273 | +ac_cv_lib_event_event_dispatch=no | |
4274 | +fi | |
4275 | +rm -f conftest.err conftest.$ac_objext \ | |
4276 | + conftest$ac_exeext conftest.$ac_ext | |
4277 | +LIBS=$ac_check_lib_save_LIBS | |
4278 | +fi | |
4279 | +echo "$as_me:$LINENO: result: $ac_cv_lib_event_event_dispatch" >&5 | |
4280 | +echo "${ECHO_T}$ac_cv_lib_event_event_dispatch" >&6 | |
4281 | +if test $ac_cv_lib_event_event_dispatch = yes; then | |
4282 | + libevent=1 | |
4283 | +else | |
4284 | + { { echo "$as_me:$LINENO: error: libevent needed for nfsv4 support" >&5 | |
4285 | +echo "$as_me: error: libevent needed for nfsv4 support" >&2;} | |
4286 | + { (exit 1); exit 1; }; } | |
4287 | +fi | |
4288 | + | |
4289 | + echo "$as_me:$LINENO: checking for nfs4_init_name_mapping in -lnfsidmap" >&5 | |
4290 | +echo $ECHO_N "checking for nfs4_init_name_mapping in -lnfsidmap... $ECHO_C" >&6 | |
4291 | +if test "${ac_cv_lib_nfsidmap_nfs4_init_name_mapping+set}" = set; then | |
4292 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4293 | +else | |
4294 | + ac_check_lib_save_LIBS=$LIBS | |
4295 | +LIBS="-lnfsidmap $LIBS" | |
4296 | +cat >conftest.$ac_ext <<_ACEOF | |
4297 | +/* confdefs.h. */ | |
4298 | +_ACEOF | |
4299 | +cat confdefs.h >>conftest.$ac_ext | |
4300 | +cat >>conftest.$ac_ext <<_ACEOF | |
4301 | +/* end confdefs.h. */ | |
4302 | + | |
4303 | +/* Override any gcc2 internal prototype to avoid an error. */ | |
4304 | +#ifdef __cplusplus | |
4305 | +extern "C" | |
4306 | +#endif | |
4307 | +/* We use char because int might match the return type of a gcc2 | |
4308 | + builtin and then its argument prototype would still apply. */ | |
4309 | +char nfs4_init_name_mapping (); | |
4310 | +int | |
4311 | +main () | |
4312 | +{ | |
4313 | +nfs4_init_name_mapping (); | |
4314 | + ; | |
4315 | + return 0; | |
4316 | +} | |
4317 | +_ACEOF | |
4318 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
4319 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4320 | + (eval $ac_link) 2>conftest.er1 | |
4321 | + ac_status=$? | |
4322 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4323 | + rm -f conftest.er1 | |
4324 | + cat conftest.err >&5 | |
4325 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4326 | + (exit $ac_status); } && | |
4327 | + { ac_try='test -z "$ac_c_werror_flag" | |
4328 | + || test ! -s conftest.err' | |
4329 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4330 | + (eval $ac_try) 2>&5 | |
4331 | + ac_status=$? | |
4332 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4333 | + (exit $ac_status); }; } && | |
4334 | + { ac_try='test -s conftest$ac_exeext' | |
4335 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4336 | + (eval $ac_try) 2>&5 | |
4337 | + ac_status=$? | |
4338 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4339 | + (exit $ac_status); }; }; then | |
4340 | + ac_cv_lib_nfsidmap_nfs4_init_name_mapping=yes | |
4341 | +else | |
4342 | + echo "$as_me: failed program was:" >&5 | |
4343 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4344 | + | |
4345 | +ac_cv_lib_nfsidmap_nfs4_init_name_mapping=no | |
4346 | +fi | |
4347 | +rm -f conftest.err conftest.$ac_objext \ | |
4348 | + conftest$ac_exeext conftest.$ac_ext | |
4349 | +LIBS=$ac_check_lib_save_LIBS | |
4350 | +fi | |
4351 | +echo "$as_me:$LINENO: result: $ac_cv_lib_nfsidmap_nfs4_init_name_mapping" >&5 | |
4352 | +echo "${ECHO_T}$ac_cv_lib_nfsidmap_nfs4_init_name_mapping" >&6 | |
4353 | +if test $ac_cv_lib_nfsidmap_nfs4_init_name_mapping = yes; then | |
4354 | + libnfsidmap=1 | |
4355 | +else | |
4356 | + { { echo "$as_me:$LINENO: error: libnfsidmap needed for nfsv4 support" >&5 | |
4357 | +echo "$as_me: error: libnfsidmap needed for nfsv4 support" >&2;} | |
4358 | + { (exit 1); exit 1; }; } | |
4359 | +fi | |
4360 | + | |
4361 | + # On IRIX 5.3, sys/types and inttypes.h are conflicting. | |
4362 | + | |
4363 | + | |
4364 | ||
4365 | -int main() { | |
4366 | -event_dispatch() | |
4367 | -; return 0; } | |
4368 | -EOF | |
4369 | -if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4370 | - rm -rf conftest* | |
4371 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
4372 | -else | |
4373 | - echo "configure: failed program was:" >&5 | |
4374 | - cat conftest.$ac_ext >&5 | |
4375 | - rm -rf conftest* | |
4376 | - eval "ac_cv_lib_$ac_lib_var=no" | |
4377 | -fi | |
4378 | -rm -f conftest* | |
4379 | -LIBS="$ac_save_LIBS" | |
4380 | + | |
4381 | + | |
4382 | + | |
4383 | + | |
4384 | + | |
4385 | + | |
4386 | +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | |
4387 | + inttypes.h stdint.h unistd.h | |
4388 | +do | |
4389 | +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4390 | +echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4391 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4392 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4393 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4394 | +else | |
4395 | + cat >conftest.$ac_ext <<_ACEOF | |
4396 | +/* confdefs.h. */ | |
4397 | +_ACEOF | |
4398 | +cat confdefs.h >>conftest.$ac_ext | |
4399 | +cat >>conftest.$ac_ext <<_ACEOF | |
4400 | +/* end confdefs.h. */ | |
4401 | +$ac_includes_default | |
4402 | + | |
4403 | +#include <$ac_header> | |
4404 | +_ACEOF | |
4405 | +rm -f conftest.$ac_objext | |
4406 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4407 | + (eval $ac_compile) 2>conftest.er1 | |
4408 | + ac_status=$? | |
4409 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4410 | + rm -f conftest.er1 | |
4411 | + cat conftest.err >&5 | |
4412 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4413 | + (exit $ac_status); } && | |
4414 | + { ac_try='test -z "$ac_c_werror_flag" | |
4415 | + || test ! -s conftest.err' | |
4416 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4417 | + (eval $ac_try) 2>&5 | |
4418 | + ac_status=$? | |
4419 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4420 | + (exit $ac_status); }; } && | |
4421 | + { ac_try='test -s conftest.$ac_objext' | |
4422 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4423 | + (eval $ac_try) 2>&5 | |
4424 | + ac_status=$? | |
4425 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4426 | + (exit $ac_status); }; }; then | |
4427 | + eval "$as_ac_Header=yes" | |
4428 | +else | |
4429 | + echo "$as_me: failed program was:" >&5 | |
4430 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4431 | + | |
4432 | +eval "$as_ac_Header=no" | |
4433 | +fi | |
4434 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4435 | +fi | |
4436 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4437 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4438 | +if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4439 | + cat >>confdefs.h <<_ACEOF | |
4440 | +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4441 | +_ACEOF | |
4442 | ||
4443 | fi | |
4444 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4445 | - echo "$ac_t""yes" 1>&6 | |
4446 | - ac_tr_lib=HAVE_LIB`echo event | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4447 | - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4448 | - cat >> confdefs.h <<EOF | |
4449 | -#define $ac_tr_lib 1 | |
4450 | -EOF | |
4451 | ||
4452 | - LIBS="-levent $LIBS" | |
4453 | +done | |
4454 | ||
4455 | + | |
4456 | + | |
4457 | +for ac_header in event.h | |
4458 | +do | |
4459 | +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4460 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4461 | + echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4462 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4463 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4464 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4465 | +fi | |
4466 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4467 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4468 | +else | |
4469 | + # Is the header compilable? | |
4470 | +echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
4471 | +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
4472 | +cat >conftest.$ac_ext <<_ACEOF | |
4473 | +/* confdefs.h. */ | |
4474 | +_ACEOF | |
4475 | +cat confdefs.h >>conftest.$ac_ext | |
4476 | +cat >>conftest.$ac_ext <<_ACEOF | |
4477 | +/* end confdefs.h. */ | |
4478 | +$ac_includes_default | |
4479 | +#include <$ac_header> | |
4480 | +_ACEOF | |
4481 | +rm -f conftest.$ac_objext | |
4482 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4483 | + (eval $ac_compile) 2>conftest.er1 | |
4484 | + ac_status=$? | |
4485 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4486 | + rm -f conftest.er1 | |
4487 | + cat conftest.err >&5 | |
4488 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4489 | + (exit $ac_status); } && | |
4490 | + { ac_try='test -z "$ac_c_werror_flag" | |
4491 | + || test ! -s conftest.err' | |
4492 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4493 | + (eval $ac_try) 2>&5 | |
4494 | + ac_status=$? | |
4495 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4496 | + (exit $ac_status); }; } && | |
4497 | + { ac_try='test -s conftest.$ac_objext' | |
4498 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4499 | + (eval $ac_try) 2>&5 | |
4500 | + ac_status=$? | |
4501 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4502 | + (exit $ac_status); }; }; then | |
4503 | + ac_header_compiler=yes | |
4504 | +else | |
4505 | + echo "$as_me: failed program was:" >&5 | |
4506 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4507 | + | |
4508 | +ac_header_compiler=no | |
4509 | +fi | |
4510 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4511 | +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
4512 | +echo "${ECHO_T}$ac_header_compiler" >&6 | |
4513 | + | |
4514 | +# Is the header present? | |
4515 | +echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
4516 | +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
4517 | +cat >conftest.$ac_ext <<_ACEOF | |
4518 | +/* confdefs.h. */ | |
4519 | +_ACEOF | |
4520 | +cat confdefs.h >>conftest.$ac_ext | |
4521 | +cat >>conftest.$ac_ext <<_ACEOF | |
4522 | +/* end confdefs.h. */ | |
4523 | +#include <$ac_header> | |
4524 | +_ACEOF | |
4525 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4526 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4527 | + ac_status=$? | |
4528 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4529 | + rm -f conftest.er1 | |
4530 | + cat conftest.err >&5 | |
4531 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4532 | + (exit $ac_status); } >/dev/null; then | |
4533 | + if test -s conftest.err; then | |
4534 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
4535 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
4536 | + else | |
4537 | + ac_cpp_err= | |
4538 | + fi | |
4539 | else | |
4540 | - echo "$ac_t""no" 1>&6 | |
4541 | -{ echo "configure: error: libevent needed for nfsv4 support" 1>&2; exit 1; } | |
4542 | + ac_cpp_err=yes | |
4543 | fi | |
4544 | - | |
4545 | - echo $ac_n "checking for nfs4_init_name_mapping in -lnfsidmap""... $ac_c" 1>&6 | |
4546 | -echo "configure:1558: checking for nfs4_init_name_mapping in -lnfsidmap" >&5 | |
4547 | -ac_lib_var=`echo nfsidmap'_'nfs4_init_name_mapping | sed 'y%./+-%__p_%'` | |
4548 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4549 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
4550 | +if test -z "$ac_cpp_err"; then | |
4551 | + ac_header_preproc=yes | |
4552 | else | |
4553 | - ac_save_LIBS="$LIBS" | |
4554 | -LIBS="-lnfsidmap $LIBS" | |
4555 | -cat > conftest.$ac_ext <<EOF | |
4556 | -#line 1566 "configure" | |
4557 | -#include "confdefs.h" | |
4558 | -/* Override any gcc2 internal prototype to avoid an error. */ | |
4559 | -/* We use char because int might match the return type of a gcc2 | |
4560 | - builtin and then its argument prototype would still apply. */ | |
4561 | -char nfs4_init_name_mapping(); | |
4562 | + echo "$as_me: failed program was:" >&5 | |
4563 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4564 | ||
4565 | -int main() { | |
4566 | -nfs4_init_name_mapping() | |
4567 | -; return 0; } | |
4568 | -EOF | |
4569 | -if { (eval echo configure:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4570 | - rm -rf conftest* | |
4571 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
4572 | -else | |
4573 | - echo "configure: failed program was:" >&5 | |
4574 | - cat conftest.$ac_ext >&5 | |
4575 | - rm -rf conftest* | |
4576 | - eval "ac_cv_lib_$ac_lib_var=no" | |
4577 | + ac_header_preproc=no | |
4578 | +fi | |
4579 | +rm -f conftest.err conftest.$ac_ext | |
4580 | +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
4581 | +echo "${ECHO_T}$ac_header_preproc" >&6 | |
4582 | + | |
4583 | +# So? What about this header? | |
4584 | +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
4585 | + yes:no: ) | |
4586 | + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
4587 | +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
4588 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
4589 | +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
4590 | + ac_header_preproc=yes | |
4591 | + ;; | |
4592 | + no:yes:* ) | |
4593 | + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
4594 | +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
4595 | + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
4596 | +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
4597 | + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
4598 | +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
4599 | + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
4600 | +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
4601 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
4602 | +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
4603 | + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
4604 | +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
4605 | + ( | |
4606 | + cat <<\_ASBOX | |
4607 | +## ------------------------------------------ ## | |
4608 | +## Report this to the AC_PACKAGE_NAME lists. ## | |
4609 | +## ------------------------------------------ ## | |
4610 | +_ASBOX | |
4611 | + ) | | |
4612 | + sed "s/^/$as_me: WARNING: /" >&2 | |
4613 | + ;; | |
4614 | +esac | |
4615 | +echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4616 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4617 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4618 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4619 | +else | |
4620 | + eval "$as_ac_Header=\$ac_header_preproc" | |
4621 | fi | |
4622 | -rm -f conftest* | |
4623 | -LIBS="$ac_save_LIBS" | |
4624 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4625 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4626 | ||
4627 | fi | |
4628 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4629 | - echo "$ac_t""yes" 1>&6 | |
4630 | - ac_tr_lib=HAVE_LIB`echo nfsidmap | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
4631 | - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
4632 | - cat >> confdefs.h <<EOF | |
4633 | -#define $ac_tr_lib 1 | |
4634 | -EOF | |
4635 | - | |
4636 | - LIBS="-lnfsidmap $LIBS" | |
4637 | - | |
4638 | -else | |
4639 | - echo "$ac_t""no" 1>&6 | |
4640 | -{ echo "configure: error: libnfsidmap needed for nfsv4 support" 1>&2; exit 1; } | |
4641 | -fi | |
4642 | - | |
4643 | - for ac_hdr in event.h | |
4644 | -do | |
4645 | -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4646 | -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4647 | -echo "configure:1609: checking for $ac_hdr" >&5 | |
4648 | -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4649 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
4650 | -else | |
4651 | - cat > conftest.$ac_ext <<EOF | |
4652 | -#line 1614 "configure" | |
4653 | -#include "confdefs.h" | |
4654 | -#include <$ac_hdr> | |
4655 | -EOF | |
4656 | -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4657 | -{ (eval echo configure:1619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4658 | -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4659 | -if test -z "$ac_err"; then | |
4660 | - rm -rf conftest* | |
4661 | - eval "ac_cv_header_$ac_safe=yes" | |
4662 | -else | |
4663 | - echo "$ac_err" >&5 | |
4664 | - echo "configure: failed program was:" >&5 | |
4665 | - cat conftest.$ac_ext >&5 | |
4666 | - rm -rf conftest* | |
4667 | - eval "ac_cv_header_$ac_safe=no" | |
4668 | -fi | |
4669 | -rm -f conftest* | |
4670 | -fi | |
4671 | -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4672 | - echo "$ac_t""yes" 1>&6 | |
4673 | - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4674 | - cat >> confdefs.h <<EOF | |
4675 | -#define $ac_tr_hdr 1 | |
4676 | -EOF | |
4677 | - | |
4678 | -else | |
4679 | - echo "$ac_t""no" 1>&6 | |
4680 | -{ echo "configure: error: libevent needed for nfsv4 support" 1>&2; exit 1; } | |
4681 | +if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4682 | + cat >>confdefs.h <<_ACEOF | |
4683 | +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4684 | +_ACEOF | |
4685 | + | |
4686 | +else | |
4687 | + { { echo "$as_me:$LINENO: error: libevent needed for nfsv4 support" >&5 | |
4688 | +echo "$as_me: error: libevent needed for nfsv4 support" >&2;} | |
4689 | + { (exit 1); exit 1; }; } | |
4690 | fi | |
4691 | + | |
4692 | done | |
4693 | ||
4694 | - for ac_hdr in nfsidmap.h | |
4695 | -do | |
4696 | -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4697 | -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
4698 | -echo "configure:1650: checking for $ac_hdr" >&5 | |
4699 | -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
4700 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
4701 | -else | |
4702 | - cat > conftest.$ac_ext <<EOF | |
4703 | -#line 1655 "configure" | |
4704 | -#include "confdefs.h" | |
4705 | -#include <$ac_hdr> | |
4706 | -EOF | |
4707 | -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
4708 | -{ (eval echo configure:1660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
4709 | -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
4710 | -if test -z "$ac_err"; then | |
4711 | - rm -rf conftest* | |
4712 | - eval "ac_cv_header_$ac_safe=yes" | |
4713 | -else | |
4714 | - echo "$ac_err" >&5 | |
4715 | - echo "configure: failed program was:" >&5 | |
4716 | - cat conftest.$ac_ext >&5 | |
4717 | - rm -rf conftest* | |
4718 | - eval "ac_cv_header_$ac_safe=no" | |
4719 | + | |
4720 | +for ac_header in nfsidmap.h | |
4721 | +do | |
4722 | +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
4723 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4724 | + echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4725 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4726 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4727 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4728 | +fi | |
4729 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4730 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4731 | +else | |
4732 | + # Is the header compilable? | |
4733 | +echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
4734 | +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
4735 | +cat >conftest.$ac_ext <<_ACEOF | |
4736 | +/* confdefs.h. */ | |
4737 | +_ACEOF | |
4738 | +cat confdefs.h >>conftest.$ac_ext | |
4739 | +cat >>conftest.$ac_ext <<_ACEOF | |
4740 | +/* end confdefs.h. */ | |
4741 | +$ac_includes_default | |
4742 | +#include <$ac_header> | |
4743 | +_ACEOF | |
4744 | +rm -f conftest.$ac_objext | |
4745 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
4746 | + (eval $ac_compile) 2>conftest.er1 | |
4747 | + ac_status=$? | |
4748 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4749 | + rm -f conftest.er1 | |
4750 | + cat conftest.err >&5 | |
4751 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4752 | + (exit $ac_status); } && | |
4753 | + { ac_try='test -z "$ac_c_werror_flag" | |
4754 | + || test ! -s conftest.err' | |
4755 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4756 | + (eval $ac_try) 2>&5 | |
4757 | + ac_status=$? | |
4758 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4759 | + (exit $ac_status); }; } && | |
4760 | + { ac_try='test -s conftest.$ac_objext' | |
4761 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4762 | + (eval $ac_try) 2>&5 | |
4763 | + ac_status=$? | |
4764 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4765 | + (exit $ac_status); }; }; then | |
4766 | + ac_header_compiler=yes | |
4767 | +else | |
4768 | + echo "$as_me: failed program was:" >&5 | |
4769 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4770 | + | |
4771 | +ac_header_compiler=no | |
4772 | +fi | |
4773 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
4774 | +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
4775 | +echo "${ECHO_T}$ac_header_compiler" >&6 | |
4776 | + | |
4777 | +# Is the header present? | |
4778 | +echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
4779 | +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
4780 | +cat >conftest.$ac_ext <<_ACEOF | |
4781 | +/* confdefs.h. */ | |
4782 | +_ACEOF | |
4783 | +cat confdefs.h >>conftest.$ac_ext | |
4784 | +cat >>conftest.$ac_ext <<_ACEOF | |
4785 | +/* end confdefs.h. */ | |
4786 | +#include <$ac_header> | |
4787 | +_ACEOF | |
4788 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
4789 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
4790 | + ac_status=$? | |
4791 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4792 | + rm -f conftest.er1 | |
4793 | + cat conftest.err >&5 | |
4794 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4795 | + (exit $ac_status); } >/dev/null; then | |
4796 | + if test -s conftest.err; then | |
4797 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
4798 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
4799 | + else | |
4800 | + ac_cpp_err= | |
4801 | + fi | |
4802 | +else | |
4803 | + ac_cpp_err=yes | |
4804 | fi | |
4805 | -rm -f conftest* | |
4806 | +if test -z "$ac_cpp_err"; then | |
4807 | + ac_header_preproc=yes | |
4808 | +else | |
4809 | + echo "$as_me: failed program was:" >&5 | |
4810 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4811 | + | |
4812 | + ac_header_preproc=no | |
4813 | +fi | |
4814 | +rm -f conftest.err conftest.$ac_ext | |
4815 | +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
4816 | +echo "${ECHO_T}$ac_header_preproc" >&6 | |
4817 | + | |
4818 | +# So? What about this header? | |
4819 | +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
4820 | + yes:no: ) | |
4821 | + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
4822 | +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
4823 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
4824 | +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
4825 | + ac_header_preproc=yes | |
4826 | + ;; | |
4827 | + no:yes:* ) | |
4828 | + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
4829 | +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
4830 | + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
4831 | +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
4832 | + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
4833 | +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
4834 | + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
4835 | +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
4836 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
4837 | +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
4838 | + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
4839 | +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
4840 | + ( | |
4841 | + cat <<\_ASBOX | |
4842 | +## ------------------------------------------ ## | |
4843 | +## Report this to the AC_PACKAGE_NAME lists. ## | |
4844 | +## ------------------------------------------ ## | |
4845 | +_ASBOX | |
4846 | + ) | | |
4847 | + sed "s/^/$as_me: WARNING: /" >&2 | |
4848 | + ;; | |
4849 | +esac | |
4850 | +echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
4851 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
4852 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
4853 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4854 | +else | |
4855 | + eval "$as_ac_Header=\$ac_header_preproc" | |
4856 | +fi | |
4857 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
4858 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
4859 | + | |
4860 | fi | |
4861 | -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4862 | - echo "$ac_t""yes" 1>&6 | |
4863 | - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4864 | - cat >> confdefs.h <<EOF | |
4865 | -#define $ac_tr_hdr 1 | |
4866 | -EOF | |
4867 | - | |
4868 | +if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
4869 | + cat >>confdefs.h <<_ACEOF | |
4870 | +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
4871 | +_ACEOF | |
4872 | + | |
4873 | else | |
4874 | - echo "$ac_t""no" 1>&6 | |
4875 | -{ echo "configure: error: libnfsidmap needed for nfsv4 support" 1>&2; exit 1; } | |
4876 | + { { echo "$as_me:$LINENO: error: libnfsidmap needed for nfsv4 support" >&5 | |
4877 | +echo "$as_me: error: libnfsidmap needed for nfsv4 support" >&2;} | |
4878 | + { (exit 1); exit 1; }; } | |
4879 | fi | |
4880 | + | |
4881 | done | |
4882 | ||
4883 | fi | |
4884 | if test "$knfsd_cv_glibc2" = no; then | |
4885 | - echo $ac_n "checking for daemon in -lbsd""... $ac_c" 1>&6 | |
4886 | -echo "configure:1690: checking for daemon in -lbsd" >&5 | |
4887 | -ac_lib_var=`echo bsd'_'daemon | sed 'y%./+-%__p_%'` | |
4888 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
4889 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
4890 | + echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5 | |
4891 | +echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6 | |
4892 | +if test "${ac_cv_lib_bsd_daemon+set}" = set; then | |
4893 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4894 | else | |
4895 | - ac_save_LIBS="$LIBS" | |
4896 | + ac_check_lib_save_LIBS=$LIBS | |
4897 | LIBS="-lbsd $LIBS" | |
4898 | -cat > conftest.$ac_ext <<EOF | |
4899 | -#line 1698 "configure" | |
4900 | -#include "confdefs.h" | |
4901 | +cat >conftest.$ac_ext <<_ACEOF | |
4902 | +/* confdefs.h. */ | |
4903 | +_ACEOF | |
4904 | +cat confdefs.h >>conftest.$ac_ext | |
4905 | +cat >>conftest.$ac_ext <<_ACEOF | |
4906 | +/* end confdefs.h. */ | |
4907 | + | |
4908 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4909 | +#ifdef __cplusplus | |
4910 | +extern "C" | |
4911 | +#endif | |
4912 | /* We use char because int might match the return type of a gcc2 | |
4913 | - builtin and then its argument prototype would still apply. */ | |
4914 | -char daemon(); | |
4915 | - | |
4916 | -int main() { | |
4917 | -daemon() | |
4918 | -; return 0; } | |
4919 | -EOF | |
4920 | -if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
4921 | - rm -rf conftest* | |
4922 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
4923 | -else | |
4924 | - echo "configure: failed program was:" >&5 | |
4925 | - cat conftest.$ac_ext >&5 | |
4926 | - rm -rf conftest* | |
4927 | - eval "ac_cv_lib_$ac_lib_var=no" | |
4928 | -fi | |
4929 | -rm -f conftest* | |
4930 | -LIBS="$ac_save_LIBS" | |
4931 | - | |
4932 | -fi | |
4933 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4934 | - echo "$ac_t""yes" 1>&6 | |
4935 | + builtin and then its argument prototype would still apply. */ | |
4936 | +char daemon (); | |
4937 | +int | |
4938 | +main () | |
4939 | +{ | |
4940 | +daemon (); | |
4941 | + ; | |
4942 | + return 0; | |
4943 | +} | |
4944 | +_ACEOF | |
4945 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
4946 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
4947 | + (eval $ac_link) 2>conftest.er1 | |
4948 | + ac_status=$? | |
4949 | + grep -v '^ *+' conftest.er1 >conftest.err | |
4950 | + rm -f conftest.er1 | |
4951 | + cat conftest.err >&5 | |
4952 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4953 | + (exit $ac_status); } && | |
4954 | + { ac_try='test -z "$ac_c_werror_flag" | |
4955 | + || test ! -s conftest.err' | |
4956 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4957 | + (eval $ac_try) 2>&5 | |
4958 | + ac_status=$? | |
4959 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4960 | + (exit $ac_status); }; } && | |
4961 | + { ac_try='test -s conftest$ac_exeext' | |
4962 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
4963 | + (eval $ac_try) 2>&5 | |
4964 | + ac_status=$? | |
4965 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
4966 | + (exit $ac_status); }; }; then | |
4967 | + ac_cv_lib_bsd_daemon=yes | |
4968 | +else | |
4969 | + echo "$as_me: failed program was:" >&5 | |
4970 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
4971 | + | |
4972 | +ac_cv_lib_bsd_daemon=no | |
4973 | +fi | |
4974 | +rm -f conftest.err conftest.$ac_objext \ | |
4975 | + conftest$ac_exeext conftest.$ac_ext | |
4976 | +LIBS=$ac_check_lib_save_LIBS | |
4977 | +fi | |
4978 | +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5 | |
4979 | +echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6 | |
4980 | +if test $ac_cv_lib_bsd_daemon = yes; then | |
4981 | LIBBSD="-lbsd" | |
4982 | -else | |
4983 | - echo "$ac_t""no" 1>&6 | |
4984 | fi | |
4985 | ||
4986 | fi | |
4987 | @@ -1731,37 +3979,66 @@ fi | |
4988 | ||
4989 | ||
4990 | ||
4991 | -echo $ac_n "checking for the tcp wrapper library""... $ac_c" 1>&6 | |
4992 | -echo "configure:1736: checking for the tcp wrapper library" >&5 | |
4993 | - if eval "test \"`echo '$''{'knfsd_cv_tcp_wrapper'+set}'`\" = set"; then | |
4994 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
4995 | +echo "$as_me:$LINENO: checking for the tcp wrapper library" >&5 | |
4996 | +echo $ECHO_N "checking for the tcp wrapper library... $ECHO_C" >&6 | |
4997 | + if test "${knfsd_cv_tcp_wrapper+set}" = set; then | |
4998 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
4999 | else | |
5000 | old_LIBS="$LIBS" | |
5001 | LIBS="$LIBS -lwrap $LIBNSL" | |
5002 | - cat > conftest.$ac_ext <<EOF | |
5003 | -#line 1743 "configure" | |
5004 | -#include "confdefs.h" | |
5005 | + cat >conftest.$ac_ext <<_ACEOF | |
5006 | +/* confdefs.h. */ | |
5007 | +_ACEOF | |
5008 | +cat confdefs.h >>conftest.$ac_ext | |
5009 | +cat >>conftest.$ac_ext <<_ACEOF | |
5010 | +/* end confdefs.h. */ | |
5011 | ||
5012 | int deny_severity = 0; | |
5013 | int allow_severity = 0; | |
5014 | -int main() { | |
5015 | +int | |
5016 | +main () | |
5017 | +{ | |
5018 | return hosts_ctl ("nfsd", "", "") | |
5019 | -; return 0; } | |
5020 | -EOF | |
5021 | -if { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
5022 | - rm -rf conftest* | |
5023 | + ; | |
5024 | + return 0; | |
5025 | +} | |
5026 | +_ACEOF | |
5027 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
5028 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5029 | + (eval $ac_link) 2>conftest.er1 | |
5030 | + ac_status=$? | |
5031 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5032 | + rm -f conftest.er1 | |
5033 | + cat conftest.err >&5 | |
5034 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5035 | + (exit $ac_status); } && | |
5036 | + { ac_try='test -z "$ac_c_werror_flag" | |
5037 | + || test ! -s conftest.err' | |
5038 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5039 | + (eval $ac_try) 2>&5 | |
5040 | + ac_status=$? | |
5041 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5042 | + (exit $ac_status); }; } && | |
5043 | + { ac_try='test -s conftest$ac_exeext' | |
5044 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5045 | + (eval $ac_try) 2>&5 | |
5046 | + ac_status=$? | |
5047 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5048 | + (exit $ac_status); }; }; then | |
5049 | knfsd_cv_tcp_wrapper=yes | |
5050 | else | |
5051 | - echo "configure: failed program was:" >&5 | |
5052 | - cat conftest.$ac_ext >&5 | |
5053 | - rm -rf conftest* | |
5054 | - knfsd_cv_tcp_wrapper=no | |
5055 | + echo "$as_me: failed program was:" >&5 | |
5056 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5057 | + | |
5058 | +knfsd_cv_tcp_wrapper=no | |
5059 | fi | |
5060 | -rm -f conftest* | |
5061 | +rm -f conftest.err conftest.$ac_objext \ | |
5062 | + conftest$ac_exeext conftest.$ac_ext | |
5063 | LIBS="$old_LIBS" | |
5064 | fi | |
5065 | ||
5066 | - echo "$ac_t""$knfsd_cv_tcp_wrapper" 1>&6 | |
5067 | + echo "$as_me:$LINENO: result: $knfsd_cv_tcp_wrapper" >&5 | |
5068 | +echo "${ECHO_T}$knfsd_cv_tcp_wrapper" >&6 | |
5069 | if test "$knfsd_cv_tcp_wrapper" = yes; then | |
5070 | CFLAGS="$CFLAGS -DHAVE_TCP_WRAPPER" | |
5071 | CXXFLAGS="$CXXFLAGS -DHAVE_TCP_WRAPPER" | |
5072 | @@ -1771,51 +4048,165 @@ fi | |
5073 | ||
5074 | ||
5075 | if test "$enable_gss" = yes; then | |
5076 | - for ac_hdr in nfsidmap.h | |
5077 | + | |
5078 | +for ac_header in nfsidmap.h | |
5079 | do | |
5080 | -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
5081 | -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
5082 | -echo "configure:1779: checking for $ac_hdr" >&5 | |
5083 | -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then | |
5084 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
5085 | -else | |
5086 | - cat > conftest.$ac_ext <<EOF | |
5087 | -#line 1784 "configure" | |
5088 | -#include "confdefs.h" | |
5089 | -#include <$ac_hdr> | |
5090 | -EOF | |
5091 | -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
5092 | -{ (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } | |
5093 | -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` | |
5094 | -if test -z "$ac_err"; then | |
5095 | - rm -rf conftest* | |
5096 | - eval "ac_cv_header_$ac_safe=yes" | |
5097 | -else | |
5098 | - echo "$ac_err" >&5 | |
5099 | - echo "configure: failed program was:" >&5 | |
5100 | - cat conftest.$ac_ext >&5 | |
5101 | - rm -rf conftest* | |
5102 | - eval "ac_cv_header_$ac_safe=no" | |
5103 | +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5104 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5105 | + echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
5106 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
5107 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5108 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5109 | +fi | |
5110 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
5111 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
5112 | +else | |
5113 | + # Is the header compilable? | |
5114 | +echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
5115 | +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
5116 | +cat >conftest.$ac_ext <<_ACEOF | |
5117 | +/* confdefs.h. */ | |
5118 | +_ACEOF | |
5119 | +cat confdefs.h >>conftest.$ac_ext | |
5120 | +cat >>conftest.$ac_ext <<_ACEOF | |
5121 | +/* end confdefs.h. */ | |
5122 | +$ac_includes_default | |
5123 | +#include <$ac_header> | |
5124 | +_ACEOF | |
5125 | +rm -f conftest.$ac_objext | |
5126 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5127 | + (eval $ac_compile) 2>conftest.er1 | |
5128 | + ac_status=$? | |
5129 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5130 | + rm -f conftest.er1 | |
5131 | + cat conftest.err >&5 | |
5132 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5133 | + (exit $ac_status); } && | |
5134 | + { ac_try='test -z "$ac_c_werror_flag" | |
5135 | + || test ! -s conftest.err' | |
5136 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5137 | + (eval $ac_try) 2>&5 | |
5138 | + ac_status=$? | |
5139 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5140 | + (exit $ac_status); }; } && | |
5141 | + { ac_try='test -s conftest.$ac_objext' | |
5142 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5143 | + (eval $ac_try) 2>&5 | |
5144 | + ac_status=$? | |
5145 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5146 | + (exit $ac_status); }; }; then | |
5147 | + ac_header_compiler=yes | |
5148 | +else | |
5149 | + echo "$as_me: failed program was:" >&5 | |
5150 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5151 | + | |
5152 | +ac_header_compiler=no | |
5153 | +fi | |
5154 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5155 | +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
5156 | +echo "${ECHO_T}$ac_header_compiler" >&6 | |
5157 | + | |
5158 | +# Is the header present? | |
5159 | +echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
5160 | +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
5161 | +cat >conftest.$ac_ext <<_ACEOF | |
5162 | +/* confdefs.h. */ | |
5163 | +_ACEOF | |
5164 | +cat confdefs.h >>conftest.$ac_ext | |
5165 | +cat >>conftest.$ac_ext <<_ACEOF | |
5166 | +/* end confdefs.h. */ | |
5167 | +#include <$ac_header> | |
5168 | +_ACEOF | |
5169 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5170 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5171 | + ac_status=$? | |
5172 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5173 | + rm -f conftest.er1 | |
5174 | + cat conftest.err >&5 | |
5175 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5176 | + (exit $ac_status); } >/dev/null; then | |
5177 | + if test -s conftest.err; then | |
5178 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
5179 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
5180 | + else | |
5181 | + ac_cpp_err= | |
5182 | + fi | |
5183 | +else | |
5184 | + ac_cpp_err=yes | |
5185 | fi | |
5186 | -rm -f conftest* | |
5187 | +if test -z "$ac_cpp_err"; then | |
5188 | + ac_header_preproc=yes | |
5189 | +else | |
5190 | + echo "$as_me: failed program was:" >&5 | |
5191 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5192 | + | |
5193 | + ac_header_preproc=no | |
5194 | +fi | |
5195 | +rm -f conftest.err conftest.$ac_ext | |
5196 | +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
5197 | +echo "${ECHO_T}$ac_header_preproc" >&6 | |
5198 | + | |
5199 | +# So? What about this header? | |
5200 | +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
5201 | + yes:no: ) | |
5202 | + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
5203 | +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
5204 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
5205 | +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
5206 | + ac_header_preproc=yes | |
5207 | + ;; | |
5208 | + no:yes:* ) | |
5209 | + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
5210 | +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
5211 | + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
5212 | +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
5213 | + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
5214 | +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
5215 | + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
5216 | +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
5217 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
5218 | +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
5219 | + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
5220 | +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
5221 | + ( | |
5222 | + cat <<\_ASBOX | |
5223 | +## ------------------------------------------ ## | |
5224 | +## Report this to the AC_PACKAGE_NAME lists. ## | |
5225 | +## ------------------------------------------ ## | |
5226 | +_ASBOX | |
5227 | + ) | | |
5228 | + sed "s/^/$as_me: WARNING: /" >&2 | |
5229 | + ;; | |
5230 | +esac | |
5231 | +echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
5232 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
5233 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5234 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5235 | +else | |
5236 | + eval "$as_ac_Header=\$ac_header_preproc" | |
5237 | fi | |
5238 | -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
5239 | - echo "$ac_t""yes" 1>&6 | |
5240 | - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
5241 | - cat >> confdefs.h <<EOF | |
5242 | -#define $ac_tr_hdr 1 | |
5243 | -EOF | |
5244 | - | |
5245 | -else | |
5246 | - echo "$ac_t""no" 1>&6 | |
5247 | -{ echo "configure: error: libnfsidmap needed for gss support" 1>&2; exit 1; } | |
5248 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
5249 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
5250 | + | |
5251 | +fi | |
5252 | +if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
5253 | + cat >>confdefs.h <<_ACEOF | |
5254 | +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
5255 | +_ACEOF | |
5256 | + | |
5257 | +else | |
5258 | + { { echo "$as_me:$LINENO: error: libnfsidmap needed for gss support" >&5 | |
5259 | +echo "$as_me: error: libnfsidmap needed for gss support" >&2;} | |
5260 | + { (exit 1); exit 1; }; } | |
5261 | fi | |
5262 | + | |
5263 | done | |
5264 | ||
5265 | - | |
5266 | - echo $ac_n "checking for Kerberos v5""... $ac_c" 1>&6 | |
5267 | -echo "configure:1818: checking for Kerberos v5" >&5 | |
5268 | - # Check whether --with-krb5 or --without-krb5 was given. | |
5269 | + | |
5270 | + echo "$as_me:$LINENO: checking for Kerberos v5" >&5 | |
5271 | +echo $ECHO_N "checking for Kerberos v5... $ECHO_C" >&6 | |
5272 | + | |
5273 | +# Check whether --with-krb5 or --without-krb5 was given. | |
5274 | if test "${with_krb5+set}" = set; then | |
5275 | withval="$with_krb5" | |
5276 | case "$withval" in | |
5277 | @@ -1825,13 +4216,12 @@ if test "${with_krb5+set}" = set; then | |
5278 | *) | |
5279 | krb5_with="$withval" | |
5280 | ;; | |
5281 | - esac | |
5282 | - | |
5283 | -fi | |
5284 | + esac | |
5285 | ||
5286 | +fi; | |
5287 | ||
5288 | - for dir in $krb5_with /usr/kerberos /usr/local /usr/local/krb5 /usr/krb5 \ | |
5289 | - /usr/heimdal /usr/local/heimdal /usr/athena /usr ; do | |
5290 | + for dir in $krb5_with /usr /usr/kerberos /usr/local /usr/local/krb5 \ | |
5291 | + /usr/krb5 /usr/heimdal /usr/local/heimdal /usr/athena ; do | |
5292 | K5CONFIG="" | |
5293 | if test -f $dir/bin/krb5-config; then | |
5294 | K5CONFIG=$dir/bin/krb5-config | |
5295 | @@ -1839,776 +4229,2232 @@ fi | |
5296 | K5CONFIG="/usr/kerberos/bin/krb5-config" | |
5297 | fi | |
5298 | if test "$K5CONFIG" != ""; then | |
5299 | + KRBINC=`$K5CONFIG --cflags` | |
5300 | + KRBLIB=`$K5CONFIG --libs gssapi` | |
5301 | + K5VERS=`$K5CONFIG --version | head -n 1 | awk '{split($4,v,"."); if (v[3] == "") v[3] = "0"; print v[1]v[2]v[3] }'` | |
5302 | + | |
5303 | +cat >>confdefs.h <<_ACEOF | |
5304 | +#define KRB5_VERSION $K5VERS | |
5305 | +_ACEOF | |
5306 | + | |
5307 | if test -f $dir/include/gssapi/gssapi_krb5.h -a \ | |
5308 | \( -f $dir/lib/libgssapi_krb5.a -o \ | |
5309 | -f $dir/lib/libgssapi_krb5.so \) ; then | |
5310 | - cat >> confdefs.h <<\EOF | |
5311 | + | |
5312 | +cat >>confdefs.h <<\_ACEOF | |
5313 | #define HAVE_KRB5 1 | |
5314 | -EOF | |
5315 | +_ACEOF | |
5316 | ||
5317 | KRBDIR="$dir" | |
5318 | - K5VERS=`$K5CONFIG --version | awk '{split($4,v,"."); print v[1]v[2]v[3] }'` | |
5319 | - cat >> confdefs.h <<EOF | |
5320 | -#define KRB5_VERSION $K5VERS | |
5321 | -EOF | |
5322 | + if test $K5VERS -le 131; then | |
5323 | ||
5324 | - KRBLIB=`$K5CONFIG --libs gssapi` | |
5325 | - if test $K5VERS -le 131; then | |
5326 | - cat >> confdefs.h <<\EOF | |
5327 | -#define USE_PRIVATE_KRB5_FUNCTIONS 1 | |
5328 | -EOF | |
5329 | +cat >>confdefs.h <<\_ACEOF | |
5330 | +#define USE_GSS_KRB5_CCACHE_NAME 1 | |
5331 | +_ACEOF | |
5332 | ||
5333 | fi | |
5334 | - echo $ac_n "checking for gss_krb5_export_lucid_sec_context in -lgssapi_krb5""... $ac_c" 1>&6 | |
5335 | -echo "configure:1864: checking for gss_krb5_export_lucid_sec_context in -lgssapi_krb5" >&5 | |
5336 | -ac_lib_var=`echo gssapi_krb5'_'gss_krb5_export_lucid_sec_context | sed 'y%./+-%__p_%'` | |
5337 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5338 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
5339 | -else | |
5340 | - ac_save_LIBS="$LIBS" | |
5341 | -LIBS="-lgssapi_krb5 $KRBLIB $LIBS" | |
5342 | -cat > conftest.$ac_ext <<EOF | |
5343 | -#line 1872 "configure" | |
5344 | -#include "confdefs.h" | |
5345 | + gssapi_lib=gssapi_krb5 | |
5346 | + break | |
5347 | + elif test \( -f $dir/include/heim_err.h -o\ | |
5348 | + -f $dir/include/heimdal/heim_err.h \) -a \ | |
5349 | + -f $dir/lib/libroken.a; then | |
5350 | + | |
5351 | +cat >>confdefs.h <<\_ACEOF | |
5352 | +#define HAVE_HEIMDAL 1 | |
5353 | +_ACEOF | |
5354 | + | |
5355 | + KRBDIR="$dir" | |
5356 | + gssapi_lib=gssapi | |
5357 | + break | |
5358 | + fi | |
5359 | + fi | |
5360 | + done | |
5361 | + if test "x$KRBDIR" = "x"; then | |
5362 | + if test "x$krb5_with" = "x"; then | |
5363 | + { { echo "$as_me:$LINENO: error: Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=" >&5 | |
5364 | +echo "$as_me: error: Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=" >&2;} | |
5365 | + { (exit 1); exit 1; }; } | |
5366 | + else | |
5367 | + { { echo "$as_me:$LINENO: error: Kerberos v5 with GSS support not found at $krb5_with" >&5 | |
5368 | +echo "$as_me: error: Kerberos v5 with GSS support not found at $krb5_with" >&2;} | |
5369 | + { (exit 1); exit 1; }; } | |
5370 | + fi | |
5371 | + fi | |
5372 | + CFLAGS="$CFLAGS `$K5CONFIG --cflags`" | |
5373 | + echo "$as_me:$LINENO: result: $KRBDIR" >&5 | |
5374 | +echo "${ECHO_T}$KRBDIR" >&6 | |
5375 | + | |
5376 | + as_ac_Lib=`echo "ac_cv_lib_$gssapi_lib''_gss_krb5_export_lucid_sec_context" | $as_tr_sh` | |
5377 | +echo "$as_me:$LINENO: checking for gss_krb5_export_lucid_sec_context in -l$gssapi_lib" >&5 | |
5378 | +echo $ECHO_N "checking for gss_krb5_export_lucid_sec_context in -l$gssapi_lib... $ECHO_C" >&6 | |
5379 | +if eval "test \"\${$as_ac_Lib+set}\" = set"; then | |
5380 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5381 | +else | |
5382 | + ac_check_lib_save_LIBS=$LIBS | |
5383 | +LIBS="-l$gssapi_lib $KRBLIB $LIBS" | |
5384 | +cat >conftest.$ac_ext <<_ACEOF | |
5385 | +/* confdefs.h. */ | |
5386 | +_ACEOF | |
5387 | +cat confdefs.h >>conftest.$ac_ext | |
5388 | +cat >>conftest.$ac_ext <<_ACEOF | |
5389 | +/* end confdefs.h. */ | |
5390 | + | |
5391 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5392 | +#ifdef __cplusplus | |
5393 | +extern "C" | |
5394 | +#endif | |
5395 | /* We use char because int might match the return type of a gcc2 | |
5396 | - builtin and then its argument prototype would still apply. */ | |
5397 | -char gss_krb5_export_lucid_sec_context(); | |
5398 | + builtin and then its argument prototype would still apply. */ | |
5399 | +char gss_krb5_export_lucid_sec_context (); | |
5400 | +int | |
5401 | +main () | |
5402 | +{ | |
5403 | +gss_krb5_export_lucid_sec_context (); | |
5404 | + ; | |
5405 | + return 0; | |
5406 | +} | |
5407 | +_ACEOF | |
5408 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
5409 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5410 | + (eval $ac_link) 2>conftest.er1 | |
5411 | + ac_status=$? | |
5412 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5413 | + rm -f conftest.er1 | |
5414 | + cat conftest.err >&5 | |
5415 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5416 | + (exit $ac_status); } && | |
5417 | + { ac_try='test -z "$ac_c_werror_flag" | |
5418 | + || test ! -s conftest.err' | |
5419 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5420 | + (eval $ac_try) 2>&5 | |
5421 | + ac_status=$? | |
5422 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5423 | + (exit $ac_status); }; } && | |
5424 | + { ac_try='test -s conftest$ac_exeext' | |
5425 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5426 | + (eval $ac_try) 2>&5 | |
5427 | + ac_status=$? | |
5428 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5429 | + (exit $ac_status); }; }; then | |
5430 | + eval "$as_ac_Lib=yes" | |
5431 | +else | |
5432 | + echo "$as_me: failed program was:" >&5 | |
5433 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5434 | + | |
5435 | +eval "$as_ac_Lib=no" | |
5436 | +fi | |
5437 | +rm -f conftest.err conftest.$ac_objext \ | |
5438 | + conftest$ac_exeext conftest.$ac_ext | |
5439 | +LIBS=$ac_check_lib_save_LIBS | |
5440 | +fi | |
5441 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 | |
5442 | +echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 | |
5443 | +if test `eval echo '${'$as_ac_Lib'}'` = yes; then | |
5444 | ||
5445 | -int main() { | |
5446 | -gss_krb5_export_lucid_sec_context() | |
5447 | -; return 0; } | |
5448 | -EOF | |
5449 | -if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
5450 | - rm -rf conftest* | |
5451 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
5452 | -else | |
5453 | - echo "configure: failed program was:" >&5 | |
5454 | - cat conftest.$ac_ext >&5 | |
5455 | - rm -rf conftest* | |
5456 | - eval "ac_cv_lib_$ac_lib_var=no" | |
5457 | -fi | |
5458 | -rm -f conftest* | |
5459 | -LIBS="$ac_save_LIBS" | |
5460 | - | |
5461 | -fi | |
5462 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5463 | - echo "$ac_t""yes" 1>&6 | |
5464 | - cat >> confdefs.h <<\EOF | |
5465 | +cat >>confdefs.h <<\_ACEOF | |
5466 | #define HAVE_LUCID_CONTEXT_SUPPORT 1 | |
5467 | -EOF | |
5468 | +_ACEOF | |
5469 | ||
5470 | -else | |
5471 | - echo "$ac_t""no" 1>&6 | |
5472 | fi | |
5473 | ||
5474 | - echo $ac_n "checking for gss_krb5_set_allowable_enctypes in -lgssapi_krb5""... $ac_c" 1>&6 | |
5475 | -echo "configure:1907: checking for gss_krb5_set_allowable_enctypes in -lgssapi_krb5" >&5 | |
5476 | -ac_lib_var=`echo gssapi_krb5'_'gss_krb5_set_allowable_enctypes | sed 'y%./+-%__p_%'` | |
5477 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5478 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
5479 | -else | |
5480 | - ac_save_LIBS="$LIBS" | |
5481 | -LIBS="-lgssapi_krb5 $KRBLIB $LIBS" | |
5482 | -cat > conftest.$ac_ext <<EOF | |
5483 | -#line 1915 "configure" | |
5484 | -#include "confdefs.h" | |
5485 | + as_ac_Lib=`echo "ac_cv_lib_$gssapi_lib''_gss_krb5_set_allowable_enctypes" | $as_tr_sh` | |
5486 | +echo "$as_me:$LINENO: checking for gss_krb5_set_allowable_enctypes in -l$gssapi_lib" >&5 | |
5487 | +echo $ECHO_N "checking for gss_krb5_set_allowable_enctypes in -l$gssapi_lib... $ECHO_C" >&6 | |
5488 | +if eval "test \"\${$as_ac_Lib+set}\" = set"; then | |
5489 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5490 | +else | |
5491 | + ac_check_lib_save_LIBS=$LIBS | |
5492 | +LIBS="-l$gssapi_lib $KRBLIB $LIBS" | |
5493 | +cat >conftest.$ac_ext <<_ACEOF | |
5494 | +/* confdefs.h. */ | |
5495 | +_ACEOF | |
5496 | +cat confdefs.h >>conftest.$ac_ext | |
5497 | +cat >>conftest.$ac_ext <<_ACEOF | |
5498 | +/* end confdefs.h. */ | |
5499 | + | |
5500 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5501 | +#ifdef __cplusplus | |
5502 | +extern "C" | |
5503 | +#endif | |
5504 | /* We use char because int might match the return type of a gcc2 | |
5505 | - builtin and then its argument prototype would still apply. */ | |
5506 | -char gss_krb5_set_allowable_enctypes(); | |
5507 | + builtin and then its argument prototype would still apply. */ | |
5508 | +char gss_krb5_set_allowable_enctypes (); | |
5509 | +int | |
5510 | +main () | |
5511 | +{ | |
5512 | +gss_krb5_set_allowable_enctypes (); | |
5513 | + ; | |
5514 | + return 0; | |
5515 | +} | |
5516 | +_ACEOF | |
5517 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
5518 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5519 | + (eval $ac_link) 2>conftest.er1 | |
5520 | + ac_status=$? | |
5521 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5522 | + rm -f conftest.er1 | |
5523 | + cat conftest.err >&5 | |
5524 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5525 | + (exit $ac_status); } && | |
5526 | + { ac_try='test -z "$ac_c_werror_flag" | |
5527 | + || test ! -s conftest.err' | |
5528 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5529 | + (eval $ac_try) 2>&5 | |
5530 | + ac_status=$? | |
5531 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5532 | + (exit $ac_status); }; } && | |
5533 | + { ac_try='test -s conftest$ac_exeext' | |
5534 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5535 | + (eval $ac_try) 2>&5 | |
5536 | + ac_status=$? | |
5537 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5538 | + (exit $ac_status); }; }; then | |
5539 | + eval "$as_ac_Lib=yes" | |
5540 | +else | |
5541 | + echo "$as_me: failed program was:" >&5 | |
5542 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5543 | + | |
5544 | +eval "$as_ac_Lib=no" | |
5545 | +fi | |
5546 | +rm -f conftest.err conftest.$ac_objext \ | |
5547 | + conftest$ac_exeext conftest.$ac_ext | |
5548 | +LIBS=$ac_check_lib_save_LIBS | |
5549 | +fi | |
5550 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 | |
5551 | +echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 | |
5552 | +if test `eval echo '${'$as_ac_Lib'}'` = yes; then | |
5553 | ||
5554 | -int main() { | |
5555 | -gss_krb5_set_allowable_enctypes() | |
5556 | -; return 0; } | |
5557 | -EOF | |
5558 | -if { (eval echo configure:1926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
5559 | - rm -rf conftest* | |
5560 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
5561 | -else | |
5562 | - echo "configure: failed program was:" >&5 | |
5563 | - cat conftest.$ac_ext >&5 | |
5564 | - rm -rf conftest* | |
5565 | - eval "ac_cv_lib_$ac_lib_var=no" | |
5566 | -fi | |
5567 | -rm -f conftest* | |
5568 | -LIBS="$ac_save_LIBS" | |
5569 | - | |
5570 | -fi | |
5571 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5572 | - echo "$ac_t""yes" 1>&6 | |
5573 | - cat >> confdefs.h <<\EOF | |
5574 | +cat >>confdefs.h <<\_ACEOF | |
5575 | #define HAVE_SET_ALLOWABLE_ENCTYPES 1 | |
5576 | -EOF | |
5577 | +_ACEOF | |
5578 | ||
5579 | -else | |
5580 | - echo "$ac_t""no" 1>&6 | |
5581 | fi | |
5582 | ||
5583 | - echo $ac_n "checking for gss_krb5_ccache_name in -lgssapi_krb5""... $ac_c" 1>&6 | |
5584 | -echo "configure:1950: checking for gss_krb5_ccache_name in -lgssapi_krb5" >&5 | |
5585 | -ac_lib_var=`echo gssapi_krb5'_'gss_krb5_ccache_name | sed 'y%./+-%__p_%'` | |
5586 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5587 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
5588 | -else | |
5589 | - ac_save_LIBS="$LIBS" | |
5590 | -LIBS="-lgssapi_krb5 $KRBLIB $LIBS" | |
5591 | -cat > conftest.$ac_ext <<EOF | |
5592 | -#line 1958 "configure" | |
5593 | -#include "confdefs.h" | |
5594 | + as_ac_Lib=`echo "ac_cv_lib_$gssapi_lib''_gss_krb5_ccache_name" | $as_tr_sh` | |
5595 | +echo "$as_me:$LINENO: checking for gss_krb5_ccache_name in -l$gssapi_lib" >&5 | |
5596 | +echo $ECHO_N "checking for gss_krb5_ccache_name in -l$gssapi_lib... $ECHO_C" >&6 | |
5597 | +if eval "test \"\${$as_ac_Lib+set}\" = set"; then | |
5598 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5599 | +else | |
5600 | + ac_check_lib_save_LIBS=$LIBS | |
5601 | +LIBS="-l$gssapi_lib $KRBLIB $LIBS" | |
5602 | +cat >conftest.$ac_ext <<_ACEOF | |
5603 | +/* confdefs.h. */ | |
5604 | +_ACEOF | |
5605 | +cat confdefs.h >>conftest.$ac_ext | |
5606 | +cat >>conftest.$ac_ext <<_ACEOF | |
5607 | +/* end confdefs.h. */ | |
5608 | + | |
5609 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5610 | +#ifdef __cplusplus | |
5611 | +extern "C" | |
5612 | +#endif | |
5613 | /* We use char because int might match the return type of a gcc2 | |
5614 | - builtin and then its argument prototype would still apply. */ | |
5615 | -char gss_krb5_ccache_name(); | |
5616 | + builtin and then its argument prototype would still apply. */ | |
5617 | +char gss_krb5_ccache_name (); | |
5618 | +int | |
5619 | +main () | |
5620 | +{ | |
5621 | +gss_krb5_ccache_name (); | |
5622 | + ; | |
5623 | + return 0; | |
5624 | +} | |
5625 | +_ACEOF | |
5626 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
5627 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5628 | + (eval $ac_link) 2>conftest.er1 | |
5629 | + ac_status=$? | |
5630 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5631 | + rm -f conftest.er1 | |
5632 | + cat conftest.err >&5 | |
5633 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5634 | + (exit $ac_status); } && | |
5635 | + { ac_try='test -z "$ac_c_werror_flag" | |
5636 | + || test ! -s conftest.err' | |
5637 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5638 | + (eval $ac_try) 2>&5 | |
5639 | + ac_status=$? | |
5640 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5641 | + (exit $ac_status); }; } && | |
5642 | + { ac_try='test -s conftest$ac_exeext' | |
5643 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5644 | + (eval $ac_try) 2>&5 | |
5645 | + ac_status=$? | |
5646 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5647 | + (exit $ac_status); }; }; then | |
5648 | + eval "$as_ac_Lib=yes" | |
5649 | +else | |
5650 | + echo "$as_me: failed program was:" >&5 | |
5651 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5652 | + | |
5653 | +eval "$as_ac_Lib=no" | |
5654 | +fi | |
5655 | +rm -f conftest.err conftest.$ac_objext \ | |
5656 | + conftest$ac_exeext conftest.$ac_ext | |
5657 | +LIBS=$ac_check_lib_save_LIBS | |
5658 | +fi | |
5659 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5 | |
5660 | +echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6 | |
5661 | +if test `eval echo '${'$as_ac_Lib'}'` = yes; then | |
5662 | ||
5663 | -int main() { | |
5664 | -gss_krb5_ccache_name() | |
5665 | -; return 0; } | |
5666 | -EOF | |
5667 | -if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
5668 | - rm -rf conftest* | |
5669 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
5670 | -else | |
5671 | - echo "configure: failed program was:" >&5 | |
5672 | - cat conftest.$ac_ext >&5 | |
5673 | - rm -rf conftest* | |
5674 | - eval "ac_cv_lib_$ac_lib_var=no" | |
5675 | -fi | |
5676 | -rm -f conftest* | |
5677 | -LIBS="$ac_save_LIBS" | |
5678 | - | |
5679 | -fi | |
5680 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5681 | - echo "$ac_t""yes" 1>&6 | |
5682 | - cat >> confdefs.h <<\EOF | |
5683 | +cat >>confdefs.h <<\_ACEOF | |
5684 | #define HAVE_GSS_KRB5_CCACHE_NAME 1 | |
5685 | -EOF | |
5686 | +_ACEOF | |
5687 | ||
5688 | -else | |
5689 | - echo "$ac_t""no" 1>&6 | |
5690 | fi | |
5691 | ||
5692 | - break | |
5693 | - elif test \( -f $dir/include/heim_err.h -o\ | |
5694 | - -f $dir/include/heimdal/heim_err.h \) -a \ | |
5695 | - -f $dir/lib/libroken.a; then | |
5696 | - cat >> confdefs.h <<\EOF | |
5697 | -#define HAVE_HEIMDAL 1 | |
5698 | -EOF | |
5699 | ||
5700 | - KRBDIR="$dir" | |
5701 | - K5VERS=`$K5CONFIG --version | head -1 | awk '{split($2,v,"."); print v[1]v[2]v[3] }'` | |
5702 | - cat >> confdefs.h <<EOF | |
5703 | -#define KRB5_VERSION $K5VERS | |
5704 | -EOF | |
5705 | + if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then | |
5706 | + { echo "$as_me:$LINENO: WARNING: Using $KRBDIR instead of requested value of $krb5_with for Kerberos!" >&5 | |
5707 | +echo "$as_me: WARNING: Using $KRBDIR instead of requested value of $krb5_with for Kerberos!" >&2;} | |
5708 | + fi | |
5709 | + | |
5710 | + echo "$as_me:$LINENO: checking for authgss_create_default in -lrpcsecgss" >&5 | |
5711 | +echo $ECHO_N "checking for authgss_create_default in -lrpcsecgss... $ECHO_C" >&6 | |
5712 | +if test "${ac_cv_lib_rpcsecgss_authgss_create_default+set}" = set; then | |
5713 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5714 | +else | |
5715 | + ac_check_lib_save_LIBS=$LIBS | |
5716 | +LIBS="-lrpcsecgss $KRBLIB $LIBS" | |
5717 | +cat >conftest.$ac_ext <<_ACEOF | |
5718 | +/* confdefs.h. */ | |
5719 | +_ACEOF | |
5720 | +cat confdefs.h >>conftest.$ac_ext | |
5721 | +cat >>conftest.$ac_ext <<_ACEOF | |
5722 | +/* end confdefs.h. */ | |
5723 | ||
5724 | - KRBLIB=`$K5CONFIG --libs gssapi` | |
5725 | - echo $ac_n "checking for gss_krb5_export_lucid_sec_context in -lgssapi""... $ac_c" 1>&6 | |
5726 | -echo "configure:2008: checking for gss_krb5_export_lucid_sec_context in -lgssapi" >&5 | |
5727 | -ac_lib_var=`echo gssapi'_'gss_krb5_export_lucid_sec_context | sed 'y%./+-%__p_%'` | |
5728 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5729 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
5730 | -else | |
5731 | - ac_save_LIBS="$LIBS" | |
5732 | -LIBS="-lgssapi $KRBLIB $LIBS" | |
5733 | -cat > conftest.$ac_ext <<EOF | |
5734 | -#line 2016 "configure" | |
5735 | -#include "confdefs.h" | |
5736 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5737 | +#ifdef __cplusplus | |
5738 | +extern "C" | |
5739 | +#endif | |
5740 | /* We use char because int might match the return type of a gcc2 | |
5741 | - builtin and then its argument prototype would still apply. */ | |
5742 | -char gss_krb5_export_lucid_sec_context(); | |
5743 | + builtin and then its argument prototype would still apply. */ | |
5744 | +char authgss_create_default (); | |
5745 | +int | |
5746 | +main () | |
5747 | +{ | |
5748 | +authgss_create_default (); | |
5749 | + ; | |
5750 | + return 0; | |
5751 | +} | |
5752 | +_ACEOF | |
5753 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
5754 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5755 | + (eval $ac_link) 2>conftest.er1 | |
5756 | + ac_status=$? | |
5757 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5758 | + rm -f conftest.er1 | |
5759 | + cat conftest.err >&5 | |
5760 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5761 | + (exit $ac_status); } && | |
5762 | + { ac_try='test -z "$ac_c_werror_flag" | |
5763 | + || test ! -s conftest.err' | |
5764 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5765 | + (eval $ac_try) 2>&5 | |
5766 | + ac_status=$? | |
5767 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5768 | + (exit $ac_status); }; } && | |
5769 | + { ac_try='test -s conftest$ac_exeext' | |
5770 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5771 | + (eval $ac_try) 2>&5 | |
5772 | + ac_status=$? | |
5773 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5774 | + (exit $ac_status); }; }; then | |
5775 | + ac_cv_lib_rpcsecgss_authgss_create_default=yes | |
5776 | +else | |
5777 | + echo "$as_me: failed program was:" >&5 | |
5778 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5779 | + | |
5780 | +ac_cv_lib_rpcsecgss_authgss_create_default=no | |
5781 | +fi | |
5782 | +rm -f conftest.err conftest.$ac_objext \ | |
5783 | + conftest$ac_exeext conftest.$ac_ext | |
5784 | +LIBS=$ac_check_lib_save_LIBS | |
5785 | +fi | |
5786 | +echo "$as_me:$LINENO: result: $ac_cv_lib_rpcsecgss_authgss_create_default" >&5 | |
5787 | +echo "${ECHO_T}$ac_cv_lib_rpcsecgss_authgss_create_default" >&6 | |
5788 | +if test $ac_cv_lib_rpcsecgss_authgss_create_default = yes; then | |
5789 | + librpcsecgss=1 | |
5790 | +else | |
5791 | + { { echo "$as_me:$LINENO: error: librpcsecgss needed for nfsv4 support" >&5 | |
5792 | +echo "$as_me: error: librpcsecgss needed for nfsv4 support" >&2;} | |
5793 | + { (exit 1); exit 1; }; } | |
5794 | +fi | |
5795 | + | |
5796 | + echo "$as_me:$LINENO: checking for authgss_set_debug_level in -lrpcsecgss" >&5 | |
5797 | +echo $ECHO_N "checking for authgss_set_debug_level in -lrpcsecgss... $ECHO_C" >&6 | |
5798 | +if test "${ac_cv_lib_rpcsecgss_authgss_set_debug_level+set}" = set; then | |
5799 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5800 | +else | |
5801 | + ac_check_lib_save_LIBS=$LIBS | |
5802 | +LIBS="-lrpcsecgss $KRBLIB $LIBS" | |
5803 | +cat >conftest.$ac_ext <<_ACEOF | |
5804 | +/* confdefs.h. */ | |
5805 | +_ACEOF | |
5806 | +cat confdefs.h >>conftest.$ac_ext | |
5807 | +cat >>conftest.$ac_ext <<_ACEOF | |
5808 | +/* end confdefs.h. */ | |
5809 | ||
5810 | -int main() { | |
5811 | -gss_krb5_export_lucid_sec_context() | |
5812 | -; return 0; } | |
5813 | -EOF | |
5814 | -if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
5815 | - rm -rf conftest* | |
5816 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
5817 | -else | |
5818 | - echo "configure: failed program was:" >&5 | |
5819 | - cat conftest.$ac_ext >&5 | |
5820 | - rm -rf conftest* | |
5821 | - eval "ac_cv_lib_$ac_lib_var=no" | |
5822 | +/* Override any gcc2 internal prototype to avoid an error. */ | |
5823 | +#ifdef __cplusplus | |
5824 | +extern "C" | |
5825 | +#endif | |
5826 | +/* We use char because int might match the return type of a gcc2 | |
5827 | + builtin and then its argument prototype would still apply. */ | |
5828 | +char authgss_set_debug_level (); | |
5829 | +int | |
5830 | +main () | |
5831 | +{ | |
5832 | +authgss_set_debug_level (); | |
5833 | + ; | |
5834 | + return 0; | |
5835 | +} | |
5836 | +_ACEOF | |
5837 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
5838 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
5839 | + (eval $ac_link) 2>conftest.er1 | |
5840 | + ac_status=$? | |
5841 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5842 | + rm -f conftest.er1 | |
5843 | + cat conftest.err >&5 | |
5844 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5845 | + (exit $ac_status); } && | |
5846 | + { ac_try='test -z "$ac_c_werror_flag" | |
5847 | + || test ! -s conftest.err' | |
5848 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5849 | + (eval $ac_try) 2>&5 | |
5850 | + ac_status=$? | |
5851 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5852 | + (exit $ac_status); }; } && | |
5853 | + { ac_try='test -s conftest$ac_exeext' | |
5854 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5855 | + (eval $ac_try) 2>&5 | |
5856 | + ac_status=$? | |
5857 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5858 | + (exit $ac_status); }; }; then | |
5859 | + ac_cv_lib_rpcsecgss_authgss_set_debug_level=yes | |
5860 | +else | |
5861 | + echo "$as_me: failed program was:" >&5 | |
5862 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5863 | + | |
5864 | +ac_cv_lib_rpcsecgss_authgss_set_debug_level=no | |
5865 | fi | |
5866 | -rm -f conftest* | |
5867 | -LIBS="$ac_save_LIBS" | |
5868 | +rm -f conftest.err conftest.$ac_objext \ | |
5869 | + conftest$ac_exeext conftest.$ac_ext | |
5870 | +LIBS=$ac_check_lib_save_LIBS | |
5871 | +fi | |
5872 | +echo "$as_me:$LINENO: result: $ac_cv_lib_rpcsecgss_authgss_set_debug_level" >&5 | |
5873 | +echo "${ECHO_T}$ac_cv_lib_rpcsecgss_authgss_set_debug_level" >&6 | |
5874 | +if test $ac_cv_lib_rpcsecgss_authgss_set_debug_level = yes; then | |
5875 | + | |
5876 | +cat >>confdefs.h <<\_ACEOF | |
5877 | +#define HAVE_AUTHGSS_SET_DEBUG_LEVEL 1 | |
5878 | +_ACEOF | |
5879 | ||
5880 | fi | |
5881 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
5882 | - echo "$ac_t""yes" 1>&6 | |
5883 | - cat >> confdefs.h <<\EOF | |
5884 | -#define HAVE_LUCID_CONTEXT_SUPPORT 1 | |
5885 | -EOF | |
5886 | ||
5887 | + | |
5888 | + | |
5889 | + | |
5890 | + | |
5891 | + | |
5892 | +fi | |
5893 | + | |
5894 | + | |
5895 | +for ac_header in com_err.h | |
5896 | +do | |
5897 | +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
5898 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5899 | + echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
5900 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
5901 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
5902 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
5903 | +fi | |
5904 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
5905 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
5906 | +else | |
5907 | + # Is the header compilable? | |
5908 | +echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
5909 | +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
5910 | +cat >conftest.$ac_ext <<_ACEOF | |
5911 | +/* confdefs.h. */ | |
5912 | +_ACEOF | |
5913 | +cat confdefs.h >>conftest.$ac_ext | |
5914 | +cat >>conftest.$ac_ext <<_ACEOF | |
5915 | +/* end confdefs.h. */ | |
5916 | +$ac_includes_default | |
5917 | +#include <$ac_header> | |
5918 | +_ACEOF | |
5919 | +rm -f conftest.$ac_objext | |
5920 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
5921 | + (eval $ac_compile) 2>conftest.er1 | |
5922 | + ac_status=$? | |
5923 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5924 | + rm -f conftest.er1 | |
5925 | + cat conftest.err >&5 | |
5926 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5927 | + (exit $ac_status); } && | |
5928 | + { ac_try='test -z "$ac_c_werror_flag" | |
5929 | + || test ! -s conftest.err' | |
5930 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5931 | + (eval $ac_try) 2>&5 | |
5932 | + ac_status=$? | |
5933 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5934 | + (exit $ac_status); }; } && | |
5935 | + { ac_try='test -s conftest.$ac_objext' | |
5936 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
5937 | + (eval $ac_try) 2>&5 | |
5938 | + ac_status=$? | |
5939 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5940 | + (exit $ac_status); }; }; then | |
5941 | + ac_header_compiler=yes | |
5942 | +else | |
5943 | + echo "$as_me: failed program was:" >&5 | |
5944 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5945 | + | |
5946 | +ac_header_compiler=no | |
5947 | +fi | |
5948 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
5949 | +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
5950 | +echo "${ECHO_T}$ac_header_compiler" >&6 | |
5951 | + | |
5952 | +# Is the header present? | |
5953 | +echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
5954 | +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
5955 | +cat >conftest.$ac_ext <<_ACEOF | |
5956 | +/* confdefs.h. */ | |
5957 | +_ACEOF | |
5958 | +cat confdefs.h >>conftest.$ac_ext | |
5959 | +cat >>conftest.$ac_ext <<_ACEOF | |
5960 | +/* end confdefs.h. */ | |
5961 | +#include <$ac_header> | |
5962 | +_ACEOF | |
5963 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
5964 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
5965 | + ac_status=$? | |
5966 | + grep -v '^ *+' conftest.er1 >conftest.err | |
5967 | + rm -f conftest.er1 | |
5968 | + cat conftest.err >&5 | |
5969 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
5970 | + (exit $ac_status); } >/dev/null; then | |
5971 | + if test -s conftest.err; then | |
5972 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
5973 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
5974 | + else | |
5975 | + ac_cpp_err= | |
5976 | + fi | |
5977 | else | |
5978 | - echo "$ac_t""no" 1>&6 | |
5979 | + ac_cpp_err=yes | |
5980 | fi | |
5981 | +if test -z "$ac_cpp_err"; then | |
5982 | + ac_header_preproc=yes | |
5983 | +else | |
5984 | + echo "$as_me: failed program was:" >&5 | |
5985 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
5986 | ||
5987 | - echo $ac_n "checking for gss_krb5_set_allowable_enctypes in -lgssapi""... $ac_c" 1>&6 | |
5988 | -echo "configure:2051: checking for gss_krb5_set_allowable_enctypes in -lgssapi" >&5 | |
5989 | -ac_lib_var=`echo gssapi'_'gss_krb5_set_allowable_enctypes | sed 'y%./+-%__p_%'` | |
5990 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
5991 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
5992 | + ac_header_preproc=no | |
5993 | +fi | |
5994 | +rm -f conftest.err conftest.$ac_ext | |
5995 | +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
5996 | +echo "${ECHO_T}$ac_header_preproc" >&6 | |
5997 | + | |
5998 | +# So? What about this header? | |
5999 | +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
6000 | + yes:no: ) | |
6001 | + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
6002 | +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
6003 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
6004 | +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
6005 | + ac_header_preproc=yes | |
6006 | + ;; | |
6007 | + no:yes:* ) | |
6008 | + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
6009 | +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
6010 | + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
6011 | +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
6012 | + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
6013 | +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
6014 | + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
6015 | +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
6016 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
6017 | +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
6018 | + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
6019 | +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
6020 | + ( | |
6021 | + cat <<\_ASBOX | |
6022 | +## ------------------------------------------ ## | |
6023 | +## Report this to the AC_PACKAGE_NAME lists. ## | |
6024 | +## ------------------------------------------ ## | |
6025 | +_ASBOX | |
6026 | + ) | | |
6027 | + sed "s/^/$as_me: WARNING: /" >&2 | |
6028 | + ;; | |
6029 | +esac | |
6030 | +echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
6031 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
6032 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
6033 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6034 | else | |
6035 | - ac_save_LIBS="$LIBS" | |
6036 | -LIBS="-lgssapi $KRBLIB $LIBS" | |
6037 | -cat > conftest.$ac_ext <<EOF | |
6038 | -#line 2059 "configure" | |
6039 | -#include "confdefs.h" | |
6040 | -/* Override any gcc2 internal prototype to avoid an error. */ | |
6041 | -/* We use char because int might match the return type of a gcc2 | |
6042 | - builtin and then its argument prototype would still apply. */ | |
6043 | -char gss_krb5_set_allowable_enctypes(); | |
6044 | + eval "$as_ac_Header=\$ac_header_preproc" | |
6045 | +fi | |
6046 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
6047 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
6048 | ||
6049 | -int main() { | |
6050 | -gss_krb5_set_allowable_enctypes() | |
6051 | -; return 0; } | |
6052 | -EOF | |
6053 | -if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
6054 | - rm -rf conftest* | |
6055 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
6056 | -else | |
6057 | - echo "configure: failed program was:" >&5 | |
6058 | - cat conftest.$ac_ext >&5 | |
6059 | - rm -rf conftest* | |
6060 | - eval "ac_cv_lib_$ac_lib_var=no" | |
6061 | fi | |
6062 | -rm -f conftest* | |
6063 | -LIBS="$ac_save_LIBS" | |
6064 | +if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
6065 | + cat >>confdefs.h <<_ACEOF | |
6066 | +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6067 | +_ACEOF | |
6068 | ||
6069 | fi | |
6070 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6071 | - echo "$ac_t""yes" 1>&6 | |
6072 | - cat >> confdefs.h <<\EOF | |
6073 | -#define HAVE_SET_ALLOWABLE_ENCTYPES 1 | |
6074 | -EOF | |
6075 | ||
6076 | +done | |
6077 | + | |
6078 | + | |
6079 | +for ac_header in et/com_err.h | |
6080 | +do | |
6081 | +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | |
6082 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
6083 | + echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
6084 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
6085 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
6086 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6087 | +fi | |
6088 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
6089 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
6090 | +else | |
6091 | + # Is the header compilable? | |
6092 | +echo "$as_me:$LINENO: checking $ac_header usability" >&5 | |
6093 | +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | |
6094 | +cat >conftest.$ac_ext <<_ACEOF | |
6095 | +/* confdefs.h. */ | |
6096 | +_ACEOF | |
6097 | +cat confdefs.h >>conftest.$ac_ext | |
6098 | +cat >>conftest.$ac_ext <<_ACEOF | |
6099 | +/* end confdefs.h. */ | |
6100 | +$ac_includes_default | |
6101 | +#include <$ac_header> | |
6102 | +_ACEOF | |
6103 | +rm -f conftest.$ac_objext | |
6104 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
6105 | + (eval $ac_compile) 2>conftest.er1 | |
6106 | + ac_status=$? | |
6107 | + grep -v '^ *+' conftest.er1 >conftest.err | |
6108 | + rm -f conftest.er1 | |
6109 | + cat conftest.err >&5 | |
6110 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6111 | + (exit $ac_status); } && | |
6112 | + { ac_try='test -z "$ac_c_werror_flag" | |
6113 | + || test ! -s conftest.err' | |
6114 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6115 | + (eval $ac_try) 2>&5 | |
6116 | + ac_status=$? | |
6117 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6118 | + (exit $ac_status); }; } && | |
6119 | + { ac_try='test -s conftest.$ac_objext' | |
6120 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6121 | + (eval $ac_try) 2>&5 | |
6122 | + ac_status=$? | |
6123 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6124 | + (exit $ac_status); }; }; then | |
6125 | + ac_header_compiler=yes | |
6126 | +else | |
6127 | + echo "$as_me: failed program was:" >&5 | |
6128 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
6129 | + | |
6130 | +ac_header_compiler=no | |
6131 | +fi | |
6132 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
6133 | +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | |
6134 | +echo "${ECHO_T}$ac_header_compiler" >&6 | |
6135 | + | |
6136 | +# Is the header present? | |
6137 | +echo "$as_me:$LINENO: checking $ac_header presence" >&5 | |
6138 | +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | |
6139 | +cat >conftest.$ac_ext <<_ACEOF | |
6140 | +/* confdefs.h. */ | |
6141 | +_ACEOF | |
6142 | +cat confdefs.h >>conftest.$ac_ext | |
6143 | +cat >>conftest.$ac_ext <<_ACEOF | |
6144 | +/* end confdefs.h. */ | |
6145 | +#include <$ac_header> | |
6146 | +_ACEOF | |
6147 | +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | |
6148 | + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | |
6149 | + ac_status=$? | |
6150 | + grep -v '^ *+' conftest.er1 >conftest.err | |
6151 | + rm -f conftest.er1 | |
6152 | + cat conftest.err >&5 | |
6153 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6154 | + (exit $ac_status); } >/dev/null; then | |
6155 | + if test -s conftest.err; then | |
6156 | + ac_cpp_err=$ac_c_preproc_warn_flag | |
6157 | + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | |
6158 | + else | |
6159 | + ac_cpp_err= | |
6160 | + fi | |
6161 | else | |
6162 | - echo "$ac_t""no" 1>&6 | |
6163 | + ac_cpp_err=yes | |
6164 | fi | |
6165 | - | |
6166 | - echo $ac_n "checking for gss_krb5_ccache_name in -lgssapi""... $ac_c" 1>&6 | |
6167 | -echo "configure:2094: checking for gss_krb5_ccache_name in -lgssapi" >&5 | |
6168 | -ac_lib_var=`echo gssapi'_'gss_krb5_ccache_name | sed 'y%./+-%__p_%'` | |
6169 | -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
6170 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
6171 | +if test -z "$ac_cpp_err"; then | |
6172 | + ac_header_preproc=yes | |
6173 | else | |
6174 | - ac_save_LIBS="$LIBS" | |
6175 | -LIBS="-lgssapi $KRBLIB $LIBS" | |
6176 | -cat > conftest.$ac_ext <<EOF | |
6177 | -#line 2102 "configure" | |
6178 | -#include "confdefs.h" | |
6179 | -/* Override any gcc2 internal prototype to avoid an error. */ | |
6180 | -/* We use char because int might match the return type of a gcc2 | |
6181 | - builtin and then its argument prototype would still apply. */ | |
6182 | -char gss_krb5_ccache_name(); | |
6183 | + echo "$as_me: failed program was:" >&5 | |
6184 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
6185 | ||
6186 | -int main() { | |
6187 | -gss_krb5_ccache_name() | |
6188 | -; return 0; } | |
6189 | -EOF | |
6190 | -if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
6191 | - rm -rf conftest* | |
6192 | - eval "ac_cv_lib_$ac_lib_var=yes" | |
6193 | -else | |
6194 | - echo "configure: failed program was:" >&5 | |
6195 | - cat conftest.$ac_ext >&5 | |
6196 | - rm -rf conftest* | |
6197 | - eval "ac_cv_lib_$ac_lib_var=no" | |
6198 | + ac_header_preproc=no | |
6199 | +fi | |
6200 | +rm -f conftest.err conftest.$ac_ext | |
6201 | +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | |
6202 | +echo "${ECHO_T}$ac_header_preproc" >&6 | |
6203 | + | |
6204 | +# So? What about this header? | |
6205 | +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | |
6206 | + yes:no: ) | |
6207 | + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | |
6208 | +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | |
6209 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | |
6210 | +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | |
6211 | + ac_header_preproc=yes | |
6212 | + ;; | |
6213 | + no:yes:* ) | |
6214 | + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | |
6215 | +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | |
6216 | + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | |
6217 | +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | |
6218 | + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | |
6219 | +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | |
6220 | + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | |
6221 | +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | |
6222 | + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | |
6223 | +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | |
6224 | + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | |
6225 | +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | |
6226 | + ( | |
6227 | + cat <<\_ASBOX | |
6228 | +## ------------------------------------------ ## | |
6229 | +## Report this to the AC_PACKAGE_NAME lists. ## | |
6230 | +## ------------------------------------------ ## | |
6231 | +_ASBOX | |
6232 | + ) | | |
6233 | + sed "s/^/$as_me: WARNING: /" >&2 | |
6234 | + ;; | |
6235 | +esac | |
6236 | +echo "$as_me:$LINENO: checking for $ac_header" >&5 | |
6237 | +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | |
6238 | +if eval "test \"\${$as_ac_Header+set}\" = set"; then | |
6239 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6240 | +else | |
6241 | + eval "$as_ac_Header=\$ac_header_preproc" | |
6242 | fi | |
6243 | -rm -f conftest* | |
6244 | -LIBS="$ac_save_LIBS" | |
6245 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | |
6246 | +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | |
6247 | ||
6248 | fi | |
6249 | -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
6250 | - echo "$ac_t""yes" 1>&6 | |
6251 | - cat >> confdefs.h <<\EOF | |
6252 | -#define HAVE_GSS_KRB5_CCACHE_NAME 1 | |
6253 | -EOF | |
6254 | +if test `eval echo '${'$as_ac_Header'}'` = yes; then | |
6255 | + cat >>confdefs.h <<_ACEOF | |
6256 | +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | |
6257 | +_ACEOF | |
6258 | ||
6259 | -else | |
6260 | - echo "$ac_t""no" 1>&6 | |
6261 | fi | |
6262 | ||
6263 | - break | |
6264 | - fi | |
6265 | - CFLAGS=$CFLAGS `K5CONFIG --cflags` | |
6266 | - fi | |
6267 | - done | |
6268 | - if test "x$KRBDIR" = "x"; then | |
6269 | - echo "$ac_t"""no"" 1>&6 | |
6270 | - if test "x$krb5_with" = "x"; then | |
6271 | - { echo "configure: error: Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=" 1>&2; exit 1; } | |
6272 | - else | |
6273 | - { echo "configure: error: Kerberos v5 with GSS support not found at $krb5_with" 1>&2; exit 1; } | |
6274 | - fi | |
6275 | - fi | |
6276 | - echo "$ac_t""$KRBDIR" 1>&6 | |
6277 | - if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then | |
6278 | - echo "configure: warning: Using $KRBDIR instead of requested value of $krb5_with for Kerberos!" 1>&2 | |
6279 | - fi | |
6280 | +done | |
6281 | ||
6282 | - | |
6283 | - | |
6284 | - | |
6285 | -fi | |
6286 | ||
6287 | ||
6288 | for ac_func in innetgr | |
6289 | do | |
6290 | -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
6291 | -echo "configure:2163: checking for $ac_func" >&5 | |
6292 | -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then | |
6293 | - echo $ac_n "(cached) $ac_c" 1>&6 | |
6294 | -else | |
6295 | - cat > conftest.$ac_ext <<EOF | |
6296 | -#line 2168 "configure" | |
6297 | -#include "confdefs.h" | |
6298 | +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | |
6299 | +echo "$as_me:$LINENO: checking for $ac_func" >&5 | |
6300 | +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | |
6301 | +if eval "test \"\${$as_ac_var+set}\" = set"; then | |
6302 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6303 | +else | |
6304 | + cat >conftest.$ac_ext <<_ACEOF | |
6305 | +/* confdefs.h. */ | |
6306 | +_ACEOF | |
6307 | +cat confdefs.h >>conftest.$ac_ext | |
6308 | +cat >>conftest.$ac_ext <<_ACEOF | |
6309 | +/* end confdefs.h. */ | |
6310 | +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | |
6311 | + For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
6312 | +#define $ac_func innocuous_$ac_func | |
6313 | + | |
6314 | /* System header to define __stub macros and hopefully few prototypes, | |
6315 | - which can conflict with char $ac_func(); below. */ | |
6316 | -#include <assert.h> | |
6317 | -/* Override any gcc2 internal prototype to avoid an error. */ | |
6318 | -/* We use char because int might match the return type of a gcc2 | |
6319 | - builtin and then its argument prototype would still apply. */ | |
6320 | -char $ac_func(); | |
6321 | + which can conflict with char $ac_func (); below. | |
6322 | + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | |
6323 | + <limits.h> exists even on freestanding compilers. */ | |
6324 | ||
6325 | -int main() { | |
6326 | +#ifdef __STDC__ | |
6327 | +# include <limits.h> | |
6328 | +#else | |
6329 | +# include <assert.h> | |
6330 | +#endif | |
6331 | ||
6332 | +#undef $ac_func | |
6333 | + | |
6334 | +/* Override any gcc2 internal prototype to avoid an error. */ | |
6335 | +#ifdef __cplusplus | |
6336 | +extern "C" | |
6337 | +{ | |
6338 | +#endif | |
6339 | +/* We use char because int might match the return type of a gcc2 | |
6340 | + builtin and then its argument prototype would still apply. */ | |
6341 | +char $ac_func (); | |
6342 | /* The GNU C library defines this for functions which it implements | |
6343 | to always fail with ENOSYS. Some functions are actually named | |
6344 | something starting with __ and the normal name is an alias. */ | |
6345 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
6346 | choke me | |
6347 | #else | |
6348 | -$ac_func(); | |
6349 | +char (*f) () = $ac_func; | |
6350 | +#endif | |
6351 | +#ifdef __cplusplus | |
6352 | +} | |
6353 | #endif | |
6354 | ||
6355 | -; return 0; } | |
6356 | -EOF | |
6357 | -if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then | |
6358 | - rm -rf conftest* | |
6359 | - eval "ac_cv_func_$ac_func=yes" | |
6360 | -else | |
6361 | - echo "configure: failed program was:" >&5 | |
6362 | - cat conftest.$ac_ext >&5 | |
6363 | - rm -rf conftest* | |
6364 | - eval "ac_cv_func_$ac_func=no" | |
6365 | -fi | |
6366 | -rm -f conftest* | |
6367 | -fi | |
6368 | +int | |
6369 | +main () | |
6370 | +{ | |
6371 | +return f != $ac_func; | |
6372 | + ; | |
6373 | + return 0; | |
6374 | +} | |
6375 | +_ACEOF | |
6376 | +rm -f conftest.$ac_objext conftest$ac_exeext | |
6377 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6378 | + (eval $ac_link) 2>conftest.er1 | |
6379 | + ac_status=$? | |
6380 | + grep -v '^ *+' conftest.er1 >conftest.err | |
6381 | + rm -f conftest.er1 | |
6382 | + cat conftest.err >&5 | |
6383 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6384 | + (exit $ac_status); } && | |
6385 | + { ac_try='test -z "$ac_c_werror_flag" | |
6386 | + || test ! -s conftest.err' | |
6387 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6388 | + (eval $ac_try) 2>&5 | |
6389 | + ac_status=$? | |
6390 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6391 | + (exit $ac_status); }; } && | |
6392 | + { ac_try='test -s conftest$ac_exeext' | |
6393 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6394 | + (eval $ac_try) 2>&5 | |
6395 | + ac_status=$? | |
6396 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6397 | + (exit $ac_status); }; }; then | |
6398 | + eval "$as_ac_var=yes" | |
6399 | +else | |
6400 | + echo "$as_me: failed program was:" >&5 | |
6401 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
6402 | + | |
6403 | +eval "$as_ac_var=no" | |
6404 | +fi | |
6405 | +rm -f conftest.err conftest.$ac_objext \ | |
6406 | + conftest$ac_exeext conftest.$ac_ext | |
6407 | +fi | |
6408 | +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | |
6409 | +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | |
6410 | +if test `eval echo '${'$as_ac_var'}'` = yes; then | |
6411 | + cat >>confdefs.h <<_ACEOF | |
6412 | +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | |
6413 | +_ACEOF | |
6414 | ||
6415 | -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
6416 | - echo "$ac_t""yes" 1>&6 | |
6417 | - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
6418 | - cat >> confdefs.h <<EOF | |
6419 | -#define $ac_tr_func 1 | |
6420 | -EOF | |
6421 | - | |
6422 | -else | |
6423 | - echo "$ac_t""no" 1>&6 | |
6424 | fi | |
6425 | done | |
6426 | ||
6427 | ||
6428 | -cat >> confdefs.h <<EOF | |
6429 | + echo "$as_me:$LINENO: checking size of short" >&5 | |
6430 | +echo $ECHO_N "checking size of short... $ECHO_C" >&6 | |
6431 | + if test "${ac_cv_sizeof_short+set}" = set; then | |
6432 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6433 | +else | |
6434 | + if test "$cross_compiling" = yes; then | |
6435 | + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
6436 | +See \`config.log' for more details." >&5 | |
6437 | +echo "$as_me: error: cannot run test program while cross compiling | |
6438 | +See \`config.log' for more details." >&2;} | |
6439 | + { (exit 1); exit 1; }; } | |
6440 | +else | |
6441 | + cat >conftest.$ac_ext <<_ACEOF | |
6442 | +/* confdefs.h. */ | |
6443 | +_ACEOF | |
6444 | +cat confdefs.h >>conftest.$ac_ext | |
6445 | +cat >>conftest.$ac_ext <<_ACEOF | |
6446 | +/* end confdefs.h. */ | |
6447 | +#include <stdio.h> | |
6448 | + #include <sys/types.h> | |
6449 | + main() | |
6450 | + { | |
6451 | + FILE *f=fopen("conftestval", "w"); | |
6452 | + if (!f) exit(1); | |
6453 | + fprintf(f, "%d\n", sizeof(short)); | |
6454 | + exit(0); | |
6455 | + } | |
6456 | +_ACEOF | |
6457 | +rm -f conftest$ac_exeext | |
6458 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6459 | + (eval $ac_link) 2>&5 | |
6460 | + ac_status=$? | |
6461 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6462 | + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6463 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6464 | + (eval $ac_try) 2>&5 | |
6465 | + ac_status=$? | |
6466 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6467 | + (exit $ac_status); }; }; then | |
6468 | + ac_cv_sizeof_short=`cat conftestval` | |
6469 | +else | |
6470 | + echo "$as_me: program exited with status $ac_status" >&5 | |
6471 | +echo "$as_me: failed program was:" >&5 | |
6472 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
6473 | + | |
6474 | +( exit $ac_status ) | |
6475 | +ac_cv_sizeof_short=0 | |
6476 | +fi | |
6477 | +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
6478 | +fi | |
6479 | +fi | |
6480 | + | |
6481 | + echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5 | |
6482 | +echo "${ECHO_T}$ac_cv_sizeof_short" >&6 | |
6483 | + cat >>confdefs.h <<_ACEOF | |
6484 | +#define SIZEOF_SHORT $ac_cv_sizeof_short | |
6485 | +_ACEOF | |
6486 | + | |
6487 | + | |
6488 | + echo "$as_me:$LINENO: checking size of int" >&5 | |
6489 | +echo $ECHO_N "checking size of int... $ECHO_C" >&6 | |
6490 | + if test "${ac_cv_sizeof_int+set}" = set; then | |
6491 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6492 | +else | |
6493 | + if test "$cross_compiling" = yes; then | |
6494 | + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
6495 | +See \`config.log' for more details." >&5 | |
6496 | +echo "$as_me: error: cannot run test program while cross compiling | |
6497 | +See \`config.log' for more details." >&2;} | |
6498 | + { (exit 1); exit 1; }; } | |
6499 | +else | |
6500 | + cat >conftest.$ac_ext <<_ACEOF | |
6501 | +/* confdefs.h. */ | |
6502 | +_ACEOF | |
6503 | +cat confdefs.h >>conftest.$ac_ext | |
6504 | +cat >>conftest.$ac_ext <<_ACEOF | |
6505 | +/* end confdefs.h. */ | |
6506 | +#include <stdio.h> | |
6507 | + #include <sys/types.h> | |
6508 | + main() | |
6509 | + { | |
6510 | + FILE *f=fopen("conftestval", "w"); | |
6511 | + if (!f) exit(1); | |
6512 | + fprintf(f, "%d\n", sizeof(int)); | |
6513 | + exit(0); | |
6514 | + } | |
6515 | +_ACEOF | |
6516 | +rm -f conftest$ac_exeext | |
6517 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6518 | + (eval $ac_link) 2>&5 | |
6519 | + ac_status=$? | |
6520 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6521 | + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6522 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6523 | + (eval $ac_try) 2>&5 | |
6524 | + ac_status=$? | |
6525 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6526 | + (exit $ac_status); }; }; then | |
6527 | + ac_cv_sizeof_int=`cat conftestval` | |
6528 | +else | |
6529 | + echo "$as_me: program exited with status $ac_status" >&5 | |
6530 | +echo "$as_me: failed program was:" >&5 | |
6531 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
6532 | + | |
6533 | +( exit $ac_status ) | |
6534 | +ac_cv_sizeof_int=0 | |
6535 | +fi | |
6536 | +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
6537 | +fi | |
6538 | +fi | |
6539 | + | |
6540 | + echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 | |
6541 | +echo "${ECHO_T}$ac_cv_sizeof_int" >&6 | |
6542 | + cat >>confdefs.h <<_ACEOF | |
6543 | +#define SIZEOF_INT $ac_cv_sizeof_int | |
6544 | +_ACEOF | |
6545 | + | |
6546 | + | |
6547 | + echo "$as_me:$LINENO: checking size of long" >&5 | |
6548 | +echo $ECHO_N "checking size of long... $ECHO_C" >&6 | |
6549 | + if test "${ac_cv_sizeof_long+set}" = set; then | |
6550 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6551 | +else | |
6552 | + if test "$cross_compiling" = yes; then | |
6553 | + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
6554 | +See \`config.log' for more details." >&5 | |
6555 | +echo "$as_me: error: cannot run test program while cross compiling | |
6556 | +See \`config.log' for more details." >&2;} | |
6557 | + { (exit 1); exit 1; }; } | |
6558 | +else | |
6559 | + cat >conftest.$ac_ext <<_ACEOF | |
6560 | +/* confdefs.h. */ | |
6561 | +_ACEOF | |
6562 | +cat confdefs.h >>conftest.$ac_ext | |
6563 | +cat >>conftest.$ac_ext <<_ACEOF | |
6564 | +/* end confdefs.h. */ | |
6565 | +#include <stdio.h> | |
6566 | + #include <sys/types.h> | |
6567 | + main() | |
6568 | + { | |
6569 | + FILE *f=fopen("conftestval", "w"); | |
6570 | + if (!f) exit(1); | |
6571 | + fprintf(f, "%d\n", sizeof(long)); | |
6572 | + exit(0); | |
6573 | + } | |
6574 | +_ACEOF | |
6575 | +rm -f conftest$ac_exeext | |
6576 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6577 | + (eval $ac_link) 2>&5 | |
6578 | + ac_status=$? | |
6579 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6580 | + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6581 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6582 | + (eval $ac_try) 2>&5 | |
6583 | + ac_status=$? | |
6584 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6585 | + (exit $ac_status); }; }; then | |
6586 | + ac_cv_sizeof_long=`cat conftestval` | |
6587 | +else | |
6588 | + echo "$as_me: program exited with status $ac_status" >&5 | |
6589 | +echo "$as_me: failed program was:" >&5 | |
6590 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
6591 | + | |
6592 | +( exit $ac_status ) | |
6593 | +ac_cv_sizeof_long=0 | |
6594 | +fi | |
6595 | +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
6596 | +fi | |
6597 | +fi | |
6598 | + | |
6599 | + echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 | |
6600 | +echo "${ECHO_T}$ac_cv_sizeof_long" >&6 | |
6601 | + cat >>confdefs.h <<_ACEOF | |
6602 | +#define SIZEOF_LONG $ac_cv_sizeof_long | |
6603 | +_ACEOF | |
6604 | + | |
6605 | + | |
6606 | + echo "$as_me:$LINENO: checking size of size_t" >&5 | |
6607 | +echo $ECHO_N "checking size of size_t... $ECHO_C" >&6 | |
6608 | + if test "${ac_cv_sizeof_size_t+set}" = set; then | |
6609 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
6610 | +else | |
6611 | + if test "$cross_compiling" = yes; then | |
6612 | + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling | |
6613 | +See \`config.log' for more details." >&5 | |
6614 | +echo "$as_me: error: cannot run test program while cross compiling | |
6615 | +See \`config.log' for more details." >&2;} | |
6616 | + { (exit 1); exit 1; }; } | |
6617 | +else | |
6618 | + cat >conftest.$ac_ext <<_ACEOF | |
6619 | +/* confdefs.h. */ | |
6620 | +_ACEOF | |
6621 | +cat confdefs.h >>conftest.$ac_ext | |
6622 | +cat >>conftest.$ac_ext <<_ACEOF | |
6623 | +/* end confdefs.h. */ | |
6624 | +#include <stdio.h> | |
6625 | + #include <sys/types.h> | |
6626 | + main() | |
6627 | + { | |
6628 | + FILE *f=fopen("conftestval", "w"); | |
6629 | + if (!f) exit(1); | |
6630 | + fprintf(f, "%d\n", sizeof(size_t)); | |
6631 | + exit(0); | |
6632 | + } | |
6633 | +_ACEOF | |
6634 | +rm -f conftest$ac_exeext | |
6635 | +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |
6636 | + (eval $ac_link) 2>&5 | |
6637 | + ac_status=$? | |
6638 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6639 | + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | |
6640 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
6641 | + (eval $ac_try) 2>&5 | |
6642 | + ac_status=$? | |
6643 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
6644 | + (exit $ac_status); }; }; then | |
6645 | + ac_cv_sizeof_size_t=`cat conftestval` | |
6646 | +else | |
6647 | + echo "$as_me: program exited with status $ac_status" >&5 | |
6648 | +echo "$as_me: failed program was:" >&5 | |
6649 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
6650 | + | |
6651 | +( exit $ac_status ) | |
6652 | +ac_cv_sizeof_size_t=0 | |
6653 | +fi | |
6654 | +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | |
6655 | +fi | |
6656 | +fi | |
6657 | + | |
6658 | + echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 | |
6659 | +echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6 | |
6660 | + cat >>confdefs.h <<_ACEOF | |
6661 | +#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t | |
6662 | +_ACEOF | |
6663 | + | |
6664 | + | |
6665 | + | |
6666 | + | |
6667 | +cat >>confdefs.h <<_ACEOF | |
6668 | #define NFS_STATEDIR "$statedir" | |
6669 | -EOF | |
6670 | +_ACEOF | |
6671 | ||
6672 | ||
6673 | ||
6674 | ||
6675 | ||
6676 | -trap '' 1 2 15 | |
6677 | -cat > confcache <<\EOF | |
6678 | + ac_config_files="$ac_config_files config.mk utils/Makefile" | |
6679 | +cat >confcache <<\_ACEOF | |
6680 | # This file is a shell script that caches the results of configure | |
6681 | # tests run on this system so they can be shared between configure | |
6682 | -# scripts and configure runs. It is not useful on other systems. | |
6683 | -# If it contains results you don't want to keep, you may remove or edit it. | |
6684 | +# scripts and configure runs, see configure's option --config-cache. | |
6685 | +# It is not useful on other systems. If it contains results you don't | |
6686 | +# want to keep, you may remove or edit it. | |
6687 | # | |
6688 | -# By default, configure uses ./config.cache as the cache file, | |
6689 | -# creating it if it does not exist already. You can give configure | |
6690 | -# the --cache-file=FILE option to use a different cache file; that is | |
6691 | -# what configure does when it calls configure scripts in | |
6692 | -# subdirectories, so they share the cache. | |
6693 | -# Giving --cache-file=/dev/null disables caching, for debugging configure. | |
6694 | -# config.status only pays attention to the cache file if you give it the | |
6695 | -# --recheck option to rerun configure. | |
6696 | +# config.status only pays attention to the cache file if you give it | |
6697 | +# the --recheck option to rerun configure. | |
6698 | # | |
6699 | -EOF | |
6700 | +# `ac_cv_env_foo' variables (set or unset) will be overridden when | |
6701 | +# loading this file, other *unset* `ac_cv_foo' will be assigned the | |
6702 | +# following values. | |
6703 | + | |
6704 | +_ACEOF | |
6705 | + | |
6706 | # The following way of writing the cache mishandles newlines in values, | |
6707 | # but we know of no workaround that is simple, portable, and efficient. | |
6708 | # So, don't put newlines in cache variables' values. | |
6709 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
6710 | # and sets the high bit in the cache file unless we assign to the vars. | |
6711 | -(set) 2>&1 | | |
6712 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
6713 | - *ac_space=\ *) | |
6714 | - # `set' does not quote correctly, so add quotes (double-quote substitution | |
6715 | - # turns \\\\ into \\, and sed turns \\ into \). | |
6716 | - sed -n \ | |
6717 | - -e "s/'/'\\\\''/g" \ | |
6718 | - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
6719 | - ;; | |
6720 | - *) | |
6721 | - # `set' quotes correctly as required by POSIX, so do not add quotes. | |
6722 | - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
6723 | - ;; | |
6724 | - esac >> confcache | |
6725 | -if cmp -s $cache_file confcache; then | |
6726 | - : | |
6727 | -else | |
6728 | +{ | |
6729 | + (set) 2>&1 | | |
6730 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
6731 | + *ac_space=\ *) | |
6732 | + # `set' does not quote correctly, so add quotes (double-quote | |
6733 | + # substitution turns \\\\ into \\, and sed turns \\ into \). | |
6734 | + sed -n \ | |
6735 | + "s/'/'\\\\''/g; | |
6736 | + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
6737 | + ;; | |
6738 | + *) | |
6739 | + # `set' quotes correctly as required by POSIX, so do not add quotes. | |
6740 | + sed -n \ | |
6741 | + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | |
6742 | + ;; | |
6743 | + esac; | |
6744 | +} | | |
6745 | + sed ' | |
6746 | + t clear | |
6747 | + : clear | |
6748 | + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | |
6749 | + t end | |
6750 | + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
6751 | + : end' >>confcache | |
6752 | +if diff $cache_file confcache >/dev/null 2>&1; then :; else | |
6753 | if test -w $cache_file; then | |
6754 | - echo "updating cache $cache_file" | |
6755 | - cat confcache > $cache_file | |
6756 | + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" | |
6757 | + cat confcache >$cache_file | |
6758 | else | |
6759 | echo "not updating unwritable cache $cache_file" | |
6760 | fi | |
6761 | fi | |
6762 | rm -f confcache | |
6763 | ||
6764 | -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
6765 | - | |
6766 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
6767 | # Let make expand exec_prefix. | |
6768 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
6769 | ||
6770 | -# Any assignment to VPATH causes Sun make to only execute | |
6771 | -# the first set of double-colon rules, so remove it if not needed. | |
6772 | -# If there is a colon in the path, we need to keep it. | |
6773 | +# VPATH may cause trouble with some makes, so we remove $(srcdir), | |
6774 | +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | |
6775 | +# trailing colons and then remove the whole line if VPATH becomes empty | |
6776 | +# (actually we leave an empty line to preserve line numbers). | |
6777 | if test "x$srcdir" = x.; then | |
6778 | - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
6779 | + ac_vpsub='/^[ ]*VPATH[ ]*=/{ | |
6780 | +s/:*\$(srcdir):*/:/; | |
6781 | +s/:*\${srcdir}:*/:/; | |
6782 | +s/:*@srcdir@:*/:/; | |
6783 | +s/^\([^=]*=[ ]*\):*/\1/; | |
6784 | +s/:*$//; | |
6785 | +s/^[^=]*=[ ]*$//; | |
6786 | +}' | |
6787 | fi | |
6788 | ||
6789 | -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
6790 | - | |
6791 | DEFS=-DHAVE_CONFIG_H | |
6792 | ||
6793 | -# Without the "./", some shells look in PATH for config.status. | |
6794 | -: ${CONFIG_STATUS=./config.status} | |
6795 | +ac_libobjs= | |
6796 | +ac_ltlibobjs= | |
6797 | +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
6798 | + # 1. Remove the extension, and $U if already installed. | |
6799 | + ac_i=`echo "$ac_i" | | |
6800 | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` | |
6801 | + # 2. Add them. | |
6802 | + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | |
6803 | + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | |
6804 | +done | |
6805 | +LIBOBJS=$ac_libobjs | |
6806 | ||
6807 | -echo creating $CONFIG_STATUS | |
6808 | -rm -f $CONFIG_STATUS | |
6809 | -cat > $CONFIG_STATUS <<EOF | |
6810 | -#! /bin/sh | |
6811 | -# Generated automatically by configure. | |
6812 | +LTLIBOBJS=$ac_ltlibobjs | |
6813 | + | |
6814 | + | |
6815 | + | |
6816 | +: ${CONFIG_STATUS=./config.status} | |
6817 | +ac_clean_files_save=$ac_clean_files | |
6818 | +ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
6819 | +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | |
6820 | +echo "$as_me: creating $CONFIG_STATUS" >&6;} | |
6821 | +cat >$CONFIG_STATUS <<_ACEOF | |
6822 | +#! $SHELL | |
6823 | +# Generated by $as_me. | |
6824 | # Run this file to recreate the current configuration. | |
6825 | -# This directory was configured as follows, | |
6826 | -# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
6827 | -# | |
6828 | -# $0 $ac_configure_args | |
6829 | -# | |
6830 | # Compiler output produced by configure, useful for debugging | |
6831 | -# configure, is in ./config.log if it exists. | |
6832 | +# configure, is in config.log if it exists. | |
6833 | ||
6834 | -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
6835 | -for ac_option | |
6836 | +debug=false | |
6837 | +ac_cs_recheck=false | |
6838 | +ac_cs_silent=false | |
6839 | +SHELL=\${CONFIG_SHELL-$SHELL} | |
6840 | +_ACEOF | |
6841 | + | |
6842 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
6843 | +## --------------------- ## | |
6844 | +## M4sh Initialization. ## | |
6845 | +## --------------------- ## | |
6846 | + | |
6847 | +# Be Bourne compatible | |
6848 | +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | |
6849 | + emulate sh | |
6850 | + NULLCMD=: | |
6851 | + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | |
6852 | + # is contrary to our usage. Disable this feature. | |
6853 | + alias -g '${1+"$@"}'='"$@"' | |
6854 | +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | |
6855 | + set -o posix | |
6856 | +fi | |
6857 | +DUALCASE=1; export DUALCASE # for MKS sh | |
6858 | + | |
6859 | +# Support unset when possible. | |
6860 | +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | |
6861 | + as_unset=unset | |
6862 | +else | |
6863 | + as_unset=false | |
6864 | +fi | |
6865 | + | |
6866 | + | |
6867 | +# Work around bugs in pre-3.0 UWIN ksh. | |
6868 | +$as_unset ENV MAIL MAILPATH | |
6869 | +PS1='$ ' | |
6870 | +PS2='> ' | |
6871 | +PS4='+ ' | |
6872 | + | |
6873 | +# NLS nuisances. | |
6874 | +for as_var in \ | |
6875 | + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | |
6876 | + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | |
6877 | + LC_TELEPHONE LC_TIME | |
6878 | +do | |
6879 | + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then | |
6880 | + eval $as_var=C; export $as_var | |
6881 | + else | |
6882 | + $as_unset $as_var | |
6883 | + fi | |
6884 | +done | |
6885 | + | |
6886 | +# Required to use basename. | |
6887 | +if expr a : '\(a\)' >/dev/null 2>&1; then | |
6888 | + as_expr=expr | |
6889 | +else | |
6890 | + as_expr=false | |
6891 | +fi | |
6892 | + | |
6893 | +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then | |
6894 | + as_basename=basename | |
6895 | +else | |
6896 | + as_basename=false | |
6897 | +fi | |
6898 | + | |
6899 | + | |
6900 | +# Name of the executable. | |
6901 | +as_me=`$as_basename "$0" || | |
6902 | +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
6903 | + X"$0" : 'X\(//\)$' \| \ | |
6904 | + X"$0" : 'X\(/\)$' \| \ | |
6905 | + . : '\(.\)' 2>/dev/null || | |
6906 | +echo X/"$0" | | |
6907 | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | |
6908 | + /^X\/\(\/\/\)$/{ s//\1/; q; } | |
6909 | + /^X\/\(\/\).*/{ s//\1/; q; } | |
6910 | + s/.*/./; q'` | |
6911 | + | |
6912 | + | |
6913 | +# PATH needs CR, and LINENO needs CR and PATH. | |
6914 | +# Avoid depending upon Character Ranges. | |
6915 | +as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
6916 | +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
6917 | +as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
6918 | +as_cr_digits='0123456789' | |
6919 | +as_cr_alnum=$as_cr_Letters$as_cr_digits | |
6920 | + | |
6921 | +# The user is always right. | |
6922 | +if test "${PATH_SEPARATOR+set}" != set; then | |
6923 | + echo "#! /bin/sh" >conf$$.sh | |
6924 | + echo "exit 0" >>conf$$.sh | |
6925 | + chmod +x conf$$.sh | |
6926 | + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | |
6927 | + PATH_SEPARATOR=';' | |
6928 | + else | |
6929 | + PATH_SEPARATOR=: | |
6930 | + fi | |
6931 | + rm -f conf$$.sh | |
6932 | +fi | |
6933 | + | |
6934 | + | |
6935 | + as_lineno_1=$LINENO | |
6936 | + as_lineno_2=$LINENO | |
6937 | + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
6938 | + test "x$as_lineno_1" != "x$as_lineno_2" && | |
6939 | + test "x$as_lineno_3" = "x$as_lineno_2" || { | |
6940 | + # Find who we are. Look in the path if we contain no path at all | |
6941 | + # relative or not. | |
6942 | + case $0 in | |
6943 | + *[\\/]* ) as_myself=$0 ;; | |
6944 | + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6945 | +for as_dir in $PATH | |
6946 | +do | |
6947 | + IFS=$as_save_IFS | |
6948 | + test -z "$as_dir" && as_dir=. | |
6949 | + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | |
6950 | +done | |
6951 | + | |
6952 | + ;; | |
6953 | + esac | |
6954 | + # We did not find ourselves, most probably we were run as `sh COMMAND' | |
6955 | + # in which case we are not to be found in the path. | |
6956 | + if test "x$as_myself" = x; then | |
6957 | + as_myself=$0 | |
6958 | + fi | |
6959 | + if test ! -f "$as_myself"; then | |
6960 | + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | |
6961 | +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | |
6962 | + { (exit 1); exit 1; }; } | |
6963 | + fi | |
6964 | + case $CONFIG_SHELL in | |
6965 | + '') | |
6966 | + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
6967 | +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
6968 | +do | |
6969 | + IFS=$as_save_IFS | |
6970 | + test -z "$as_dir" && as_dir=. | |
6971 | + for as_base in sh bash ksh sh5; do | |
6972 | + case $as_dir in | |
6973 | + /*) | |
6974 | + if ("$as_dir/$as_base" -c ' | |
6975 | + as_lineno_1=$LINENO | |
6976 | + as_lineno_2=$LINENO | |
6977 | + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | |
6978 | + test "x$as_lineno_1" != "x$as_lineno_2" && | |
6979 | + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | |
6980 | + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | |
6981 | + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | |
6982 | + CONFIG_SHELL=$as_dir/$as_base | |
6983 | + export CONFIG_SHELL | |
6984 | + exec "$CONFIG_SHELL" "$0" ${1+"$@"} | |
6985 | + fi;; | |
6986 | + esac | |
6987 | + done | |
6988 | +done | |
6989 | +;; | |
6990 | + esac | |
6991 | + | |
6992 | + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | |
6993 | + # uniformly replaced by the line number. The first 'sed' inserts a | |
6994 | + # line-number line before each line; the second 'sed' does the real | |
6995 | + # work. The second script uses 'N' to pair each line-number line | |
6996 | + # with the numbered line, and appends trailing '-' during | |
6997 | + # substitution so that $LINENO is not a special case at line end. | |
6998 | + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | |
6999 | + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | |
7000 | + sed '=' <$as_myself | | |
7001 | + sed ' | |
7002 | + N | |
7003 | + s,$,-, | |
7004 | + : loop | |
7005 | + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | |
7006 | + t loop | |
7007 | + s,-$,, | |
7008 | + s,^['$as_cr_digits']*\n,, | |
7009 | + ' >$as_me.lineno && | |
7010 | + chmod +x $as_me.lineno || | |
7011 | + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | |
7012 | +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | |
7013 | + { (exit 1); exit 1; }; } | |
7014 | + | |
7015 | + # Don't try to exec as it changes $[0], causing all sort of problems | |
7016 | + # (the dirname of $[0] is not the place where we might find the | |
7017 | + # original and so on. Autoconf is especially sensible to this). | |
7018 | + . ./$as_me.lineno | |
7019 | + # Exit status is that of the last command. | |
7020 | + exit | |
7021 | +} | |
7022 | + | |
7023 | + | |
7024 | +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | |
7025 | + *c*,-n*) ECHO_N= ECHO_C=' | |
7026 | +' ECHO_T=' ' ;; | |
7027 | + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | |
7028 | + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | |
7029 | +esac | |
7030 | + | |
7031 | +if expr a : '\(a\)' >/dev/null 2>&1; then | |
7032 | + as_expr=expr | |
7033 | +else | |
7034 | + as_expr=false | |
7035 | +fi | |
7036 | + | |
7037 | +rm -f conf$$ conf$$.exe conf$$.file | |
7038 | +echo >conf$$.file | |
7039 | +if ln -s conf$$.file conf$$ 2>/dev/null; then | |
7040 | + # We could just check for DJGPP; but this test a) works b) is more generic | |
7041 | + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | |
7042 | + if test -f conf$$.exe; then | |
7043 | + # Don't use ln at all; we don't have any links | |
7044 | + as_ln_s='cp -p' | |
7045 | + else | |
7046 | + as_ln_s='ln -s' | |
7047 | + fi | |
7048 | +elif ln conf$$.file conf$$ 2>/dev/null; then | |
7049 | + as_ln_s=ln | |
7050 | +else | |
7051 | + as_ln_s='cp -p' | |
7052 | +fi | |
7053 | +rm -f conf$$ conf$$.exe conf$$.file | |
7054 | + | |
7055 | +if mkdir -p . 2>/dev/null; then | |
7056 | + as_mkdir_p=: | |
7057 | +else | |
7058 | + test -d ./-p && rmdir ./-p | |
7059 | + as_mkdir_p=false | |
7060 | +fi | |
7061 | + | |
7062 | +as_executable_p="test -f" | |
7063 | + | |
7064 | +# Sed expression to map a string onto a valid CPP name. | |
7065 | +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | |
7066 | + | |
7067 | +# Sed expression to map a string onto a valid variable name. | |
7068 | +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | |
7069 | + | |
7070 | + | |
7071 | +# IFS | |
7072 | +# We need space, tab and new line, in precisely that order. | |
7073 | +as_nl=' | |
7074 | +' | |
7075 | +IFS=" $as_nl" | |
7076 | + | |
7077 | +# CDPATH. | |
7078 | +$as_unset CDPATH | |
7079 | + | |
7080 | +exec 6>&1 | |
7081 | + | |
7082 | +# Open the log real soon, to keep \$[0] and so on meaningful, and to | |
7083 | +# report actual input values of CONFIG_FILES etc. instead of their | |
7084 | +# values after options handling. Logging --version etc. is OK. | |
7085 | +exec 5>>config.log | |
7086 | +{ | |
7087 | + echo | |
7088 | + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
7089 | +## Running $as_me. ## | |
7090 | +_ASBOX | |
7091 | +} >&5 | |
7092 | +cat >&5 <<_CSEOF | |
7093 | + | |
7094 | +This file was extended by $as_me, which was | |
7095 | +generated by GNU Autoconf 2.59. Invocation command line was | |
7096 | + | |
7097 | + CONFIG_FILES = $CONFIG_FILES | |
7098 | + CONFIG_HEADERS = $CONFIG_HEADERS | |
7099 | + CONFIG_LINKS = $CONFIG_LINKS | |
7100 | + CONFIG_COMMANDS = $CONFIG_COMMANDS | |
7101 | + $ $0 $@ | |
7102 | + | |
7103 | +_CSEOF | |
7104 | +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | |
7105 | +echo >&5 | |
7106 | +_ACEOF | |
7107 | + | |
7108 | +# Files that config.status was made for. | |
7109 | +if test -n "$ac_config_files"; then | |
7110 | + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | |
7111 | +fi | |
7112 | + | |
7113 | +if test -n "$ac_config_headers"; then | |
7114 | + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | |
7115 | +fi | |
7116 | + | |
7117 | +if test -n "$ac_config_links"; then | |
7118 | + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | |
7119 | +fi | |
7120 | + | |
7121 | +if test -n "$ac_config_commands"; then | |
7122 | + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | |
7123 | +fi | |
7124 | + | |
7125 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
7126 | + | |
7127 | +ac_cs_usage="\ | |
7128 | +\`$as_me' instantiates files from templates according to the | |
7129 | +current configuration. | |
7130 | + | |
7131 | +Usage: $0 [OPTIONS] [FILE]... | |
7132 | + | |
7133 | + -h, --help print this help, then exit | |
7134 | + -V, --version print version number, then exit | |
7135 | + -q, --quiet do not print progress messages | |
7136 | + -d, --debug don't remove temporary files | |
7137 | + --recheck update $as_me by reconfiguring in the same conditions | |
7138 | + --file=FILE[:TEMPLATE] | |
7139 | + instantiate the configuration file FILE | |
7140 | + --header=FILE[:TEMPLATE] | |
7141 | + instantiate the configuration header FILE | |
7142 | + | |
7143 | +Configuration files: | |
7144 | +$config_files | |
7145 | + | |
7146 | +Configuration headers: | |
7147 | +$config_headers | |
7148 | + | |
7149 | +Report bugs to <bug-autoconf@gnu.org>." | |
7150 | +_ACEOF | |
7151 | + | |
7152 | +cat >>$CONFIG_STATUS <<_ACEOF | |
7153 | +ac_cs_version="\\ | |
7154 | +config.status | |
7155 | +configured by $0, generated by GNU Autoconf 2.59, | |
7156 | + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" | |
7157 | + | |
7158 | +Copyright (C) 2003 Free Software Foundation, Inc. | |
7159 | +This config.status script is free software; the Free Software Foundation | |
7160 | +gives unlimited permission to copy, distribute and modify it." | |
7161 | +srcdir=$srcdir | |
7162 | +INSTALL="$INSTALL" | |
7163 | +_ACEOF | |
7164 | + | |
7165 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
7166 | +# If no file are specified by the user, then we need to provide default | |
7167 | +# value. By we need to know if files were specified by the user. | |
7168 | +ac_need_defaults=: | |
7169 | +while test $# != 0 | |
7170 | do | |
7171 | - case "\$ac_option" in | |
7172 | + case $1 in | |
7173 | + --*=*) | |
7174 | + ac_option=`expr "x$1" : 'x\([^=]*\)='` | |
7175 | + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | |
7176 | + ac_shift=: | |
7177 | + ;; | |
7178 | + -*) | |
7179 | + ac_option=$1 | |
7180 | + ac_optarg=$2 | |
7181 | + ac_shift=shift | |
7182 | + ;; | |
7183 | + *) # This is not an option, so the user has probably given explicit | |
7184 | + # arguments. | |
7185 | + ac_option=$1 | |
7186 | + ac_need_defaults=false;; | |
7187 | + esac | |
7188 | + | |
7189 | + case $ac_option in | |
7190 | + # Handling of the options. | |
7191 | +_ACEOF | |
7192 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
7193 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
7194 | - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
7195 | - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
7196 | - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
7197 | - echo "$CONFIG_STATUS generated by autoconf version 2.13" | |
7198 | - exit 0 ;; | |
7199 | - -help | --help | --hel | --he | --h) | |
7200 | - echo "\$ac_cs_usage"; exit 0 ;; | |
7201 | - *) echo "\$ac_cs_usage"; exit 1 ;; | |
7202 | + ac_cs_recheck=: ;; | |
7203 | + --version | --vers* | -V ) | |
7204 | + echo "$ac_cs_version"; exit 0 ;; | |
7205 | + --he | --h) | |
7206 | + # Conflict between --help and --header | |
7207 | + { { echo "$as_me:$LINENO: error: ambiguous option: $1 | |
7208 | +Try \`$0 --help' for more information." >&5 | |
7209 | +echo "$as_me: error: ambiguous option: $1 | |
7210 | +Try \`$0 --help' for more information." >&2;} | |
7211 | + { (exit 1); exit 1; }; };; | |
7212 | + --help | --hel | -h ) | |
7213 | + echo "$ac_cs_usage"; exit 0 ;; | |
7214 | + --debug | --d* | -d ) | |
7215 | + debug=: ;; | |
7216 | + --file | --fil | --fi | --f ) | |
7217 | + $ac_shift | |
7218 | + CONFIG_FILES="$CONFIG_FILES $ac_optarg" | |
7219 | + ac_need_defaults=false;; | |
7220 | + --header | --heade | --head | --hea ) | |
7221 | + $ac_shift | |
7222 | + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | |
7223 | + ac_need_defaults=false;; | |
7224 | + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
7225 | + | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
7226 | + ac_cs_silent=: ;; | |
7227 | + | |
7228 | + # This is an error. | |
7229 | + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | |
7230 | +Try \`$0 --help' for more information." >&5 | |
7231 | +echo "$as_me: error: unrecognized option: $1 | |
7232 | +Try \`$0 --help' for more information." >&2;} | |
7233 | + { (exit 1); exit 1; }; } ;; | |
7234 | + | |
7235 | + *) ac_config_targets="$ac_config_targets $1" ;; | |
7236 | + | |
7237 | esac | |
7238 | + shift | |
7239 | done | |
7240 | ||
7241 | -ac_given_srcdir=$srcdir | |
7242 | -ac_given_INSTALL="$INSTALL" | |
7243 | +ac_configure_extra_args= | |
7244 | ||
7245 | -trap 'rm -fr `echo "config.mk utils/Makefile support/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 | |
7246 | -EOF | |
7247 | -cat >> $CONFIG_STATUS <<EOF | |
7248 | - | |
7249 | -# Protect against being on the right side of a sed subst in config.status. | |
7250 | -sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
7251 | - s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
7252 | -$ac_vpsub | |
7253 | -$extrasub | |
7254 | -s%@SHELL@%$SHELL%g | |
7255 | -s%@CFLAGS@%$CFLAGS%g | |
7256 | -s%@CPPFLAGS@%$CPPFLAGS%g | |
7257 | -s%@CXXFLAGS@%$CXXFLAGS%g | |
7258 | -s%@FFLAGS@%$FFLAGS%g | |
7259 | -s%@DEFS@%$DEFS%g | |
7260 | -s%@LDFLAGS@%$LDFLAGS%g | |
7261 | -s%@LIBS@%$LIBS%g | |
7262 | -s%@exec_prefix@%$exec_prefix%g | |
7263 | -s%@prefix@%$prefix%g | |
7264 | -s%@program_transform_name@%$program_transform_name%g | |
7265 | -s%@bindir@%$bindir%g | |
7266 | -s%@sbindir@%$sbindir%g | |
7267 | -s%@libexecdir@%$libexecdir%g | |
7268 | -s%@datadir@%$datadir%g | |
7269 | -s%@sysconfdir@%$sysconfdir%g | |
7270 | -s%@sharedstatedir@%$sharedstatedir%g | |
7271 | -s%@localstatedir@%$localstatedir%g | |
7272 | -s%@libdir@%$libdir%g | |
7273 | -s%@includedir@%$includedir%g | |
7274 | -s%@oldincludedir@%$oldincludedir%g | |
7275 | -s%@infodir@%$infodir%g | |
7276 | -s%@mandir@%$mandir%g | |
7277 | -s%@VERSION@%$VERSION%g | |
7278 | -s%@RELEASE@%$RELEASE%g | |
7279 | -s%@statedir@%$statedir%g | |
7280 | -s%@statduser@%$statduser%g | |
7281 | -s%@enable_nfsv3@%$enable_nfsv3%g | |
7282 | -s%@IDMAPD@%$IDMAPD%g | |
7283 | -s%@enable_nfsv4@%$enable_nfsv4%g | |
7284 | -s%@GSSD@%$GSSD%g | |
7285 | -s%@SVCGSSD@%$SVCGSSD%g | |
7286 | -s%@enable_gss@%$enable_gss%g | |
7287 | -s%@kprefix@%$kprefix%g | |
7288 | -s%@secure_statd@%$secure_statd%g | |
7289 | -s%@RQUOTAD@%$RQUOTAD%g | |
7290 | -s%@CC@%$CC%g | |
7291 | -s%@CPP@%$CPP%g | |
7292 | -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
7293 | -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
7294 | -s%@INSTALL_DATA@%$INSTALL_DATA%g | |
7295 | -s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g | |
7296 | -s%@host@%$host%g | |
7297 | -s%@host_alias@%$host_alias%g | |
7298 | -s%@host_cpu@%$host_cpu%g | |
7299 | -s%@host_vendor@%$host_vendor%g | |
7300 | -s%@host_os@%$host_os%g | |
7301 | -s%@build@%$build%g | |
7302 | -s%@build_alias@%$build_alias%g | |
7303 | -s%@build_cpu@%$build_cpu%g | |
7304 | -s%@build_vendor@%$build_vendor%g | |
7305 | -s%@build_os@%$build_os%g | |
7306 | -s%@RANLIB@%$RANLIB%g | |
7307 | -s%@AR@%$AR%g | |
7308 | -s%@LD@%$LD%g | |
7309 | -s%@LIBSOCKET@%$LIBSOCKET%g | |
7310 | -s%@LIBNSL@%$LIBNSL%g | |
7311 | -s%@LIBCRYPT@%$LIBCRYPT%g | |
7312 | -s%@LIBBSD@%$LIBBSD%g | |
7313 | -s%@LIBWRAP@%$LIBWRAP%g | |
7314 | -s%@KRBDIR@%$KRBDIR%g | |
7315 | -s%@KRBLIB@%$KRBLIB%g | |
7316 | -s%@K5VERS@%$K5VERS%g | |
7317 | +if $ac_cs_silent; then | |
7318 | + exec 6>/dev/null | |
7319 | + ac_configure_extra_args="$ac_configure_extra_args --silent" | |
7320 | +fi | |
7321 | + | |
7322 | +_ACEOF | |
7323 | +cat >>$CONFIG_STATUS <<_ACEOF | |
7324 | +if \$ac_cs_recheck; then | |
7325 | + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | |
7326 | + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
7327 | +fi | |
7328 | + | |
7329 | +_ACEOF | |
7330 | + | |
7331 | + | |
7332 | + | |
7333 | + | |
7334 | + | |
7335 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
7336 | +for ac_config_target in $ac_config_targets | |
7337 | +do | |
7338 | + case "$ac_config_target" in | |
7339 | + # Handling of arguments. | |
7340 | + "config.mk" ) CONFIG_FILES="$CONFIG_FILES config.mk" ;; | |
7341 | + "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;; | |
7342 | + "support/include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS support/include/config.h" ;; | |
7343 | + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | |
7344 | +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | |
7345 | + { (exit 1); exit 1; }; };; | |
7346 | + esac | |
7347 | +done | |
7348 | + | |
7349 | +# If the user did not use the arguments to specify the items to instantiate, | |
7350 | +# then the envvar interface is used. Set only those that are not. | |
7351 | +# We use the long form for the default assignment because of an extremely | |
7352 | +# bizarre bug on SunOS 4.1.3. | |
7353 | +if $ac_need_defaults; then | |
7354 | + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | |
7355 | + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | |
7356 | +fi | |
7357 | + | |
7358 | +# Have a temporary directory for convenience. Make it in the build tree | |
7359 | +# simply because there is no reason to put it here, and in addition, | |
7360 | +# creating and moving files from /tmp can sometimes cause problems. | |
7361 | +# Create a temporary directory, and hook for its removal unless debugging. | |
7362 | +$debug || | |
7363 | +{ | |
7364 | + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | |
7365 | + trap '{ (exit 1); exit 1; }' 1 2 13 15 | |
7366 | +} | |
7367 | + | |
7368 | +# Create a (secure) tmp directory for tmp files. | |
7369 | + | |
7370 | +{ | |
7371 | + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | |
7372 | + test -n "$tmp" && test -d "$tmp" | |
7373 | +} || | |
7374 | +{ | |
7375 | + tmp=./confstat$$-$RANDOM | |
7376 | + (umask 077 && mkdir $tmp) | |
7377 | +} || | |
7378 | +{ | |
7379 | + echo "$me: cannot create a temporary directory in ." >&2 | |
7380 | + { (exit 1); exit 1; } | |
7381 | +} | |
7382 | + | |
7383 | +_ACEOF | |
7384 | + | |
7385 | +cat >>$CONFIG_STATUS <<_ACEOF | |
7386 | ||
7387 | +# | |
7388 | +# CONFIG_FILES section. | |
7389 | +# | |
7390 | + | |
7391 | +# No need to generate the scripts if there are no CONFIG_FILES. | |
7392 | +# This happens for instance when ./config.status config.h | |
7393 | +if test -n "\$CONFIG_FILES"; then | |
7394 | + # Protect against being on the right side of a sed subst in config.status. | |
7395 | + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | |
7396 | + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | |
7397 | +s,@SHELL@,$SHELL,;t t | |
7398 | +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | |
7399 | +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | |
7400 | +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | |
7401 | +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | |
7402 | +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | |
7403 | +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | |
7404 | +s,@exec_prefix@,$exec_prefix,;t t | |
7405 | +s,@prefix@,$prefix,;t t | |
7406 | +s,@program_transform_name@,$program_transform_name,;t t | |
7407 | +s,@bindir@,$bindir,;t t | |
7408 | +s,@sbindir@,$sbindir,;t t | |
7409 | +s,@libexecdir@,$libexecdir,;t t | |
7410 | +s,@datadir@,$datadir,;t t | |
7411 | +s,@sysconfdir@,$sysconfdir,;t t | |
7412 | +s,@sharedstatedir@,$sharedstatedir,;t t | |
7413 | +s,@localstatedir@,$localstatedir,;t t | |
7414 | +s,@libdir@,$libdir,;t t | |
7415 | +s,@includedir@,$includedir,;t t | |
7416 | +s,@oldincludedir@,$oldincludedir,;t t | |
7417 | +s,@infodir@,$infodir,;t t | |
7418 | +s,@mandir@,$mandir,;t t | |
7419 | +s,@build_alias@,$build_alias,;t t | |
7420 | +s,@host_alias@,$host_alias,;t t | |
7421 | +s,@target_alias@,$target_alias,;t t | |
7422 | +s,@DEFS@,$DEFS,;t t | |
7423 | +s,@ECHO_C@,$ECHO_C,;t t | |
7424 | +s,@ECHO_N@,$ECHO_N,;t t | |
7425 | +s,@ECHO_T@,$ECHO_T,;t t | |
7426 | +s,@LIBS@,$LIBS,;t t | |
7427 | +s,@VERSION@,$VERSION,;t t | |
7428 | +s,@RELEASE@,$RELEASE,;t t | |
7429 | +s,@statedir@,$statedir,;t t | |
7430 | +s,@statduser@,$statduser,;t t | |
7431 | +s,@enable_nfsv3@,$enable_nfsv3,;t t | |
7432 | +s,@IDMAPD@,$IDMAPD,;t t | |
7433 | +s,@enable_nfsv4@,$enable_nfsv4,;t t | |
7434 | +s,@GSSD@,$GSSD,;t t | |
7435 | +s,@SVCGSSD@,$SVCGSSD,;t t | |
7436 | +s,@enable_gss@,$enable_gss,;t t | |
7437 | +s,@kprefix@,$kprefix,;t t | |
7438 | +s,@secure_statd@,$secure_statd,;t t | |
7439 | +s,@RQUOTAD@,$RQUOTAD,;t t | |
7440 | +s,@CC@,$CC,;t t | |
7441 | +s,@CFLAGS@,$CFLAGS,;t t | |
7442 | +s,@LDFLAGS@,$LDFLAGS,;t t | |
7443 | +s,@CPPFLAGS@,$CPPFLAGS,;t t | |
7444 | +s,@ac_ct_CC@,$ac_ct_CC,;t t | |
7445 | +s,@EXEEXT@,$EXEEXT,;t t | |
7446 | +s,@OBJEXT@,$OBJEXT,;t t | |
7447 | +s,@CPP@,$CPP,;t t | |
7448 | +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | |
7449 | +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t | |
7450 | +s,@INSTALL_DATA@,$INSTALL_DATA,;t t | |
7451 | +s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t | |
7452 | +s,@RANLIB@,$RANLIB,;t t | |
7453 | +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | |
7454 | +s,@AR@,$AR,;t t | |
7455 | +s,@ac_ct_AR@,$ac_ct_AR,;t t | |
7456 | +s,@LD@,$LD,;t t | |
7457 | +s,@ac_ct_LD@,$ac_ct_LD,;t t | |
7458 | +s,@EGREP@,$EGREP,;t t | |
7459 | +s,@LIBSOCKET@,$LIBSOCKET,;t t | |
7460 | +s,@LIBNSL@,$LIBNSL,;t t | |
7461 | +s,@LIBCRYPT@,$LIBCRYPT,;t t | |
7462 | +s,@LIBBSD@,$LIBBSD,;t t | |
7463 | +s,@LIBWRAP@,$LIBWRAP,;t t | |
7464 | +s,@KRBDIR@,$KRBDIR,;t t | |
7465 | +s,@KRBLIB@,$KRBLIB,;t t | |
7466 | +s,@KRBINC@,$KRBINC,;t t | |
7467 | +s,@K5VERS@,$K5VERS,;t t | |
7468 | +s,@CXXFLAGS@,$CXXFLAGS,;t t | |
7469 | +s,@LIBOBJS@,$LIBOBJS,;t t | |
7470 | +s,@LTLIBOBJS@,$LTLIBOBJS,;t t | |
7471 | CEOF | |
7472 | -EOF | |
7473 | ||
7474 | -cat >> $CONFIG_STATUS <<\EOF | |
7475 | +_ACEOF | |
7476 | ||
7477 | -# Split the substitutions into bite-sized pieces for seds with | |
7478 | -# small command number limits, like on Digital OSF/1 and HP-UX. | |
7479 | -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
7480 | -ac_file=1 # Number of current file. | |
7481 | -ac_beg=1 # First line for current file. | |
7482 | -ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
7483 | -ac_more_lines=: | |
7484 | -ac_sed_cmds="" | |
7485 | -while $ac_more_lines; do | |
7486 | - if test $ac_beg -gt 1; then | |
7487 | - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
7488 | - else | |
7489 | - sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
7490 | - fi | |
7491 | - if test ! -s conftest.s$ac_file; then | |
7492 | - ac_more_lines=false | |
7493 | - rm -f conftest.s$ac_file | |
7494 | - else | |
7495 | - if test -z "$ac_sed_cmds"; then | |
7496 | - ac_sed_cmds="sed -f conftest.s$ac_file" | |
7497 | + cat >>$CONFIG_STATUS <<\_ACEOF | |
7498 | + # Split the substitutions into bite-sized pieces for seds with | |
7499 | + # small command number limits, like on Digital OSF/1 and HP-UX. | |
7500 | + ac_max_sed_lines=48 | |
7501 | + ac_sed_frag=1 # Number of current file. | |
7502 | + ac_beg=1 # First line for current file. | |
7503 | + ac_end=$ac_max_sed_lines # Line after last line for current file. | |
7504 | + ac_more_lines=: | |
7505 | + ac_sed_cmds= | |
7506 | + while $ac_more_lines; do | |
7507 | + if test $ac_beg -gt 1; then | |
7508 | + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
7509 | else | |
7510 | - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
7511 | + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | |
7512 | fi | |
7513 | - ac_file=`expr $ac_file + 1` | |
7514 | - ac_beg=$ac_end | |
7515 | - ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
7516 | + if test ! -s $tmp/subs.frag; then | |
7517 | + ac_more_lines=false | |
7518 | + else | |
7519 | + # The purpose of the label and of the branching condition is to | |
7520 | + # speed up the sed processing (if there are no `@' at all, there | |
7521 | + # is no need to browse any of the substitutions). | |
7522 | + # These are the two extra sed commands mentioned above. | |
7523 | + (echo ':t | |
7524 | + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | |
7525 | + if test -z "$ac_sed_cmds"; then | |
7526 | + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" | |
7527 | + else | |
7528 | + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" | |
7529 | + fi | |
7530 | + ac_sed_frag=`expr $ac_sed_frag + 1` | |
7531 | + ac_beg=$ac_end | |
7532 | + ac_end=`expr $ac_end + $ac_max_sed_lines` | |
7533 | + fi | |
7534 | + done | |
7535 | + if test -z "$ac_sed_cmds"; then | |
7536 | + ac_sed_cmds=cat | |
7537 | fi | |
7538 | -done | |
7539 | -if test -z "$ac_sed_cmds"; then | |
7540 | - ac_sed_cmds=cat | |
7541 | -fi | |
7542 | -EOF | |
7543 | +fi # test -n "$CONFIG_FILES" | |
7544 | ||
7545 | -cat >> $CONFIG_STATUS <<EOF | |
7546 | - | |
7547 | -CONFIG_FILES=\${CONFIG_FILES-"config.mk utils/Makefile"} | |
7548 | -EOF | |
7549 | -cat >> $CONFIG_STATUS <<\EOF | |
7550 | -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
7551 | +_ACEOF | |
7552 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
7553 | +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | |
7554 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
7555 | - case "$ac_file" in | |
7556 | - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
7557 | - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
7558 | - *) ac_file_in="${ac_file}.in" ;; | |
7559 | + case $ac_file in | |
7560 | + - | *:- | *:-:* ) # input from stdin | |
7561 | + cat >$tmp/stdin | |
7562 | + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
7563 | + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
7564 | + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
7565 | + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
7566 | + * ) ac_file_in=$ac_file.in ;; | |
7567 | esac | |
7568 | ||
7569 | - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
7570 | - | |
7571 | - # Remove last slash and all that follows it. Not all systems have dirname. | |
7572 | - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
7573 | - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
7574 | - # The file is in a subdirectory. | |
7575 | - test ! -d "$ac_dir" && mkdir "$ac_dir" | |
7576 | - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
7577 | - # A "../" for each directory in $ac_dir_suffix. | |
7578 | - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
7579 | - else | |
7580 | - ac_dir_suffix= ac_dots= | |
7581 | - fi | |
7582 | - | |
7583 | - case "$ac_given_srcdir" in | |
7584 | - .) srcdir=. | |
7585 | - if test -z "$ac_dots"; then top_srcdir=. | |
7586 | - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
7587 | - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
7588 | + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. | |
7589 | + ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
7590 | +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
7591 | + X"$ac_file" : 'X\(//\)[^/]' \| \ | |
7592 | + X"$ac_file" : 'X\(//\)$' \| \ | |
7593 | + X"$ac_file" : 'X\(/\)' \| \ | |
7594 | + . : '\(.\)' 2>/dev/null || | |
7595 | +echo X"$ac_file" | | |
7596 | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
7597 | + /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
7598 | + /^X\(\/\/\)$/{ s//\1/; q; } | |
7599 | + /^X\(\/\).*/{ s//\1/; q; } | |
7600 | + s/.*/./; q'` | |
7601 | + { if $as_mkdir_p; then | |
7602 | + mkdir -p "$ac_dir" | |
7603 | + else | |
7604 | + as_dir="$ac_dir" | |
7605 | + as_dirs= | |
7606 | + while test ! -d "$as_dir"; do | |
7607 | + as_dirs="$as_dir $as_dirs" | |
7608 | + as_dir=`(dirname "$as_dir") 2>/dev/null || | |
7609 | +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
7610 | + X"$as_dir" : 'X\(//\)[^/]' \| \ | |
7611 | + X"$as_dir" : 'X\(//\)$' \| \ | |
7612 | + X"$as_dir" : 'X\(/\)' \| \ | |
7613 | + . : '\(.\)' 2>/dev/null || | |
7614 | +echo X"$as_dir" | | |
7615 | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
7616 | + /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
7617 | + /^X\(\/\/\)$/{ s//\1/; q; } | |
7618 | + /^X\(\/\).*/{ s//\1/; q; } | |
7619 | + s/.*/./; q'` | |
7620 | + done | |
7621 | + test ! -n "$as_dirs" || mkdir $as_dirs | |
7622 | + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
7623 | +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
7624 | + { (exit 1); exit 1; }; }; } | |
7625 | + | |
7626 | + ac_builddir=. | |
7627 | + | |
7628 | +if test "$ac_dir" != .; then | |
7629 | + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | |
7630 | + # A "../" for each directory in $ac_dir_suffix. | |
7631 | + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | |
7632 | +else | |
7633 | + ac_dir_suffix= ac_top_builddir= | |
7634 | +fi | |
7635 | + | |
7636 | +case $srcdir in | |
7637 | + .) # No --srcdir option. We are building in place. | |
7638 | + ac_srcdir=. | |
7639 | + if test -z "$ac_top_builddir"; then | |
7640 | + ac_top_srcdir=. | |
7641 | + else | |
7642 | + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | |
7643 | + fi ;; | |
7644 | + [\\/]* | ?:[\\/]* ) # Absolute path. | |
7645 | + ac_srcdir=$srcdir$ac_dir_suffix; | |
7646 | + ac_top_srcdir=$srcdir ;; | |
7647 | *) # Relative path. | |
7648 | - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
7649 | - top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
7650 | - esac | |
7651 | + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | |
7652 | + ac_top_srcdir=$ac_top_builddir$srcdir ;; | |
7653 | +esac | |
7654 | ||
7655 | - case "$ac_given_INSTALL" in | |
7656 | - [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
7657 | - *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
7658 | - esac | |
7659 | +# Do not use `cd foo && pwd` to compute absolute paths, because | |
7660 | +# the directories may not exist. | |
7661 | +case `pwd` in | |
7662 | +.) ac_abs_builddir="$ac_dir";; | |
7663 | +*) | |
7664 | + case "$ac_dir" in | |
7665 | + .) ac_abs_builddir=`pwd`;; | |
7666 | + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | |
7667 | + *) ac_abs_builddir=`pwd`/"$ac_dir";; | |
7668 | + esac;; | |
7669 | +esac | |
7670 | +case $ac_abs_builddir in | |
7671 | +.) ac_abs_top_builddir=${ac_top_builddir}.;; | |
7672 | +*) | |
7673 | + case ${ac_top_builddir}. in | |
7674 | + .) ac_abs_top_builddir=$ac_abs_builddir;; | |
7675 | + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | |
7676 | + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | |
7677 | + esac;; | |
7678 | +esac | |
7679 | +case $ac_abs_builddir in | |
7680 | +.) ac_abs_srcdir=$ac_srcdir;; | |
7681 | +*) | |
7682 | + case $ac_srcdir in | |
7683 | + .) ac_abs_srcdir=$ac_abs_builddir;; | |
7684 | + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | |
7685 | + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | |
7686 | + esac;; | |
7687 | +esac | |
7688 | +case $ac_abs_builddir in | |
7689 | +.) ac_abs_top_srcdir=$ac_top_srcdir;; | |
7690 | +*) | |
7691 | + case $ac_top_srcdir in | |
7692 | + .) ac_abs_top_srcdir=$ac_abs_builddir;; | |
7693 | + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | |
7694 | + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | |
7695 | + esac;; | |
7696 | +esac | |
7697 | ||
7698 | - echo creating "$ac_file" | |
7699 | - rm -f "$ac_file" | |
7700 | - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
7701 | - case "$ac_file" in | |
7702 | - *Makefile*) ac_comsub="1i\\ | |
7703 | -# $configure_input" ;; | |
7704 | - *) ac_comsub= ;; | |
7705 | + | |
7706 | + case $INSTALL in | |
7707 | + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
7708 | + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; | |
7709 | esac | |
7710 | ||
7711 | - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
7712 | - sed -e "$ac_comsub | |
7713 | -s%@configure_input@%$configure_input%g | |
7714 | -s%@srcdir@%$srcdir%g | |
7715 | -s%@top_srcdir@%$top_srcdir%g | |
7716 | -s%@INSTALL@%$INSTALL%g | |
7717 | -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
7718 | -fi; done | |
7719 | -rm -f conftest.s* | |
7720 | + if test x"$ac_file" != x-; then | |
7721 | + { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
7722 | +echo "$as_me: creating $ac_file" >&6;} | |
7723 | + rm -f "$ac_file" | |
7724 | + fi | |
7725 | + # Let's still pretend it is `configure' which instantiates (i.e., don't | |
7726 | + # use $as_me), people would be surprised to read: | |
7727 | + # /* config.h. Generated by config.status. */ | |
7728 | + if test x"$ac_file" = x-; then | |
7729 | + configure_input= | |
7730 | + else | |
7731 | + configure_input="$ac_file. " | |
7732 | + fi | |
7733 | + configure_input=$configure_input"Generated from `echo $ac_file_in | | |
7734 | + sed 's,.*/,,'` by configure." | |
7735 | + | |
7736 | + # First look for the input files in the build tree, otherwise in the | |
7737 | + # src tree. | |
7738 | + ac_file_inputs=`IFS=: | |
7739 | + for f in $ac_file_in; do | |
7740 | + case $f in | |
7741 | + -) echo $tmp/stdin ;; | |
7742 | + [\\/$]*) | |
7743 | + # Absolute (can't be DOS-style, as IFS=:) | |
7744 | + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
7745 | +echo "$as_me: error: cannot find input file: $f" >&2;} | |
7746 | + { (exit 1); exit 1; }; } | |
7747 | + echo "$f";; | |
7748 | + *) # Relative | |
7749 | + if test -f "$f"; then | |
7750 | + # Build tree | |
7751 | + echo "$f" | |
7752 | + elif test -f "$srcdir/$f"; then | |
7753 | + # Source tree | |
7754 | + echo "$srcdir/$f" | |
7755 | + else | |
7756 | + # /dev/null tree | |
7757 | + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
7758 | +echo "$as_me: error: cannot find input file: $f" >&2;} | |
7759 | + { (exit 1); exit 1; }; } | |
7760 | + fi;; | |
7761 | + esac | |
7762 | + done` || { (exit 1); exit 1; } | |
7763 | +_ACEOF | |
7764 | +cat >>$CONFIG_STATUS <<_ACEOF | |
7765 | + sed "$ac_vpsub | |
7766 | +$extrasub | |
7767 | +_ACEOF | |
7768 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
7769 | +:t | |
7770 | +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
7771 | +s,@configure_input@,$configure_input,;t t | |
7772 | +s,@srcdir@,$ac_srcdir,;t t | |
7773 | +s,@abs_srcdir@,$ac_abs_srcdir,;t t | |
7774 | +s,@top_srcdir@,$ac_top_srcdir,;t t | |
7775 | +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | |
7776 | +s,@builddir@,$ac_builddir,;t t | |
7777 | +s,@abs_builddir@,$ac_abs_builddir,;t t | |
7778 | +s,@top_builddir@,$ac_top_builddir,;t t | |
7779 | +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | |
7780 | +s,@INSTALL@,$ac_INSTALL,;t t | |
7781 | +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | |
7782 | + rm -f $tmp/stdin | |
7783 | + if test x"$ac_file" != x-; then | |
7784 | + mv $tmp/out $ac_file | |
7785 | + else | |
7786 | + cat $tmp/out | |
7787 | + rm -f $tmp/out | |
7788 | + fi | |
7789 | + | |
7790 | +done | |
7791 | +_ACEOF | |
7792 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
7793 | + | |
7794 | +# | |
7795 | +# CONFIG_HEADER section. | |
7796 | +# | |
7797 | ||
7798 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
7799 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
7800 | # | |
7801 | # ac_d sets the value in "#define NAME VALUE" lines. | |
7802 | -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
7803 | -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
7804 | -ac_dC='\3' | |
7805 | -ac_dD='%g' | |
7806 | -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
7807 | -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
7808 | -ac_uB='\([ ]\)%\1#\2define\3' | |
7809 | +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
7810 | +ac_dB='[ ].*$,\1#\2' | |
7811 | +ac_dC=' ' | |
7812 | +ac_dD=',;t' | |
7813 | +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
7814 | +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
7815 | +ac_uB='$,\1#\2define\3' | |
7816 | ac_uC=' ' | |
7817 | -ac_uD='\4%g' | |
7818 | -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
7819 | -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
7820 | -ac_eB='$%\1#\2define\3' | |
7821 | -ac_eC=' ' | |
7822 | -ac_eD='%g' | |
7823 | - | |
7824 | -if test "${CONFIG_HEADERS+set}" != set; then | |
7825 | -EOF | |
7826 | -cat >> $CONFIG_STATUS <<EOF | |
7827 | - CONFIG_HEADERS="support/include/config.h" | |
7828 | -EOF | |
7829 | -cat >> $CONFIG_STATUS <<\EOF | |
7830 | -fi | |
7831 | -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
7832 | +ac_uD=',;t' | |
7833 | + | |
7834 | +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | |
7835 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
7836 | - case "$ac_file" in | |
7837 | - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
7838 | - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
7839 | - *) ac_file_in="${ac_file}.in" ;; | |
7840 | + case $ac_file in | |
7841 | + - | *:- | *:-:* ) # input from stdin | |
7842 | + cat >$tmp/stdin | |
7843 | + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
7844 | + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
7845 | + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | |
7846 | + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | |
7847 | + * ) ac_file_in=$ac_file.in ;; | |
7848 | esac | |
7849 | ||
7850 | - echo creating $ac_file | |
7851 | + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 | |
7852 | +echo "$as_me: creating $ac_file" >&6;} | |
7853 | ||
7854 | - rm -f conftest.frag conftest.in conftest.out | |
7855 | - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
7856 | - cat $ac_file_inputs > conftest.in | |
7857 | - | |
7858 | -EOF | |
7859 | - | |
7860 | -# Transform confdefs.h into a sed script conftest.vals that substitutes | |
7861 | -# the proper values into config.h.in to produce config.h. And first: | |
7862 | -# Protect against being on the right side of a sed subst in config.status. | |
7863 | -# Protect against being in an unquoted here document in config.status. | |
7864 | -rm -f conftest.vals | |
7865 | -cat > conftest.hdr <<\EOF | |
7866 | -s/[\\&%]/\\&/g | |
7867 | -s%[\\$`]%\\&%g | |
7868 | -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
7869 | -s%ac_d%ac_u%gp | |
7870 | -s%ac_u%ac_e%gp | |
7871 | -EOF | |
7872 | -sed -n -f conftest.hdr confdefs.h > conftest.vals | |
7873 | -rm -f conftest.hdr | |
7874 | + # First look for the input files in the build tree, otherwise in the | |
7875 | + # src tree. | |
7876 | + ac_file_inputs=`IFS=: | |
7877 | + for f in $ac_file_in; do | |
7878 | + case $f in | |
7879 | + -) echo $tmp/stdin ;; | |
7880 | + [\\/$]*) | |
7881 | + # Absolute (can't be DOS-style, as IFS=:) | |
7882 | + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
7883 | +echo "$as_me: error: cannot find input file: $f" >&2;} | |
7884 | + { (exit 1); exit 1; }; } | |
7885 | + # Do quote $f, to prevent DOS paths from being IFS'd. | |
7886 | + echo "$f";; | |
7887 | + *) # Relative | |
7888 | + if test -f "$f"; then | |
7889 | + # Build tree | |
7890 | + echo "$f" | |
7891 | + elif test -f "$srcdir/$f"; then | |
7892 | + # Source tree | |
7893 | + echo "$srcdir/$f" | |
7894 | + else | |
7895 | + # /dev/null tree | |
7896 | + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | |
7897 | +echo "$as_me: error: cannot find input file: $f" >&2;} | |
7898 | + { (exit 1); exit 1; }; } | |
7899 | + fi;; | |
7900 | + esac | |
7901 | + done` || { (exit 1); exit 1; } | |
7902 | + # Remove the trailing spaces. | |
7903 | + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in | |
7904 | + | |
7905 | +_ACEOF | |
7906 | + | |
7907 | +# Transform confdefs.h into two sed scripts, `conftest.defines' and | |
7908 | +# `conftest.undefs', that substitutes the proper values into | |
7909 | +# config.h.in to produce config.h. The first handles `#define' | |
7910 | +# templates, and the second `#undef' templates. | |
7911 | +# And first: Protect against being on the right side of a sed subst in | |
7912 | +# config.status. Protect against being in an unquoted here document | |
7913 | +# in config.status. | |
7914 | +rm -f conftest.defines conftest.undefs | |
7915 | +# Using a here document instead of a string reduces the quoting nightmare. | |
7916 | +# Putting comments in sed scripts is not portable. | |
7917 | +# | |
7918 | +# `end' is used to avoid that the second main sed command (meant for | |
7919 | +# 0-ary CPP macros) applies to n-ary macro definitions. | |
7920 | +# See the Autoconf documentation for `clear'. | |
7921 | +cat >confdef2sed.sed <<\_ACEOF | |
7922 | +s/[\\&,]/\\&/g | |
7923 | +s,[\\$`],\\&,g | |
7924 | +t clear | |
7925 | +: clear | |
7926 | +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp | |
7927 | +t end | |
7928 | +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp | |
7929 | +: end | |
7930 | +_ACEOF | |
7931 | +# If some macros were called several times there might be several times | |
7932 | +# the same #defines, which is useless. Nevertheless, we may not want to | |
7933 | +# sort them, since we want the *last* AC-DEFINE to be honored. | |
7934 | +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | |
7935 | +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | |
7936 | +rm -f confdef2sed.sed | |
7937 | ||
7938 | # This sed command replaces #undef with comments. This is necessary, for | |
7939 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
7940 | # on some systems where configure will not decide to define it. | |
7941 | -cat >> conftest.vals <<\EOF | |
7942 | -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
7943 | -EOF | |
7944 | - | |
7945 | -# Break up conftest.vals because some shells have a limit on | |
7946 | -# the size of here documents, and old seds have small limits too. | |
7947 | - | |
7948 | +cat >>conftest.undefs <<\_ACEOF | |
7949 | +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, | |
7950 | +_ACEOF | |
7951 | + | |
7952 | +# Break up conftest.defines because some shells have a limit on the size | |
7953 | +# of here documents, and old seds have small limits too (100 cmds). | |
7954 | +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | |
7955 | +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS | |
7956 | +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS | |
7957 | +echo ' :' >>$CONFIG_STATUS | |
7958 | rm -f conftest.tail | |
7959 | -while : | |
7960 | +while grep . conftest.defines >/dev/null | |
7961 | do | |
7962 | - ac_lines=`grep -c . conftest.vals` | |
7963 | - # grep -c gives empty output for an empty file on some AIX systems. | |
7964 | - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
7965 | - # Write a limited-size here document to conftest.frag. | |
7966 | - echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
7967 | - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
7968 | + # Write a limited-size here document to $tmp/defines.sed. | |
7969 | + echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | |
7970 | + # Speed up: don't consider the non `#define' lines. | |
7971 | + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS | |
7972 | + # Work around the forget-to-reset-the-flag bug. | |
7973 | + echo 't clr' >>$CONFIG_STATUS | |
7974 | + echo ': clr' >>$CONFIG_STATUS | |
7975 | + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | |
7976 | echo 'CEOF | |
7977 | - sed -f conftest.frag conftest.in > conftest.out | |
7978 | - rm -f conftest.in | |
7979 | - mv conftest.out conftest.in | |
7980 | -' >> $CONFIG_STATUS | |
7981 | - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
7982 | - rm -f conftest.vals | |
7983 | - mv conftest.tail conftest.vals | |
7984 | -done | |
7985 | -rm -f conftest.vals | |
7986 | - | |
7987 | -cat >> $CONFIG_STATUS <<\EOF | |
7988 | - rm -f conftest.frag conftest.h | |
7989 | - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
7990 | - cat conftest.in >> conftest.h | |
7991 | - rm -f conftest.in | |
7992 | - if cmp -s $ac_file conftest.h 2>/dev/null; then | |
7993 | - echo "$ac_file is unchanged" | |
7994 | - rm -f conftest.h | |
7995 | - else | |
7996 | - # Remove last slash and all that follows it. Not all systems have dirname. | |
7997 | - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
7998 | - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
7999 | - # The file is in a subdirectory. | |
8000 | - test ! -d "$ac_dir" && mkdir "$ac_dir" | |
8001 | - fi | |
8002 | - rm -f $ac_file | |
8003 | - mv conftest.h $ac_file | |
8004 | + sed -f $tmp/defines.sed $tmp/in >$tmp/out | |
8005 | + rm -f $tmp/in | |
8006 | + mv $tmp/out $tmp/in | |
8007 | +' >>$CONFIG_STATUS | |
8008 | + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | |
8009 | + rm -f conftest.defines | |
8010 | + mv conftest.tail conftest.defines | |
8011 | +done | |
8012 | +rm -f conftest.defines | |
8013 | +echo ' fi # grep' >>$CONFIG_STATUS | |
8014 | +echo >>$CONFIG_STATUS | |
8015 | + | |
8016 | +# Break up conftest.undefs because some shells have a limit on the size | |
8017 | +# of here documents, and old seds have small limits too (100 cmds). | |
8018 | +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | |
8019 | +rm -f conftest.tail | |
8020 | +while grep . conftest.undefs >/dev/null | |
8021 | +do | |
8022 | + # Write a limited-size here document to $tmp/undefs.sed. | |
8023 | + echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | |
8024 | + # Speed up: don't consider the non `#undef' | |
8025 | + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS | |
8026 | + # Work around the forget-to-reset-the-flag bug. | |
8027 | + echo 't clr' >>$CONFIG_STATUS | |
8028 | + echo ': clr' >>$CONFIG_STATUS | |
8029 | + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | |
8030 | + echo 'CEOF | |
8031 | + sed -f $tmp/undefs.sed $tmp/in >$tmp/out | |
8032 | + rm -f $tmp/in | |
8033 | + mv $tmp/out $tmp/in | |
8034 | +' >>$CONFIG_STATUS | |
8035 | + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | |
8036 | + rm -f conftest.undefs | |
8037 | + mv conftest.tail conftest.undefs | |
8038 | +done | |
8039 | +rm -f conftest.undefs | |
8040 | + | |
8041 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
8042 | + # Let's still pretend it is `configure' which instantiates (i.e., don't | |
8043 | + # use $as_me), people would be surprised to read: | |
8044 | + # /* config.h. Generated by config.status. */ | |
8045 | + if test x"$ac_file" = x-; then | |
8046 | + echo "/* Generated by configure. */" >$tmp/config.h | |
8047 | + else | |
8048 | + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h | |
8049 | fi | |
8050 | -fi; done | |
8051 | + cat $tmp/in >>$tmp/config.h | |
8052 | + rm -f $tmp/in | |
8053 | + if test x"$ac_file" != x-; then | |
8054 | + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | |
8055 | + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | |
8056 | +echo "$as_me: $ac_file is unchanged" >&6;} | |
8057 | + else | |
8058 | + ac_dir=`(dirname "$ac_file") 2>/dev/null || | |
8059 | +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
8060 | + X"$ac_file" : 'X\(//\)[^/]' \| \ | |
8061 | + X"$ac_file" : 'X\(//\)$' \| \ | |
8062 | + X"$ac_file" : 'X\(/\)' \| \ | |
8063 | + . : '\(.\)' 2>/dev/null || | |
8064 | +echo X"$ac_file" | | |
8065 | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
8066 | + /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
8067 | + /^X\(\/\/\)$/{ s//\1/; q; } | |
8068 | + /^X\(\/\).*/{ s//\1/; q; } | |
8069 | + s/.*/./; q'` | |
8070 | + { if $as_mkdir_p; then | |
8071 | + mkdir -p "$ac_dir" | |
8072 | + else | |
8073 | + as_dir="$ac_dir" | |
8074 | + as_dirs= | |
8075 | + while test ! -d "$as_dir"; do | |
8076 | + as_dirs="$as_dir $as_dirs" | |
8077 | + as_dir=`(dirname "$as_dir") 2>/dev/null || | |
8078 | +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
8079 | + X"$as_dir" : 'X\(//\)[^/]' \| \ | |
8080 | + X"$as_dir" : 'X\(//\)$' \| \ | |
8081 | + X"$as_dir" : 'X\(/\)' \| \ | |
8082 | + . : '\(.\)' 2>/dev/null || | |
8083 | +echo X"$as_dir" | | |
8084 | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |
8085 | + /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |
8086 | + /^X\(\/\/\)$/{ s//\1/; q; } | |
8087 | + /^X\(\/\).*/{ s//\1/; q; } | |
8088 | + s/.*/./; q'` | |
8089 | + done | |
8090 | + test ! -n "$as_dirs" || mkdir $as_dirs | |
8091 | + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | |
8092 | +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | |
8093 | + { (exit 1); exit 1; }; }; } | |
8094 | ||
8095 | -EOF | |
8096 | -cat >> $CONFIG_STATUS <<EOF | |
8097 | + rm -f $ac_file | |
8098 | + mv $tmp/config.h $ac_file | |
8099 | + fi | |
8100 | + else | |
8101 | + cat $tmp/config.h | |
8102 | + rm -f $tmp/config.h | |
8103 | + fi | |
8104 | +done | |
8105 | +_ACEOF | |
8106 | ||
8107 | -EOF | |
8108 | -cat >> $CONFIG_STATUS <<\EOF | |
8109 | +cat >>$CONFIG_STATUS <<\_ACEOF | |
8110 | ||
8111 | -exit 0 | |
8112 | -EOF | |
8113 | +{ (exit 0); exit 0; } | |
8114 | +_ACEOF | |
8115 | chmod +x $CONFIG_STATUS | |
8116 | -rm -fr confdefs* $ac_clean_files | |
8117 | -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 | |
8118 | +ac_clean_files=$ac_clean_files_save | |
8119 | + | |
8120 | + | |
8121 | +# configure is writing to config.log, and then calls config.status. | |
8122 | +# config.status does its own redirection, appending to config.log. | |
8123 | +# Unfortunately, on DOS this fails, as config.log is still kept open | |
8124 | +# by configure, so config.status won't be able to write to it; its | |
8125 | +# output is simply discarded. So we exec the FD to /dev/null, | |
8126 | +# effectively closing config.log, so it can be properly (re)opened and | |
8127 | +# appended to by config.status. When coming back to configure, we | |
8128 | +# need to make the FD available again. | |
8129 | +if test "$no_create" != yes; then | |
8130 | + ac_cs_success=: | |
8131 | + ac_config_status_args= | |
8132 | + test "$silent" = yes && | |
8133 | + ac_config_status_args="$ac_config_status_args --quiet" | |
8134 | + exec 5>/dev/null | |
8135 | + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
8136 | + exec 5>>config.log | |
8137 | + # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
8138 | + # would make configure fail if this is the last instruction. | |
8139 | + $ac_cs_success || { (exit 1); exit 1; } | |
8140 | +fi | |
8141 | ||
8142 | diff -puN configure.in~CITI_NFS4_ALL configure.in | |
8143 | --- nfs-utils-1.0.7/configure.in~CITI_NFS4_ALL 2005-05-06 15:19:22.324443000 -0400 | |
8144 | +++ nfs-utils-1.0.7-kwc/configure.in 2005-05-06 15:19:26.022447000 -0400 | |
8145 | @@ -34,7 +34,7 @@ AC_ARG_ENABLE(nfsv3, | |
8146 | enable_nfsv3=$enableval, | |
8147 | enable_nfsv3=yes) | |
8148 | if test "$enable_nfsv3" = yes; then | |
8149 | - AC_DEFINE(NFS3_SUPPORTED) | |
8150 | + AC_DEFINE(NFS3_SUPPORTED, 1, [Define this if you want NFSv3 support compiled in]) | |
8151 | else | |
8152 | enable_nfsv3= | |
8153 | fi | |
8154 | @@ -44,7 +44,7 @@ AC_ARG_ENABLE(nfsv4, | |
8155 | enable_nfsv4=$enableval, | |
8156 | enable_nfsv4=yes) | |
8157 | if test "$enable_nfsv4" = yes; then | |
8158 | - AC_DEFINE(NFS4_SUPPORTED) | |
8159 | + AC_DEFINE(NFS4_SUPPORTED, 1, [Define this if you want NFSv4 support compiled in]) | |
8160 | IDMAPD=idmapd | |
8161 | else | |
8162 | enable_nfsv4= | |
8163 | @@ -57,7 +57,7 @@ AC_ARG_ENABLE(gss, | |
8164 | enable_gss=$enableval, | |
8165 | enable_gss=yes) | |
8166 | if test "$enable_gss" = yes; then | |
8167 | - AC_DEFINE(GSS_SUPPORTED) | |
8168 | + AC_DEFINE(GSS_SUPPORTED, 1, [Define this if you want rpcsec_gss support compiled in]) | |
8169 | GSSD=gssd | |
8170 | SVCGSSD=svcgssd | |
8171 | else | |
8172 | @@ -78,7 +78,7 @@ AC_ARG_ENABLE(secure-statd, | |
8173 | test "$enableval" = "yes" && secure_statd=yes, | |
8174 | secure_statd=no) | |
8175 | if test "$secure_statd" = yes; then | |
8176 | - AC_DEFINE(RESTRICTED_STATD) | |
8177 | + AC_DEFINE(RESTRICTED_STATD, 1, [Define this if you want to enable various security checks in statd. These checks basically keep anyone but lockd from using this service.]) | |
8178 | fi | |
8179 | AC_SUBST(secure_statd) | |
8180 | AC_ARG_ENABLE(rquotad, | |
8181 | @@ -117,8 +117,8 @@ AC_CHECK_LIB(socket, main, [LIBSOCKET="- | |
8182 | AC_CHECK_LIB(nsl, main, [LIBNSL="-lnsl"]) | |
8183 | AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"]) | |
8184 | if test "$enable_nfsv4" = yes; then | |
8185 | - AC_CHECK_LIB(event, event_dispatch, , [AC_MSG_ERROR(libevent needed for nfsv4 support)]) | |
8186 | - AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, ,[AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)]) | |
8187 | + AC_CHECK_LIB(event, event_dispatch, [libevent=1], [AC_MSG_ERROR(libevent needed for nfsv4 support)]) | |
8188 | + AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], [AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)]) | |
8189 | AC_CHECK_HEADERS(event.h, ,[AC_MSG_ERROR(libevent needed for nfsv4 support)]) | |
8190 | AC_CHECK_HEADERS(nfsidmap.h, ,[AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)]) | |
8191 | fi | |
8192 | @@ -155,8 +155,8 @@ if test "$enable_gss" = yes; then | |
8193 | esac ] | |
8194 | ) | |
8195 | ||
8196 | - for dir in $krb5_with /usr/kerberos /usr/local /usr/local/krb5 /usr/krb5 \ | |
8197 | - /usr/heimdal /usr/local/heimdal /usr/athena /usr ; do | |
8198 | + for dir in $krb5_with /usr /usr/kerberos /usr/local /usr/local/krb5 \ | |
8199 | + /usr/krb5 /usr/heimdal /usr/local/heimdal /usr/athena ; do | |
8200 | dnl This ugly hack brought on by the split installation of | |
8201 | dnl MIT Kerberos on Fedora Core 1 | |
8202 | K5CONFIG="" | |
8203 | @@ -166,62 +166,71 @@ if test "$enable_gss" = yes; then | |
8204 | K5CONFIG="/usr/kerberos/bin/krb5-config" | |
8205 | fi | |
8206 | if test "$K5CONFIG" != ""; then | |
8207 | + KRBINC=`$K5CONFIG --cflags` | |
8208 | + KRBLIB=`$K5CONFIG --libs gssapi` | |
8209 | + K5VERS=`$K5CONFIG --version | head -n 1 | awk '{split($4,v,"."); if (v[[3]] == "") v[[3]] = "0"; print v[[1]]v[[2]]v[[3]] }'` | |
8210 | + AC_DEFINE_UNQUOTED(KRB5_VERSION, $K5VERS, [Define this as the Kerberos version number]) | |
8211 | if test -f $dir/include/gssapi/gssapi_krb5.h -a \ | |
8212 | \( -f $dir/lib/libgssapi_krb5.a -o \ | |
8213 | -f $dir/lib/libgssapi_krb5.so \) ; then | |
8214 | - AC_DEFINE(HAVE_KRB5) | |
8215 | + AC_DEFINE(HAVE_KRB5, 1, [Define this if you have MIT Kerberos libraries]) | |
8216 | KRBDIR="$dir" | |
8217 | - K5VERS=`$K5CONFIG --version | awk '{split($4,v,"."); print v[[1]]v[[2]]v[[3]] }'` | |
8218 | - AC_DEFINE_UNQUOTED(KRB5_VERSION,$K5VERS) | |
8219 | - KRBLIB=`$K5CONFIG --libs gssapi` | |
8220 | + dnl If we are using MIT K5 1.3.1 and before, we *MUST* use the | |
8221 | + dnl private function (gss_krb5_ccache_name) to get correct | |
8222 | + dnl behavior of changing the ccache used by gssapi. | |
8223 | + dnl Starting in 1.3.2, we *DO NOT* want to use | |
8224 | + dnl gss_krb5_ccache_name, instead we want to set KRB5CCNAME | |
8225 | + dnl to get gssapi to use a different ccache | |
8226 | if test $K5VERS -le 131; then | |
8227 | - AC_DEFINE(USE_PRIVATE_KRB5_FUNCTIONS) | |
8228 | + AC_DEFINE(USE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the private function, gss_krb5_cache_name, must be used to tell the Kerberos library which credentials cache to use. Otherwise, this is done by setting the KRB5CCNAME environment variable]) | |
8229 | fi | |
8230 | - AC_CHECK_LIB(gssapi_krb5, gss_krb5_export_lucid_sec_context, | |
8231 | - AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT),,$KRBLIB) | |
8232 | - AC_CHECK_LIB(gssapi_krb5, gss_krb5_set_allowable_enctypes, | |
8233 | - AC_DEFINE(HAVE_SET_ALLOWABLE_ENCTYPES),,$KRBLIB) | |
8234 | - AC_CHECK_LIB(gssapi_krb5, gss_krb5_ccache_name, | |
8235 | - AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME),,$KRBLIB) | |
8236 | + gssapi_lib=gssapi_krb5 | |
8237 | break | |
8238 | dnl The following ugly hack brought on by the split installation | |
8239 | dnl of Heimdal Kerberos on SuSe | |
8240 | elif test \( -f $dir/include/heim_err.h -o\ | |
8241 | -f $dir/include/heimdal/heim_err.h \) -a \ | |
8242 | -f $dir/lib/libroken.a; then | |
8243 | - AC_DEFINE(HAVE_HEIMDAL) | |
8244 | + AC_DEFINE(HAVE_HEIMDAL, 1, [Define this if you have Heimdal Kerberos libraries]) | |
8245 | KRBDIR="$dir" | |
8246 | - K5VERS=`$K5CONFIG --version | head -1 | awk '{split($2,v,"."); print v[[1]]v[[2]]v[[3]] }'` | |
8247 | - AC_DEFINE_UNQUOTED(KRB5_VERSION,$K5VERS) | |
8248 | - KRBLIB=`$K5CONFIG --libs gssapi` | |
8249 | - AC_CHECK_LIB(gssapi, gss_krb5_export_lucid_sec_context, | |
8250 | - AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT),,$KRBLIB) | |
8251 | - AC_CHECK_LIB(gssapi, gss_krb5_set_allowable_enctypes, | |
8252 | - AC_DEFINE(HAVE_SET_ALLOWABLE_ENCTYPES),,$KRBLIB) | |
8253 | - AC_CHECK_LIB(gssapi, gss_krb5_ccache_name, | |
8254 | - AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME),,$KRBLIB) | |
8255 | + gssapi_lib=gssapi | |
8256 | break | |
8257 | fi | |
8258 | - CFLAGS=$CFLAGS `K5CONFIG --cflags` | |
8259 | fi | |
8260 | done | |
8261 | dnl We didn't find a usable Kerberos environment | |
8262 | if test "x$KRBDIR" = "x"; then | |
8263 | - AC_MSG_RESULT("no") | |
8264 | if test "x$krb5_with" = "x"; then | |
8265 | AC_MSG_ERROR(Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=) | |
8266 | else | |
8267 | AC_MSG_ERROR(Kerberos v5 with GSS support not found at $krb5_with) | |
8268 | fi | |
8269 | fi | |
8270 | + CFLAGS="$CFLAGS `$K5CONFIG --cflags`" | |
8271 | AC_MSG_RESULT($KRBDIR) | |
8272 | + | |
8273 | + dnl Now check for functions within gssapi library | |
8274 | + AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context, | |
8275 | + AC_DEFINE(HAVE_LUCID_CONTEXT_SUPPORT, 1, [Define this if the Kerberos GSS library supports gss_krb5_export_lucid_sec_context]), ,$KRBLIB) | |
8276 | + AC_CHECK_LIB($gssapi_lib, gss_krb5_set_allowable_enctypes, | |
8277 | + AC_DEFINE(HAVE_SET_ALLOWABLE_ENCTYPES, 1, [Define this if the Kerberos GSS library supports gss_krb5_set_allowable_enctypes]), ,$KRBLIB) | |
8278 | + AC_CHECK_LIB($gssapi_lib, gss_krb5_ccache_name, | |
8279 | + AC_DEFINE(HAVE_GSS_KRB5_CCACHE_NAME, 1, [Define this if the Kerberos GSS library supports gss_krb5_ccache_name]), ,$KRBLIB) | |
8280 | + | |
8281 | dnl If they specified a directory and it didn't work, give them a warning | |
8282 | if test "x$krb5_with" != "x" -a "$krb5_with" != "$KRBDIR"; then | |
8283 | AC_MSG_WARN(Using $KRBDIR instead of requested value of $krb5_with for Kerberos!) | |
8284 | fi | |
8285 | ||
8286 | + dnl This is not done until here because we need to have KRBLIB set | |
8287 | + dnl "librpcsecgss=1" is so that it doesn't get added to LIBS | |
8288 | + AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], [AC_MSG_ERROR(librpcsecgss needed for nfsv4 support)], $KRBLIB) | |
8289 | + AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level, | |
8290 | + AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, $KRBLIB) | |
8291 | + | |
8292 | AC_SUBST([KRBDIR]) | |
8293 | AC_SUBST([KRBLIB]) | |
8294 | + AC_SUBST([KRBINC]) | |
8295 | AC_SUBST([K5VERS]) | |
8296 | fi | |
8297 | ||
8298 | @@ -229,6 +238,8 @@ dnl ************************************ | |
8299 | dnl Check for headers | |
8300 | dnl ************************************************************* | |
8301 | dnl AC_HAVE_HEADERS(string.h) | |
8302 | +AC_HAVE_HEADERS(com_err.h) | |
8303 | +AC_HAVE_HEADERS(et/com_err.h) | |
8304 | ||
8305 | dnl ************************************************************* | |
8306 | dnl Check for functions | |
8307 | @@ -236,9 +247,17 @@ dnl ************************************ | |
8308 | AC_HAVE_FUNCS(innetgr) | |
8309 | ||
8310 | dnl ************************************************************* | |
8311 | +dnl Check for data sizes | |
8312 | +dnl ************************************************************* | |
8313 | +AC_CHECK_SIZEOF(short) | |
8314 | +AC_CHECK_SIZEOF(int) | |
8315 | +AC_CHECK_SIZEOF(long) | |
8316 | +AC_CHECK_SIZEOF(size_t) | |
8317 | + | |
8318 | +dnl ************************************************************* | |
8319 | dnl Export some path names to config.h | |
8320 | dnl ************************************************************* | |
8321 | -AC_DEFINE_UNQUOTED(NFS_STATEDIR, "$statedir") | |
8322 | +AC_DEFINE_UNQUOTED(NFS_STATEDIR, "$statedir", [This defines the location of the NFS state files. Warning: this must match definitions in config.mk!]) | |
8323 | ||
8324 | AC_SUBST(LDFLAGS) | |
8325 | AC_SUBST(CXXFLAGS) | |
8326 | diff -puN support/include/config.h.in~CITI_NFS4_ALL support/include/config.h.in | |
8327 | --- nfs-utils-1.0.7/support/include/config.h.in~CITI_NFS4_ALL 2005-05-06 15:19:22.383384000 -0400 | |
8328 | +++ nfs-utils-1.0.7-kwc/support/include/config.h.in 2005-05-06 15:19:26.028447000 -0400 | |
8329 | @@ -5,6 +5,12 @@ | |
8330 | /* Define this if you have string.h */ | |
8331 | #undef HAVE_STRING_H | |
8332 | ||
8333 | +/* Define this if you have com_err.h */ | |
8334 | +#undef HAVE_COM_ERR_H | |
8335 | + | |
8336 | +/* Define this if you have <et/com_err.h> */ | |
8337 | +#undef HAVE_ET_COM_ERR_H | |
8338 | + | |
8339 | /* Define this if you have netgroup support | |
8340 | */ | |
8341 | #undef HAVE_INNETGR | |
8342 | @@ -43,3 +49,28 @@ | |
8343 | /* Define this if the Kerberos gssapi library has function | |
8344 | * gss_krb5_cache_name */ | |
8345 | #undef HAVE_GSS_KRB5_CCACHE_NAME | |
8346 | + | |
8347 | +/* Define this if the rpcsec_gss library has the function | |
8348 | + * authgss_set_debug_level */ | |
8349 | +#undef HAVE_AUTHGSS_SET_DEBUG_LEVEL | |
8350 | + | |
8351 | +/* Define this if we want to use the private Kerberos | |
8352 | + * gssapi library function, gss_krb5_cache_name, to | |
8353 | + * specify the credentials cache file to be used by | |
8354 | + * the gssapi library. | |
8355 | + * (For MIT releases 1.3.1 and before, this must | |
8356 | + * be defined. For later releases we can simply | |
8357 | + * set the KRB5CCNAME environment variable.) */ | |
8358 | +#undef USE_GSS_KRB5_CCACHE_NAME | |
8359 | + | |
8360 | +/* The size of a `int', as computed by sizeof. */ | |
8361 | +#undef SIZEOF_INT | |
8362 | + | |
8363 | +/* The size of a `long', as computed by sizeof. */ | |
8364 | +#undef SIZEOF_LONG | |
8365 | + | |
8366 | +/* The size of a `short', as computed by sizeof. */ | |
8367 | +#undef SIZEOF_SHORT | |
8368 | + | |
8369 | +/* The size of a `size_t', as computed by sizeof. */ | |
8370 | +#undef SIZEOF_SIZE_T | |
8371 | diff -puN utils/svcgssd/Makefile~CITI_NFS4_ALL utils/svcgssd/Makefile | |
8372 | --- nfs-utils-1.0.7/utils/svcgssd/Makefile~CITI_NFS4_ALL 2005-05-06 15:19:22.441326000 -0400 | |
8373 | +++ nfs-utils-1.0.7-kwc/utils/svcgssd/Makefile 2005-05-06 15:19:26.017448000 -0400 | |
8374 | @@ -6,18 +6,23 @@ PROGRAM = svcgssd | |
8375 | PREFIX = rpc. | |
8376 | OBJS = svcgssd.o svcgssd_main_loop.o svcgssd_proc.o err_util.o gss_util.o \ | |
8377 | gss_oids.o context.o context_heimdal.o cacheio.o svcgssd_mech2file.o | |
8378 | -LIBDEPS = $(TOP)support/lib/librpc.a $(TOP)support/lib/libgssapi.a | |
8379 | -LIBS = -Wl,-rpath=$(KRBDIR)/lib -lrpc -lgssapi -ldl $(KRBLIB) -lnfsidmap | |
8380 | +LIBS = -Wl,-rpath=$(KRBDIR)/lib -lrpcsecgss -lgssapi -ldl $(KRBLIB) -lnfsidmap | |
8381 | MAN8 = svcgssd | |
8382 | ||
8383 | -predep :: | |
8384 | - - ln ../gssd/err_util.c | |
8385 | - - ln ../gssd/gss_util.c | |
8386 | - - ln ../gssd/gss_oids.c | |
8387 | - - ln ../gssd/context.c | |
8388 | - - ln ../gssd/context_heimdal.c | |
8389 | - | |
8390 | include $(TOP)rules.mk | |
8391 | ||
8392 | CFLAGS += -I../gssd -DKRB5_VERSION=$(KRB5_VERSION) \ | |
8393 | - -I$(TOP)support/rpc/include/ -I$(KRBDIR)/include | |
8394 | + -I$(TOP)support/rpc/include/ | |
8395 | +predep :: | |
8396 | + - ln -s ../gssd/err_util.c | |
8397 | + - ln -s ../gssd/gss_util.c | |
8398 | + - ln -s ../gssd/gss_oids.c | |
8399 | + - ln -s ../gssd/context.c | |
8400 | + - ln -s ../gssd/context_heimdal.c | |
8401 | + | |
8402 | +distclean :: | |
8403 | + - rm err_util.c | |
8404 | + - rm gss_util.c | |
8405 | + - rm gss_oids.c | |
8406 | + - rm context.c | |
8407 | + - rm context_heimdal.c | |
8408 | diff -puN support/include/gssapi/gssapi.h~CITI_NFS4_ALL support/include/gssapi/gssapi.h | |
8409 | --- nfs-utils-1.0.7/support/include/gssapi/gssapi.h~CITI_NFS4_ALL 2005-05-06 15:19:22.696320000 -0400 | |
8410 | +++ nfs-utils-1.0.7-kwc/support/include/gssapi/gssapi.h 2005-05-06 15:19:22.781320000 -0400 | |
8411 | @@ -1,25 +1,3 @@ | |
8412 | -/* This is the gssapi.h prologue. */ | |
8413 | -/* It contains some choice pieces of autoconf.h */ | |
8414 | -#define SIZEOF_INT 4 | |
8415 | -#define SIZEOF_LONG 4 | |
8416 | -#define SIZEOF_SHORT 2 | |
8417 | -#define HAVE_STDARG_H 1 | |
8418 | -/* #undef HAVE_VARARGS_H */ | |
8419 | -/* #undef HAVE_MACSOCK_H */ | |
8420 | -#define HAVE_NETINET_IN_H 1 | |
8421 | -#define HAVE_STDDEF_H 1 | |
8422 | -#define HAVE_STDLIB_H 1 | |
8423 | -#define HAVE_STRING_H 1 | |
8424 | -#define HAVE_SYS_FILE_H 1 | |
8425 | -#define HAVE_SYS_PARAM_H 1 | |
8426 | -#define HAVE_SYS_SOCKET_H 1 | |
8427 | -#define HAVE_SYS_STAT_H 1 | |
8428 | -#define HAVE_SYS_TIME_H 1 | |
8429 | -#define HAVE_SYS_TYPES_H 1 | |
8430 | -#define HAVE_UNISTD_H 1 | |
8431 | -/* #undef HAVE_XOM_H */ | |
8432 | -#define USE_DIRENT_H 1 | |
8433 | -/* End of gssapi.h prologue. */ | |
8434 | /* | |
8435 | * Copyright 1993 by OpenVision Technologies, Inc. | |
8436 | * | |
8437 | @@ -45,6 +23,8 @@ | |
8438 | #ifndef _GSSAPI_H_ | |
8439 | #define _GSSAPI_H_ | |
8440 | ||
8441 | +#include "config.h" | |
8442 | + | |
8443 | /* | |
8444 | * Determine platform-dependent configuration. | |
8445 | */ | |
8446 | diff -puN utils/gssd/write_bytes.h~CITI_NFS4_ALL utils/gssd/write_bytes.h | |
8447 | --- nfs-utils-1.0.7/utils/gssd/write_bytes.h~CITI_NFS4_ALL 2005-05-06 15:19:22.755320000 -0400 | |
8448 | +++ nfs-utils-1.0.7-kwc/utils/gssd/write_bytes.h 2005-05-06 15:19:22.771320000 -0400 | |
8449 | @@ -53,12 +53,13 @@ write_bytes(char **ptr, const char *end, | |
8450 | inline static int | |
8451 | write_buffer(char **p, char *end, gss_buffer_desc *arg) | |
8452 | { | |
8453 | - if (WRITE_BYTES(p, end, arg->length)) | |
8454 | + int len = (int)arg->length; /* make an int out of size_t */ | |
8455 | + if (WRITE_BYTES(p, end, len)) | |
8456 | return -1; | |
8457 | if (*p + arg->length > end) | |
8458 | return -1; | |
8459 | - memcpy(*p, arg->value, arg->length); | |
8460 | - *p += arg->length; | |
8461 | + memcpy(*p, arg->value, len); | |
8462 | + *p += len; | |
8463 | return 0; | |
8464 | } | |
8465 | ||
8466 | @@ -80,8 +81,10 @@ get_buffer(char **ptr, const char *end, | |
8467 | { | |
8468 | char *p, *q; | |
8469 | p = *ptr; | |
8470 | - if (get_bytes(&p, end, &res->length, sizeof(res->length))) | |
8471 | + int len; | |
8472 | + if (get_bytes(&p, end, &len, sizeof(len))) | |
8473 | return -1; | |
8474 | + res->length = len; /* promote to size_t if necessary */ | |
8475 | q = p + res->length; | |
8476 | if (q > end || q < p) | |
8477 | return -1; | |
8478 | @@ -105,9 +108,11 @@ static inline int | |
8479 | xdr_get_buffer(u_int32_t **ptr, const u_int32_t *end, gss_buffer_desc *res) | |
8480 | { | |
8481 | u_int32_t *p, *q; | |
8482 | + u_int32_t len; | |
8483 | p = *ptr; | |
8484 | - if (xdr_get_u32(&p, end, &res->length)) | |
8485 | + if (xdr_get_u32(&p, end, &len)) | |
8486 | return -1; | |
8487 | + res->length = len; | |
8488 | q = p + ((res->length + 3) >> 2); | |
8489 | if (q > end || q < p) | |
8490 | return -1; | |
8491 | @@ -130,7 +135,8 @@ xdr_write_u32(u_int32_t **ptr, const u_i | |
8492 | static inline int | |
8493 | xdr_write_buffer(u_int32_t **ptr, const u_int32_t *end, gss_buffer_desc *arg) | |
8494 | { | |
8495 | - if (xdr_write_u32(ptr, end, arg->length)) | |
8496 | + int len = arg->length; | |
8497 | + if (xdr_write_u32(ptr, end, len)) | |
8498 | return -1; | |
8499 | return write_bytes((char **)ptr, (char *)end, arg->value, | |
8500 | (arg->length + 3) & ~3); | |
8501 | diff -puN utils/idmapd/idmapd.c~CITI_NFS4_ALL utils/idmapd/idmapd.c | |
8502 | --- nfs-utils-1.0.7/utils/idmapd/idmapd.c~CITI_NFS4_ALL 2005-05-06 15:19:22.926320000 -0400 | |
8503 | +++ nfs-utils-1.0.7-kwc/utils/idmapd/idmapd.c 2005-05-06 15:19:23.940029000 -0400 | |
8504 | @@ -141,6 +141,34 @@ static struct idmap_client nfsd_ic[2]; | |
8505 | /* Used by cfg.c */ | |
8506 | char *conf_path; | |
8507 | ||
8508 | +static int | |
8509 | +flush_nfsd_cache(char *path, time_t now) | |
8510 | +{ | |
8511 | + int fd; | |
8512 | + char stime[20]; | |
8513 | + | |
8514 | + sprintf(stime, "%ld\n", now); | |
8515 | + fd = open(path, O_RDWR); | |
8516 | + if (fd == -1) | |
8517 | + return -1; | |
8518 | + write(fd, stime, strlen(stime)); | |
8519 | + close(fd); | |
8520 | + return 0; | |
8521 | +} | |
8522 | + | |
8523 | +static int | |
8524 | +flush_nfsd_idmap_cache(void) | |
8525 | +{ | |
8526 | + time_t now = time(NULL); | |
8527 | + int ret; | |
8528 | + | |
8529 | + ret = flush_nfsd_cache("/proc/net/rpc/nfs4.idtoname/flush", now); | |
8530 | + if (ret) | |
8531 | + return ret; | |
8532 | + ret = flush_nfsd_cache("/proc/net/rpc/nfs4.nametoid/flush", now); | |
8533 | + return ret; | |
8534 | +} | |
8535 | + | |
8536 | int | |
8537 | main(int argc, char **argv) | |
8538 | { | |
8539 | @@ -153,6 +181,7 @@ main(int argc, char **argv) | |
8540 | struct stat sb; | |
8541 | char *xpipefsdir = NULL; | |
8542 | int serverstart = 1, clientstart = 1; | |
8543 | + int ret; | |
8544 | ||
8545 | conf_path = _PATH_IDMAPDCONF; | |
8546 | nobodyuser = NFS4NOBODY_USER; | |
8547 | @@ -230,8 +259,14 @@ main(int argc, char **argv) | |
8548 | ||
8549 | event_init(); | |
8550 | ||
8551 | - if (serverstart) | |
8552 | + if (serverstart) { | |
8553 | nfsdret = nfsdopen(NFSD_DIR); | |
8554 | + if (nfsdret == 0) { | |
8555 | + ret = flush_nfsd_idmap_cache(); | |
8556 | + if (ret) | |
8557 | + errx(1, "Failed to flush nfsd idmap cache\n"); | |
8558 | + } | |
8559 | + } | |
8560 | ||
8561 | if (clientstart) { | |
8562 | struct timeval now = { | |
8563 | @@ -565,10 +600,8 @@ nfsdreopen_one(struct idmap_client *ic) | |
8564 | if (ic->ic_fd != -1) | |
8565 | close(ic->ic_fd); | |
8566 | ic->ic_event.ev_fd = ic->ic_fd = fd; | |
8567 | - if ((ic->ic_event.ev_flags & EVLIST_INIT) == 0) { | |
8568 | - event_set(&ic->ic_event, ic->ic_fd, EV_READ, nfsdcb, ic); | |
8569 | - event_add(&ic->ic_event, NULL); | |
8570 | - } | |
8571 | + event_set(&ic->ic_event, ic->ic_fd, EV_READ, nfsdcb, ic); | |
8572 | + event_add(&ic->ic_event, NULL); | |
8573 | } else { | |
8574 | warnx("nfsdreopen: Opening '%s' failed: errno %d (%s)", | |
8575 | ic->ic_path, errno, strerror(errno)); | |
8576 | @@ -681,9 +714,7 @@ idtonameres(struct idmap_msg *im) | |
8577 | sizeof(im->im_name)); | |
8578 | break; | |
8579 | } | |
8580 | - /* XXX Hack? would rather return failure instead of writing nobody | |
8581 | - * as above, but kernel seems not to deal well with that as of | |
8582 | - * 2.6.8-rc3. */ | |
8583 | + /* XXX Hack? */ | |
8584 | im->im_status = IDMAP_STATUS_SUCCESS; | |
8585 | } | |
8586 | ||
8587 | @@ -692,6 +723,14 @@ nametoidres(struct idmap_msg *im) | |
8588 | { | |
8589 | int ret = 0; | |
8590 | ||
8591 | + /* XXX: nobody fallbacks shouldn't always happen: | |
8592 | + * server id -> name should be OK | |
8593 | + * client name -> id should be OK | |
8594 | + * but not otherwise */ | |
8595 | + /* XXX: move nobody stuff to library calls | |
8596 | + * (nfs4_get_nobody_user(domain), nfs4_get_nobody_group(domain)) */ | |
8597 | + /* XXX: should make this call higher up in the call chain (so we'd | |
8598 | + * have a chance on looking up server/whatever. */ | |
8599 | switch (im->im_type) { | |
8600 | case IDMAP_TYPE_USER: | |
8601 | ret = nfs4_name_to_uid(im->im_name, &im->im_id); | |
8602 | @@ -704,9 +743,7 @@ nametoidres(struct idmap_msg *im) | |
8603 | im->im_id = nobodygid; | |
8604 | break; | |
8605 | } | |
8606 | - /* XXX Hack? would rather return failure instead of writing nobody | |
8607 | - * as above, but kernel seems not to deal well with that as of | |
8608 | - * 2.6.8-rc3. */ | |
8609 | + /* XXX? */ | |
8610 | im->im_status = IDMAP_STATUS_SUCCESS; | |
8611 | } | |
8612 | ||
8613 | diff -puN utils/gssd/krb5_util.c~CITI_NFS4_ALL utils/gssd/krb5_util.c | |
8614 | --- nfs-utils-1.0.7/utils/gssd/krb5_util.c~CITI_NFS4_ALL 2005-05-06 15:19:23.197280000 -0400 | |
8615 | +++ nfs-utils-1.0.7-kwc/utils/gssd/krb5_util.c 2005-05-06 15:19:26.501156000 -0400 | |
8616 | @@ -131,7 +131,7 @@ static int select_krb5_ccache(const stru | |
8617 | static int gssd_find_existing_krb5_ccache(uid_t uid, struct dirent **d); | |
8618 | static int gssd_get_single_krb5_cred(krb5_context context, | |
8619 | krb5_keytab kt, struct gssd_k5_kt_princ *ple); | |
8620 | -static int gssd_have_realm_ple(krb5_data *realm); | |
8621 | +static int gssd_have_realm_ple(void *realm); | |
8622 | static int gssd_process_krb5_keytab(krb5_context context, krb5_keytab kt, | |
8623 | char *kt_name); | |
8624 | ||
8625 | @@ -270,11 +270,7 @@ limit_krb5_enctypes(struct rpc_gss_sec * | |
8626 | { | |
8627 | u_int maj_stat, min_stat; | |
8628 | gss_cred_id_t credh; | |
8629 | -/* krb5_enctype enctypes[] = {ENCTYPE_DES3_CBC_SHA1}; | |
8630 | - ENCTYPE_ARCFOUR_HMAC, */ | |
8631 | - krb5_enctype enctypes[] = {ENCTYPE_DES3_CBC_SHA1, | |
8632 | - ENCTYPE_DES_CBC_MD5, | |
8633 | - ENCTYPE_DES_CBC_CRC}; | |
8634 | + krb5_enctype enctypes[] = { ENCTYPE_DES_CBC_CRC }; | |
8635 | int num_enctypes = sizeof(enctypes) / sizeof(enctypes[0]); | |
8636 | ||
8637 | maj_stat = gss_acquire_cred(&min_stat, NULL, 0, | |
8638 | @@ -349,7 +345,7 @@ gssd_get_single_krb5_cred(krb5_context c | |
8639 | krb5_get_init_creds_opt_set_tkt_life(&options, 5*60); | |
8640 | #endif | |
8641 | if ((code = krb5_get_init_creds_keytab(context, &my_creds, ple->princ, | |
8642 | - kt, 0, 0, &options))) { | |
8643 | + kt, 0, NULL, &options))) { | |
8644 | char *pname; | |
8645 | if ((krb5_unparse_name(context, ple->princ, &pname))) { | |
8646 | pname = NULL; | |
8647 | @@ -358,7 +354,11 @@ gssd_get_single_krb5_cred(krb5_context c | |
8648 | "principal '%s' from keytab '%s'\n", | |
8649 | error_message(code), | |
8650 | pname ? pname : "<unparsable>", kt_name); | |
8651 | +#ifdef HAVE_KRB5 | |
8652 | if (pname) krb5_free_unparsed_name(context, pname); | |
8653 | +#else | |
8654 | + if (pname) free(pname); | |
8655 | +#endif | |
8656 | goto out; | |
8657 | } | |
8658 | ||
8659 | @@ -410,13 +410,22 @@ gssd_get_single_krb5_cred(krb5_context c | |
8660 | * 1 => found ple for given realm | |
8661 | */ | |
8662 | static int | |
8663 | -gssd_have_realm_ple(krb5_data *realm) | |
8664 | +gssd_have_realm_ple(void *r) | |
8665 | { | |
8666 | struct gssd_k5_kt_princ *ple; | |
8667 | +#ifdef HAVE_KRB5 | |
8668 | + krb5_data *realm = (krb5_data *)r; | |
8669 | +#else | |
8670 | + char *realm = (char *)r; | |
8671 | +#endif | |
8672 | ||
8673 | for (ple = gssd_k5_kt_princ_list; ple; ple = ple->next) { | |
8674 | +#ifdef HAVE_KRB5 | |
8675 | if ((realm->length == strlen(ple->realm)) && | |
8676 | (strncmp(realm->data, ple->realm, realm->length) == 0)) { | |
8677 | +#else | |
8678 | + if (strcmp(realm, ple->realm) == 0) { | |
8679 | +#endif | |
8680 | return 1; | |
8681 | } | |
8682 | } | |
8683 | @@ -466,16 +475,27 @@ gssd_process_krb5_keytab(krb5_context co | |
8684 | } | |
8685 | printerr(2, "Processing keytab entry for principal '%s'\n", | |
8686 | pname); | |
8687 | +#ifdef HAVE_KRB5 | |
8688 | if ( (kte.principal->data[0].length == GSSD_SERVICE_NAME_LEN) && | |
8689 | (strncmp(kte.principal->data[0].data, GSSD_SERVICE_NAME, | |
8690 | GSSD_SERVICE_NAME_LEN) == 0) && | |
8691 | - (!gssd_have_realm_ple(&kte.principal->realm)) ) { | |
8692 | +#else | |
8693 | + if ( (strlen(kte.principal->name.name_string.val[0]) == GSSD_SERVICE_NAME_LEN) && | |
8694 | + (strncmp(kte.principal->name.name_string.val[0], GSSD_SERVICE_NAME, | |
8695 | + GSSD_SERVICE_NAME_LEN) == 0) && | |
8696 | + | |
8697 | +#endif | |
8698 | + (!gssd_have_realm_ple((void *)&kte.principal->realm)) ) { | |
8699 | printerr(2, "We will use this entry (%s)\n", pname); | |
8700 | ple = malloc(sizeof(struct gssd_k5_kt_princ)); | |
8701 | if (ple == NULL) { | |
8702 | printerr(0, "ERROR: could not allocate storage " | |
8703 | "for principal list entry\n"); | |
8704 | +#ifdef HAVE_KRB5 | |
8705 | krb5_free_unparsed_name(context, pname); | |
8706 | +#else | |
8707 | + free(pname); | |
8708 | +#endif | |
8709 | retval = ENOMEM; | |
8710 | goto out; | |
8711 | } | |
8712 | @@ -484,13 +504,21 @@ gssd_process_krb5_keytab(krb5_context co | |
8713 | ple->ccname = NULL; | |
8714 | ple->endtime = 0; | |
8715 | if ((ple->realm = | |
8716 | +#ifdef HAVE_KRB5 | |
8717 | strndup(kte.principal->realm.data, | |
8718 | kte.principal->realm.length)) | |
8719 | +#else | |
8720 | + strdup(kte.principal->realm)) | |
8721 | +#endif | |
8722 | == NULL) { | |
8723 | printerr(0, "ERROR: %s while copying realm to " | |
8724 | "principal list entry\n", | |
8725 | "not enough memory"); | |
8726 | +#ifdef HAVE_KRB5 | |
8727 | krb5_free_unparsed_name(context, pname); | |
8728 | +#else | |
8729 | + free(pname); | |
8730 | +#endif | |
8731 | retval = ENOMEM; | |
8732 | goto out; | |
8733 | } | |
8734 | @@ -499,7 +527,11 @@ gssd_process_krb5_keytab(krb5_context co | |
8735 | printerr(0, "ERROR: %s while copying principal " | |
8736 | "to principal list entry\n", | |
8737 | error_message(code)); | |
8738 | +#ifdef HAVE_KRB5 | |
8739 | krb5_free_unparsed_name(context, pname); | |
8740 | +#else | |
8741 | + free(pname); | |
8742 | +#endif | |
8743 | retval = code; | |
8744 | goto out; | |
8745 | } | |
8746 | @@ -514,7 +546,11 @@ gssd_process_krb5_keytab(krb5_context co | |
8747 | printerr(2, "We will NOT use this entry (%s)\n", | |
8748 | pname); | |
8749 | } | |
8750 | +#ifdef HAVE_KRB5 | |
8751 | krb5_free_unparsed_name(context, pname); | |
8752 | +#else | |
8753 | + free(pname); | |
8754 | +#endif | |
8755 | } | |
8756 | ||
8757 | if ((code = krb5_kt_end_seq_get(context, kt, &cursor))) { | |
8758 | @@ -528,6 +564,36 @@ gssd_process_krb5_keytab(krb5_context co | |
8759 | return retval; | |
8760 | } | |
8761 | ||
8762 | +/* | |
8763 | + * Depending on the version of Kerberos, we either need to use | |
8764 | + * a private function, or simply set the environment variable. | |
8765 | + */ | |
8766 | +static void | |
8767 | +gssd_set_krb5_ccache_name(char *ccname) | |
8768 | +{ | |
8769 | +#ifdef USE_GSS_KRB5_CCACHE_NAME | |
8770 | + u_int maj_stat, min_stat; | |
8771 | + | |
8772 | + printerr(2, "using gss_krb5_ccache_name to select krb5 ccache %s\n", | |
8773 | + ccname); | |
8774 | + maj_stat = gss_krb5_ccache_name(&min_stat, ccname, NULL); | |
8775 | + if (maj_stat != GSS_S_COMPLETE) { | |
8776 | + printerr(0, "WARNING: gss_krb5_ccache_name with " | |
8777 | + "name '%s' failed (%s)\n", | |
8778 | + ccname, error_message(min_stat)); | |
8779 | + } | |
8780 | +#else | |
8781 | + /* | |
8782 | + * Set the KRB5CCNAME environment variable to tell the krb5 code | |
8783 | + * which credentials cache to use. (Instead of using the private | |
8784 | + * function above for which there is no generic gssapi | |
8785 | + * equivalent.) | |
8786 | + */ | |
8787 | + printerr(2, "using environment variable to select krb5 ccache %s\n", | |
8788 | + ccname); | |
8789 | + setenv("KRB5CCNAME", ccname, 1); | |
8790 | +#endif | |
8791 | +} | |
8792 | ||
8793 | /*==========================*/ | |
8794 | /*=== External routines ===*/ | |
8795 | @@ -545,9 +611,6 @@ void | |
8796 | gssd_setup_krb5_user_gss_ccache(uid_t uid, char *servername) | |
8797 | { | |
8798 | char buf[MAX_NETOBJ_SZ]; | |
8799 | -#ifdef HAVE_GSS_KRB5_CCACHE_NAME | |
8800 | - u_int min_stat; | |
8801 | -#endif | |
8802 | struct dirent *d; | |
8803 | ||
8804 | printerr(2, "getting credentials for client with uid %u for " | |
8805 | @@ -564,17 +627,7 @@ gssd_setup_krb5_user_gss_ccache(uid_t ui | |
8806 | GSSD_DEFAULT_CRED_PREFIX, uid); | |
8807 | printerr(2, "using %s as credentials cache for client with " | |
8808 | "uid %u for server %s\n", buf, uid, servername); | |
8809 | -#ifdef HAVE_GSS_KRB5_CCACHE_NAME | |
8810 | - gss_krb5_ccache_name(&min_stat, buf, NULL); | |
8811 | -#else | |
8812 | - /* | |
8813 | - * Set the KRB5CCNAME environment variable to tell the krb5 code | |
8814 | - * which credentials cache to use. (Instead of using the private | |
8815 | - * function above for which there is no generic gssapi | |
8816 | - * equivalent.) | |
8817 | - */ | |
8818 | - setenv("KRB5CCNAME", buf, 1); | |
8819 | -#endif | |
8820 | + gssd_set_krb5_ccache_name(buf); | |
8821 | } | |
8822 | ||
8823 | /* | |
8824 | @@ -586,22 +639,9 @@ gssd_setup_krb5_user_gss_ccache(uid_t ui | |
8825 | void | |
8826 | gssd_setup_krb5_machine_gss_ccache(char *ccname) | |
8827 | { | |
8828 | -#ifdef HAVE_GSS_KRB5_CCACHE_NAME | |
8829 | - u_int min_stat; | |
8830 | -#endif | |
8831 | printerr(2, "using %s as credentials cache for machine creds\n", | |
8832 | ccname); | |
8833 | -#ifdef HAVE_GSS_KRB5_CCACHE_NAME | |
8834 | - gss_krb5_ccache_name(&min_stat, ccname, NULL); | |
8835 | -#else | |
8836 | - /* | |
8837 | - * Set the KRB5CCNAME environment variable to tell the krb5 code | |
8838 | - * which credentials cache to use. (Instead of using the private | |
8839 | - * function above for which there is no generic gssapi | |
8840 | - * equivalent.) | |
8841 | - */ | |
8842 | - setenv("KRB5CCNAME", ccname, 1); | |
8843 | -#endif | |
8844 | + gssd_set_krb5_ccache_name(ccname); | |
8845 | } | |
8846 | ||
8847 | /* | |
8848 | diff -puN utils/svcgssd/svcgssd_main_loop.c~CITI_NFS4_ALL utils/svcgssd/svcgssd_main_loop.c | |
8849 | --- nfs-utils-1.0.7/utils/svcgssd/svcgssd_main_loop.c~CITI_NFS4_ALL 2005-05-06 15:19:23.823030000 -0400 | |
8850 | +++ nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd_main_loop.c 2005-05-06 15:19:23.839029000 -0400 | |
8851 | @@ -58,19 +58,24 @@ gssd_run() | |
8852 | f = fopen(NULLRPC_FILE, "rw"); | |
8853 | ||
8854 | if (!f) { | |
8855 | - printerr(0, "failed to open %s\n", NULLRPC_FILE); | |
8856 | + printerr(0, "failed to open %s: %s\n", | |
8857 | + NULLRPC_FILE, strerror(errno)); | |
8858 | exit(1); | |
8859 | } | |
8860 | pollfd.fd = fileno(f); | |
8861 | pollfd.events = POLLIN; | |
8862 | while (1) { | |
8863 | + int save_err; | |
8864 | + | |
8865 | pollfd.revents = 0; | |
8866 | printerr(1, "entering poll\n"); | |
8867 | ret = poll(&pollfd, 1, -1); | |
8868 | + save_err = errno; | |
8869 | printerr(1, "leaving poll\n"); | |
8870 | if (ret < 0) { | |
8871 | - if (errno != EINTR) | |
8872 | - printerr(0, "error return from poll\n"); | |
8873 | + if (save_err != EINTR) | |
8874 | + printerr(0, "error return from poll: %s\n", | |
8875 | + strerror(save_err)); | |
8876 | } else if (ret == 0) { | |
8877 | /* timeout; shouldn't happen. */ | |
8878 | } else { | |
8879 | diff -puN utils/svcgssd/svcgssd_proc.c~CITI_NFS4_ALL utils/svcgssd/svcgssd_proc.c | |
8880 | --- nfs-utils-1.0.7/utils/svcgssd/svcgssd_proc.c~CITI_NFS4_ALL 2005-05-06 15:19:24.071029000 -0400 | |
8881 | +++ nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd_proc.c 2005-05-06 15:19:24.087029000 -0400 | |
8882 | @@ -52,11 +52,6 @@ | |
8883 | #include "context.h" | |
8884 | #include "cacheio.h" | |
8885 | ||
8886 | -/* XXX: ? */ | |
8887 | -#ifndef NGROUPS | |
8888 | -#define NGROUPS 32 | |
8889 | -#endif | |
8890 | - | |
8891 | extern char * mech2file(gss_OID mech); | |
8892 | #define SVCGSSD_CONTEXT_CHANNEL "/proc/net/rpc/auth.rpcsec.context/channel" | |
8893 | #define SVCGSSD_INIT_CHANNEL "/proc/net/rpc/auth.rpcsec.init/channel" | |
8894 | @@ -162,6 +157,30 @@ send_response(FILE *f, gss_buffer_desc * | |
8895 | #define rpcsec_gsserr_credproblem 13 | |
8896 | #define rpcsec_gsserr_ctxproblem 14 | |
8897 | ||
8898 | +static void | |
8899 | +add_supplementary_groups(char *secname, char *name, struct svc_cred *cred) | |
8900 | +{ | |
8901 | + int ret; | |
8902 | + static gid_t *groups = NULL; | |
8903 | + | |
8904 | + cred->cr_ngroups = NGROUPS; | |
8905 | + ret = nfs4_gss_princ_to_grouplist(secname, name, | |
8906 | + cred->cr_groups, &cred->cr_ngroups); | |
8907 | + if (ret < 0) { | |
8908 | + groups = realloc(groups, cred->cr_ngroups*sizeof(gid_t)); | |
8909 | + ret = nfs4_gss_princ_to_grouplist(secname, name, | |
8910 | + groups, &cred->cr_ngroups); | |
8911 | + if (ret < 0) | |
8912 | + cred->cr_ngroups = 0; | |
8913 | + else { | |
8914 | + if (cred->cr_ngroups > NGROUPS) | |
8915 | + cred->cr_ngroups = NGROUPS; | |
8916 | + memcpy(cred->cr_groups, groups, | |
8917 | + cred->cr_ngroups*sizeof(gid_t)); | |
8918 | + } | |
8919 | + } | |
8920 | +} | |
8921 | + | |
8922 | static int | |
8923 | get_ids(gss_name_t client_name, gss_OID mech, struct svc_cred *cred) | |
8924 | { | |
8925 | @@ -172,6 +191,7 @@ get_ids(gss_name_t client_name, gss_OID | |
8926 | uid_t uid, gid; | |
8927 | gss_OID name_type; | |
8928 | char *secname; | |
8929 | + gid_t *groups; | |
8930 | ||
8931 | maj_stat = gss_display_name(&min_stat, client_name, &name, &name_type); | |
8932 | if (maj_stat != GSS_S_COMPLETE) | |
8933 | @@ -190,8 +210,7 @@ get_ids(gss_name_t client_name, gss_OID | |
8934 | goto out_free; | |
8935 | cred->cr_uid = uid; | |
8936 | cred->cr_gid = gid; | |
8937 | - /*XXX: want add_supplementary_groups(secname, sname, cred)? */ | |
8938 | - cred->cr_ngroups = 0; | |
8939 | + add_supplementary_groups(secname, sname, cred); | |
8940 | res = 0; | |
8941 | out_free: | |
8942 | free(sname); | |
8943 | diff -puN utils/mountd/mountd.c~CITI_NFS4_ALL utils/mountd/mountd.c | |
8944 | --- nfs-utils-1.0.7/utils/mountd/mountd.c~CITI_NFS4_ALL 2005-05-06 15:19:24.223963000 -0400 | |
8945 | +++ nfs-utils-1.0.7-kwc/utils/mountd/mountd.c 2005-05-06 15:19:24.241945000 -0400 | |
8946 | @@ -234,7 +234,10 @@ mount_pathconf_2_svc(struct svc_req *rqs | |
8947 | bool_t | |
8948 | mount_mnt_3_svc(struct svc_req *rqstp, dirpath *path, mountres3 *res) | |
8949 | { | |
8950 | - static int flavors[] = { AUTH_NULL, AUTH_UNIX }; | |
8951 | +#define AUTH_GSS_KRB5 390003 | |
8952 | +#define AUTH_GSS_KRB5I 390004 | |
8953 | +#define AUTH_GSS_KRB5P 390005 | |
8954 | + static int flavors[] = { AUTH_NULL, AUTH_UNIX, AUTH_GSS_KRB5, AUTH_GSS_KRB5I, AUTH_GSS_KRB5P}; | |
8955 | struct nfs_fh_len *fh; | |
8956 | ||
8957 | xlog(D_CALL, "MNT3(%s) called", *path); | |
8958 | @@ -243,7 +246,8 @@ mount_mnt_3_svc(struct svc_req *rqstp, d | |
8959 | ||
8960 | ok->fhandle.fhandle3_len = fh->fh_size; | |
8961 | ok->fhandle.fhandle3_val = fh->fh_handle; | |
8962 | - ok->auth_flavors.auth_flavors_len = 2; | |
8963 | + ok->auth_flavors.auth_flavors_len | |
8964 | + = sizeof(flavors)/sizeof(flavors[0]); | |
8965 | ok->auth_flavors.auth_flavors_val = flavors; | |
8966 | } | |
8967 | return 1; | |
8968 | diff -puN debian/control~CITI_NFS4_ALL debian/control | |
8969 | --- nfs-utils-1.0.7/debian/control~CITI_NFS4_ALL 2005-05-06 15:19:24.380806000 -0400 | |
8970 | +++ nfs-utils-1.0.7-kwc/debian/control 2005-05-06 15:19:25.937448000 -0400 | |
8971 | @@ -2,7 +2,7 @@ Source: nfs-utils | |
8972 | Priority: standard | |
8973 | Section: net | |
8974 | Maintainer: Chip Salzenberg <chip@debian.org> | |
8975 | -Build-Depends: debhelper (>= 4.1.16), libwrap0-dev, libevent-dev, libnfsidmap-dev, libkrb5-dev | |
8976 | +Build-Depends: debhelper (>= 4.1.16), libwrap0-dev, libevent-dev, libnfsidmap-dev, libkrb5-dev, libgssapi-dev, librpcsecgss-dev | |
8977 | Standards-Version: 3.1.1.1 | |
8978 | ||
8979 | Package: nfs-kernel-server | |
8980 | diff -puN -L debian/gssapi_mech.conf debian/gssapi_mech.conf~CITI_NFS4_ALL /dev/null | |
8981 | --- nfs-utils-1.0.7/debian/gssapi_mech.conf | |
8982 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
8983 | @@ -1,19 +0,0 @@ | |
8984 | -# GSSAPI Mechanism Definitions | |
8985 | -# | |
8986 | -# This configuration file determines which GSS-API mechanisms | |
8987 | -# the gssd code should use | |
8988 | -# | |
8989 | -# NOTE: | |
8990 | -# The initiaiization function "mechglue_internal_krb5_init" | |
8991 | -# is used for the MIT krb5 gssapi mechanism. This special | |
8992 | -# function name indicates that an internal function should | |
8993 | -# be used to determine the entry points for the MIT gssapi | |
8994 | -# mechanism funtions. | |
8995 | -# | |
8996 | -# library initialization function | |
8997 | -# ================================ ========================== | |
8998 | -# The MIT K5 gssapi library, use special function for initialization. | |
8999 | -/usr/lib/libgssapi_krb5.so.2 mechglue_internal_krb5_init | |
9000 | -# | |
9001 | -# The SPKM3 gssapi library function. Use the function spkm3_gss_initialize. | |
9002 | -#/usr/local/gss_mechs/spkm/spkm3/libgssapi_spkm3.so spkm3_gss_initialize | |
9003 | diff -puN debian/nfs-common.conffiles~CITI_NFS4_ALL debian/nfs-common.conffiles | |
9004 | --- nfs-utils-1.0.7/debian/nfs-common.conffiles~CITI_NFS4_ALL 2005-05-06 15:19:24.495740000 -0400 | |
9005 | +++ nfs-utils-1.0.7-kwc/debian/nfs-common.conffiles 2005-05-06 15:19:24.693739000 -0400 | |
9006 | @@ -1,4 +1,3 @@ | |
9007 | /etc/default/nfs-common | |
9008 | /etc/init.d/nfs-common | |
9009 | /etc/idmapd.conf | |
9010 | -/etc/gssapi_mech.conf | |
9011 | diff -puN debian/nfs-common.install~CITI_NFS4_ALL debian/nfs-common.install | |
9012 | --- nfs-utils-1.0.7/debian/nfs-common.install~CITI_NFS4_ALL 2005-05-06 15:19:24.553740000 -0400 | |
9013 | +++ nfs-utils-1.0.7-kwc/debian/nfs-common.install 2005-05-06 15:19:24.698741000 -0400 | |
9014 | @@ -1,2 +1 @@ | |
9015 | debian/idmapd.conf etc | |
9016 | -debian/gssapi_mech.conf etc | |
9017 | diff -puN support/Makefile~CITI_NFS4_ALL support/Makefile | |
9018 | --- nfs-utils-1.0.7/support/Makefile~CITI_NFS4_ALL 2005-05-06 15:19:24.614738000 -0400 | |
9019 | +++ nfs-utils-1.0.7-kwc/support/Makefile 2005-05-06 15:19:25.944448000 -0400 | |
9020 | @@ -2,7 +2,7 @@ | |
9021 | # Makefile for linux-nfs/support | |
9022 | # | |
9023 | ||
9024 | -SUBDIRS = include nfs export lib misc rpc gssapi | |
9025 | +SUBDIRS = include nfs export lib misc | |
9026 | .DEFAULT: all | |
9027 | ||
9028 | include $(TOP)rules.mk | |
9029 | diff -puN utils/gssd/Makefile~CITI_NFS4_ALL utils/gssd/Makefile | |
9030 | --- nfs-utils-1.0.7/utils/gssd/Makefile~CITI_NFS4_ALL 2005-05-06 15:19:24.671739000 -0400 | |
9031 | +++ nfs-utils-1.0.7-kwc/utils/gssd/Makefile 2005-05-06 15:19:26.010447000 -0400 | |
9032 | @@ -6,8 +6,7 @@ PROGRAM = gssd | |
9033 | PREFIX = rpc. | |
9034 | OBJS = gssd.o gssd_main_loop.o gssd_proc.o err_util.o gss_util.o \ | |
9035 | gss_oids.o context.o context_heimdal.o krb5_util.o | |
9036 | -LIBDEPS = $(TOP)support/lib/librpc.a $(TOP)support/lib/libgssapi.a | |
9037 | -LIBS = -Wl,-rpath=$(KRBDIR)/lib -lrpc -lgssapi -ldl $(KRBLIB) | |
9038 | +LIBS = -Wl,-rpath=$(KRBDIR)/lib -lrpcsecgss -lgssapi -ldl $(KRBLIB) | |
9039 | MAN8 = gssd | |
9040 | ||
9041 | include $(TOP)rules.mk | |
9042 | diff -puN -L support/rpc/auth_gss.c support/rpc/auth_gss.c~CITI_NFS4_ALL /dev/null | |
9043 | --- nfs-utils-1.0.7/support/rpc/auth_gss.c | |
9044 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
9045 | @@ -1,628 +0,0 @@ | |
9046 | -/* | |
9047 | - auth_gss.c | |
9048 | - | |
9049 | - RPCSEC_GSS client routines. | |
9050 | - | |
9051 | - Copyright (c) 2000 The Regents of the University of Michigan. | |
9052 | - All rights reserved. | |
9053 | - | |
9054 | - Copyright (c) 2000 Dug Song <dugsong@UMICH.EDU>. | |
9055 | - All rights reserved, all wrongs reversed. | |
9056 | - | |
9057 | - Redistribution and use in source and binary forms, with or without | |
9058 | - modification, are permitted provided that the following conditions | |
9059 | - are met: | |
9060 | - | |
9061 | - 1. Redistributions of source code must retain the above copyright | |
9062 | - notice, this list of conditions and the following disclaimer. | |
9063 | - 2. Redistributions in binary form must reproduce the above copyright | |
9064 | - notice, this list of conditions and the following disclaimer in the | |
9065 | - documentation and/or other materials provided with the distribution. | |
9066 | - 3. Neither the name of the University nor the names of its | |
9067 | - contributors may be used to endorse or promote products derived | |
9068 | - from this software without specific prior written permission. | |
9069 | - | |
9070 | - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | |
9071 | - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
9072 | - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
9073 | - DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
9074 | - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
9075 | - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
9076 | - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
9077 | - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
9078 | - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
9079 | - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
9080 | - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
9081 | - | |
9082 | -*/ | |
9083 | - | |
9084 | -#include <stdio.h> | |
9085 | -#include <stdlib.h> | |
9086 | -#include <unistd.h> | |
9087 | -#include <string.h> | |
9088 | -#include <errno.h> | |
9089 | -#include <rpc/types.h> | |
9090 | -#include <rpc/xdr.h> | |
9091 | -#include <rpc/auth.h> | |
9092 | -#include <rpc/auth_gss.h> | |
9093 | -#include <rpc/clnt.h> | |
9094 | -#include <netinet/in.h> | |
9095 | -#include <gssapi/gssapi.h> | |
9096 | - | |
9097 | -static void authgss_nextverf(); | |
9098 | -static bool_t authgss_marshal(); | |
9099 | -static bool_t authgss_refresh(); | |
9100 | -static bool_t authgss_validate(); | |
9101 | -static void authgss_destroy(); | |
9102 | -static void authgss_destroy_context(); | |
9103 | -static bool_t authgss_wrap(); | |
9104 | -static bool_t authgss_unwrap(); | |
9105 | - | |
9106 | - | |
9107 | -/* | |
9108 | - * from mit-krb5-1.2.1 mechglue/mglueP.h: | |
9109 | - * Array of context IDs typed by mechanism OID | |
9110 | - */ | |
9111 | -typedef struct gss_union_ctx_id_t { | |
9112 | - gss_OID mech_type; | |
9113 | - gss_ctx_id_t internal_ctx_id; | |
9114 | -} gss_union_ctx_id_desc, *gss_union_ctx_id_t; | |
9115 | - | |
9116 | -static struct auth_ops authgss_ops = { | |
9117 | - authgss_nextverf, | |
9118 | - authgss_marshal, | |
9119 | - authgss_validate, | |
9120 | - authgss_refresh, | |
9121 | - authgss_destroy, | |
9122 | - authgss_wrap, | |
9123 | - authgss_unwrap | |
9124 | -}; | |
9125 | - | |
9126 | -#ifdef DEBUG | |
9127 | - | |
9128 | -/* useful as i add more mechanisms */ | |
9129 | -void | |
9130 | -print_rpc_gss_sec(struct rpc_gss_sec *ptr) | |
9131 | -{ | |
9132 | -int i; | |
9133 | -char *p; | |
9134 | - | |
9135 | - log_debug("rpc_gss_sec:"); | |
9136 | - if(ptr->mech == NULL) | |
9137 | - log_debug("NULL gss_OID mech"); | |
9138 | - else { | |
9139 | - fprintf(stderr, " mechanism_OID: {"); | |
9140 | - p = (char *)ptr->mech->elements; | |
9141 | - for (i=0; i < ptr->mech->length; i++) | |
9142 | - /* First byte of OIDs encoded to save a byte */ | |
9143 | - if (i == 0) { | |
9144 | - int first, second; | |
9145 | - if (*p < 40) { | |
9146 | - first = 0; | |
9147 | - second = *p; | |
9148 | - } | |
9149 | - else if (40 <= *p && *p < 80) { | |
9150 | - first = 1; | |
9151 | - second = *p - 40; | |
9152 | - } | |
9153 | - else if (80 <= *p && *p < 127) { | |
9154 | - first = 2; | |
9155 | - second = *p - 80; | |
9156 | - } | |
9157 | - else { | |
9158 | - /* Invalid value! */ | |
9159 | - first = -1; | |
9160 | - second = -1; | |
9161 | - } | |
9162 | - fprintf(stderr, " %u %u", first, second); | |
9163 | - p++; | |
9164 | - } | |
9165 | - else { | |
9166 | - fprintf(stderr, " %u", (unsigned char)*p++); | |
9167 | - } | |
9168 | - fprintf(stderr, " }\n"); | |
9169 | - } | |
9170 | - fprintf(stderr, " qop: %d\n", ptr->qop); | |
9171 | - fprintf(stderr, " service: %d\n", ptr->svc); | |
9172 | - fprintf(stderr, " cred: %p\n", ptr->cred); | |
9173 | -} | |
9174 | -#endif /*DEBUG*/ | |
9175 | - | |
9176 | -struct rpc_gss_data { | |
9177 | - bool_t established; /* context established */ | |
9178 | - gss_buffer_desc gc_wire_verf; /* save GSS_S_COMPLETE NULL RPC verfier | |
9179 | - * to process at end of context negotiation*/ | |
9180 | - CLIENT *clnt; /* client handle */ | |
9181 | - gss_name_t name; /* service name */ | |
9182 | - struct rpc_gss_sec sec; /* security tuple */ | |
9183 | - gss_ctx_id_t ctx; /* context id */ | |
9184 | - struct rpc_gss_cred gc; /* client credentials */ | |
9185 | - u_int win; /* sequence window */ | |
9186 | -}; | |
9187 | - | |
9188 | -#define AUTH_PRIVATE(auth) ((struct rpc_gss_data *)auth->ah_private) | |
9189 | - | |
9190 | -static struct timeval AUTH_TIMEOUT = { 25, 0 }; | |
9191 | - | |
9192 | -AUTH * | |
9193 | -authgss_create(CLIENT *clnt, gss_name_t name, struct rpc_gss_sec *sec) | |
9194 | -{ | |
9195 | - AUTH *auth, *save_auth; | |
9196 | - struct rpc_gss_data *gd; | |
9197 | - OM_uint32 min_stat = 0; | |
9198 | - | |
9199 | - log_debug("in authgss_create()"); | |
9200 | - | |
9201 | - memset(&rpc_createerr, 0, sizeof(rpc_createerr)); | |
9202 | - | |
9203 | - if ((auth = calloc(sizeof(*auth), 1)) == NULL) { | |
9204 | - rpc_createerr.cf_stat = RPC_SYSTEMERROR; | |
9205 | - rpc_createerr.cf_error.re_errno = ENOMEM; | |
9206 | - return (NULL); | |
9207 | - } | |
9208 | - if ((gd = calloc(sizeof(*gd), 1)) == NULL) { | |
9209 | - rpc_createerr.cf_stat = RPC_SYSTEMERROR; | |
9210 | - rpc_createerr.cf_error.re_errno = ENOMEM; | |
9211 | - free(auth); | |
9212 | - return (NULL); | |
9213 | - } | |
9214 | -#ifdef DEBUG | |
9215 | - fprintf(stderr, "authgss_create: name is %p\n", name); | |
9216 | -#endif | |
9217 | - if (name != GSS_C_NO_NAME) { | |
9218 | - if (gss_duplicate_name(&min_stat, name, &gd->name) | |
9219 | - != GSS_S_COMPLETE) { | |
9220 | - rpc_createerr.cf_stat = RPC_SYSTEMERROR; | |
9221 | - rpc_createerr.cf_error.re_errno = ENOMEM; | |
9222 | - free(auth); | |
9223 | - return (NULL); | |
9224 | - } | |
9225 | - } | |
9226 | - else | |
9227 | - gd->name = name; | |
9228 | - | |
9229 | -#ifdef DEBUG | |
9230 | - fprintf(stderr, "authgss_create: gd->name is %p\n", gd->name); | |
9231 | -#endif | |
9232 | - gd->clnt = clnt; | |
9233 | - gd->ctx = GSS_C_NO_CONTEXT; | |
9234 | - gd->sec = *sec; | |
9235 | - | |
9236 | - gd->gc.gc_v = RPCSEC_GSS_VERSION; | |
9237 | - gd->gc.gc_proc = RPCSEC_GSS_INIT; | |
9238 | - gd->gc.gc_svc = gd->sec.svc; | |
9239 | - | |
9240 | - auth->ah_ops = &authgss_ops; | |
9241 | - auth->ah_private = (caddr_t)gd; | |
9242 | - | |
9243 | - save_auth = clnt->cl_auth; | |
9244 | - clnt->cl_auth = auth; | |
9245 | - | |
9246 | - if (!authgss_refresh(auth)) | |
9247 | - auth = NULL; | |
9248 | - | |
9249 | - clnt->cl_auth = save_auth; | |
9250 | - | |
9251 | - return (auth); | |
9252 | -} | |
9253 | - | |
9254 | -AUTH * | |
9255 | -authgss_create_default(CLIENT *clnt, char *service, struct rpc_gss_sec *sec) | |
9256 | -{ | |
9257 | - AUTH *auth; | |
9258 | - OM_uint32 maj_stat = 0, min_stat = 0; | |
9259 | - gss_buffer_desc sname; | |
9260 | - gss_name_t name = GSS_C_NO_NAME; | |
9261 | - | |
9262 | - log_debug("in authgss_create_default()"); | |
9263 | - | |
9264 | - | |
9265 | - sname.value = service; | |
9266 | - sname.length = strlen(service); | |
9267 | - | |
9268 | - maj_stat = gss_import_name(&min_stat, &sname, | |
9269 | - GSS_C_NT_HOSTBASED_SERVICE, | |
9270 | - &name); | |
9271 | - | |
9272 | - if (maj_stat != GSS_S_COMPLETE) { | |
9273 | - log_status("gss_import_name", maj_stat, min_stat); | |
9274 | - rpc_createerr.cf_stat = RPC_AUTHERROR; | |
9275 | - return (NULL); | |
9276 | - } | |
9277 | - | |
9278 | - auth = authgss_create(clnt, name, sec); | |
9279 | - | |
9280 | - if (name != GSS_C_NO_NAME) { | |
9281 | -#ifdef DEBUG | |
9282 | - fprintf(stderr, "authgss_create_default: freeing name %p\n", name); | |
9283 | -#endif | |
9284 | - gss_release_name(&min_stat, &name); | |
9285 | - } | |
9286 | - | |
9287 | - return (auth); | |
9288 | -} | |
9289 | - | |
9290 | -bool_t | |
9291 | -authgss_get_private_data(AUTH *auth, struct authgss_private_data *pd) | |
9292 | -{ | |
9293 | - struct rpc_gss_data *gd; | |
9294 | - | |
9295 | - log_debug("in authgss_get_private_data()"); | |
9296 | - | |
9297 | - if (!auth || !pd) | |
9298 | - return (FALSE); | |
9299 | - | |
9300 | - gd = AUTH_PRIVATE(auth); | |
9301 | - | |
9302 | - if (!gd || !gd->established) | |
9303 | - return (FALSE); | |
9304 | - | |
9305 | - pd->pd_ctx = gd->ctx; | |
9306 | - pd->pd_ctx_hndl = gd->gc.gc_ctx; | |
9307 | - pd->pd_seq_win = gd->win; | |
9308 | - | |
9309 | - return (TRUE); | |
9310 | -} | |
9311 | - | |
9312 | -static void | |
9313 | -authgss_nextverf(AUTH *auth) | |
9314 | -{ | |
9315 | - log_debug("in authgss_nextverf()"); | |
9316 | - /* no action necessary */ | |
9317 | -} | |
9318 | - | |
9319 | -static bool_t | |
9320 | -authgss_marshal(AUTH *auth, XDR *xdrs) | |
9321 | -{ | |
9322 | - XDR tmpxdrs; | |
9323 | - char tmp[MAX_AUTH_BYTES]; | |
9324 | - struct rpc_gss_data *gd; | |
9325 | - gss_buffer_desc rpcbuf, checksum; | |
9326 | - OM_uint32 maj_stat, min_stat; | |
9327 | - bool_t xdr_stat; | |
9328 | - | |
9329 | - log_debug("in authgss_marshal()"); | |
9330 | - | |
9331 | - gd = AUTH_PRIVATE(auth); | |
9332 | - | |
9333 | - if (gd->established) | |
9334 | - gd->gc.gc_seq++; | |
9335 | - | |
9336 | - xdrmem_create(&tmpxdrs, tmp, sizeof(tmp), XDR_ENCODE); | |
9337 | - | |
9338 | - if (!xdr_rpc_gss_cred(&tmpxdrs, &gd->gc)) { | |
9339 | - XDR_DESTROY(&tmpxdrs); | |
9340 | - return (FALSE); | |
9341 | - } | |
9342 | - auth->ah_cred.oa_flavor = RPCSEC_GSS; | |
9343 | - auth->ah_cred.oa_base = tmp; | |
9344 | - auth->ah_cred.oa_length = XDR_GETPOS(&tmpxdrs); | |
9345 | - | |
9346 | - XDR_DESTROY(&tmpxdrs); | |
9347 | - | |
9348 | - if (!xdr_opaque_auth(xdrs, &auth->ah_cred)) | |
9349 | - return (FALSE); | |
9350 | - | |
9351 | - if (gd->gc.gc_proc == RPCSEC_GSS_INIT || | |
9352 | - gd->gc.gc_proc == RPCSEC_GSS_CONTINUE_INIT) { | |
9353 | - return (xdr_opaque_auth(xdrs, &_null_auth)); | |
9354 | - } | |
9355 | - /* Checksum serialized RPC header, up to and including credential. */ | |
9356 | - rpcbuf.length = XDR_GETPOS(xdrs); | |
9357 | - XDR_SETPOS(xdrs, 0); | |
9358 | - rpcbuf.value = XDR_INLINE(xdrs, rpcbuf.length); | |
9359 | - | |
9360 | - maj_stat = gss_get_mic(&min_stat, gd->ctx, gd->sec.qop, | |
9361 | - &rpcbuf, &checksum); | |
9362 | - | |
9363 | - if (maj_stat != GSS_S_COMPLETE) { | |
9364 | - log_status("gss_get_mic", maj_stat, min_stat); | |
9365 | - if (maj_stat == GSS_S_CONTEXT_EXPIRED) { | |
9366 | - gd->established = FALSE; | |
9367 | - authgss_destroy_context(auth); | |
9368 | - } | |
9369 | - return (FALSE); | |
9370 | - } | |
9371 | - auth->ah_verf.oa_flavor = RPCSEC_GSS; | |
9372 | - auth->ah_verf.oa_base = checksum.value; | |
9373 | - auth->ah_verf.oa_length = checksum.length; | |
9374 | - | |
9375 | - xdr_stat = xdr_opaque_auth(xdrs, &auth->ah_verf); | |
9376 | - gss_release_buffer(&min_stat, &checksum); | |
9377 | - | |
9378 | - return (xdr_stat); | |
9379 | -} | |
9380 | - | |
9381 | -static bool_t | |
9382 | -authgss_validate(AUTH *auth, struct opaque_auth *verf) | |
9383 | -{ | |
9384 | - struct rpc_gss_data *gd; | |
9385 | - u_int num, qop_state; | |
9386 | - gss_buffer_desc signbuf, checksum; | |
9387 | - OM_uint32 maj_stat, min_stat; | |
9388 | - | |
9389 | - log_debug("in authgss_validate()"); | |
9390 | - | |
9391 | - gd = AUTH_PRIVATE(auth); | |
9392 | - | |
9393 | - if (gd->established == FALSE) { | |
9394 | - /* would like to do this only on NULL rpc -- | |
9395 | - * gc->established is good enough. | |
9396 | - * save the on the wire verifier to validate last | |
9397 | - * INIT phase packet after decode if the major | |
9398 | - * status is GSS_S_COMPLETE | |
9399 | - */ | |
9400 | - if ((gd->gc_wire_verf.value = | |
9401 | - mem_alloc(verf->oa_length)) == NULL) { | |
9402 | - fprintf(stderr, "gss_validate: out of memory\n"); | |
9403 | - return (FALSE); | |
9404 | - } | |
9405 | - memcpy(gd->gc_wire_verf.value, verf->oa_base, verf->oa_length); | |
9406 | - gd->gc_wire_verf.length = verf->oa_length; | |
9407 | - return (TRUE); | |
9408 | - } | |
9409 | - | |
9410 | - if (gd->gc.gc_proc == RPCSEC_GSS_INIT || | |
9411 | - gd->gc.gc_proc == RPCSEC_GSS_CONTINUE_INIT) { | |
9412 | - num = htonl(gd->win); | |
9413 | - } | |
9414 | - else num = htonl(gd->gc.gc_seq); | |
9415 | - | |
9416 | - signbuf.value = # | |
9417 | - signbuf.length = sizeof(num); | |
9418 | - | |
9419 | - checksum.value = verf->oa_base; | |
9420 | - checksum.length = verf->oa_length; | |
9421 | - | |
9422 | - maj_stat = gss_verify_mic(&min_stat, gd->ctx, &signbuf, | |
9423 | - &checksum, &qop_state); | |
9424 | - if (maj_stat != GSS_S_COMPLETE || qop_state != gd->sec.qop) { | |
9425 | - log_status("gss_verify_mic", maj_stat, min_stat); | |
9426 | - if (maj_stat == GSS_S_CONTEXT_EXPIRED) { | |
9427 | - gd->established = FALSE; | |
9428 | - authgss_destroy_context(auth); | |
9429 | - } | |
9430 | - return (FALSE); | |
9431 | - } | |
9432 | - return (TRUE); | |
9433 | -} | |
9434 | - | |
9435 | -static bool_t | |
9436 | -authgss_refresh(AUTH *auth) | |
9437 | -{ | |
9438 | - struct rpc_gss_data *gd; | |
9439 | - struct rpc_gss_init_res gr; | |
9440 | - gss_buffer_desc *recv_tokenp, send_token; | |
9441 | - OM_uint32 maj_stat, min_stat, call_stat, ret_flags; | |
9442 | - OM_uint32 req_flags=0; | |
9443 | - | |
9444 | - log_debug("in authgss_refresh()"); | |
9445 | - | |
9446 | - gd = AUTH_PRIVATE(auth); | |
9447 | - | |
9448 | - if (gd->established) | |
9449 | - return (TRUE); | |
9450 | - | |
9451 | - /* GSS context establishment loop. */ | |
9452 | - memset(&gr, 0, sizeof(gr)); | |
9453 | - recv_tokenp = GSS_C_NO_BUFFER; | |
9454 | - | |
9455 | -#ifdef DEBUG | |
9456 | - print_rpc_gss_sec(&gd->sec); | |
9457 | -#endif /*DEBUG*/ | |
9458 | - | |
9459 | - for (;;) { | |
9460 | -#ifdef DEBUG | |
9461 | - /* print the token we just received */ | |
9462 | - if (recv_tokenp != GSS_C_NO_BUFFER) { | |
9463 | - log_debug("The token we just received (length %d):", | |
9464 | - recv_tokenp->length); | |
9465 | - log_hexdump(recv_tokenp->value, recv_tokenp->length, 0); | |
9466 | - } | |
9467 | -#endif | |
9468 | - maj_stat = gss_init_sec_context(&min_stat, | |
9469 | - gd->sec.cred, | |
9470 | - &gd->ctx, | |
9471 | - gd->name, | |
9472 | - gd->sec.mech, | |
9473 | - gd->sec.req_flags, | |
9474 | - 0, /* time req */ | |
9475 | - NULL, /* channel */ | |
9476 | - recv_tokenp, | |
9477 | - NULL, /* used mech */ | |
9478 | - &send_token, | |
9479 | - &ret_flags, | |
9480 | - NULL); /* time rec */ | |
9481 | - | |
9482 | - if (recv_tokenp != GSS_C_NO_BUFFER) { | |
9483 | - gss_release_buffer(&min_stat, &gr.gr_token); | |
9484 | - recv_tokenp = GSS_C_NO_BUFFER; | |
9485 | - } | |
9486 | - if (maj_stat != GSS_S_COMPLETE && | |
9487 | - maj_stat != GSS_S_CONTINUE_NEEDED) { | |
9488 | - log_status("gss_init_sec_context", maj_stat, min_stat); | |
9489 | - break; | |
9490 | - } | |
9491 | - if (send_token.length != 0) { | |
9492 | - memset(&gr, 0, sizeof(gr)); | |
9493 | - | |
9494 | -#ifdef DEBUG | |
9495 | - /* print the token we are about to send */ | |
9496 | - log_debug("The token being sent (length %d):", | |
9497 | - send_token.length); | |
9498 | - log_hexdump(send_token.value, send_token.length, 0); | |
9499 | -#endif | |
9500 | - | |
9501 | - call_stat = clnt_call(gd->clnt, NULLPROC, | |
9502 | - xdr_rpc_gss_init_args, | |
9503 | - &send_token, | |
9504 | - xdr_rpc_gss_init_res, | |
9505 | - (caddr_t)&gr, AUTH_TIMEOUT); | |
9506 | - | |
9507 | - gss_release_buffer(&min_stat, &send_token); | |
9508 | - | |
9509 | - if (call_stat != RPC_SUCCESS || | |
9510 | - (gr.gr_major != GSS_S_COMPLETE && | |
9511 | - gr.gr_major != GSS_S_CONTINUE_NEEDED)) | |
9512 | - return FALSE; | |
9513 | - | |
9514 | - if (gr.gr_ctx.length != 0) { | |
9515 | - if (gd->gc.gc_ctx.value) | |
9516 | - gss_release_buffer(&min_stat, | |
9517 | - &gd->gc.gc_ctx); | |
9518 | - gd->gc.gc_ctx = gr.gr_ctx; | |
9519 | - } | |
9520 | - if (gr.gr_token.length != 0) { | |
9521 | - if (maj_stat != GSS_S_CONTINUE_NEEDED) | |
9522 | - break; | |
9523 | - recv_tokenp = &gr.gr_token; | |
9524 | - } | |
9525 | - gd->gc.gc_proc = RPCSEC_GSS_CONTINUE_INIT; | |
9526 | - } | |
9527 | - | |
9528 | - /* GSS_S_COMPLETE => check gss header verifier, | |
9529 | - * usually checked in gss_validate | |
9530 | - */ | |
9531 | - if (maj_stat == GSS_S_COMPLETE) { | |
9532 | - gss_buffer_desc bufin; | |
9533 | - gss_buffer_desc bufout; | |
9534 | - u_int seq, qop_state = 0; | |
9535 | - | |
9536 | - seq = htonl(gr.gr_win); | |
9537 | - bufin.value = (unsigned char *)&seq; | |
9538 | - bufin.length = sizeof(seq); | |
9539 | - bufout.value = (unsigned char *)gd->gc_wire_verf.value; | |
9540 | - bufout.length = gd->gc_wire_verf.length; | |
9541 | - | |
9542 | - maj_stat = gss_verify_mic(&min_stat, gd->ctx, | |
9543 | - &bufin, &bufout, &qop_state); | |
9544 | - | |
9545 | - if (maj_stat != GSS_S_COMPLETE | |
9546 | - || qop_state != gd->sec.qop) { | |
9547 | - log_status("gss_verify_mic", maj_stat, min_stat); | |
9548 | - if (maj_stat == GSS_S_CONTEXT_EXPIRED) { | |
9549 | - gd->established = FALSE; | |
9550 | - authgss_destroy_context(auth); | |
9551 | - } | |
9552 | - return (FALSE); | |
9553 | - } | |
9554 | - gd->established = TRUE; | |
9555 | - gd->gc.gc_proc = RPCSEC_GSS_DATA; | |
9556 | - gd->gc.gc_seq = 0; | |
9557 | - gd->win = gr.gr_win; | |
9558 | - break; | |
9559 | - } | |
9560 | - } | |
9561 | - /* End context negotiation loop. */ | |
9562 | - if (gd->gc.gc_proc != RPCSEC_GSS_DATA) { | |
9563 | - if (gr.gr_token.length != 0) | |
9564 | - gss_release_buffer(&min_stat, &gr.gr_token); | |
9565 | - | |
9566 | - authgss_destroy(auth); | |
9567 | - auth = NULL; | |
9568 | - rpc_createerr.cf_stat = RPC_AUTHERROR; | |
9569 | - | |
9570 | - return (FALSE); | |
9571 | - } | |
9572 | - return (TRUE); | |
9573 | -} | |
9574 | - | |
9575 | -bool_t | |
9576 | -authgss_service(AUTH *auth, int svc) | |
9577 | -{ | |
9578 | - struct rpc_gss_data *gd; | |
9579 | - | |
9580 | - log_debug("in authgss_service()"); | |
9581 | - | |
9582 | - if (!auth) | |
9583 | - return(FALSE); | |
9584 | - gd = AUTH_PRIVATE(auth); | |
9585 | - if (!gd || !gd->established) | |
9586 | - return (FALSE); | |
9587 | - gd->sec.svc = svc; | |
9588 | - gd->gc.gc_svc = svc; | |
9589 | - return (TRUE); | |
9590 | -} | |
9591 | - | |
9592 | -static void | |
9593 | -authgss_destroy_context(AUTH *auth) | |
9594 | -{ | |
9595 | - struct rpc_gss_data *gd; | |
9596 | - OM_uint32 min_stat; | |
9597 | - | |
9598 | - log_debug("in authgss_destroy_context()"); | |
9599 | - | |
9600 | - gd = AUTH_PRIVATE(auth); | |
9601 | - | |
9602 | - if (gd->gc.gc_ctx.length != 0) { | |
9603 | - if (gd->established) { | |
9604 | - gd->gc.gc_proc = RPCSEC_GSS_DESTROY; | |
9605 | - clnt_call(gd->clnt, NULLPROC, xdr_void, NULL, | |
9606 | - xdr_void, NULL, AUTH_TIMEOUT); | |
9607 | - } | |
9608 | - gss_release_buffer(&min_stat, &gd->gc.gc_ctx); | |
9609 | - /* XXX ANDROS check size of context - should be 8 */ | |
9610 | - memset(&gd->gc.gc_ctx, 0, sizeof(gd->gc.gc_ctx)); | |
9611 | - } | |
9612 | - if (gd->ctx != GSS_C_NO_CONTEXT) { | |
9613 | - gss_delete_sec_context(&min_stat, &gd->ctx, NULL); | |
9614 | - gd->ctx = GSS_C_NO_CONTEXT; | |
9615 | - } | |
9616 | - gd->established = FALSE; | |
9617 | -} | |
9618 | - | |
9619 | -static void | |
9620 | -authgss_destroy(AUTH *auth) | |
9621 | -{ | |
9622 | - struct rpc_gss_data *gd; | |
9623 | - OM_uint32 min_stat; | |
9624 | - | |
9625 | - log_debug("in authgss_destroy()"); | |
9626 | - | |
9627 | - gd = AUTH_PRIVATE(auth); | |
9628 | - | |
9629 | - authgss_destroy_context(auth); | |
9630 | - | |
9631 | -#ifdef DEBUG | |
9632 | - fprintf(stderr, "authgss_destroy: freeing name %p\n", gd->name); | |
9633 | -#endif | |
9634 | - if (gd->name != GSS_C_NO_NAME) | |
9635 | - gss_release_name(&min_stat, &gd->name); | |
9636 | - | |
9637 | - free(gd); | |
9638 | - free(auth); | |
9639 | -} | |
9640 | - | |
9641 | -bool_t | |
9642 | -authgss_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr) | |
9643 | -{ | |
9644 | - struct rpc_gss_data *gd; | |
9645 | - | |
9646 | - log_debug("in authgss_wrap()"); | |
9647 | - | |
9648 | - gd = AUTH_PRIVATE(auth); | |
9649 | - | |
9650 | - if (!gd->established || gd->sec.svc == RPCSEC_GSS_SVC_NONE) { | |
9651 | - return ((*xdr_func)(xdrs, xdr_ptr)); | |
9652 | - } | |
9653 | - return (xdr_rpc_gss_data(xdrs, xdr_func, xdr_ptr, | |
9654 | - gd->ctx, gd->sec.qop, | |
9655 | - gd->sec.svc, gd->gc.gc_seq)); | |
9656 | -} | |
9657 | - | |
9658 | -bool_t | |
9659 | -authgss_unwrap(AUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr) | |
9660 | -{ | |
9661 | - struct rpc_gss_data *gd; | |
9662 | - | |
9663 | - log_debug("in authgss_unwrap()"); | |
9664 | - | |
9665 | - gd = AUTH_PRIVATE(auth); | |
9666 | - | |
9667 | - if (!gd->established || gd->sec.svc == RPCSEC_GSS_SVC_NONE) { | |
9668 | - return ((*xdr_func)(xdrs, xdr_ptr)); | |
9669 | - } | |
9670 | - return (xdr_rpc_gss_data(xdrs, xdr_func, xdr_ptr, | |
9671 | - gd->ctx, gd->sec.qop, | |
9672 | - gd->sec.svc, gd->gc.gc_seq)); | |
9673 | -} | |
9674 | diff -puN -L support/rpc/authgss_prot.c support/rpc/authgss_prot.c~CITI_NFS4_ALL /dev/null | |
9675 | --- nfs-utils-1.0.7/support/rpc/authgss_prot.c | |
9676 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
9677 | @@ -1,355 +0,0 @@ | |
9678 | -/* | |
9679 | - authgss_prot.c | |
9680 | - | |
9681 | - Copyright (c) 2000 The Regents of the University of Michigan. | |
9682 | - All rights reserved. | |
9683 | - | |
9684 | - Copyright (c) 2000 Dug Song <dugsong@UMICH.EDU>. | |
9685 | - All rights reserved, all wrongs reversed. | |
9686 | - | |
9687 | - Redistribution and use in source and binary forms, with or without | |
9688 | - modification, are permitted provided that the following conditions | |
9689 | - are met: | |
9690 | - | |
9691 | - 1. Redistributions of source code must retain the above copyright | |
9692 | - notice, this list of conditions and the following disclaimer. | |
9693 | - 2. Redistributions in binary form must reproduce the above copyright | |
9694 | - notice, this list of conditions and the following disclaimer in the | |
9695 | - documentation and/or other materials provided with the distribution. | |
9696 | - 3. Neither the name of the University nor the names of its | |
9697 | - contributors may be used to endorse or promote products derived | |
9698 | - from this software without specific prior written permission. | |
9699 | - | |
9700 | - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | |
9701 | - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
9702 | - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
9703 | - DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
9704 | - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
9705 | - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
9706 | - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
9707 | - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
9708 | - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
9709 | - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
9710 | - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
9711 | - | |
9712 | -*/ | |
9713 | - | |
9714 | -#include <stdio.h> | |
9715 | -#include <stdlib.h> | |
9716 | -#include <stdarg.h> | |
9717 | -#include <rpc/types.h> | |
9718 | -#include <rpc/xdr.h> | |
9719 | -#include <rpc/auth.h> | |
9720 | -#include <rpc/auth_gss.h> | |
9721 | -#include <rpc/rpc.h> | |
9722 | -#include <gssapi/gssapi.h> | |
9723 | - | |
9724 | -bool_t | |
9725 | -xdr_rpc_gss_cred(XDR *xdrs, struct rpc_gss_cred *p) | |
9726 | -{ | |
9727 | - bool_t xdr_stat; | |
9728 | - | |
9729 | - xdr_stat = (xdr_u_int(xdrs, &p->gc_v) && | |
9730 | - xdr_enum(xdrs, (enum_t *)&p->gc_proc) && | |
9731 | - xdr_u_int(xdrs, &p->gc_seq) && | |
9732 | - xdr_enum(xdrs, (enum_t *)&p->gc_svc) && | |
9733 | - xdr_bytes(xdrs, (char **)&p->gc_ctx.value, | |
9734 | - &p->gc_ctx.length, MAX_AUTH_BYTES)); | |
9735 | - | |
9736 | - log_debug("xdr_rpc_gss_cred: %s %s " | |
9737 | - "(v %d, proc %d, seq %d, svc %d, ctx %p:%d)", | |
9738 | - (xdrs->x_op == XDR_ENCODE) ? "encode" : "decode", | |
9739 | - (xdr_stat == TRUE) ? "success" : "failure", | |
9740 | - p->gc_v, p->gc_proc, p->gc_seq, p->gc_svc, | |
9741 | - p->gc_ctx.value, p->gc_ctx.length); | |
9742 | - | |
9743 | - return (xdr_stat); | |
9744 | -} | |
9745 | - | |
9746 | -bool_t | |
9747 | -xdr_rpc_gss_init_args(XDR *xdrs, gss_buffer_desc *p) | |
9748 | -{ | |
9749 | - bool_t xdr_stat; | |
9750 | - | |
9751 | - xdr_stat = xdr_bytes(xdrs, (char **)&p->value, | |
9752 | - &p->length, MAX_NETOBJ_SZ); | |
9753 | - | |
9754 | - log_debug("xdr_rpc_gss_init_args: %s %s (token %p:%d)", | |
9755 | - (xdrs->x_op == XDR_ENCODE) ? "encode" : "decode", | |
9756 | - (xdr_stat == TRUE) ? "success" : "failure", | |
9757 | - p->value, p->length); | |
9758 | - | |
9759 | - return (xdr_stat); | |
9760 | -} | |
9761 | - | |
9762 | -bool_t | |
9763 | -xdr_rpc_gss_init_res(XDR *xdrs, struct rpc_gss_init_res *p) | |
9764 | -{ | |
9765 | - bool_t xdr_stat; | |
9766 | - | |
9767 | - xdr_stat = (xdr_bytes(xdrs, (char **)&p->gr_ctx.value, | |
9768 | - &p->gr_ctx.length, MAX_NETOBJ_SZ) && | |
9769 | - xdr_u_int(xdrs, &p->gr_major) && | |
9770 | - xdr_u_int(xdrs, &p->gr_minor) && | |
9771 | - xdr_u_int(xdrs, &p->gr_win) && | |
9772 | - xdr_bytes(xdrs, (char **)&p->gr_token.value, | |
9773 | - &p->gr_token.length, MAX_NETOBJ_SZ)); | |
9774 | - | |
9775 | - log_debug("xdr_rpc_gss_init_res %s %s " | |
9776 | - "(ctx %p:%d, maj %d, min %d, win %d, token %p:%d)", | |
9777 | - (xdrs->x_op == XDR_ENCODE) ? "encode" : "decode", | |
9778 | - (xdr_stat == TRUE) ? "success" : "failure", | |
9779 | - p->gr_ctx.value, p->gr_ctx.length, | |
9780 | - p->gr_major, p->gr_minor, p->gr_win, | |
9781 | - p->gr_token.value, p->gr_token.length); | |
9782 | - | |
9783 | - return (xdr_stat); | |
9784 | -} | |
9785 | - | |
9786 | -bool_t | |
9787 | -xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr, | |
9788 | - gss_ctx_id_t ctx, gss_qop_t qop, | |
9789 | - rpc_gss_svc_t svc, u_int seq) | |
9790 | -{ | |
9791 | - gss_buffer_desc databuf, wrapbuf; | |
9792 | - OM_uint32 maj_stat, min_stat; | |
9793 | - int start, end, conf_state; | |
9794 | - bool_t xdr_stat; | |
9795 | - | |
9796 | - /* Skip databody length. */ | |
9797 | - start = XDR_GETPOS(xdrs); | |
9798 | - XDR_SETPOS(xdrs, start + 4); | |
9799 | - | |
9800 | - /* Marshal rpc_gss_data_t (sequence number + arguments). */ | |
9801 | - if (!xdr_u_int(xdrs, &seq) || !(*xdr_func)(xdrs, xdr_ptr)) | |
9802 | - return (FALSE); | |
9803 | - end = XDR_GETPOS(xdrs); | |
9804 | - | |
9805 | - /* Set databuf to marshalled rpc_gss_data_t. */ | |
9806 | - databuf.length = end - start - 4; | |
9807 | - XDR_SETPOS(xdrs, start + 4); | |
9808 | - databuf.value = XDR_INLINE(xdrs, databuf.length); | |
9809 | - | |
9810 | - xdr_stat = FALSE; | |
9811 | - | |
9812 | - if (svc == RPCSEC_GSS_SVC_INTEGRITY) { | |
9813 | - /* Marshal databody_integ length. */ | |
9814 | - XDR_SETPOS(xdrs, start); | |
9815 | - if (!xdr_u_int(xdrs, &databuf.length)) | |
9816 | - return (FALSE); | |
9817 | - | |
9818 | - /* Checksum rpc_gss_data_t. */ | |
9819 | - maj_stat = gss_get_mic(&min_stat, ctx, qop, | |
9820 | - &databuf, &wrapbuf); | |
9821 | - if (maj_stat != GSS_S_COMPLETE) { | |
9822 | - log_debug("gss_get_mic failed"); | |
9823 | - return (FALSE); | |
9824 | - } | |
9825 | - /* Marshal checksum. */ | |
9826 | - XDR_SETPOS(xdrs, end); | |
9827 | - xdr_stat = xdr_bytes(xdrs, (char **)&wrapbuf.value, | |
9828 | - &wrapbuf.length, MAX_NETOBJ_SZ); | |
9829 | - gss_release_buffer(&min_stat, &wrapbuf); | |
9830 | - } | |
9831 | - else if (svc == RPCSEC_GSS_SVC_PRIVACY) { | |
9832 | - /* Encrypt rpc_gss_data_t. */ | |
9833 | - maj_stat = gss_wrap(&min_stat, ctx, TRUE, qop, &databuf, | |
9834 | - &conf_state, &wrapbuf); | |
9835 | - if (maj_stat != GSS_S_COMPLETE) { | |
9836 | - log_status("gss_wrap", maj_stat, min_stat); | |
9837 | - return (FALSE); | |
9838 | - } | |
9839 | - /* Marshal databody_priv. */ | |
9840 | - XDR_SETPOS(xdrs, start); | |
9841 | - xdr_stat = xdr_bytes(xdrs, (char **)&wrapbuf.value, | |
9842 | - &wrapbuf.length, MAX_NETOBJ_SZ); | |
9843 | - gss_release_buffer(&min_stat, &wrapbuf); | |
9844 | - } | |
9845 | - return (xdr_stat); | |
9846 | -} | |
9847 | - | |
9848 | -bool_t | |
9849 | -xdr_rpc_gss_unwrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr, | |
9850 | - gss_ctx_id_t ctx, gss_qop_t qop, | |
9851 | - rpc_gss_svc_t svc, u_int seq) | |
9852 | -{ | |
9853 | - XDR tmpxdrs; | |
9854 | - gss_buffer_desc databuf, wrapbuf; | |
9855 | - OM_uint32 maj_stat, min_stat; | |
9856 | - u_int seq_num, conf_state, qop_state; | |
9857 | - bool_t xdr_stat; | |
9858 | - | |
9859 | - if (xdr_func == xdr_void || xdr_ptr == NULL) | |
9860 | - return (TRUE); | |
9861 | - | |
9862 | - memset(&databuf, 0, sizeof(databuf)); | |
9863 | - memset(&wrapbuf, 0, sizeof(wrapbuf)); | |
9864 | - | |
9865 | - if (svc == RPCSEC_GSS_SVC_INTEGRITY) { | |
9866 | - /* Decode databody_integ. */ | |
9867 | - if (!xdr_bytes(xdrs, (char **)&databuf.value, &databuf.length, | |
9868 | - MAX_NETOBJ_SZ)) { | |
9869 | - log_debug("xdr decode databody_integ failed"); | |
9870 | - return (FALSE); | |
9871 | - } | |
9872 | - /* Decode checksum. */ | |
9873 | - if (!xdr_bytes(xdrs, (char **)&wrapbuf.value, &wrapbuf.length, | |
9874 | - MAX_NETOBJ_SZ)) { | |
9875 | - gss_release_buffer(&min_stat, &databuf); | |
9876 | - log_debug("xdr decode checksum failed"); | |
9877 | - return (FALSE); | |
9878 | - } | |
9879 | - /* Verify checksum and QOP. */ | |
9880 | - maj_stat = gss_verify_mic(&min_stat, ctx, &databuf, | |
9881 | - &wrapbuf, &qop_state); | |
9882 | - gss_release_buffer(&min_stat, &wrapbuf); | |
9883 | - | |
9884 | - if (maj_stat != GSS_S_COMPLETE || qop_state != qop) { | |
9885 | - gss_release_buffer(&min_stat, &databuf); | |
9886 | - log_status("gss_verify_mic", maj_stat, min_stat); | |
9887 | - return (FALSE); | |
9888 | - } | |
9889 | - } | |
9890 | - else if (svc == RPCSEC_GSS_SVC_PRIVACY) { | |
9891 | - /* Decode databody_priv. */ | |
9892 | - if (!xdr_bytes(xdrs, (char **)&wrapbuf.value, &wrapbuf.length, | |
9893 | - MAX_NETOBJ_SZ)) { | |
9894 | - log_debug("xdr decode databody_priv failed"); | |
9895 | - return (FALSE); | |
9896 | - } | |
9897 | - /* Decrypt databody. */ | |
9898 | - maj_stat = gss_unwrap(&min_stat, ctx, &wrapbuf, &databuf, | |
9899 | - &conf_state, &qop_state); | |
9900 | - | |
9901 | - gss_release_buffer(&min_stat, &wrapbuf); | |
9902 | - | |
9903 | - /* Verify encryption and QOP. */ | |
9904 | - if (maj_stat != GSS_S_COMPLETE || qop_state != qop || | |
9905 | - conf_state != TRUE) { | |
9906 | - gss_release_buffer(&min_stat, &databuf); | |
9907 | - log_status("gss_unwrap", maj_stat, min_stat); | |
9908 | - return (FALSE); | |
9909 | - } | |
9910 | - } | |
9911 | - /* Decode rpc_gss_data_t (sequence number + arguments). */ | |
9912 | - xdrmem_create(&tmpxdrs, databuf.value, databuf.length, XDR_DECODE); | |
9913 | - xdr_stat = (xdr_u_int(&tmpxdrs, &seq_num) && | |
9914 | - (*xdr_func)(&tmpxdrs, xdr_ptr)); | |
9915 | - XDR_DESTROY(&tmpxdrs); | |
9916 | - gss_release_buffer(&min_stat, &databuf); | |
9917 | - | |
9918 | - /* Verify sequence number. */ | |
9919 | - if (xdr_stat == TRUE && seq_num != seq) { | |
9920 | - log_debug("wrong sequence number in databody"); | |
9921 | - return (FALSE); | |
9922 | - } | |
9923 | - return (xdr_stat); | |
9924 | -} | |
9925 | - | |
9926 | -bool_t | |
9927 | -xdr_rpc_gss_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr, | |
9928 | - gss_ctx_id_t ctx, gss_qop_t qop, | |
9929 | - rpc_gss_svc_t svc, u_int seq) | |
9930 | -{ | |
9931 | - switch (xdrs->x_op) { | |
9932 | - | |
9933 | - case XDR_ENCODE: | |
9934 | - return (xdr_rpc_gss_wrap_data(xdrs, xdr_func, xdr_ptr, | |
9935 | - ctx, qop, svc, seq)); | |
9936 | - case XDR_DECODE: | |
9937 | - return (xdr_rpc_gss_unwrap_data(xdrs, xdr_func, xdr_ptr, | |
9938 | - ctx, qop,svc, seq)); | |
9939 | - case XDR_FREE: | |
9940 | - return (TRUE); | |
9941 | - } | |
9942 | - return (FALSE); | |
9943 | -} | |
9944 | - | |
9945 | -#ifdef DEBUG | |
9946 | -#include <ctype.h> | |
9947 | - | |
9948 | -void | |
9949 | -log_debug(const char *fmt, ...) | |
9950 | -{ | |
9951 | - va_list ap; | |
9952 | - | |
9953 | - va_start(ap, fmt); | |
9954 | - fprintf(stderr, "rpcsec_gss: "); | |
9955 | - vfprintf(stderr, fmt, ap); | |
9956 | - fprintf(stderr, "\n"); | |
9957 | - va_end(ap); | |
9958 | -} | |
9959 | - | |
9960 | -void | |
9961 | -log_status(char *m, OM_uint32 maj_stat, OM_uint32 min_stat) | |
9962 | -{ | |
9963 | - OM_uint32 min; | |
9964 | - gss_buffer_desc msg; | |
9965 | - int msg_ctx = 0; | |
9966 | - | |
9967 | - fprintf(stderr, "rpcsec_gss: %s: ", m); | |
9968 | - | |
9969 | - gss_display_status(&min, maj_stat, GSS_C_GSS_CODE, GSS_C_NULL_OID, | |
9970 | - &msg_ctx, &msg); | |
9971 | - fprintf(stderr, "%s - ", (char *)msg.value); | |
9972 | - gss_release_buffer(&min, &msg); | |
9973 | - | |
9974 | - gss_display_status(&min, min_stat, GSS_C_MECH_CODE, GSS_C_NULL_OID, | |
9975 | - &msg_ctx, &msg); | |
9976 | - fprintf(stderr, "%s\n", (char *)msg.value); | |
9977 | - gss_release_buffer(&min, &msg); | |
9978 | -} | |
9979 | - | |
9980 | -void | |
9981 | -log_hexdump(const u_char *buf, int len, int offset) | |
9982 | -{ | |
9983 | - u_int i, j, jm; | |
9984 | - int c; | |
9985 | - | |
9986 | - fprintf(stderr, "\n"); | |
9987 | - for (i = 0; i < len; i += 0x10) { | |
9988 | - fprintf(stderr, " %04x: ", (u_int)(i + offset)); | |
9989 | - jm = len - i; | |
9990 | - jm = jm > 16 ? 16 : jm; | |
9991 | - | |
9992 | - for (j = 0; j < jm; j++) { | |
9993 | - if ((j % 2) == 1) | |
9994 | - fprintf(stderr, "%02x ", (u_int) buf[i+j]); | |
9995 | - else | |
9996 | - fprintf(stderr, "%02x", (u_int) buf[i+j]); | |
9997 | - } | |
9998 | - for (; j < 16; j++) { | |
9999 | - if ((j % 2) == 1) printf(" "); | |
10000 | - else fprintf(stderr, " "); | |
10001 | - } | |
10002 | - fprintf(stderr, " "); | |
10003 | - | |
10004 | - for (j = 0; j < jm; j++) { | |
10005 | - c = buf[i+j]; | |
10006 | - c = isprint(c) ? c : '.'; | |
10007 | - fprintf(stderr, "%c", c); | |
10008 | - } | |
10009 | - fprintf(stderr, "\n"); | |
10010 | - } | |
10011 | -} | |
10012 | - | |
10013 | -#else | |
10014 | - | |
10015 | -void | |
10016 | -log_debug(const char *fmt, ...) | |
10017 | -{ | |
10018 | -} | |
10019 | - | |
10020 | -void | |
10021 | -log_status(char *m, OM_uint32 maj_stat, OM_uint32 min_stat) | |
10022 | -{ | |
10023 | -} | |
10024 | - | |
10025 | -void | |
10026 | -log_hexdump(const u_char *buf, int len, int offset) | |
10027 | -{ | |
10028 | -} | |
10029 | - | |
10030 | -#endif | |
10031 | - | |
10032 | - | |
10033 | diff -puN -L support/rpc/DISCLAIMER support/rpc/DISCLAIMER~CITI_NFS4_ALL /dev/null | |
10034 | --- nfs-utils-1.0.7/support/rpc/DISCLAIMER | |
10035 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
10036 | @@ -1,30 +0,0 @@ | |
10037 | -/* $OpenBSD: DISCLAIMER,v 1.2 1996/07/20 06:12:14 deraadt Exp $ */ | |
10038 | - | |
10039 | -/* | |
10040 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
10041 | - * unrestricted use provided that this legend is included on all tape | |
10042 | - * media and as a part of the software program in whole or part. Users | |
10043 | - * may copy or modify Sun RPC without charge, but are not authorized | |
10044 | - * to license or distribute it to anyone else except as part of a product or | |
10045 | - * program developed by the user. | |
10046 | - * | |
10047 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
10048 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
10049 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
10050 | - * | |
10051 | - * Sun RPC is provided with no support and without any obligation on the | |
10052 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
10053 | - * modification or enhancement. | |
10054 | - * | |
10055 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
10056 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
10057 | - * OR ANY PART THEREOF. | |
10058 | - * | |
10059 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
10060 | - * or profits or other special, indirect and consequential damages, even if | |
10061 | - * Sun has been advised of the possibility of such damages. | |
10062 | - * | |
10063 | - * Sun Microsystems, Inc. | |
10064 | - * 2550 Garcia Avenue | |
10065 | - * Mountain View, California 94043 | |
10066 | - */ | |
10067 | diff -puN support/rpc/include/rpc/auth_gss.h~CITI_NFS4_ALL support/rpc/include/rpc/auth_gss.h | |
10068 | --- nfs-utils-1.0.7/support/rpc/include/rpc/auth_gss.h~CITI_NFS4_ALL 2005-05-06 15:19:25.015738000 -0400 | |
10069 | +++ nfs-utils-1.0.7-kwc/support/rpc/include/rpc/auth_gss.h 2005-05-06 15:19:25.961448000 -0400 | |
10070 | @@ -37,9 +37,8 @@ | |
10071 | #ifndef _RPC_AUTH_GSS_H | |
10072 | #define _RPC_AUTH_GSS_H | |
10073 | ||
10074 | -#include "config.h" | |
10075 | #include <rpc/clnt.h> | |
10076 | -#include "../../../include/gssapi/gssapi.h" | |
10077 | +#include <gssapi/gssapi.h> | |
10078 | ||
10079 | /* RPCSEC_GSS control procedures. */ | |
10080 | typedef enum { | |
10081 | diff -puN -L support/rpc/Makefile support/rpc/Makefile~CITI_NFS4_ALL /dev/null | |
10082 | --- nfs-utils-1.0.7/support/rpc/Makefile | |
10083 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
10084 | @@ -1,18 +0,0 @@ | |
10085 | -# | |
10086 | -# librpc.a | |
10087 | -# rpc library with rpcsec_gss | |
10088 | -# | |
10089 | - | |
10090 | -LIBNAME = librpc.a | |
10091 | -SRCS = auth_gss.c authgss_prot.c svc.c svc_run.c svc_auth.c \ | |
10092 | - svc_auth_none.c svc_auth_unix.c svc_auth_gss.c \ | |
10093 | - svc_raw.c svc_simple.c svc_tcp.c svc_udp.c \ | |
10094 | - rpc_commondata.c | |
10095 | -OBJS = $(SRCS:.c=.o) | |
10096 | - | |
10097 | -include $(TOP)rules.mk | |
10098 | - | |
10099 | -CFLAGS += -I$(TOP)support/rpc/include -DDEBUG | |
10100 | - | |
10101 | -install:: | |
10102 | - @: | |
10103 | diff -puN -L support/rpc/README support/rpc/README~CITI_NFS4_ALL /dev/null | |
10104 | --- nfs-utils-1.0.7/support/rpc/README | |
10105 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
10106 | @@ -1,233 +0,0 @@ | |
10107 | -RPCSRC 4.0 7/11/89 | |
10108 | - | |
10109 | -This distribution contains Sun Microsystem's implementation of the | |
10110 | -RPC and XDR protocols and is compatible with 4.2BSD and 4.3BSD. Also | |
10111 | -included is complete documentation, utilities, RPC service | |
10112 | -specification files, and demonstration services in the format used by | |
10113 | -the RPC protocol compiler (rpcgen). See WHAT'S NEW below for | |
10114 | -details. | |
10115 | - | |
10116 | -NOTE ABOUT SECURE RPC: | |
10117 | - | |
10118 | -This release of RPCSRC contains most of the code needed to implement | |
10119 | -Secure RPC (see "DES Authentication" in the RPC Protocol Specification, | |
10120 | -doc/rpc.rfc.ms). Due to legal considerations, we are unable to | |
10121 | -distribute an implementation of DES, the Data Encryption Standard, which | |
10122 | -Secure RPC requires. For this reason, all of the files, documentation, and | |
10123 | -programs associated with Secure RPC have been placed into a separate | |
10124 | -directory, secure_rpc. The RPC library contained in the main body of this | |
10125 | -release *DOES NOT* support Secure RPC. See secure_rpc/README for more | |
10126 | -details. (A DES library was posted in Volume 18 of comp.sources.unix.) | |
10127 | - | |
10128 | -If you wish to report bugs found in this release, send mail to: | |
10129 | - | |
10130 | -Portable ONC/NFS | |
10131 | -Sun Microsystems, Inc | |
10132 | -MS 12-33 | |
10133 | -2550 Garcia Avenue | |
10134 | -Mountain View, CA 94043 | |
10135 | - | |
10136 | -or send Email to nfsnet@sun.com (the Internet) or sun!nfsnet (Usenet). | |
10137 | - | |
10138 | -ROADMAP | |
10139 | - | |
10140 | -The directory hierarchy is as follows: | |
10141 | - | |
10142 | - demo/ Various demonstration services | |
10143 | - demo/dir Remote directory lister | |
10144 | - demo/msg Remote console message delivery service | |
10145 | - demo/sort Remote sort service | |
10146 | - | |
10147 | - doc/ Documentation for RPC, XDR and NFS in "-ms" format. | |
10148 | - | |
10149 | - etc/ Utilities (rpcinfo and portmap). portmap must be | |
10150 | - started by root before any other RPC network services are | |
10151 | - used. SEE BELOW FOR BUGFIX TO 4.3BSD COMPILER. | |
10152 | - | |
10153 | - man/ Manual pages for RPC library, rpcgen, and utilities. | |
10154 | - | |
10155 | - rpc/ The RPC and XDR library. SEE BELOW | |
10156 | - FOR BUGFIX TO 4.2BSD COMPILER. | |
10157 | - | |
10158 | - rpcgen/ The RPC Language compiler (for .x files) | |
10159 | - | |
10160 | - rpcsvc/ Service definition files for various services and the | |
10161 | - server and client code for the Remote Status service. | |
10162 | - | |
10163 | - secure_rpc/ The files in this directory are used to build a version of | |
10164 | - the RPC library with DES Authentication. See the README | |
10165 | - file in that directory for more details. | |
10166 | - | |
10167 | -BUILD INSTRUCTIONS | |
10168 | - | |
10169 | -Makefiles can be found in all directories except for man. The | |
10170 | -Makefile in the top directory will cause these others to be invoked | |
10171 | -(except for in the doc, man and demo directories), in turn building the | |
10172 | -entire release. | |
10173 | - | |
10174 | -WARNING! THE DEFAULT INSTALLATION PROCEDURES WILL INSTALL FILES | |
10175 | -IN /usr/include, /usr/lib, /usr/bin and /etc. | |
10176 | - | |
10177 | -The master RPC include file, rpc/rpc.h, is used by all programs and | |
10178 | -routines that use RPC. It includes other RPC and system include files | |
10179 | -needed by the RPC system. PLEASE NOTE: If your system has NFS, it | |
10180 | -may have been based on Sun's NFS Source. The include files installed | |
10181 | -by this package may duplicate include files you will find on your NFS | |
10182 | -system. The RPCSRC 4.0 include files are upwardly compatible to all | |
10183 | -NFS Source include files as of the date of this distribution (not | |
10184 | -including any new definitions or declarations added by your system | |
10185 | -vendor). HOWEVER: Please read the comments towards the end of | |
10186 | -rpc/rpc.h regarding rpc/netdb.h. You may need to uncomment the | |
10187 | -inclusion of that file if the structures it defines are already | |
10188 | -defined by your system's include files. | |
10189 | - | |
10190 | -After making any compiler fixes that are needed (see below), at | |
10191 | -the top directory, type: | |
10192 | - | |
10193 | - make install | |
10194 | - | |
10195 | -For all installations, the Makefile macro DESTDIR is prepended to the | |
10196 | -installation path. It is defined to be null in the Makefiles, so | |
10197 | -installations are relative to root. (You will probably need root | |
10198 | -privileges for installing the files under the default path.) To | |
10199 | -install the files under some other tree (e.g., /usr/local), use the | |
10200 | -command: | |
10201 | - | |
10202 | - make install DESTDIR=/usr/local | |
10203 | - | |
10204 | -This will place the include files in /usr/local/usr/include, the RPC | |
10205 | -library in /usr/local/usr/lib, rpcgen in /usr/local/usr/bin, and the | |
10206 | -utilities in /usr/local/etc. You'll have to edit the Makefiles or | |
10207 | -install the files by hand if you want to do anything other than this | |
10208 | -kind of relocation of the installation tree. | |
10209 | - | |
10210 | -The RPC library will be built and installed first. By default it is | |
10211 | -installed in /usr/lib as "librpclib.a". The directory | |
10212 | -/usr/include/rpc will also be created, and several header files will | |
10213 | -be installed there. ALL RPC SERVICES INCLUDE THESE HEADER FILES. | |
10214 | - | |
10215 | -The programs in etc/ link in routines from librpclib.a. If you change | |
10216 | -where it is installed, be sure to edit etc/'s Makefile to reflect this. | |
10217 | -These programs are installed in /etc. PORTMAP MUST BE RUNNING ON | |
10218 | -YOUR SYSTEM BEFORE YOU START ANY OTHER RPC SERVICE. | |
10219 | - | |
10220 | -rpcgen is installed in /usr/bin. This program is required to build | |
10221 | -the demonstration services in demo and the rstat client and server in | |
10222 | -rpcsvc/. | |
10223 | - | |
10224 | -The rpcsvc/ directory will install its files in the directory | |
10225 | -/usr/include/rpcsvc. The Remote Status service (rstat_svc) will be | |
10226 | -compiled and installed in /etc. If you wish to make this service | |
10227 | -available, you should either start this service when needed or have | |
10228 | -it started at boot time by invoking it in your /etc/rc.local script. | |
10229 | -(Be sure that portmap is started first!) Sun has modified its | |
10230 | -version of inetd to automatically start RPC services. (Use "make | |
10231 | -LIB=" when building rstat on a Sun Workstation.) The Remote Status | |
10232 | -client (rstat) will be installed in /usr/bin. This program queries | |
10233 | -the rstat_svc on a remote host and prints a system status summary | |
10234 | -similar to the one printed by "uptime". | |
10235 | - | |
10236 | -The documentation is not built during the "make install" command. | |
10237 | -Typing "make" in the doc directory will cause all of the manuals to | |
10238 | -be formatted using nroff into a single file. We have had a report | |
10239 | -that certain "troff" equivalents have trouble processing the full | |
10240 | -manual. If you have trouble, try building the manuals individually | |
10241 | -(see the Makefile). | |
10242 | - | |
10243 | -The demonstration services in the demo directory are not built by the | |
10244 | -top-level "make install" command. To build these, cd to the demo | |
10245 | -directory and enter "make". The three services will be built. | |
10246 | -RPCGEN MUST BE INSTALLED in a path that make can find. To run the | |
10247 | -services, start the portmap program as root and invoke the service | |
10248 | -(you probably will want to put it in the background). rpcinfo can be | |
10249 | -used to check that the service succeeded in getting registered with | |
10250 | -portmap, and to ping the service (see rpcinfo's man page). You can | |
10251 | -then use the corresponding client program to exercise the service. | |
10252 | -To build these services on a Sun workstation, you must prevent the | |
10253 | -Makefile from trying to link the RPC library (as these routines are | |
10254 | -already a part of Sun's libc). Use: "make LIB=". | |
10255 | - | |
10256 | -BUGFIX FOR 4.3BSD COMPILER | |
10257 | - | |
10258 | -The use of a 'void *' declaration for one of the arguments in | |
10259 | -the reply_proc() procedure in etc/rpcinfo.c will trigger a bug | |
10260 | -in the 4.3BSD compiler. The bug is fixed by the following change to | |
10261 | -the compiler file mip/manifest.h: | |
10262 | - | |
10263 | -*** manifest.h.r1.1 Thu Apr 30 13:52:25 1987 | |
10264 | ---- manifest.h.r1.2 Mon Nov 23 18:58:17 1987 | |
10265 | -*************** | |
10266 | -*** 21,27 **** | |
10267 | - /* | |
10268 | - * Bogus type values | |
10269 | - */ | |
10270 | -! #define TNULL PTR /* pointer to UNDEF */ | |
10271 | - #define TVOID FTN /* function returning UNDEF (for void) */ | |
10272 | - | |
10273 | - /* | |
10274 | ---- 21,27 ---- | |
10275 | - /* | |
10276 | - * Bogus type values | |
10277 | - */ | |
10278 | -! #define TNULL INCREF(MOETY) /* pointer to MOETY -- impossible type */ | |
10279 | - #define TVOID FTN /* function returning UNDEF (for void) */ | |
10280 | - | |
10281 | - /* | |
10282 | - | |
10283 | -If you cannot fix your compiler, change the declaration in reply_proc() | |
10284 | -from 'void *' to 'char *'. | |
10285 | - | |
10286 | -BUGFIX FOR 4.2BSD COMPILER | |
10287 | - | |
10288 | -Unpatched 4.2BSD compilers complain about valid C. You can make old | |
10289 | -compilers happy by changing some voids to ints. However, the fix to | |
10290 | -the 4.2 VAX compiler is as follows (to mip/trees.c): | |
10291 | - | |
10292 | -*** trees.c.r1.1 Mon May 11 13:47:58 1987 | |
10293 | ---- trees.c.r1.2 Wed Jul 2 18:28:52 1986 | |
10294 | -*************** | |
10295 | -*** 1247,1253 **** | |
10296 | - if(o==CAST && mt1==0)return(TYPL+TYMATCH); | |
10297 | - if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH ); | |
10298 | - else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN ); | |
10299 | -! else if( mt12 == 0 ) break; | |
10300 | - else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN ); | |
10301 | - else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN ); | |
10302 | - break; | |
10303 | ---- 1261,1269 ---- | |
10304 | - if(o==CAST && mt1==0)return(TYPL+TYMATCH); | |
10305 | - if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH ); | |
10306 | - else if( (mt1&MENU)||(mt2&MENU) ) return( LVAL+NCVT+TYPL+PTMATCH+PUN ); | |
10307 | -! /* if right is TVOID and looks like a CALL, is not ok */ | |
10308 | -! else if (mt2 == 0 && (p->in.right->in.op == CALL || p->in.right->in.op == UNARY CALL)) | |
10309 | -! break; | |
10310 | - else if( mt1 & MPTR ) return( LVAL+PTMATCH+PUN ); | |
10311 | - else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN ); | |
10312 | - break; | |
10313 | - | |
10314 | -WHAT'S NEW IN THIS RELEASE: RPCSRC 4.0 | |
10315 | - | |
10316 | -The previous release was RPCSRC 3.9. As with all previous releases, | |
10317 | -this release is based directly on files from Sun Microsystem's | |
10318 | -implementation. | |
10319 | - | |
10320 | -Upgrade from RPCSRC 3.9 | |
10321 | - | |
10322 | -1) RPCSRC 4.0 upgrades RPCSRC 3.9. Improvements from SunOS 4.0 have | |
10323 | - been integrated into this release. | |
10324 | - | |
10325 | -Secure RPC (in the secure_rpc/ directory) | |
10326 | - | |
10327 | -2) DES Authentication routines and programs are provided. | |
10328 | -3) A new manual, "Secure NFS" is provided, which describes Secure RPC | |
10329 | - and Secure NFS. | |
10330 | -4) Skeleton routines and manual pages are provided which describe the | |
10331 | - DES encryption procedures required by Secure RPC. HOWEVER, NO DES | |
10332 | - ROUTINE IS PROVIDED. | |
10333 | - | |
10334 | -New Functionality | |
10335 | - | |
10336 | -5) rpcinfo can now be used to de-register services from the portmapper | |
10337 | - which may have terminated abnormally. | |
10338 | -6) A new client, rstat, is provided which queries the rstat_svc and | |
10339 | - prints a status line similar to the one displayed by "uptime". | |
10340 | diff -puN -L support/rpc/rpc_commondata.c support/rpc/rpc_commondata.c~CITI_NFS4_ALL /dev/null | |
10341 | --- nfs-utils-1.0.7/support/rpc/rpc_commondata.c | |
10342 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
10343 | @@ -1,42 +0,0 @@ | |
10344 | -/* | |
10345 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
10346 | - * unrestricted use provided that this legend is included on all tape | |
10347 | - * media and as a part of the software program in whole or part. Users | |
10348 | - * may copy or modify Sun RPC without charge, but are not authorized | |
10349 | - * to license or distribute it to anyone else except as part of a product or | |
10350 | - * program developed by the user. | |
10351 | - * | |
10352 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
10353 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
10354 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
10355 | - * | |
10356 | - * Sun RPC is provided with no support and without any obligation on the | |
10357 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
10358 | - * modification or enhancement. | |
10359 | - * | |
10360 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
10361 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
10362 | - * OR ANY PART THEREOF. | |
10363 | - * | |
10364 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
10365 | - * or profits or other special, indirect and consequential damages, even if | |
10366 | - * Sun has been advised of the possibility of such damages. | |
10367 | - * | |
10368 | - * Sun Microsystems, Inc. | |
10369 | - * 2550 Garcia Avenue | |
10370 | - * Mountain View, California 94043 | |
10371 | - */ | |
10372 | - | |
10373 | -#if defined(LIBC_SCCS) && !defined(lint) | |
10374 | -static char *rcsid = "$OpenBSD: rpc_commondata.c,v 1.3 1996/08/19 08:31:47 tholo Exp $"; | |
10375 | -#endif /* LIBC_SCCS and not lint */ | |
10376 | - | |
10377 | -#include <rpc/rpc.h> | |
10378 | -/* | |
10379 | - * This file should only contain common data (global data) that is exported | |
10380 | - * by public interfaces | |
10381 | - */ | |
10382 | -struct opaque_auth _null_auth; | |
10383 | -fd_set svc_fdset; | |
10384 | -int svc_maxfd = -1; | |
10385 | -struct rpc_createerr rpc_createerr; | |
10386 | diff -puN -L support/rpc/svc_auth.c support/rpc/svc_auth.c~CITI_NFS4_ALL /dev/null | |
10387 | --- nfs-utils-1.0.7/support/rpc/svc_auth.c | |
10388 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
10389 | @@ -1,113 +0,0 @@ | |
10390 | -/* | |
10391 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
10392 | - * unrestricted use provided that this legend is included on all tape | |
10393 | - * media and as a part of the software program in whole or part. Users | |
10394 | - * may copy or modify Sun RPC without charge, but are not authorized | |
10395 | - * to license or distribute it to anyone else except as part of a product or | |
10396 | - * program developed by the user. | |
10397 | - * | |
10398 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
10399 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
10400 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
10401 | - * | |
10402 | - * Sun RPC is provided with no support and without any obligation on the | |
10403 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
10404 | - * modification or enhancement. | |
10405 | - * | |
10406 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
10407 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
10408 | - * OR ANY PART THEREOF. | |
10409 | - * | |
10410 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
10411 | - * or profits or other special, indirect and consequential damages, even if | |
10412 | - * Sun has been advised of the possibility of such damages. | |
10413 | - * | |
10414 | - * Sun Microsystems, Inc. | |
10415 | - * 2550 Garcia Avenue | |
10416 | - * Mountain View, California 94043 | |
10417 | - */ | |
10418 | - | |
10419 | -#if defined(LIBC_SCCS) && !defined(lint) | |
10420 | -static char *rcsid = "$OpenBSD: svc_auth.c,v 1.4 1998/03/19 00:27:22 millert Exp $"; | |
10421 | -#endif /* LIBC_SCCS and not lint */ | |
10422 | - | |
10423 | -/* | |
10424 | - * svc_auth_nodes.c, Server-side rpc authenticator interface, | |
10425 | - * *WITHOUT* DES authentication. | |
10426 | - * | |
10427 | - * Copyright (C) 1984, Sun Microsystems, Inc. | |
10428 | - */ | |
10429 | - | |
10430 | -#include <rpc/rpc.h> | |
10431 | - | |
10432 | -/* | |
10433 | - * svcauthsw is the bdevsw of server side authentication. | |
10434 | - * | |
10435 | - * Server side authenticators are called from authenticate by | |
10436 | - * using the client auth struct flavor field to index into svcauthsw. | |
10437 | - * The server auth flavors must implement a routine that looks | |
10438 | - * like: | |
10439 | - * | |
10440 | - * enum auth_stat | |
10441 | - * flavorx_auth(rqst, msg) | |
10442 | - * register struct svc_req *rqst; | |
10443 | - * register struct rpc_msg *msg; | |
10444 | - * | |
10445 | - */ | |
10446 | - | |
10447 | -enum auth_stat _svcauth_none(); /* no authentication */ | |
10448 | -enum auth_stat _svcauth_unix(); /* unix style (uid, gids) */ | |
10449 | -enum auth_stat _svcauth_short(); /* short hand unix style */ | |
10450 | -enum auth_stat _svcauth_gss(); /* RPCSEC_GSS */ | |
10451 | - | |
10452 | -static struct { | |
10453 | - enum auth_stat (*authenticator)(); | |
10454 | -} svcauthsw[] = { | |
10455 | - { _svcauth_none }, /* AUTH_NONE */ | |
10456 | - { _svcauth_unix }, /* AUTH_UNIX */ | |
10457 | - { _svcauth_short }, /* AUTH_SHORT */ | |
10458 | - { _svcauth_none }, /* AUTH_DES - does not exist */ | |
10459 | - { _svcauth_none }, | |
10460 | - { _svcauth_none }, | |
10461 | - { _svcauth_gss } /* RPCSEC_GSS */ | |
10462 | -}; | |
10463 | -#define AUTH_MAX 6 /* HIGHEST AUTH NUMBER */ | |
10464 | - | |
10465 | -/* | |
10466 | - * The call rpc message, msg has been obtained from the wire. The msg contains | |
10467 | - * the raw form of credentials and verifiers. authenticate returns AUTH_OK | |
10468 | - * if the msg is successfully authenticated. If AUTH_OK then the routine also | |
10469 | - * does the following things: | |
10470 | - * set rqst->rq_xprt->verf to the appropriate response verifier; | |
10471 | - * sets rqst->rq_clntcred to the "cooked" form of the credentials. | |
10472 | - * | |
10473 | - * NB: rqst->rq_xprt->verf must be pre-alloctaed; | |
10474 | - * its length is set appropriately. | |
10475 | - * | |
10476 | - * The caller still owns and is responsible for msg->u.cmb.cred and | |
10477 | - * msg->u.cmb.verf. The authentication system retains ownership of | |
10478 | - * rqst->rq_clntcred, the cooked credentials. | |
10479 | - * | |
10480 | - * There is an assumption that any flavour less than AUTH_NONE is | |
10481 | - * invalid. | |
10482 | - */ | |
10483 | -enum auth_stat | |
10484 | -_authenticate(rqst, msg, no_dispatch) | |
10485 | - register struct svc_req *rqst; | |
10486 | - struct rpc_msg *msg; | |
10487 | - bool_t *no_dispatch; | |
10488 | -{ | |
10489 | - register int cred_flavor; | |
10490 | - | |
10491 | - rqst->rq_cred = msg->rm_call.cb_cred; | |
10492 | - rqst->rq_xprt->xp_verf.oa_flavor = _null_auth.oa_flavor; | |
10493 | - rqst->rq_xprt->xp_verf.oa_length = 0; | |
10494 | - cred_flavor = rqst->rq_cred.oa_flavor; | |
10495 | - *no_dispatch = FALSE; | |
10496 | - | |
10497 | - if ((cred_flavor <= AUTH_MAX) && (cred_flavor >= AUTH_NONE)) { | |
10498 | - return ((*(svcauthsw[cred_flavor].authenticator))(rqst, msg, no_dispatch)); | |
10499 | - } | |
10500 | - | |
10501 | - return (AUTH_REJECTEDCRED); | |
10502 | -} | |
10503 | diff -puN -L support/rpc/svc_auth_gss.c support/rpc/svc_auth_gss.c~CITI_NFS4_ALL /dev/null | |
10504 | --- nfs-utils-1.0.7/support/rpc/svc_auth_gss.c | |
10505 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
10506 | @@ -1,582 +0,0 @@ | |
10507 | -/* | |
10508 | - svc_auth_gss.c | |
10509 | - | |
10510 | - Copyright (c) 2000 The Regents of the University of Michigan. | |
10511 | - All rights reserved. | |
10512 | - | |
10513 | - Copyright (c) 2000 Dug Song <dugsong@UMICH.EDU>. | |
10514 | - All rights reserved, all wrongs reversed. | |
10515 | - | |
10516 | - Redistribution and use in source and binary forms, with or without | |
10517 | - modification, are permitted provided that the following conditions | |
10518 | - are met: | |
10519 | - | |
10520 | - 1. Redistributions of source code must retain the above copyright | |
10521 | - notice, this list of conditions and the following disclaimer. | |
10522 | - 2. Redistributions in binary form must reproduce the above copyright | |
10523 | - notice, this list of conditions and the following disclaimer in the | |
10524 | - documentation and/or other materials provided with the distribution. | |
10525 | - 3. Neither the name of the University nor the names of its | |
10526 | - contributors may be used to endorse or promote products derived | |
10527 | - from this software without specific prior written permission. | |
10528 | - | |
10529 | - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | |
10530 | - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
10531 | - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
10532 | - DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
10533 | - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
10534 | - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
10535 | - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
10536 | - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
10537 | - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
10538 | - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
10539 | - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
10540 | - | |
10541 | - */ | |
10542 | - | |
10543 | -#include <stdio.h> | |
10544 | -#include <stdlib.h> | |
10545 | -#include <string.h> | |
10546 | -#include <rpc/rpc.h> | |
10547 | -#include <gssapi/gssapi.h> | |
10548 | - | |
10549 | -extern SVCAUTH svc_auth_none; | |
10550 | - | |
10551 | -/* | |
10552 | - * from mit-krb5-1.2.1 mechglue/mglueP.h: | |
10553 | - * Array of context IDs typed by mechanism OID | |
10554 | - */ | |
10555 | -typedef struct gss_union_ctx_id_t { | |
10556 | - gss_OID mech_type; | |
10557 | - gss_ctx_id_t internal_ctx_id; | |
10558 | -} gss_union_ctx_id_desc, *gss_union_ctx_id_t; | |
10559 | - | |
10560 | - | |
10561 | - | |
10562 | -static bool_t svcauth_gss_destroy(); | |
10563 | -static bool_t svcauth_gss_wrap(); | |
10564 | -static bool_t svcauth_gss_unwrap(); | |
10565 | - | |
10566 | -struct svc_auth_ops svc_auth_gss_ops = { | |
10567 | - svcauth_gss_wrap, | |
10568 | - svcauth_gss_unwrap, | |
10569 | - svcauth_gss_destroy | |
10570 | -}; | |
10571 | - | |
10572 | -struct svc_rpc_gss_data { | |
10573 | - bool_t established; /* context established */ | |
10574 | - gss_ctx_id_t ctx; /* context id */ | |
10575 | - struct rpc_gss_sec sec; /* security triple */ | |
10576 | - gss_buffer_desc cname; /* GSS client name */ | |
10577 | - u_int seq; /* sequence number */ | |
10578 | - u_int win; /* sequence window */ | |
10579 | - u_int seqlast; /* last sequence number */ | |
10580 | - u_int32_t seqmask; /* bitmask of seqnums */ | |
10581 | - gss_name_t client_name; /* unparsed name string */ | |
10582 | -}; | |
10583 | - | |
10584 | -#define SVCAUTH_PRIVATE(auth) \ | |
10585 | - ((struct svc_rpc_gss_data *)(auth)->svc_ah_private) | |
10586 | - | |
10587 | -/* Global server credentials. */ | |
10588 | -gss_cred_id_t _svcauth_gss_creds; | |
10589 | -static gss_name_t _svcauth_gss_name = NULL; | |
10590 | - | |
10591 | -bool_t | |
10592 | -svcauth_gss_set_svc_name(gss_name_t name) | |
10593 | -{ | |
10594 | - OM_uint32 maj_stat, min_stat; | |
10595 | - | |
10596 | - log_debug("in svcauth_gss_set_svc_name()"); | |
10597 | - | |
10598 | - if (_svcauth_gss_name != NULL) { | |
10599 | - maj_stat = gss_release_name(&min_stat, &_svcauth_gss_name); | |
10600 | - | |
10601 | - if (maj_stat != GSS_S_COMPLETE) { | |
10602 | - log_status("gss_release_name", maj_stat, min_stat); | |
10603 | - return (FALSE); | |
10604 | - } | |
10605 | - _svcauth_gss_name = NULL; | |
10606 | - } | |
10607 | - maj_stat = gss_duplicate_name(&min_stat, name, &_svcauth_gss_name); | |
10608 | - | |
10609 | - if (maj_stat != GSS_S_COMPLETE) { | |
10610 | - log_status("gss_duplicate_name", maj_stat, min_stat); | |
10611 | - return (FALSE); | |
10612 | - } | |
10613 | - | |
10614 | - return (TRUE); | |
10615 | -} | |
10616 | - | |
10617 | -static bool_t | |
10618 | -svcauth_gss_import_name(char *service) | |
10619 | -{ | |
10620 | - gss_name_t name; | |
10621 | - gss_buffer_desc namebuf; | |
10622 | - OM_uint32 maj_stat, min_stat; | |
10623 | - | |
10624 | - log_debug("in svcauth_gss_import_name()"); | |
10625 | - | |
10626 | - namebuf.value = service; | |
10627 | - namebuf.length = strlen(service); | |
10628 | - | |
10629 | - maj_stat = gss_import_name(&min_stat, &namebuf, | |
10630 | - GSS_C_NT_HOSTBASED_SERVICE, &name); | |
10631 | - | |
10632 | - if (maj_stat != GSS_S_COMPLETE) { | |
10633 | - log_status("gss_import_name", maj_stat, min_stat); | |
10634 | - return (FALSE); | |
10635 | - } | |
10636 | - if (svcauth_gss_set_svc_name(name) != TRUE) { | |
10637 | - gss_release_name(&min_stat, &name); | |
10638 | - return (FALSE); | |
10639 | - } | |
10640 | - return (TRUE); | |
10641 | -} | |
10642 | - | |
10643 | -static bool_t | |
10644 | -svcauth_gss_acquire_cred(void) | |
10645 | -{ | |
10646 | - OM_uint32 maj_stat, min_stat; | |
10647 | - | |
10648 | - log_debug("in svcauth_gss_acquire_cred()"); | |
10649 | - | |
10650 | - maj_stat = gss_acquire_cred(&min_stat, _svcauth_gss_name, 0, | |
10651 | - GSS_C_NULL_OID_SET, GSS_C_ACCEPT, | |
10652 | - &_svcauth_gss_creds, NULL, NULL); | |
10653 | - | |
10654 | - if (maj_stat != GSS_S_COMPLETE) { | |
10655 | - log_status("gss_acquire_cred", maj_stat, min_stat); | |
10656 | - return (FALSE); | |
10657 | - } | |
10658 | - return (TRUE); | |
10659 | -} | |
10660 | - | |
10661 | -static bool_t | |
10662 | -svcauth_gss_release_cred(void) | |
10663 | -{ | |
10664 | - OM_uint32 maj_stat, min_stat; | |
10665 | - | |
10666 | - log_debug("in svcauth_gss_release_cred()"); | |
10667 | - | |
10668 | - maj_stat = gss_release_cred(&min_stat, &_svcauth_gss_creds); | |
10669 | - | |
10670 | - if (maj_stat != GSS_S_COMPLETE) { | |
10671 | - log_status("gss_release_cred", maj_stat, min_stat); | |
10672 | - return (FALSE); | |
10673 | - } | |
10674 | - | |
10675 | - _svcauth_gss_creds = NULL; | |
10676 | - | |
10677 | - return (TRUE); | |
10678 | -} | |
10679 | - | |
10680 | -static bool_t | |
10681 | -svcauth_gss_accept_sec_context(struct svc_req *rqst, | |
10682 | - struct rpc_gss_init_res *gr) | |
10683 | -{ | |
10684 | - struct svc_rpc_gss_data *gd; | |
10685 | - struct rpc_gss_cred *gc; | |
10686 | - gss_buffer_desc recv_tok, seqbuf, checksum; | |
10687 | - gss_OID mech; | |
10688 | - OM_uint32 maj_stat = 0, min_stat = 0, ret_flags, seq; | |
10689 | - | |
10690 | - log_debug("in svcauth_gss_accept_context()"); | |
10691 | - | |
10692 | - gd = SVCAUTH_PRIVATE(rqst->rq_xprt->xp_auth); | |
10693 | - gc = (struct rpc_gss_cred *)rqst->rq_clntcred; | |
10694 | - memset(gr, 0, sizeof(*gr)); | |
10695 | - | |
10696 | - /* Deserialize arguments. */ | |
10697 | - memset(&recv_tok, 0, sizeof(recv_tok)); | |
10698 | - | |
10699 | - if (!svc_getargs(rqst->rq_xprt, xdr_rpc_gss_init_args, | |
10700 | - (caddr_t)&recv_tok)) | |
10701 | - return (FALSE); | |
10702 | - | |
10703 | - gr->gr_major = gss_accept_sec_context(&gr->gr_minor, | |
10704 | - &gd->ctx, | |
10705 | - _svcauth_gss_creds, | |
10706 | - &recv_tok, | |
10707 | - GSS_C_NO_CHANNEL_BINDINGS, | |
10708 | - &gd->client_name, | |
10709 | - &mech, | |
10710 | - &gr->gr_token, | |
10711 | - &ret_flags, | |
10712 | - NULL, | |
10713 | - NULL); | |
10714 | - | |
10715 | - if (gr->gr_major != GSS_S_COMPLETE && | |
10716 | - gr->gr_major != GSS_S_CONTINUE_NEEDED) { | |
10717 | - log_status("accept_sec_context", gr->gr_major, gr->gr_minor); | |
10718 | - gd->ctx = GSS_C_NO_CONTEXT; | |
10719 | - gss_release_buffer(&min_stat, &gr->gr_token); | |
10720 | - return (FALSE); | |
10721 | - } | |
10722 | - /* ANDROS: krb5 mechglue returns ctx of size 8 - two pointers, | |
10723 | - * one to the mechanism oid, one to the internal_ctx_id */ | |
10724 | - if ((gr->gr_ctx.value = mem_alloc(sizeof(gss_union_ctx_id_desc))) == NULL) { | |
10725 | - fprintf(stderr, "svcauth_gss_accept_context: out of memory\n"); | |
10726 | - return (FALSE); | |
10727 | - } | |
10728 | - memcpy(gr->gr_ctx.value, gd->ctx, sizeof(gss_union_ctx_id_desc)); | |
10729 | - gr->gr_ctx.length = sizeof(gss_union_ctx_id_desc); | |
10730 | - | |
10731 | - /* ANDROS: change for debugging linux kernel version... | |
10732 | - gr->gr_win = sizeof(gd->seqmask) * 8; | |
10733 | - */ | |
10734 | - gr->gr_win = 0x00000005; | |
10735 | - | |
10736 | - /* Save client info. */ | |
10737 | - gd->sec.mech = mech; | |
10738 | - gd->sec.qop = GSS_C_QOP_DEFAULT; | |
10739 | - gd->sec.svc = gc->gc_svc; | |
10740 | - gd->seq = gc->gc_seq; | |
10741 | - gd->win = gr->gr_win; | |
10742 | - | |
10743 | - if (gr->gr_major == GSS_S_COMPLETE) { | |
10744 | - maj_stat = gss_display_name(&min_stat, gd->client_name, | |
10745 | - &gd->cname, &gd->sec.mech); | |
10746 | - if (maj_stat != GSS_S_COMPLETE) { | |
10747 | - log_status("display_name", maj_stat, min_stat); | |
10748 | - return (FALSE); | |
10749 | - } | |
10750 | -#ifdef DEBUG | |
10751 | -#ifdef HAVE_KRB5 | |
10752 | - { | |
10753 | - gss_buffer_desc mechname; | |
10754 | - | |
10755 | - gss_oid_to_str(&min_stat, mech, &mechname); | |
10756 | - | |
10757 | - log_debug("accepted context for %.*s with " | |
10758 | - "<mech %.*s, qop %d, svc %d>", | |
10759 | - gd->cname.length, (char *)gd->cname.value, | |
10760 | - mechname.length, (char *)mechname.value, | |
10761 | - gd->sec.qop, gd->sec.svc); | |
10762 | - | |
10763 | - gss_release_buffer(&min_stat, &mechname); | |
10764 | - } | |
10765 | -#elif HAVE_HEIMDAL | |
10766 | - log_debug("accepted context for %.*s with " | |
10767 | - "<mech {}, qop %d, svc %d>", | |
10768 | - gd->cname.length, (char *)gd->cname.value, | |
10769 | - gd->sec.qop, gd->sec.svc); | |
10770 | -#endif | |
10771 | -#endif /* DEBUG */ | |
10772 | - seq = htonl(gr->gr_win); | |
10773 | - seqbuf.value = &seq; | |
10774 | - seqbuf.length = sizeof(seq); | |
10775 | - | |
10776 | - maj_stat = gss_sign(&min_stat, gd->ctx, GSS_C_QOP_DEFAULT, | |
10777 | - &seqbuf, &checksum); | |
10778 | - | |
10779 | - if (maj_stat != GSS_S_COMPLETE) | |
10780 | - return (FALSE); | |
10781 | - | |
10782 | - rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS; | |
10783 | - rqst->rq_xprt->xp_verf.oa_base = checksum.value; | |
10784 | - rqst->rq_xprt->xp_verf.oa_length = checksum.length; | |
10785 | - } | |
10786 | - return (TRUE); | |
10787 | -} | |
10788 | - | |
10789 | -static bool_t | |
10790 | -svcauth_gss_validate(struct svc_rpc_gss_data *gd, struct rpc_msg *msg) | |
10791 | -{ | |
10792 | - struct opaque_auth *oa; | |
10793 | - gss_buffer_desc rpcbuf, checksum; | |
10794 | - OM_uint32 maj_stat, min_stat, qop_state; | |
10795 | - u_char rpchdr[128]; | |
10796 | - int32_t *buf; | |
10797 | - | |
10798 | - log_debug("in svcauth_gss_validate()"); | |
10799 | - | |
10800 | - memset(rpchdr, 0, sizeof(rpchdr)); | |
10801 | - | |
10802 | - /* XXX - Reconstruct RPC header for signing (from xdr_callmsg). */ | |
10803 | - buf = (int32_t *)rpchdr; | |
10804 | - IXDR_PUT_LONG(buf, msg->rm_xid); | |
10805 | - IXDR_PUT_ENUM(buf, msg->rm_direction); | |
10806 | - IXDR_PUT_LONG(buf, msg->rm_call.cb_rpcvers); | |
10807 | - IXDR_PUT_LONG(buf, msg->rm_call.cb_prog); | |
10808 | - IXDR_PUT_LONG(buf, msg->rm_call.cb_vers); | |
10809 | - IXDR_PUT_LONG(buf, msg->rm_call.cb_proc); | |
10810 | - oa = &msg->rm_call.cb_cred; | |
10811 | - IXDR_PUT_ENUM(buf, oa->oa_flavor); | |
10812 | - IXDR_PUT_LONG(buf, oa->oa_length); | |
10813 | - if (oa->oa_length) { | |
10814 | - memcpy((caddr_t)buf, oa->oa_base, oa->oa_length); | |
10815 | - buf += RNDUP(oa->oa_length) / sizeof(int32_t); | |
10816 | - } | |
10817 | - rpcbuf.value = rpchdr; | |
10818 | - rpcbuf.length = (u_char *)buf - rpchdr; | |
10819 | - | |
10820 | - checksum.value = msg->rm_call.cb_verf.oa_base; | |
10821 | - checksum.length = msg->rm_call.cb_verf.oa_length; | |
10822 | - | |
10823 | - maj_stat = gss_verify_mic(&min_stat, gd->ctx, &rpcbuf, &checksum, | |
10824 | - &qop_state); | |
10825 | - | |
10826 | - if (maj_stat != GSS_S_COMPLETE) { | |
10827 | - log_status("gss_verify_mic", maj_stat, min_stat); | |
10828 | - return (FALSE); | |
10829 | - } | |
10830 | - return (TRUE); | |
10831 | -} | |
10832 | - | |
10833 | -bool_t | |
10834 | -svcauth_gss_nextverf(struct svc_req *rqst, u_int num) | |
10835 | -{ | |
10836 | - struct svc_rpc_gss_data *gd; | |
10837 | - gss_buffer_desc signbuf, checksum; | |
10838 | - OM_uint32 maj_stat, min_stat; | |
10839 | - | |
10840 | - log_debug("in svcauth_gss_nextverf()"); | |
10841 | - | |
10842 | - if (rqst->rq_xprt->xp_auth == NULL) | |
10843 | - return (FALSE); | |
10844 | - | |
10845 | - gd = SVCAUTH_PRIVATE(rqst->rq_xprt->xp_auth); | |
10846 | - | |
10847 | - signbuf.value = # | |
10848 | - signbuf.length = sizeof(num); | |
10849 | - | |
10850 | - maj_stat = gss_get_mic(&min_stat, gd->ctx, gd->sec.qop, | |
10851 | - &signbuf, &checksum); | |
10852 | - | |
10853 | - if (maj_stat != GSS_S_COMPLETE) { | |
10854 | - log_status("gss_get_mic", maj_stat, min_stat); | |
10855 | - return (FALSE); | |
10856 | - } | |
10857 | - rqst->rq_xprt->xp_verf.oa_flavor = RPCSEC_GSS; | |
10858 | - rqst->rq_xprt->xp_verf.oa_base = (caddr_t)checksum.value; | |
10859 | - rqst->rq_xprt->xp_verf.oa_length = (u_int)checksum.length; | |
10860 | - | |
10861 | - return (TRUE); | |
10862 | -} | |
10863 | - | |
10864 | -enum auth_stat | |
10865 | -_svcauth_gss(struct svc_req *rqst, struct rpc_msg *msg, bool_t *no_dispatch) | |
10866 | -{ | |
10867 | - XDR xdrs; | |
10868 | - SVCAUTH *auth; | |
10869 | - struct svc_rpc_gss_data *gd; | |
10870 | - struct rpc_gss_cred *gc; | |
10871 | - struct rpc_gss_init_res gr; | |
10872 | - int call_stat, offset; | |
10873 | - | |
10874 | - log_debug("in svcauth_gss()"); | |
10875 | - | |
10876 | - /* Initialize reply. */ | |
10877 | - rqst->rq_xprt->xp_verf = _null_auth; | |
10878 | - | |
10879 | - /* Allocate and set up server auth handle. */ | |
10880 | - if (rqst->rq_xprt->xp_auth == NULL || | |
10881 | - rqst->rq_xprt->xp_auth == &svc_auth_none) { | |
10882 | - if ((auth = calloc(sizeof(*auth), 1)) == NULL) { | |
10883 | - fprintf(stderr, "svcauth_gss: out_of_memory\n"); | |
10884 | - return (AUTH_FAILED); | |
10885 | - } | |
10886 | - if ((gd = calloc(sizeof(*gd), 1)) == NULL) { | |
10887 | - fprintf(stderr, "svcauth_gss: out_of_memory\n"); | |
10888 | - return (AUTH_FAILED); | |
10889 | - } | |
10890 | - auth->svc_ah_ops = &svc_auth_gss_ops; | |
10891 | - SVCAUTH_PRIVATE(auth) = gd; | |
10892 | - rqst->rq_xprt->xp_auth = auth; | |
10893 | - } | |
10894 | - else gd = SVCAUTH_PRIVATE(rqst->rq_xprt->xp_auth); | |
10895 | - | |
10896 | - /* Deserialize client credentials. */ | |
10897 | - if (rqst->rq_cred.oa_length <= 0) | |
10898 | - return (AUTH_BADCRED); | |
10899 | - | |
10900 | - gc = (struct rpc_gss_cred *)rqst->rq_clntcred; | |
10901 | - memset(gc, 0, sizeof(*gc)); | |
10902 | - | |
10903 | - xdrmem_create(&xdrs, rqst->rq_cred.oa_base, | |
10904 | - rqst->rq_cred.oa_length, XDR_DECODE); | |
10905 | - | |
10906 | - if (!xdr_rpc_gss_cred(&xdrs, gc)) { | |
10907 | - XDR_DESTROY(&xdrs); | |
10908 | - return (AUTH_BADCRED); | |
10909 | - } | |
10910 | - XDR_DESTROY(&xdrs); | |
10911 | - | |
10912 | - /* Check version. */ | |
10913 | - if (gc->gc_v != RPCSEC_GSS_VERSION) | |
10914 | - return (AUTH_BADCRED); | |
10915 | - | |
10916 | - /* Check RPCSEC_GSS service. */ | |
10917 | - if (gc->gc_svc != RPCSEC_GSS_SVC_NONE && | |
10918 | - gc->gc_svc != RPCSEC_GSS_SVC_INTEGRITY && | |
10919 | - gc->gc_svc != RPCSEC_GSS_SVC_PRIVACY) | |
10920 | - return (AUTH_BADCRED); | |
10921 | - | |
10922 | - /* Check sequence number. */ | |
10923 | - if (gd->established) { | |
10924 | - if (gc->gc_seq > MAXSEQ) | |
10925 | - return (RPCSEC_GSS_CTXPROBLEM); | |
10926 | - | |
10927 | - if ((offset = gd->seqlast - gc->gc_seq) < 0) { | |
10928 | - gd->seqlast = gc->gc_seq; | |
10929 | - offset = 0 - offset; | |
10930 | - gd->seqmask <<= offset; | |
10931 | - offset = 0; | |
10932 | - } | |
10933 | - else if (offset >= gd->win || (gd->seqmask & (1 << offset))) { | |
10934 | - *no_dispatch = 1; | |
10935 | - return (RPCSEC_GSS_CTXPROBLEM); | |
10936 | - } | |
10937 | - gd->seq = gc->gc_seq; | |
10938 | - gd->seqmask |= (1 << offset); | |
10939 | - } | |
10940 | - | |
10941 | - if (gd->established) { | |
10942 | - rqst->rq_clntname = (char *)gd->client_name; | |
10943 | - rqst->rq_svcname = (char *)gd->ctx; | |
10944 | - } | |
10945 | - | |
10946 | - /* Handle RPCSEC_GSS control procedure. */ | |
10947 | - switch (gc->gc_proc) { | |
10948 | - | |
10949 | - case RPCSEC_GSS_INIT: | |
10950 | - case RPCSEC_GSS_CONTINUE_INIT: | |
10951 | - if (rqst->rq_proc != NULLPROC) | |
10952 | - return (AUTH_FAILED); /* XXX ? */ | |
10953 | - | |
10954 | - if (_svcauth_gss_name == NULL) { | |
10955 | - if (!svcauth_gss_import_name("nfs")) | |
10956 | - return (AUTH_FAILED); | |
10957 | - } | |
10958 | - | |
10959 | - if (!svcauth_gss_acquire_cred()) | |
10960 | - return (AUTH_FAILED); | |
10961 | - | |
10962 | - if (!svcauth_gss_accept_sec_context(rqst, &gr)) | |
10963 | - return (AUTH_REJECTEDCRED); | |
10964 | - | |
10965 | - if (!svcauth_gss_nextverf(rqst, htonl(gr.gr_win))) | |
10966 | - return (AUTH_FAILED); | |
10967 | - | |
10968 | - *no_dispatch = TRUE; | |
10969 | - | |
10970 | - call_stat = svc_sendreply(rqst->rq_xprt, xdr_rpc_gss_init_res, | |
10971 | - (caddr_t)&gr); | |
10972 | - | |
10973 | - if (!call_stat) | |
10974 | - return (AUTH_FAILED); | |
10975 | - | |
10976 | - if (gr.gr_major == GSS_S_COMPLETE) | |
10977 | - gd->established = TRUE; | |
10978 | - | |
10979 | - break; | |
10980 | - | |
10981 | - case RPCSEC_GSS_DATA: | |
10982 | - if (!svcauth_gss_validate(gd, msg)) | |
10983 | - return (RPCSEC_GSS_CREDPROBLEM); | |
10984 | - | |
10985 | - if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) | |
10986 | - return (AUTH_FAILED); | |
10987 | - break; | |
10988 | - | |
10989 | - case RPCSEC_GSS_DESTROY: | |
10990 | - if (rqst->rq_proc != NULLPROC) | |
10991 | - return (AUTH_FAILED); /* XXX ? */ | |
10992 | - | |
10993 | - if (!svcauth_gss_validate(gd, msg)) | |
10994 | - return (RPCSEC_GSS_CREDPROBLEM); | |
10995 | - | |
10996 | - if (!svcauth_gss_nextverf(rqst, htonl(gc->gc_seq))) | |
10997 | - return (AUTH_FAILED); | |
10998 | - | |
10999 | - if (!svcauth_gss_release_cred()) | |
11000 | - return (AUTH_FAILED); | |
11001 | - | |
11002 | - SVCAUTH_DESTROY(rqst->rq_xprt->xp_auth); | |
11003 | - rqst->rq_xprt->xp_auth = &svc_auth_none; | |
11004 | - | |
11005 | - break; | |
11006 | - | |
11007 | - default: | |
11008 | - return (AUTH_REJECTEDCRED); | |
11009 | - break; | |
11010 | - } | |
11011 | - return (AUTH_OK); | |
11012 | -} | |
11013 | - | |
11014 | -bool_t | |
11015 | -svcauth_gss_destroy(SVCAUTH *auth) | |
11016 | -{ | |
11017 | - struct svc_rpc_gss_data *gd; | |
11018 | - OM_uint32 min_stat; | |
11019 | - | |
11020 | - log_debug("in svcauth_gss_destroy()"); | |
11021 | - | |
11022 | - gd = SVCAUTH_PRIVATE(auth); | |
11023 | - | |
11024 | - gss_delete_sec_context(&min_stat, &gd->ctx, GSS_C_NO_BUFFER); | |
11025 | - gss_release_buffer(&min_stat, &gd->cname); | |
11026 | - | |
11027 | - if (gd->client_name) | |
11028 | - gss_release_name(&min_stat, &gd->client_name); | |
11029 | - | |
11030 | - mem_free(gd, sizeof(*gd)); | |
11031 | - mem_free(auth, sizeof(*auth)); | |
11032 | - | |
11033 | - return (TRUE); | |
11034 | -} | |
11035 | - | |
11036 | -bool_t | |
11037 | -svcauth_gss_wrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr) | |
11038 | -{ | |
11039 | - struct svc_rpc_gss_data *gd; | |
11040 | - | |
11041 | - log_debug("in svcauth_gss_wrap()"); | |
11042 | - | |
11043 | - gd = SVCAUTH_PRIVATE(auth); | |
11044 | - | |
11045 | - if (!gd->established || gd->sec.svc == RPCSEC_GSS_SVC_NONE) { | |
11046 | - return ((*xdr_func)(xdrs, xdr_ptr)); | |
11047 | - } | |
11048 | - return (xdr_rpc_gss_data(xdrs, xdr_func, xdr_ptr, | |
11049 | - gd->ctx, gd->sec.qop, | |
11050 | - gd->sec.svc, gd->seq)); | |
11051 | -} | |
11052 | - | |
11053 | -bool_t | |
11054 | -svcauth_gss_unwrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr) | |
11055 | -{ | |
11056 | - struct svc_rpc_gss_data *gd; | |
11057 | - | |
11058 | - log_debug("in svcauth_gss_unwrap()"); | |
11059 | - | |
11060 | - gd = SVCAUTH_PRIVATE(auth); | |
11061 | - | |
11062 | - if (!gd->established || gd->sec.svc == RPCSEC_GSS_SVC_NONE) { | |
11063 | - return ((*xdr_func)(xdrs, xdr_ptr)); | |
11064 | - } | |
11065 | - return (xdr_rpc_gss_data(xdrs, xdr_func, xdr_ptr, | |
11066 | - gd->ctx, gd->sec.qop, | |
11067 | - gd->sec.svc, gd->seq)); | |
11068 | -} | |
11069 | - | |
11070 | -char * | |
11071 | -svcauth_gss_get_principal(SVCAUTH *auth) | |
11072 | -{ | |
11073 | - struct svc_rpc_gss_data *gd; | |
11074 | - char *pname; | |
11075 | - | |
11076 | - gd = SVCAUTH_PRIVATE(auth); | |
11077 | - | |
11078 | - if (gd->cname.length == 0) | |
11079 | - return (NULL); | |
11080 | - | |
11081 | - if ((pname = malloc(gd->cname.length + 1)) == NULL) | |
11082 | - return (NULL); | |
11083 | - | |
11084 | - memcpy(pname, gd->cname.value, gd->cname.length); | |
11085 | - pname[gd->cname.length] = '\0'; | |
11086 | - | |
11087 | - return (pname); | |
11088 | -} | |
11089 | diff -puN -L support/rpc/svc_auth_none.c support/rpc/svc_auth_none.c~CITI_NFS4_ALL /dev/null | |
11090 | --- nfs-utils-1.0.7/support/rpc/svc_auth_none.c | |
11091 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
11092 | @@ -1,73 +0,0 @@ | |
11093 | -/* | |
11094 | - svc_auth_none.c | |
11095 | - | |
11096 | - Copyright (c) 2000 The Regents of the University of Michigan. | |
11097 | - All rights reserved. | |
11098 | - | |
11099 | - Copyright (c) 2000 Dug Song <dugsong@UMICH.EDU>. | |
11100 | - All rights reserved, all wrongs reversed. | |
11101 | - | |
11102 | - Redistribution and use in source and binary forms, with or without | |
11103 | - modification, are permitted provided that the following conditions | |
11104 | - are met: | |
11105 | - | |
11106 | - 1. Redistributions of source code must retain the above copyright | |
11107 | - notice, this list of conditions and the following disclaimer. | |
11108 | - 2. Redistributions in binary form must reproduce the above copyright | |
11109 | - notice, this list of conditions and the following disclaimer in the | |
11110 | - documentation and/or other materials provided with the distribution. | |
11111 | - 3. Neither the name of the University nor the names of its | |
11112 | - contributors may be used to endorse or promote products derived | |
11113 | - from this software without specific prior written permission. | |
11114 | - | |
11115 | - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | |
11116 | - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
11117 | - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
11118 | - DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
11119 | - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
11120 | - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
11121 | - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
11122 | - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
11123 | - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
11124 | - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
11125 | - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
11126 | - | |
11127 | - $Id$ | |
11128 | - */ | |
11129 | - | |
11130 | -#include <rpc/rpc.h> | |
11131 | - | |
11132 | -static bool_t svcauth_none_destroy(); | |
11133 | -static bool_t svcauth_none_wrap(); | |
11134 | - | |
11135 | -struct svc_auth_ops svc_auth_none_ops = { | |
11136 | - svcauth_none_wrap, | |
11137 | - svcauth_none_wrap, | |
11138 | - svcauth_none_destroy | |
11139 | -}; | |
11140 | - | |
11141 | -SVCAUTH svc_auth_none = { | |
11142 | - &svc_auth_none_ops, | |
11143 | - NULL, | |
11144 | -}; | |
11145 | - | |
11146 | -static bool_t | |
11147 | -svcauth_none_destroy(SVCAUTH *auth) | |
11148 | -{ | |
11149 | - return (TRUE); | |
11150 | -} | |
11151 | - | |
11152 | -static bool_t | |
11153 | -svcauth_none_wrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, | |
11154 | - caddr_t xdr_ptr) | |
11155 | -{ | |
11156 | - return ((*xdr_func)(xdrs, xdr_ptr)); | |
11157 | -} | |
11158 | - | |
11159 | -enum auth_stat | |
11160 | -_svcauth_none(struct svc_req *rqst, struct rpc_msg *msg) | |
11161 | -{ | |
11162 | - rqst->rq_xprt->xp_auth = &svc_auth_none; | |
11163 | - | |
11164 | - return (AUTH_OK); | |
11165 | -} | |
11166 | diff -puN -L support/rpc/svc_auth_unix.c support/rpc/svc_auth_unix.c~CITI_NFS4_ALL /dev/null | |
11167 | --- nfs-utils-1.0.7/support/rpc/svc_auth_unix.c | |
11168 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
11169 | @@ -1,140 +0,0 @@ | |
11170 | -/* | |
11171 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
11172 | - * unrestricted use provided that this legend is included on all tape | |
11173 | - * media and as a part of the software program in whole or part. Users | |
11174 | - * may copy or modify Sun RPC without charge, but are not authorized | |
11175 | - * to license or distribute it to anyone else except as part of a product or | |
11176 | - * program developed by the user. | |
11177 | - * | |
11178 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
11179 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
11180 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
11181 | - * | |
11182 | - * Sun RPC is provided with no support and without any obligation on the | |
11183 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
11184 | - * modification or enhancement. | |
11185 | - * | |
11186 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
11187 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
11188 | - * OR ANY PART THEREOF. | |
11189 | - * | |
11190 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
11191 | - * or profits or other special, indirect and consequential damages, even if | |
11192 | - * Sun has been advised of the possibility of such damages. | |
11193 | - * | |
11194 | - * Sun Microsystems, Inc. | |
11195 | - * 2550 Garcia Avenue | |
11196 | - * Mountain View, California 94043 | |
11197 | - */ | |
11198 | - | |
11199 | -#if defined(LIBC_SCCS) && !defined(lint) | |
11200 | -static char *rcsid = "$OpenBSD: svc_auth_unix.c,v 1.6 1998/11/22 07:38:25 deraadt Exp $"; | |
11201 | -#endif /* LIBC_SCCS and not lint */ | |
11202 | - | |
11203 | -/* | |
11204 | - * svc_auth_unix.c | |
11205 | - * Handles UNIX flavor authentication parameters on the service side of rpc. | |
11206 | - * There are two svc auth implementations here: AUTH_UNIX and AUTH_SHORT. | |
11207 | - * _svcauth_unix does full blown unix style uid,gid+gids auth, | |
11208 | - * _svcauth_short uses a shorthand auth to index into a cache of longhand auths. | |
11209 | - * Note: the shorthand has been gutted for efficiency. | |
11210 | - * | |
11211 | - * Copyright (C) 1984, Sun Microsystems, Inc. | |
11212 | - */ | |
11213 | - | |
11214 | -#include <stdio.h> | |
11215 | -#include <rpc/rpc.h> | |
11216 | -#include <string.h> | |
11217 | - | |
11218 | -extern SVCAUTH svc_auth_none; | |
11219 | - | |
11220 | -/* | |
11221 | - * Unix longhand authenticator | |
11222 | - */ | |
11223 | -enum auth_stat | |
11224 | -_svcauth_unix(rqst, msg) | |
11225 | - register struct svc_req *rqst; | |
11226 | - register struct rpc_msg *msg; | |
11227 | -{ | |
11228 | - register enum auth_stat stat; | |
11229 | - XDR xdrs; | |
11230 | - register struct authunix_parms *aup; | |
11231 | - register int32_t *buf; | |
11232 | - struct area { | |
11233 | - struct authunix_parms area_aup; | |
11234 | - char area_machname[MAX_MACHINE_NAME+1]; | |
11235 | - int area_gids[NGRPS]; | |
11236 | - } *area; | |
11237 | - u_int auth_len; | |
11238 | - u_int str_len, gid_len; | |
11239 | - register u_int i; | |
11240 | - | |
11241 | - rqst->rq_xprt->xp_auth = &svc_auth_none; | |
11242 | - | |
11243 | - area = (struct area *) rqst->rq_clntcred; | |
11244 | - aup = &area->area_aup; | |
11245 | - aup->aup_machname = area->area_machname; | |
11246 | - aup->aup_gids = area->area_gids; | |
11247 | - auth_len = (u_int)msg->rm_call.cb_cred.oa_length; | |
11248 | - xdrmem_create(&xdrs, msg->rm_call.cb_cred.oa_base, auth_len,XDR_DECODE); | |
11249 | - buf = XDR_INLINE(&xdrs, auth_len); | |
11250 | - if (buf != NULL) { | |
11251 | - aup->aup_time = IXDR_GET_LONG(buf); | |
11252 | - str_len = IXDR_GET_U_LONG(buf); | |
11253 | - if (str_len > MAX_MACHINE_NAME) { | |
11254 | - stat = AUTH_BADCRED; | |
11255 | - goto done; | |
11256 | - } | |
11257 | - memcpy(aup->aup_machname, (caddr_t)buf, (u_int)str_len); | |
11258 | - aup->aup_machname[str_len] = 0; | |
11259 | - str_len = RNDUP(str_len); | |
11260 | - buf += str_len / sizeof (int32_t); | |
11261 | - aup->aup_uid = IXDR_GET_LONG(buf); | |
11262 | - aup->aup_gid = IXDR_GET_LONG(buf); | |
11263 | - gid_len = IXDR_GET_U_LONG(buf); | |
11264 | - if (gid_len > NGRPS) { | |
11265 | - stat = AUTH_BADCRED; | |
11266 | - goto done; | |
11267 | - } | |
11268 | - aup->aup_len = gid_len; | |
11269 | - for (i = 0; i < gid_len; i++) { | |
11270 | - aup->aup_gids[i] = IXDR_GET_LONG(buf); | |
11271 | - } | |
11272 | - /* | |
11273 | - * five is the smallest unix credentials structure - | |
11274 | - * timestamp, hostname len (0), uid, gid, and gids len (0). | |
11275 | - */ | |
11276 | - if ((5 + gid_len) * BYTES_PER_XDR_UNIT + str_len > auth_len) { | |
11277 | - (void) printf("bad auth_len gid %u str %u auth %u\n", | |
11278 | - gid_len, str_len, auth_len); | |
11279 | - stat = AUTH_BADCRED; | |
11280 | - goto done; | |
11281 | - } | |
11282 | - } else if (! xdr_authunix_parms(&xdrs, aup)) { | |
11283 | - xdrs.x_op = XDR_FREE; | |
11284 | - (void)xdr_authunix_parms(&xdrs, aup); | |
11285 | - stat = AUTH_BADCRED; | |
11286 | - goto done; | |
11287 | - } | |
11288 | - rqst->rq_xprt->xp_verf.oa_flavor = AUTH_NULL; | |
11289 | - rqst->rq_xprt->xp_verf.oa_length = 0; | |
11290 | - stat = AUTH_OK; | |
11291 | -done: | |
11292 | - XDR_DESTROY(&xdrs); | |
11293 | - return (stat); | |
11294 | -} | |
11295 | - | |
11296 | - | |
11297 | -/* | |
11298 | - * Shorthand unix authenticator | |
11299 | - * Looks up longhand in a cache. | |
11300 | - */ | |
11301 | -enum auth_stat | |
11302 | -_svcauth_short(rqst, msg) | |
11303 | - struct svc_req *rqst; | |
11304 | - struct rpc_msg *msg; | |
11305 | -{ | |
11306 | - rqst->rq_xprt->xp_auth = &svc_auth_none; | |
11307 | - | |
11308 | - return (AUTH_REJECTEDCRED); | |
11309 | -} | |
11310 | diff -puN -L support/rpc/svc.c support/rpc/svc.c~CITI_NFS4_ALL /dev/null | |
11311 | --- nfs-utils-1.0.7/support/rpc/svc.c | |
11312 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
11313 | @@ -1,508 +0,0 @@ | |
11314 | -/* | |
11315 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
11316 | - * unrestricted use provided that this legend is included on all tape | |
11317 | - * media and as a part of the software program in whole or part. Users | |
11318 | - * may copy or modify Sun RPC without charge, but are not authorized | |
11319 | - * to license or distribute it to anyone else except as part of a product or | |
11320 | - * program developed by the user. | |
11321 | - * | |
11322 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
11323 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
11324 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
11325 | - * | |
11326 | - * Sun RPC is provided with no support and without any obligation on the | |
11327 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
11328 | - * modification or enhancement. | |
11329 | - * | |
11330 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
11331 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
11332 | - * OR ANY PART THEREOF. | |
11333 | - * | |
11334 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
11335 | - * or profits or other special, indirect and consequential damages, even if | |
11336 | - * Sun has been advised of the possibility of such damages. | |
11337 | - * | |
11338 | - * Sun Microsystems, Inc. | |
11339 | - * 2550 Garcia Avenue | |
11340 | - * Mountain View, California 94043 | |
11341 | - */ | |
11342 | - | |
11343 | -#if defined(LIBC_SCCS) && !defined(lint) | |
11344 | -static char *rcsid = "$OpenBSD: svc.c,v 1.11 1998/02/25 12:21:18 deraadt Exp $"; | |
11345 | -#endif /* LIBC_SCCS and not lint */ | |
11346 | - | |
11347 | -/* | |
11348 | - * svc.c, Server-side remote procedure call interface. | |
11349 | - * | |
11350 | - * There are two sets of procedures here. The xprt routines are | |
11351 | - * for handling transport handles. The svc routines handle the | |
11352 | - * list of service routines. | |
11353 | - * | |
11354 | - * Copyright (C) 1984, Sun Microsystems, Inc. | |
11355 | - */ | |
11356 | - | |
11357 | -#include <stdlib.h> | |
11358 | -#include <string.h> | |
11359 | - | |
11360 | -#include <sys/param.h> | |
11361 | -#include <sys/errno.h> | |
11362 | -#include <rpc/rpc.h> | |
11363 | -#include <rpc/pmap_clnt.h> | |
11364 | - | |
11365 | -static SVCXPRT **xports; | |
11366 | -static int xportssize; | |
11367 | - | |
11368 | -#define NULL_SVC ((struct svc_callout *)0) | |
11369 | -#define RQCRED_SIZE 1024 /* this size is excessive */ | |
11370 | - | |
11371 | -#define max(a, b) (a > b ? a : b) | |
11372 | - | |
11373 | -#if 0 | |
11374 | -#ifdef __linux__ | |
11375 | -#define fds_bits __fds_bits /* XXX - Linux sux */ | |
11376 | -#endif | |
11377 | -#endif | |
11378 | - | |
11379 | -/* | |
11380 | - * The services list | |
11381 | - * Each entry represents a set of procedures (an rpc program). | |
11382 | - * The dispatch routine takes request structs and runs the | |
11383 | - * apropriate procedure. | |
11384 | - */ | |
11385 | -static struct svc_callout { | |
11386 | - struct svc_callout *sc_next; | |
11387 | - u_long sc_prog; | |
11388 | - u_long sc_vers; | |
11389 | - void (*sc_dispatch)(); | |
11390 | -} *svc_head; | |
11391 | - | |
11392 | -static struct svc_callout *svc_find(); | |
11393 | - | |
11394 | -int __svc_fdsetsize; | |
11395 | -fd_set *__svc_fdset; | |
11396 | - | |
11397 | -/* *************** SVCXPRT related stuff **************** */ | |
11398 | - | |
11399 | -/* | |
11400 | - * Activate a transport handle. | |
11401 | - */ | |
11402 | -void | |
11403 | -xprt_register(xprt) | |
11404 | - SVCXPRT *xprt; | |
11405 | -{ | |
11406 | - register int sock = xprt->xp_sock; | |
11407 | - | |
11408 | - if (sock+1 > __svc_fdsetsize) { | |
11409 | - int bytes = howmany(sock+1, NFDBITS) * sizeof(fd_mask); | |
11410 | - fd_set *fds; | |
11411 | - | |
11412 | - fds = (fd_set *)malloc(bytes); | |
11413 | - memset(fds, 0, bytes); | |
11414 | - if (__svc_fdset) { | |
11415 | - memcpy(fds, __svc_fdset, howmany(__svc_fdsetsize, | |
11416 | - NFDBITS) * sizeof(fd_mask)); | |
11417 | - free(__svc_fdset); | |
11418 | - } | |
11419 | - __svc_fdset = fds; | |
11420 | - __svc_fdsetsize = sock+1; | |
11421 | - } | |
11422 | - | |
11423 | - if (sock < FD_SETSIZE) | |
11424 | - FD_SET(sock, &svc_fdset); | |
11425 | - FD_SET(sock, __svc_fdset); | |
11426 | - | |
11427 | - if (xports == NULL || sock+1 > xportssize) { | |
11428 | - SVCXPRT **xp; | |
11429 | - int size = FD_SETSIZE; | |
11430 | - | |
11431 | - if (sock+1 > size) | |
11432 | - size = sock+1; | |
11433 | - xp = (SVCXPRT **)mem_alloc(size * sizeof(SVCXPRT *)); | |
11434 | - memset(xp, 0, size * sizeof(SVCXPRT *)); | |
11435 | - if (xports) { | |
11436 | - memcpy(xp, xports, xportssize * sizeof(SVCXPRT *)); | |
11437 | - free(xports); | |
11438 | - } | |
11439 | - xportssize = size; | |
11440 | - xports = xp; | |
11441 | - } | |
11442 | - xports[sock] = xprt; | |
11443 | - svc_maxfd = max(svc_maxfd, sock); | |
11444 | -} | |
11445 | - | |
11446 | -/* | |
11447 | - * De-activate a transport handle. | |
11448 | - */ | |
11449 | -void | |
11450 | -xprt_unregister(xprt) | |
11451 | - SVCXPRT *xprt; | |
11452 | -{ | |
11453 | - register int sock = xprt->xp_sock; | |
11454 | - | |
11455 | - if (xports[sock] == xprt) { | |
11456 | - xports[sock] = (SVCXPRT *)0; | |
11457 | - if (sock < FD_SETSIZE) | |
11458 | - FD_CLR(sock, &svc_fdset); | |
11459 | - FD_CLR(sock, __svc_fdset); | |
11460 | - if (sock == svc_maxfd) { | |
11461 | - for (svc_maxfd--; svc_maxfd>=0; svc_maxfd--) | |
11462 | - if (xports[svc_maxfd]) | |
11463 | - break; | |
11464 | - } | |
11465 | - /* | |
11466 | - * XXX could use svc_maxfd as a hint to | |
11467 | - * decrease the size of __svc_fdset | |
11468 | - */ | |
11469 | - } | |
11470 | -} | |
11471 | - | |
11472 | - | |
11473 | -/* ********************** CALLOUT list related stuff ************* */ | |
11474 | - | |
11475 | -/* | |
11476 | - * Add a service program to the callout list. | |
11477 | - * The dispatch routine will be called when a rpc request for this | |
11478 | - * program number comes in. | |
11479 | - */ | |
11480 | -bool_t | |
11481 | -svc_register(xprt, prog, vers, dispatch, protocol) | |
11482 | - SVCXPRT *xprt; | |
11483 | - u_long prog; | |
11484 | - u_long vers; | |
11485 | - void (*dispatch)(); | |
11486 | - int protocol; | |
11487 | -{ | |
11488 | - struct svc_callout *prev; | |
11489 | - register struct svc_callout *s; | |
11490 | - | |
11491 | - if ((s = svc_find(prog, vers, &prev)) != NULL_SVC) { | |
11492 | - if (s->sc_dispatch == dispatch) | |
11493 | - goto pmap_it; /* he is registering another xptr */ | |
11494 | - return (FALSE); | |
11495 | - } | |
11496 | - s = (struct svc_callout *)mem_alloc(sizeof(struct svc_callout)); | |
11497 | - if (s == (struct svc_callout *)0) { | |
11498 | - return (FALSE); | |
11499 | - } | |
11500 | - s->sc_prog = prog; | |
11501 | - s->sc_vers = vers; | |
11502 | - s->sc_dispatch = dispatch; | |
11503 | - s->sc_next = svc_head; | |
11504 | - svc_head = s; | |
11505 | -pmap_it: | |
11506 | - /* now register the information with the local binder service */ | |
11507 | - if (protocol) { | |
11508 | - return (pmap_set(prog, vers, protocol, xprt->xp_port)); | |
11509 | - } | |
11510 | - return (TRUE); | |
11511 | -} | |
11512 | - | |
11513 | -/* | |
11514 | - * Remove a service program from the callout list. | |
11515 | - */ | |
11516 | -void | |
11517 | -svc_unregister(prog, vers) | |
11518 | - u_long prog; | |
11519 | - u_long vers; | |
11520 | -{ | |
11521 | - struct svc_callout *prev; | |
11522 | - register struct svc_callout *s; | |
11523 | - | |
11524 | - if ((s = svc_find(prog, vers, &prev)) == NULL_SVC) | |
11525 | - return; | |
11526 | - if (prev == NULL_SVC) { | |
11527 | - svc_head = s->sc_next; | |
11528 | - } else { | |
11529 | - prev->sc_next = s->sc_next; | |
11530 | - } | |
11531 | - s->sc_next = NULL_SVC; | |
11532 | - mem_free((char *) s, (u_int) sizeof(struct svc_callout)); | |
11533 | - /* now unregister the information with the local binder service */ | |
11534 | - (void)pmap_unset(prog, vers); | |
11535 | -} | |
11536 | - | |
11537 | -/* | |
11538 | - * Search the callout list for a program number, return the callout | |
11539 | - * struct. | |
11540 | - */ | |
11541 | -static struct svc_callout * | |
11542 | -svc_find(prog, vers, prev) | |
11543 | - u_long prog; | |
11544 | - u_long vers; | |
11545 | - struct svc_callout **prev; | |
11546 | -{ | |
11547 | - register struct svc_callout *s, *p; | |
11548 | - | |
11549 | - p = NULL_SVC; | |
11550 | - for (s = svc_head; s != NULL_SVC; s = s->sc_next) { | |
11551 | - if ((s->sc_prog == prog) && (s->sc_vers == vers)) | |
11552 | - goto done; | |
11553 | - p = s; | |
11554 | - } | |
11555 | -done: | |
11556 | - *prev = p; | |
11557 | - return (s); | |
11558 | -} | |
11559 | - | |
11560 | -/* ******************* REPLY GENERATION ROUTINES ************ */ | |
11561 | - | |
11562 | -/* | |
11563 | - * Send a reply to an rpc request | |
11564 | - */ | |
11565 | -bool_t | |
11566 | -svc_sendreply(xprt, xdr_results, xdr_location) | |
11567 | - register SVCXPRT *xprt; | |
11568 | - xdrproc_t xdr_results; | |
11569 | - caddr_t xdr_location; | |
11570 | -{ | |
11571 | - struct rpc_msg rply; | |
11572 | - | |
11573 | - rply.rm_direction = REPLY; | |
11574 | - rply.rm_reply.rp_stat = MSG_ACCEPTED; | |
11575 | - rply.acpted_rply.ar_verf = xprt->xp_verf; | |
11576 | - rply.acpted_rply.ar_stat = SUCCESS; | |
11577 | - rply.acpted_rply.ar_results.where = xdr_location; | |
11578 | - rply.acpted_rply.ar_results.proc = xdr_results; | |
11579 | - return (SVC_REPLY(xprt, &rply)); | |
11580 | -} | |
11581 | - | |
11582 | -/* | |
11583 | - * No procedure error reply | |
11584 | - */ | |
11585 | -void | |
11586 | -svcerr_noproc(xprt) | |
11587 | - register SVCXPRT *xprt; | |
11588 | -{ | |
11589 | - struct rpc_msg rply; | |
11590 | - | |
11591 | - rply.rm_direction = REPLY; | |
11592 | - rply.rm_reply.rp_stat = MSG_ACCEPTED; | |
11593 | - rply.acpted_rply.ar_verf = xprt->xp_verf; | |
11594 | - rply.acpted_rply.ar_stat = PROC_UNAVAIL; | |
11595 | - SVC_REPLY(xprt, &rply); | |
11596 | -} | |
11597 | - | |
11598 | -/* | |
11599 | - * Can't decode args error reply | |
11600 | - */ | |
11601 | -void | |
11602 | -svcerr_decode(xprt) | |
11603 | - register SVCXPRT *xprt; | |
11604 | -{ | |
11605 | - struct rpc_msg rply; | |
11606 | - | |
11607 | - rply.rm_direction = REPLY; | |
11608 | - rply.rm_reply.rp_stat = MSG_ACCEPTED; | |
11609 | - rply.acpted_rply.ar_verf = xprt->xp_verf; | |
11610 | - rply.acpted_rply.ar_stat = GARBAGE_ARGS; | |
11611 | - SVC_REPLY(xprt, &rply); | |
11612 | -} | |
11613 | - | |
11614 | -/* | |
11615 | - * Some system error | |
11616 | - */ | |
11617 | -void | |
11618 | -svcerr_systemerr(xprt) | |
11619 | - register SVCXPRT *xprt; | |
11620 | -{ | |
11621 | - struct rpc_msg rply; | |
11622 | - | |
11623 | - rply.rm_direction = REPLY; | |
11624 | - rply.rm_reply.rp_stat = MSG_ACCEPTED; | |
11625 | - rply.acpted_rply.ar_verf = xprt->xp_verf; | |
11626 | - rply.acpted_rply.ar_stat = SYSTEM_ERR; | |
11627 | - SVC_REPLY(xprt, &rply); | |
11628 | -} | |
11629 | - | |
11630 | -/* | |
11631 | - * Authentication error reply | |
11632 | - */ | |
11633 | -void | |
11634 | -svcerr_auth(xprt, why) | |
11635 | - SVCXPRT *xprt; | |
11636 | - enum auth_stat why; | |
11637 | -{ | |
11638 | - struct rpc_msg rply; | |
11639 | - | |
11640 | - rply.rm_direction = REPLY; | |
11641 | - rply.rm_reply.rp_stat = MSG_DENIED; | |
11642 | - rply.rjcted_rply.rj_stat = AUTH_ERROR; | |
11643 | - rply.rjcted_rply.rj_why = why; | |
11644 | - SVC_REPLY(xprt, &rply); | |
11645 | -} | |
11646 | - | |
11647 | -/* | |
11648 | - * Auth too weak error reply | |
11649 | - */ | |
11650 | -void | |
11651 | -svcerr_weakauth(xprt) | |
11652 | - SVCXPRT *xprt; | |
11653 | -{ | |
11654 | - | |
11655 | - svcerr_auth(xprt, AUTH_TOOWEAK); | |
11656 | -} | |
11657 | - | |
11658 | -/* | |
11659 | - * Program unavailable error reply | |
11660 | - */ | |
11661 | -void | |
11662 | -svcerr_noprog(xprt) | |
11663 | - register SVCXPRT *xprt; | |
11664 | -{ | |
11665 | - struct rpc_msg rply; | |
11666 | - | |
11667 | - rply.rm_direction = REPLY; | |
11668 | - rply.rm_reply.rp_stat = MSG_ACCEPTED; | |
11669 | - rply.acpted_rply.ar_verf = xprt->xp_verf; | |
11670 | - rply.acpted_rply.ar_stat = PROG_UNAVAIL; | |
11671 | - SVC_REPLY(xprt, &rply); | |
11672 | -} | |
11673 | - | |
11674 | -/* | |
11675 | - * Program version mismatch error reply | |
11676 | - */ | |
11677 | -void | |
11678 | -svcerr_progvers(xprt, low_vers, high_vers) | |
11679 | - register SVCXPRT *xprt; | |
11680 | - u_long low_vers; | |
11681 | - u_long high_vers; | |
11682 | -{ | |
11683 | - struct rpc_msg rply; | |
11684 | - | |
11685 | - rply.rm_direction = REPLY; | |
11686 | - rply.rm_reply.rp_stat = MSG_ACCEPTED; | |
11687 | - rply.acpted_rply.ar_verf = xprt->xp_verf; | |
11688 | - rply.acpted_rply.ar_stat = PROG_MISMATCH; | |
11689 | - rply.acpted_rply.ar_vers.low = low_vers; | |
11690 | - rply.acpted_rply.ar_vers.high = high_vers; | |
11691 | - SVC_REPLY(xprt, &rply); | |
11692 | -} | |
11693 | - | |
11694 | -/* ******************* SERVER INPUT STUFF ******************* */ | |
11695 | - | |
11696 | -/* | |
11697 | - * Get server side input from some transport. | |
11698 | - * | |
11699 | - * Statement of authentication parameters management: | |
11700 | - * This function owns and manages all authentication parameters, specifically | |
11701 | - * the "raw" parameters (msg.rm_call.cb_cred and msg.rm_call.cb_verf) and | |
11702 | - * the "cooked" credentials (rqst->rq_clntcred). | |
11703 | - * However, this function does not know the structure of the cooked | |
11704 | - * credentials, so it make the following assumptions: | |
11705 | - * a) the structure is contiguous (no pointers), and | |
11706 | - * b) the cred structure size does not exceed RQCRED_SIZE bytes. | |
11707 | - * In all events, all three parameters are freed upon exit from this routine. | |
11708 | - * The storage is trivially management on the call stack in user land, but | |
11709 | - * is mallocated in kernel land. | |
11710 | - */ | |
11711 | - | |
11712 | -void | |
11713 | -svc_getreq(rdfds) | |
11714 | - int rdfds; | |
11715 | -{ | |
11716 | - fd_set readfds; | |
11717 | - | |
11718 | - FD_ZERO(&readfds); | |
11719 | - readfds.fds_bits[0] = rdfds; | |
11720 | - svc_getreqset(&readfds); | |
11721 | -} | |
11722 | - | |
11723 | -void svc_getreqset2 __P((fd_set *, int)); | |
11724 | - | |
11725 | -void | |
11726 | -svc_getreqset(readfds) | |
11727 | - fd_set *readfds; | |
11728 | -{ | |
11729 | - svc_getreqset2(readfds, FD_SETSIZE); | |
11730 | -} | |
11731 | - | |
11732 | -void | |
11733 | -svc_getreqset2(readfds, width) | |
11734 | - fd_set *readfds; | |
11735 | - int width; | |
11736 | -{ | |
11737 | - enum xprt_stat stat; | |
11738 | - struct rpc_msg msg; | |
11739 | - int prog_found; | |
11740 | - u_long low_vers; | |
11741 | - u_long high_vers; | |
11742 | - struct svc_req r; | |
11743 | - register SVCXPRT *xprt; | |
11744 | - register int bit; | |
11745 | - register fd_mask mask, *maskp; | |
11746 | - register int sock; | |
11747 | - bool_t no_dispatch; | |
11748 | - char cred_area[2*MAX_AUTH_BYTES + RQCRED_SIZE]; | |
11749 | - msg.rm_call.cb_cred.oa_base = cred_area; | |
11750 | - msg.rm_call.cb_verf.oa_base = &(cred_area[MAX_AUTH_BYTES]); | |
11751 | - r.rq_clntcred = &(cred_area[2*MAX_AUTH_BYTES]); | |
11752 | - | |
11753 | - maskp = readfds->fds_bits; | |
11754 | - for (sock = 0; sock < width; sock += NFDBITS) { | |
11755 | - for (mask = *maskp++; (bit = ffs(mask)); mask ^= (1 << (bit - 1))) { | |
11756 | - /* sock has input waiting */ | |
11757 | - xprt = xports[sock + bit - 1]; | |
11758 | - if (xprt == NULL) | |
11759 | - /* But do we control sock? */ | |
11760 | - continue; | |
11761 | - /* now receive msgs from xprtprt (support batch calls) */ | |
11762 | - do { | |
11763 | - if (SVC_RECV(xprt, &msg)) { | |
11764 | - | |
11765 | - /* now find the exported program and call it */ | |
11766 | - register struct svc_callout *s; | |
11767 | - enum auth_stat why; | |
11768 | - | |
11769 | - r.rq_xprt = xprt; | |
11770 | - r.rq_prog = msg.rm_call.cb_prog; | |
11771 | - r.rq_vers = msg.rm_call.cb_vers; | |
11772 | - r.rq_proc = msg.rm_call.cb_proc; | |
11773 | - r.rq_cred = msg.rm_call.cb_cred; | |
11774 | - | |
11775 | - no_dispatch = FALSE; | |
11776 | - | |
11777 | - /* first authenticate the message */ | |
11778 | - if ((why = _authenticate(&r, &msg, &no_dispatch)) != AUTH_OK) { | |
11779 | - svcerr_auth(xprt, why); | |
11780 | - goto call_done; | |
11781 | - } | |
11782 | - else if (no_dispatch) { | |
11783 | - goto call_done; | |
11784 | - } | |
11785 | - /* now match message with a registered service*/ | |
11786 | - prog_found = FALSE; | |
11787 | - low_vers = (u_long) -1; | |
11788 | - high_vers = 0; | |
11789 | - for (s = svc_head; s != NULL_SVC; s = s->sc_next) { | |
11790 | - if (s->sc_prog == r.rq_prog) { | |
11791 | - if (s->sc_vers == r.rq_vers) { | |
11792 | - (*s->sc_dispatch)(&r, xprt); | |
11793 | - goto call_done; | |
11794 | - } /* found correct version */ | |
11795 | - prog_found = TRUE; | |
11796 | - if (s->sc_vers < low_vers) | |
11797 | - low_vers = s->sc_vers; | |
11798 | - if (s->sc_vers > high_vers) | |
11799 | - high_vers = s->sc_vers; | |
11800 | - } /* found correct program */ | |
11801 | - } | |
11802 | - /* | |
11803 | - * if we got here, the program or version | |
11804 | - * is not served ... | |
11805 | - */ | |
11806 | - if (prog_found) | |
11807 | - svcerr_progvers(xprt, | |
11808 | - low_vers, high_vers); | |
11809 | - else | |
11810 | - svcerr_noprog(xprt); | |
11811 | - /* Fall through to ... */ | |
11812 | - } | |
11813 | - call_done: | |
11814 | - if ((stat = SVC_STAT(xprt)) == XPRT_DIED) { | |
11815 | - SVC_DESTROY(xprt); | |
11816 | - break; | |
11817 | - } | |
11818 | - } while (stat == XPRT_MOREREQS); | |
11819 | - } | |
11820 | - } | |
11821 | -} | |
11822 | diff -puN -L support/rpc/svc_raw.c support/rpc/svc_raw.c~CITI_NFS4_ALL /dev/null | |
11823 | --- nfs-utils-1.0.7/support/rpc/svc_raw.c | |
11824 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
11825 | @@ -1,171 +0,0 @@ | |
11826 | -/* | |
11827 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
11828 | - * unrestricted use provided that this legend is included on all tape | |
11829 | - * media and as a part of the software program in whole or part. Users | |
11830 | - * may copy or modify Sun RPC without charge, but are not authorized | |
11831 | - * to license or distribute it to anyone else except as part of a product or | |
11832 | - * program developed by the user. | |
11833 | - * | |
11834 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
11835 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
11836 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
11837 | - * | |
11838 | - * Sun RPC is provided with no support and without any obligation on the | |
11839 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
11840 | - * modification or enhancement. | |
11841 | - * | |
11842 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
11843 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
11844 | - * OR ANY PART THEREOF. | |
11845 | - * | |
11846 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
11847 | - * or profits or other special, indirect and consequential damages, even if | |
11848 | - * Sun has been advised of the possibility of such damages. | |
11849 | - * | |
11850 | - * Sun Microsystems, Inc. | |
11851 | - * 2550 Garcia Avenue | |
11852 | - * Mountain View, California 94043 | |
11853 | - */ | |
11854 | - | |
11855 | -#if defined(LIBC_SCCS) && !defined(lint) | |
11856 | -static char *rcsid = "$OpenBSD: svc_raw.c,v 1.4 1996/09/15 09:31:39 tholo Exp $"; | |
11857 | -#endif /* LIBC_SCCS and not lint */ | |
11858 | - | |
11859 | -/* | |
11860 | - * svc_raw.c, This a toy for simple testing and timing. | |
11861 | - * Interface to create an rpc client and server in the same UNIX process. | |
11862 | - * This lets us similate rpc and get rpc (round trip) overhead, without | |
11863 | - * any interference from the kernal. | |
11864 | - * | |
11865 | - * Copyright (C) 1984, Sun Microsystems, Inc. | |
11866 | - */ | |
11867 | - | |
11868 | -#include <stdlib.h> | |
11869 | -#include <rpc/rpc.h> | |
11870 | - | |
11871 | - | |
11872 | -/* | |
11873 | - * This is the "network" that we will be moving data over | |
11874 | - */ | |
11875 | -static struct svcraw_private { | |
11876 | - char _raw_buf[UDPMSGSIZE]; | |
11877 | - SVCXPRT server; | |
11878 | - XDR xdr_stream; | |
11879 | - char verf_body[MAX_AUTH_BYTES]; | |
11880 | -} *svcraw_private; | |
11881 | - | |
11882 | -static bool_t svcraw_recv(); | |
11883 | -static enum xprt_stat svcraw_stat(); | |
11884 | -static bool_t svcraw_getargs(); | |
11885 | -static bool_t svcraw_reply(); | |
11886 | -static bool_t svcraw_freeargs(); | |
11887 | -static void svcraw_destroy(); | |
11888 | - | |
11889 | -static struct xp_ops server_ops = { | |
11890 | - svcraw_recv, | |
11891 | - svcraw_stat, | |
11892 | - svcraw_getargs, | |
11893 | - svcraw_reply, | |
11894 | - svcraw_freeargs, | |
11895 | - svcraw_destroy | |
11896 | -}; | |
11897 | - | |
11898 | -SVCXPRT * | |
11899 | -svcraw_create() | |
11900 | -{ | |
11901 | - register struct svcraw_private *srp = svcraw_private; | |
11902 | - | |
11903 | - if (srp == 0) { | |
11904 | - srp = (struct svcraw_private *)calloc(1, sizeof (*srp)); | |
11905 | - if (srp == 0) | |
11906 | - return (0); | |
11907 | - } | |
11908 | - srp->server.xp_sock = 0; | |
11909 | - srp->server.xp_port = 0; | |
11910 | - srp->server.xp_ops = &server_ops; | |
11911 | - srp->server.xp_verf.oa_base = srp->verf_body; | |
11912 | - xdrmem_create(&srp->xdr_stream, srp->_raw_buf, UDPMSGSIZE, XDR_FREE); | |
11913 | - return (&srp->server); | |
11914 | -} | |
11915 | - | |
11916 | -static enum xprt_stat | |
11917 | -svcraw_stat() | |
11918 | -{ | |
11919 | - | |
11920 | - return (XPRT_IDLE); | |
11921 | -} | |
11922 | - | |
11923 | -/* ARGSUSED */ | |
11924 | -static bool_t | |
11925 | -svcraw_recv(xprt, msg) | |
11926 | - SVCXPRT *xprt; | |
11927 | - struct rpc_msg *msg; | |
11928 | -{ | |
11929 | - register struct svcraw_private *srp = svcraw_private; | |
11930 | - register XDR *xdrs; | |
11931 | - | |
11932 | - if (srp == 0) | |
11933 | - return (0); | |
11934 | - xdrs = &srp->xdr_stream; | |
11935 | - xdrs->x_op = XDR_DECODE; | |
11936 | - XDR_SETPOS(xdrs, 0); | |
11937 | - if (! xdr_callmsg(xdrs, msg)) | |
11938 | - return (FALSE); | |
11939 | - return (TRUE); | |
11940 | -} | |
11941 | - | |
11942 | -/* ARGSUSED */ | |
11943 | -static bool_t | |
11944 | -svcraw_reply(xprt, msg) | |
11945 | - SVCXPRT *xprt; | |
11946 | - struct rpc_msg *msg; | |
11947 | -{ | |
11948 | - register struct svcraw_private *srp = svcraw_private; | |
11949 | - register XDR *xdrs; | |
11950 | - | |
11951 | - if (srp == 0) | |
11952 | - return (FALSE); | |
11953 | - xdrs = &srp->xdr_stream; | |
11954 | - xdrs->x_op = XDR_ENCODE; | |
11955 | - XDR_SETPOS(xdrs, 0); | |
11956 | - if (! xdr_replymsg(xdrs, msg)) | |
11957 | - return (FALSE); | |
11958 | - (void)XDR_GETPOS(xdrs); /* called just for overhead */ | |
11959 | - return (TRUE); | |
11960 | -} | |
11961 | - | |
11962 | -/* ARGSUSED */ | |
11963 | -static bool_t | |
11964 | -svcraw_getargs(xprt, xdr_args, args_ptr) | |
11965 | - SVCXPRT *xprt; | |
11966 | - xdrproc_t xdr_args; | |
11967 | - caddr_t args_ptr; | |
11968 | -{ | |
11969 | - register struct svcraw_private *srp = svcraw_private; | |
11970 | - | |
11971 | - if (srp == 0) | |
11972 | - return (FALSE); | |
11973 | - return ((*xdr_args)(&srp->xdr_stream, args_ptr)); | |
11974 | -} | |
11975 | - | |
11976 | -/* ARGSUSED */ | |
11977 | -static bool_t | |
11978 | -svcraw_freeargs(xprt, xdr_args, args_ptr) | |
11979 | - SVCXPRT *xprt; | |
11980 | - xdrproc_t xdr_args; | |
11981 | - caddr_t args_ptr; | |
11982 | -{ | |
11983 | - register struct svcraw_private *srp = svcraw_private; | |
11984 | - register XDR *xdrs; | |
11985 | - | |
11986 | - if (srp == 0) | |
11987 | - return (FALSE); | |
11988 | - xdrs = &srp->xdr_stream; | |
11989 | - xdrs->x_op = XDR_FREE; | |
11990 | - return ((*xdr_args)(xdrs, args_ptr)); | |
11991 | -} | |
11992 | - | |
11993 | -static void | |
11994 | -svcraw_destroy() | |
11995 | -{ | |
11996 | -} | |
11997 | diff -puN -L support/rpc/svc_run.c support/rpc/svc_run.c~CITI_NFS4_ALL /dev/null | |
11998 | --- nfs-utils-1.0.7/support/rpc/svc_run.c | |
11999 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
12000 | @@ -1,84 +0,0 @@ | |
12001 | -/* | |
12002 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
12003 | - * unrestricted use provided that this legend is included on all tape | |
12004 | - * media and as a part of the software program in whole or part. Users | |
12005 | - * may copy or modify Sun RPC without charge, but are not authorized | |
12006 | - * to license or distribute it to anyone else except as part of a product or | |
12007 | - * program developed by the user. | |
12008 | - * | |
12009 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
12010 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
12011 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
12012 | - * | |
12013 | - * Sun RPC is provided with no support and without any obligation on the | |
12014 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
12015 | - * modification or enhancement. | |
12016 | - * | |
12017 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
12018 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
12019 | - * OR ANY PART THEREOF. | |
12020 | - * | |
12021 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
12022 | - * or profits or other special, indirect and consequential damages, even if | |
12023 | - * Sun has been advised of the possibility of such damages. | |
12024 | - * | |
12025 | - * Sun Microsystems, Inc. | |
12026 | - * 2550 Garcia Avenue | |
12027 | - * Mountain View, California 94043 | |
12028 | - */ | |
12029 | - | |
12030 | -#if defined(LIBC_SCCS) && !defined(lint) | |
12031 | -static char *rcsid = "$OpenBSD: svc_run.c,v 1.10 1998/03/19 00:27:24 millert Exp $"; | |
12032 | -#endif /* LIBC_SCCS and not lint */ | |
12033 | - | |
12034 | -/* | |
12035 | - * This is the rpc server side idle loop | |
12036 | - * Wait for input, call server program. | |
12037 | - */ | |
12038 | -#include <rpc/rpc.h> | |
12039 | -#include <sys/param.h> | |
12040 | -#include <sys/errno.h> | |
12041 | -#include <unistd.h> | |
12042 | -#include <stdio.h> | |
12043 | -#include <stdlib.h> | |
12044 | -#include <string.h> | |
12045 | - | |
12046 | -extern int __svc_fdsetsize; | |
12047 | -extern fd_set *__svc_fdset; | |
12048 | - | |
12049 | -void svc_getreqset2 __P((fd_set *, int)); | |
12050 | - | |
12051 | -void | |
12052 | -svc_run() | |
12053 | -{ | |
12054 | - fd_set *fds; | |
12055 | - | |
12056 | - for (;;) { | |
12057 | - if (__svc_fdset) { | |
12058 | - int bytes = howmany(__svc_fdsetsize, NFDBITS) * | |
12059 | - sizeof(fd_mask); | |
12060 | - fds = (fd_set *)malloc(bytes); | |
12061 | - memcpy(fds, __svc_fdset, bytes); | |
12062 | - } else | |
12063 | - fds = NULL; | |
12064 | - switch (select(svc_maxfd+1, fds, 0, 0, (struct timeval *)0)) { | |
12065 | - case -1: | |
12066 | - if (errno == EINTR) { | |
12067 | - if (fds) | |
12068 | - free(fds); | |
12069 | - continue; | |
12070 | - } | |
12071 | - perror("svc_run: - select failed"); | |
12072 | - if (fds) | |
12073 | - free(fds); | |
12074 | - return; | |
12075 | - case 0: | |
12076 | - if (fds) | |
12077 | - free(fds); | |
12078 | - continue; | |
12079 | - default: | |
12080 | - svc_getreqset2(fds, svc_maxfd+1); | |
12081 | - free(fds); | |
12082 | - } | |
12083 | - } | |
12084 | -} | |
12085 | diff -puN -L support/rpc/svc_simple.c support/rpc/svc_simple.c~CITI_NFS4_ALL /dev/null | |
12086 | --- nfs-utils-1.0.7/support/rpc/svc_simple.c | |
12087 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
12088 | @@ -1,149 +0,0 @@ | |
12089 | -/* | |
12090 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
12091 | - * unrestricted use provided that this legend is included on all tape | |
12092 | - * media and as a part of the software program in whole or part. Users | |
12093 | - * may copy or modify Sun RPC without charge, but are not authorized | |
12094 | - * to license or distribute it to anyone else except as part of a product or | |
12095 | - * program developed by the user. | |
12096 | - * | |
12097 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
12098 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
12099 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
12100 | - * | |
12101 | - * Sun RPC is provided with no support and without any obligation on the | |
12102 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
12103 | - * modification or enhancement. | |
12104 | - * | |
12105 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
12106 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
12107 | - * OR ANY PART THEREOF. | |
12108 | - * | |
12109 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
12110 | - * or profits or other special, indirect and consequential damages, even if | |
12111 | - * Sun has been advised of the possibility of such damages. | |
12112 | - * | |
12113 | - * Sun Microsystems, Inc. | |
12114 | - * 2550 Garcia Avenue | |
12115 | - * Mountain View, California 94043 | |
12116 | - */ | |
12117 | - | |
12118 | -#if defined(LIBC_SCCS) && !defined(lint) | |
12119 | -static char *rcsid = "$OpenBSD: svc_simple.c,v 1.6 1998/11/22 07:38:25 deraadt Exp $"; | |
12120 | -#endif /* LIBC_SCCS and not lint */ | |
12121 | - | |
12122 | -/* | |
12123 | - * svc_simple.c | |
12124 | - * Simplified front end to rpc. | |
12125 | - * | |
12126 | - * Copyright (C) 1984, Sun Microsystems, Inc. | |
12127 | - */ | |
12128 | - | |
12129 | -#include <stdio.h> | |
12130 | -#include <stdlib.h> | |
12131 | -#include <string.h> | |
12132 | -#include <rpc/rpc.h> | |
12133 | -#include <rpc/pmap_clnt.h> | |
12134 | -#include <sys/socket.h> | |
12135 | -#include <netdb.h> | |
12136 | - | |
12137 | -static struct proglst { | |
12138 | - char *(*p_progname)(); | |
12139 | - int p_prognum; | |
12140 | - int p_procnum; | |
12141 | - xdrproc_t p_inproc, p_outproc; | |
12142 | - struct proglst *p_nxt; | |
12143 | -} *proglst; | |
12144 | -static void universal(); | |
12145 | -static SVCXPRT *transp; | |
12146 | -struct proglst *pl; | |
12147 | - | |
12148 | -int | |
12149 | -registerrpc(prognum, versnum, procnum, progname, inproc, outproc) | |
12150 | - int prognum, versnum, procnum; | |
12151 | - char *(*progname)(); | |
12152 | - xdrproc_t inproc, outproc; | |
12153 | -{ | |
12154 | - | |
12155 | - if (procnum == NULLPROC) { | |
12156 | - (void) fprintf(stderr, | |
12157 | - "can't reassign procedure number %u\n", NULLPROC); | |
12158 | - return (-1); | |
12159 | - } | |
12160 | - if (transp == 0) { | |
12161 | - transp = svcudp_create(RPC_ANYSOCK); | |
12162 | - if (transp == NULL) { | |
12163 | - (void) fprintf(stderr, "couldn't create an rpc server\n"); | |
12164 | - return (-1); | |
12165 | - } | |
12166 | - } | |
12167 | - (void) pmap_unset((u_long)prognum, (u_long)versnum); | |
12168 | - if (!svc_register(transp, (u_long)prognum, (u_long)versnum, | |
12169 | - universal, IPPROTO_UDP)) { | |
12170 | - (void) fprintf(stderr, "couldn't register prog %d vers %d\n", | |
12171 | - prognum, versnum); | |
12172 | - return (-1); | |
12173 | - } | |
12174 | - pl = (struct proglst *)malloc(sizeof(struct proglst)); | |
12175 | - if (pl == NULL) { | |
12176 | - (void) fprintf(stderr, "registerrpc: out of memory\n"); | |
12177 | - return (-1); | |
12178 | - } | |
12179 | - pl->p_progname = progname; | |
12180 | - pl->p_prognum = prognum; | |
12181 | - pl->p_procnum = procnum; | |
12182 | - pl->p_inproc = inproc; | |
12183 | - pl->p_outproc = outproc; | |
12184 | - pl->p_nxt = proglst; | |
12185 | - proglst = pl; | |
12186 | - return (0); | |
12187 | -} | |
12188 | - | |
12189 | -static void | |
12190 | -universal(rqstp, transp) | |
12191 | - struct svc_req *rqstp; | |
12192 | - SVCXPRT *transp; | |
12193 | -{ | |
12194 | - int prog, proc; | |
12195 | - char *outdata; | |
12196 | - char xdrbuf[UDPMSGSIZE]; | |
12197 | - struct proglst *pl; | |
12198 | - | |
12199 | - /* | |
12200 | - * enforce "procnum 0 is echo" convention | |
12201 | - */ | |
12202 | - if (rqstp->rq_proc == NULLPROC) { | |
12203 | - if (svc_sendreply(transp, xdr_void, NULL) == FALSE) { | |
12204 | - (void) fprintf(stderr, "xxx\n"); | |
12205 | - exit(1); | |
12206 | - } | |
12207 | - return; | |
12208 | - } | |
12209 | - prog = rqstp->rq_prog; | |
12210 | - proc = rqstp->rq_proc; | |
12211 | - for (pl = proglst; pl != NULL; pl = pl->p_nxt) | |
12212 | - if (pl->p_prognum == prog && pl->p_procnum == proc) { | |
12213 | - /* decode arguments into a CLEAN buffer */ | |
12214 | - memset(xdrbuf, 0, sizeof(xdrbuf)); /* required ! */ | |
12215 | - if (!svc_getargs(transp, pl->p_inproc, xdrbuf)) { | |
12216 | - svcerr_decode(transp); | |
12217 | - return; | |
12218 | - } | |
12219 | - outdata = (*(pl->p_progname))(xdrbuf); | |
12220 | - if (outdata == NULL && | |
12221 | - pl->p_outproc != xdr_void) | |
12222 | - /* there was an error */ | |
12223 | - return; | |
12224 | - if (!svc_sendreply(transp, pl->p_outproc, outdata)) { | |
12225 | - (void) fprintf(stderr, | |
12226 | - "trouble replying to prog %d\n", | |
12227 | - pl->p_prognum); | |
12228 | - exit(1); | |
12229 | - } | |
12230 | - /* free the decoded arguments */ | |
12231 | - (void)svc_freeargs(transp, pl->p_inproc, xdrbuf); | |
12232 | - return; | |
12233 | - } | |
12234 | - (void) fprintf(stderr, "never registered prog %d\n", prog); | |
12235 | - exit(1); | |
12236 | -} | |
12237 | - | |
12238 | diff -puN -L support/rpc/svc_tcp.c support/rpc/svc_tcp.c~CITI_NFS4_ALL /dev/null | |
12239 | --- nfs-utils-1.0.7/support/rpc/svc_tcp.c | |
12240 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
12241 | @@ -1,528 +0,0 @@ | |
12242 | -/* | |
12243 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
12244 | - * unrestricted use provided that this legend is included on all tape | |
12245 | - * media and as a part of the software program in whole or part. Users | |
12246 | - * may copy or modify Sun RPC without charge, but are not authorized | |
12247 | - * to license or distribute it to anyone else except as part of a product or | |
12248 | - * program developed by the user. | |
12249 | - * | |
12250 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
12251 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
12252 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
12253 | - * | |
12254 | - * Sun RPC is provided with no support and without any obligation on the | |
12255 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
12256 | - * modification or enhancement. | |
12257 | - * | |
12258 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
12259 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
12260 | - * OR ANY PART THEREOF. | |
12261 | - * | |
12262 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
12263 | - * or profits or other special, indirect and consequential damages, even if | |
12264 | - * Sun has been advised of the possibility of such damages. | |
12265 | - * | |
12266 | - * Sun Microsystems, Inc. | |
12267 | - * 2550 Garcia Avenue | |
12268 | - * Mountain View, California 94043 | |
12269 | - */ | |
12270 | - | |
12271 | -#if defined(LIBC_SCCS) && !defined(lint) | |
12272 | -static char *rcsid = "$OpenBSD: svc_tcp.c,v 1.18 1998/05/22 04:23:01 deraadt Exp $"; | |
12273 | -#endif /* LIBC_SCCS and not lint */ | |
12274 | - | |
12275 | -/* | |
12276 | - * svc_tcp.c, Server side for TCP/IP based RPC. | |
12277 | - * | |
12278 | - * Copyright (C) 1984, Sun Microsystems, Inc. | |
12279 | - * | |
12280 | - * Actually implements two flavors of transporter - | |
12281 | - * a tcp rendezvouser (a listner and connection establisher) | |
12282 | - * and a record/tcp stream. | |
12283 | - */ | |
12284 | - | |
12285 | -#include <stdio.h> | |
12286 | -#include <stdlib.h> | |
12287 | -#include <string.h> | |
12288 | -#include <unistd.h> | |
12289 | -#include <rpc/rpc.h> | |
12290 | -#include <sys/param.h> | |
12291 | -#include <sys/socket.h> | |
12292 | -#include <errno.h> | |
12293 | - | |
12294 | -#include <netinet/in_systm.h> | |
12295 | -#include <netinet/in.h> | |
12296 | -#include <netinet/ip.h> | |
12297 | -#ifndef __linux__ | |
12298 | -#include <netinet/ip_var.h> | |
12299 | -#endif | |
12300 | - | |
12301 | -/* | |
12302 | - * Ops vector for TCP/IP based rpc service handle | |
12303 | - */ | |
12304 | -static bool_t svctcp_recv(); | |
12305 | -static enum xprt_stat svctcp_stat(); | |
12306 | -static bool_t svctcp_getargs(); | |
12307 | -static bool_t svctcp_reply(); | |
12308 | -static bool_t svctcp_freeargs(); | |
12309 | -static void svctcp_destroy(); | |
12310 | - | |
12311 | -static struct xp_ops svctcp_op = { | |
12312 | - svctcp_recv, | |
12313 | - svctcp_stat, | |
12314 | - svctcp_getargs, | |
12315 | - svctcp_reply, | |
12316 | - svctcp_freeargs, | |
12317 | - svctcp_destroy | |
12318 | -}; | |
12319 | - | |
12320 | -/* | |
12321 | - * Ops vector for TCP/IP rendezvous handler | |
12322 | - */ | |
12323 | -static bool_t rendezvous_request(); | |
12324 | -static enum xprt_stat rendezvous_stat(); | |
12325 | - | |
12326 | -static struct xp_ops svctcp_rendezvous_op = { | |
12327 | - rendezvous_request, | |
12328 | - rendezvous_stat, | |
12329 | - (bool_t (*)())abort, | |
12330 | - (bool_t (*)())abort, | |
12331 | - (bool_t (*)())abort, | |
12332 | - svctcp_destroy | |
12333 | -}; | |
12334 | - | |
12335 | -static int readtcp(), writetcp(); | |
12336 | -static SVCXPRT *makefd_xprt(); | |
12337 | - | |
12338 | -struct tcp_rendezvous { /* kept in xprt->xp_p1 */ | |
12339 | - u_int sendsize; | |
12340 | - u_int recvsize; | |
12341 | -}; | |
12342 | - | |
12343 | -struct tcp_conn { /* kept in xprt->xp_p1 */ | |
12344 | - enum xprt_stat strm_stat; | |
12345 | - u_long x_id; | |
12346 | - XDR xdrs; | |
12347 | - char verf_body[MAX_AUTH_BYTES]; | |
12348 | -}; | |
12349 | - | |
12350 | -/* | |
12351 | - * Usage: | |
12352 | - * xprt = svctcp_create(sock, send_buf_size, recv_buf_size); | |
12353 | - * | |
12354 | - * Creates, registers, and returns a (rpc) tcp based transporter. | |
12355 | - * Once *xprt is initialized, it is registered as a transporter | |
12356 | - * see (svc.h, xprt_register). This routine returns | |
12357 | - * a NULL if a problem occurred. | |
12358 | - * | |
12359 | - * If sock<0 then a socket is created, else sock is used. | |
12360 | - * If the socket, sock is not bound to a port then svctcp_create | |
12361 | - * binds it to an arbitrary port. The routine then starts a tcp | |
12362 | - * listener on the socket's associated port. In any (successful) case, | |
12363 | - * xprt->xp_sock is the registered socket number and xprt->xp_port is the | |
12364 | - * associated port number. | |
12365 | - * | |
12366 | - * Since tcp streams do buffered io similar to stdio, the caller can specify | |
12367 | - * how big the send and receive buffers are via the second and third parms; | |
12368 | - * 0 => use the system default. | |
12369 | - */ | |
12370 | -SVCXPRT * | |
12371 | -svctcp_create(sock, sendsize, recvsize) | |
12372 | - register int sock; | |
12373 | - u_int sendsize; | |
12374 | - u_int recvsize; | |
12375 | -{ | |
12376 | - bool_t madesock = FALSE; | |
12377 | - register SVCXPRT *xprt; | |
12378 | - register struct tcp_rendezvous *r; | |
12379 | - struct sockaddr_in addr; | |
12380 | - int len = sizeof(struct sockaddr_in); | |
12381 | - | |
12382 | - if (sock == RPC_ANYSOCK) { | |
12383 | - if ((sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { | |
12384 | - perror("svctcp_.c - udp socket creation problem"); | |
12385 | - return ((SVCXPRT *)NULL); | |
12386 | - } | |
12387 | - madesock = TRUE; | |
12388 | - } | |
12389 | - memset(&addr, 0, sizeof (addr)); | |
12390 | -#ifndef __linux__ | |
12391 | - addr.sin_len = sizeof(struct sockaddr_in); | |
12392 | -#endif | |
12393 | - addr.sin_family = AF_INET; | |
12394 | - if (bindresvport(sock, &addr)) { | |
12395 | - addr.sin_port = 0; | |
12396 | - (void)bind(sock, (struct sockaddr *)&addr, len); | |
12397 | - } | |
12398 | - if ((getsockname(sock, (struct sockaddr *)&addr, &len) != 0) || | |
12399 | - (listen(sock, 2) != 0)) { | |
12400 | - perror("svctcp_.c - cannot getsockname or listen"); | |
12401 | - if (madesock) | |
12402 | - (void)close(sock); | |
12403 | - return ((SVCXPRT *)NULL); | |
12404 | - } | |
12405 | - r = (struct tcp_rendezvous *)mem_alloc(sizeof(*r)); | |
12406 | - if (r == NULL) { | |
12407 | - (void)fprintf(stderr, "svctcp_create: out of memory\n"); | |
12408 | - if (madesock) | |
12409 | - (void)close(sock); | |
12410 | - return (NULL); | |
12411 | - } | |
12412 | - r->sendsize = sendsize; | |
12413 | - r->recvsize = recvsize; | |
12414 | - xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); | |
12415 | - if (xprt == NULL) { | |
12416 | - (void)fprintf(stderr, "svctcp_create: out of memory\n"); | |
12417 | - if (madesock) | |
12418 | - (void)close(sock); | |
12419 | - free(r); | |
12420 | - return (NULL); | |
12421 | - } | |
12422 | - xprt->xp_p2 = NULL; | |
12423 | - xprt->xp_p1 = (caddr_t)r; | |
12424 | - xprt->xp_auth = NULL; | |
12425 | - xprt->xp_verf = _null_auth; | |
12426 | - xprt->xp_ops = &svctcp_rendezvous_op; | |
12427 | - xprt->xp_port = ntohs(addr.sin_port); | |
12428 | - xprt->xp_sock = sock; | |
12429 | - xprt_register(xprt); | |
12430 | - return (xprt); | |
12431 | -} | |
12432 | - | |
12433 | -/* | |
12434 | - * Like svtcp_create(), except the routine takes any *open* UNIX file | |
12435 | - * descriptor as its first input. | |
12436 | - */ | |
12437 | -SVCXPRT * | |
12438 | -svcfd_create(fd, sendsize, recvsize) | |
12439 | - int fd; | |
12440 | - u_int sendsize; | |
12441 | - u_int recvsize; | |
12442 | -{ | |
12443 | - | |
12444 | - return (makefd_xprt(fd, sendsize, recvsize)); | |
12445 | -} | |
12446 | - | |
12447 | -static SVCXPRT * | |
12448 | -makefd_xprt(fd, sendsize, recvsize) | |
12449 | - int fd; | |
12450 | - u_int sendsize; | |
12451 | - u_int recvsize; | |
12452 | -{ | |
12453 | - register SVCXPRT *xprt; | |
12454 | - register struct tcp_conn *cd; | |
12455 | - | |
12456 | - xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); | |
12457 | - if (xprt == (SVCXPRT *)NULL) { | |
12458 | - (void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n"); | |
12459 | - goto done; | |
12460 | - } | |
12461 | - cd = (struct tcp_conn *)mem_alloc(sizeof(struct tcp_conn)); | |
12462 | - if (cd == (struct tcp_conn *)NULL) { | |
12463 | - (void) fprintf(stderr, "svc_tcp: makefd_xprt: out of memory\n"); | |
12464 | - mem_free((char *) xprt, sizeof(SVCXPRT)); | |
12465 | - xprt = (SVCXPRT *)NULL; | |
12466 | - goto done; | |
12467 | - } | |
12468 | - cd->strm_stat = XPRT_IDLE; | |
12469 | - xdrrec_create(&(cd->xdrs), sendsize, recvsize, | |
12470 | - (caddr_t)xprt, readtcp, writetcp); | |
12471 | - xprt->xp_p2 = NULL; | |
12472 | - xprt->xp_p1 = (caddr_t)cd; | |
12473 | - xprt->xp_auth = NULL; | |
12474 | - xprt->xp_verf.oa_base = cd->verf_body; | |
12475 | - xprt->xp_addrlen = 0; | |
12476 | - xprt->xp_ops = &svctcp_op; /* truely deals with calls */ | |
12477 | - xprt->xp_port = 0; /* this is a connection, not a rendezvouser */ | |
12478 | - xprt->xp_sock = fd; | |
12479 | - xprt_register(xprt); | |
12480 | - done: | |
12481 | - return (xprt); | |
12482 | -} | |
12483 | - | |
12484 | -static bool_t | |
12485 | -rendezvous_request(xprt) | |
12486 | - register SVCXPRT *xprt; | |
12487 | -{ | |
12488 | - int sock; | |
12489 | - struct tcp_rendezvous *r; | |
12490 | - struct sockaddr_in addr; | |
12491 | - int len; | |
12492 | - | |
12493 | - r = (struct tcp_rendezvous *)xprt->xp_p1; | |
12494 | - again: | |
12495 | - len = sizeof(struct sockaddr_in); | |
12496 | - if ((sock = accept(xprt->xp_sock, (struct sockaddr *)&addr, | |
12497 | - &len)) < 0) { | |
12498 | - if (errno == EINTR) | |
12499 | - goto again; | |
12500 | - return (FALSE); | |
12501 | - } | |
12502 | - | |
12503 | -#ifdef IP_OPTIONS | |
12504 | - { | |
12505 | -#ifdef __linux__ | |
12506 | -#define ipopt_list ip_opts | |
12507 | - struct ip_opts opts; | |
12508 | -#else | |
12509 | - struct ipoption opts; | |
12510 | -#endif | |
12511 | - int optsize = sizeof(opts), i; | |
12512 | - | |
12513 | - if (!getsockopt(sock, IPPROTO_IP, IP_OPTIONS, (char *)&opts, | |
12514 | - &optsize) && optsize != 0) { | |
12515 | - for (i = 0; (char *)&opts.ipopt_list[i] - (char *)&opts < | |
12516 | - optsize; ) { | |
12517 | - u_char c = (u_char)opts.ipopt_list[i]; | |
12518 | - if (c == IPOPT_LSRR || c == IPOPT_SSRR) { | |
12519 | - close(sock); | |
12520 | - return (FALSE); | |
12521 | - } | |
12522 | - if (c == IPOPT_EOL) | |
12523 | - break; | |
12524 | - i += (c == IPOPT_NOP) ? 1 : | |
12525 | - (u_char)opts.ipopt_list[i+1]; | |
12526 | - } | |
12527 | - } | |
12528 | - } | |
12529 | -#endif | |
12530 | - | |
12531 | - /* | |
12532 | - * XXX careful for ftp bounce attacks. If discovered, close the | |
12533 | - * socket and look for another connection. | |
12534 | - */ | |
12535 | - if (addr.sin_port == htons(20)) { | |
12536 | - close(sock); | |
12537 | - return (FALSE); | |
12538 | - } | |
12539 | - | |
12540 | - /* | |
12541 | - * make a new transporter (re-uses xprt) | |
12542 | - */ | |
12543 | - xprt = makefd_xprt(sock, r->sendsize, r->recvsize); | |
12544 | - xprt->xp_raddr = addr; | |
12545 | - xprt->xp_addrlen = len; | |
12546 | - return (FALSE); /* there is never an rpc msg to be processed */ | |
12547 | -} | |
12548 | - | |
12549 | -static enum xprt_stat | |
12550 | -rendezvous_stat() | |
12551 | -{ | |
12552 | - | |
12553 | - return (XPRT_IDLE); | |
12554 | -} | |
12555 | - | |
12556 | -static void | |
12557 | -svctcp_destroy(xprt) | |
12558 | - register SVCXPRT *xprt; | |
12559 | -{ | |
12560 | - register struct tcp_conn *cd = (struct tcp_conn *)xprt->xp_p1; | |
12561 | - | |
12562 | - xprt_unregister(xprt); | |
12563 | - if (xprt->xp_sock != -1) | |
12564 | - (void)close(xprt->xp_sock); | |
12565 | - xprt->xp_sock = -1; | |
12566 | - if (xprt->xp_port != 0) { | |
12567 | - /* a rendezvouser socket */ | |
12568 | - xprt->xp_port = 0; | |
12569 | - } else { | |
12570 | - /* an actual connection socket */ | |
12571 | - XDR_DESTROY(&(cd->xdrs)); | |
12572 | - } | |
12573 | - if (xprt->xp_auth != NULL) { | |
12574 | - SVCAUTH_DESTROY(xprt->xp_auth); | |
12575 | - xprt->xp_auth = NULL; | |
12576 | - } | |
12577 | - mem_free((caddr_t)cd, sizeof(struct tcp_conn)); | |
12578 | - mem_free((caddr_t)xprt, sizeof(SVCXPRT)); | |
12579 | -} | |
12580 | - | |
12581 | -/* | |
12582 | - * All read operations timeout after 35 seconds. | |
12583 | - * A timeout is fatal for the connection. | |
12584 | - */ | |
12585 | -static struct timeval wait_per_try = { 35, 0 }; | |
12586 | - | |
12587 | -/* | |
12588 | - * reads data from the tcp conection. | |
12589 | - * any error is fatal and the connection is closed. | |
12590 | - * (And a read of zero bytes is a half closed stream => error.) | |
12591 | - */ | |
12592 | -static int | |
12593 | -readtcp(xprt, buf, len) | |
12594 | - register SVCXPRT *xprt; | |
12595 | - caddr_t buf; | |
12596 | - register int len; | |
12597 | -{ | |
12598 | - register int sock = xprt->xp_sock; | |
12599 | - struct timeval start, delta; | |
12600 | - struct timeval tmp1, tmp2; | |
12601 | - fd_set *fds = NULL; | |
12602 | - int prevbytes = 0, bytes; | |
12603 | - extern int __svc_fdsetsize; | |
12604 | - extern fd_set *__svc_fdset; | |
12605 | - | |
12606 | - delta = wait_per_try; | |
12607 | - gettimeofday(&start, NULL); | |
12608 | - do { | |
12609 | - bytes = howmany(__svc_fdsetsize, NFDBITS) * sizeof(fd_mask); | |
12610 | - if (bytes != prevbytes) { | |
12611 | - if (fds) | |
12612 | - free(fds); | |
12613 | - fds = (fd_set *)malloc(bytes); | |
12614 | - prevbytes = bytes; | |
12615 | - } | |
12616 | - if (fds == NULL) | |
12617 | - goto fatal_err; | |
12618 | - memcpy(fds, __svc_fdset, bytes); | |
12619 | - | |
12620 | - FD_SET(sock, fds); | |
12621 | - switch (select(svc_maxfd+1, fds, NULL, NULL, &delta)) { | |
12622 | - case -1: | |
12623 | - if (errno != EINTR) | |
12624 | - goto fatal_err; | |
12625 | - gettimeofday(&tmp1, NULL); | |
12626 | - timersub(&tmp1, &start, &tmp2); | |
12627 | - timersub(&wait_per_try, &tmp2, &tmp1); | |
12628 | - if (tmp1.tv_sec < 0 || !timerisset(&tmp1)) | |
12629 | - goto fatal_err; | |
12630 | - delta = tmp1; | |
12631 | - continue; | |
12632 | - case 0: | |
12633 | - goto fatal_err; | |
12634 | - default: | |
12635 | - if (!FD_ISSET(sock, fds)) { | |
12636 | - svc_getreqset2(fds, svc_maxfd+1); | |
12637 | - gettimeofday(&tmp1, NULL); | |
12638 | - timersub(&tmp1, &start, &tmp2); | |
12639 | - timersub(&wait_per_try, &tmp2, &tmp1); | |
12640 | - if (tmp1.tv_sec < 0 || !timerisset(&tmp1)) | |
12641 | - goto fatal_err; | |
12642 | - delta = tmp1; | |
12643 | - continue; | |
12644 | - } | |
12645 | - } | |
12646 | - } while (!FD_ISSET(sock, fds)); | |
12647 | - if ((len = read(sock, buf, len)) > 0) { | |
12648 | - if (fds) | |
12649 | - free(fds); | |
12650 | - return (len); | |
12651 | - } | |
12652 | -fatal_err: | |
12653 | - ((struct tcp_conn *)(xprt->xp_p1))->strm_stat = XPRT_DIED; | |
12654 | - if (fds) | |
12655 | - free(fds); | |
12656 | - return (-1); | |
12657 | -} | |
12658 | - | |
12659 | -/* | |
12660 | - * writes data to the tcp connection. | |
12661 | - * Any error is fatal and the connection is closed. | |
12662 | - */ | |
12663 | -static int | |
12664 | -writetcp(xprt, buf, len) | |
12665 | - register SVCXPRT *xprt; | |
12666 | - caddr_t buf; | |
12667 | - int len; | |
12668 | -{ | |
12669 | - register int i, cnt; | |
12670 | - | |
12671 | - for (cnt = len; cnt > 0; cnt -= i, buf += i) { | |
12672 | - if ((i = write(xprt->xp_sock, buf, cnt)) < 0) { | |
12673 | - ((struct tcp_conn *)(xprt->xp_p1))->strm_stat = | |
12674 | - XPRT_DIED; | |
12675 | - return (-1); | |
12676 | - } | |
12677 | - } | |
12678 | - return (len); | |
12679 | -} | |
12680 | - | |
12681 | -static enum xprt_stat | |
12682 | -svctcp_stat(xprt) | |
12683 | - SVCXPRT *xprt; | |
12684 | -{ | |
12685 | - register struct tcp_conn *cd = | |
12686 | - (struct tcp_conn *)(xprt->xp_p1); | |
12687 | - | |
12688 | - if (cd->strm_stat == XPRT_DIED) | |
12689 | - return (XPRT_DIED); | |
12690 | - if (! xdrrec_eof(&(cd->xdrs))) | |
12691 | - return (XPRT_MOREREQS); | |
12692 | - return (XPRT_IDLE); | |
12693 | -} | |
12694 | - | |
12695 | -static bool_t | |
12696 | -svctcp_recv(xprt, msg) | |
12697 | - SVCXPRT *xprt; | |
12698 | - register struct rpc_msg *msg; | |
12699 | -{ | |
12700 | - register struct tcp_conn *cd = | |
12701 | - (struct tcp_conn *)(xprt->xp_p1); | |
12702 | - register XDR *xdrs = &(cd->xdrs); | |
12703 | - | |
12704 | - xdrs->x_op = XDR_DECODE; | |
12705 | - (void)xdrrec_skiprecord(xdrs); | |
12706 | - if (xdr_callmsg(xdrs, msg)) { | |
12707 | - cd->x_id = msg->rm_xid; | |
12708 | - return (TRUE); | |
12709 | - } | |
12710 | - cd->strm_stat = XPRT_DIED; /* XXX */ | |
12711 | - return (FALSE); | |
12712 | -} | |
12713 | - | |
12714 | -static bool_t | |
12715 | -svctcp_getargs(xprt, xdr_args, args_ptr) | |
12716 | - SVCXPRT *xprt; | |
12717 | - xdrproc_t xdr_args; | |
12718 | - caddr_t args_ptr; | |
12719 | -{ | |
12720 | - return (SVCAUTH_UNWRAP(xprt->xp_auth, | |
12721 | - &(((struct tcp_conn *)(xprt->xp_p1))->xdrs), | |
12722 | - xdr_args, args_ptr)); | |
12723 | -} | |
12724 | - | |
12725 | -static bool_t | |
12726 | -svctcp_freeargs(xprt, xdr_args, args_ptr) | |
12727 | - SVCXPRT *xprt; | |
12728 | - xdrproc_t xdr_args; | |
12729 | - caddr_t args_ptr; | |
12730 | -{ | |
12731 | - register XDR *xdrs = | |
12732 | - &(((struct tcp_conn *)(xprt->xp_p1))->xdrs); | |
12733 | - | |
12734 | - xdrs->x_op = XDR_FREE; | |
12735 | - return ((*xdr_args)(xdrs, args_ptr)); | |
12736 | -} | |
12737 | - | |
12738 | -static bool_t | |
12739 | -svctcp_reply(xprt, msg) | |
12740 | - SVCXPRT *xprt; | |
12741 | - register struct rpc_msg *msg; | |
12742 | -{ | |
12743 | - register struct tcp_conn *cd = | |
12744 | - (struct tcp_conn *)(xprt->xp_p1); | |
12745 | - register XDR *xdrs = &(cd->xdrs); | |
12746 | - xdrproc_t xdr_proc; | |
12747 | - caddr_t xdr_where; | |
12748 | - | |
12749 | - xdrs->x_op = XDR_ENCODE; | |
12750 | - msg->rm_xid = cd->x_id; | |
12751 | - | |
12752 | - if (msg->rm_reply.rp_stat == MSG_ACCEPTED && | |
12753 | - msg->rm_reply.rp_acpt.ar_stat == SUCCESS) { | |
12754 | - xdr_proc = msg->acpted_rply.ar_results.proc; | |
12755 | - xdr_where = msg->acpted_rply.ar_results.where; | |
12756 | - msg->acpted_rply.ar_results.proc = xdr_void; | |
12757 | - msg->acpted_rply.ar_results.where = NULL; | |
12758 | - | |
12759 | - if (!xdr_replymsg(xdrs, msg) || | |
12760 | - !SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_proc, xdr_where)) | |
12761 | - return (FALSE); | |
12762 | - } | |
12763 | - else if (!xdr_replymsg(xdrs, msg)) { | |
12764 | - return (FALSE); | |
12765 | - } | |
12766 | - (void)xdrrec_endofrecord(xdrs, TRUE); | |
12767 | - | |
12768 | - return (TRUE); | |
12769 | -} | |
12770 | diff -puN -L support/rpc/svc_udp.c support/rpc/svc_udp.c~CITI_NFS4_ALL /dev/null | |
12771 | --- nfs-utils-1.0.7/support/rpc/svc_udp.c | |
12772 | +++ /dev/null 2005-05-05 05:47:05.259725168 -0400 | |
12773 | @@ -1,516 +0,0 @@ | |
12774 | -/* | |
12775 | - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for | |
12776 | - * unrestricted use provided that this legend is included on all tape | |
12777 | - * media and as a part of the software program in whole or part. Users | |
12778 | - * may copy or modify Sun RPC without charge, but are not authorized | |
12779 | - * to license or distribute it to anyone else except as part of a product or | |
12780 | - * program developed by the user. | |
12781 | - * | |
12782 | - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE | |
12783 | - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR | |
12784 | - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. | |
12785 | - * | |
12786 | - * Sun RPC is provided with no support and without any obligation on the | |
12787 | - * part of Sun Microsystems, Inc. to assist in its use, correction, | |
12788 | - * modification or enhancement. | |
12789 | - * | |
12790 | - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE | |
12791 | - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC | |
12792 | - * OR ANY PART THEREOF. | |
12793 | - * | |
12794 | - * In no event will Sun Microsystems, Inc. be liable for any lost revenue | |
12795 | - * or profits or other special, indirect and consequential damages, even if | |
12796 | - * Sun has been advised of the possibility of such damages. | |
12797 | - * | |
12798 | - * Sun Microsystems, Inc. | |
12799 | - * 2550 Garcia Avenue | |
12800 | - * Mountain View, California 94043 | |
12801 | - */ | |
12802 | - | |
12803 | -#if defined(LIBC_SCCS) && !defined(lint) | |
12804 | -static char *rcsid = "$OpenBSD: svc_udp.c,v 1.8 1998/03/19 00:27:26 millert Exp $"; | |
12805 | -#endif /* LIBC_SCCS and not lint */ | |
12806 | - | |
12807 | -/* | |
12808 | - * svc_udp.c, | |
12809 | - * Server side for UDP/IP based RPC. (Does some caching in the hopes of | |
12810 | - * achieving execute-at-most-once semantics.) | |
12811 | - * | |
12812 | - * Copyright (C) 1984, Sun Microsystems, Inc. | |
12813 | - */ | |
12814 | - | |
12815 | -#include <stdio.h> | |
12816 | -#include <stdlib.h> | |
12817 | -#include <string.h> | |
12818 | -#include <rpc/rpc.h> | |
12819 | -#include <sys/socket.h> | |
12820 | -#include <errno.h> | |
12821 | -#include <unistd.h> | |
12822 | - | |
12823 | - | |
12824 | -#define rpc_buffer(xprt) ((xprt)->xp_p1) | |
12825 | -#ifndef MAX | |
12826 | -#define MAX(a, b) ((a > b) ? a : b) | |
12827 | -#endif | |
12828 | - | |
12829 | -static bool_t svcudp_recv(); | |
12830 | -static bool_t svcudp_reply(); | |
12831 | -static enum xprt_stat svcudp_stat(); | |
12832 | -static bool_t svcudp_getargs(); | |
12833 | -static bool_t svcudp_freeargs(); | |
12834 | -static void svcudp_destroy(); | |
12835 | -static void cache_set __P((SVCXPRT *, u_long)); | |
12836 | -static int cache_get __P((SVCXPRT *, struct rpc_msg *, char **, u_long *)); | |
12837 | - | |
12838 | -static struct xp_ops svcudp_op = { | |
12839 | - svcudp_recv, | |
12840 | - svcudp_stat, | |
12841 | - svcudp_getargs, | |
12842 | - svcudp_reply, | |
12843 | - svcudp_freeargs, | |
12844 | - svcudp_destroy | |
12845 | -}; | |
12846 | - | |
12847 | -/* | |
12848 | - * kept in xprt->xp_p2 | |
12849 | - */ | |
12850 | -struct svcudp_data { | |
12851 | - u_int su_iosz; /* byte size of send.recv buffer */ | |
12852 | - u_long su_xid; /* transaction id */ | |
12853 | - XDR su_xdrs; /* XDR handle */ | |
12854 | - char su_verfbody[MAX_AUTH_BYTES]; /* verifier body */ | |
12855 | - char * su_cache; /* cached data, NULL if no cache */ | |
12856 | -}; | |
12857 | -#define su_data(xprt) ((struct svcudp_data *)(xprt->xp_p2)) | |
12858 | - | |
12859 | -/* | |
12860 | - * Usage: | |
12861 | - * xprt = svcudp_create(sock); | |
12862 | - * | |
12863 | - * If sock<0 then a socket is created, else sock is used. | |
12864 | - * If the socket, sock is not bound to a port then svcudp_create | |
12865 | - * binds it to an arbitrary port. In any (successful) case, | |
12866 | - * xprt->xp_sock is the registered socket number and xprt->xp_port is the | |
12867 | - * associated port number. | |
12868 | - * Once *xprt is initialized, it is registered as a transporter; | |
12869 | - * see (svc.h, xprt_register). | |
12870 | - * The routines returns NULL if a problem occurred. | |
12871 | - */ | |
12872 | -SVCXPRT * | |
12873 | -svcudp_bufcreate(sock, sendsz, recvsz) | |
12874 | - register int sock; | |
12875 | - u_int sendsz, recvsz; | |
12876 | -{ | |
12877 | - bool_t madesock = FALSE; | |
12878 | - register SVCXPRT *xprt; | |
12879 | - register struct svcudp_data *su; | |
12880 | - struct sockaddr_in addr; | |
12881 | - int len = sizeof(struct sockaddr_in); | |
12882 | - | |
12883 | - if (sock == RPC_ANYSOCK) { | |
12884 | - if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) { | |
12885 | - perror("svcudp_create: socket creation problem"); | |
12886 | - return ((SVCXPRT *)NULL); | |
12887 | - } | |
12888 | - madesock = TRUE; | |
12889 | - } | |
12890 | - memset(&addr, 0, sizeof (addr)); | |
12891 | -#ifndef __linux__ | |
12892 | - addr.sin_len = sizeof(struct sockaddr_in); | |
12893 | -#endif | |
12894 | - addr.sin_family = AF_INET; | |
12895 | - if (bindresvport(sock, &addr)) { | |
12896 | - addr.sin_port = 0; | |
12897 | - (void)bind(sock, (struct sockaddr *)&addr, len); | |
12898 | - } | |
12899 | - if (getsockname(sock, (struct sockaddr *)&addr, &len) != 0) { | |
12900 | - perror("svcudp_create - cannot getsockname"); | |
12901 | - if (madesock) | |
12902 | - (void)close(sock); | |
12903 | - return ((SVCXPRT *)NULL); | |
12904 | - } | |
12905 | - xprt = (SVCXPRT *)mem_alloc(sizeof(SVCXPRT)); | |
12906 | - if (xprt == NULL) { | |
12907 | - (void)fprintf(stderr, "svcudp_create: out of memory\n"); | |
12908 | - if (madesock) | |
12909 | - (void)close(sock); | |
12910 | - return (NULL); | |
12911 | - } | |
12912 | - su = (struct svcudp_data *)mem_alloc(sizeof(*su)); | |
12913 | - if (su == NULL) { | |
12914 | - (void)fprintf(stderr, "svcudp_create: out of memory\n"); | |
12915 | - if (madesock) | |
12916 | - (void)close(sock); | |
12917 | - free(xprt); | |
12918 | - return (NULL); | |
12919 | - } | |
12920 | - su->su_iosz = ((MAX(sendsz, recvsz) + 3) / 4) * 4; | |
12921 | - if ((rpc_buffer(xprt) = mem_alloc(su->su_iosz)) == NULL) { | |
12922 | - (void)fprintf(stderr, "svcudp_create: out of memory\n"); | |
12923 | - if (madesock) | |
12924 | - (void)close(sock); | |
12925 | - free(xprt); | |
12926 | - free(su); | |
12927 | - return (NULL); | |
12928 | - } | |
12929 | - xdrmem_create( | |
12930 | - &(su->su_xdrs), rpc_buffer(xprt), su->su_iosz, XDR_DECODE); | |
12931 | - su->su_cache = NULL; | |
12932 | - xprt->xp_p2 = (caddr_t)su; | |
12933 | - xprt->xp_auth = NULL; | |
12934 | - xprt->xp_verf.oa_base = su->su_verfbody; | |
12935 | - xprt->xp_ops = &svcudp_op; | |
12936 | - xprt->xp_port = ntohs(addr.sin_port); | |
12937 | - xprt->xp_sock = sock; | |
12938 | - xprt_register(xprt); | |
12939 | - return (xprt); | |
12940 | -} | |
12941 | - | |
12942 | -SVCXPRT * | |
12943 | -svcudp_create(sock) | |
12944 | - int sock; | |
12945 | -{ | |
12946 | - | |
12947 | - return(svcudp_bufcreate(sock, UDPMSGSIZE, UDPMSGSIZE)); | |
12948 | -} | |
12949 | - | |
12950 | -/* ARGSUSED */ | |
12951 | -static enum xprt_stat | |
12952 | -svcudp_stat(xprt) | |
12953 | - SVCXPRT *xprt; | |
12954 | -{ | |
12955 | - | |
12956 | - return (XPRT_IDLE); | |
12957 | -} | |
12958 | - | |
12959 | -static bool_t | |
12960 | -svcudp_recv(xprt, msg) | |
12961 | - register SVCXPRT *xprt; | |
12962 | - struct rpc_msg *msg; | |
12963 | -{ | |
12964 | - register struct svcudp_data *su = su_data(xprt); | |
12965 | - register XDR *xdrs = &(su->su_xdrs); | |
12966 | - register int rlen; | |
12967 | - char *reply; | |
12968 | - u_long replylen; | |
12969 | - | |
12970 | - again: | |
12971 | - xprt->xp_addrlen = sizeof(struct sockaddr_in); | |
12972 | - rlen = recvfrom(xprt->xp_sock, rpc_buffer(xprt), (int) su->su_iosz, | |
12973 | - 0, (struct sockaddr *)&(xprt->xp_raddr), &(xprt->xp_addrlen)); | |
12974 | - if (rlen == -1 && errno == EINTR) | |
12975 | - goto again; | |
12976 | - if (rlen == -1 || rlen < 4*sizeof(u_int32_t)) | |
12977 | - return (FALSE); | |
12978 | - xdrs->x_op = XDR_DECODE; | |
12979 | - XDR_SETPOS(xdrs, 0); | |
12980 | - if (! xdr_callmsg(xdrs, msg)) | |
12981 | - return (FALSE); | |
12982 | - su->su_xid = msg->rm_xid; | |
12983 | - if (su->su_cache != NULL) { | |
12984 | - if (cache_get(xprt, msg, &reply, &replylen)) { | |
12985 | - (void) sendto(xprt->xp_sock, reply, (int) replylen, 0, | |
12986 | - (struct sockaddr *) &xprt->xp_raddr, xprt->xp_addrlen); | |
12987 | - return (TRUE); | |
12988 | - } | |
12989 | - } | |
12990 | - return (TRUE); | |
12991 | -} | |
12992 | - | |
12993 | -static bool_t | |
12994 | -svcudp_reply(xprt, msg) | |
12995 | - register SVCXPRT *xprt; | |
12996 | - struct rpc_msg *msg; | |
12997 | -{ | |
12998 | - register struct svcudp_data *su = su_data(xprt); | |
12999 | - register XDR *xdrs = &(su->su_xdrs); | |
13000 | - register int slen; | |
13001 | - xdrproc_t xdr_proc; | |
13002 | - caddr_t xdr_where; | |
13003 | - | |
13004 | - xdrs->x_op = XDR_ENCODE; | |
13005 | - XDR_SETPOS(xdrs, 0); | |
13006 | - msg->rm_xid = su->su_xid; | |
13007 | - | |
13008 | - if (msg->rm_reply.rp_stat == MSG_ACCEPTED && | |
13009 | - msg->rm_reply.rp_acpt.ar_stat == SUCCESS) { | |
13010 | - xdr_proc = msg->acpted_rply.ar_results.proc; | |
13011 | - xdr_where = msg->acpted_rply.ar_results.where; | |
13012 | - msg->acpted_rply.ar_results.proc = xdr_void; | |
13013 | - msg->acpted_rply.ar_results.where = NULL; | |
13014 | - | |
13015 | - if (!xdr_replymsg(xdrs, msg) || | |
13016 | - !SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_proc, xdr_where)) | |
13017 | - return (FALSE); | |
13018 | - } | |
13019 | - else if (!xdr_replymsg(xdrs, msg)) { | |
13020 | - return (FALSE); | |
13021 | - } | |
13022 | - slen = (int)XDR_GETPOS(xdrs); | |
13023 | - | |
13024 | - if (sendto(xprt->xp_sock, rpc_buffer(xprt), slen, 0, | |
13025 | - (struct sockaddr *)&(xprt->xp_raddr), xprt->xp_addrlen) | |
13026 | - != slen) { | |
13027 | - return (FALSE); | |
13028 | - } | |
13029 | - if (su->su_cache && slen >= 0) | |
13030 | - cache_set(xprt, (u_long) slen); | |
13031 | - | |
13032 | - return (TRUE); | |
13033 | -} | |
13034 | - | |
13035 | -static bool_t | |
13036 | -svcudp_getargs(xprt, xdr_args, args_ptr) | |
13037 | - SVCXPRT *xprt; | |
13038 | - xdrproc_t xdr_args; | |
13039 | - caddr_t args_ptr; | |
13040 | -{ | |
13041 | - return (SVCAUTH_UNWRAP(xprt->xp_auth, &(su_data(xprt)->su_xdrs), | |
13042 | - xdr_args, args_ptr)); | |
13043 | -} | |
13044 | - | |
13045 | -static bool_t | |
13046 | -svcudp_freeargs(xprt, xdr_args, args_ptr) | |
13047 | - SVCXPRT *xprt; | |
13048 | - xdrproc_t xdr_args; | |
13049 | - caddr_t args_ptr; | |
13050 | -{ | |
13051 | - register XDR *xdrs = &(su_data(xprt)->su_xdrs); | |
13052 | - | |
13053 | - xdrs->x_op = XDR_FREE; | |
13054 | - return ((*xdr_args)(xdrs, args_ptr)); | |
13055 | -} | |
13056 | - | |
13057 | -static void | |
13058 | -svcudp_destroy(xprt) | |
13059 | - register SVCXPRT *xprt; | |
13060 | -{ | |
13061 | - register struct svcudp_data *su = su_data(xprt); | |
13062 | - | |
13063 | - xprt_unregister(xprt); | |
13064 | - if (xprt->xp_sock != -1) | |
13065 | - (void)close(xprt->xp_sock); | |
13066 | - xprt->xp_sock = -1; | |
13067 | - if (xprt->xp_auth != NULL) { | |
13068 | - SVCAUTH_DESTROY(xprt->xp_auth); | |
13069 | - xprt->xp_auth = NULL; | |
13070 | - } | |
13071 | - XDR_DESTROY(&(su->su_xdrs)); | |
13072 | - mem_free(rpc_buffer(xprt), su->su_iosz); | |
13073 | - mem_free((caddr_t)su, sizeof(struct svcudp_data)); | |
13074 | - mem_free((caddr_t)xprt, sizeof(SVCXPRT)); | |
13075 | -} | |
13076 | - | |
13077 | - | |
13078 | -/***********this could be a separate file*********************/ | |
13079 | - | |
13080 | -/* | |
13081 | - * Fifo cache for udp server | |
13082 | - * Copies pointers to reply buffers into fifo cache | |
13083 | - * Buffers are sent again if retransmissions are detected. | |
13084 | - */ | |
13085 | - | |
13086 | -#define SPARSENESS 4 /* 75% sparse */ | |
13087 | - | |
13088 | -#define CACHE_PERROR(msg) \ | |
13089 | - (void) fprintf(stderr,"%s\n", msg) | |
13090 | - | |
13091 | -#define ALLOC(type, size) \ | |
13092 | - (type *) mem_alloc((unsigned) (sizeof(type) * (size))) | |
13093 | - | |
13094 | -#define BZERO(addr, type, size) \ | |
13095 | - memset((char *) addr, 0, sizeof(type) * (int) (size)) | |
13096 | - | |
13097 | -/* | |
13098 | - * An entry in the cache | |
13099 | - */ | |
13100 | -typedef struct cache_node *cache_ptr; | |
13101 | -struct cache_node { | |
13102 | - /* | |
13103 | - * Index into cache is xid, proc, vers, prog and address | |
13104 | - */ | |
13105 | - u_long cache_xid; | |
13106 | - u_long cache_proc; | |
13107 | - u_long cache_vers; | |
13108 | - u_long cache_prog; | |
13109 | - struct sockaddr_in cache_addr; | |
13110 | - /* | |
13111 | - * The cached reply and length | |
13112 | - */ | |
13113 | - char * cache_reply; | |
13114 | - u_long cache_replylen; | |
13115 | - /* | |
13116 | - * Next node on the list, if there is a collision | |
13117 | - */ | |
13118 | - cache_ptr cache_next; | |
13119 | -}; | |
13120 | - | |
13121 | - | |
13122 | - | |
13123 | -/* | |
13124 | - * The entire cache | |
13125 | - */ | |
13126 | -struct udp_cache { | |
13127 | - u_long uc_size; /* size of cache */ | |
13128 | - cache_ptr *uc_entries; /* hash table of entries in cache */ | |
13129 | - cache_ptr *uc_fifo; /* fifo list of entries in cache */ | |
13130 | - u_long uc_nextvictim; /* points to next victim in fifo list */ | |
13131 | - u_long uc_prog; /* saved program number */ | |
13132 | - u_long uc_vers; /* saved version number */ | |
13133 | - u_long uc_proc; /* saved procedure number */ | |
13134 | - struct sockaddr_in uc_addr; /* saved caller's address */ | |
13135 | -}; | |
13136 | - | |
13137 | - | |
13138 | -/* | |
13139 | - * the hashing function | |
13140 | - */ | |
13141 | -#define CACHE_LOC(transp, xid) \ | |
13142 | - (xid % (SPARSENESS*((struct udp_cache *) su_data(transp)->su_cache)->uc_size)) | |
13143 | - | |
13144 | - | |
13145 | -/* | |
13146 | - * Enable use of the cache. | |
13147 | - * Note: there is no disable. | |
13148 | - */ | |
13149 | -int | |
13150 | -svcudp_enablecache(transp, size) | |
13151 | - SVCXPRT *transp; | |
13152 | - u_long size; | |
13153 | -{ | |
13154 | - struct svcudp_data *su = su_data(transp); | |
13155 | - struct udp_cache *uc; | |
13156 | - | |
13157 | - if (su->su_cache != NULL) { | |
13158 | - CACHE_PERROR("enablecache: cache already enabled"); | |
13159 | - return(0); | |
13160 | - } | |
13161 | - uc = ALLOC(struct udp_cache, 1); | |
13162 | - if (uc == NULL) { | |
13163 | - CACHE_PERROR("enablecache: could not allocate cache"); | |
13164 | - return(0); | |
13165 | - } | |
13166 | - uc->uc_size = size; | |
13167 | - uc->uc_nextvictim = 0; | |
13168 | - uc->uc_entries = ALLOC(cache_ptr, size * SPARSENESS); | |
13169 | - if (uc->uc_entries == NULL) { | |
13170 | - CACHE_PERROR("enablecache: could not allocate cache data"); | |
13171 | - return(0); | |
13172 | - } | |
13173 | - BZERO(uc->uc_entries, cache_ptr, size * SPARSENESS); | |
13174 | - uc->uc_fifo = ALLOC(cache_ptr, size); | |
13175 | - if (uc->uc_fifo == NULL) { | |
13176 | - CACHE_PERROR("enablecache: could not allocate cache fifo"); | |
13177 | - return(0); | |
13178 | - } | |
13179 | - BZERO(uc->uc_fifo, cache_ptr, size); | |
13180 | - su->su_cache = (char *) uc; | |
13181 | - return(1); | |
13182 | -} | |
13183 | - | |
13184 | - | |
13185 | -/* | |
13186 | - * Set an entry in the cache | |
13187 | - */ | |
13188 | -static void | |
13189 | -cache_set(xprt, replylen) | |
13190 | - SVCXPRT *xprt; | |
13191 | - u_long replylen; | |
13192 | -{ | |
13193 | - register cache_ptr victim; | |
13194 | - register cache_ptr *vicp; | |
13195 | - register struct svcudp_data *su = su_data(xprt); | |
13196 | - struct udp_cache *uc = (struct udp_cache *) su->su_cache; | |
13197 | - u_int loc; | |
13198 | - char *newbuf; | |
13199 | - | |
13200 | - /* | |
13201 | - * Find space for the new entry, either by | |
13202 | - * reusing an old entry, or by mallocing a new one | |
13203 | - */ | |
13204 | - victim = uc->uc_fifo[uc->uc_nextvictim]; | |
13205 | - if (victim != NULL) { | |
13206 | - loc = CACHE_LOC(xprt, victim->cache_xid); | |
13207 | - for (vicp = &uc->uc_entries[loc]; | |
13208 | - *vicp != NULL && *vicp != victim; | |
13209 | - vicp = &(*vicp)->cache_next) | |
13210 | - ; | |
13211 | - if (*vicp == NULL) { | |
13212 | - CACHE_PERROR("cache_set: victim not found"); | |
13213 | - return; | |
13214 | - } | |
13215 | - *vicp = victim->cache_next; /* remote from cache */ | |
13216 | - newbuf = victim->cache_reply; | |
13217 | - } else { | |
13218 | - victim = ALLOC(struct cache_node, 1); | |
13219 | - if (victim == NULL) { | |
13220 | - CACHE_PERROR("cache_set: victim alloc failed"); | |
13221 | - return; | |
13222 | - } | |
13223 | - newbuf = mem_alloc(su->su_iosz); | |
13224 | - if (newbuf == NULL) { | |
13225 | - CACHE_PERROR("cache_set: could not allocate new rpc_buffer"); | |
13226 | - return; | |
13227 | - } | |
13228 | - } | |
13229 | - | |
13230 | - /* | |
13231 | - * Store it away | |
13232 | - */ | |
13233 | - victim->cache_replylen = replylen; | |
13234 | - victim->cache_reply = rpc_buffer(xprt); | |
13235 | - rpc_buffer(xprt) = newbuf; | |
13236 | - xdrmem_create(&(su->su_xdrs), rpc_buffer(xprt), su->su_iosz, XDR_ENCODE); | |
13237 | - victim->cache_xid = su->su_xid; | |
13238 | - victim->cache_proc = uc->uc_proc; | |
13239 | - victim->cache_vers = uc->uc_vers; | |
13240 | - victim->cache_prog = uc->uc_prog; | |
13241 | - victim->cache_addr = uc->uc_addr; | |
13242 | - loc = CACHE_LOC(xprt, victim->cache_xid); | |
13243 | - victim->cache_next = uc->uc_entries[loc]; | |
13244 | - uc->uc_entries[loc] = victim; | |
13245 | - uc->uc_fifo[uc->uc_nextvictim++] = victim; | |
13246 | - uc->uc_nextvictim %= uc->uc_size; | |
13247 | -} | |
13248 | - | |
13249 | -/* | |
13250 | - * Try to get an entry from the cache | |
13251 | - * return 1 if found, 0 if not found | |
13252 | - */ | |
13253 | -static int | |
13254 | -cache_get(xprt, msg, replyp, replylenp) | |
13255 | - SVCXPRT *xprt; | |
13256 | - struct rpc_msg *msg; | |
13257 | - char **replyp; | |
13258 | - u_long *replylenp; | |
13259 | -{ | |
13260 | - u_int loc; | |
13261 | - register cache_ptr ent; | |
13262 | - register struct svcudp_data *su = su_data(xprt); | |
13263 | - register struct udp_cache *uc = (struct udp_cache *) su->su_cache; | |
13264 | - | |
13265 | -# define EQADDR(a1, a2) (memcmp(&a1, &a2, sizeof(a1)) == 0) | |
13266 | - | |
13267 | - loc = CACHE_LOC(xprt, su->su_xid); | |
13268 | - for (ent = uc->uc_entries[loc]; ent != NULL; ent = ent->cache_next) { | |
13269 | - if (ent->cache_xid == su->su_xid && | |
13270 | - ent->cache_proc == uc->uc_proc && | |
13271 | - ent->cache_vers == uc->uc_vers && | |
13272 | - ent->cache_prog == uc->uc_prog && | |
13273 | - EQADDR(ent->cache_addr, uc->uc_addr)) { | |
13274 | - *replyp = ent->cache_reply; | |
13275 | - *replylenp = ent->cache_replylen; | |
13276 | - return(1); | |
13277 | - } | |
13278 | - } | |
13279 | - /* | |
13280 | - * Failed to find entry | |
13281 | - * Remember a few things so we can do a set later | |
13282 | - */ | |
13283 | - uc->uc_proc = msg->rm_call.cb_proc; | |
13284 | - uc->uc_vers = msg->rm_call.cb_vers; | |
13285 | - uc->uc_prog = msg->rm_call.cb_prog; | |
13286 | - uc->uc_addr = xprt->xp_raddr; | |
13287 | - return(0); | |
13288 | -} | |
13289 | - | |
13290 | diff -puN utils/gssd/gssd.c~CITI_NFS4_ALL utils/gssd/gssd.c | |
13291 | --- nfs-utils-1.0.7/utils/gssd/gssd.c~CITI_NFS4_ALL 2005-05-06 15:19:26.142447000 -0400 | |
13292 | +++ nfs-utils-1.0.7-kwc/utils/gssd/gssd.c 2005-05-06 15:19:26.301305000 -0400 | |
13293 | @@ -36,6 +36,8 @@ | |
13294 | ||
13295 | */ | |
13296 | ||
13297 | +#include "config.h" | |
13298 | + | |
13299 | #include <sys/param.h> | |
13300 | #include <sys/socket.h> | |
13301 | #include <rpc/rpc.h> | |
13302 | @@ -66,7 +68,7 @@ sig_die(int signal) | |
13303 | static void | |
13304 | usage(char *progname) | |
13305 | { | |
13306 | - fprintf(stderr, "usage: %s [-f] [-v] [-p pipefsdir] [-k keytab]\n", | |
13307 | + fprintf(stderr, "usage: %s [-f] [-v] [-r] [-p pipefsdir] [-k keytab]\n", | |
13308 | progname); | |
13309 | exit(1); | |
13310 | } | |
13311 | @@ -76,11 +78,12 @@ main(int argc, char *argv[]) | |
13312 | { | |
13313 | int fg = 0; | |
13314 | int verbosity = 0; | |
13315 | + int rpc_verbosity = 0; | |
13316 | int opt; | |
13317 | extern char *optarg; | |
13318 | char *progname; | |
13319 | ||
13320 | - while ((opt = getopt(argc, argv, "fvmp:k:")) != -1) { | |
13321 | + while ((opt = getopt(argc, argv, "fvrmp:k:")) != -1) { | |
13322 | switch (opt) { | |
13323 | case 'f': | |
13324 | fg = 1; | |
13325 | @@ -91,6 +94,9 @@ main(int argc, char *argv[]) | |
13326 | case 'v': | |
13327 | verbosity++; | |
13328 | break; | |
13329 | + case 'r': | |
13330 | + rpc_verbosity++; | |
13331 | + break; | |
13332 | case 'p': | |
13333 | strncpy(pipefsdir, optarg, sizeof(pipefsdir)); | |
13334 | if (pipefsdir[sizeof(pipefsdir)-1] != '\0') | |
13335 | @@ -117,6 +123,13 @@ main(int argc, char *argv[]) | |
13336 | progname = argv[0]; | |
13337 | ||
13338 | initerr(progname, verbosity, fg); | |
13339 | +#ifdef HAVE_AUTHGSS_SET_DEBUG_LEVEL | |
13340 | + authgss_set_debug_level(rpc_verbosity); | |
13341 | +#else | |
13342 | + if (rpc_verbosity > 0) | |
13343 | + printerr(0, "Warning: rpcsec_gss library does not " | |
13344 | + "support setting debug level\n"); | |
13345 | +#endif | |
13346 | ||
13347 | if (!fg && daemon(0, 0) < 0) | |
13348 | errx(1, "fork"); | |
13349 | diff -puN utils/gssd/gssd.man~CITI_NFS4_ALL utils/gssd/gssd.man | |
13350 | --- nfs-utils-1.0.7/utils/gssd/gssd.man~CITI_NFS4_ALL 2005-05-06 15:19:26.190416000 -0400 | |
13351 | +++ nfs-utils-1.0.7-kwc/utils/gssd/gssd.man 2005-05-06 15:19:26.316291000 -0400 | |
13352 | @@ -6,7 +6,7 @@ | |
13353 | .SH NAME | |
13354 | rpc.gssd \- rpcsec_gss daemon | |
13355 | .SH SYNOPSIS | |
13356 | -.B "rpc.gssd [-f] [-k keytab] [-p pipefsdir] [-v]" | |
13357 | +.B "rpc.gssd [-f] [-k keytab] [-p pipefsdir] [-v] [-r]" | |
13358 | .SH DESCRIPTION | |
13359 | The rpcsec_gss protocol gives a means of using the gss-api generic security | |
13360 | api to provide security for protocols using rpc (in particular, nfs). Before | |
13361 | @@ -50,6 +50,10 @@ where to look for the rpc_pipefs filesys | |
13362 | .TP | |
13363 | .B -v | |
13364 | Increases the verbosity of the output (can be specified multiple times). | |
13365 | +.TP | |
13366 | +.B -r | |
13367 | +If the rpcsec_gss library supports setting debug level, | |
13368 | +increases the verbosity of the output (can be specified multiple times). | |
13369 | .SH SEE ALSO | |
13370 | .BR rpc.svcgssd(8) | |
13371 | .SH AUTHORS | |
13372 | diff -puN utils/svcgssd/svcgssd.c~CITI_NFS4_ALL utils/svcgssd/svcgssd.c | |
13373 | --- nfs-utils-1.0.7/utils/svcgssd/svcgssd.c~CITI_NFS4_ALL 2005-05-06 15:19:26.238369000 -0400 | |
13374 | +++ nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd.c 2005-05-06 15:19:26.309297000 -0400 | |
13375 | @@ -37,6 +37,8 @@ | |
13376 | ||
13377 | */ | |
13378 | ||
13379 | +#include "config.h" | |
13380 | + | |
13381 | #include <sys/param.h> | |
13382 | #include <sys/types.h> | |
13383 | #include <sys/stat.h> | |
13384 | @@ -146,7 +148,7 @@ sig_die(int signal) | |
13385 | static void | |
13386 | usage(char *progname) | |
13387 | { | |
13388 | - fprintf(stderr, "usage: %s [-n] [-f] [-v]\n", | |
13389 | + fprintf(stderr, "usage: %s [-n] [-f] [-v] [-r]\n", | |
13390 | progname); | |
13391 | exit(1); | |
13392 | } | |
13393 | @@ -157,11 +159,12 @@ main(int argc, char *argv[]) | |
13394 | int get_creds = 1; | |
13395 | int fg = 0; | |
13396 | int verbosity = 0; | |
13397 | + int rpc_verbosity = 0; | |
13398 | int opt; | |
13399 | extern char *optarg; | |
13400 | char *progname; | |
13401 | ||
13402 | - while ((opt = getopt(argc, argv, "fvnp:")) != -1) { | |
13403 | + while ((opt = getopt(argc, argv, "fvrnp:")) != -1) { | |
13404 | switch (opt) { | |
13405 | case 'f': | |
13406 | fg = 1; | |
13407 | @@ -172,6 +175,9 @@ main(int argc, char *argv[]) | |
13408 | case 'v': | |
13409 | verbosity++; | |
13410 | break; | |
13411 | + case 'r': | |
13412 | + rpc_verbosity++; | |
13413 | + break; | |
13414 | default: | |
13415 | usage(argv[0]); | |
13416 | break; | |
13417 | @@ -184,6 +190,13 @@ main(int argc, char *argv[]) | |
13418 | progname = argv[0]; | |
13419 | ||
13420 | initerr(progname, verbosity, fg); | |
13421 | +#ifdef HAVE_AUTHGSS_SET_DEBUG_LEVEL | |
13422 | + authgss_set_debug_level(rpc_verbosity); | |
13423 | +#else | |
13424 | + if (rpc_verbosity > 0) | |
13425 | + printerr(0, "Warning: rpcsec_gss library does not " | |
13426 | + "support setting debug level\n"); | |
13427 | +#endif | |
13428 | ||
13429 | if (!fg) | |
13430 | mydaemon(0, 0); | |
13431 | diff -puN utils/svcgssd/svcgssd.man~CITI_NFS4_ALL utils/svcgssd/svcgssd.man | |
13432 | --- nfs-utils-1.0.7/utils/svcgssd/svcgssd.man~CITI_NFS4_ALL 2005-05-06 15:19:26.287319000 -0400 | |
13433 | +++ nfs-utils-1.0.7-kwc/utils/svcgssd/svcgssd.man 2005-05-06 15:19:26.323285000 -0400 | |
13434 | @@ -6,7 +6,7 @@ | |
13435 | .SH NAME | |
13436 | rpc.svcgssd \- server-side rpcsec_gss daemon | |
13437 | .SH SYNOPSIS | |
13438 | -.B "rpc.svcgssd [-v] [-f] [-p pipefsdir]" | |
13439 | +.B "rpc.svcgssd [-v] [-r] [-f] [-p pipefsdir]" | |
13440 | .SH DESCRIPTION | |
13441 | The rpcsec_gss protocol gives a means of using the gss-api generic security | |
13442 | api to provide security for protocols using rpc (in particular, nfs). Before | |
13443 | @@ -27,6 +27,10 @@ in the foreground and sends output to st | |
13444 | .TP | |
13445 | .B -v | |
13446 | Increases the verbosity of the output (can be specified multiple times). | |
13447 | +.TP | |
13448 | +.B -r | |
13449 | +If the rpcsec_gss library supports setting debug level, | |
13450 | +increases the verbosity of the output (can be specified multiple times). | |
13451 | ||
13452 | .SH SEE ALSO | |
13453 | .BR rpc.gssd(8), | |
13454 | diff -puN utils/gssd/context_heimdal.c~CITI_NFS4_ALL utils/gssd/context_heimdal.c | |
13455 | --- nfs-utils-1.0.7/utils/gssd/context_heimdal.c~CITI_NFS4_ALL 2005-05-06 15:19:26.436170000 -0400 | |
13456 | +++ nfs-utils-1.0.7-kwc/utils/gssd/context_heimdal.c 2005-05-06 15:19:26.510156000 -0400 | |
13457 | @@ -37,9 +37,11 @@ | |
13458 | #include <syslog.h> | |
13459 | #include <string.h> | |
13460 | #include <errno.h> | |
13461 | -#include <gssapi.h> | |
13462 | #include <krb5.h> | |
13463 | +#include <gssapi.h> /* Must use the heimdal copy! */ | |
13464 | +#ifdef HAVE_COM_ERR_H | |
13465 | #include <com_err.h> | |
13466 | +#endif | |
13467 | #include "err_util.h" | |
13468 | #include "gss_oids.h" | |
13469 | #include "write_bytes.h" | |
13470 | @@ -83,9 +85,14 @@ int write_heimdal_enc_key(char **p, char | |
13471 | } | |
13472 | ||
13473 | memset(&enc_key, 0, sizeof(enc_key)); | |
13474 | - printerr(1, "WARN: write_heimdal_enc_key: " | |
13475 | - "overriding heimdal keytype\n"); | |
13476 | - enc_key.keytype = 4 /* XXX XXX XXX XXX key->keytype */; | |
13477 | + enc_key.keytype = key->keytype; | |
13478 | + /* XXX current kernel code only handles des-cbc-raw (4) */ | |
13479 | + if (enc_key.keytype != 4) { | |
13480 | + printerr(1, "WARN: write_heimdal_enc_key: " | |
13481 | + "overriding heimdal keytype (%d => %d)\n", | |
13482 | + enc_key.keytype, 4); | |
13483 | + enc_key.keytype = 4; | |
13484 | + } | |
13485 | enc_key.keyvalue.length = key->keyvalue.length; | |
13486 | if ((enc_key.keyvalue.data = | |
13487 | calloc(1, enc_key.keyvalue.length)) == NULL) { | |
13488 | @@ -135,9 +142,13 @@ int write_heimdal_seq_key(char **p, char | |
13489 | goto out_err_free_context; | |
13490 | } | |
13491 | ||
13492 | - printerr(1, "WARN: write_heimdal_seq_key: " | |
13493 | - "overriding heimdal keytype\n"); | |
13494 | - key->keytype = 4; /* XXX XXX XXX XXX XXX */ | |
13495 | + /* XXX current kernel code only handles des-cbc-raw (4) */ | |
13496 | + if (key->keytype != 4) { | |
13497 | + printerr(1, "WARN: write_heimdal_seq_key: " | |
13498 | + "overriding heimdal keytype (%d => %d)\n", | |
13499 | + key->keytype, 4); | |
13500 | + key->keytype = 4; | |
13501 | + } | |
13502 | ||
13503 | if (write_heimdal_keyblock(p, end, key)) { | |
13504 | goto out_err_free_key; | |
13505 | diff -puN utils/gssd/gss_oids.h~CITI_NFS4_ALL utils/gssd/gss_oids.h | |
13506 | --- nfs-utils-1.0.7/utils/gssd/gss_oids.h~CITI_NFS4_ALL 2005-05-06 15:19:26.484156000 -0400 | |
13507 | +++ nfs-utils-1.0.7-kwc/utils/gssd/gss_oids.h 2005-05-06 15:19:26.517156000 -0400 | |
13508 | @@ -32,7 +32,6 @@ | |
13509 | #define _GSS_OIDS_H_ | |
13510 | ||
13511 | #include <sys/types.h> | |
13512 | -#include <gssapi/gssapi.h> | |
13513 | ||
13514 | extern gss_OID_desc krb5oid; | |
13515 | extern gss_OID_desc spkm3oid; | |
13516 | ||
13517 | _ |