]> git.proxmox.com Git - mirror_zfs-debian.git/blame - configure
Update series file
[mirror_zfs-debian.git] / configure
CommitLineData
ea04106b
AX
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3d248aec 3# Generated by GNU Autoconf 2.63 for zfs 0.6.5.11.
ea04106b 4#
3d248aec
AX
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
ea04106b
AX
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
3d248aec
AX
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
ea04106b
AX
12
13# Be more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
3d248aec 15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
ea04106b
AX
16 emulate sh
17 NULLCMD=:
18 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
21 setopt NO_GLOB_SUBST
22else
3d248aec
AX
23 case `(set -o) 2>/dev/null` in
24 *posix*) set -o posix ;;
ea04106b 25esac
3d248aec 26
ea04106b
AX
27fi
28
29
3d248aec
AX
30
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
ea04106b
AX
40as_nl='
41'
42export as_nl
43# Printing a long string crashes Solaris 7 /usr/bin/printf.
44as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
46as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
3d248aec 47if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
ea04106b
AX
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
3d248aec 58 case $arg in
ea04106b
AX
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
71
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79fi
80
3d248aec
AX
81# Support unset when possible.
82if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
83 as_unset=unset
84else
85 as_unset=false
86fi
87
ea04106b
AX
88
89# IFS
90# We need space, tab and new line, in precisely that order. Quoting is
91# there to prevent editors from complaining about space-tab.
92# (If _AS_PATH_WALK were called with IFS unset, it would disable word
93# splitting by setting IFS to empty value.)
94IFS=" "" $as_nl"
95
96# Find who we are. Look in the path if we contain no directory separator.
3d248aec 97case $0 in
ea04106b
AX
98 *[\\/]* ) as_myself=$0 ;;
99 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
100for as_dir in $PATH
101do
102 IFS=$as_save_IFS
103 test -z "$as_dir" && as_dir=.
3d248aec
AX
104 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
105done
ea04106b
AX
106IFS=$as_save_IFS
107
108 ;;
109esac
110# We did not find ourselves, most probably we were run as `sh COMMAND'
111# in which case we are not to be found in the path.
112if test "x$as_myself" = x; then
113 as_myself=$0
114fi
115if test ! -f "$as_myself"; then
116 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
3d248aec 117 { (exit 1); exit 1; }
ea04106b
AX
118fi
119
3d248aec
AX
120# Work around bugs in pre-3.0 UWIN ksh.
121for as_var in ENV MAIL MAILPATH
122do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
ea04106b
AX
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
3d248aec
AX
134# Required to use basename.
135if expr a : '\(a\)' >/dev/null 2>&1 &&
136 test "X`expr 00001 : '.*\(...\)'`" = X001; then
137 as_expr=expr
138else
139 as_expr=false
140fi
141
142if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
143 as_basename=basename
144else
145 as_basename=false
146fi
147
148
149# Name of the executable.
150as_me=`$as_basename -- "$0" ||
151$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
152 X"$0" : 'X\(//\)$' \| \
153 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
154$as_echo X/"$0" |
155 sed '/^.*\/\([^/][^/]*\)\/*$/{
156 s//\1/
157 q
158 }
159 /^X\/\(\/\/\)$/{
160 s//\1/
161 q
162 }
163 /^X\/\(\/\).*/{
164 s//\1/
165 q
166 }
167 s/.*/./; q'`
168
ea04106b 169# CDPATH.
3d248aec
AX
170$as_unset CDPATH
171
ea04106b
AX
172
173if test "x$CONFIG_SHELL" = x; then
3d248aec
AX
174 if (eval ":") 2>/dev/null; then
175 as_have_required=yes
ea04106b 176else
3d248aec 177 as_have_required=no
ea04106b 178fi
3d248aec
AX
179
180 if test $as_have_required = yes && (eval ":
181(as_func_return () {
182 (exit \$1)
183}
184as_func_success () {
185 as_func_return 0
186}
187as_func_failure () {
188 as_func_return 1
189}
190as_func_ret_success () {
191 return 0
192}
193as_func_ret_failure () {
194 return 1
195}
ea04106b
AX
196
197exitcode=0
3d248aec
AX
198if as_func_success; then
199 :
ea04106b 200else
3d248aec
AX
201 exitcode=1
202 echo as_func_success failed.
203fi
204
205if as_func_failure; then
206 exitcode=1
207 echo as_func_failure succeeded.
ea04106b 208fi
ea04106b 209
3d248aec
AX
210if as_func_ret_success; then
211 :
ea04106b 212else
3d248aec
AX
213 exitcode=1
214 echo as_func_ret_success failed.
215fi
216
217if as_func_ret_failure; then
218 exitcode=1
219 echo as_func_ret_failure succeeded.
220fi
221
222if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
223 :
224else
225 exitcode=1
226 echo positional parameters were not saved.
227fi
228
229test \$exitcode = 0) || { (exit 1); exit 1; }
230
231(
232 as_lineno_1=\$LINENO
233 as_lineno_2=\$LINENO
234 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
235 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
236") 2> /dev/null; then
237 :
238else
239 as_candidate_shells=
240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
ea04106b
AX
241for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
242do
243 IFS=$as_save_IFS
244 test -z "$as_dir" && as_dir=.
3d248aec 245 case $as_dir in
ea04106b
AX
246 /*)
247 for as_base in sh bash ksh sh5; do
3d248aec 248 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
ea04106b
AX
249 done;;
250 esac
ea04106b 251done
ea04106b
AX
252IFS=$as_save_IFS
253
254
3d248aec
AX
255 for as_shell in $as_candidate_shells $SHELL; do
256 # Try only shells that exist, to save several forks.
257 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
258 { ("$as_shell") 2> /dev/null <<\_ASEOF
259if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
260 emulate sh
261 NULLCMD=:
262 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
263 # is contrary to our usage. Disable this feature.
264 alias -g '${1+"$@"}'='"$@"'
265 setopt NO_GLOB_SUBST
266else
267 case `(set -o) 2>/dev/null` in
268 *posix*) set -o posix ;;
68d83c55 269esac
3d248aec 270
ea04106b 271fi
3d248aec
AX
272
273
274:
275_ASEOF
276}; then
277 CONFIG_SHELL=$as_shell
278 as_have_required=yes
279 if { "$as_shell" 2> /dev/null <<\_ASEOF
280if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
281 emulate sh
282 NULLCMD=:
283 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
284 # is contrary to our usage. Disable this feature.
285 alias -g '${1+"$@"}'='"$@"'
286 setopt NO_GLOB_SUBST
287else
288 case `(set -o) 2>/dev/null` in
289 *posix*) set -o posix ;;
290esac
291
ea04106b 292fi
ea04106b 293
ea04106b 294
3d248aec
AX
295:
296(as_func_return () {
297 (exit $1)
298}
299as_func_success () {
300 as_func_return 0
301}
302as_func_failure () {
303 as_func_return 1
304}
305as_func_ret_success () {
306 return 0
307}
308as_func_ret_failure () {
309 return 1
310}
ea04106b 311
3d248aec
AX
312exitcode=0
313if as_func_success; then
314 :
315else
316 exitcode=1
317 echo as_func_success failed.
318fi
ea04106b 319
3d248aec
AX
320if as_func_failure; then
321 exitcode=1
322 echo as_func_failure succeeded.
323fi
ea04106b 324
3d248aec
AX
325if as_func_ret_success; then
326 :
ea04106b 327else
3d248aec
AX
328 exitcode=1
329 echo as_func_ret_success failed.
330fi
331
332if as_func_ret_failure; then
333 exitcode=1
334 echo as_func_ret_failure succeeded.
335fi
336
337if ( set x; as_func_ret_success y && test x = "$1" ); then
338 :
ea04106b 339else
3d248aec
AX
340 exitcode=1
341 echo positional parameters were not saved.
342fi
ea04106b 343
3d248aec 344test $exitcode = 0) || { (exit 1); exit 1; }
ea04106b 345
3d248aec
AX
346(
347 as_lineno_1=$LINENO
348 as_lineno_2=$LINENO
349 test "x$as_lineno_1" != "x$as_lineno_2" &&
350 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
ea04106b 351
3d248aec
AX
352_ASEOF
353}; then
354 break
355fi
356
357fi
358
359 done
360
361 if test "x$CONFIG_SHELL" != x; then
362 for as_var in BASH_ENV ENV
363 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
364 done
365 export CONFIG_SHELL
366 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
367fi
368
369
370 if test $as_have_required = no; then
371 echo This script requires a shell more modern than all the
372 echo shells that I found on your system. Please install a
373 echo modern shell, or manually run the script under such a
374 echo shell if you do have one.
375 { (exit 1); exit 1; }
376fi
377
378
379fi
380
381fi
382
383
384
385(eval "as_func_return () {
386 (exit \$1)
387}
388as_func_success () {
389 as_func_return 0
390}
391as_func_failure () {
392 as_func_return 1
393}
394as_func_ret_success () {
395 return 0
396}
397as_func_ret_failure () {
398 return 1
399}
400
401exitcode=0
402if as_func_success; then
403 :
ea04106b 404else
3d248aec
AX
405 exitcode=1
406 echo as_func_success failed.
ea04106b
AX
407fi
408
3d248aec
AX
409if as_func_failure; then
410 exitcode=1
411 echo as_func_failure succeeded.
412fi
413
414if as_func_ret_success; then
415 :
ea04106b 416else
3d248aec
AX
417 exitcode=1
418 echo as_func_ret_success failed.
ea04106b
AX
419fi
420
3d248aec
AX
421if as_func_ret_failure; then
422 exitcode=1
423 echo as_func_ret_failure succeeded.
424fi
425
426if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
427 :
ea04106b 428else
3d248aec
AX
429 exitcode=1
430 echo positional parameters were not saved.
ea04106b
AX
431fi
432
3d248aec
AX
433test \$exitcode = 0") || {
434 echo No shell found that supports shell functions.
435 echo Please tell bug-autoconf@gnu.org about your system,
436 echo including any error possibly output before this message.
437 echo This can help us improve future autoconf versions.
438 echo Configuration will now proceed without shell functions.
439}
440
ea04106b 441
ea04106b 442
3d248aec
AX
443 as_lineno_1=$LINENO
444 as_lineno_2=$LINENO
445 test "x$as_lineno_1" != "x$as_lineno_2" &&
446 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
ea04106b 447
3d248aec
AX
448 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
449 # uniformly replaced by the line number. The first 'sed' inserts a
450 # line-number line after each line using $LINENO; the second 'sed'
451 # does the real work. The second script uses 'N' to pair each
452 # line-number line with the line containing $LINENO, and appends
453 # trailing '-' during substitution so that $LINENO is not a special
454 # case at line end.
455 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
456 # scripts with optimization help from Paolo Bonzini. Blame Lee
457 # E. McMahon (1931-1989) for sed's syntax. :-)
ea04106b
AX
458 sed -n '
459 p
460 /[$]LINENO/=
461 ' <$as_myself |
462 sed '
463 s/[$]LINENO.*/&-/
464 t lineno
465 b
466 :lineno
467 N
468 :loop
469 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
470 t loop
471 s/-\n.*//
472 ' >$as_me.lineno &&
473 chmod +x "$as_me.lineno" ||
3d248aec
AX
474 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
475 { (exit 1); exit 1; }; }
ea04106b
AX
476
477 # Don't try to exec as it changes $[0], causing all sort of problems
478 # (the dirname of $[0] is not the place where we might find the
479 # original and so on. Autoconf is especially sensitive to this).
480 . "./$as_me.lineno"
481 # Exit status is that of the last command.
482 exit
483}
484
3d248aec
AX
485
486if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
487 as_dirname=dirname
488else
489 as_dirname=false
490fi
491
ea04106b 492ECHO_C= ECHO_N= ECHO_T=
3d248aec 493case `echo -n x` in
ea04106b 494-n*)
3d248aec 495 case `echo 'x\c'` in
ea04106b 496 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
3d248aec 497 *) ECHO_C='\c';;
ea04106b
AX
498 esac;;
499*)
500 ECHO_N='-n';;
501esac
3d248aec
AX
502if expr a : '\(a\)' >/dev/null 2>&1 &&
503 test "X`expr 00001 : '.*\(...\)'`" = X001; then
504 as_expr=expr
505else
506 as_expr=false
507fi
ea04106b
AX
508
509rm -f conf$$ conf$$.exe conf$$.file
510if test -d conf$$.dir; then
511 rm -f conf$$.dir/conf$$.file
512else
513 rm -f conf$$.dir
514 mkdir conf$$.dir 2>/dev/null
515fi
516if (echo >conf$$.file) 2>/dev/null; then
517 if ln -s conf$$.file conf$$ 2>/dev/null; then
518 as_ln_s='ln -s'
519 # ... but there are two gotchas:
520 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
521 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
3d248aec 522 # In both cases, we have to default to `cp -p'.
ea04106b 523 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
3d248aec 524 as_ln_s='cp -p'
ea04106b
AX
525 elif ln conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s=ln
527 else
3d248aec 528 as_ln_s='cp -p'
ea04106b
AX
529 fi
530else
3d248aec 531 as_ln_s='cp -p'
ea04106b
AX
532fi
533rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
534rmdir conf$$.dir 2>/dev/null
535
536if mkdir -p . 2>/dev/null; then
3d248aec 537 as_mkdir_p=:
ea04106b
AX
538else
539 test -d ./-p && rmdir ./-p
540 as_mkdir_p=false
541fi
542
3d248aec
AX
543if test -x / >/dev/null 2>&1; then
544 as_test_x='test -x'
545else
546 if ls -dL / >/dev/null 2>&1; then
547 as_ls_L_option=L
548 else
549 as_ls_L_option=
550 fi
551 as_test_x='
552 eval sh -c '\''
553 if test -d "$1"; then
554 test -d "$1/.";
555 else
556 case $1 in
557 -*)set "./$1";;
558 esac;
559 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
560 ???[sx]*):;;*)false;;esac;fi
561 '\'' sh
562 '
563fi
564as_executable_p=$as_test_x
ea04106b
AX
565
566# Sed expression to map a string onto a valid CPP name.
567as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
568
569# Sed expression to map a string onto a valid variable name.
570as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
571
3d248aec
AX
572
573
574
575# Check that we are running under the correct shell.
ea04106b
AX
576SHELL=${CONFIG_SHELL-/bin/sh}
577
3d248aec
AX
578case X$lt_ECHO in
579X*--fallback-echo)
580 # Remove one level of quotation (which was required for Make).
581 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
582 ;;
583esac
ea04106b 584
3d248aec
AX
585ECHO=${lt_ECHO-echo}
586if test "X$1" = X--no-reexec; then
587 # Discard the --no-reexec flag, and continue.
588 shift
589elif test "X$1" = X--fallback-echo; then
590 # Avoid inline document here, it may be left over
591 :
592elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
593 # Yippee, $ECHO works!
594 :
595else
596 # Restart under the correct shell.
597 exec $SHELL "$0" --no-reexec ${1+"$@"}
598fi
599
600if test "X$1" = X--fallback-echo; then
601 # used as fallback echo
602 shift
603 cat <<_LT_EOF
604$*
605_LT_EOF
606 exit 0
607fi
608
609# The HP-UX ksh and POSIX shell print the target directory to stdout
610# if CDPATH is set.
611(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
612
613if test -z "$lt_ECHO"; then
614 if test "X${echo_test_string+set}" != Xset; then
615 # find a string as large as possible, as long as the shell can cope with it
616 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
617 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
618 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
619 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
620 then
621 break
622 fi
623 done
624 fi
625
626 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
627 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
628 test "X$echo_testing_string" = "X$echo_test_string"; then
629 :
630 else
631 # The Solaris, AIX, and Digital Unix default echo programs unquote
632 # backslashes. This makes it impossible to quote backslashes using
633 # echo "$something" | sed 's/\\/\\\\/g'
634 #
635 # So, first we look for a working echo in the user's PATH.
636
637 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
638 for dir in $PATH /usr/ucb; do
639 IFS="$lt_save_ifs"
640 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
641 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
642 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
643 test "X$echo_testing_string" = "X$echo_test_string"; then
644 ECHO="$dir/echo"
645 break
646 fi
647 done
648 IFS="$lt_save_ifs"
649
650 if test "X$ECHO" = Xecho; then
651 # We didn't find a better echo, so look for alternatives.
652 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
653 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
654 test "X$echo_testing_string" = "X$echo_test_string"; then
655 # This shell has a builtin print -r that does the trick.
656 ECHO='print -r'
657 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
658 test "X$CONFIG_SHELL" != X/bin/ksh; then
659 # If we have ksh, try running configure again with it.
660 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
661 export ORIGINAL_CONFIG_SHELL
662 CONFIG_SHELL=/bin/ksh
663 export CONFIG_SHELL
664 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
665 else
666 # Try using printf.
667 ECHO='printf %s\n'
668 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
669 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
670 test "X$echo_testing_string" = "X$echo_test_string"; then
671 # Cool, printf works
672 :
673 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
674 test "X$echo_testing_string" = 'X\t' &&
675 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
676 test "X$echo_testing_string" = "X$echo_test_string"; then
677 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
678 export CONFIG_SHELL
679 SHELL="$CONFIG_SHELL"
680 export SHELL
681 ECHO="$CONFIG_SHELL $0 --fallback-echo"
682 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
683 test "X$echo_testing_string" = 'X\t' &&
684 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
685 test "X$echo_testing_string" = "X$echo_test_string"; then
686 ECHO="$CONFIG_SHELL $0 --fallback-echo"
687 else
688 # maybe with a smaller string...
689 prev=:
690
691 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
692 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
693 then
694 break
695 fi
696 prev="$cmd"
697 done
698
699 if test "$prev" != 'sed 50q "$0"'; then
700 echo_test_string=`eval $prev`
701 export echo_test_string
702 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
703 else
704 # Oops. We lost completely, so just stick with echo.
705 ECHO=echo
706 fi
707 fi
708 fi
709 fi
710 fi
711fi
712
713# Copy echo and quote the copy suitably for passing to libtool from
714# the Makefile, instead of quoting the original, which is used later.
715lt_ECHO=$ECHO
716if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
717 lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
718fi
719
720
721
722
723exec 7<&0 </dev/null 6>&1
ea04106b
AX
724
725# Name of the host.
3d248aec 726# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
ea04106b
AX
727# so uname gets run too.
728ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
729
730#
731# Initializations.
732#
733ac_default_prefix=/usr/local
734ac_clean_files=
735ac_config_libobj_dir=.
736LIBOBJS=
737cross_compiling=no
738subdirs=
739MFLAGS=
740MAKEFLAGS=
3d248aec 741SHELL=${CONFIG_SHELL-/bin/sh}
ea04106b
AX
742
743# Identity of this package.
744PACKAGE_NAME='zfs'
745PACKAGE_TARNAME='zfs'
3d248aec
AX
746PACKAGE_VERSION='0.6.5.11'
747PACKAGE_STRING='zfs 0.6.5.11'
ea04106b 748PACKAGE_BUGREPORT=''
ea04106b
AX
749
750# Factoring default headers for most tests.
751ac_includes_default="\
752#include <stdio.h>
753#ifdef HAVE_SYS_TYPES_H
754# include <sys/types.h>
755#endif
756#ifdef HAVE_SYS_STAT_H
757# include <sys/stat.h>
758#endif
759#ifdef STDC_HEADERS
760# include <stdlib.h>
761# include <stddef.h>
762#else
763# ifdef HAVE_STDLIB_H
764# include <stdlib.h>
765# endif
766#endif
767#ifdef HAVE_STRING_H
768# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
769# include <memory.h>
770# endif
771# include <string.h>
772#endif
773#ifdef HAVE_STRINGS_H
774# include <strings.h>
775#endif
776#ifdef HAVE_INTTYPES_H
777# include <inttypes.h>
778#endif
779#ifdef HAVE_STDINT_H
780# include <stdint.h>
781#endif
782#ifdef HAVE_UNISTD_H
783# include <unistd.h>
784#endif"
785
786ac_subst_vars='am__EXEEXT_FALSE
787am__EXEEXT_TRUE
788LTLIBOBJS
789LIBOBJS
790DEBUG_DMU_TX
791DEBUG_ZFS
792DEBUG_STACKFLAGS
793DEBUG_CFLAGS
794CONFIG_KERNEL_FALSE
795CONFIG_KERNEL_TRUE
796CONFIG_USER_FALSE
797CONFIG_USER_TRUE
3d248aec
AX
798NO_FORMAT_TRUNCATION
799runstatedir
ea04106b
AX
800FRAME_LARGER_THAN
801LIBBLKID
802LIBUUID
803ZLIB
804dracutdir
805ZFS_INIT_SYSV
806modulesloaddir
807systemdpresetdir
808systemdunitdir
809ZFS_MODULE_LOAD
810ZFS_INIT_SYSTEMD
811udevruledir
812udevdir
813mounthelperdir
814KERNELCPPFLAGS
815KERNELMAKE_PARAMS
816SPL_SYMBOLS
817SPL_VERSION
818SPL_OBJ
819SPL
820LINUX_SYMBOLS
821LINUX_VERSION
822LINUX_OBJ
823LINUX
e10b0808 824NO_BOOL_COMPARE
ea04106b
AX
825NO_UNUSED_BUT_SET_VARIABLE
826ZFS_CONFIG
827TARGET_ASM_DIR
828ALIEN_VERSION
829ALIEN
830HAVE_ALIEN
831DPKGBUILD_VERSION
832DPKGBUILD
833HAVE_DPKGBUILD
834DPKG_VERSION
835DPKG
836HAVE_DPKG
837SRPM_DEFINE_COMMON
838SRPM_DEFINE_DKMS
839SRPM_DEFINE_KMOD
840SRPM_DEFINE_UTIL
841RPM_DEFINE_COMMON
842RPM_DEFINE_DKMS
843RPM_DEFINE_KMOD
844RPM_DEFINE_UTIL
845RPM_SPEC_DIR
846RPMBUILD_VERSION
847RPMBUILD
848HAVE_RPMBUILD
849RPM_VERSION
850RPM
851HAVE_RPM
e10b0808
AX
852DEFINE_INITRAMFS
853DEFAULT_INITCONF_DIR
ea04106b
AX
854DEFAULT_INIT_SCRIPT
855DEFAULT_INIT_DIR
856DEFAULT_PACKAGE
857VENDOR
858am__fastdepCCAS_FALSE
859am__fastdepCCAS_TRUE
860CCASDEPMODE
861CCASFLAGS
862CCAS
863CPP
864OTOOL64
865OTOOL
866LIPO
867NMEDIT
868DSYMUTIL
3d248aec 869lt_ECHO
ea04106b 870RANLIB
ea04106b 871AR
ea04106b
AX
872OBJDUMP
873LN_S
874NM
875ac_ct_DUMPBIN
876DUMPBIN
877LD
878FGREP
879EGREP
880GREP
881SED
882LIBTOOL
883am__fastdepCC_FALSE
884am__fastdepCC_TRUE
885CCDEPMODE
ea04106b
AX
886AMDEPBACKSLASH
887AMDEP_FALSE
888AMDEP_TRUE
889am__quote
890am__include
891DEPDIR
892OBJEXT
893EXEEXT
894ac_ct_CC
895CPPFLAGS
896LDFLAGS
897CFLAGS
898CC
899am__untar
900am__tar
901AMTAR
902am__leading_dot
903SET_MAKE
904mkdir_p
905MKDIR_P
906INSTALL_STRIP_PROGRAM
907STRIP
908install_sh
909MAKEINFO
910AUTOHEADER
911AUTOMAKE
912AUTOCONF
913ACLOCAL
914VERSION
915PACKAGE
916CYGPATH_W
917am__isrc
918INSTALL_DATA
919INSTALL_SCRIPT
920INSTALL_PROGRAM
921AM_BACKSLASH
922AM_DEFAULT_VERBOSITY
ea04106b
AX
923MAINT
924MAINTAINER_MODE_FALSE
925MAINTAINER_MODE_TRUE
926target_os
927target_vendor
928target_cpu
929target
930host_os
931host_vendor
932host_cpu
933host
934build_os
935build_vendor
936build_cpu
937build
938ZFS_META_LT_AGE
939ZFS_META_LT_REVISION
940ZFS_META_LT_CURRENT
941ZFS_META_AUTHOR
942ZFS_META_DATA
943ZFS_META_ALIAS
944ZFS_META_LICENSE
945RELEASE
946ZFS_META_RELEASE
947ZFS_META_VERSION
948ZFS_META_NAME
949AWK
950target_alias
951host_alias
952build_alias
953LIBS
954ECHO_T
955ECHO_N
956ECHO_C
957DEFS
958mandir
959localedir
960libdir
961psdir
962pdfdir
963dvidir
964htmldir
965infodir
966docdir
967oldincludedir
968includedir
969localstatedir
970sharedstatedir
971sysconfdir
972datadir
973datarootdir
974libexecdir
975sbindir
976bindir
977program_transform_name
978prefix
979exec_prefix
ea04106b
AX
980PACKAGE_BUGREPORT
981PACKAGE_STRING
982PACKAGE_VERSION
983PACKAGE_TARNAME
984PACKAGE_NAME
985PATH_SEPARATOR
986SHELL'
987ac_subst_files=''
988ac_user_opts='
989enable_option_checking
990enable_maintainer_mode
991enable_silent_rules
992enable_dependency_tracking
993enable_shared
994enable_static
995with_pic
996enable_fast_install
997with_gnu_ld
ea04106b
AX
998enable_libtool_lock
999with_spec
1000with_config
1001enable_linux_builtin
1002with_linux
1003with_linux_obj
1004with_spl
1005with_spl_obj
1006with_spl_timeout
1007with_mounthelperdir
1008with_udevdir
1009with_udevruledir
1010enable_systemd
1011with_systemdunitdir
1012with_systemdpresetdir
1013with_systemdmodulesloaddir
1014enable_sysvinit
1015with_dracutdir
1016with_blkid
1017enable_debug
1018enable_debug_dmu_tx
1019'
1020 ac_precious_vars='build_alias
1021host_alias
1022target_alias
1023CC
1024CFLAGS
1025LDFLAGS
1026LIBS
1027CPPFLAGS
1028CPP
1029CCAS
1030CCASFLAGS'
1031
1032
1033# Initialize some variables set by options.
1034ac_init_help=
1035ac_init_version=false
1036ac_unrecognized_opts=
1037ac_unrecognized_sep=
1038# The variables have the same names as the options, with
1039# dashes changed to underlines.
1040cache_file=/dev/null
1041exec_prefix=NONE
1042no_create=
1043no_recursion=
1044prefix=NONE
1045program_prefix=NONE
1046program_suffix=NONE
1047program_transform_name=s,x,x,
1048silent=
1049site=
1050srcdir=
1051verbose=
1052x_includes=NONE
1053x_libraries=NONE
1054
1055# Installation directory options.
1056# These are left unexpanded so users can "make install exec_prefix=/foo"
1057# and all the variables that are supposed to be based on exec_prefix
1058# by default will actually change.
1059# Use braces instead of parens because sh, perl, etc. also accept them.
1060# (The list follows the same order as the GNU Coding Standards.)
1061bindir='${exec_prefix}/bin'
1062sbindir='${exec_prefix}/sbin'
1063libexecdir='${exec_prefix}/libexec'
1064datarootdir='${prefix}/share'
1065datadir='${datarootdir}'
1066sysconfdir='${prefix}/etc'
1067sharedstatedir='${prefix}/com'
1068localstatedir='${prefix}/var'
1069includedir='${prefix}/include'
1070oldincludedir='/usr/include'
1071docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1072infodir='${datarootdir}/info'
1073htmldir='${docdir}'
1074dvidir='${docdir}'
1075pdfdir='${docdir}'
1076psdir='${docdir}'
1077libdir='${exec_prefix}/lib'
1078localedir='${datarootdir}/locale'
1079mandir='${datarootdir}/man'
1080
1081ac_prev=
1082ac_dashdash=
1083for ac_option
1084do
1085 # If the previous option needs an argument, assign it.
1086 if test -n "$ac_prev"; then
1087 eval $ac_prev=\$ac_option
1088 ac_prev=
1089 continue
1090 fi
1091
1092 case $ac_option in
3d248aec
AX
1093 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1094 *) ac_optarg=yes ;;
ea04106b
AX
1095 esac
1096
1097 # Accept the important Cygnus configure options, so we can diagnose typos.
1098
1099 case $ac_dashdash$ac_option in
1100 --)
1101 ac_dashdash=yes ;;
1102
1103 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1104 ac_prev=bindir ;;
1105 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1106 bindir=$ac_optarg ;;
1107
1108 -build | --build | --buil | --bui | --bu)
1109 ac_prev=build_alias ;;
1110 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1111 build_alias=$ac_optarg ;;
1112
1113 -cache-file | --cache-file | --cache-fil | --cache-fi \
1114 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1115 ac_prev=cache_file ;;
1116 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1117 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1118 cache_file=$ac_optarg ;;
1119
1120 --config-cache | -C)
1121 cache_file=config.cache ;;
1122
1123 -datadir | --datadir | --datadi | --datad)
1124 ac_prev=datadir ;;
1125 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1126 datadir=$ac_optarg ;;
1127
1128 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1129 | --dataroo | --dataro | --datar)
1130 ac_prev=datarootdir ;;
1131 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1132 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1133 datarootdir=$ac_optarg ;;
1134
1135 -disable-* | --disable-*)
1136 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1137 # Reject names that are not valid shell variable names.
1138 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
3d248aec
AX
1139 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
1140 { (exit 1); exit 1; }; }
ea04106b
AX
1141 ac_useropt_orig=$ac_useropt
1142 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143 case $ac_user_opts in
1144 *"
1145"enable_$ac_useropt"
1146"*) ;;
1147 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1148 ac_unrecognized_sep=', ';;
1149 esac
1150 eval enable_$ac_useropt=no ;;
1151
1152 -docdir | --docdir | --docdi | --doc | --do)
1153 ac_prev=docdir ;;
1154 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1155 docdir=$ac_optarg ;;
1156
1157 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1158 ac_prev=dvidir ;;
1159 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1160 dvidir=$ac_optarg ;;
1161
1162 -enable-* | --enable-*)
1163 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1164 # Reject names that are not valid shell variable names.
1165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
3d248aec
AX
1166 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
1167 { (exit 1); exit 1; }; }
ea04106b
AX
1168 ac_useropt_orig=$ac_useropt
1169 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1170 case $ac_user_opts in
1171 *"
1172"enable_$ac_useropt"
1173"*) ;;
1174 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1175 ac_unrecognized_sep=', ';;
1176 esac
1177 eval enable_$ac_useropt=\$ac_optarg ;;
1178
1179 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1180 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1181 | --exec | --exe | --ex)
1182 ac_prev=exec_prefix ;;
1183 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1184 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1185 | --exec=* | --exe=* | --ex=*)
1186 exec_prefix=$ac_optarg ;;
1187
1188 -gas | --gas | --ga | --g)
1189 # Obsolete; use --with-gas.
1190 with_gas=yes ;;
1191
1192 -help | --help | --hel | --he | -h)
1193 ac_init_help=long ;;
1194 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1195 ac_init_help=recursive ;;
1196 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1197 ac_init_help=short ;;
1198
1199 -host | --host | --hos | --ho)
1200 ac_prev=host_alias ;;
1201 -host=* | --host=* | --hos=* | --ho=*)
1202 host_alias=$ac_optarg ;;
1203
1204 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1205 ac_prev=htmldir ;;
1206 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1207 | --ht=*)
1208 htmldir=$ac_optarg ;;
1209
1210 -includedir | --includedir | --includedi | --included | --include \
1211 | --includ | --inclu | --incl | --inc)
1212 ac_prev=includedir ;;
1213 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1214 | --includ=* | --inclu=* | --incl=* | --inc=*)
1215 includedir=$ac_optarg ;;
1216
1217 -infodir | --infodir | --infodi | --infod | --info | --inf)
1218 ac_prev=infodir ;;
1219 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1220 infodir=$ac_optarg ;;
1221
1222 -libdir | --libdir | --libdi | --libd)
1223 ac_prev=libdir ;;
1224 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1225 libdir=$ac_optarg ;;
1226
1227 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1228 | --libexe | --libex | --libe)
1229 ac_prev=libexecdir ;;
1230 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1231 | --libexe=* | --libex=* | --libe=*)
1232 libexecdir=$ac_optarg ;;
1233
1234 -localedir | --localedir | --localedi | --localed | --locale)
1235 ac_prev=localedir ;;
1236 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1237 localedir=$ac_optarg ;;
1238
1239 -localstatedir | --localstatedir | --localstatedi | --localstated \
1240 | --localstate | --localstat | --localsta | --localst | --locals)
1241 ac_prev=localstatedir ;;
1242 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1243 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1244 localstatedir=$ac_optarg ;;
1245
1246 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1247 ac_prev=mandir ;;
1248 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1249 mandir=$ac_optarg ;;
1250
1251 -nfp | --nfp | --nf)
1252 # Obsolete; use --without-fp.
1253 with_fp=no ;;
1254
1255 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1256 | --no-cr | --no-c | -n)
1257 no_create=yes ;;
1258
1259 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1260 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1261 no_recursion=yes ;;
1262
1263 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1264 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1265 | --oldin | --oldi | --old | --ol | --o)
1266 ac_prev=oldincludedir ;;
1267 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1268 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1269 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1270 oldincludedir=$ac_optarg ;;
1271
1272 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1273 ac_prev=prefix ;;
1274 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1275 prefix=$ac_optarg ;;
1276
1277 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1278 | --program-pre | --program-pr | --program-p)
1279 ac_prev=program_prefix ;;
1280 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1281 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1282 program_prefix=$ac_optarg ;;
1283
1284 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1285 | --program-suf | --program-su | --program-s)
1286 ac_prev=program_suffix ;;
1287 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1288 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1289 program_suffix=$ac_optarg ;;
1290
1291 -program-transform-name | --program-transform-name \
1292 | --program-transform-nam | --program-transform-na \
1293 | --program-transform-n | --program-transform- \
1294 | --program-transform | --program-transfor \
1295 | --program-transfo | --program-transf \
1296 | --program-trans | --program-tran \
1297 | --progr-tra | --program-tr | --program-t)
1298 ac_prev=program_transform_name ;;
1299 -program-transform-name=* | --program-transform-name=* \
1300 | --program-transform-nam=* | --program-transform-na=* \
1301 | --program-transform-n=* | --program-transform-=* \
1302 | --program-transform=* | --program-transfor=* \
1303 | --program-transfo=* | --program-transf=* \
1304 | --program-trans=* | --program-tran=* \
1305 | --progr-tra=* | --program-tr=* | --program-t=*)
1306 program_transform_name=$ac_optarg ;;
1307
1308 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1309 ac_prev=pdfdir ;;
1310 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1311 pdfdir=$ac_optarg ;;
1312
1313 -psdir | --psdir | --psdi | --psd | --ps)
1314 ac_prev=psdir ;;
1315 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1316 psdir=$ac_optarg ;;
1317
1318 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1319 | -silent | --silent | --silen | --sile | --sil)
1320 silent=yes ;;
1321
1322 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1323 ac_prev=sbindir ;;
1324 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1325 | --sbi=* | --sb=*)
1326 sbindir=$ac_optarg ;;
1327
1328 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1329 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1330 | --sharedst | --shareds | --shared | --share | --shar \
1331 | --sha | --sh)
1332 ac_prev=sharedstatedir ;;
1333 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1334 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1335 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1336 | --sha=* | --sh=*)
1337 sharedstatedir=$ac_optarg ;;
1338
1339 -site | --site | --sit)
1340 ac_prev=site ;;
1341 -site=* | --site=* | --sit=*)
1342 site=$ac_optarg ;;
1343
1344 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1345 ac_prev=srcdir ;;
1346 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1347 srcdir=$ac_optarg ;;
1348
1349 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1350 | --syscon | --sysco | --sysc | --sys | --sy)
1351 ac_prev=sysconfdir ;;
1352 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1353 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1354 sysconfdir=$ac_optarg ;;
1355
1356 -target | --target | --targe | --targ | --tar | --ta | --t)
1357 ac_prev=target_alias ;;
1358 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1359 target_alias=$ac_optarg ;;
1360
1361 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1362 verbose=yes ;;
1363
1364 -version | --version | --versio | --versi | --vers | -V)
1365 ac_init_version=: ;;
1366
1367 -with-* | --with-*)
1368 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1369 # Reject names that are not valid shell variable names.
1370 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
3d248aec
AX
1371 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1372 { (exit 1); exit 1; }; }
ea04106b
AX
1373 ac_useropt_orig=$ac_useropt
1374 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1375 case $ac_user_opts in
1376 *"
1377"with_$ac_useropt"
1378"*) ;;
1379 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1380 ac_unrecognized_sep=', ';;
1381 esac
1382 eval with_$ac_useropt=\$ac_optarg ;;
1383
1384 -without-* | --without-*)
1385 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1386 # Reject names that are not valid shell variable names.
1387 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
3d248aec
AX
1388 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
1389 { (exit 1); exit 1; }; }
ea04106b
AX
1390 ac_useropt_orig=$ac_useropt
1391 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1392 case $ac_user_opts in
1393 *"
1394"with_$ac_useropt"
1395"*) ;;
1396 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1397 ac_unrecognized_sep=', ';;
1398 esac
1399 eval with_$ac_useropt=no ;;
1400
1401 --x)
1402 # Obsolete; use --with-x.
1403 with_x=yes ;;
1404
1405 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1406 | --x-incl | --x-inc | --x-in | --x-i)
1407 ac_prev=x_includes ;;
1408 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1409 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1410 x_includes=$ac_optarg ;;
1411
1412 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1413 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1414 ac_prev=x_libraries ;;
1415 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1416 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1417 x_libraries=$ac_optarg ;;
1418
3d248aec
AX
1419 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
1420Try \`$0 --help' for more information." >&2
1421 { (exit 1); exit 1; }; }
ea04106b
AX
1422 ;;
1423
1424 *=*)
1425 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1426 # Reject names that are not valid shell variable names.
3d248aec
AX
1427 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1428 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1429 { (exit 1); exit 1; }; }
ea04106b
AX
1430 eval $ac_envvar=\$ac_optarg
1431 export $ac_envvar ;;
1432
1433 *)
1434 # FIXME: should be removed in autoconf 3.0.
1435 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1436 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1437 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
3d248aec 1438 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ea04106b
AX
1439 ;;
1440
1441 esac
1442done
1443
1444if test -n "$ac_prev"; then
1445 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
3d248aec
AX
1446 { $as_echo "$as_me: error: missing argument to $ac_option" >&2
1447 { (exit 1); exit 1; }; }
ea04106b
AX
1448fi
1449
1450if test -n "$ac_unrecognized_opts"; then
1451 case $enable_option_checking in
1452 no) ;;
3d248aec
AX
1453 fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1454 { (exit 1); exit 1; }; } ;;
ea04106b
AX
1455 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1456 esac
1457fi
1458
1459# Check all directory arguments for consistency.
1460for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1461 datadir sysconfdir sharedstatedir localstatedir includedir \
1462 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
3d248aec 1463 libdir localedir mandir
ea04106b
AX
1464do
1465 eval ac_val=\$$ac_var
1466 # Remove trailing slashes.
1467 case $ac_val in
1468 */ )
1469 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1470 eval $ac_var=\$ac_val;;
1471 esac
1472 # Be sure to have absolute directory names.
1473 case $ac_val in
1474 [\\/$]* | ?:[\\/]* ) continue;;
1475 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1476 esac
3d248aec
AX
1477 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1478 { (exit 1); exit 1; }; }
ea04106b
AX
1479done
1480
1481# There might be people who depend on the old broken behavior: `$host'
1482# used to hold the argument of --host etc.
1483# FIXME: To remove some day.
1484build=$build_alias
1485host=$host_alias
1486target=$target_alias
1487
1488# FIXME: To remove some day.
1489if test "x$host_alias" != x; then
1490 if test "x$build_alias" = x; then
1491 cross_compiling=maybe
3d248aec
AX
1492 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1493 If a cross compiler is detected then cross compile mode will be used." >&2
ea04106b
AX
1494 elif test "x$build_alias" != "x$host_alias"; then
1495 cross_compiling=yes
1496 fi
1497fi
1498
1499ac_tool_prefix=
1500test -n "$host_alias" && ac_tool_prefix=$host_alias-
1501
1502test "$silent" = yes && exec 6>/dev/null
1503
1504
1505ac_pwd=`pwd` && test -n "$ac_pwd" &&
1506ac_ls_di=`ls -di .` &&
1507ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
3d248aec
AX
1508 { $as_echo "$as_me: error: working directory cannot be determined" >&2
1509 { (exit 1); exit 1; }; }
ea04106b 1510test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
3d248aec
AX
1511 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
1512 { (exit 1); exit 1; }; }
ea04106b
AX
1513
1514
1515# Find the source files, if location was not specified.
1516if test -z "$srcdir"; then
1517 ac_srcdir_defaulted=yes
1518 # Try the directory containing this script, then the parent directory.
1519 ac_confdir=`$as_dirname -- "$as_myself" ||
1520$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1521 X"$as_myself" : 'X\(//\)[^/]' \| \
1522 X"$as_myself" : 'X\(//\)$' \| \
1523 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1524$as_echo X"$as_myself" |
1525 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1526 s//\1/
1527 q
1528 }
1529 /^X\(\/\/\)[^/].*/{
1530 s//\1/
1531 q
1532 }
1533 /^X\(\/\/\)$/{
1534 s//\1/
1535 q
1536 }
1537 /^X\(\/\).*/{
1538 s//\1/
1539 q
1540 }
1541 s/.*/./; q'`
1542 srcdir=$ac_confdir
1543 if test ! -r "$srcdir/$ac_unique_file"; then
1544 srcdir=..
1545 fi
1546else
1547 ac_srcdir_defaulted=no
1548fi
1549if test ! -r "$srcdir/$ac_unique_file"; then
1550 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
3d248aec
AX
1551 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1552 { (exit 1); exit 1; }; }
ea04106b
AX
1553fi
1554ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1555ac_abs_confdir=`(
3d248aec
AX
1556 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
1557 { (exit 1); exit 1; }; }
ea04106b
AX
1558 pwd)`
1559# When building in place, set srcdir=.
1560if test "$ac_abs_confdir" = "$ac_pwd"; then
1561 srcdir=.
1562fi
1563# Remove unnecessary trailing slashes from srcdir.
1564# Double slashes in file names in object file debugging info
1565# mess up M-x gdb in Emacs.
1566case $srcdir in
1567*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1568esac
1569for ac_var in $ac_precious_vars; do
1570 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1571 eval ac_env_${ac_var}_value=\$${ac_var}
1572 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1573 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1574done
1575
1576#
1577# Report the --help message.
1578#
1579if test "$ac_init_help" = "long"; then
1580 # Omit some internal or obsolete options to make the list less imposing.
1581 # This message is too long to be a string in the A/UX 3.1 sh.
1582 cat <<_ACEOF
3d248aec 1583\`configure' configures zfs 0.6.5.11 to adapt to many kinds of systems.
ea04106b
AX
1584
1585Usage: $0 [OPTION]... [VAR=VALUE]...
1586
1587To assign environment variables (e.g., CC, CFLAGS...), specify them as
1588VAR=VALUE. See below for descriptions of some of the useful variables.
1589
1590Defaults for the options are specified in brackets.
1591
1592Configuration:
1593 -h, --help display this help and exit
1594 --help=short display options specific to this package
1595 --help=recursive display the short help of all the included packages
1596 -V, --version display version information and exit
3d248aec 1597 -q, --quiet, --silent do not print \`checking...' messages
ea04106b
AX
1598 --cache-file=FILE cache test results in FILE [disabled]
1599 -C, --config-cache alias for \`--cache-file=config.cache'
1600 -n, --no-create do not create output files
1601 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1602
1603Installation directories:
1604 --prefix=PREFIX install architecture-independent files in PREFIX
1605 [$ac_default_prefix]
1606 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1607 [PREFIX]
1608
1609By default, \`make install' will install all the files in
1610\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1611an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1612for instance \`--prefix=\$HOME'.
1613
1614For better control, use the options below.
1615
1616Fine tuning of the installation directories:
1617 --bindir=DIR user executables [EPREFIX/bin]
1618 --sbindir=DIR system admin executables [EPREFIX/sbin]
1619 --libexecdir=DIR program executables [EPREFIX/libexec]
1620 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1621 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1622 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1623 --libdir=DIR object code libraries [EPREFIX/lib]
1624 --includedir=DIR C header files [PREFIX/include]
1625 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1626 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1627 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1628 --infodir=DIR info documentation [DATAROOTDIR/info]
1629 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1630 --mandir=DIR man documentation [DATAROOTDIR/man]
1631 --docdir=DIR documentation root [DATAROOTDIR/doc/zfs]
1632 --htmldir=DIR html documentation [DOCDIR]
1633 --dvidir=DIR dvi documentation [DOCDIR]
1634 --pdfdir=DIR pdf documentation [DOCDIR]
1635 --psdir=DIR ps documentation [DOCDIR]
1636_ACEOF
1637
1638 cat <<\_ACEOF
1639
1640Program names:
1641 --program-prefix=PREFIX prepend PREFIX to installed program names
1642 --program-suffix=SUFFIX append SUFFIX to installed program names
1643 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1644
1645System types:
1646 --build=BUILD configure for building on BUILD [guessed]
1647 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1648 --target=TARGET configure for building compilers for TARGET [HOST]
1649_ACEOF
1650fi
1651
1652if test -n "$ac_init_help"; then
1653 case $ac_init_help in
3d248aec 1654 short | recursive ) echo "Configuration of zfs 0.6.5.11:";;
ea04106b
AX
1655 esac
1656 cat <<\_ACEOF
1657
1658Optional Features:
1659 --disable-option-checking ignore unrecognized --enable/--with options
1660 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1661 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
3d248aec
AX
1662 --enable-maintainer-mode enable make rules and dependencies not useful
1663 (and sometimes confusing) to the casual installer
1664 --enable-silent-rules less verbose build output (undo: `make V=1')
1665 --disable-silent-rules verbose build output (undo: `make V=0')
1666 --disable-dependency-tracking speeds up one-time build
1667 --enable-dependency-tracking do not reject slow dependency extractors
ea04106b
AX
1668 --enable-shared[=PKGS] build shared libraries [default=yes]
1669 --enable-static[=PKGS] build static libraries [default=yes]
1670 --enable-fast-install[=PKGS]
1671 optimize for fast installation [default=yes]
1672 --disable-libtool-lock avoid locking (might break parallel builds)
1673 --enable-linux-builtin Configure for builtin in-tree kernel modules
1674 [default=no]
3d248aec
AX
1675 --enable-systemd install systemd unit/preset files
1676 [default:], [yes]
1677 --enable-sysvinit install SysV init scripts default:, yes
ea04106b
AX
1678 --enable-debug Enable generic debug support [default=no]
1679 --enable-debug-dmu-tx Enable dmu tx validation [default=no]
1680
1681Optional Packages:
1682 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1683 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
3d248aec 1684 --with-pic try to use only PIC/non-PIC objects [default=use
ea04106b
AX
1685 both]
1686 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
ea04106b
AX
1687 --with-spec=SPEC Spec files 'generic|redhat'
1688 --with-config=CONFIG Config file 'kernel|user|all|srpm'
1689 --with-linux=PATH Path to kernel source
1690 --with-linux-obj=PATH Path to kernel build objects
1691 --with-spl=PATH Path to spl source
1692 --with-spl-obj=PATH Path to spl build objects
1693 --with-spl-timeout=SECS Wait SECS for SPL header and symver file [default=0]
1694 --with-mounthelperdir=DIR
3d248aec 1695 install mount.zfs in dir [/sbin]
ea04106b 1696 --with-udevdir=DIR install udev helpers [default=check]
3d248aec 1697 --with-udevruledir=DIR install udev rules [UDEVDIR/rules.d]
ea04106b
AX
1698 --with-systemdunitdir=DIR
1699 install systemd unit files in dir
3d248aec 1700 [/usr/lib/systemd/system]
ea04106b
AX
1701 --with-systemdpresetdir=DIR
1702 install systemd preset files in dir
3d248aec 1703 [/usr/lib/systemd/system-preset]
ea04106b
AX
1704 --with-systemdmodulesloaddir=DIR
1705 install systemd module load files into dir
3d248aec 1706 [/usr/lib/modules-load.d]
ea04106b
AX
1707 --with-dracutdir=DIR install dracut helpers [default=check]
1708 --with-blkid support blkid caching [default=check]
1709
1710Some influential environment variables:
1711 CC C compiler command
1712 CFLAGS C compiler flags
1713 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1714 nonstandard directory <lib dir>
1715 LIBS libraries to pass to the linker, e.g. -l<library>
3d248aec 1716 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
ea04106b
AX
1717 you have headers in a nonstandard directory <include dir>
1718 CPP C preprocessor
1719 CCAS assembler compiler command (defaults to CC)
1720 CCASFLAGS assembler compiler flags (defaults to CFLAGS)
1721
1722Use these variables to override the choices made by `configure' or to help
1723it to find libraries and programs with nonstandard names/locations.
1724
ea04106b
AX
1725_ACEOF
1726ac_status=$?
1727fi
1728
1729if test "$ac_init_help" = "recursive"; then
1730 # If there are subdirs, report their specific --help.
1731 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1732 test -d "$ac_dir" ||
1733 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1734 continue
1735 ac_builddir=.
1736
1737case "$ac_dir" in
1738.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1739*)
1740 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1741 # A ".." for each directory in $ac_dir_suffix.
1742 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1743 case $ac_top_builddir_sub in
1744 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1745 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1746 esac ;;
1747esac
1748ac_abs_top_builddir=$ac_pwd
1749ac_abs_builddir=$ac_pwd$ac_dir_suffix
1750# for backward compatibility:
1751ac_top_builddir=$ac_top_build_prefix
1752
1753case $srcdir in
1754 .) # We are building in place.
1755 ac_srcdir=.
1756 ac_top_srcdir=$ac_top_builddir_sub
1757 ac_abs_top_srcdir=$ac_pwd ;;
1758 [\\/]* | ?:[\\/]* ) # Absolute name.
1759 ac_srcdir=$srcdir$ac_dir_suffix;
1760 ac_top_srcdir=$srcdir
1761 ac_abs_top_srcdir=$srcdir ;;
1762 *) # Relative name.
1763 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1764 ac_top_srcdir=$ac_top_build_prefix$srcdir
1765 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1766esac
1767ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1768
1769 cd "$ac_dir" || { ac_status=$?; continue; }
1770 # Check for guested configure.
1771 if test -f "$ac_srcdir/configure.gnu"; then
1772 echo &&
1773 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1774 elif test -f "$ac_srcdir/configure"; then
1775 echo &&
1776 $SHELL "$ac_srcdir/configure" --help=recursive
1777 else
1778 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1779 fi || ac_status=$?
1780 cd "$ac_pwd" || { ac_status=$?; break; }
1781 done
1782fi
1783
1784test -n "$ac_init_help" && exit $ac_status
1785if $ac_init_version; then
1786 cat <<\_ACEOF
3d248aec
AX
1787zfs configure 0.6.5.11
1788generated by GNU Autoconf 2.63
ea04106b 1789
3d248aec
AX
1790Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
17912002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
ea04106b
AX
1792This configure script is free software; the Free Software Foundation
1793gives unlimited permission to copy, distribute and modify it.
1794_ACEOF
1795 exit
1796fi
ea04106b
AX
1797cat >config.log <<_ACEOF
1798This file contains any messages produced by compilers while
1799running configure, to aid debugging if configure makes a mistake.
1800
3d248aec
AX
1801It was created by zfs $as_me 0.6.5.11, which was
1802generated by GNU Autoconf 2.63. Invocation command line was
ea04106b
AX
1803
1804 $ $0 $@
1805
1806_ACEOF
1807exec 5>>config.log
1808{
1809cat <<_ASUNAME
1810## --------- ##
1811## Platform. ##
1812## --------- ##
1813
1814hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1815uname -m = `(uname -m) 2>/dev/null || echo unknown`
1816uname -r = `(uname -r) 2>/dev/null || echo unknown`
1817uname -s = `(uname -s) 2>/dev/null || echo unknown`
1818uname -v = `(uname -v) 2>/dev/null || echo unknown`
1819
1820/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1821/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1822
1823/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1824/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1825/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1826/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1827/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1828/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1829/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1830
1831_ASUNAME
1832
1833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1834for as_dir in $PATH
1835do
1836 IFS=$as_save_IFS
1837 test -z "$as_dir" && as_dir=.
3d248aec
AX
1838 $as_echo "PATH: $as_dir"
1839done
ea04106b
AX
1840IFS=$as_save_IFS
1841
1842} >&5
1843
1844cat >&5 <<_ACEOF
1845
1846
1847## ----------- ##
1848## Core tests. ##
1849## ----------- ##
1850
1851_ACEOF
1852
1853
1854# Keep a trace of the command line.
1855# Strip out --no-create and --no-recursion so they do not pile up.
1856# Strip out --silent because we don't want to record it for future runs.
1857# Also quote any args containing shell meta-characters.
1858# Make two passes to allow for proper duplicate-argument suppression.
1859ac_configure_args=
1860ac_configure_args0=
1861ac_configure_args1=
1862ac_must_keep_next=false
1863for ac_pass in 1 2
1864do
1865 for ac_arg
1866 do
1867 case $ac_arg in
1868 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1869 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1870 | -silent | --silent | --silen | --sile | --sil)
1871 continue ;;
1872 *\'*)
1873 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1874 esac
1875 case $ac_pass in
3d248aec 1876 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
ea04106b 1877 2)
3d248aec 1878 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
ea04106b
AX
1879 if test $ac_must_keep_next = true; then
1880 ac_must_keep_next=false # Got value, back to normal.
1881 else
1882 case $ac_arg in
1883 *=* | --config-cache | -C | -disable-* | --disable-* \
1884 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1885 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1886 | -with-* | --with-* | -without-* | --without-* | --x)
1887 case "$ac_configure_args0 " in
1888 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1889 esac
1890 ;;
1891 -* ) ac_must_keep_next=true ;;
1892 esac
1893 fi
3d248aec 1894 ac_configure_args="$ac_configure_args '$ac_arg'"
ea04106b
AX
1895 ;;
1896 esac
1897 done
1898done
3d248aec
AX
1899$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1900$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
ea04106b
AX
1901
1902# When interrupted or exit'd, cleanup temporary files, and complete
1903# config.log. We remove comments because anyway the quotes in there
1904# would cause problems or look ugly.
1905# WARNING: Use '\'' to represent an apostrophe within the trap.
1906# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1907trap 'exit_status=$?
1908 # Save into config.log some information that might help in debugging.
1909 {
1910 echo
1911
3d248aec
AX
1912 cat <<\_ASBOX
1913## ---------------- ##
ea04106b 1914## Cache variables. ##
3d248aec
AX
1915## ---------------- ##
1916_ASBOX
ea04106b
AX
1917 echo
1918 # The following way of writing the cache mishandles newlines in values,
1919(
1920 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1921 eval ac_val=\$$ac_var
1922 case $ac_val in #(
1923 *${as_nl}*)
1924 case $ac_var in #(
3d248aec 1925 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
ea04106b
AX
1926$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1927 esac
1928 case $ac_var in #(
1929 _ | IFS | as_nl) ;; #(
1930 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3d248aec 1931 *) $as_unset $ac_var ;;
ea04106b
AX
1932 esac ;;
1933 esac
1934 done
1935 (set) 2>&1 |
1936 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1937 *${as_nl}ac_space=\ *)
1938 sed -n \
1939 "s/'\''/'\''\\\\'\'''\''/g;
1940 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1941 ;; #(
1942 *)
1943 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1944 ;;
1945 esac |
1946 sort
1947)
1948 echo
1949
3d248aec
AX
1950 cat <<\_ASBOX
1951## ----------------- ##
ea04106b 1952## Output variables. ##
3d248aec
AX
1953## ----------------- ##
1954_ASBOX
ea04106b
AX
1955 echo
1956 for ac_var in $ac_subst_vars
1957 do
1958 eval ac_val=\$$ac_var
1959 case $ac_val in
1960 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1961 esac
1962 $as_echo "$ac_var='\''$ac_val'\''"
1963 done | sort
1964 echo
1965
1966 if test -n "$ac_subst_files"; then
3d248aec
AX
1967 cat <<\_ASBOX
1968## ------------------- ##
ea04106b 1969## File substitutions. ##
3d248aec
AX
1970## ------------------- ##
1971_ASBOX
ea04106b
AX
1972 echo
1973 for ac_var in $ac_subst_files
1974 do
1975 eval ac_val=\$$ac_var
1976 case $ac_val in
1977 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1978 esac
1979 $as_echo "$ac_var='\''$ac_val'\''"
1980 done | sort
1981 echo
1982 fi
1983
1984 if test -s confdefs.h; then
3d248aec
AX
1985 cat <<\_ASBOX
1986## ----------- ##
ea04106b 1987## confdefs.h. ##
3d248aec
AX
1988## ----------- ##
1989_ASBOX
ea04106b
AX
1990 echo
1991 cat confdefs.h
1992 echo
1993 fi
1994 test "$ac_signal" != 0 &&
1995 $as_echo "$as_me: caught signal $ac_signal"
1996 $as_echo "$as_me: exit $exit_status"
1997 } >&5
1998 rm -f core *.core core.conftest.* &&
1999 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2000 exit $exit_status
2001' 0
2002for ac_signal in 1 2 13 15; do
3d248aec 2003 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
ea04106b
AX
2004done
2005ac_signal=0
2006
2007# confdefs.h avoids OS command line length limits that DEFS can exceed.
2008rm -f -r conftest* confdefs.h
2009
ea04106b
AX
2010# Predefined preprocessor variables.
2011
2012cat >>confdefs.h <<_ACEOF
2013#define PACKAGE_NAME "$PACKAGE_NAME"
2014_ACEOF
2015
3d248aec 2016
ea04106b
AX
2017cat >>confdefs.h <<_ACEOF
2018#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2019_ACEOF
2020
3d248aec 2021
ea04106b
AX
2022cat >>confdefs.h <<_ACEOF
2023#define PACKAGE_VERSION "$PACKAGE_VERSION"
2024_ACEOF
2025
3d248aec 2026
ea04106b
AX
2027cat >>confdefs.h <<_ACEOF
2028#define PACKAGE_STRING "$PACKAGE_STRING"
2029_ACEOF
2030
ea04106b
AX
2031
2032cat >>confdefs.h <<_ACEOF
3d248aec 2033#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
ea04106b
AX
2034_ACEOF
2035
2036
2037# Let the site file select an alternate cache file if it wants to.
2038# Prefer an explicitly selected file to automatically selected ones.
2039ac_site_file1=NONE
2040ac_site_file2=NONE
2041if test -n "$CONFIG_SITE"; then
3d248aec 2042 ac_site_file1=$CONFIG_SITE
ea04106b
AX
2043elif test "x$prefix" != xNONE; then
2044 ac_site_file1=$prefix/share/config.site
2045 ac_site_file2=$prefix/etc/config.site
2046else
2047 ac_site_file1=$ac_default_prefix/share/config.site
2048 ac_site_file2=$ac_default_prefix/etc/config.site
2049fi
2050for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2051do
2052 test "x$ac_site_file" = xNONE && continue
3d248aec
AX
2053 if test -r "$ac_site_file"; then
2054 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
ea04106b
AX
2055$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2056 sed 's/^/| /' "$ac_site_file" >&5
3d248aec 2057 . "$ac_site_file"
ea04106b
AX
2058 fi
2059done
2060
2061if test -r "$cache_file"; then
3d248aec
AX
2062 # Some versions of bash will fail to source /dev/null (special
2063 # files actually), so we avoid doing that.
2064 if test -f "$cache_file"; then
2065 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
ea04106b
AX
2066$as_echo "$as_me: loading cache $cache_file" >&6;}
2067 case $cache_file in
2068 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2069 *) . "./$cache_file";;
2070 esac
2071 fi
2072else
3d248aec 2073 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
ea04106b
AX
2074$as_echo "$as_me: creating cache $cache_file" >&6;}
2075 >$cache_file
2076fi
2077
2078# Check that the precious variables saved in the cache have kept the same
2079# value.
2080ac_cache_corrupted=false
2081for ac_var in $ac_precious_vars; do
2082 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2083 eval ac_new_set=\$ac_env_${ac_var}_set
2084 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2085 eval ac_new_val=\$ac_env_${ac_var}_value
2086 case $ac_old_set,$ac_new_set in
2087 set,)
3d248aec 2088 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
ea04106b
AX
2089$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2090 ac_cache_corrupted=: ;;
2091 ,set)
3d248aec 2092 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
ea04106b
AX
2093$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2094 ac_cache_corrupted=: ;;
2095 ,);;
2096 *)
2097 if test "x$ac_old_val" != "x$ac_new_val"; then
2098 # differences in whitespace do not lead to failure.
2099 ac_old_val_w=`echo x $ac_old_val`
2100 ac_new_val_w=`echo x $ac_new_val`
2101 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3d248aec 2102 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
ea04106b
AX
2103$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2104 ac_cache_corrupted=:
2105 else
3d248aec 2106 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
ea04106b
AX
2107$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2108 eval $ac_var=\$ac_old_val
2109 fi
3d248aec 2110 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
ea04106b 2111$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3d248aec 2112 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
ea04106b
AX
2113$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2114 fi;;
2115 esac
2116 # Pass precious variables to config.status.
2117 if test "$ac_new_set" = set; then
2118 case $ac_new_val in
2119 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2120 *) ac_arg=$ac_var=$ac_new_val ;;
2121 esac
2122 case " $ac_configure_args " in
2123 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3d248aec 2124 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
ea04106b
AX
2125 esac
2126 fi
2127done
2128if $ac_cache_corrupted; then
3d248aec 2129 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 2130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec 2131 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
ea04106b 2132$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3d248aec
AX
2133 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
2134$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
2135 { (exit 1); exit 1; }; }
ea04106b 2136fi
3d248aec
AX
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
ea04106b
AX
2161
2162ac_ext=c
2163ac_cpp='$CPP $CPPFLAGS'
2164ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2165ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2166ac_compiler_gnu=$ac_cv_c_compiler_gnu
2167
2168
2169ac_ext=c
2170ac_cpp='$CPP $CPPFLAGS'
2171ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2172ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2173ac_compiler_gnu=$ac_cv_c_compiler_gnu
2174
2175
2176
2177
2178
3d248aec 2179
ea04106b
AX
2180 for ac_prog in gawk mawk nawk awk
2181do
2182 # Extract the first word of "$ac_prog", so it can be a program name with args.
2183set dummy $ac_prog; ac_word=$2
3d248aec 2184{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 2185$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 2186if test "${ac_cv_prog_AWK+set}" = set; then
ea04106b
AX
2187 $as_echo_n "(cached) " >&6
2188else
2189 if test -n "$AWK"; then
2190 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2191else
2192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2193for as_dir in $PATH
2194do
2195 IFS=$as_save_IFS
2196 test -z "$as_dir" && as_dir=.
3d248aec
AX
2197 for ac_exec_ext in '' $ac_executable_extensions; do
2198 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 2199 ac_cv_prog_AWK="$ac_prog"
3d248aec 2200 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
2201 break 2
2202 fi
2203done
3d248aec 2204done
ea04106b
AX
2205IFS=$as_save_IFS
2206
2207fi
2208fi
2209AWK=$ac_cv_prog_AWK
2210if test -n "$AWK"; then
3d248aec 2211 { $as_echo "$as_me:$LINENO: result: $AWK" >&5
ea04106b
AX
2212$as_echo "$AWK" >&6; }
2213else
3d248aec 2214 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
2215$as_echo "no" >&6; }
2216fi
2217
2218
2219 test -n "$AWK" && break
2220done
2221
3d248aec 2222 { $as_echo "$as_me:$LINENO: checking metadata" >&5
ea04106b
AX
2223$as_echo_n "checking metadata... " >&6; }
2224
2225 META="$srcdir/META"
2226 _zfs_ac_meta_type="none"
2227 if test -f "$META"; then
2228 _zfs_ac_meta_type="META file"
2229
2230 ZFS_META_NAME=`$AWK -F ':[ \t]+' '$1 ~ /^ *(Name|Project|Package)$/ { print $2; exit }' $META`;
2231 if test -n "$ZFS_META_NAME"; then
2232
2233cat >>confdefs.h <<_ACEOF
2234#define ZFS_META_NAME "$ZFS_META_NAME"
2235_ACEOF
2236
2237
2238 fi
2239
2240 ZFS_META_VERSION=`$AWK -F ':[ \t]+' '$1 ~ /^ *Version$/ { print $2; exit }' $META`;
2241 if test -n "$ZFS_META_VERSION"; then
2242
2243cat >>confdefs.h <<_ACEOF
2244#define ZFS_META_VERSION "$ZFS_META_VERSION"
2245_ACEOF
2246
2247
2248 fi
2249
2250 ZFS_META_RELEASE=`$AWK -F ':[ \t]+' '$1 ~ /^ *Release$/ { print $2; exit }' $META`;
2251 if test ! -f ".nogitrelease" && git rev-parse --git-dir > /dev/null 2>&1; then
2252 _match="${ZFS_META_NAME}-${ZFS_META_VERSION}"
2253 _alias=$(git describe --match=${_match} 2>/dev/null)
2254 _release=$(echo ${_alias}|cut -f3- -d'-'|sed 's/-/_/g')
2255 if test -n "${_release}"; then
2256 ZFS_META_RELEASE=${_release}
2257 _zfs_ac_meta_type="git describe"
2258 fi
2259 fi
2260
2261 if test -n "$ZFS_META_RELEASE"; then
2262
2263cat >>confdefs.h <<_ACEOF
2264#define ZFS_META_RELEASE "$ZFS_META_RELEASE"
2265_ACEOF
2266
2267
2268
2269 RELEASE="$ZFS_META_RELEASE"
2270
2271 fi
2272
2273 ZFS_META_LICENSE=`$AWK -F ':[ \t]+' '$1 ~ /^ *License$/ { print $2; exit }' $META`;
2274 if test -n "$ZFS_META_LICENSE"; then
2275
2276cat >>confdefs.h <<_ACEOF
2277#define ZFS_META_LICENSE "$ZFS_META_LICENSE"
2278_ACEOF
2279
2280
2281 fi
2282
2283 if test -n "$ZFS_META_NAME" -a -n "$ZFS_META_VERSION"; then
2284 ZFS_META_ALIAS="$ZFS_META_NAME-$ZFS_META_VERSION"
2285 test -n "$ZFS_META_RELEASE" &&
2286 ZFS_META_ALIAS="$ZFS_META_ALIAS-$ZFS_META_RELEASE"
2287
2288cat >>confdefs.h <<_ACEOF
2289#define ZFS_META_ALIAS "$ZFS_META_ALIAS"
2290_ACEOF
2291
2292
2293 fi
2294
2295 ZFS_META_DATA=`$AWK -F ':[ \t]+' '$1 ~ /^ *Date$/ { print $2; exit }' $META`;
2296 if test -n "$ZFS_META_DATA"; then
2297
2298cat >>confdefs.h <<_ACEOF
2299#define ZFS_META_DATA "$ZFS_META_DATA"
2300_ACEOF
2301
2302
2303 fi
2304
2305 ZFS_META_AUTHOR=`$AWK -F ':[ \t]+' '$1 ~ /^ *Author$/ { print $2; exit }' $META`;
2306 if test -n "$ZFS_META_AUTHOR"; then
2307
2308cat >>confdefs.h <<_ACEOF
2309#define ZFS_META_AUTHOR "$ZFS_META_AUTHOR"
2310_ACEOF
2311
2312
2313 fi
2314
2315
2316 ZFS_META_LT_CURRENT=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Current$/ { print $2; exit }' $META`;
2317 ZFS_META_LT_REVISION=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Revision$/ { print $2; exit }' $META`;
2318 ZFS_META_LT_AGE=`$AWK -F ':[ \t]+' '$1 ~ /^ *LT_Age$/ { print $2; exit }' $META`;
2319 if test -n "$ZFS_META_LT_CURRENT" \
2320 -o -n "$ZFS_META_LT_REVISION" \
2321 -o -n "$ZFS_META_LT_AGE"; then
2322 test -n "$ZFS_META_LT_CURRENT" || ZFS_META_LT_CURRENT="0"
2323 test -n "$ZFS_META_LT_REVISION" || ZFS_META_LT_REVISION="0"
2324 test -n "$ZFS_META_LT_AGE" || ZFS_META_LT_AGE="0"
2325
2326cat >>confdefs.h <<_ACEOF
2327#define ZFS_META_LT_CURRENT "$ZFS_META_LT_CURRENT"
2328_ACEOF
2329
2330
2331cat >>confdefs.h <<_ACEOF
2332#define ZFS_META_LT_REVISION "$ZFS_META_LT_REVISION"
2333_ACEOF
2334
2335
2336cat >>confdefs.h <<_ACEOF
2337#define ZFS_META_LT_AGE "$ZFS_META_LT_AGE"
2338_ACEOF
2339
2340
2341
2342
2343 fi
2344 fi
2345
3d248aec 2346 { $as_echo "$as_me:$LINENO: result: $_zfs_ac_meta_type" >&5
ea04106b
AX
2347$as_echo "$_zfs_ac_meta_type" >&6; }
2348
2349
2350ac_aux_dir=
2351for ac_dir in config "$srcdir"/config; do
2352 if test -f "$ac_dir/install-sh"; then
2353 ac_aux_dir=$ac_dir
2354 ac_install_sh="$ac_aux_dir/install-sh -c"
2355 break
2356 elif test -f "$ac_dir/install.sh"; then
2357 ac_aux_dir=$ac_dir
2358 ac_install_sh="$ac_aux_dir/install.sh -c"
2359 break
2360 elif test -f "$ac_dir/shtool"; then
2361 ac_aux_dir=$ac_dir
2362 ac_install_sh="$ac_aux_dir/shtool install -c"
2363 break
2364 fi
2365done
2366if test -z "$ac_aux_dir"; then
3d248aec
AX
2367 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
2368$as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
2369 { (exit 1); exit 1; }; }
ea04106b
AX
2370fi
2371
2372# These three variables are undocumented and unsupported,
2373# and are intended to be withdrawn in a future Autoconf release.
2374# They can cause serious problems if a builder's source tree is in a directory
2375# whose full name contains unusual characters.
2376ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2377ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2378ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2379
2380
2381
2382# Make sure we can run config.sub.
2383$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3d248aec
AX
2384 { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2385$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2386 { (exit 1); exit 1; }; }
ea04106b 2387
3d248aec 2388{ $as_echo "$as_me:$LINENO: checking build system type" >&5
ea04106b 2389$as_echo_n "checking build system type... " >&6; }
3d248aec 2390if test "${ac_cv_build+set}" = set; then
ea04106b
AX
2391 $as_echo_n "(cached) " >&6
2392else
2393 ac_build_alias=$build_alias
2394test "x$ac_build_alias" = x &&
2395 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2396test "x$ac_build_alias" = x &&
3d248aec
AX
2397 { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
2398$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2399 { (exit 1); exit 1; }; }
ea04106b 2400ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3d248aec
AX
2401 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2402$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2403 { (exit 1); exit 1; }; }
ea04106b
AX
2404
2405fi
3d248aec 2406{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
ea04106b
AX
2407$as_echo "$ac_cv_build" >&6; }
2408case $ac_cv_build in
2409*-*-*) ;;
3d248aec
AX
2410*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2411$as_echo "$as_me: error: invalid value of canonical build" >&2;}
2412 { (exit 1); exit 1; }; };;
ea04106b
AX
2413esac
2414build=$ac_cv_build
2415ac_save_IFS=$IFS; IFS='-'
2416set x $ac_cv_build
2417shift
2418build_cpu=$1
2419build_vendor=$2
2420shift; shift
2421# Remember, the first character of IFS is used to create $*,
2422# except with old shells:
2423build_os=$*
2424IFS=$ac_save_IFS
2425case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2426
2427
3d248aec 2428{ $as_echo "$as_me:$LINENO: checking host system type" >&5
ea04106b 2429$as_echo_n "checking host system type... " >&6; }
3d248aec 2430if test "${ac_cv_host+set}" = set; then
ea04106b
AX
2431 $as_echo_n "(cached) " >&6
2432else
2433 if test "x$host_alias" = x; then
2434 ac_cv_host=$ac_cv_build
2435else
2436 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3d248aec
AX
2437 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2438$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2439 { (exit 1); exit 1; }; }
ea04106b
AX
2440fi
2441
2442fi
3d248aec 2443{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
ea04106b
AX
2444$as_echo "$ac_cv_host" >&6; }
2445case $ac_cv_host in
2446*-*-*) ;;
3d248aec
AX
2447*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2448$as_echo "$as_me: error: invalid value of canonical host" >&2;}
2449 { (exit 1); exit 1; }; };;
ea04106b
AX
2450esac
2451host=$ac_cv_host
2452ac_save_IFS=$IFS; IFS='-'
2453set x $ac_cv_host
2454shift
2455host_cpu=$1
2456host_vendor=$2
2457shift; shift
2458# Remember, the first character of IFS is used to create $*,
2459# except with old shells:
2460host_os=$*
2461IFS=$ac_save_IFS
2462case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2463
2464
3d248aec 2465{ $as_echo "$as_me:$LINENO: checking target system type" >&5
ea04106b 2466$as_echo_n "checking target system type... " >&6; }
3d248aec 2467if test "${ac_cv_target+set}" = set; then
ea04106b
AX
2468 $as_echo_n "(cached) " >&6
2469else
2470 if test "x$target_alias" = x; then
2471 ac_cv_target=$ac_cv_host
2472else
2473 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3d248aec
AX
2474 { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5
2475$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;}
2476 { (exit 1); exit 1; }; }
ea04106b
AX
2477fi
2478
2479fi
3d248aec 2480{ $as_echo "$as_me:$LINENO: result: $ac_cv_target" >&5
ea04106b
AX
2481$as_echo "$ac_cv_target" >&6; }
2482case $ac_cv_target in
2483*-*-*) ;;
3d248aec
AX
2484*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical target" >&5
2485$as_echo "$as_me: error: invalid value of canonical target" >&2;}
2486 { (exit 1); exit 1; }; };;
ea04106b
AX
2487esac
2488target=$ac_cv_target
2489ac_save_IFS=$IFS; IFS='-'
2490set x $ac_cv_target
2491shift
2492target_cpu=$1
2493target_vendor=$2
2494shift; shift
2495# Remember, the first character of IFS is used to create $*,
2496# except with old shells:
2497target_os=$*
2498IFS=$ac_save_IFS
2499case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2500
2501
2502# The aliases save the names the user supplied, while $host etc.
2503# will get canonicalized.
2504test -n "$target_alias" &&
2505 test "$program_prefix$program_suffix$program_transform_name" = \
2506 NONENONEs,x,x, &&
2507 program_prefix=${target_alias}-
2508
3d248aec 2509{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
ea04106b
AX
2510$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2511 # Check whether --enable-maintainer-mode was given.
3d248aec 2512if test "${enable_maintainer_mode+set}" = set; then
ea04106b
AX
2513 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2514else
2515 USE_MAINTAINER_MODE=no
2516fi
2517
3d248aec 2518 { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
ea04106b
AX
2519$as_echo "$USE_MAINTAINER_MODE" >&6; }
2520 if test $USE_MAINTAINER_MODE = yes; then
2521 MAINTAINER_MODE_TRUE=
2522 MAINTAINER_MODE_FALSE='#'
2523else
2524 MAINTAINER_MODE_TRUE='#'
2525 MAINTAINER_MODE_FALSE=
2526fi
2527
2528 MAINT=$MAINTAINER_MODE_TRUE
2529
2530
2531# Check whether --enable-silent-rules was given.
3d248aec 2532if test "${enable_silent_rules+set}" = set; then
ea04106b
AX
2533 enableval=$enable_silent_rules;
2534fi
2535
3d248aec
AX
2536case $enable_silent_rules in
2537yes) AM_DEFAULT_VERBOSITY=0;;
2538no) AM_DEFAULT_VERBOSITY=1;;
2539*) AM_DEFAULT_VERBOSITY=0;;
ea04106b 2540esac
ea04106b
AX
2541AM_BACKSLASH='\'
2542
3d248aec 2543am__api_version='1.11'
ea04106b
AX
2544
2545# Find a good install program. We prefer a C program (faster),
2546# so one script is as good as another. But avoid the broken or
2547# incompatible versions:
2548# SysV /etc/install, /usr/sbin/install
2549# SunOS /usr/etc/install
2550# IRIX /sbin/install
2551# AIX /bin/install
2552# AmigaOS /C/install, which installs bootblocks on floppy discs
2553# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2554# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2555# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2556# OS/2's system install, which has a completely different semantic
2557# ./install, which can be erroneously created by make from ./install.sh.
2558# Reject install programs that cannot install multiple files.
3d248aec 2559{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
ea04106b
AX
2560$as_echo_n "checking for a BSD-compatible install... " >&6; }
2561if test -z "$INSTALL"; then
3d248aec 2562if test "${ac_cv_path_install+set}" = set; then
ea04106b
AX
2563 $as_echo_n "(cached) " >&6
2564else
2565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2566for as_dir in $PATH
2567do
2568 IFS=$as_save_IFS
2569 test -z "$as_dir" && as_dir=.
3d248aec
AX
2570 # Account for people who put trailing slashes in PATH elements.
2571case $as_dir/ in
2572 ./ | .// | /cC/* | \
ea04106b 2573 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3d248aec 2574 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
ea04106b
AX
2575 /usr/ucb/* ) ;;
2576 *)
2577 # OSF1 and SCO ODT 3.0 have their own names for install.
2578 # Don't use installbsd from OSF since it installs stuff as root
2579 # by default.
2580 for ac_prog in ginstall scoinst install; do
2581 for ac_exec_ext in '' $ac_executable_extensions; do
3d248aec 2582 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
ea04106b
AX
2583 if test $ac_prog = install &&
2584 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2585 # AIX install. It has an incompatible calling convention.
2586 :
2587 elif test $ac_prog = install &&
2588 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2589 # program-specific install script used by HP pwplus--don't use.
2590 :
2591 else
2592 rm -rf conftest.one conftest.two conftest.dir
2593 echo one > conftest.one
2594 echo two > conftest.two
2595 mkdir conftest.dir
2596 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2597 test -s conftest.one && test -s conftest.two &&
2598 test -s conftest.dir/conftest.one &&
2599 test -s conftest.dir/conftest.two
2600 then
2601 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2602 break 3
2603 fi
2604 fi
2605 fi
2606 done
2607 done
2608 ;;
2609esac
2610
3d248aec 2611done
ea04106b
AX
2612IFS=$as_save_IFS
2613
2614rm -rf conftest.one conftest.two conftest.dir
2615
2616fi
2617 if test "${ac_cv_path_install+set}" = set; then
2618 INSTALL=$ac_cv_path_install
2619 else
2620 # As a last resort, use the slow shell script. Don't cache a
2621 # value for INSTALL within a source directory, because that will
2622 # break other packages using the cache if that directory is
2623 # removed, or if the value is a relative name.
2624 INSTALL=$ac_install_sh
2625 fi
2626fi
3d248aec 2627{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
ea04106b
AX
2628$as_echo "$INSTALL" >&6; }
2629
2630# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2631# It thinks the first close brace ends the variable substitution.
2632test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2633
2634test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2635
2636test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2637
3d248aec 2638{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
ea04106b 2639$as_echo_n "checking whether build environment is sane... " >&6; }
3d248aec
AX
2640# Just in case
2641sleep 1
2642echo timestamp > conftest.file
ea04106b
AX
2643# Reject unsafe characters in $srcdir or the absolute working directory
2644# name. Accept space and tab only in the latter.
2645am_lf='
2646'
2647case `pwd` in
2648 *[\\\"\#\$\&\'\`$am_lf]*)
3d248aec
AX
2649 { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
2650$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
2651 { (exit 1); exit 1; }; };;
ea04106b
AX
2652esac
2653case $srcdir in
2654 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3d248aec
AX
2655 { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
2656$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
2657 { (exit 1); exit 1; }; };;
ea04106b
AX
2658esac
2659
3d248aec 2660# Do `set' in a subshell so we don't clobber the current shell's
ea04106b
AX
2661# arguments. Must try -L first in case configure is actually a
2662# symlink; some systems play weird games with the mod time of symlinks
2663# (eg FreeBSD returns the mod time of the symlink's containing
2664# directory).
2665if (
3d248aec
AX
2666 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2667 if test "$*" = "X"; then
2668 # -L didn't work.
2669 set X `ls -t "$srcdir/configure" conftest.file`
2670 fi
2671 rm -f conftest.file
2672 if test "$*" != "X $srcdir/configure conftest.file" \
2673 && test "$*" != "X conftest.file $srcdir/configure"; then
2674
2675 # If neither matched, then we have a broken ls. This can happen
2676 # if, for instance, CONFIG_SHELL is bash and it inherits a
2677 # broken ls alias from the environment. This has actually
2678 # happened. Such a system could not be considered "sane".
2679 { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
2680alias in your environment" >&5
2681$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
2682alias in your environment" >&2;}
2683 { (exit 1); exit 1; }; }
2684 fi
2685
ea04106b
AX
2686 test "$2" = conftest.file
2687 )
2688then
2689 # Ok.
2690 :
2691else
3d248aec
AX
2692 { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
2693Check your system clock" >&5
2694$as_echo "$as_me: error: newly created file is older than distributed files!
2695Check your system clock" >&2;}
2696 { (exit 1); exit 1; }; }
ea04106b 2697fi
3d248aec 2698{ $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
2699$as_echo "yes" >&6; }
2700test "$program_prefix" != NONE &&
2701 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2702# Use a double $ so make ignores it.
2703test "$program_suffix" != NONE &&
2704 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2705# Double any \ or $.
2706# By default was `s,x,x', remove it if useless.
2707ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2708program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2709
3d248aec
AX
2710# expand $ac_aux_dir to an absolute path
2711am_aux_dir=`cd $ac_aux_dir && pwd`
ea04106b
AX
2712
2713if test x"${MISSING+set}" != xset; then
2714 case $am_aux_dir in
2715 *\ * | *\ *)
2716 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2717 *)
2718 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2719 esac
2720fi
2721# Use eval to expand $SHELL
3d248aec
AX
2722if eval "$MISSING --run true"; then
2723 am_missing_run="$MISSING --run "
ea04106b
AX
2724else
2725 am_missing_run=
3d248aec
AX
2726 { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
2727$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
ea04106b
AX
2728fi
2729
3d248aec 2730if test x"${install_sh}" != xset; then
ea04106b
AX
2731 case $am_aux_dir in
2732 *\ * | *\ *)
2733 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2734 *)
2735 install_sh="\${SHELL} $am_aux_dir/install-sh"
2736 esac
2737fi
2738
3d248aec
AX
2739# Installed binaries are usually stripped using `strip' when the user
2740# run `make install-strip'. However `strip' might not be the right
ea04106b 2741# tool to use in cross-compilation environments, therefore Automake
3d248aec 2742# will honor the `STRIP' environment variable to overrule this program.
ea04106b
AX
2743if test "$cross_compiling" != no; then
2744 if test -n "$ac_tool_prefix"; then
2745 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2746set dummy ${ac_tool_prefix}strip; ac_word=$2
3d248aec 2747{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 2748$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 2749if test "${ac_cv_prog_STRIP+set}" = set; then
ea04106b
AX
2750 $as_echo_n "(cached) " >&6
2751else
2752 if test -n "$STRIP"; then
2753 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2754else
2755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2756for as_dir in $PATH
2757do
2758 IFS=$as_save_IFS
2759 test -z "$as_dir" && as_dir=.
3d248aec
AX
2760 for ac_exec_ext in '' $ac_executable_extensions; do
2761 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 2762 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3d248aec 2763 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
2764 break 2
2765 fi
2766done
3d248aec 2767done
ea04106b
AX
2768IFS=$as_save_IFS
2769
2770fi
2771fi
2772STRIP=$ac_cv_prog_STRIP
2773if test -n "$STRIP"; then
3d248aec 2774 { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
ea04106b
AX
2775$as_echo "$STRIP" >&6; }
2776else
3d248aec 2777 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
2778$as_echo "no" >&6; }
2779fi
2780
2781
2782fi
2783if test -z "$ac_cv_prog_STRIP"; then
2784 ac_ct_STRIP=$STRIP
2785 # Extract the first word of "strip", so it can be a program name with args.
2786set dummy strip; ac_word=$2
3d248aec 2787{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 2788$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 2789if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
ea04106b
AX
2790 $as_echo_n "(cached) " >&6
2791else
2792 if test -n "$ac_ct_STRIP"; then
2793 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2794else
2795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2796for as_dir in $PATH
2797do
2798 IFS=$as_save_IFS
2799 test -z "$as_dir" && as_dir=.
3d248aec
AX
2800 for ac_exec_ext in '' $ac_executable_extensions; do
2801 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 2802 ac_cv_prog_ac_ct_STRIP="strip"
3d248aec 2803 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
2804 break 2
2805 fi
2806done
3d248aec 2807done
ea04106b
AX
2808IFS=$as_save_IFS
2809
2810fi
2811fi
2812ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2813if test -n "$ac_ct_STRIP"; then
3d248aec 2814 { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
ea04106b
AX
2815$as_echo "$ac_ct_STRIP" >&6; }
2816else
3d248aec 2817 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
2818$as_echo "no" >&6; }
2819fi
2820
2821 if test "x$ac_ct_STRIP" = x; then
2822 STRIP=":"
2823 else
2824 case $cross_compiling:$ac_tool_warned in
2825yes:)
3d248aec 2826{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
2827$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2828ac_tool_warned=yes ;;
2829esac
2830 STRIP=$ac_ct_STRIP
2831 fi
2832else
2833 STRIP="$ac_cv_prog_STRIP"
2834fi
2835
2836fi
2837INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2838
3d248aec 2839{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
ea04106b
AX
2840$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2841if test -z "$MKDIR_P"; then
3d248aec 2842 if test "${ac_cv_path_mkdir+set}" = set; then
ea04106b
AX
2843 $as_echo_n "(cached) " >&6
2844else
2845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2846for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2847do
2848 IFS=$as_save_IFS
2849 test -z "$as_dir" && as_dir=.
3d248aec 2850 for ac_prog in mkdir gmkdir; do
ea04106b 2851 for ac_exec_ext in '' $ac_executable_extensions; do
3d248aec 2852 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
ea04106b
AX
2853 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2854 'mkdir (GNU coreutils) '* | \
2855 'mkdir (coreutils) '* | \
2856 'mkdir (fileutils) '4.1*)
2857 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2858 break 3;;
2859 esac
2860 done
2861 done
3d248aec 2862done
ea04106b
AX
2863IFS=$as_save_IFS
2864
2865fi
2866
ea04106b
AX
2867 if test "${ac_cv_path_mkdir+set}" = set; then
2868 MKDIR_P="$ac_cv_path_mkdir -p"
2869 else
2870 # As a last resort, use the slow shell script. Don't cache a
2871 # value for MKDIR_P within a source directory, because that will
2872 # break other packages using the cache if that directory is
2873 # removed, or if the value is a relative name.
3d248aec 2874 test -d ./--version && rmdir ./--version
ea04106b
AX
2875 MKDIR_P="$ac_install_sh -d"
2876 fi
2877fi
3d248aec 2878{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
ea04106b
AX
2879$as_echo "$MKDIR_P" >&6; }
2880
3d248aec
AX
2881mkdir_p="$MKDIR_P"
2882case $mkdir_p in
2883 [\\/$]* | ?:[\\/]*) ;;
2884 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2885esac
2886
2887{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
ea04106b
AX
2888$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2889set x ${MAKE-make}
2890ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3d248aec 2891if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
ea04106b
AX
2892 $as_echo_n "(cached) " >&6
2893else
2894 cat >conftest.make <<\_ACEOF
2895SHELL = /bin/sh
2896all:
2897 @echo '@@@%%%=$(MAKE)=@@@%%%'
2898_ACEOF
3d248aec 2899# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ea04106b
AX
2900case `${MAKE-make} -f conftest.make 2>/dev/null` in
2901 *@@@%%%=?*=@@@%%%*)
2902 eval ac_cv_prog_make_${ac_make}_set=yes;;
2903 *)
2904 eval ac_cv_prog_make_${ac_make}_set=no;;
2905esac
2906rm -f conftest.make
2907fi
2908if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3d248aec 2909 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
2910$as_echo "yes" >&6; }
2911 SET_MAKE=
2912else
3d248aec 2913 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
2914$as_echo "no" >&6; }
2915 SET_MAKE="MAKE=${MAKE-make}"
2916fi
2917
2918rm -rf .tst 2>/dev/null
2919mkdir .tst 2>/dev/null
2920if test -d .tst; then
2921 am__leading_dot=.
2922else
2923 am__leading_dot=_
2924fi
2925rmdir .tst 2>/dev/null
2926
2927if test "`cd $srcdir && pwd`" != "`pwd`"; then
2928 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2929 # is not polluted with repeated "-I."
2930 am__isrc=' -I$(srcdir)'
2931 # test to see if srcdir already configured
2932 if test -f $srcdir/config.status; then
3d248aec
AX
2933 { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2934$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2935 { (exit 1); exit 1; }; }
ea04106b
AX
2936 fi
2937fi
2938
2939# test whether we have cygpath
2940if test -z "$CYGPATH_W"; then
2941 if (cygpath --version) >/dev/null 2>/dev/null; then
2942 CYGPATH_W='cygpath -w'
2943 else
2944 CYGPATH_W=echo
2945 fi
2946fi
2947
2948
2949# Define the identity of the package.
2950 PACKAGE='zfs'
3d248aec 2951 VERSION='0.6.5.11'
ea04106b
AX
2952
2953
2954cat >>confdefs.h <<_ACEOF
2955#define PACKAGE "$PACKAGE"
2956_ACEOF
2957
2958
2959cat >>confdefs.h <<_ACEOF
2960#define VERSION "$VERSION"
2961_ACEOF
2962
2963# Some tools Automake needs.
2964
2965ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2966
2967
2968AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2969
2970
2971AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2972
2973
2974AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2975
2976
2977MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2978
3d248aec
AX
2979# We need awk for the "check" target. The system "awk" is bad on
2980# some platforms.
2981# Always define AMTAR for backward compatibility.
ea04106b 2982
3d248aec 2983AMTAR=${AMTAR-"${am_missing_run}tar"}
68d83c55 2984
3d248aec 2985am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
68d83c55 2986
ea04106b
AX
2987
2988
2989
2990
3d248aec 2991ac_config_headers="$ac_config_headers zfs_config.h"
ea04106b 2992
68d83c55 2993
3d248aec
AX
2994# Find a good install program. We prefer a C program (faster),
2995# so one script is as good as another. But avoid the broken or
2996# incompatible versions:
2997# SysV /etc/install, /usr/sbin/install
2998# SunOS /usr/etc/install
2999# IRIX /sbin/install
3000# AIX /bin/install
3001# AmigaOS /C/install, which installs bootblocks on floppy discs
3002# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3003# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3004# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3005# OS/2's system install, which has a completely different semantic
3006# ./install, which can be erroneously created by make from ./install.sh.
3007# Reject install programs that cannot install multiple files.
3008{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3009$as_echo_n "checking for a BSD-compatible install... " >&6; }
3010if test -z "$INSTALL"; then
3011if test "${ac_cv_path_install+set}" = set; then
3012 $as_echo_n "(cached) " >&6
3013else
3014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3015for as_dir in $PATH
3016do
3017 IFS=$as_save_IFS
3018 test -z "$as_dir" && as_dir=.
3019 # Account for people who put trailing slashes in PATH elements.
3020case $as_dir/ in
3021 ./ | .// | /cC/* | \
3022 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3023 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3024 /usr/ucb/* ) ;;
3025 *)
3026 # OSF1 and SCO ODT 3.0 have their own names for install.
3027 # Don't use installbsd from OSF since it installs stuff as root
3028 # by default.
3029 for ac_prog in ginstall scoinst install; do
3030 for ac_exec_ext in '' $ac_executable_extensions; do
3031 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3032 if test $ac_prog = install &&
3033 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3034 # AIX install. It has an incompatible calling convention.
3035 :
3036 elif test $ac_prog = install &&
3037 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3038 # program-specific install script used by HP pwplus--don't use.
3039 :
3040 else
3041 rm -rf conftest.one conftest.two conftest.dir
3042 echo one > conftest.one
3043 echo two > conftest.two
3044 mkdir conftest.dir
3045 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3046 test -s conftest.one && test -s conftest.two &&
3047 test -s conftest.dir/conftest.one &&
3048 test -s conftest.dir/conftest.two
3049 then
3050 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3051 break 3
3052 fi
3053 fi
3054 fi
3055 done
3056 done
3057 ;;
3058esac
68d83c55 3059
3d248aec
AX
3060done
3061IFS=$as_save_IFS
68d83c55 3062
3d248aec 3063rm -rf conftest.one conftest.two conftest.dir
68d83c55 3064
3d248aec
AX
3065fi
3066 if test "${ac_cv_path_install+set}" = set; then
3067 INSTALL=$ac_cv_path_install
68d83c55 3068 else
3d248aec
AX
3069 # As a last resort, use the slow shell script. Don't cache a
3070 # value for INSTALL within a source directory, because that will
3071 # break other packages using the cache if that directory is
3072 # removed, or if the value is a relative name.
3073 INSTALL=$ac_install_sh
68d83c55
AX
3074 fi
3075fi
3d248aec
AX
3076{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
3077$as_echo "$INSTALL" >&6; }
68d83c55 3078
3d248aec
AX
3079# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3080# It thinks the first close brace ends the variable substitution.
3081test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
ea04106b 3082
3d248aec 3083test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
ea04106b 3084
3d248aec 3085test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
ea04106b
AX
3086
3087ac_ext=c
3088ac_cpp='$CPP $CPPFLAGS'
3089ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3090ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3091ac_compiler_gnu=$ac_cv_c_compiler_gnu
3092if test -n "$ac_tool_prefix"; then
3093 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3094set dummy ${ac_tool_prefix}gcc; ac_word=$2
3d248aec 3095{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 3096$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 3097if test "${ac_cv_prog_CC+set}" = set; then
ea04106b
AX
3098 $as_echo_n "(cached) " >&6
3099else
3100 if test -n "$CC"; then
3101 ac_cv_prog_CC="$CC" # Let the user override the test.
3102else
3103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3104for as_dir in $PATH
3105do
3106 IFS=$as_save_IFS
3107 test -z "$as_dir" && as_dir=.
3d248aec
AX
3108 for ac_exec_ext in '' $ac_executable_extensions; do
3109 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 3110 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3d248aec 3111 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
3112 break 2
3113 fi
3114done
3d248aec 3115done
ea04106b
AX
3116IFS=$as_save_IFS
3117
3118fi
3119fi
3120CC=$ac_cv_prog_CC
3121if test -n "$CC"; then
3d248aec 3122 { $as_echo "$as_me:$LINENO: result: $CC" >&5
ea04106b
AX
3123$as_echo "$CC" >&6; }
3124else
3d248aec 3125 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
3126$as_echo "no" >&6; }
3127fi
3128
3129
3130fi
3131if test -z "$ac_cv_prog_CC"; then
3132 ac_ct_CC=$CC
3133 # Extract the first word of "gcc", so it can be a program name with args.
3134set dummy gcc; ac_word=$2
3d248aec 3135{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 3136$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 3137if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
ea04106b
AX
3138 $as_echo_n "(cached) " >&6
3139else
3140 if test -n "$ac_ct_CC"; then
3141 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3142else
3143as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3144for as_dir in $PATH
3145do
3146 IFS=$as_save_IFS
3147 test -z "$as_dir" && as_dir=.
3d248aec
AX
3148 for ac_exec_ext in '' $ac_executable_extensions; do
3149 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 3150 ac_cv_prog_ac_ct_CC="gcc"
3d248aec 3151 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
3152 break 2
3153 fi
3154done
3d248aec 3155done
ea04106b
AX
3156IFS=$as_save_IFS
3157
3158fi
3159fi
3160ac_ct_CC=$ac_cv_prog_ac_ct_CC
3161if test -n "$ac_ct_CC"; then
3d248aec 3162 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
ea04106b
AX
3163$as_echo "$ac_ct_CC" >&6; }
3164else
3d248aec 3165 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
3166$as_echo "no" >&6; }
3167fi
3168
3169 if test "x$ac_ct_CC" = x; then
3170 CC=""
3171 else
3172 case $cross_compiling:$ac_tool_warned in
3173yes:)
3d248aec 3174{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
3175$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3176ac_tool_warned=yes ;;
3177esac
3178 CC=$ac_ct_CC
3179 fi
3180else
3181 CC="$ac_cv_prog_CC"
3182fi
3183
3184if test -z "$CC"; then
3185 if test -n "$ac_tool_prefix"; then
3186 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3187set dummy ${ac_tool_prefix}cc; ac_word=$2
3d248aec 3188{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 3189$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 3190if test "${ac_cv_prog_CC+set}" = set; then
ea04106b
AX
3191 $as_echo_n "(cached) " >&6
3192else
3193 if test -n "$CC"; then
3194 ac_cv_prog_CC="$CC" # Let the user override the test.
3195else
3196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3197for as_dir in $PATH
3198do
3199 IFS=$as_save_IFS
3200 test -z "$as_dir" && as_dir=.
3d248aec
AX
3201 for ac_exec_ext in '' $ac_executable_extensions; do
3202 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 3203 ac_cv_prog_CC="${ac_tool_prefix}cc"
3d248aec 3204 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
3205 break 2
3206 fi
3207done
3d248aec 3208done
ea04106b
AX
3209IFS=$as_save_IFS
3210
3211fi
3212fi
3213CC=$ac_cv_prog_CC
3214if test -n "$CC"; then
3d248aec 3215 { $as_echo "$as_me:$LINENO: result: $CC" >&5
ea04106b
AX
3216$as_echo "$CC" >&6; }
3217else
3d248aec 3218 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
3219$as_echo "no" >&6; }
3220fi
3221
3222
3223 fi
3224fi
3225if test -z "$CC"; then
3226 # Extract the first word of "cc", so it can be a program name with args.
3227set dummy cc; ac_word=$2
3d248aec 3228{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 3229$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 3230if test "${ac_cv_prog_CC+set}" = set; then
ea04106b
AX
3231 $as_echo_n "(cached) " >&6
3232else
3233 if test -n "$CC"; then
3234 ac_cv_prog_CC="$CC" # Let the user override the test.
3235else
3236 ac_prog_rejected=no
3237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3238for as_dir in $PATH
3239do
3240 IFS=$as_save_IFS
3241 test -z "$as_dir" && as_dir=.
3d248aec
AX
3242 for ac_exec_ext in '' $ac_executable_extensions; do
3243 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b
AX
3244 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3245 ac_prog_rejected=yes
3246 continue
3247 fi
3248 ac_cv_prog_CC="cc"
3d248aec 3249 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
3250 break 2
3251 fi
3252done
3d248aec 3253done
ea04106b
AX
3254IFS=$as_save_IFS
3255
3256if test $ac_prog_rejected = yes; then
3257 # We found a bogon in the path, so make sure we never use it.
3258 set dummy $ac_cv_prog_CC
3259 shift
3260 if test $# != 0; then
3261 # We chose a different compiler from the bogus one.
3262 # However, it has the same basename, so the bogon will be chosen
3263 # first if we set CC to just the basename; use the full file name.
3264 shift
3265 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3266 fi
3267fi
3268fi
3269fi
3270CC=$ac_cv_prog_CC
3271if test -n "$CC"; then
3d248aec 3272 { $as_echo "$as_me:$LINENO: result: $CC" >&5
ea04106b
AX
3273$as_echo "$CC" >&6; }
3274else
3d248aec 3275 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
3276$as_echo "no" >&6; }
3277fi
3278
3279
3280fi
3281if test -z "$CC"; then
3282 if test -n "$ac_tool_prefix"; then
3283 for ac_prog in cl.exe
3284 do
3285 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3286set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3d248aec 3287{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 3288$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 3289if test "${ac_cv_prog_CC+set}" = set; then
ea04106b
AX
3290 $as_echo_n "(cached) " >&6
3291else
3292 if test -n "$CC"; then
3293 ac_cv_prog_CC="$CC" # Let the user override the test.
3294else
3295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3296for as_dir in $PATH
3297do
3298 IFS=$as_save_IFS
3299 test -z "$as_dir" && as_dir=.
3d248aec
AX
3300 for ac_exec_ext in '' $ac_executable_extensions; do
3301 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 3302 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3d248aec 3303 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
3304 break 2
3305 fi
3306done
3d248aec 3307done
ea04106b
AX
3308IFS=$as_save_IFS
3309
3310fi
3311fi
3312CC=$ac_cv_prog_CC
3313if test -n "$CC"; then
3d248aec 3314 { $as_echo "$as_me:$LINENO: result: $CC" >&5
ea04106b
AX
3315$as_echo "$CC" >&6; }
3316else
3d248aec 3317 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
3318$as_echo "no" >&6; }
3319fi
3320
3321
3322 test -n "$CC" && break
3323 done
3324fi
3325if test -z "$CC"; then
3326 ac_ct_CC=$CC
3327 for ac_prog in cl.exe
3328do
3329 # Extract the first word of "$ac_prog", so it can be a program name with args.
3330set dummy $ac_prog; ac_word=$2
3d248aec 3331{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 3332$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 3333if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
ea04106b
AX
3334 $as_echo_n "(cached) " >&6
3335else
3336 if test -n "$ac_ct_CC"; then
3337 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3338else
3339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3340for as_dir in $PATH
3341do
3342 IFS=$as_save_IFS
3343 test -z "$as_dir" && as_dir=.
3d248aec
AX
3344 for ac_exec_ext in '' $ac_executable_extensions; do
3345 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 3346 ac_cv_prog_ac_ct_CC="$ac_prog"
3d248aec 3347 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
3348 break 2
3349 fi
3350done
3d248aec 3351done
ea04106b
AX
3352IFS=$as_save_IFS
3353
3354fi
3355fi
3356ac_ct_CC=$ac_cv_prog_ac_ct_CC
3357if test -n "$ac_ct_CC"; then
3d248aec 3358 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
ea04106b
AX
3359$as_echo "$ac_ct_CC" >&6; }
3360else
3d248aec 3361 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
3362$as_echo "no" >&6; }
3363fi
3364
3365
3366 test -n "$ac_ct_CC" && break
3367done
3368
3369 if test "x$ac_ct_CC" = x; then
3370 CC=""
3371 else
3372 case $cross_compiling:$ac_tool_warned in
3373yes:)
3d248aec 3374{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
3375$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3376ac_tool_warned=yes ;;
3377esac
3378 CC=$ac_ct_CC
3379 fi
3380fi
3381
3382fi
3383
3384
3d248aec 3385test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 3386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
3387{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3388See \`config.log' for more details." >&5
3389$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
3390See \`config.log' for more details." >&2;}
3391 { (exit 1); exit 1; }; }; }
ea04106b
AX
3392
3393# Provide some information about the compiler.
3d248aec 3394$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
ea04106b
AX
3395set X $ac_compile
3396ac_compiler=$2
3d248aec 3397{ (ac_try="$ac_compiler --version >&5"
ea04106b
AX
3398case "(($ac_try" in
3399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3400 *) ac_try_echo=$ac_try;;
3401esac
3d248aec
AX
3402eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3403$as_echo "$ac_try_echo") >&5
3404 (eval "$ac_compiler --version >&5") 2>&5
3405 ac_status=$?
3406 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3407 (exit $ac_status); }
3408{ (ac_try="$ac_compiler -v >&5"
3409case "(($ac_try" in
3410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3411 *) ac_try_echo=$ac_try;;
3412esac
3413eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3414$as_echo "$ac_try_echo") >&5
3415 (eval "$ac_compiler -v >&5") 2>&5
3416 ac_status=$?
3417 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3418 (exit $ac_status); }
3419{ (ac_try="$ac_compiler -V >&5"
3420case "(($ac_try" in
3421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3422 *) ac_try_echo=$ac_try;;
3423esac
3424eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3425$as_echo "$ac_try_echo") >&5
3426 (eval "$ac_compiler -V >&5") 2>&5
3427 ac_status=$?
3428 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3429 (exit $ac_status); }
ea04106b 3430
3d248aec
AX
3431cat >conftest.$ac_ext <<_ACEOF
3432/* confdefs.h. */
3433_ACEOF
3434cat confdefs.h >>conftest.$ac_ext
3435cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
3436/* end confdefs.h. */
3437
3438int
3439main ()
3440{
3441
3442 ;
3443 return 0;
3444}
3445_ACEOF
3446ac_clean_files_save=$ac_clean_files
3447ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3448# Try to create an executable without -o first, disregard a.out.
3449# It will help us diagnose broken compilers, and finding out an intuition
3450# of exeext.
3d248aec
AX
3451{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3452$as_echo_n "checking for C compiler default output file name... " >&6; }
ea04106b
AX
3453ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3454
3455# The possible output files:
3456ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3457
3458ac_rmfiles=
3459for ac_file in $ac_files
3460do
3461 case $ac_file in
3462 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3463 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3464 esac
3465done
3466rm -f $ac_rmfiles
3467
3d248aec 3468if { (ac_try="$ac_link_default"
ea04106b
AX
3469case "(($ac_try" in
3470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3471 *) ac_try_echo=$ac_try;;
3472esac
3d248aec
AX
3473eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3474$as_echo "$ac_try_echo") >&5
ea04106b
AX
3475 (eval "$ac_link_default") 2>&5
3476 ac_status=$?
3d248aec
AX
3477 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3478 (exit $ac_status); }; then
ea04106b
AX
3479 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3480# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3481# in a Makefile. We should not override ac_cv_exeext if it was cached,
3482# so that the user can short-circuit this test for compilers unknown to
3483# Autoconf.
3484for ac_file in $ac_files ''
3485do
3486 test -f "$ac_file" || continue
3487 case $ac_file in
3488 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3489 ;;
3490 [ab].out )
3491 # We found the default executable, but exeext='' is most
3492 # certainly right.
3493 break;;
3494 *.* )
3d248aec 3495 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
ea04106b
AX
3496 then :; else
3497 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3498 fi
3499 # We set ac_cv_exeext here because the later test for it is not
3500 # safe: cross compilers may not add the suffix if given an `-o'
3501 # argument, so we may need to know it at that point already.
3502 # Even if this section looks crufty: it has the advantage of
3503 # actually working.
3504 break;;
3505 * )
3506 break;;
3507 esac
3508done
3509test "$ac_cv_exeext" = no && ac_cv_exeext=
3510
3511else
3512 ac_file=''
3513fi
3d248aec
AX
3514
3515{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
3516$as_echo "$ac_file" >&6; }
3517if test -z "$ac_file"; then
3518 $as_echo "$as_me: failed program was:" >&5
ea04106b
AX
3519sed 's/^/| /' conftest.$ac_ext >&5
3520
3d248aec 3521{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 3522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
3523{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
3524See \`config.log' for more details." >&5
3525$as_echo "$as_me: error: C compiler cannot create executables
3526See \`config.log' for more details." >&2;}
3527 { (exit 77); exit 77; }; }; }
ea04106b 3528fi
3d248aec 3529
ea04106b
AX
3530ac_exeext=$ac_cv_exeext
3531
3d248aec
AX
3532# Check that the compiler produces executables we can run. If not, either
3533# the compiler is broken, or we cross compile.
3534{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3535$as_echo_n "checking whether the C compiler works... " >&6; }
3536# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3537# If not cross compiling, check that we can run a simple program.
3538if test "$cross_compiling" != yes; then
3539 if { ac_try='./$ac_file'
3540 { (case "(($ac_try" in
3541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3542 *) ac_try_echo=$ac_try;;
3543esac
3544eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3545$as_echo "$ac_try_echo") >&5
3546 (eval "$ac_try") 2>&5
3547 ac_status=$?
3548 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3549 (exit $ac_status); }; }; then
3550 cross_compiling=no
3551 else
3552 if test "$cross_compiling" = maybe; then
3553 cross_compiling=yes
3554 else
3555 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3556$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3557{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
3558If you meant to cross compile, use \`--host'.
3559See \`config.log' for more details." >&5
3560$as_echo "$as_me: error: cannot run C compiled programs.
3561If you meant to cross compile, use \`--host'.
3562See \`config.log' for more details." >&2;}
3563 { (exit 1); exit 1; }; }; }
3564 fi
3565 fi
3566fi
3567{ $as_echo "$as_me:$LINENO: result: yes" >&5
3568$as_echo "yes" >&6; }
3569
ea04106b
AX
3570rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3571ac_clean_files=$ac_clean_files_save
3d248aec
AX
3572# Check that the compiler produces executables we can run. If not, either
3573# the compiler is broken, or we cross compile.
3574{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3575$as_echo_n "checking whether we are cross compiling... " >&6; }
3576{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
3577$as_echo "$cross_compiling" >&6; }
3578
3579{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
ea04106b 3580$as_echo_n "checking for suffix of executables... " >&6; }
3d248aec 3581if { (ac_try="$ac_link"
ea04106b
AX
3582case "(($ac_try" in
3583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3584 *) ac_try_echo=$ac_try;;
3585esac
3d248aec
AX
3586eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3587$as_echo "$ac_try_echo") >&5
ea04106b
AX
3588 (eval "$ac_link") 2>&5
3589 ac_status=$?
3d248aec
AX
3590 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3591 (exit $ac_status); }; then
ea04106b
AX
3592 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3593# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3594# work properly (i.e., refer to `conftest.exe'), while it won't with
3595# `rm'.
3596for ac_file in conftest.exe conftest conftest.*; do
3597 test -f "$ac_file" || continue
3598 case $ac_file in
3599 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3600 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3601 break;;
3602 * ) break;;
3603 esac
3604done
3605else
3d248aec 3606 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 3607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
3608{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3609See \`config.log' for more details." >&5
3610$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3611See \`config.log' for more details." >&2;}
3612 { (exit 1); exit 1; }; }; }
ea04106b 3613fi
3d248aec
AX
3614
3615rm -f conftest$ac_cv_exeext
3616{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
ea04106b
AX
3617$as_echo "$ac_cv_exeext" >&6; }
3618
3619rm -f conftest.$ac_ext
3620EXEEXT=$ac_cv_exeext
3621ac_exeext=$EXEEXT
3d248aec 3622{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
ea04106b 3623$as_echo_n "checking for suffix of object files... " >&6; }
3d248aec 3624if test "${ac_cv_objext+set}" = set; then
ea04106b
AX
3625 $as_echo_n "(cached) " >&6
3626else
3d248aec
AX
3627 cat >conftest.$ac_ext <<_ACEOF
3628/* confdefs.h. */
3629_ACEOF
3630cat confdefs.h >>conftest.$ac_ext
3631cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
3632/* end confdefs.h. */
3633
3634int
3635main ()
3636{
3637
3638 ;
3639 return 0;
3640}
3641_ACEOF
3642rm -f conftest.o conftest.obj
3d248aec 3643if { (ac_try="$ac_compile"
ea04106b
AX
3644case "(($ac_try" in
3645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3646 *) ac_try_echo=$ac_try;;
3647esac
3d248aec
AX
3648eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3649$as_echo "$ac_try_echo") >&5
ea04106b
AX
3650 (eval "$ac_compile") 2>&5
3651 ac_status=$?
3d248aec
AX
3652 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3653 (exit $ac_status); }; then
ea04106b
AX
3654 for ac_file in conftest.o conftest.obj conftest.*; do
3655 test -f "$ac_file" || continue;
3656 case $ac_file in
3657 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3658 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3659 break;;
3660 esac
3661done
3662else
3663 $as_echo "$as_me: failed program was:" >&5
3664sed 's/^/| /' conftest.$ac_ext >&5
3665
3d248aec 3666{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 3667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
3668{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3669See \`config.log' for more details." >&5
3670$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
3671See \`config.log' for more details." >&2;}
3672 { (exit 1); exit 1; }; }; }
ea04106b 3673fi
3d248aec 3674
ea04106b
AX
3675rm -f conftest.$ac_cv_objext conftest.$ac_ext
3676fi
3d248aec 3677{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
ea04106b
AX
3678$as_echo "$ac_cv_objext" >&6; }
3679OBJEXT=$ac_cv_objext
3680ac_objext=$OBJEXT
3d248aec 3681{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
ea04106b 3682$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3d248aec 3683if test "${ac_cv_c_compiler_gnu+set}" = set; then
ea04106b
AX
3684 $as_echo_n "(cached) " >&6
3685else
3d248aec
AX
3686 cat >conftest.$ac_ext <<_ACEOF
3687/* confdefs.h. */
3688_ACEOF
3689cat confdefs.h >>conftest.$ac_ext
3690cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
3691/* end confdefs.h. */
3692
3693int
3694main ()
3695{
3696#ifndef __GNUC__
3697 choke me
3698#endif
3699
3700 ;
3701 return 0;
3702}
3703_ACEOF
3d248aec
AX
3704rm -f conftest.$ac_objext
3705if { (ac_try="$ac_compile"
3706case "(($ac_try" in
3707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3708 *) ac_try_echo=$ac_try;;
3709esac
3710eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3711$as_echo "$ac_try_echo") >&5
3712 (eval "$ac_compile") 2>conftest.er1
3713 ac_status=$?
3714 grep -v '^ *+' conftest.er1 >conftest.err
3715 rm -f conftest.er1
3716 cat conftest.err >&5
3717 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3718 (exit $ac_status); } && {
3719 test -z "$ac_c_werror_flag" ||
3720 test ! -s conftest.err
3721 } && test -s conftest.$ac_objext; then
ea04106b
AX
3722 ac_compiler_gnu=yes
3723else
3d248aec
AX
3724 $as_echo "$as_me: failed program was:" >&5
3725sed 's/^/| /' conftest.$ac_ext >&5
3726
3727 ac_compiler_gnu=no
ea04106b 3728fi
3d248aec 3729
ea04106b
AX
3730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3731ac_cv_c_compiler_gnu=$ac_compiler_gnu
3732
3733fi
3d248aec 3734{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
ea04106b
AX
3735$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3736if test $ac_compiler_gnu = yes; then
3737 GCC=yes
3738else
3739 GCC=
3740fi
3741ac_test_CFLAGS=${CFLAGS+set}
3742ac_save_CFLAGS=$CFLAGS
3d248aec 3743{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
ea04106b 3744$as_echo_n "checking whether $CC accepts -g... " >&6; }
3d248aec 3745if test "${ac_cv_prog_cc_g+set}" = set; then
ea04106b
AX
3746 $as_echo_n "(cached) " >&6
3747else
3748 ac_save_c_werror_flag=$ac_c_werror_flag
3749 ac_c_werror_flag=yes
3750 ac_cv_prog_cc_g=no
3751 CFLAGS="-g"
3d248aec
AX
3752 cat >conftest.$ac_ext <<_ACEOF
3753/* confdefs.h. */
3754_ACEOF
3755cat confdefs.h >>conftest.$ac_ext
3756cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
3757/* end confdefs.h. */
3758
3759int
3760main ()
3761{
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
3d248aec
AX
3767rm -f conftest.$ac_objext
3768if { (ac_try="$ac_compile"
3769case "(($ac_try" in
3770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3771 *) ac_try_echo=$ac_try;;
3772esac
3773eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3774$as_echo "$ac_try_echo") >&5
3775 (eval "$ac_compile") 2>conftest.er1
3776 ac_status=$?
3777 grep -v '^ *+' conftest.er1 >conftest.err
3778 rm -f conftest.er1
3779 cat conftest.err >&5
3780 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3781 (exit $ac_status); } && {
3782 test -z "$ac_c_werror_flag" ||
3783 test ! -s conftest.err
3784 } && test -s conftest.$ac_objext; then
ea04106b
AX
3785 ac_cv_prog_cc_g=yes
3786else
3d248aec
AX
3787 $as_echo "$as_me: failed program was:" >&5
3788sed 's/^/| /' conftest.$ac_ext >&5
3789
3790 CFLAGS=""
3791 cat >conftest.$ac_ext <<_ACEOF
3792/* confdefs.h. */
3793_ACEOF
3794cat confdefs.h >>conftest.$ac_ext
3795cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
3796/* end confdefs.h. */
3797
3798int
3799main ()
3800{
3801
3802 ;
3803 return 0;
3804}
3805_ACEOF
3d248aec
AX
3806rm -f conftest.$ac_objext
3807if { (ac_try="$ac_compile"
3808case "(($ac_try" in
3809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3810 *) ac_try_echo=$ac_try;;
3811esac
3812eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3813$as_echo "$ac_try_echo") >&5
3814 (eval "$ac_compile") 2>conftest.er1
3815 ac_status=$?
3816 grep -v '^ *+' conftest.er1 >conftest.err
3817 rm -f conftest.er1
3818 cat conftest.err >&5
3819 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3820 (exit $ac_status); } && {
3821 test -z "$ac_c_werror_flag" ||
3822 test ! -s conftest.err
3823 } && test -s conftest.$ac_objext; then
3824 :
ea04106b 3825else
3d248aec
AX
3826 $as_echo "$as_me: failed program was:" >&5
3827sed 's/^/| /' conftest.$ac_ext >&5
3828
3829 ac_c_werror_flag=$ac_save_c_werror_flag
ea04106b 3830 CFLAGS="-g"
3d248aec
AX
3831 cat >conftest.$ac_ext <<_ACEOF
3832/* confdefs.h. */
3833_ACEOF
3834cat confdefs.h >>conftest.$ac_ext
3835cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
3836/* end confdefs.h. */
3837
3838int
3839main ()
3840{
3841
3842 ;
3843 return 0;
3844}
3845_ACEOF
3d248aec
AX
3846rm -f conftest.$ac_objext
3847if { (ac_try="$ac_compile"
3848case "(($ac_try" in
3849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3850 *) ac_try_echo=$ac_try;;
3851esac
3852eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3853$as_echo "$ac_try_echo") >&5
3854 (eval "$ac_compile") 2>conftest.er1
3855 ac_status=$?
3856 grep -v '^ *+' conftest.er1 >conftest.err
3857 rm -f conftest.er1
3858 cat conftest.err >&5
3859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3860 (exit $ac_status); } && {
3861 test -z "$ac_c_werror_flag" ||
3862 test ! -s conftest.err
3863 } && test -s conftest.$ac_objext; then
ea04106b 3864 ac_cv_prog_cc_g=yes
3d248aec
AX
3865else
3866 $as_echo "$as_me: failed program was:" >&5
3867sed 's/^/| /' conftest.$ac_ext >&5
3868
3869
ea04106b 3870fi
3d248aec 3871
ea04106b
AX
3872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3873fi
3d248aec 3874
ea04106b
AX
3875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3876fi
3d248aec 3877
ea04106b
AX
3878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3879 ac_c_werror_flag=$ac_save_c_werror_flag
3880fi
3d248aec 3881{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
ea04106b
AX
3882$as_echo "$ac_cv_prog_cc_g" >&6; }
3883if test "$ac_test_CFLAGS" = set; then
3884 CFLAGS=$ac_save_CFLAGS
3885elif test $ac_cv_prog_cc_g = yes; then
3886 if test "$GCC" = yes; then
3887 CFLAGS="-g -O2"
3888 else
3889 CFLAGS="-g"
3890 fi
3891else
3892 if test "$GCC" = yes; then
3893 CFLAGS="-O2"
3894 else
3895 CFLAGS=
3896 fi
3897fi
3d248aec 3898{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
ea04106b 3899$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3d248aec 3900if test "${ac_cv_prog_cc_c89+set}" = set; then
ea04106b
AX
3901 $as_echo_n "(cached) " >&6
3902else
3903 ac_cv_prog_cc_c89=no
3904ac_save_CC=$CC
3d248aec
AX
3905cat >conftest.$ac_ext <<_ACEOF
3906/* confdefs.h. */
3907_ACEOF
3908cat confdefs.h >>conftest.$ac_ext
3909cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
3910/* end confdefs.h. */
3911#include <stdarg.h>
3912#include <stdio.h>
3d248aec
AX
3913#include <sys/types.h>
3914#include <sys/stat.h>
ea04106b
AX
3915/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3916struct buf { int x; };
3917FILE * (*rcsopen) (struct buf *, struct stat *, int);
3918static char *e (p, i)
3919 char **p;
3920 int i;
3921{
3922 return p[i];
3923}
3924static char *f (char * (*g) (char **, int), char **p, ...)
3925{
3926 char *s;
3927 va_list v;
3928 va_start (v,p);
3929 s = g (p, va_arg (v,int));
3930 va_end (v);
3931 return s;
3932}
3933
3934/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3935 function prototypes and stuff, but not '\xHH' hex character constants.
3936 These don't provoke an error unfortunately, instead are silently treated
3937 as 'x'. The following induces an error, until -std is added to get
3938 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3939 array size at least. It's necessary to write '\x00'==0 to get something
3940 that's true only with -std. */
3941int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3942
3943/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3944 inside strings and character constants. */
3945#define FOO(x) 'x'
3946int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3947
3948int test (int i, double x);
3949struct s1 {int (*f) (int a);};
3950struct s2 {int (*f) (double a);};
3951int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3952int argc;
3953char **argv;
3954int
3955main ()
3956{
3957return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3958 ;
3959 return 0;
3960}
3961_ACEOF
3962for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3963 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3964do
3965 CC="$ac_save_CC $ac_arg"
3d248aec
AX
3966 rm -f conftest.$ac_objext
3967if { (ac_try="$ac_compile"
3968case "(($ac_try" in
3969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3970 *) ac_try_echo=$ac_try;;
3971esac
3972eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3973$as_echo "$ac_try_echo") >&5
3974 (eval "$ac_compile") 2>conftest.er1
3975 ac_status=$?
3976 grep -v '^ *+' conftest.er1 >conftest.err
3977 rm -f conftest.er1
3978 cat conftest.err >&5
3979 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3980 (exit $ac_status); } && {
3981 test -z "$ac_c_werror_flag" ||
3982 test ! -s conftest.err
3983 } && test -s conftest.$ac_objext; then
ea04106b 3984 ac_cv_prog_cc_c89=$ac_arg
3d248aec
AX
3985else
3986 $as_echo "$as_me: failed program was:" >&5
3987sed 's/^/| /' conftest.$ac_ext >&5
3988
3989
ea04106b 3990fi
3d248aec 3991
ea04106b
AX
3992rm -f core conftest.err conftest.$ac_objext
3993 test "x$ac_cv_prog_cc_c89" != "xno" && break
3994done
3995rm -f conftest.$ac_ext
3996CC=$ac_save_CC
3997
3998fi
3999# AC_CACHE_VAL
4000case "x$ac_cv_prog_cc_c89" in
4001 x)
3d248aec 4002 { $as_echo "$as_me:$LINENO: result: none needed" >&5
ea04106b
AX
4003$as_echo "none needed" >&6; } ;;
4004 xno)
3d248aec 4005 { $as_echo "$as_me:$LINENO: result: unsupported" >&5
ea04106b
AX
4006$as_echo "unsupported" >&6; } ;;
4007 *)
4008 CC="$CC $ac_cv_prog_cc_c89"
3d248aec 4009 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
ea04106b
AX
4010$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4011esac
ea04106b 4012
68d83c55
AX
4013
4014ac_ext=c
4015ac_cpp='$CPP $CPPFLAGS'
4016ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4017ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4018ac_compiler_gnu=$ac_cv_c_compiler_gnu
ea04106b
AX
4019DEPDIR="${am__leading_dot}deps"
4020
4021ac_config_commands="$ac_config_commands depfiles"
4022
4023
4024am_make=${MAKE-make}
4025cat > confinc << 'END'
4026am__doit:
4027 @echo this is the am__doit target
4028.PHONY: am__doit
4029END
4030# If we don't find an include directive, just comment out the code.
3d248aec 4031{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
ea04106b
AX
4032$as_echo_n "checking for style of include used by $am_make... " >&6; }
4033am__include="#"
4034am__quote=
4035_am_result=none
4036# First try GNU make style include.
4037echo "include confinc" > confmf
3d248aec 4038# Ignore all kinds of additional output from `make'.
ea04106b
AX
4039case `$am_make -s -f confmf 2> /dev/null` in #(
4040*the\ am__doit\ target*)
4041 am__include=include
4042 am__quote=
4043 _am_result=GNU
4044 ;;
4045esac
4046# Now try BSD make style include.
4047if test "$am__include" = "#"; then
4048 echo '.include "confinc"' > confmf
4049 case `$am_make -s -f confmf 2> /dev/null` in #(
4050 *the\ am__doit\ target*)
4051 am__include=.include
4052 am__quote="\""
4053 _am_result=BSD
4054 ;;
4055 esac
4056fi
4057
4058
3d248aec 4059{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
ea04106b
AX
4060$as_echo "$_am_result" >&6; }
4061rm -f confinc confmf
4062
4063# Check whether --enable-dependency-tracking was given.
3d248aec 4064if test "${enable_dependency_tracking+set}" = set; then
ea04106b
AX
4065 enableval=$enable_dependency_tracking;
4066fi
4067
4068if test "x$enable_dependency_tracking" != xno; then
4069 am_depcomp="$ac_aux_dir/depcomp"
4070 AMDEPBACKSLASH='\'
ea04106b
AX
4071fi
4072 if test "x$enable_dependency_tracking" != xno; then
4073 AMDEP_TRUE=
4074 AMDEP_FALSE='#'
4075else
4076 AMDEP_TRUE='#'
4077 AMDEP_FALSE=
4078fi
4079
4080
4081
4082depcc="$CC" am_compiler_list=
4083
3d248aec 4084{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
ea04106b 4085$as_echo_n "checking dependency style of $depcc... " >&6; }
3d248aec 4086if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
ea04106b
AX
4087 $as_echo_n "(cached) " >&6
4088else
4089 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4090 # We make a subdir and do the tests there. Otherwise we can end up
4091 # making bogus files that we don't know about and never remove. For
4092 # instance it was reported that on HP-UX the gcc test will end up
3d248aec
AX
4093 # making a dummy file named `D' -- because `-MD' means `put the output
4094 # in D'.
ea04106b
AX
4095 mkdir conftest.dir
4096 # Copy depcomp to subdir because otherwise we won't find it if we're
4097 # using a relative directory.
4098 cp "$am_depcomp" conftest.dir
4099 cd conftest.dir
4100 # We will build objects and dependencies in a subdirectory because
4101 # it helps to detect inapplicable dependency modes. For instance
4102 # both Tru64's cc and ICC support -MD to output dependencies as a
4103 # side effect of compilation, but ICC will put the dependencies in
4104 # the current directory while Tru64 will put them in the object
4105 # directory.
4106 mkdir sub
4107
4108 am_cv_CC_dependencies_compiler_type=none
4109 if test "$am_compiler_list" = ""; then
4110 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4111 fi
4112 am__universal=false
4113 case " $depcc " in #(
4114 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4115 esac
4116
4117 for depmode in $am_compiler_list; do
4118 # Setup a source with many dependencies, because some compilers
4119 # like to wrap large dependency lists on column 80 (with \), and
4120 # we should not choose a depcomp mode which is confused by this.
4121 #
4122 # We need to recreate these files for each test, as the compiler may
4123 # overwrite some of them when testing with obscure command lines.
4124 # This happens at least with the AIX C compiler.
4125 : > sub/conftest.c
4126 for i in 1 2 3 4 5 6; do
4127 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3d248aec
AX
4128 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4129 # Solaris 8's {/usr,}/bin/sh.
4130 touch sub/conftst$i.h
ea04106b
AX
4131 done
4132 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4133
3d248aec 4134 # We check with `-c' and `-o' for the sake of the "dashmstdout"
ea04106b 4135 # mode. It turns out that the SunPro C++ compiler does not properly
3d248aec
AX
4136 # handle `-M -o', and we need to detect this. Also, some Intel
4137 # versions had trouble with output in subdirs
ea04106b
AX
4138 am__obj=sub/conftest.${OBJEXT-o}
4139 am__minus_obj="-o $am__obj"
4140 case $depmode in
4141 gcc)
4142 # This depmode causes a compiler race in universal mode.
4143 test "$am__universal" = false || continue
4144 ;;
4145 nosideeffect)
3d248aec
AX
4146 # after this tag, mechanisms are not by side-effect, so they'll
4147 # only be used when explicitly requested
ea04106b
AX
4148 if test "x$enable_dependency_tracking" = xyes; then
4149 continue
4150 else
4151 break
4152 fi
4153 ;;
3d248aec
AX
4154 msvisualcpp | msvcmsys)
4155 # This compiler won't grok `-c -o', but also, the minuso test has
ea04106b
AX
4156 # not run yet. These depmodes are late enough in the game, and
4157 # so weak that their functioning should not be impacted.
4158 am__obj=conftest.${OBJEXT-o}
4159 am__minus_obj=
4160 ;;
4161 none) break ;;
4162 esac
4163 if depmode=$depmode \
4164 source=sub/conftest.c object=$am__obj \
4165 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4166 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4167 >/dev/null 2>conftest.err &&
4168 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4169 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4170 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4171 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4172 # icc doesn't choke on unknown options, it will just issue warnings
4173 # or remarks (even with -Werror). So we grep stderr for any message
4174 # that says an option was ignored or not supported.
4175 # When given -MP, icc 7.0 and 7.1 complain thusly:
4176 # icc: Command line warning: ignoring option '-M'; no argument required
4177 # The diagnosis changed in icc 8.0:
4178 # icc: Command line remark: option '-MP' not supported
4179 if (grep 'ignoring option' conftest.err ||
4180 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4181 am_cv_CC_dependencies_compiler_type=$depmode
4182 break
4183 fi
4184 fi
4185 done
4186
4187 cd ..
4188 rm -rf conftest.dir
4189else
4190 am_cv_CC_dependencies_compiler_type=none
4191fi
4192
4193fi
3d248aec 4194{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
ea04106b
AX
4195$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4196CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4197
4198 if
4199 test "x$enable_dependency_tracking" != xno \
4200 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4201 am__fastdepCC_TRUE=
4202 am__fastdepCC_FALSE='#'
4203else
4204 am__fastdepCC_TRUE='#'
4205 am__fastdepCC_FALSE=
4206fi
4207
4208
4209case `pwd` in
4210 *\ * | *\ *)
3d248aec 4211 { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
ea04106b
AX
4212$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
4213esac
4214
4215
4216
3d248aec
AX
4217macro_version='2.2.6b'
4218macro_revision='1.3017'
ea04106b
AX
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
3d248aec 4232ltmain="$ac_aux_dir/ltmain.sh"
ea04106b 4233
3d248aec 4234{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
ea04106b 4235$as_echo_n "checking for a sed that does not truncate output... " >&6; }
3d248aec 4236if test "${ac_cv_path_SED+set}" = set; then
ea04106b
AX
4237 $as_echo_n "(cached) " >&6
4238else
4239 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4240 for ac_i in 1 2 3 4 5 6 7; do
4241 ac_script="$ac_script$as_nl$ac_script"
4242 done
4243 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
3d248aec 4244 $as_unset ac_script || ac_script=
ea04106b
AX
4245 if test -z "$SED"; then
4246 ac_path_SED_found=false
4247 # Loop through the user's path and test for each of PROGNAME-LIST
4248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4249for as_dir in $PATH
4250do
4251 IFS=$as_save_IFS
4252 test -z "$as_dir" && as_dir=.
3d248aec 4253 for ac_prog in sed gsed; do
ea04106b
AX
4254 for ac_exec_ext in '' $ac_executable_extensions; do
4255 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
3d248aec 4256 { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
ea04106b
AX
4257# Check for GNU ac_path_SED and select it if it is found.
4258 # Check for GNU $ac_path_SED
4259case `"$ac_path_SED" --version 2>&1` in
4260*GNU*)
4261 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4262*)
4263 ac_count=0
4264 $as_echo_n 0123456789 >"conftest.in"
4265 while :
4266 do
4267 cat "conftest.in" "conftest.in" >"conftest.tmp"
4268 mv "conftest.tmp" "conftest.in"
4269 cp "conftest.in" "conftest.nl"
4270 $as_echo '' >> "conftest.nl"
4271 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4272 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3d248aec 4273 ac_count=`expr $ac_count + 1`
ea04106b
AX
4274 if test $ac_count -gt ${ac_path_SED_max-0}; then
4275 # Best one so far, save it but keep looking for a better one
4276 ac_cv_path_SED="$ac_path_SED"
4277 ac_path_SED_max=$ac_count
4278 fi
4279 # 10*(2^10) chars as input seems more than enough
4280 test $ac_count -gt 10 && break
4281 done
4282 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4283esac
4284
4285 $ac_path_SED_found && break 3
4286 done
4287 done
3d248aec 4288done
ea04106b
AX
4289IFS=$as_save_IFS
4290 if test -z "$ac_cv_path_SED"; then
3d248aec
AX
4291 { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
4292$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
4293 { (exit 1); exit 1; }; }
ea04106b
AX
4294 fi
4295else
4296 ac_cv_path_SED=$SED
4297fi
4298
4299fi
3d248aec 4300{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
ea04106b
AX
4301$as_echo "$ac_cv_path_SED" >&6; }
4302 SED="$ac_cv_path_SED"
4303 rm -f conftest.sed
4304
4305test -z "$SED" && SED=sed
4306Xsed="$SED -e 1s/^X//"
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
3d248aec 4318{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
ea04106b 4319$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3d248aec 4320if test "${ac_cv_path_GREP+set}" = set; then
ea04106b
AX
4321 $as_echo_n "(cached) " >&6
4322else
4323 if test -z "$GREP"; then
4324 ac_path_GREP_found=false
4325 # Loop through the user's path and test for each of PROGNAME-LIST
4326 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4327for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4328do
4329 IFS=$as_save_IFS
4330 test -z "$as_dir" && as_dir=.
3d248aec 4331 for ac_prog in grep ggrep; do
ea04106b
AX
4332 for ac_exec_ext in '' $ac_executable_extensions; do
4333 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3d248aec 4334 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ea04106b
AX
4335# Check for GNU ac_path_GREP and select it if it is found.
4336 # Check for GNU $ac_path_GREP
4337case `"$ac_path_GREP" --version 2>&1` in
4338*GNU*)
4339 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4340*)
4341 ac_count=0
4342 $as_echo_n 0123456789 >"conftest.in"
4343 while :
4344 do
4345 cat "conftest.in" "conftest.in" >"conftest.tmp"
4346 mv "conftest.tmp" "conftest.in"
4347 cp "conftest.in" "conftest.nl"
4348 $as_echo 'GREP' >> "conftest.nl"
4349 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4350 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3d248aec 4351 ac_count=`expr $ac_count + 1`
ea04106b
AX
4352 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4353 # Best one so far, save it but keep looking for a better one
4354 ac_cv_path_GREP="$ac_path_GREP"
4355 ac_path_GREP_max=$ac_count
4356 fi
4357 # 10*(2^10) chars as input seems more than enough
4358 test $ac_count -gt 10 && break
4359 done
4360 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4361esac
4362
4363 $ac_path_GREP_found && break 3
4364 done
4365 done
3d248aec 4366done
ea04106b
AX
4367IFS=$as_save_IFS
4368 if test -z "$ac_cv_path_GREP"; then
3d248aec
AX
4369 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4370$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4371 { (exit 1); exit 1; }; }
ea04106b
AX
4372 fi
4373else
4374 ac_cv_path_GREP=$GREP
4375fi
4376
4377fi
3d248aec 4378{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
ea04106b
AX
4379$as_echo "$ac_cv_path_GREP" >&6; }
4380 GREP="$ac_cv_path_GREP"
4381
4382
3d248aec 4383{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
ea04106b 4384$as_echo_n "checking for egrep... " >&6; }
3d248aec 4385if test "${ac_cv_path_EGREP+set}" = set; then
ea04106b
AX
4386 $as_echo_n "(cached) " >&6
4387else
4388 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4389 then ac_cv_path_EGREP="$GREP -E"
4390 else
4391 if test -z "$EGREP"; then
4392 ac_path_EGREP_found=false
4393 # Loop through the user's path and test for each of PROGNAME-LIST
4394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4396do
4397 IFS=$as_save_IFS
4398 test -z "$as_dir" && as_dir=.
3d248aec 4399 for ac_prog in egrep; do
ea04106b
AX
4400 for ac_exec_ext in '' $ac_executable_extensions; do
4401 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3d248aec 4402 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ea04106b
AX
4403# Check for GNU ac_path_EGREP and select it if it is found.
4404 # Check for GNU $ac_path_EGREP
4405case `"$ac_path_EGREP" --version 2>&1` in
4406*GNU*)
4407 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4408*)
4409 ac_count=0
4410 $as_echo_n 0123456789 >"conftest.in"
4411 while :
4412 do
4413 cat "conftest.in" "conftest.in" >"conftest.tmp"
4414 mv "conftest.tmp" "conftest.in"
4415 cp "conftest.in" "conftest.nl"
4416 $as_echo 'EGREP' >> "conftest.nl"
4417 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4418 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3d248aec 4419 ac_count=`expr $ac_count + 1`
ea04106b
AX
4420 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4421 # Best one so far, save it but keep looking for a better one
4422 ac_cv_path_EGREP="$ac_path_EGREP"
4423 ac_path_EGREP_max=$ac_count
4424 fi
4425 # 10*(2^10) chars as input seems more than enough
4426 test $ac_count -gt 10 && break
4427 done
4428 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4429esac
4430
4431 $ac_path_EGREP_found && break 3
4432 done
4433 done
3d248aec 4434done
ea04106b
AX
4435IFS=$as_save_IFS
4436 if test -z "$ac_cv_path_EGREP"; then
3d248aec
AX
4437 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4438$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4439 { (exit 1); exit 1; }; }
ea04106b
AX
4440 fi
4441else
4442 ac_cv_path_EGREP=$EGREP
4443fi
4444
4445 fi
4446fi
3d248aec 4447{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
ea04106b
AX
4448$as_echo "$ac_cv_path_EGREP" >&6; }
4449 EGREP="$ac_cv_path_EGREP"
4450
4451
3d248aec 4452{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
ea04106b 4453$as_echo_n "checking for fgrep... " >&6; }
3d248aec 4454if test "${ac_cv_path_FGREP+set}" = set; then
ea04106b
AX
4455 $as_echo_n "(cached) " >&6
4456else
4457 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
4458 then ac_cv_path_FGREP="$GREP -F"
4459 else
4460 if test -z "$FGREP"; then
4461 ac_path_FGREP_found=false
4462 # Loop through the user's path and test for each of PROGNAME-LIST
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4465do
4466 IFS=$as_save_IFS
4467 test -z "$as_dir" && as_dir=.
3d248aec 4468 for ac_prog in fgrep; do
ea04106b
AX
4469 for ac_exec_ext in '' $ac_executable_extensions; do
4470 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
3d248aec 4471 { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
ea04106b
AX
4472# Check for GNU ac_path_FGREP and select it if it is found.
4473 # Check for GNU $ac_path_FGREP
4474case `"$ac_path_FGREP" --version 2>&1` in
4475*GNU*)
4476 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
4477*)
4478 ac_count=0
4479 $as_echo_n 0123456789 >"conftest.in"
4480 while :
4481 do
4482 cat "conftest.in" "conftest.in" >"conftest.tmp"
4483 mv "conftest.tmp" "conftest.in"
4484 cp "conftest.in" "conftest.nl"
4485 $as_echo 'FGREP' >> "conftest.nl"
4486 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
4487 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3d248aec 4488 ac_count=`expr $ac_count + 1`
ea04106b
AX
4489 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
4490 # Best one so far, save it but keep looking for a better one
4491 ac_cv_path_FGREP="$ac_path_FGREP"
4492 ac_path_FGREP_max=$ac_count
4493 fi
4494 # 10*(2^10) chars as input seems more than enough
4495 test $ac_count -gt 10 && break
4496 done
4497 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4498esac
4499
4500 $ac_path_FGREP_found && break 3
4501 done
4502 done
3d248aec 4503done
ea04106b
AX
4504IFS=$as_save_IFS
4505 if test -z "$ac_cv_path_FGREP"; then
3d248aec
AX
4506 { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4507$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4508 { (exit 1); exit 1; }; }
ea04106b
AX
4509 fi
4510else
4511 ac_cv_path_FGREP=$FGREP
4512fi
4513
4514 fi
4515fi
3d248aec 4516{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
ea04106b
AX
4517$as_echo "$ac_cv_path_FGREP" >&6; }
4518 FGREP="$ac_cv_path_FGREP"
4519
4520
4521test -z "$GREP" && GREP=grep
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541# Check whether --with-gnu-ld was given.
3d248aec
AX
4542if test "${with_gnu_ld+set}" = set; then
4543 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
ea04106b
AX
4544else
4545 with_gnu_ld=no
4546fi
4547
4548ac_prog=ld
3d248aec 4549if test "$GCC" = yes; then
ea04106b 4550 # Check if gcc -print-prog-name=ld gives a path.
3d248aec 4551 { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
ea04106b
AX
4552$as_echo_n "checking for ld used by $CC... " >&6; }
4553 case $host in
4554 *-*-mingw*)
3d248aec 4555 # gcc leaves a trailing carriage return which upsets mingw
ea04106b
AX
4556 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4557 *)
4558 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4559 esac
4560 case $ac_prog in
4561 # Accept absolute paths.
4562 [\\/]* | ?:[\\/]*)
4563 re_direlt='/[^/][^/]*/\.\./'
4564 # Canonicalize the pathname of ld
4565 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4566 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4567 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4568 done
3d248aec 4569 test -z "$LD" && LD="$ac_prog"
ea04106b
AX
4570 ;;
4571 "")
4572 # If it fails, then pretend we aren't using GCC.
4573 ac_prog=ld
4574 ;;
4575 *)
4576 # If it is relative, then search for the first ld in PATH.
4577 with_gnu_ld=unknown
4578 ;;
4579 esac
3d248aec
AX
4580elif test "$with_gnu_ld" = yes; then
4581 { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
ea04106b
AX
4582$as_echo_n "checking for GNU ld... " >&6; }
4583else
3d248aec 4584 { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
ea04106b
AX
4585$as_echo_n "checking for non-GNU ld... " >&6; }
4586fi
3d248aec 4587if test "${lt_cv_path_LD+set}" = set; then
ea04106b
AX
4588 $as_echo_n "(cached) " >&6
4589else
4590 if test -z "$LD"; then
3d248aec 4591 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
ea04106b 4592 for ac_dir in $PATH; do
3d248aec 4593 IFS="$lt_save_ifs"
ea04106b
AX
4594 test -z "$ac_dir" && ac_dir=.
4595 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3d248aec 4596 lt_cv_path_LD="$ac_dir/$ac_prog"
ea04106b
AX
4597 # Check to see if the program is GNU ld. I'd rather use --version,
4598 # but apparently some variants of GNU ld only accept -v.
4599 # Break only if it was the GNU/non-GNU ld that we prefer.
4600 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4601 *GNU* | *'with BFD'*)
3d248aec 4602 test "$with_gnu_ld" != no && break
ea04106b
AX
4603 ;;
4604 *)
3d248aec 4605 test "$with_gnu_ld" != yes && break
ea04106b
AX
4606 ;;
4607 esac
4608 fi
4609 done
3d248aec 4610 IFS="$lt_save_ifs"
ea04106b 4611else
3d248aec 4612 lt_cv_path_LD="$LD" # Let the user override the test with a path.
ea04106b
AX
4613fi
4614fi
4615
3d248aec 4616LD="$lt_cv_path_LD"
ea04106b 4617if test -n "$LD"; then
3d248aec 4618 { $as_echo "$as_me:$LINENO: result: $LD" >&5
ea04106b
AX
4619$as_echo "$LD" >&6; }
4620else
3d248aec 4621 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
4622$as_echo "no" >&6; }
4623fi
3d248aec
AX
4624test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4625$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4626 { (exit 1); exit 1; }; }
4627{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
ea04106b 4628$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
3d248aec 4629if test "${lt_cv_prog_gnu_ld+set}" = set; then
ea04106b
AX
4630 $as_echo_n "(cached) " >&6
4631else
4632 # I'd rather use --version here, but apparently some GNU lds only accept -v.
4633case `$LD -v 2>&1 </dev/null` in
4634*GNU* | *'with BFD'*)
4635 lt_cv_prog_gnu_ld=yes
4636 ;;
4637*)
4638 lt_cv_prog_gnu_ld=no
4639 ;;
4640esac
4641fi
3d248aec 4642{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
ea04106b
AX
4643$as_echo "$lt_cv_prog_gnu_ld" >&6; }
4644with_gnu_ld=$lt_cv_prog_gnu_ld
4645
4646
4647
4648
4649
4650
4651
4652
4653
3d248aec 4654{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
ea04106b 4655$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
3d248aec 4656if test "${lt_cv_path_NM+set}" = set; then
ea04106b
AX
4657 $as_echo_n "(cached) " >&6
4658else
4659 if test -n "$NM"; then
4660 # Let the user override the test.
3d248aec 4661 lt_cv_path_NM="$NM"
ea04106b 4662else
3d248aec 4663 lt_nm_to_check="${ac_tool_prefix}nm"
ea04106b
AX
4664 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4665 lt_nm_to_check="$lt_nm_to_check nm"
4666 fi
4667 for lt_tmp_nm in $lt_nm_to_check; do
3d248aec 4668 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
ea04106b 4669 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3d248aec 4670 IFS="$lt_save_ifs"
ea04106b 4671 test -z "$ac_dir" && ac_dir=.
3d248aec
AX
4672 tmp_nm="$ac_dir/$lt_tmp_nm"
4673 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
ea04106b 4674 # Check to see if the nm accepts a BSD-compat flag.
3d248aec 4675 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
ea04106b
AX
4676 # nm: unknown option "B" ignored
4677 # Tru64's nm complains that /dev/null is an invalid object file
3d248aec
AX
4678 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4679 */dev/null* | *'Invalid file or object type'*)
ea04106b 4680 lt_cv_path_NM="$tmp_nm -B"
3d248aec 4681 break
ea04106b
AX
4682 ;;
4683 *)
4684 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4685 */dev/null*)
4686 lt_cv_path_NM="$tmp_nm -p"
3d248aec 4687 break
ea04106b
AX
4688 ;;
4689 *)
4690 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4691 continue # so that we can try to find one that supports BSD flags
4692 ;;
4693 esac
4694 ;;
4695 esac
4696 fi
4697 done
3d248aec 4698 IFS="$lt_save_ifs"
ea04106b
AX
4699 done
4700 : ${lt_cv_path_NM=no}
4701fi
4702fi
3d248aec 4703{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
ea04106b 4704$as_echo "$lt_cv_path_NM" >&6; }
3d248aec
AX
4705if test "$lt_cv_path_NM" != "no"; then
4706 NM="$lt_cv_path_NM"
ea04106b
AX
4707else
4708 # Didn't find any BSD compatible name lister, look for dumpbin.
3d248aec
AX
4709 if test -n "$ac_tool_prefix"; then
4710 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
ea04106b
AX
4711 do
4712 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4713set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3d248aec 4714{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 4715$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 4716if test "${ac_cv_prog_DUMPBIN+set}" = set; then
ea04106b
AX
4717 $as_echo_n "(cached) " >&6
4718else
4719 if test -n "$DUMPBIN"; then
4720 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
4721else
4722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4723for as_dir in $PATH
4724do
4725 IFS=$as_save_IFS
4726 test -z "$as_dir" && as_dir=.
3d248aec
AX
4727 for ac_exec_ext in '' $ac_executable_extensions; do
4728 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 4729 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
3d248aec 4730 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
4731 break 2
4732 fi
4733done
3d248aec 4734done
ea04106b
AX
4735IFS=$as_save_IFS
4736
4737fi
4738fi
4739DUMPBIN=$ac_cv_prog_DUMPBIN
4740if test -n "$DUMPBIN"; then
3d248aec 4741 { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
ea04106b
AX
4742$as_echo "$DUMPBIN" >&6; }
4743else
3d248aec 4744 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
4745$as_echo "no" >&6; }
4746fi
4747
4748
4749 test -n "$DUMPBIN" && break
4750 done
4751fi
4752if test -z "$DUMPBIN"; then
4753 ac_ct_DUMPBIN=$DUMPBIN
3d248aec 4754 for ac_prog in "dumpbin -symbols" "link -dump -symbols"
ea04106b
AX
4755do
4756 # Extract the first word of "$ac_prog", so it can be a program name with args.
4757set dummy $ac_prog; ac_word=$2
3d248aec 4758{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 4759$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 4760if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
ea04106b
AX
4761 $as_echo_n "(cached) " >&6
4762else
4763 if test -n "$ac_ct_DUMPBIN"; then
4764 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
4765else
4766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4767for as_dir in $PATH
4768do
4769 IFS=$as_save_IFS
4770 test -z "$as_dir" && as_dir=.
3d248aec
AX
4771 for ac_exec_ext in '' $ac_executable_extensions; do
4772 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 4773 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
3d248aec 4774 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
4775 break 2
4776 fi
4777done
3d248aec 4778done
ea04106b
AX
4779IFS=$as_save_IFS
4780
4781fi
4782fi
4783ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
4784if test -n "$ac_ct_DUMPBIN"; then
3d248aec 4785 { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
ea04106b
AX
4786$as_echo "$ac_ct_DUMPBIN" >&6; }
4787else
3d248aec 4788 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
4789$as_echo "no" >&6; }
4790fi
4791
4792
4793 test -n "$ac_ct_DUMPBIN" && break
4794done
4795
4796 if test "x$ac_ct_DUMPBIN" = x; then
4797 DUMPBIN=":"
4798 else
4799 case $cross_compiling:$ac_tool_warned in
4800yes:)
3d248aec 4801{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
4802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4803ac_tool_warned=yes ;;
4804esac
4805 DUMPBIN=$ac_ct_DUMPBIN
4806 fi
4807fi
4808
ea04106b 4809
3d248aec
AX
4810 if test "$DUMPBIN" != ":"; then
4811 NM="$DUMPBIN"
ea04106b
AX
4812 fi
4813fi
4814test -z "$NM" && NM=nm
4815
4816
4817
4818
4819
4820
3d248aec 4821{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
ea04106b 4822$as_echo_n "checking the name lister ($NM) interface... " >&6; }
3d248aec 4823if test "${lt_cv_nm_interface+set}" = set; then
ea04106b
AX
4824 $as_echo_n "(cached) " >&6
4825else
4826 lt_cv_nm_interface="BSD nm"
4827 echo "int some_variable = 0;" > conftest.$ac_ext
3d248aec 4828 (eval echo "\"\$as_me:4828: $ac_compile\"" >&5)
ea04106b
AX
4829 (eval "$ac_compile" 2>conftest.err)
4830 cat conftest.err >&5
3d248aec 4831 (eval echo "\"\$as_me:4831: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
ea04106b
AX
4832 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4833 cat conftest.err >&5
3d248aec 4834 (eval echo "\"\$as_me:4834: output\"" >&5)
ea04106b
AX
4835 cat conftest.out >&5
4836 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4837 lt_cv_nm_interface="MS dumpbin"
4838 fi
4839 rm -f conftest*
4840fi
3d248aec 4841{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
ea04106b
AX
4842$as_echo "$lt_cv_nm_interface" >&6; }
4843
3d248aec 4844{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
ea04106b
AX
4845$as_echo_n "checking whether ln -s works... " >&6; }
4846LN_S=$as_ln_s
4847if test "$LN_S" = "ln -s"; then
3d248aec 4848 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
4849$as_echo "yes" >&6; }
4850else
3d248aec 4851 { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
ea04106b
AX
4852$as_echo "no, using $LN_S" >&6; }
4853fi
4854
4855# find the maximum length of command line arguments
3d248aec 4856{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
ea04106b 4857$as_echo_n "checking the maximum length of command line arguments... " >&6; }
3d248aec 4858if test "${lt_cv_sys_max_cmd_len+set}" = set; then
ea04106b
AX
4859 $as_echo_n "(cached) " >&6
4860else
4861 i=0
3d248aec 4862 teststring="ABCD"
ea04106b
AX
4863
4864 case $build_os in
4865 msdosdjgpp*)
4866 # On DJGPP, this test can blow up pretty badly due to problems in libc
4867 # (any single argument exceeding 2000 bytes causes a buffer overrun
4868 # during glob expansion). Even if it were fixed, the result of this
4869 # check would be larger than it should be.
4870 lt_cv_sys_max_cmd_len=12288; # 12K is about right
4871 ;;
4872
4873 gnu*)
4874 # Under GNU Hurd, this test is not required because there is
4875 # no limit to the length of command line arguments.
4876 # Libtool will interpret -1 as no limit whatsoever
4877 lt_cv_sys_max_cmd_len=-1;
4878 ;;
4879
4880 cygwin* | mingw* | cegcc*)
4881 # On Win9x/ME, this test blows up -- it succeeds, but takes
4882 # about 5 minutes as the teststring grows exponentially.
4883 # Worse, since 9x/ME are not pre-emptively multitasking,
4884 # you end up with a "frozen" computer, even though with patience
4885 # the test eventually succeeds (with a max line length of 256k).
4886 # Instead, let's just punt: use the minimum linelength reported by
4887 # all of the supported platforms: 8192 (on NT/2K/XP).
4888 lt_cv_sys_max_cmd_len=8192;
4889 ;;
4890
ea04106b
AX
4891 amigaos*)
4892 # On AmigaOS with pdksh, this test takes hours, literally.
4893 # So we just punt and use a minimum line length of 8192.
4894 lt_cv_sys_max_cmd_len=8192;
4895 ;;
4896
3d248aec 4897 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
ea04106b
AX
4898 # This has been around since 386BSD, at least. Likely further.
4899 if test -x /sbin/sysctl; then
4900 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
4901 elif test -x /usr/sbin/sysctl; then
4902 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
4903 else
4904 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
4905 fi
4906 # And add a safety zone
4907 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4908 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4909 ;;
4910
4911 interix*)
4912 # We know the value 262144 and hardcode it with a safety zone (like BSD)
4913 lt_cv_sys_max_cmd_len=196608
4914 ;;
4915
ea04106b
AX
4916 osf*)
4917 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
4918 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
4919 # nice to cause kernel panics so lets avoid the loop below.
4920 # First set a reasonable default.
4921 lt_cv_sys_max_cmd_len=16384
4922 #
4923 if test -x /sbin/sysconfig; then
4924 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
4925 *1*) lt_cv_sys_max_cmd_len=-1 ;;
4926 esac
4927 fi
4928 ;;
4929 sco3.2v5*)
4930 lt_cv_sys_max_cmd_len=102400
4931 ;;
4932 sysv5* | sco5v6* | sysv4.2uw2*)
4933 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
4934 if test -n "$kargmax"; then
4935 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
4936 else
4937 lt_cv_sys_max_cmd_len=32768
4938 fi
4939 ;;
4940 *)
4941 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3d248aec 4942 if test -n "$lt_cv_sys_max_cmd_len"; then
ea04106b
AX
4943 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4944 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4945 else
4946 # Make teststring a little bigger before we do anything with it.
4947 # a 1K string should be a reasonable start.
3d248aec 4948 for i in 1 2 3 4 5 6 7 8 ; do
ea04106b
AX
4949 teststring=$teststring$teststring
4950 done
4951 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
4952 # If test is not a shell built-in, we'll probably end up computing a
4953 # maximum length that is only half of the actual maximum length, but
4954 # we can't tell.
3d248aec
AX
4955 while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
4956 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
4957 test $i != 17 # 1/2 MB should be enough
ea04106b
AX
4958 do
4959 i=`expr $i + 1`
4960 teststring=$teststring$teststring
4961 done
4962 # Only check the string length outside the loop.
4963 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
4964 teststring=
4965 # Add a significant safety factor because C++ compilers can tack on
4966 # massive amounts of additional arguments before passing them to the
4967 # linker. It appears as though 1/2 is a usable value.
4968 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
4969 fi
4970 ;;
4971 esac
4972
4973fi
4974
3d248aec
AX
4975if test -n $lt_cv_sys_max_cmd_len ; then
4976 { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
ea04106b
AX
4977$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
4978else
3d248aec 4979 { $as_echo "$as_me:$LINENO: result: none" >&5
ea04106b
AX
4980$as_echo "none" >&6; }
4981fi
4982max_cmd_len=$lt_cv_sys_max_cmd_len
4983
4984
4985
4986
4987
4988
4989: ${CP="cp -f"}
4990: ${MV="mv -f"}
4991: ${RM="rm -f"}
4992
3d248aec
AX
4993{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
4994$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
4995# Try some XSI features
4996xsi_shell=no
4997( _lt_dummy="a/b/c"
4998 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
4999 = c,a/b,, \
5000 && eval 'test $(( 1 + 1 )) -eq 2 \
5001 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
5002 && xsi_shell=yes
5003{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5
5004$as_echo "$xsi_shell" >&6; }
5005
5006
5007{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
5008$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
5009lt_shell_append=no
5010( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
5011 >/dev/null 2>&1 \
5012 && lt_shell_append=yes
5013{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5
5014$as_echo "$lt_shell_append" >&6; }
5015
5016
ea04106b
AX
5017if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
5018 lt_unset=unset
5019else
5020 lt_unset=false
5021fi
5022
5023
5024
5025
5026
5027# test EBCDIC or ASCII
5028case `echo X|tr X '\101'` in
5029 A) # ASCII based system
5030 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
5031 lt_SP2NL='tr \040 \012'
5032 lt_NL2SP='tr \015\012 \040\040'
5033 ;;
5034 *) # EBCDIC based system
5035 lt_SP2NL='tr \100 \n'
5036 lt_NL2SP='tr \r\n \100\100'
5037 ;;
5038esac
5039
5040
5041
5042
5043
5044
5045
5046
5047
3d248aec 5048{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
ea04106b 5049$as_echo_n "checking for $LD option to reload object files... " >&6; }
3d248aec 5050if test "${lt_cv_ld_reload_flag+set}" = set; then
ea04106b
AX
5051 $as_echo_n "(cached) " >&6
5052else
5053 lt_cv_ld_reload_flag='-r'
5054fi
3d248aec 5055{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
ea04106b
AX
5056$as_echo "$lt_cv_ld_reload_flag" >&6; }
5057reload_flag=$lt_cv_ld_reload_flag
5058case $reload_flag in
5059"" | " "*) ;;
5060*) reload_flag=" $reload_flag" ;;
5061esac
5062reload_cmds='$LD$reload_flag -o $output$reload_objs'
5063case $host_os in
ea04106b 5064 darwin*)
3d248aec
AX
5065 if test "$GCC" = yes; then
5066 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
ea04106b
AX
5067 else
5068 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5069 fi
5070 ;;
5071esac
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081if test -n "$ac_tool_prefix"; then
5082 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
5083set dummy ${ac_tool_prefix}objdump; ac_word=$2
3d248aec 5084{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 5085$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 5086if test "${ac_cv_prog_OBJDUMP+set}" = set; then
ea04106b
AX
5087 $as_echo_n "(cached) " >&6
5088else
5089 if test -n "$OBJDUMP"; then
5090 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
5091else
5092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093for as_dir in $PATH
5094do
5095 IFS=$as_save_IFS
5096 test -z "$as_dir" && as_dir=.
3d248aec
AX
5097 for ac_exec_ext in '' $ac_executable_extensions; do
5098 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 5099 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
3d248aec 5100 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
5101 break 2
5102 fi
5103done
3d248aec 5104done
ea04106b
AX
5105IFS=$as_save_IFS
5106
5107fi
5108fi
5109OBJDUMP=$ac_cv_prog_OBJDUMP
5110if test -n "$OBJDUMP"; then
3d248aec 5111 { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
ea04106b
AX
5112$as_echo "$OBJDUMP" >&6; }
5113else
3d248aec 5114 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
5115$as_echo "no" >&6; }
5116fi
5117
5118
5119fi
5120if test -z "$ac_cv_prog_OBJDUMP"; then
5121 ac_ct_OBJDUMP=$OBJDUMP
5122 # Extract the first word of "objdump", so it can be a program name with args.
5123set dummy objdump; ac_word=$2
3d248aec 5124{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 5125$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 5126if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
ea04106b
AX
5127 $as_echo_n "(cached) " >&6
5128else
5129 if test -n "$ac_ct_OBJDUMP"; then
5130 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
5131else
5132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5133for as_dir in $PATH
5134do
5135 IFS=$as_save_IFS
5136 test -z "$as_dir" && as_dir=.
3d248aec
AX
5137 for ac_exec_ext in '' $ac_executable_extensions; do
5138 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 5139 ac_cv_prog_ac_ct_OBJDUMP="objdump"
3d248aec 5140 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
5141 break 2
5142 fi
5143done
3d248aec 5144done
ea04106b
AX
5145IFS=$as_save_IFS
5146
5147fi
5148fi
5149ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
5150if test -n "$ac_ct_OBJDUMP"; then
3d248aec 5151 { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
ea04106b
AX
5152$as_echo "$ac_ct_OBJDUMP" >&6; }
5153else
3d248aec 5154 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
5155$as_echo "no" >&6; }
5156fi
5157
5158 if test "x$ac_ct_OBJDUMP" = x; then
5159 OBJDUMP="false"
5160 else
5161 case $cross_compiling:$ac_tool_warned in
5162yes:)
3d248aec 5163{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
5164$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5165ac_tool_warned=yes ;;
5166esac
5167 OBJDUMP=$ac_ct_OBJDUMP
5168 fi
5169else
5170 OBJDUMP="$ac_cv_prog_OBJDUMP"
5171fi
5172
5173test -z "$OBJDUMP" && OBJDUMP=objdump
5174
5175
5176
5177
5178
5179
5180
5181
5182
3d248aec 5183{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
ea04106b 5184$as_echo_n "checking how to recognize dependent libraries... " >&6; }
3d248aec 5185if test "${lt_cv_deplibs_check_method+set}" = set; then
ea04106b
AX
5186 $as_echo_n "(cached) " >&6
5187else
5188 lt_cv_file_magic_cmd='$MAGIC_CMD'
5189lt_cv_file_magic_test_file=
5190lt_cv_deplibs_check_method='unknown'
5191# Need to set the preceding variable on all platforms that support
5192# interlibrary dependencies.
5193# 'none' -- dependencies not supported.
3d248aec 5194# `unknown' -- same as none, but documents that we really don't know.
ea04106b
AX
5195# 'pass_all' -- all dependencies passed with no checks.
5196# 'test_compile' -- check by making test program.
5197# 'file_magic [[regex]]' -- check by looking for files in library path
3d248aec
AX
5198# which responds to the $file_magic_cmd with a given extended regex.
5199# If you have `file' or equivalent on your system and you're not sure
5200# whether `pass_all' will *always* work, you probably want this one.
ea04106b
AX
5201
5202case $host_os in
5203aix[4-9]*)
5204 lt_cv_deplibs_check_method=pass_all
5205 ;;
5206
5207beos*)
5208 lt_cv_deplibs_check_method=pass_all
5209 ;;
5210
5211bsdi[45]*)
5212 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
5213 lt_cv_file_magic_cmd='/usr/bin/file -L'
5214 lt_cv_file_magic_test_file=/shlib/libc.so
5215 ;;
5216
5217cygwin*)
5218 # func_win32_libid is a shell function defined in ltmain.sh
5219 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5220 lt_cv_file_magic_cmd='func_win32_libid'
5221 ;;
5222
5223mingw* | pw32*)
5224 # Base MSYS/MinGW do not provide the 'file' command needed by
5225 # func_win32_libid shell function, so use a weaker test based on 'objdump',
5226 # unless we find 'file', for example because we are cross-compiling.
68d83c55 5227 if ( file / ) >/dev/null 2>&1; then
ea04106b
AX
5228 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5229 lt_cv_file_magic_cmd='func_win32_libid'
5230 else
3d248aec 5231 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
ea04106b
AX
5232 lt_cv_file_magic_cmd='$OBJDUMP -f'
5233 fi
5234 ;;
5235
3d248aec 5236cegcc)
ea04106b
AX
5237 # use the weaker test based on 'objdump'. See mingw*.
5238 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5239 lt_cv_file_magic_cmd='$OBJDUMP -f'
5240 ;;
5241
5242darwin* | rhapsody*)
5243 lt_cv_deplibs_check_method=pass_all
5244 ;;
5245
5246freebsd* | dragonfly*)
5247 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5248 case $host_cpu in
5249 i*86 )
5250 # Not sure whether the presence of OpenBSD here was a mistake.
5251 # Let's accept both of them until this is cleared up.
5252 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
5253 lt_cv_file_magic_cmd=/usr/bin/file
5254 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5255 ;;
5256 esac
5257 else
5258 lt_cv_deplibs_check_method=pass_all
5259 fi
5260 ;;
5261
3d248aec 5262gnu*)
ea04106b
AX
5263 lt_cv_deplibs_check_method=pass_all
5264 ;;
5265
5266hpux10.20* | hpux11*)
5267 lt_cv_file_magic_cmd=/usr/bin/file
5268 case $host_cpu in
5269 ia64*)
5270 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
5271 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5272 ;;
5273 hppa*64*)
3d248aec 5274 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
ea04106b
AX
5275 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5276 ;;
5277 *)
3d248aec 5278 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
ea04106b
AX
5279 lt_cv_file_magic_test_file=/usr/lib/libc.sl
5280 ;;
5281 esac
5282 ;;
5283
5284interix[3-9]*)
5285 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5286 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
5287 ;;
5288
5289irix5* | irix6* | nonstopux*)
5290 case $LD in
5291 *-32|*"-32 ") libmagic=32-bit;;
5292 *-n32|*"-n32 ") libmagic=N32;;
5293 *-64|*"-64 ") libmagic=64-bit;;
5294 *) libmagic=never-match;;
5295 esac
5296 lt_cv_deplibs_check_method=pass_all
5297 ;;
5298
3d248aec
AX
5299# This must be Linux ELF.
5300linux* | k*bsd*-gnu)
ea04106b
AX
5301 lt_cv_deplibs_check_method=pass_all
5302 ;;
5303
3d248aec 5304netbsd*)
ea04106b
AX
5305 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5306 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5307 else
5308 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
5309 fi
5310 ;;
5311
5312newos6*)
5313 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
5314 lt_cv_file_magic_cmd=/usr/bin/file
5315 lt_cv_file_magic_test_file=/usr/lib/libnls.so
5316 ;;
5317
5318*nto* | *qnx*)
5319 lt_cv_deplibs_check_method=pass_all
5320 ;;
5321
3d248aec
AX
5322openbsd*)
5323 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
ea04106b
AX
5324 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
5325 else
5326 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
5327 fi
5328 ;;
5329
5330osf3* | osf4* | osf5*)
5331 lt_cv_deplibs_check_method=pass_all
5332 ;;
5333
5334rdos*)
5335 lt_cv_deplibs_check_method=pass_all
5336 ;;
5337
5338solaris*)
5339 lt_cv_deplibs_check_method=pass_all
5340 ;;
5341
5342sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5343 lt_cv_deplibs_check_method=pass_all
5344 ;;
5345
5346sysv4 | sysv4.3*)
5347 case $host_vendor in
5348 motorola)
5349 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
5350 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5351 ;;
5352 ncr)
5353 lt_cv_deplibs_check_method=pass_all
5354 ;;
5355 sequent)
5356 lt_cv_file_magic_cmd='/bin/file'
5357 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
5358 ;;
5359 sni)
5360 lt_cv_file_magic_cmd='/bin/file'
5361 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
5362 lt_cv_file_magic_test_file=/lib/libc.so
5363 ;;
5364 siemens)
5365 lt_cv_deplibs_check_method=pass_all
5366 ;;
5367 pc)
5368 lt_cv_deplibs_check_method=pass_all
5369 ;;
5370 esac
5371 ;;
5372
5373tpf*)
5374 lt_cv_deplibs_check_method=pass_all
5375 ;;
5376esac
5377
5378fi
3d248aec 5379{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
ea04106b 5380$as_echo "$lt_cv_deplibs_check_method" >&6; }
ea04106b
AX
5381file_magic_cmd=$lt_cv_file_magic_cmd
5382deplibs_check_method=$lt_cv_deplibs_check_method
5383test -z "$deplibs_check_method" && deplibs_check_method=unknown
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
ea04106b 5396if test -n "$ac_tool_prefix"; then
3d248aec
AX
5397 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5398set dummy ${ac_tool_prefix}ar; ac_word=$2
5399{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 5400$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 5401if test "${ac_cv_prog_AR+set}" = set; then
ea04106b
AX
5402 $as_echo_n "(cached) " >&6
5403else
5404 if test -n "$AR"; then
5405 ac_cv_prog_AR="$AR" # Let the user override the test.
5406else
5407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5408for as_dir in $PATH
5409do
5410 IFS=$as_save_IFS
5411 test -z "$as_dir" && as_dir=.
3d248aec
AX
5412 for ac_exec_ext in '' $ac_executable_extensions; do
5413 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5414 ac_cv_prog_AR="${ac_tool_prefix}ar"
5415 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
5416 break 2
5417 fi
5418done
3d248aec 5419done
ea04106b
AX
5420IFS=$as_save_IFS
5421
5422fi
5423fi
5424AR=$ac_cv_prog_AR
5425if test -n "$AR"; then
3d248aec 5426 { $as_echo "$as_me:$LINENO: result: $AR" >&5
ea04106b
AX
5427$as_echo "$AR" >&6; }
5428else
3d248aec 5429 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
5430$as_echo "no" >&6; }
5431fi
5432
5433
ea04106b 5434fi
3d248aec 5435if test -z "$ac_cv_prog_AR"; then
ea04106b 5436 ac_ct_AR=$AR
3d248aec
AX
5437 # Extract the first word of "ar", so it can be a program name with args.
5438set dummy ar; ac_word=$2
5439{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 5440$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 5441if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
ea04106b
AX
5442 $as_echo_n "(cached) " >&6
5443else
5444 if test -n "$ac_ct_AR"; then
5445 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5446else
5447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5448for as_dir in $PATH
5449do
5450 IFS=$as_save_IFS
5451 test -z "$as_dir" && as_dir=.
3d248aec
AX
5452 for ac_exec_ext in '' $ac_executable_extensions; do
5453 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5454 ac_cv_prog_ac_ct_AR="ar"
5455 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
5456 break 2
5457 fi
5458done
3d248aec 5459done
ea04106b
AX
5460IFS=$as_save_IFS
5461
5462fi
5463fi
5464ac_ct_AR=$ac_cv_prog_ac_ct_AR
5465if test -n "$ac_ct_AR"; then
3d248aec 5466 { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
ea04106b
AX
5467$as_echo "$ac_ct_AR" >&6; }
5468else
3d248aec 5469 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
5470$as_echo "no" >&6; }
5471fi
5472
ea04106b
AX
5473 if test "x$ac_ct_AR" = x; then
5474 AR="false"
5475 else
5476 case $cross_compiling:$ac_tool_warned in
5477yes:)
3d248aec 5478{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
5479$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5480ac_tool_warned=yes ;;
5481esac
5482 AR=$ac_ct_AR
5483 fi
ea04106b 5484else
3d248aec
AX
5485 AR="$ac_cv_prog_AR"
5486fi
ea04106b 5487
3d248aec
AX
5488test -z "$AR" && AR=ar
5489test -z "$AR_FLAGS" && AR_FLAGS=cru
ea04106b 5490
ea04106b 5491
ea04106b 5492
ea04106b 5493
ea04106b
AX
5494
5495
5496
5497
5498
5499
5500
5501if test -n "$ac_tool_prefix"; then
5502 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5503set dummy ${ac_tool_prefix}strip; ac_word=$2
3d248aec 5504{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 5505$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 5506if test "${ac_cv_prog_STRIP+set}" = set; then
ea04106b
AX
5507 $as_echo_n "(cached) " >&6
5508else
5509 if test -n "$STRIP"; then
5510 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5511else
5512as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5513for as_dir in $PATH
5514do
5515 IFS=$as_save_IFS
5516 test -z "$as_dir" && as_dir=.
3d248aec
AX
5517 for ac_exec_ext in '' $ac_executable_extensions; do
5518 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 5519 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3d248aec 5520 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
5521 break 2
5522 fi
5523done
3d248aec 5524done
ea04106b
AX
5525IFS=$as_save_IFS
5526
5527fi
5528fi
5529STRIP=$ac_cv_prog_STRIP
5530if test -n "$STRIP"; then
3d248aec 5531 { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
ea04106b
AX
5532$as_echo "$STRIP" >&6; }
5533else
3d248aec 5534 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
5535$as_echo "no" >&6; }
5536fi
5537
5538
5539fi
5540if test -z "$ac_cv_prog_STRIP"; then
5541 ac_ct_STRIP=$STRIP
5542 # Extract the first word of "strip", so it can be a program name with args.
5543set dummy strip; ac_word=$2
3d248aec 5544{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 5545$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 5546if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
ea04106b
AX
5547 $as_echo_n "(cached) " >&6
5548else
5549 if test -n "$ac_ct_STRIP"; then
5550 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5551else
5552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5553for as_dir in $PATH
5554do
5555 IFS=$as_save_IFS
5556 test -z "$as_dir" && as_dir=.
3d248aec
AX
5557 for ac_exec_ext in '' $ac_executable_extensions; do
5558 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 5559 ac_cv_prog_ac_ct_STRIP="strip"
3d248aec 5560 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
5561 break 2
5562 fi
5563done
3d248aec 5564done
ea04106b
AX
5565IFS=$as_save_IFS
5566
5567fi
5568fi
5569ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5570if test -n "$ac_ct_STRIP"; then
3d248aec 5571 { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
ea04106b
AX
5572$as_echo "$ac_ct_STRIP" >&6; }
5573else
3d248aec 5574 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
5575$as_echo "no" >&6; }
5576fi
5577
5578 if test "x$ac_ct_STRIP" = x; then
5579 STRIP=":"
5580 else
5581 case $cross_compiling:$ac_tool_warned in
5582yes:)
3d248aec 5583{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
5584$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5585ac_tool_warned=yes ;;
5586esac
5587 STRIP=$ac_ct_STRIP
5588 fi
5589else
5590 STRIP="$ac_cv_prog_STRIP"
5591fi
5592
5593test -z "$STRIP" && STRIP=:
5594
5595
5596
5597
5598
5599
5600if test -n "$ac_tool_prefix"; then
5601 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5602set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3d248aec 5603{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 5604$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 5605if test "${ac_cv_prog_RANLIB+set}" = set; then
ea04106b
AX
5606 $as_echo_n "(cached) " >&6
5607else
5608 if test -n "$RANLIB"; then
5609 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5610else
5611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5612for as_dir in $PATH
5613do
5614 IFS=$as_save_IFS
5615 test -z "$as_dir" && as_dir=.
3d248aec
AX
5616 for ac_exec_ext in '' $ac_executable_extensions; do
5617 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 5618 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3d248aec 5619 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
5620 break 2
5621 fi
5622done
3d248aec 5623done
ea04106b
AX
5624IFS=$as_save_IFS
5625
5626fi
5627fi
5628RANLIB=$ac_cv_prog_RANLIB
5629if test -n "$RANLIB"; then
3d248aec 5630 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
ea04106b
AX
5631$as_echo "$RANLIB" >&6; }
5632else
3d248aec 5633 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
5634$as_echo "no" >&6; }
5635fi
5636
5637
5638fi
5639if test -z "$ac_cv_prog_RANLIB"; then
5640 ac_ct_RANLIB=$RANLIB
5641 # Extract the first word of "ranlib", so it can be a program name with args.
5642set dummy ranlib; ac_word=$2
3d248aec 5643{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 5644$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 5645if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
ea04106b
AX
5646 $as_echo_n "(cached) " >&6
5647else
5648 if test -n "$ac_ct_RANLIB"; then
5649 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5650else
5651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5652for as_dir in $PATH
5653do
5654 IFS=$as_save_IFS
5655 test -z "$as_dir" && as_dir=.
3d248aec
AX
5656 for ac_exec_ext in '' $ac_executable_extensions; do
5657 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 5658 ac_cv_prog_ac_ct_RANLIB="ranlib"
3d248aec 5659 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
5660 break 2
5661 fi
5662done
3d248aec 5663done
ea04106b
AX
5664IFS=$as_save_IFS
5665
5666fi
5667fi
5668ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5669if test -n "$ac_ct_RANLIB"; then
3d248aec 5670 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
ea04106b
AX
5671$as_echo "$ac_ct_RANLIB" >&6; }
5672else
3d248aec 5673 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
5674$as_echo "no" >&6; }
5675fi
5676
5677 if test "x$ac_ct_RANLIB" = x; then
5678 RANLIB=":"
5679 else
5680 case $cross_compiling:$ac_tool_warned in
5681yes:)
3d248aec 5682{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
5683$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5684ac_tool_warned=yes ;;
5685esac
5686 RANLIB=$ac_ct_RANLIB
5687 fi
5688else
5689 RANLIB="$ac_cv_prog_RANLIB"
5690fi
5691
5692test -z "$RANLIB" && RANLIB=:
5693
5694
5695
5696
5697
5698
5699# Determine commands to create old-style static archives.
5700old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
5701old_postinstall_cmds='chmod 644 $oldlib'
5702old_postuninstall_cmds=
5703
5704if test -n "$RANLIB"; then
5705 case $host_os in
3d248aec
AX
5706 openbsd*)
5707 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
ea04106b
AX
5708 ;;
5709 *)
3d248aec 5710 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
ea04106b
AX
5711 ;;
5712 esac
3d248aec 5713 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
ea04106b
AX
5714fi
5715
ea04106b
AX
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749# If no C compiler was specified, use CC.
5750LTCC=${LTCC-"$CC"}
5751
5752# If no C compiler flags were specified, use CFLAGS.
5753LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
5754
5755# Allow CC to be a program name with arguments.
5756compiler=$CC
5757
5758
5759# Check for command to grab the raw symbol name followed by C symbol from nm.
3d248aec 5760{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
ea04106b 5761$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
3d248aec 5762if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
ea04106b
AX
5763 $as_echo_n "(cached) " >&6
5764else
5765
5766# These are sane defaults that work on at least a few old systems.
5767# [They come from Ultrix. What could be older than Ultrix?!! ;)]
5768
5769# Character class describing NM global symbol codes.
5770symcode='[BCDEGRST]'
5771
5772# Regexp to match symbols that can be accessed directly from C.
5773sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
5774
5775# Define system-specific variables.
5776case $host_os in
5777aix*)
5778 symcode='[BCDT]'
5779 ;;
5780cygwin* | mingw* | pw32* | cegcc*)
5781 symcode='[ABCDGISTW]'
5782 ;;
5783hpux*)
3d248aec 5784 if test "$host_cpu" = ia64; then
ea04106b
AX
5785 symcode='[ABCDEGRST]'
5786 fi
5787 ;;
5788irix* | nonstopux*)
5789 symcode='[BCDEGRST]'
5790 ;;
5791osf*)
5792 symcode='[BCDEGQRST]'
5793 ;;
5794solaris*)
5795 symcode='[BDRT]'
5796 ;;
5797sco3.2v5*)
5798 symcode='[DT]'
5799 ;;
5800sysv4.2uw2*)
5801 symcode='[DT]'
5802 ;;
5803sysv5* | sco5v6* | unixware* | OpenUNIX*)
5804 symcode='[ABDT]'
5805 ;;
5806sysv4)
5807 symcode='[DFNSTU]'
5808 ;;
5809esac
5810
5811# If we're using GNU nm, then use its standard symbol codes.
5812case `$NM -V 2>&1` in
5813*GNU* | *'with BFD'*)
5814 symcode='[ABCDGIRSTW]' ;;
5815esac
5816
5817# Transform an extracted symbol line into a proper C declaration.
5818# Some systems (esp. on ia64) link data and code symbols differently,
5819# so use this general approach.
3d248aec 5820lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
ea04106b
AX
5821
5822# Transform an extracted symbol line into symbol name and symbol address
3d248aec
AX
5823lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
5824lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
ea04106b
AX
5825
5826# Handle CRLF in mingw tool chain
5827opt_cr=
5828case $build_os in
5829mingw*)
5830 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5831 ;;
5832esac
5833
5834# Try without a prefix underscore, then with it.
5835for ac_symprfx in "" "_"; do
5836
5837 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5838 symxfrm="\\1 $ac_symprfx\\2 \\2"
5839
5840 # Write the raw and C identifiers.
5841 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3d248aec
AX
5842 # Fake it for dumpbin and say T for any non-static function
5843 # and D for any global variable.
ea04106b
AX
5844 # Also find C++ and __fastcall symbols from MSVC++,
5845 # which start with @ or ?.
5846 lt_cv_sys_global_symbol_pipe="$AWK '"\
5847" {last_section=section; section=\$ 3};"\
ea04106b
AX
5848" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5849" \$ 0!~/External *\|/{next};"\
5850" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5851" {if(hide[section]) next};"\
3d248aec
AX
5852" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5853" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5854" s[1]~/^[@?]/{print s[1], s[1]; next};"\
5855" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
ea04106b
AX
5856" ' prfx=^$ac_symprfx"
5857 else
5858 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5859 fi
ea04106b
AX
5860
5861 # Check to see that the pipe works correctly.
5862 pipe_works=no
5863
5864 rm -f conftest*
5865 cat > conftest.$ac_ext <<_LT_EOF
5866#ifdef __cplusplus
5867extern "C" {
5868#endif
5869char nm_test_var;
5870void nm_test_func(void);
5871void nm_test_func(void){}
5872#ifdef __cplusplus
5873}
5874#endif
5875int main(){nm_test_var='a';nm_test_func();return(0);}
5876_LT_EOF
5877
3d248aec 5878 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ea04106b
AX
5879 (eval $ac_compile) 2>&5
5880 ac_status=$?
3d248aec
AX
5881 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5882 (exit $ac_status); }; then
ea04106b
AX
5883 # Now try to grab the symbols.
5884 nlist=conftest.nm
3d248aec
AX
5885 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
5886 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
ea04106b 5887 ac_status=$?
3d248aec
AX
5888 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5889 (exit $ac_status); } && test -s "$nlist"; then
ea04106b
AX
5890 # Try sorting and uniquifying the output.
5891 if sort "$nlist" | uniq > "$nlist"T; then
5892 mv -f "$nlist"T "$nlist"
5893 else
5894 rm -f "$nlist"T
5895 fi
5896
5897 # Make sure that we snagged all the symbols we need.
5898 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5899 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5900 cat <<_LT_EOF > conftest.$ac_ext
ea04106b
AX
5901#ifdef __cplusplus
5902extern "C" {
5903#endif
5904
5905_LT_EOF
5906 # Now generate the symbol file.
5907 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5908
5909 cat <<_LT_EOF >> conftest.$ac_ext
5910
5911/* The mapping between symbol names and symbols. */
3d248aec 5912const struct {
ea04106b
AX
5913 const char *name;
5914 void *address;
5915}
5916lt__PROGRAM__LTX_preloaded_symbols[] =
5917{
5918 { "@PROGRAM@", (void *) 0 },
5919_LT_EOF
3d248aec 5920 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
ea04106b
AX
5921 cat <<\_LT_EOF >> conftest.$ac_ext
5922 {0, (void *) 0}
5923};
5924
5925/* This works around a problem in FreeBSD linker */
5926#ifdef FREEBSD_WORKAROUND
5927static const void *lt_preloaded_setup() {
5928 return lt__PROGRAM__LTX_preloaded_symbols;
5929}
5930#endif
5931
5932#ifdef __cplusplus
5933}
5934#endif
5935_LT_EOF
5936 # Now try linking the two files.
5937 mv conftest.$ac_objext conftstm.$ac_objext
3d248aec
AX
5938 lt_save_LIBS="$LIBS"
5939 lt_save_CFLAGS="$CFLAGS"
5940 LIBS="conftstm.$ac_objext"
ea04106b 5941 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
3d248aec 5942 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ea04106b
AX
5943 (eval $ac_link) 2>&5
5944 ac_status=$?
3d248aec
AX
5945 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946 (exit $ac_status); } && test -s conftest${ac_exeext}; then
ea04106b
AX
5947 pipe_works=yes
5948 fi
3d248aec
AX
5949 LIBS="$lt_save_LIBS"
5950 CFLAGS="$lt_save_CFLAGS"
ea04106b
AX
5951 else
5952 echo "cannot find nm_test_func in $nlist" >&5
5953 fi
5954 else
5955 echo "cannot find nm_test_var in $nlist" >&5
5956 fi
5957 else
5958 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
5959 fi
5960 else
5961 echo "$progname: failed program was:" >&5
5962 cat conftest.$ac_ext >&5
5963 fi
5964 rm -rf conftest* conftst*
5965
5966 # Do not use the global_symbol_pipe unless it works.
3d248aec 5967 if test "$pipe_works" = yes; then
ea04106b
AX
5968 break
5969 else
5970 lt_cv_sys_global_symbol_pipe=
5971 fi
5972done
5973
5974fi
5975
5976if test -z "$lt_cv_sys_global_symbol_pipe"; then
5977 lt_cv_sys_global_symbol_to_cdecl=
5978fi
5979if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3d248aec 5980 { $as_echo "$as_me:$LINENO: result: failed" >&5
ea04106b
AX
5981$as_echo "failed" >&6; }
5982else
3d248aec 5983 { $as_echo "$as_me:$LINENO: result: ok" >&5
ea04106b
AX
5984$as_echo "ok" >&6; }
5985fi
ea04106b
AX
5986
5987
5988
5989
5990
ea04106b 5991
ea04106b
AX
5992
5993
ea04106b 5994
ea04106b
AX
5995
5996
5997
5998
5999
68d83c55 6000
68d83c55
AX
6001
6002
6003
6004
6005
6006
6007
68d83c55 6008
ea04106b 6009# Check whether --enable-libtool-lock was given.
3d248aec 6010if test "${enable_libtool_lock+set}" = set; then
ea04106b
AX
6011 enableval=$enable_libtool_lock;
6012fi
6013
3d248aec 6014test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
ea04106b
AX
6015
6016# Some flags need to be propagated to the compiler or linker for good
6017# libtool support.
6018case $host in
6019ia64-*-hpux*)
3d248aec 6020 # Find out which ABI we are using.
ea04106b 6021 echo 'int i;' > conftest.$ac_ext
3d248aec 6022 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ea04106b
AX
6023 (eval $ac_compile) 2>&5
6024 ac_status=$?
3d248aec
AX
6025 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6026 (exit $ac_status); }; then
ea04106b
AX
6027 case `/usr/bin/file conftest.$ac_objext` in
6028 *ELF-32*)
3d248aec 6029 HPUX_IA64_MODE="32"
ea04106b
AX
6030 ;;
6031 *ELF-64*)
3d248aec 6032 HPUX_IA64_MODE="64"
ea04106b
AX
6033 ;;
6034 esac
6035 fi
6036 rm -rf conftest*
6037 ;;
6038*-*-irix6*)
3d248aec
AX
6039 # Find out which ABI we are using.
6040 echo '#line 6040 "configure"' > conftest.$ac_ext
6041 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ea04106b
AX
6042 (eval $ac_compile) 2>&5
6043 ac_status=$?
3d248aec
AX
6044 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6045 (exit $ac_status); }; then
6046 if test "$lt_cv_prog_gnu_ld" = yes; then
ea04106b
AX
6047 case `/usr/bin/file conftest.$ac_objext` in
6048 *32-bit*)
6049 LD="${LD-ld} -melf32bsmip"
6050 ;;
6051 *N32*)
6052 LD="${LD-ld} -melf32bmipn32"
6053 ;;
6054 *64-bit*)
6055 LD="${LD-ld} -melf64bmip"
6056 ;;
6057 esac
6058 else
6059 case `/usr/bin/file conftest.$ac_objext` in
6060 *32-bit*)
6061 LD="${LD-ld} -32"
6062 ;;
6063 *N32*)
6064 LD="${LD-ld} -n32"
6065 ;;
6066 *64-bit*)
6067 LD="${LD-ld} -64"
6068 ;;
6069 esac
6070 fi
6071 fi
6072 rm -rf conftest*
6073 ;;
6074
3d248aec 6075x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
ea04106b 6076s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3d248aec 6077 # Find out which ABI we are using.
ea04106b 6078 echo 'int i;' > conftest.$ac_ext
3d248aec 6079 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ea04106b
AX
6080 (eval $ac_compile) 2>&5
6081 ac_status=$?
3d248aec
AX
6082 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6083 (exit $ac_status); }; then
ea04106b
AX
6084 case `/usr/bin/file conftest.o` in
6085 *32-bit*)
6086 case $host in
6087 x86_64-*kfreebsd*-gnu)
6088 LD="${LD-ld} -m elf_i386_fbsd"
6089 ;;
6090 x86_64-*linux*)
3d248aec 6091 LD="${LD-ld} -m elf_i386"
68d83c55 6092 ;;
3d248aec 6093 ppc64-*linux*|powerpc64-*linux*)
ea04106b
AX
6094 LD="${LD-ld} -m elf32ppclinux"
6095 ;;
6096 s390x-*linux*)
6097 LD="${LD-ld} -m elf_s390"
6098 ;;
6099 sparc64-*linux*)
6100 LD="${LD-ld} -m elf32_sparc"
6101 ;;
6102 esac
6103 ;;
6104 *64-bit*)
6105 case $host in
6106 x86_64-*kfreebsd*-gnu)
6107 LD="${LD-ld} -m elf_x86_64_fbsd"
6108 ;;
6109 x86_64-*linux*)
6110 LD="${LD-ld} -m elf_x86_64"
6111 ;;
3d248aec 6112 ppc*-*linux*|powerpc*-*linux*)
ea04106b
AX
6113 LD="${LD-ld} -m elf64ppc"
6114 ;;
6115 s390*-*linux*|s390*-*tpf*)
6116 LD="${LD-ld} -m elf64_s390"
6117 ;;
6118 sparc*-*linux*)
6119 LD="${LD-ld} -m elf64_sparc"
6120 ;;
6121 esac
6122 ;;
6123 esac
6124 fi
6125 rm -rf conftest*
6126 ;;
6127
6128*-*-sco3.2v5*)
6129 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3d248aec 6130 SAVE_CFLAGS="$CFLAGS"
ea04106b 6131 CFLAGS="$CFLAGS -belf"
3d248aec 6132 { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
ea04106b 6133$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
3d248aec 6134if test "${lt_cv_cc_needs_belf+set}" = set; then
ea04106b
AX
6135 $as_echo_n "(cached) " >&6
6136else
6137 ac_ext=c
6138ac_cpp='$CPP $CPPFLAGS'
6139ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6140ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6141ac_compiler_gnu=$ac_cv_c_compiler_gnu
6142
3d248aec
AX
6143 cat >conftest.$ac_ext <<_ACEOF
6144/* confdefs.h. */
6145_ACEOF
6146cat confdefs.h >>conftest.$ac_ext
6147cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
6148/* end confdefs.h. */
6149
6150int
6151main ()
6152{
6153
6154 ;
6155 return 0;
6156}
6157_ACEOF
3d248aec
AX
6158rm -f conftest.$ac_objext conftest$ac_exeext
6159if { (ac_try="$ac_link"
6160case "(($ac_try" in
6161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6162 *) ac_try_echo=$ac_try;;
6163esac
6164eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6165$as_echo "$ac_try_echo") >&5
6166 (eval "$ac_link") 2>conftest.er1
6167 ac_status=$?
6168 grep -v '^ *+' conftest.er1 >conftest.err
6169 rm -f conftest.er1
6170 cat conftest.err >&5
6171 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6172 (exit $ac_status); } && {
6173 test -z "$ac_c_werror_flag" ||
6174 test ! -s conftest.err
6175 } && test -s conftest$ac_exeext && {
6176 test "$cross_compiling" = yes ||
6177 $as_test_x conftest$ac_exeext
6178 }; then
ea04106b
AX
6179 lt_cv_cc_needs_belf=yes
6180else
3d248aec
AX
6181 $as_echo "$as_me: failed program was:" >&5
6182sed 's/^/| /' conftest.$ac_ext >&5
6183
6184 lt_cv_cc_needs_belf=no
ea04106b 6185fi
3d248aec
AX
6186
6187rm -rf conftest.dSYM
6188rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6189 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
6190 ac_ext=c
6191ac_cpp='$CPP $CPPFLAGS'
6192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6194ac_compiler_gnu=$ac_cv_c_compiler_gnu
6195
6196fi
3d248aec 6197{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
ea04106b 6198$as_echo "$lt_cv_cc_needs_belf" >&6; }
3d248aec 6199 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
ea04106b 6200 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3d248aec 6201 CFLAGS="$SAVE_CFLAGS"
ea04106b
AX
6202 fi
6203 ;;
3d248aec
AX
6204sparc*-*solaris*)
6205 # Find out which ABI we are using.
ea04106b 6206 echo 'int i;' > conftest.$ac_ext
3d248aec 6207 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ea04106b
AX
6208 (eval $ac_compile) 2>&5
6209 ac_status=$?
3d248aec
AX
6210 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6211 (exit $ac_status); }; then
ea04106b
AX
6212 case `/usr/bin/file conftest.o` in
6213 *64-bit*)
6214 case $lt_cv_prog_gnu_ld in
3d248aec 6215 yes*) LD="${LD-ld} -m elf64_sparc" ;;
ea04106b
AX
6216 *)
6217 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
6218 LD="${LD-ld} -64"
6219 fi
6220 ;;
6221 esac
6222 ;;
6223 esac
6224 fi
6225 rm -rf conftest*
6226 ;;
6227esac
6228
3d248aec 6229need_locks="$enable_libtool_lock"
ea04106b
AX
6230
6231
6232 case $host_os in
6233 rhapsody* | darwin*)
6234 if test -n "$ac_tool_prefix"; then
6235 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
6236set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
3d248aec 6237{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6238$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6239if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
ea04106b
AX
6240 $as_echo_n "(cached) " >&6
6241else
6242 if test -n "$DSYMUTIL"; then
6243 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
6244else
6245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6246for as_dir in $PATH
6247do
6248 IFS=$as_save_IFS
6249 test -z "$as_dir" && as_dir=.
3d248aec
AX
6250 for ac_exec_ext in '' $ac_executable_extensions; do
6251 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6252 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
3d248aec 6253 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6254 break 2
6255 fi
6256done
3d248aec 6257done
ea04106b
AX
6258IFS=$as_save_IFS
6259
6260fi
6261fi
6262DSYMUTIL=$ac_cv_prog_DSYMUTIL
6263if test -n "$DSYMUTIL"; then
3d248aec 6264 { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
ea04106b
AX
6265$as_echo "$DSYMUTIL" >&6; }
6266else
3d248aec 6267 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6268$as_echo "no" >&6; }
6269fi
6270
6271
6272fi
6273if test -z "$ac_cv_prog_DSYMUTIL"; then
6274 ac_ct_DSYMUTIL=$DSYMUTIL
6275 # Extract the first word of "dsymutil", so it can be a program name with args.
6276set dummy dsymutil; ac_word=$2
3d248aec 6277{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6278$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6279if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
ea04106b
AX
6280 $as_echo_n "(cached) " >&6
6281else
6282 if test -n "$ac_ct_DSYMUTIL"; then
6283 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
6284else
6285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6286for as_dir in $PATH
6287do
6288 IFS=$as_save_IFS
6289 test -z "$as_dir" && as_dir=.
3d248aec
AX
6290 for ac_exec_ext in '' $ac_executable_extensions; do
6291 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6292 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
3d248aec 6293 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6294 break 2
6295 fi
6296done
3d248aec 6297done
ea04106b
AX
6298IFS=$as_save_IFS
6299
6300fi
6301fi
6302ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
6303if test -n "$ac_ct_DSYMUTIL"; then
3d248aec 6304 { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
ea04106b
AX
6305$as_echo "$ac_ct_DSYMUTIL" >&6; }
6306else
3d248aec 6307 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6308$as_echo "no" >&6; }
6309fi
6310
6311 if test "x$ac_ct_DSYMUTIL" = x; then
6312 DSYMUTIL=":"
6313 else
6314 case $cross_compiling:$ac_tool_warned in
6315yes:)
3d248aec 6316{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
6317$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6318ac_tool_warned=yes ;;
6319esac
6320 DSYMUTIL=$ac_ct_DSYMUTIL
6321 fi
6322else
6323 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
6324fi
6325
6326 if test -n "$ac_tool_prefix"; then
6327 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
6328set dummy ${ac_tool_prefix}nmedit; ac_word=$2
3d248aec 6329{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6330$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6331if test "${ac_cv_prog_NMEDIT+set}" = set; then
ea04106b
AX
6332 $as_echo_n "(cached) " >&6
6333else
6334 if test -n "$NMEDIT"; then
6335 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
6336else
6337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6338for as_dir in $PATH
6339do
6340 IFS=$as_save_IFS
6341 test -z "$as_dir" && as_dir=.
3d248aec
AX
6342 for ac_exec_ext in '' $ac_executable_extensions; do
6343 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6344 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
3d248aec 6345 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6346 break 2
6347 fi
6348done
3d248aec 6349done
ea04106b
AX
6350IFS=$as_save_IFS
6351
6352fi
6353fi
6354NMEDIT=$ac_cv_prog_NMEDIT
6355if test -n "$NMEDIT"; then
3d248aec 6356 { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
ea04106b
AX
6357$as_echo "$NMEDIT" >&6; }
6358else
3d248aec 6359 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6360$as_echo "no" >&6; }
6361fi
6362
6363
6364fi
6365if test -z "$ac_cv_prog_NMEDIT"; then
6366 ac_ct_NMEDIT=$NMEDIT
6367 # Extract the first word of "nmedit", so it can be a program name with args.
6368set dummy nmedit; ac_word=$2
3d248aec 6369{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6370$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6371if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
ea04106b
AX
6372 $as_echo_n "(cached) " >&6
6373else
6374 if test -n "$ac_ct_NMEDIT"; then
6375 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
6376else
6377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6378for as_dir in $PATH
6379do
6380 IFS=$as_save_IFS
6381 test -z "$as_dir" && as_dir=.
3d248aec
AX
6382 for ac_exec_ext in '' $ac_executable_extensions; do
6383 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6384 ac_cv_prog_ac_ct_NMEDIT="nmedit"
3d248aec 6385 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6386 break 2
6387 fi
6388done
3d248aec 6389done
ea04106b
AX
6390IFS=$as_save_IFS
6391
6392fi
6393fi
6394ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
6395if test -n "$ac_ct_NMEDIT"; then
3d248aec 6396 { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
ea04106b
AX
6397$as_echo "$ac_ct_NMEDIT" >&6; }
6398else
3d248aec 6399 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6400$as_echo "no" >&6; }
6401fi
6402
6403 if test "x$ac_ct_NMEDIT" = x; then
6404 NMEDIT=":"
6405 else
6406 case $cross_compiling:$ac_tool_warned in
6407yes:)
3d248aec 6408{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
6409$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6410ac_tool_warned=yes ;;
6411esac
6412 NMEDIT=$ac_ct_NMEDIT
6413 fi
6414else
6415 NMEDIT="$ac_cv_prog_NMEDIT"
6416fi
6417
6418 if test -n "$ac_tool_prefix"; then
6419 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
6420set dummy ${ac_tool_prefix}lipo; ac_word=$2
3d248aec 6421{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6422$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6423if test "${ac_cv_prog_LIPO+set}" = set; then
ea04106b
AX
6424 $as_echo_n "(cached) " >&6
6425else
6426 if test -n "$LIPO"; then
6427 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
6428else
6429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6430for as_dir in $PATH
6431do
6432 IFS=$as_save_IFS
6433 test -z "$as_dir" && as_dir=.
3d248aec
AX
6434 for ac_exec_ext in '' $ac_executable_extensions; do
6435 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6436 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
3d248aec 6437 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6438 break 2
6439 fi
6440done
3d248aec 6441done
ea04106b
AX
6442IFS=$as_save_IFS
6443
6444fi
6445fi
6446LIPO=$ac_cv_prog_LIPO
6447if test -n "$LIPO"; then
3d248aec 6448 { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
ea04106b
AX
6449$as_echo "$LIPO" >&6; }
6450else
3d248aec 6451 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6452$as_echo "no" >&6; }
6453fi
6454
6455
6456fi
6457if test -z "$ac_cv_prog_LIPO"; then
6458 ac_ct_LIPO=$LIPO
6459 # Extract the first word of "lipo", so it can be a program name with args.
6460set dummy lipo; ac_word=$2
3d248aec 6461{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6462$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6463if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
ea04106b
AX
6464 $as_echo_n "(cached) " >&6
6465else
6466 if test -n "$ac_ct_LIPO"; then
6467 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
6468else
6469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6470for as_dir in $PATH
6471do
6472 IFS=$as_save_IFS
6473 test -z "$as_dir" && as_dir=.
3d248aec
AX
6474 for ac_exec_ext in '' $ac_executable_extensions; do
6475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6476 ac_cv_prog_ac_ct_LIPO="lipo"
3d248aec 6477 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6478 break 2
6479 fi
6480done
3d248aec 6481done
ea04106b
AX
6482IFS=$as_save_IFS
6483
6484fi
6485fi
6486ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
6487if test -n "$ac_ct_LIPO"; then
3d248aec 6488 { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
ea04106b
AX
6489$as_echo "$ac_ct_LIPO" >&6; }
6490else
3d248aec 6491 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6492$as_echo "no" >&6; }
6493fi
6494
6495 if test "x$ac_ct_LIPO" = x; then
6496 LIPO=":"
6497 else
6498 case $cross_compiling:$ac_tool_warned in
6499yes:)
3d248aec 6500{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
6501$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6502ac_tool_warned=yes ;;
6503esac
6504 LIPO=$ac_ct_LIPO
6505 fi
6506else
6507 LIPO="$ac_cv_prog_LIPO"
6508fi
6509
6510 if test -n "$ac_tool_prefix"; then
6511 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
6512set dummy ${ac_tool_prefix}otool; ac_word=$2
3d248aec 6513{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6514$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6515if test "${ac_cv_prog_OTOOL+set}" = set; then
ea04106b
AX
6516 $as_echo_n "(cached) " >&6
6517else
6518 if test -n "$OTOOL"; then
6519 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
6520else
6521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6522for as_dir in $PATH
6523do
6524 IFS=$as_save_IFS
6525 test -z "$as_dir" && as_dir=.
3d248aec
AX
6526 for ac_exec_ext in '' $ac_executable_extensions; do
6527 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6528 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
3d248aec 6529 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6530 break 2
6531 fi
6532done
3d248aec 6533done
ea04106b
AX
6534IFS=$as_save_IFS
6535
6536fi
6537fi
6538OTOOL=$ac_cv_prog_OTOOL
6539if test -n "$OTOOL"; then
3d248aec 6540 { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
ea04106b
AX
6541$as_echo "$OTOOL" >&6; }
6542else
3d248aec 6543 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6544$as_echo "no" >&6; }
6545fi
6546
6547
6548fi
6549if test -z "$ac_cv_prog_OTOOL"; then
6550 ac_ct_OTOOL=$OTOOL
6551 # Extract the first word of "otool", so it can be a program name with args.
6552set dummy otool; ac_word=$2
3d248aec 6553{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6554$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6555if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
ea04106b
AX
6556 $as_echo_n "(cached) " >&6
6557else
6558 if test -n "$ac_ct_OTOOL"; then
6559 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
6560else
6561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6562for as_dir in $PATH
6563do
6564 IFS=$as_save_IFS
6565 test -z "$as_dir" && as_dir=.
3d248aec
AX
6566 for ac_exec_ext in '' $ac_executable_extensions; do
6567 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6568 ac_cv_prog_ac_ct_OTOOL="otool"
3d248aec 6569 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6570 break 2
6571 fi
6572done
3d248aec 6573done
ea04106b
AX
6574IFS=$as_save_IFS
6575
6576fi
6577fi
6578ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
6579if test -n "$ac_ct_OTOOL"; then
3d248aec 6580 { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
ea04106b
AX
6581$as_echo "$ac_ct_OTOOL" >&6; }
6582else
3d248aec 6583 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6584$as_echo "no" >&6; }
6585fi
6586
6587 if test "x$ac_ct_OTOOL" = x; then
6588 OTOOL=":"
6589 else
6590 case $cross_compiling:$ac_tool_warned in
6591yes:)
3d248aec 6592{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
6593$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6594ac_tool_warned=yes ;;
6595esac
6596 OTOOL=$ac_ct_OTOOL
6597 fi
6598else
6599 OTOOL="$ac_cv_prog_OTOOL"
6600fi
6601
6602 if test -n "$ac_tool_prefix"; then
6603 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
6604set dummy ${ac_tool_prefix}otool64; ac_word=$2
3d248aec 6605{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6606$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6607if test "${ac_cv_prog_OTOOL64+set}" = set; then
ea04106b
AX
6608 $as_echo_n "(cached) " >&6
6609else
6610 if test -n "$OTOOL64"; then
6611 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
6612else
6613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6614for as_dir in $PATH
6615do
6616 IFS=$as_save_IFS
6617 test -z "$as_dir" && as_dir=.
3d248aec
AX
6618 for ac_exec_ext in '' $ac_executable_extensions; do
6619 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6620 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
3d248aec 6621 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6622 break 2
6623 fi
6624done
3d248aec 6625done
ea04106b
AX
6626IFS=$as_save_IFS
6627
6628fi
6629fi
6630OTOOL64=$ac_cv_prog_OTOOL64
6631if test -n "$OTOOL64"; then
3d248aec 6632 { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5
ea04106b
AX
6633$as_echo "$OTOOL64" >&6; }
6634else
3d248aec 6635 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6636$as_echo "no" >&6; }
6637fi
6638
6639
6640fi
6641if test -z "$ac_cv_prog_OTOOL64"; then
6642 ac_ct_OTOOL64=$OTOOL64
6643 # Extract the first word of "otool64", so it can be a program name with args.
6644set dummy otool64; ac_word=$2
3d248aec 6645{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
ea04106b 6646$as_echo_n "checking for $ac_word... " >&6; }
3d248aec 6647if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
ea04106b
AX
6648 $as_echo_n "(cached) " >&6
6649else
6650 if test -n "$ac_ct_OTOOL64"; then
6651 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
6652else
6653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6654for as_dir in $PATH
6655do
6656 IFS=$as_save_IFS
6657 test -z "$as_dir" && as_dir=.
3d248aec
AX
6658 for ac_exec_ext in '' $ac_executable_extensions; do
6659 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ea04106b 6660 ac_cv_prog_ac_ct_OTOOL64="otool64"
3d248aec 6661 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
ea04106b
AX
6662 break 2
6663 fi
6664done
3d248aec 6665done
ea04106b
AX
6666IFS=$as_save_IFS
6667
6668fi
6669fi
6670ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
6671if test -n "$ac_ct_OTOOL64"; then
3d248aec 6672 { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
ea04106b
AX
6673$as_echo "$ac_ct_OTOOL64" >&6; }
6674else
3d248aec 6675 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
6676$as_echo "no" >&6; }
6677fi
6678
6679 if test "x$ac_ct_OTOOL64" = x; then
6680 OTOOL64=":"
6681 else
6682 case $cross_compiling:$ac_tool_warned in
6683yes:)
3d248aec 6684{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
ea04106b
AX
6685$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6686ac_tool_warned=yes ;;
6687esac
6688 OTOOL64=$ac_ct_OTOOL64
6689 fi
6690else
6691 OTOOL64="$ac_cv_prog_OTOOL64"
6692fi
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
3d248aec 6720 { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
ea04106b 6721$as_echo_n "checking for -single_module linker flag... " >&6; }
3d248aec 6722if test "${lt_cv_apple_cc_single_mod+set}" = set; then
ea04106b
AX
6723 $as_echo_n "(cached) " >&6
6724else
6725 lt_cv_apple_cc_single_mod=no
3d248aec 6726 if test -z "${LT_MULTI_MODULE}"; then
ea04106b
AX
6727 # By default we will add the -single_module flag. You can override
6728 # by either setting the environment variable LT_MULTI_MODULE
6729 # non-empty at configure time, or by adding -multi_module to the
6730 # link flags.
6731 rm -rf libconftest.dylib*
6732 echo "int foo(void){return 1;}" > conftest.c
6733 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6734-dynamiclib -Wl,-single_module conftest.c" >&5
6735 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
6736 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
6737 _lt_result=$?
3d248aec 6738 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
ea04106b
AX
6739 lt_cv_apple_cc_single_mod=yes
6740 else
6741 cat conftest.err >&5
6742 fi
6743 rm -rf libconftest.dylib*
6744 rm -f conftest.*
6745 fi
6746fi
3d248aec 6747{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
ea04106b 6748$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
3d248aec 6749 { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
ea04106b 6750$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
3d248aec 6751if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
ea04106b
AX
6752 $as_echo_n "(cached) " >&6
6753else
6754 lt_cv_ld_exported_symbols_list=no
6755 save_LDFLAGS=$LDFLAGS
6756 echo "_main" > conftest.sym
6757 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3d248aec
AX
6758 cat >conftest.$ac_ext <<_ACEOF
6759/* confdefs.h. */
6760_ACEOF
6761cat confdefs.h >>conftest.$ac_ext
6762cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
6763/* end confdefs.h. */
6764
6765int
6766main ()
6767{
6768
6769 ;
6770 return 0;
6771}
6772_ACEOF
3d248aec
AX
6773rm -f conftest.$ac_objext conftest$ac_exeext
6774if { (ac_try="$ac_link"
6775case "(($ac_try" in
6776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6777 *) ac_try_echo=$ac_try;;
6778esac
6779eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6780$as_echo "$ac_try_echo") >&5
6781 (eval "$ac_link") 2>conftest.er1
6782 ac_status=$?
6783 grep -v '^ *+' conftest.er1 >conftest.err
6784 rm -f conftest.er1
6785 cat conftest.err >&5
6786 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6787 (exit $ac_status); } && {
6788 test -z "$ac_c_werror_flag" ||
6789 test ! -s conftest.err
6790 } && test -s conftest$ac_exeext && {
6791 test "$cross_compiling" = yes ||
6792 $as_test_x conftest$ac_exeext
6793 }; then
ea04106b
AX
6794 lt_cv_ld_exported_symbols_list=yes
6795else
3d248aec
AX
6796 $as_echo "$as_me: failed program was:" >&5
6797sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 6798
3d248aec 6799 lt_cv_ld_exported_symbols_list=no
ea04106b 6800fi
ea04106b 6801
3d248aec
AX
6802rm -rf conftest.dSYM
6803rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6804 conftest$ac_exeext conftest.$ac_ext
6805 LDFLAGS="$save_LDFLAGS"
ea04106b
AX
6806
6807fi
3d248aec
AX
6808{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
6809$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
ea04106b
AX
6810 case $host_os in
6811 rhapsody* | darwin1.[012])
3d248aec 6812 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
ea04106b 6813 darwin1.*)
3d248aec 6814 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
ea04106b
AX
6815 darwin*) # darwin 5.x on
6816 # if running on 10.5 or later, the deployment target defaults
6817 # to the OS version, if on x86, and 10.4, the deployment
6818 # target defaults to 10.4. Don't you love it?
6819 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
6820 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
3d248aec
AX
6821 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
6822 10.[012]*)
6823 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
ea04106b 6824 10.*)
3d248aec 6825 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
ea04106b
AX
6826 esac
6827 ;;
6828 esac
3d248aec 6829 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
ea04106b
AX
6830 _lt_dar_single_mod='$single_module'
6831 fi
3d248aec
AX
6832 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
6833 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
ea04106b 6834 else
3d248aec 6835 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
ea04106b 6836 fi
3d248aec 6837 if test "$DSYMUTIL" != ":"; then
ea04106b
AX
6838 _lt_dsymutil='~$DSYMUTIL $lib || :'
6839 else
6840 _lt_dsymutil=
6841 fi
6842 ;;
6843 esac
6844
6845ac_ext=c
6846ac_cpp='$CPP $CPPFLAGS'
6847ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6848ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6849ac_compiler_gnu=$ac_cv_c_compiler_gnu
3d248aec 6850{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
ea04106b
AX
6851$as_echo_n "checking how to run the C preprocessor... " >&6; }
6852# On Suns, sometimes $CPP names a directory.
6853if test -n "$CPP" && test -d "$CPP"; then
6854 CPP=
6855fi
6856if test -z "$CPP"; then
3d248aec 6857 if test "${ac_cv_prog_CPP+set}" = set; then
ea04106b
AX
6858 $as_echo_n "(cached) " >&6
6859else
6860 # Double quotes because CPP needs to be expanded
6861 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6862 do
6863 ac_preproc_ok=false
6864for ac_c_preproc_warn_flag in '' yes
6865do
6866 # Use a header file that comes with gcc, so configuring glibc
6867 # with a fresh cross-compiler works.
6868 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6869 # <limits.h> exists even on freestanding compilers.
6870 # On the NeXT, cc -E runs the code through the compiler's parser,
6871 # not just through cpp. "Syntax error" is here to catch this case.
3d248aec
AX
6872 cat >conftest.$ac_ext <<_ACEOF
6873/* confdefs.h. */
6874_ACEOF
6875cat confdefs.h >>conftest.$ac_ext
6876cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
6877/* end confdefs.h. */
6878#ifdef __STDC__
6879# include <limits.h>
6880#else
6881# include <assert.h>
6882#endif
6883 Syntax error
6884_ACEOF
3d248aec
AX
6885if { (ac_try="$ac_cpp conftest.$ac_ext"
6886case "(($ac_try" in
6887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6888 *) ac_try_echo=$ac_try;;
6889esac
6890eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6891$as_echo "$ac_try_echo") >&5
6892 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6893 ac_status=$?
6894 grep -v '^ *+' conftest.er1 >conftest.err
6895 rm -f conftest.er1
6896 cat conftest.err >&5
6897 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6898 (exit $ac_status); } >/dev/null && {
6899 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6900 test ! -s conftest.err
6901 }; then
6902 :
ea04106b 6903else
3d248aec
AX
6904 $as_echo "$as_me: failed program was:" >&5
6905sed 's/^/| /' conftest.$ac_ext >&5
6906
ea04106b
AX
6907 # Broken: fails on valid input.
6908continue
6909fi
3d248aec
AX
6910
6911rm -f conftest.err conftest.$ac_ext
ea04106b
AX
6912
6913 # OK, works on sane cases. Now check whether nonexistent headers
6914 # can be detected and how.
3d248aec
AX
6915 cat >conftest.$ac_ext <<_ACEOF
6916/* confdefs.h. */
6917_ACEOF
6918cat confdefs.h >>conftest.$ac_ext
6919cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
6920/* end confdefs.h. */
6921#include <ac_nonexistent.h>
6922_ACEOF
3d248aec
AX
6923if { (ac_try="$ac_cpp conftest.$ac_ext"
6924case "(($ac_try" in
6925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6926 *) ac_try_echo=$ac_try;;
6927esac
6928eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6929$as_echo "$ac_try_echo") >&5
6930 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6931 ac_status=$?
6932 grep -v '^ *+' conftest.er1 >conftest.err
6933 rm -f conftest.er1
6934 cat conftest.err >&5
6935 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6936 (exit $ac_status); } >/dev/null && {
6937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6938 test ! -s conftest.err
6939 }; then
ea04106b
AX
6940 # Broken: success on invalid input.
6941continue
6942else
3d248aec
AX
6943 $as_echo "$as_me: failed program was:" >&5
6944sed 's/^/| /' conftest.$ac_ext >&5
6945
ea04106b
AX
6946 # Passes both tests.
6947ac_preproc_ok=:
6948break
6949fi
3d248aec
AX
6950
6951rm -f conftest.err conftest.$ac_ext
ea04106b
AX
6952
6953done
6954# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3d248aec
AX
6955rm -f conftest.err conftest.$ac_ext
6956if $ac_preproc_ok; then
ea04106b
AX
6957 break
6958fi
6959
6960 done
6961 ac_cv_prog_CPP=$CPP
6962
6963fi
6964 CPP=$ac_cv_prog_CPP
6965else
6966 ac_cv_prog_CPP=$CPP
6967fi
3d248aec 6968{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
ea04106b
AX
6969$as_echo "$CPP" >&6; }
6970ac_preproc_ok=false
6971for ac_c_preproc_warn_flag in '' yes
6972do
6973 # Use a header file that comes with gcc, so configuring glibc
6974 # with a fresh cross-compiler works.
6975 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6976 # <limits.h> exists even on freestanding compilers.
6977 # On the NeXT, cc -E runs the code through the compiler's parser,
6978 # not just through cpp. "Syntax error" is here to catch this case.
3d248aec
AX
6979 cat >conftest.$ac_ext <<_ACEOF
6980/* confdefs.h. */
6981_ACEOF
6982cat confdefs.h >>conftest.$ac_ext
6983cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
6984/* end confdefs.h. */
6985#ifdef __STDC__
6986# include <limits.h>
6987#else
6988# include <assert.h>
6989#endif
6990 Syntax error
6991_ACEOF
3d248aec
AX
6992if { (ac_try="$ac_cpp conftest.$ac_ext"
6993case "(($ac_try" in
6994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6995 *) ac_try_echo=$ac_try;;
6996esac
6997eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6998$as_echo "$ac_try_echo") >&5
6999 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7000 ac_status=$?
7001 grep -v '^ *+' conftest.er1 >conftest.err
7002 rm -f conftest.er1
7003 cat conftest.err >&5
7004 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7005 (exit $ac_status); } >/dev/null && {
7006 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7007 test ! -s conftest.err
7008 }; then
7009 :
ea04106b 7010else
3d248aec
AX
7011 $as_echo "$as_me: failed program was:" >&5
7012sed 's/^/| /' conftest.$ac_ext >&5
7013
ea04106b
AX
7014 # Broken: fails on valid input.
7015continue
7016fi
3d248aec
AX
7017
7018rm -f conftest.err conftest.$ac_ext
ea04106b
AX
7019
7020 # OK, works on sane cases. Now check whether nonexistent headers
7021 # can be detected and how.
3d248aec
AX
7022 cat >conftest.$ac_ext <<_ACEOF
7023/* confdefs.h. */
7024_ACEOF
7025cat confdefs.h >>conftest.$ac_ext
7026cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
7027/* end confdefs.h. */
7028#include <ac_nonexistent.h>
7029_ACEOF
3d248aec
AX
7030if { (ac_try="$ac_cpp conftest.$ac_ext"
7031case "(($ac_try" in
7032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7033 *) ac_try_echo=$ac_try;;
7034esac
7035eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7036$as_echo "$ac_try_echo") >&5
7037 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7038 ac_status=$?
7039 grep -v '^ *+' conftest.er1 >conftest.err
7040 rm -f conftest.er1
7041 cat conftest.err >&5
7042 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043 (exit $ac_status); } >/dev/null && {
7044 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7045 test ! -s conftest.err
7046 }; then
ea04106b
AX
7047 # Broken: success on invalid input.
7048continue
7049else
3d248aec
AX
7050 $as_echo "$as_me: failed program was:" >&5
7051sed 's/^/| /' conftest.$ac_ext >&5
7052
ea04106b
AX
7053 # Passes both tests.
7054ac_preproc_ok=:
7055break
7056fi
3d248aec
AX
7057
7058rm -f conftest.err conftest.$ac_ext
ea04106b
AX
7059
7060done
7061# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3d248aec
AX
7062rm -f conftest.err conftest.$ac_ext
7063if $ac_preproc_ok; then
7064 :
ea04106b 7065else
3d248aec 7066 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 7067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
7068{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
7069See \`config.log' for more details." >&5
7070$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
7071See \`config.log' for more details." >&2;}
7072 { (exit 1); exit 1; }; }; }
ea04106b
AX
7073fi
7074
7075ac_ext=c
7076ac_cpp='$CPP $CPPFLAGS'
7077ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7078ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7079ac_compiler_gnu=$ac_cv_c_compiler_gnu
7080
7081
3d248aec 7082{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
ea04106b 7083$as_echo_n "checking for ANSI C header files... " >&6; }
3d248aec 7084if test "${ac_cv_header_stdc+set}" = set; then
ea04106b
AX
7085 $as_echo_n "(cached) " >&6
7086else
3d248aec
AX
7087 cat >conftest.$ac_ext <<_ACEOF
7088/* confdefs.h. */
7089_ACEOF
7090cat confdefs.h >>conftest.$ac_ext
7091cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
7092/* end confdefs.h. */
7093#include <stdlib.h>
7094#include <stdarg.h>
7095#include <string.h>
7096#include <float.h>
7097
7098int
7099main ()
7100{
7101
7102 ;
7103 return 0;
7104}
7105_ACEOF
3d248aec
AX
7106rm -f conftest.$ac_objext
7107if { (ac_try="$ac_compile"
7108case "(($ac_try" in
7109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7110 *) ac_try_echo=$ac_try;;
7111esac
7112eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7113$as_echo "$ac_try_echo") >&5
7114 (eval "$ac_compile") 2>conftest.er1
7115 ac_status=$?
7116 grep -v '^ *+' conftest.er1 >conftest.err
7117 rm -f conftest.er1
7118 cat conftest.err >&5
7119 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7120 (exit $ac_status); } && {
7121 test -z "$ac_c_werror_flag" ||
7122 test ! -s conftest.err
7123 } && test -s conftest.$ac_objext; then
ea04106b
AX
7124 ac_cv_header_stdc=yes
7125else
3d248aec
AX
7126 $as_echo "$as_me: failed program was:" >&5
7127sed 's/^/| /' conftest.$ac_ext >&5
7128
7129 ac_cv_header_stdc=no
ea04106b 7130fi
3d248aec 7131
ea04106b
AX
7132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7133
7134if test $ac_cv_header_stdc = yes; then
7135 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3d248aec
AX
7136 cat >conftest.$ac_ext <<_ACEOF
7137/* confdefs.h. */
7138_ACEOF
7139cat confdefs.h >>conftest.$ac_ext
7140cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
7141/* end confdefs.h. */
7142#include <string.h>
7143
7144_ACEOF
7145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3d248aec
AX
7146 $EGREP "memchr" >/dev/null 2>&1; then
7147 :
ea04106b
AX
7148else
7149 ac_cv_header_stdc=no
7150fi
7151rm -f conftest*
7152
7153fi
7154
7155if test $ac_cv_header_stdc = yes; then
7156 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3d248aec
AX
7157 cat >conftest.$ac_ext <<_ACEOF
7158/* confdefs.h. */
7159_ACEOF
7160cat confdefs.h >>conftest.$ac_ext
7161cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
7162/* end confdefs.h. */
7163#include <stdlib.h>
7164
7165_ACEOF
7166if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3d248aec
AX
7167 $EGREP "free" >/dev/null 2>&1; then
7168 :
ea04106b
AX
7169else
7170 ac_cv_header_stdc=no
7171fi
7172rm -f conftest*
7173
7174fi
7175
7176if test $ac_cv_header_stdc = yes; then
7177 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3d248aec 7178 if test "$cross_compiling" = yes; then
ea04106b
AX
7179 :
7180else
3d248aec
AX
7181 cat >conftest.$ac_ext <<_ACEOF
7182/* confdefs.h. */
7183_ACEOF
7184cat confdefs.h >>conftest.$ac_ext
7185cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
7186/* end confdefs.h. */
7187#include <ctype.h>
7188#include <stdlib.h>
7189#if ((' ' & 0x0FF) == 0x020)
7190# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7191# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7192#else
7193# define ISLOWER(c) \
7194 (('a' <= (c) && (c) <= 'i') \
7195 || ('j' <= (c) && (c) <= 'r') \
7196 || ('s' <= (c) && (c) <= 'z'))
7197# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7198#endif
7199
7200#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7201int
7202main ()
7203{
7204 int i;
7205 for (i = 0; i < 256; i++)
7206 if (XOR (islower (i), ISLOWER (i))
7207 || toupper (i) != TOUPPER (i))
7208 return 2;
7209 return 0;
7210}
7211_ACEOF
3d248aec
AX
7212rm -f conftest$ac_exeext
7213if { (ac_try="$ac_link"
7214case "(($ac_try" in
7215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7216 *) ac_try_echo=$ac_try;;
7217esac
7218eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7219$as_echo "$ac_try_echo") >&5
7220 (eval "$ac_link") 2>&5
7221 ac_status=$?
7222 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7223 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7224 { (case "(($ac_try" in
7225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7226 *) ac_try_echo=$ac_try;;
7227esac
7228eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7229$as_echo "$ac_try_echo") >&5
7230 (eval "$ac_try") 2>&5
7231 ac_status=$?
7232 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7233 (exit $ac_status); }; }; then
7234 :
ea04106b 7235else
3d248aec
AX
7236 $as_echo "$as_me: program exited with status $ac_status" >&5
7237$as_echo "$as_me: failed program was:" >&5
7238sed 's/^/| /' conftest.$ac_ext >&5
7239
7240( exit $ac_status )
7241ac_cv_header_stdc=no
ea04106b 7242fi
3d248aec
AX
7243rm -rf conftest.dSYM
7244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ea04106b
AX
7245fi
7246
3d248aec 7247
ea04106b
AX
7248fi
7249fi
3d248aec 7250{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
ea04106b
AX
7251$as_echo "$ac_cv_header_stdc" >&6; }
7252if test $ac_cv_header_stdc = yes; then
7253
3d248aec
AX
7254cat >>confdefs.h <<\_ACEOF
7255#define STDC_HEADERS 1
7256_ACEOF
ea04106b
AX
7257
7258fi
7259
7260# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3d248aec
AX
7261
7262
7263
7264
7265
7266
7267
7268
7269
ea04106b
AX
7270for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7271 inttypes.h stdint.h unistd.h
3d248aec
AX
7272do
7273as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7274{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
7275$as_echo_n "checking for $ac_header... " >&6; }
7276if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7277 $as_echo_n "(cached) " >&6
7278else
7279 cat >conftest.$ac_ext <<_ACEOF
7280/* confdefs.h. */
7281_ACEOF
7282cat confdefs.h >>conftest.$ac_ext
7283cat >>conftest.$ac_ext <<_ACEOF
7284/* end confdefs.h. */
7285$ac_includes_default
7286
7287#include <$ac_header>
7288_ACEOF
7289rm -f conftest.$ac_objext
7290if { (ac_try="$ac_compile"
7291case "(($ac_try" in
7292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7293 *) ac_try_echo=$ac_try;;
7294esac
7295eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7296$as_echo "$ac_try_echo") >&5
7297 (eval "$ac_compile") 2>conftest.er1
7298 ac_status=$?
7299 grep -v '^ *+' conftest.er1 >conftest.err
7300 rm -f conftest.er1
7301 cat conftest.err >&5
7302 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7303 (exit $ac_status); } && {
7304 test -z "$ac_c_werror_flag" ||
7305 test ! -s conftest.err
7306 } && test -s conftest.$ac_objext; then
7307 eval "$as_ac_Header=yes"
7308else
7309 $as_echo "$as_me: failed program was:" >&5
7310sed 's/^/| /' conftest.$ac_ext >&5
7311
7312 eval "$as_ac_Header=no"
7313fi
7314
7315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7316fi
7317ac_res=`eval 'as_val=${'$as_ac_Header'}
7318 $as_echo "$as_val"'`
7319 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7320$as_echo "$ac_res" >&6; }
7321as_val=`eval 'as_val=${'$as_ac_Header'}
7322 $as_echo "$as_val"'`
7323 if test "x$as_val" = x""yes; then
ea04106b
AX
7324 cat >>confdefs.h <<_ACEOF
7325#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7326_ACEOF
7327
7328fi
7329
7330done
7331
7332
3d248aec 7333
ea04106b 7334for ac_header in dlfcn.h
3d248aec
AX
7335do
7336as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7337{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
7338$as_echo_n "checking for $ac_header... " >&6; }
7339if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7340 $as_echo_n "(cached) " >&6
7341else
7342 cat >conftest.$ac_ext <<_ACEOF
7343/* confdefs.h. */
7344_ACEOF
7345cat confdefs.h >>conftest.$ac_ext
7346cat >>conftest.$ac_ext <<_ACEOF
7347/* end confdefs.h. */
7348$ac_includes_default
7349
7350#include <$ac_header>
ea04106b 7351_ACEOF
3d248aec
AX
7352rm -f conftest.$ac_objext
7353if { (ac_try="$ac_compile"
7354case "(($ac_try" in
7355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7356 *) ac_try_echo=$ac_try;;
7357esac
7358eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7359$as_echo "$ac_try_echo") >&5
7360 (eval "$ac_compile") 2>conftest.er1
7361 ac_status=$?
7362 grep -v '^ *+' conftest.er1 >conftest.err
7363 rm -f conftest.er1
7364 cat conftest.err >&5
7365 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7366 (exit $ac_status); } && {
7367 test -z "$ac_c_werror_flag" ||
7368 test ! -s conftest.err
7369 } && test -s conftest.$ac_objext; then
7370 eval "$as_ac_Header=yes"
7371else
7372 $as_echo "$as_me: failed program was:" >&5
7373sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 7374
3d248aec 7375 eval "$as_ac_Header=no"
ea04106b
AX
7376fi
7377
3d248aec
AX
7378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7379fi
7380ac_res=`eval 'as_val=${'$as_ac_Header'}
7381 $as_echo "$as_val"'`
7382 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7383$as_echo "$ac_res" >&6; }
7384as_val=`eval 'as_val=${'$as_ac_Header'}
7385 $as_echo "$as_val"'`
7386 if test "x$as_val" = x""yes; then
7387 cat >>confdefs.h <<_ACEOF
7388#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7389_ACEOF
ea04106b 7390
3d248aec 7391fi
ea04106b 7392
3d248aec 7393done
ea04106b
AX
7394
7395
7396
7397# Set options
7398
7399
7400
7401 enable_dlopen=no
7402
7403
7404 enable_win32_dll=no
7405
7406
7407 # Check whether --enable-shared was given.
3d248aec 7408if test "${enable_shared+set}" = set; then
ea04106b
AX
7409 enableval=$enable_shared; p=${PACKAGE-default}
7410 case $enableval in
7411 yes) enable_shared=yes ;;
7412 no) enable_shared=no ;;
7413 *)
7414 enable_shared=no
7415 # Look at the argument we got. We use all the common list separators.
3d248aec 7416 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
ea04106b 7417 for pkg in $enableval; do
3d248aec 7418 IFS="$lt_save_ifs"
ea04106b
AX
7419 if test "X$pkg" = "X$p"; then
7420 enable_shared=yes
7421 fi
7422 done
3d248aec 7423 IFS="$lt_save_ifs"
ea04106b
AX
7424 ;;
7425 esac
7426else
7427 enable_shared=yes
7428fi
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438 # Check whether --enable-static was given.
3d248aec 7439if test "${enable_static+set}" = set; then
ea04106b
AX
7440 enableval=$enable_static; p=${PACKAGE-default}
7441 case $enableval in
7442 yes) enable_static=yes ;;
7443 no) enable_static=no ;;
7444 *)
7445 enable_static=no
7446 # Look at the argument we got. We use all the common list separators.
3d248aec 7447 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
ea04106b 7448 for pkg in $enableval; do
3d248aec 7449 IFS="$lt_save_ifs"
ea04106b
AX
7450 if test "X$pkg" = "X$p"; then
7451 enable_static=yes
7452 fi
7453 done
3d248aec 7454 IFS="$lt_save_ifs"
ea04106b
AX
7455 ;;
7456 esac
7457else
7458 enable_static=yes
7459fi
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470# Check whether --with-pic was given.
3d248aec
AX
7471if test "${with_pic+set}" = set; then
7472 withval=$with_pic; pic_mode="$withval"
ea04106b
AX
7473else
7474 pic_mode=default
7475fi
7476
7477
3d248aec
AX
7478test -z "$pic_mode" && pic_mode=default
7479
ea04106b
AX
7480
7481
7482
7483
7484
7485
7486 # Check whether --enable-fast-install was given.
3d248aec 7487if test "${enable_fast_install+set}" = set; then
ea04106b
AX
7488 enableval=$enable_fast_install; p=${PACKAGE-default}
7489 case $enableval in
7490 yes) enable_fast_install=yes ;;
7491 no) enable_fast_install=no ;;
7492 *)
7493 enable_fast_install=no
7494 # Look at the argument we got. We use all the common list separators.
3d248aec 7495 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
ea04106b 7496 for pkg in $enableval; do
3d248aec 7497 IFS="$lt_save_ifs"
ea04106b
AX
7498 if test "X$pkg" = "X$p"; then
7499 enable_fast_install=yes
7500 fi
7501 done
3d248aec 7502 IFS="$lt_save_ifs"
ea04106b
AX
7503 ;;
7504 esac
7505else
7506 enable_fast_install=yes
7507fi
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519# This can be used to rebuild libtool when needed
3d248aec 7520LIBTOOL_DEPS="$ltmain"
ea04106b
AX
7521
7522# Always use our own libtool.
7523LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
ea04106b
AX
7543
7544
7545
7546
7547
7548
7549test -z "$LN_S" && LN_S="ln -s"
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
3d248aec 7564if test -n "${ZSH_VERSION+set}" ; then
ea04106b
AX
7565 setopt NO_GLOB_SUBST
7566fi
7567
3d248aec 7568{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
ea04106b 7569$as_echo_n "checking for objdir... " >&6; }
3d248aec 7570if test "${lt_cv_objdir+set}" = set; then
ea04106b
AX
7571 $as_echo_n "(cached) " >&6
7572else
7573 rm -f .libs 2>/dev/null
7574mkdir .libs 2>/dev/null
7575if test -d .libs; then
7576 lt_cv_objdir=.libs
7577else
7578 # MS-DOS does not allow filenames that begin with a dot.
7579 lt_cv_objdir=_libs
7580fi
7581rmdir .libs 2>/dev/null
7582fi
3d248aec 7583{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
ea04106b
AX
7584$as_echo "$lt_cv_objdir" >&6; }
7585objdir=$lt_cv_objdir
7586
7587
7588
7589
7590
7591cat >>confdefs.h <<_ACEOF
7592#define LT_OBJDIR "$lt_cv_objdir/"
7593_ACEOF
7594
7595
7596
7597
3d248aec
AX
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
ea04106b
AX
7611case $host_os in
7612aix3*)
7613 # AIX sometimes has problems with the GCC collect2 program. For some
7614 # reason, if we set the COLLECT_NAMES environment variable, the problems
7615 # vanish in a puff of smoke.
3d248aec 7616 if test "X${COLLECT_NAMES+set}" != Xset; then
ea04106b
AX
7617 COLLECT_NAMES=
7618 export COLLECT_NAMES
7619 fi
7620 ;;
7621esac
7622
3d248aec
AX
7623# Sed substitution that helps us do robust quoting. It backslashifies
7624# metacharacters that are still active within double-quoted strings.
7625sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7626
7627# Same as above, but do not quote variable references.
7628double_quote_subst='s/\(["`\\]\)/\\\1/g'
7629
7630# Sed substitution to delay expansion of an escaped shell variable in a
7631# double_quote_subst'ed string.
7632delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7633
7634# Sed substitution to delay expansion of an escaped single quote.
7635delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7636
7637# Sed substitution to avoid accidental globbing in evaled expressions
7638no_glob_subst='s/\*/\\\*/g'
7639
ea04106b
AX
7640# Global variables:
7641ofile=libtool
7642can_build_shared=yes
7643
3d248aec 7644# All known linkers require a `.a' archive for static linking (except MSVC,
ea04106b
AX
7645# which needs '.lib').
7646libext=a
7647
3d248aec 7648with_gnu_ld="$lt_cv_prog_gnu_ld"
ea04106b 7649
3d248aec
AX
7650old_CC="$CC"
7651old_CFLAGS="$CFLAGS"
ea04106b
AX
7652
7653# Set sane defaults for various variables
7654test -z "$CC" && CC=cc
7655test -z "$LTCC" && LTCC=$CC
7656test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
7657test -z "$LD" && LD=ld
7658test -z "$ac_objext" && ac_objext=o
7659
3d248aec
AX
7660for cc_temp in $compiler""; do
7661 case $cc_temp in
7662 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7663 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7664 \-*) ;;
7665 *) break;;
7666 esac
7667done
7668cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
ea04106b
AX
7669
7670
7671# Only perform the check for file, if the check method requires it
7672test -z "$MAGIC_CMD" && MAGIC_CMD=file
7673case $deplibs_check_method in
7674file_magic*)
7675 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3d248aec 7676 { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
ea04106b 7677$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
3d248aec 7678if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
ea04106b
AX
7679 $as_echo_n "(cached) " >&6
7680else
7681 case $MAGIC_CMD in
7682[\\/*] | ?:[\\/]*)
3d248aec 7683 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ea04106b
AX
7684 ;;
7685*)
3d248aec
AX
7686 lt_save_MAGIC_CMD="$MAGIC_CMD"
7687 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
ea04106b
AX
7688 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7689 for ac_dir in $ac_dummy; do
3d248aec 7690 IFS="$lt_save_ifs"
ea04106b 7691 test -z "$ac_dir" && ac_dir=.
3d248aec
AX
7692 if test -f $ac_dir/${ac_tool_prefix}file; then
7693 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
ea04106b
AX
7694 if test -n "$file_magic_test_file"; then
7695 case $deplibs_check_method in
7696 "file_magic "*)
7697 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3d248aec 7698 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ea04106b
AX
7699 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7700 $EGREP "$file_magic_regex" > /dev/null; then
7701 :
7702 else
7703 cat <<_LT_EOF 1>&2
7704
7705*** Warning: the command libtool uses to detect shared libraries,
7706*** $file_magic_cmd, produces output that libtool cannot recognize.
7707*** The result is that libtool may fail to recognize shared libraries
7708*** as such. This will affect the creation of libtool libraries that
7709*** depend on shared libraries, but programs linked with such libtool
7710*** libraries will work regardless of this problem. Nevertheless, you
7711*** may want to report the problem to your system manager and/or to
7712*** bug-libtool@gnu.org
7713
7714_LT_EOF
7715 fi ;;
7716 esac
7717 fi
7718 break
7719 fi
7720 done
3d248aec
AX
7721 IFS="$lt_save_ifs"
7722 MAGIC_CMD="$lt_save_MAGIC_CMD"
ea04106b
AX
7723 ;;
7724esac
7725fi
7726
3d248aec 7727MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ea04106b 7728if test -n "$MAGIC_CMD"; then
3d248aec 7729 { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
ea04106b
AX
7730$as_echo "$MAGIC_CMD" >&6; }
7731else
3d248aec 7732 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
7733$as_echo "no" >&6; }
7734fi
7735
7736
7737
7738
7739
7740if test -z "$lt_cv_path_MAGIC_CMD"; then
7741 if test -n "$ac_tool_prefix"; then
3d248aec 7742 { $as_echo "$as_me:$LINENO: checking for file" >&5
ea04106b 7743$as_echo_n "checking for file... " >&6; }
3d248aec 7744if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
ea04106b
AX
7745 $as_echo_n "(cached) " >&6
7746else
7747 case $MAGIC_CMD in
7748[\\/*] | ?:[\\/]*)
3d248aec 7749 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
ea04106b
AX
7750 ;;
7751*)
3d248aec
AX
7752 lt_save_MAGIC_CMD="$MAGIC_CMD"
7753 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
ea04106b
AX
7754 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7755 for ac_dir in $ac_dummy; do
3d248aec 7756 IFS="$lt_save_ifs"
ea04106b 7757 test -z "$ac_dir" && ac_dir=.
3d248aec
AX
7758 if test -f $ac_dir/file; then
7759 lt_cv_path_MAGIC_CMD="$ac_dir/file"
ea04106b
AX
7760 if test -n "$file_magic_test_file"; then
7761 case $deplibs_check_method in
7762 "file_magic "*)
7763 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3d248aec 7764 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ea04106b
AX
7765 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7766 $EGREP "$file_magic_regex" > /dev/null; then
7767 :
7768 else
7769 cat <<_LT_EOF 1>&2
7770
7771*** Warning: the command libtool uses to detect shared libraries,
7772*** $file_magic_cmd, produces output that libtool cannot recognize.
7773*** The result is that libtool may fail to recognize shared libraries
7774*** as such. This will affect the creation of libtool libraries that
7775*** depend on shared libraries, but programs linked with such libtool
7776*** libraries will work regardless of this problem. Nevertheless, you
7777*** may want to report the problem to your system manager and/or to
7778*** bug-libtool@gnu.org
7779
7780_LT_EOF
7781 fi ;;
7782 esac
7783 fi
7784 break
7785 fi
7786 done
3d248aec
AX
7787 IFS="$lt_save_ifs"
7788 MAGIC_CMD="$lt_save_MAGIC_CMD"
ea04106b
AX
7789 ;;
7790esac
7791fi
7792
3d248aec 7793MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
ea04106b 7794if test -n "$MAGIC_CMD"; then
3d248aec 7795 { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
ea04106b
AX
7796$as_echo "$MAGIC_CMD" >&6; }
7797else
3d248aec 7798 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
7799$as_echo "no" >&6; }
7800fi
7801
7802
7803 else
7804 MAGIC_CMD=:
7805 fi
7806fi
7807
7808 fi
7809 ;;
7810esac
7811
7812# Use C for the default configuration in the libtool script
7813
3d248aec 7814lt_save_CC="$CC"
ea04106b
AX
7815ac_ext=c
7816ac_cpp='$CPP $CPPFLAGS'
7817ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7818ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7819ac_compiler_gnu=$ac_cv_c_compiler_gnu
7820
7821
7822# Source file extension for C test sources.
7823ac_ext=c
7824
7825# Object file extension for compiled C test sources.
7826objext=o
7827objext=$objext
7828
7829# Code to be used in simple compile tests
7830lt_simple_compile_test_code="int some_variable = 0;"
7831
7832# Code to be used in simple link tests
7833lt_simple_link_test_code='int main(){return(0);}'
7834
7835
7836
7837
7838
7839
7840
7841# If no C compiler was specified, use CC.
7842LTCC=${LTCC-"$CC"}
7843
7844# If no C compiler flags were specified, use CFLAGS.
7845LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7846
7847# Allow CC to be a program name with arguments.
7848compiler=$CC
7849
7850# Save the default compiler, since it gets overwritten when the other
7851# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7852compiler_DEFAULT=$CC
7853
7854# save warnings/boilerplate of simple test code
7855ac_outfile=conftest.$ac_objext
7856echo "$lt_simple_compile_test_code" >conftest.$ac_ext
7857eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7858_lt_compiler_boilerplate=`cat conftest.err`
7859$RM conftest*
7860
7861ac_outfile=conftest.$ac_objext
7862echo "$lt_simple_link_test_code" >conftest.$ac_ext
7863eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7864_lt_linker_boilerplate=`cat conftest.err`
7865$RM -r conftest*
7866
7867
7868## CAVEAT EMPTOR:
7869## There is no encapsulation within the following macros, do not change
7870## the running order or otherwise move them around unless you know exactly
7871## what you are doing...
7872if test -n "$compiler"; then
7873
7874lt_prog_compiler_no_builtin_flag=
7875
3d248aec
AX
7876if test "$GCC" = yes; then
7877 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
ea04106b 7878
3d248aec 7879 { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
ea04106b 7880$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
3d248aec 7881if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
ea04106b
AX
7882 $as_echo_n "(cached) " >&6
7883else
7884 lt_cv_prog_compiler_rtti_exceptions=no
7885 ac_outfile=conftest.$ac_objext
7886 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3d248aec 7887 lt_compiler_flag="-fno-rtti -fno-exceptions"
ea04106b
AX
7888 # Insert the option either (1) after the last *FLAGS variable, or
7889 # (2) before a word containing "conftest.", or (3) at the end.
7890 # Note that $ac_compile itself does not contain backslashes and begins
7891 # with a dollar sign (not a hyphen), so the echo should work correctly.
7892 # The option is referenced via a variable to avoid confusing sed.
7893 lt_compile=`echo "$ac_compile" | $SED \
7894 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7895 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7896 -e 's:$: $lt_compiler_flag:'`
3d248aec 7897 (eval echo "\"\$as_me:7897: $lt_compile\"" >&5)
ea04106b
AX
7898 (eval "$lt_compile" 2>conftest.err)
7899 ac_status=$?
7900 cat conftest.err >&5
3d248aec 7901 echo "$as_me:7901: \$? = $ac_status" >&5
ea04106b
AX
7902 if (exit $ac_status) && test -s "$ac_outfile"; then
7903 # The compiler can only warn and ignore the option if not recognized
7904 # So say no if there are warnings other than the usual output.
3d248aec 7905 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
ea04106b
AX
7906 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7907 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7908 lt_cv_prog_compiler_rtti_exceptions=yes
7909 fi
7910 fi
7911 $RM conftest*
7912
7913fi
3d248aec 7914{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
ea04106b
AX
7915$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
7916
3d248aec 7917if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
ea04106b
AX
7918 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7919else
7920 :
7921fi
7922
7923fi
7924
7925
7926
7927
7928
7929
7930 lt_prog_compiler_wl=
7931lt_prog_compiler_pic=
7932lt_prog_compiler_static=
7933
3d248aec
AX
7934{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7935$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
ea04106b 7936
3d248aec 7937 if test "$GCC" = yes; then
ea04106b
AX
7938 lt_prog_compiler_wl='-Wl,'
7939 lt_prog_compiler_static='-static'
7940
7941 case $host_os in
7942 aix*)
7943 # All AIX code is PIC.
3d248aec 7944 if test "$host_cpu" = ia64; then
ea04106b
AX
7945 # AIX 5 now supports IA64 processor
7946 lt_prog_compiler_static='-Bstatic'
7947 fi
7948 ;;
7949
7950 amigaos*)
7951 case $host_cpu in
7952 powerpc)
7953 # see comment about AmigaOS4 .so support
7954 lt_prog_compiler_pic='-fPIC'
7955 ;;
7956 m68k)
7957 # FIXME: we need at least 68020 code to build shared libraries, but
3d248aec
AX
7958 # adding the `-m68020' flag to GCC prevents building anything better,
7959 # like `-m68040'.
ea04106b
AX
7960 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7961 ;;
7962 esac
7963 ;;
7964
7965 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7966 # PIC is the default for these OSes.
7967 ;;
7968
7969 mingw* | cygwin* | pw32* | os2* | cegcc*)
7970 # This hack is so that the source file can tell whether it is being
7971 # built for inclusion in a dll (and should export symbols for example).
7972 # Although the cygwin gcc ignores -fPIC, still need this for old-style
7973 # (--disable-auto-import) libraries
7974 lt_prog_compiler_pic='-DDLL_EXPORT'
7975 ;;
7976
7977 darwin* | rhapsody*)
7978 # PIC is the default on this platform
7979 # Common symbols not allowed in MH_DYLIB files
7980 lt_prog_compiler_pic='-fno-common'
7981 ;;
7982
ea04106b
AX
7983 hpux*)
7984 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
7985 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
7986 # sets the default TLS model and affects inlining.
7987 case $host_cpu in
7988 hppa*64*)
7989 # +Z the default
7990 ;;
7991 *)
7992 lt_prog_compiler_pic='-fPIC'
7993 ;;
7994 esac
7995 ;;
7996
7997 interix[3-9]*)
7998 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7999 # Instead, we relocate shared libraries at runtime.
8000 ;;
8001
8002 msdosdjgpp*)
8003 # Just because we use GCC doesn't mean we suddenly get shared libraries
8004 # on systems that don't support them.
8005 lt_prog_compiler_can_build_shared=no
8006 enable_shared=no
8007 ;;
8008
8009 *nto* | *qnx*)
8010 # QNX uses GNU C++, but need to define -shared option too, otherwise
8011 # it will coredump.
8012 lt_prog_compiler_pic='-fPIC -shared'
8013 ;;
8014
8015 sysv4*MP*)
8016 if test -d /usr/nec; then
8017 lt_prog_compiler_pic=-Kconform_pic
8018 fi
8019 ;;
8020
8021 *)
8022 lt_prog_compiler_pic='-fPIC'
8023 ;;
8024 esac
ea04106b
AX
8025 else
8026 # PORTME Check for flag to pass linker flags through the system compiler.
8027 case $host_os in
8028 aix*)
8029 lt_prog_compiler_wl='-Wl,'
3d248aec 8030 if test "$host_cpu" = ia64; then
ea04106b
AX
8031 # AIX 5 now supports IA64 processor
8032 lt_prog_compiler_static='-Bstatic'
8033 else
8034 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8035 fi
8036 ;;
8037
8038 mingw* | cygwin* | pw32* | os2* | cegcc*)
8039 # This hack is so that the source file can tell whether it is being
8040 # built for inclusion in a dll (and should export symbols for example).
8041 lt_prog_compiler_pic='-DDLL_EXPORT'
8042 ;;
8043
8044 hpux9* | hpux10* | hpux11*)
8045 lt_prog_compiler_wl='-Wl,'
8046 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8047 # not for PA HP-UX.
8048 case $host_cpu in
8049 hppa*64*|ia64*)
8050 # +Z the default
8051 ;;
8052 *)
8053 lt_prog_compiler_pic='+Z'
8054 ;;
8055 esac
8056 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3d248aec 8057 lt_prog_compiler_static='${wl}-a ${wl}archive'
ea04106b
AX
8058 ;;
8059
8060 irix5* | irix6* | nonstopux*)
8061 lt_prog_compiler_wl='-Wl,'
8062 # PIC (with -KPIC) is the default.
8063 lt_prog_compiler_static='-non_shared'
8064 ;;
8065
3d248aec 8066 linux* | k*bsd*-gnu)
ea04106b 8067 case $cc_basename in
3d248aec 8068 # old Intel for x86_64 which still supported -KPIC.
ea04106b
AX
8069 ecc*)
8070 lt_prog_compiler_wl='-Wl,'
8071 lt_prog_compiler_pic='-KPIC'
8072 lt_prog_compiler_static='-static'
8073 ;;
8074 # icc used to be incompatible with GCC.
8075 # ICC 10 doesn't accept -KPIC any more.
8076 icc* | ifort*)
8077 lt_prog_compiler_wl='-Wl,'
8078 lt_prog_compiler_pic='-fPIC'
8079 lt_prog_compiler_static='-static'
8080 ;;
8081 # Lahey Fortran 8.1.
8082 lf95*)
8083 lt_prog_compiler_wl='-Wl,'
8084 lt_prog_compiler_pic='--shared'
8085 lt_prog_compiler_static='--static'
8086 ;;
3d248aec 8087 pgcc* | pgf77* | pgf90* | pgf95*)
ea04106b
AX
8088 # Portland Group compilers (*not* the Pentium gcc compiler,
8089 # which looks to be a dead project)
8090 lt_prog_compiler_wl='-Wl,'
8091 lt_prog_compiler_pic='-fpic'
8092 lt_prog_compiler_static='-Bstatic'
8093 ;;
8094 ccc*)
8095 lt_prog_compiler_wl='-Wl,'
8096 # All Alpha code is PIC.
8097 lt_prog_compiler_static='-non_shared'
8098 ;;
3d248aec
AX
8099 xl*)
8100 # IBM XL C 8.0/Fortran 10.1 on PPC
ea04106b
AX
8101 lt_prog_compiler_wl='-Wl,'
8102 lt_prog_compiler_pic='-qpic'
8103 lt_prog_compiler_static='-qstaticlink'
8104 ;;
8105 *)
8106 case `$CC -V 2>&1 | sed 5q` in
ea04106b
AX
8107 *Sun\ C*)
8108 # Sun C 5.9
8109 lt_prog_compiler_pic='-KPIC'
8110 lt_prog_compiler_static='-Bstatic'
8111 lt_prog_compiler_wl='-Wl,'
8112 ;;
3d248aec
AX
8113 *Sun\ F*)
8114 # Sun Fortran 8.3 passes all unrecognized flags to the linker
8115 lt_prog_compiler_pic='-KPIC'
ea04106b 8116 lt_prog_compiler_static='-Bstatic'
3d248aec 8117 lt_prog_compiler_wl=''
ea04106b
AX
8118 ;;
8119 esac
8120 ;;
8121 esac
8122 ;;
8123
8124 newsos6)
8125 lt_prog_compiler_pic='-KPIC'
8126 lt_prog_compiler_static='-Bstatic'
8127 ;;
8128
8129 *nto* | *qnx*)
8130 # QNX uses GNU C++, but need to define -shared option too, otherwise
8131 # it will coredump.
8132 lt_prog_compiler_pic='-fPIC -shared'
8133 ;;
8134
8135 osf3* | osf4* | osf5*)
8136 lt_prog_compiler_wl='-Wl,'
8137 # All OSF/1 code is PIC.
8138 lt_prog_compiler_static='-non_shared'
8139 ;;
8140
8141 rdos*)
8142 lt_prog_compiler_static='-non_shared'
8143 ;;
8144
8145 solaris*)
8146 lt_prog_compiler_pic='-KPIC'
8147 lt_prog_compiler_static='-Bstatic'
8148 case $cc_basename in
3d248aec 8149 f77* | f90* | f95*)
ea04106b
AX
8150 lt_prog_compiler_wl='-Qoption ld ';;
8151 *)
8152 lt_prog_compiler_wl='-Wl,';;
8153 esac
8154 ;;
8155
8156 sunos4*)
8157 lt_prog_compiler_wl='-Qoption ld '
8158 lt_prog_compiler_pic='-PIC'
8159 lt_prog_compiler_static='-Bstatic'
8160 ;;
8161
8162 sysv4 | sysv4.2uw2* | sysv4.3*)
8163 lt_prog_compiler_wl='-Wl,'
8164 lt_prog_compiler_pic='-KPIC'
8165 lt_prog_compiler_static='-Bstatic'
8166 ;;
8167
8168 sysv4*MP*)
3d248aec 8169 if test -d /usr/nec ;then
ea04106b
AX
8170 lt_prog_compiler_pic='-Kconform_pic'
8171 lt_prog_compiler_static='-Bstatic'
8172 fi
8173 ;;
8174
8175 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
8176 lt_prog_compiler_wl='-Wl,'
8177 lt_prog_compiler_pic='-KPIC'
8178 lt_prog_compiler_static='-Bstatic'
8179 ;;
8180
8181 unicos*)
8182 lt_prog_compiler_wl='-Wl,'
8183 lt_prog_compiler_can_build_shared=no
8184 ;;
8185
8186 uts4*)
8187 lt_prog_compiler_pic='-pic'
8188 lt_prog_compiler_static='-Bstatic'
8189 ;;
8190
8191 *)
8192 lt_prog_compiler_can_build_shared=no
8193 ;;
8194 esac
8195 fi
8196
8197case $host_os in
3d248aec 8198 # For platforms which do not support PIC, -DPIC is meaningless:
ea04106b
AX
8199 *djgpp*)
8200 lt_prog_compiler_pic=
8201 ;;
8202 *)
8203 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8204 ;;
8205esac
3d248aec
AX
8206{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
8207$as_echo "$lt_prog_compiler_pic" >&6; }
8208
8209
8210
8211
ea04106b 8212
ea04106b
AX
8213
8214#
8215# Check to make sure the PIC flag actually works.
8216#
8217if test -n "$lt_prog_compiler_pic"; then
3d248aec 8218 { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
ea04106b 8219$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
3d248aec 8220if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
ea04106b
AX
8221 $as_echo_n "(cached) " >&6
8222else
8223 lt_cv_prog_compiler_pic_works=no
8224 ac_outfile=conftest.$ac_objext
8225 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3d248aec 8226 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
ea04106b
AX
8227 # Insert the option either (1) after the last *FLAGS variable, or
8228 # (2) before a word containing "conftest.", or (3) at the end.
8229 # Note that $ac_compile itself does not contain backslashes and begins
8230 # with a dollar sign (not a hyphen), so the echo should work correctly.
8231 # The option is referenced via a variable to avoid confusing sed.
8232 lt_compile=`echo "$ac_compile" | $SED \
8233 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8234 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8235 -e 's:$: $lt_compiler_flag:'`
3d248aec 8236 (eval echo "\"\$as_me:8236: $lt_compile\"" >&5)
ea04106b
AX
8237 (eval "$lt_compile" 2>conftest.err)
8238 ac_status=$?
8239 cat conftest.err >&5
3d248aec 8240 echo "$as_me:8240: \$? = $ac_status" >&5
ea04106b
AX
8241 if (exit $ac_status) && test -s "$ac_outfile"; then
8242 # The compiler can only warn and ignore the option if not recognized
8243 # So say no if there are warnings other than the usual output.
3d248aec 8244 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
ea04106b
AX
8245 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8246 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
8247 lt_cv_prog_compiler_pic_works=yes
8248 fi
8249 fi
8250 $RM conftest*
8251
8252fi
3d248aec 8253{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
ea04106b
AX
8254$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
8255
3d248aec 8256if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
ea04106b
AX
8257 case $lt_prog_compiler_pic in
8258 "" | " "*) ;;
8259 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8260 esac
8261else
8262 lt_prog_compiler_pic=
8263 lt_prog_compiler_can_build_shared=no
8264fi
8265
8266fi
8267
8268
8269
8270
8271
8272
ea04106b
AX
8273#
8274# Check to make sure the static flag actually works.
8275#
8276wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
3d248aec 8277{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
ea04106b 8278$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
3d248aec 8279if test "${lt_cv_prog_compiler_static_works+set}" = set; then
ea04106b
AX
8280 $as_echo_n "(cached) " >&6
8281else
8282 lt_cv_prog_compiler_static_works=no
3d248aec 8283 save_LDFLAGS="$LDFLAGS"
ea04106b
AX
8284 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
8285 echo "$lt_simple_link_test_code" > conftest.$ac_ext
8286 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8287 # The linker can only warn and ignore the option if not recognized
8288 # So say no if there are warnings
8289 if test -s conftest.err; then
8290 # Append any errors to the config.log.
8291 cat conftest.err 1>&5
3d248aec 8292 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
ea04106b
AX
8293 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
8294 if diff conftest.exp conftest.er2 >/dev/null; then
8295 lt_cv_prog_compiler_static_works=yes
8296 fi
8297 else
8298 lt_cv_prog_compiler_static_works=yes
8299 fi
8300 fi
8301 $RM -r conftest*
3d248aec 8302 LDFLAGS="$save_LDFLAGS"
ea04106b
AX
8303
8304fi
3d248aec 8305{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
ea04106b
AX
8306$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
8307
3d248aec 8308if test x"$lt_cv_prog_compiler_static_works" = xyes; then
ea04106b
AX
8309 :
8310else
8311 lt_prog_compiler_static=
8312fi
8313
8314
8315
8316
8317
8318
8319
3d248aec 8320 { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
ea04106b 8321$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
3d248aec 8322if test "${lt_cv_prog_compiler_c_o+set}" = set; then
ea04106b
AX
8323 $as_echo_n "(cached) " >&6
8324else
8325 lt_cv_prog_compiler_c_o=no
8326 $RM -r conftest 2>/dev/null
8327 mkdir conftest
8328 cd conftest
8329 mkdir out
8330 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8331
8332 lt_compiler_flag="-o out/conftest2.$ac_objext"
8333 # Insert the option either (1) after the last *FLAGS variable, or
8334 # (2) before a word containing "conftest.", or (3) at the end.
8335 # Note that $ac_compile itself does not contain backslashes and begins
8336 # with a dollar sign (not a hyphen), so the echo should work correctly.
8337 lt_compile=`echo "$ac_compile" | $SED \
8338 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8339 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8340 -e 's:$: $lt_compiler_flag:'`
3d248aec 8341 (eval echo "\"\$as_me:8341: $lt_compile\"" >&5)
ea04106b
AX
8342 (eval "$lt_compile" 2>out/conftest.err)
8343 ac_status=$?
8344 cat out/conftest.err >&5
3d248aec 8345 echo "$as_me:8345: \$? = $ac_status" >&5
ea04106b
AX
8346 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8347 then
8348 # The compiler can only warn and ignore the option if not recognized
8349 # So say no if there are warnings
3d248aec 8350 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
ea04106b
AX
8351 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8352 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8353 lt_cv_prog_compiler_c_o=yes
8354 fi
8355 fi
8356 chmod u+w . 2>&5
8357 $RM conftest*
8358 # SGI C++ compiler will create directory out/ii_files/ for
8359 # template instantiation
8360 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8361 $RM out/* && rmdir out
8362 cd ..
8363 $RM -r conftest
8364 $RM conftest*
8365
8366fi
3d248aec 8367{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
ea04106b
AX
8368$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8369
8370
8371
8372
8373
8374
3d248aec 8375 { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
ea04106b 8376$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
3d248aec 8377if test "${lt_cv_prog_compiler_c_o+set}" = set; then
ea04106b
AX
8378 $as_echo_n "(cached) " >&6
8379else
8380 lt_cv_prog_compiler_c_o=no
8381 $RM -r conftest 2>/dev/null
8382 mkdir conftest
8383 cd conftest
8384 mkdir out
8385 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8386
8387 lt_compiler_flag="-o out/conftest2.$ac_objext"
8388 # Insert the option either (1) after the last *FLAGS variable, or
8389 # (2) before a word containing "conftest.", or (3) at the end.
8390 # Note that $ac_compile itself does not contain backslashes and begins
8391 # with a dollar sign (not a hyphen), so the echo should work correctly.
8392 lt_compile=`echo "$ac_compile" | $SED \
8393 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8394 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8395 -e 's:$: $lt_compiler_flag:'`
3d248aec 8396 (eval echo "\"\$as_me:8396: $lt_compile\"" >&5)
ea04106b
AX
8397 (eval "$lt_compile" 2>out/conftest.err)
8398 ac_status=$?
8399 cat out/conftest.err >&5
3d248aec 8400 echo "$as_me:8400: \$? = $ac_status" >&5
ea04106b
AX
8401 if (exit $ac_status) && test -s out/conftest2.$ac_objext
8402 then
8403 # The compiler can only warn and ignore the option if not recognized
8404 # So say no if there are warnings
3d248aec 8405 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
ea04106b
AX
8406 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
8407 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8408 lt_cv_prog_compiler_c_o=yes
8409 fi
8410 fi
8411 chmod u+w . 2>&5
8412 $RM conftest*
8413 # SGI C++ compiler will create directory out/ii_files/ for
8414 # template instantiation
8415 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
8416 $RM out/* && rmdir out
8417 cd ..
8418 $RM -r conftest
8419 $RM conftest*
8420
8421fi
3d248aec 8422{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
ea04106b
AX
8423$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8424
8425
8426
8427
3d248aec
AX
8428hard_links="nottested"
8429if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
ea04106b 8430 # do not overwrite the value of need_locks provided by the user
3d248aec 8431 { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
ea04106b
AX
8432$as_echo_n "checking if we can lock with hard links... " >&6; }
8433 hard_links=yes
8434 $RM conftest*
8435 ln conftest.a conftest.b 2>/dev/null && hard_links=no
8436 touch conftest.a
8437 ln conftest.a conftest.b 2>&5 || hard_links=no
8438 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3d248aec 8439 { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
ea04106b 8440$as_echo "$hard_links" >&6; }
3d248aec
AX
8441 if test "$hard_links" = no; then
8442 { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8443$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
ea04106b
AX
8444 need_locks=warn
8445 fi
8446else
8447 need_locks=no
8448fi
8449
8450
8451
8452
8453
8454
3d248aec 8455 { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
ea04106b
AX
8456$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
8457
8458 runpath_var=
8459 allow_undefined_flag=
8460 always_export_symbols=no
8461 archive_cmds=
8462 archive_expsym_cmds=
8463 compiler_needs_object=no
8464 enable_shared_with_static_runtimes=no
8465 export_dynamic_flag_spec=
8466 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8467 hardcode_automatic=no
8468 hardcode_direct=no
8469 hardcode_direct_absolute=no
8470 hardcode_libdir_flag_spec=
3d248aec 8471 hardcode_libdir_flag_spec_ld=
ea04106b
AX
8472 hardcode_libdir_separator=
8473 hardcode_minus_L=no
8474 hardcode_shlibpath_var=unsupported
8475 inherit_rpath=no
8476 link_all_deplibs=unknown
8477 module_cmds=
8478 module_expsym_cmds=
8479 old_archive_from_new_cmds=
8480 old_archive_from_expsyms_cmds=
8481 thread_safe_flag_spec=
8482 whole_archive_flag_spec=
8483 # include_expsyms should be a list of space-separated symbols to be *always*
8484 # included in the symbol list
8485 include_expsyms=
8486 # exclude_expsyms can be an extended regexp of symbols to exclude
3d248aec
AX
8487 # it will be wrapped by ` (' and `)$', so one must not match beginning or
8488 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8489 # as well as any symbol that contains `d'.
ea04106b
AX
8490 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
8491 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
8492 # platforms (ab)use it in PIC code, but their linkers get confused if
8493 # the symbol is explicitly referenced. Since portable code cannot
8494 # rely on this symbol name, it's probably fine to never include it in
8495 # preloaded symbol tables.
8496 # Exclude shared library initialization/finalization symbols.
8497 extract_expsyms_cmds=
8498
8499 case $host_os in
8500 cygwin* | mingw* | pw32* | cegcc*)
8501 # FIXME: the MSVC++ port hasn't been tested in a loooong time
8502 # When not using gcc, we currently assume that we are using
8503 # Microsoft Visual C++.
3d248aec 8504 if test "$GCC" != yes; then
ea04106b
AX
8505 with_gnu_ld=no
8506 fi
8507 ;;
8508 interix*)
8509 # we just hope/assume this is gcc and not c89 (= MSVC++)
8510 with_gnu_ld=yes
8511 ;;
3d248aec 8512 openbsd*)
ea04106b
AX
8513 with_gnu_ld=no
8514 ;;
ea04106b
AX
8515 esac
8516
8517 ld_shlibs=yes
3d248aec 8518 if test "$with_gnu_ld" = yes; then
ea04106b 8519 # If archive_cmds runs LD, not CC, wlarc should be empty
3d248aec 8520 wlarc='${wl}'
ea04106b
AX
8521
8522 # Set some defaults for GNU ld with shared library support. These
8523 # are reset later if shared libraries are not supported. Putting them
8524 # here allows them to be overridden if necessary.
8525 runpath_var=LD_RUN_PATH
3d248aec
AX
8526 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8527 export_dynamic_flag_spec='${wl}--export-dynamic'
ea04106b
AX
8528 # ancient GNU ld didn't support --whole-archive et. al.
8529 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
3d248aec 8530 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
ea04106b
AX
8531 else
8532 whole_archive_flag_spec=
8533 fi
8534 supports_anon_versioning=no
3d248aec 8535 case `$LD -v 2>&1` in
ea04106b
AX
8536 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
8537 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
8538 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
8539 *\ 2.11.*) ;; # other 2.11 versions
8540 *) supports_anon_versioning=yes ;;
8541 esac
8542
8543 # See if GNU ld supports shared libraries.
8544 case $host_os in
8545 aix[3-9]*)
8546 # On AIX/PPC, the GNU linker is very broken
3d248aec 8547 if test "$host_cpu" != ia64; then
ea04106b
AX
8548 ld_shlibs=no
8549 cat <<_LT_EOF 1>&2
8550
3d248aec 8551*** Warning: the GNU linker, at least up to release 2.9.1, is reported
ea04106b
AX
8552*** to be unable to reliably create shared libraries on AIX.
8553*** Therefore, libtool is disabling shared libraries support. If you
3d248aec
AX
8554*** really care for shared libraries, you may want to modify your PATH
8555*** so that a non-GNU linker is found, and then restart.
ea04106b
AX
8556
8557_LT_EOF
8558 fi
8559 ;;
8560
8561 amigaos*)
8562 case $host_cpu in
8563 powerpc)
8564 # see comment about AmigaOS4 .so support
3d248aec 8565 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
ea04106b
AX
8566 archive_expsym_cmds=''
8567 ;;
8568 m68k)
8569 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
8570 hardcode_libdir_flag_spec='-L$libdir'
8571 hardcode_minus_L=yes
8572 ;;
8573 esac
8574 ;;
8575
8576 beos*)
8577 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8578 allow_undefined_flag=unsupported
8579 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8580 # support --undefined. This deserves some investigation. FIXME
3d248aec 8581 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
ea04106b
AX
8582 else
8583 ld_shlibs=no
8584 fi
8585 ;;
8586
8587 cygwin* | mingw* | pw32* | cegcc*)
8588 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
8589 # as there is no search path for DLLs.
8590 hardcode_libdir_flag_spec='-L$libdir'
ea04106b
AX
8591 allow_undefined_flag=unsupported
8592 always_export_symbols=no
8593 enable_shared_with_static_runtimes=yes
3d248aec 8594 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
ea04106b
AX
8595
8596 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
3d248aec
AX
8597 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
8598 # If the export-symbols file already is a .def file (1st line
8599 # is EXPORTS), use it as is; otherwise, prepend...
8600 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8601 cp $export_symbols $output_objdir/$soname.def;
8602 else
8603 echo EXPORTS > $output_objdir/$soname.def;
8604 cat $export_symbols >> $output_objdir/$soname.def;
8605 fi~
8606 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
ea04106b
AX
8607 else
8608 ld_shlibs=no
8609 fi
8610 ;;
8611
ea04106b
AX
8612 interix[3-9]*)
8613 hardcode_direct=no
8614 hardcode_shlibpath_var=no
3d248aec
AX
8615 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8616 export_dynamic_flag_spec='${wl}-E'
ea04106b
AX
8617 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8618 # Instead, shared libraries are loaded at an image base (0x10000000 by
8619 # default) and relocated if they conflict, which is a slow very memory
8620 # consuming and fragmenting process. To avoid this, we pick a random,
8621 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8622 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3d248aec
AX
8623 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8624 archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
ea04106b
AX
8625 ;;
8626
3d248aec 8627 gnu* | linux* | tpf* | k*bsd*-gnu)
ea04106b 8628 tmp_diet=no
3d248aec 8629 if test "$host_os" = linux-dietlibc; then
ea04106b
AX
8630 case $cc_basename in
8631 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
8632 esac
8633 fi
8634 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
3d248aec 8635 && test "$tmp_diet" = no
ea04106b 8636 then
3d248aec 8637 tmp_addflag=
ea04106b
AX
8638 tmp_sharedflag='-shared'
8639 case $cc_basename,$host_cpu in
8640 pgcc*) # Portland Group C compiler
3d248aec 8641 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
ea04106b
AX
8642 tmp_addflag=' $pic_flag'
8643 ;;
3d248aec
AX
8644 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
8645 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
ea04106b
AX
8646 tmp_addflag=' $pic_flag -Mnomain' ;;
8647 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
8648 tmp_addflag=' -i_dynamic' ;;
8649 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
8650 tmp_addflag=' -i_dynamic -nofor_main' ;;
8651 ifc* | ifort*) # Intel Fortran compiler
8652 tmp_addflag=' -nofor_main' ;;
8653 lf95*) # Lahey Fortran 8.1
8654 whole_archive_flag_spec=
8655 tmp_sharedflag='--shared' ;;
3d248aec 8656 xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
ea04106b
AX
8657 tmp_sharedflag='-qmkshrobj'
8658 tmp_addflag= ;;
ea04106b
AX
8659 esac
8660 case `$CC -V 2>&1 | sed 5q` in
8661 *Sun\ C*) # Sun C 5.9
3d248aec 8662 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
ea04106b
AX
8663 compiler_needs_object=yes
8664 tmp_sharedflag='-G' ;;
8665 *Sun\ F*) # Sun Fortran 8.3
8666 tmp_sharedflag='-G' ;;
8667 esac
3d248aec 8668 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
ea04106b 8669
3d248aec 8670 if test "x$supports_anon_versioning" = xyes; then
ea04106b 8671 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
3d248aec
AX
8672 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8673 echo "local: *; };" >> $output_objdir/$libname.ver~
8674 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
ea04106b
AX
8675 fi
8676
8677 case $cc_basename in
3d248aec 8678 xlf*)
ea04106b
AX
8679 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
8680 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
3d248aec
AX
8681 hardcode_libdir_flag_spec=
8682 hardcode_libdir_flag_spec_ld='-rpath $libdir'
8683 archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
8684 if test "x$supports_anon_versioning" = xyes; then
ea04106b 8685 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
3d248aec
AX
8686 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8687 echo "local: *; };" >> $output_objdir/$libname.ver~
8688 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
ea04106b
AX
8689 fi
8690 ;;
8691 esac
8692 else
8693 ld_shlibs=no
8694 fi
8695 ;;
8696
3d248aec 8697 netbsd*)
ea04106b
AX
8698 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8699 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
8700 wlarc=
8701 else
3d248aec
AX
8702 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8703 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
ea04106b
AX
8704 fi
8705 ;;
8706
8707 solaris*)
8708 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
8709 ld_shlibs=no
8710 cat <<_LT_EOF 1>&2
8711
8712*** Warning: The releases 2.8.* of the GNU linker cannot reliably
8713*** create shared libraries on Solaris systems. Therefore, libtool
8714*** is disabling shared libraries support. We urge you to upgrade GNU
8715*** binutils to release 2.9.1 or newer. Another option is to modify
8716*** your PATH or compiler configuration so that the native linker is
8717*** used, and then restart.
8718
8719_LT_EOF
8720 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3d248aec
AX
8721 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8722 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
ea04106b
AX
8723 else
8724 ld_shlibs=no
8725 fi
8726 ;;
8727
8728 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
8729 case `$LD -v 2>&1` in
8730 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
8731 ld_shlibs=no
8732 cat <<_LT_EOF 1>&2
8733
3d248aec 8734*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
ea04106b
AX
8735*** reliably create shared libraries on SCO systems. Therefore, libtool
8736*** is disabling shared libraries support. We urge you to upgrade GNU
8737*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
8738*** your PATH or compiler configuration so that the native linker is
8739*** used, and then restart.
8740
8741_LT_EOF
8742 ;;
8743 *)
8744 # For security reasons, it is highly recommended that you always
8745 # use absolute paths for naming shared libraries, and exclude the
8746 # DT_RUNPATH tag from executables and libraries. But doing so
8747 # requires that you compile everything twice, which is a pain.
8748 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3d248aec
AX
8749 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8750 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8751 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
ea04106b
AX
8752 else
8753 ld_shlibs=no
8754 fi
8755 ;;
8756 esac
8757 ;;
8758
8759 sunos4*)
8760 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8761 wlarc=
8762 hardcode_direct=yes
8763 hardcode_shlibpath_var=no
8764 ;;
8765
8766 *)
8767 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3d248aec
AX
8768 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8769 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
ea04106b
AX
8770 else
8771 ld_shlibs=no
8772 fi
8773 ;;
8774 esac
8775
3d248aec 8776 if test "$ld_shlibs" = no; then
ea04106b
AX
8777 runpath_var=
8778 hardcode_libdir_flag_spec=
8779 export_dynamic_flag_spec=
8780 whole_archive_flag_spec=
8781 fi
8782 else
8783 # PORTME fill in a description of your system's linker (not GNU ld)
8784 case $host_os in
8785 aix3*)
8786 allow_undefined_flag=unsupported
8787 always_export_symbols=yes
8788 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
8789 # Note: this linker hardcodes the directories in LIBPATH if there
8790 # are no directories specified by -L.
8791 hardcode_minus_L=yes
3d248aec 8792 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
ea04106b
AX
8793 # Neither direct hardcoding nor static linking is supported with a
8794 # broken collect2.
8795 hardcode_direct=unsupported
8796 fi
8797 ;;
8798
8799 aix[4-9]*)
3d248aec 8800 if test "$host_cpu" = ia64; then
ea04106b
AX
8801 # On IA64, the linker does run time linking by default, so we don't
8802 # have to do anything special.
8803 aix_use_runtimelinking=no
8804 exp_sym_flag='-Bexport'
3d248aec 8805 no_entry_flag=""
ea04106b
AX
8806 else
8807 # If we're using GNU nm, then we don't want the "-C" option.
3d248aec 8808 # -C means demangle to AIX nm, but means don't demangle with GNU nm
ea04106b 8809 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3d248aec 8810 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
ea04106b 8811 else
3d248aec 8812 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
ea04106b
AX
8813 fi
8814 aix_use_runtimelinking=no
8815
8816 # Test if we are trying to use run time linking or normal
8817 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3d248aec 8818 # need to do runtime linking.
ea04106b
AX
8819 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
8820 for ld_flag in $LDFLAGS; do
3d248aec 8821 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
ea04106b
AX
8822 aix_use_runtimelinking=yes
8823 break
8824 fi
8825 done
8826 ;;
8827 esac
8828
8829 exp_sym_flag='-bexport'
8830 no_entry_flag='-bnoentry'
8831 fi
8832
8833 # When large executables or shared objects are built, AIX ld can
8834 # have problems creating the table of contents. If linking a library
8835 # or program results in "error TOC overflow" add -mminimal-toc to
8836 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8837 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8838
8839 archive_cmds=''
8840 hardcode_direct=yes
8841 hardcode_direct_absolute=yes
8842 hardcode_libdir_separator=':'
8843 link_all_deplibs=yes
3d248aec 8844 file_list_spec='${wl}-f,'
ea04106b 8845
3d248aec 8846 if test "$GCC" = yes; then
ea04106b
AX
8847 case $host_os in aix4.[012]|aix4.[012].*)
8848 # We only want to do this on AIX 4.2 and lower, the check
8849 # below for broken collect2 doesn't work under 4.3+
3d248aec 8850 collect2name=`${CC} -print-prog-name=collect2`
ea04106b
AX
8851 if test -f "$collect2name" &&
8852 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8853 then
8854 # We have reworked collect2
8855 :
8856 else
8857 # We have old collect2
8858 hardcode_direct=unsupported
8859 # It fails to find uninstalled libraries when the uninstalled
8860 # path is not listed in the libpath. Setting hardcode_minus_L
8861 # to unsupported forces relinking
8862 hardcode_minus_L=yes
8863 hardcode_libdir_flag_spec='-L$libdir'
8864 hardcode_libdir_separator=
8865 fi
8866 ;;
8867 esac
8868 shared_flag='-shared'
3d248aec
AX
8869 if test "$aix_use_runtimelinking" = yes; then
8870 shared_flag="$shared_flag "'${wl}-G'
ea04106b 8871 fi
ea04106b
AX
8872 else
8873 # not using gcc
3d248aec 8874 if test "$host_cpu" = ia64; then
ea04106b
AX
8875 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8876 # chokes on -Wl,-G. The following line is correct:
8877 shared_flag='-G'
8878 else
3d248aec
AX
8879 if test "$aix_use_runtimelinking" = yes; then
8880 shared_flag='${wl}-G'
ea04106b 8881 else
3d248aec 8882 shared_flag='${wl}-bM:SRE'
ea04106b
AX
8883 fi
8884 fi
8885 fi
8886
3d248aec 8887 export_dynamic_flag_spec='${wl}-bexpall'
ea04106b
AX
8888 # It seems that -bexpall does not export symbols beginning with
8889 # underscore (_), so it is better to generate a list of symbols to export.
8890 always_export_symbols=yes
3d248aec 8891 if test "$aix_use_runtimelinking" = yes; then
ea04106b
AX
8892 # Warning - without using the other runtime loading flags (-brtl),
8893 # -berok will link without error, but may produce a broken library.
8894 allow_undefined_flag='-berok'
8895 # Determine the default libpath from the value encoded in an
8896 # empty executable.
3d248aec
AX
8897 cat >conftest.$ac_ext <<_ACEOF
8898/* confdefs.h. */
8899_ACEOF
8900cat confdefs.h >>conftest.$ac_ext
8901cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
8902/* end confdefs.h. */
8903
8904int
8905main ()
8906{
8907
8908 ;
8909 return 0;
8910}
8911_ACEOF
3d248aec
AX
8912rm -f conftest.$ac_objext conftest$ac_exeext
8913if { (ac_try="$ac_link"
8914case "(($ac_try" in
8915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8916 *) ac_try_echo=$ac_try;;
8917esac
8918eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8919$as_echo "$ac_try_echo") >&5
8920 (eval "$ac_link") 2>conftest.er1
8921 ac_status=$?
8922 grep -v '^ *+' conftest.er1 >conftest.err
8923 rm -f conftest.er1
8924 cat conftest.err >&5
8925 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8926 (exit $ac_status); } && {
8927 test -z "$ac_c_werror_flag" ||
8928 test ! -s conftest.err
8929 } && test -s conftest$ac_exeext && {
8930 test "$cross_compiling" = yes ||
8931 $as_test_x conftest$ac_exeext
8932 }; then
8933
8934lt_aix_libpath_sed='
8935 /Import File Strings/,/^$/ {
8936 /^0/ {
8937 s/^0 *\(.*\)$/\1/
8938 p
8939 }
8940 }'
8941aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8942# Check for a 64-bit object if we didn't find anything.
8943if test -z "$aix_libpath"; then
8944 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
ea04106b 8945fi
3d248aec
AX
8946else
8947 $as_echo "$as_me: failed program was:" >&5
8948sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 8949
ea04106b 8950
ea04106b
AX
8951fi
8952
3d248aec
AX
8953rm -rf conftest.dSYM
8954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8955 conftest$ac_exeext conftest.$ac_ext
8956if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8957
8958 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8959 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
ea04106b 8960 else
3d248aec
AX
8961 if test "$host_cpu" = ia64; then
8962 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
ea04106b 8963 allow_undefined_flag="-z nodefs"
3d248aec 8964 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
ea04106b
AX
8965 else
8966 # Determine the default libpath from the value encoded in an
8967 # empty executable.
3d248aec
AX
8968 cat >conftest.$ac_ext <<_ACEOF
8969/* confdefs.h. */
8970_ACEOF
8971cat confdefs.h >>conftest.$ac_ext
8972cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
8973/* end confdefs.h. */
8974
8975int
8976main ()
8977{
8978
8979 ;
8980 return 0;
8981}
8982_ACEOF
3d248aec
AX
8983rm -f conftest.$ac_objext conftest$ac_exeext
8984if { (ac_try="$ac_link"
8985case "(($ac_try" in
8986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8987 *) ac_try_echo=$ac_try;;
8988esac
8989eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8990$as_echo "$ac_try_echo") >&5
8991 (eval "$ac_link") 2>conftest.er1
8992 ac_status=$?
8993 grep -v '^ *+' conftest.er1 >conftest.err
8994 rm -f conftest.er1
8995 cat conftest.err >&5
8996 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8997 (exit $ac_status); } && {
8998 test -z "$ac_c_werror_flag" ||
8999 test ! -s conftest.err
9000 } && test -s conftest$ac_exeext && {
9001 test "$cross_compiling" = yes ||
9002 $as_test_x conftest$ac_exeext
9003 }; then
9004
9005lt_aix_libpath_sed='
9006 /Import File Strings/,/^$/ {
9007 /^0/ {
9008 s/^0 *\(.*\)$/\1/
9009 p
9010 }
9011 }'
9012aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
9013# Check for a 64-bit object if we didn't find anything.
9014if test -z "$aix_libpath"; then
9015 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
ea04106b 9016fi
3d248aec
AX
9017else
9018 $as_echo "$as_me: failed program was:" >&5
9019sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 9020
ea04106b 9021
ea04106b
AX
9022fi
9023
3d248aec
AX
9024rm -rf conftest.dSYM
9025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9026 conftest$ac_exeext conftest.$ac_ext
9027if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9028
9029 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
ea04106b
AX
9030 # Warning - without using the other run time loading flags,
9031 # -berok will link without error, but may produce a broken library.
3d248aec
AX
9032 no_undefined_flag=' ${wl}-bernotok'
9033 allow_undefined_flag=' ${wl}-berok'
9034 # Exported symbols can be pulled into shared objects from archives
9035 whole_archive_flag_spec='$convenience'
ea04106b 9036 archive_cmds_need_lc=yes
3d248aec
AX
9037 # This is similar to how AIX traditionally builds its shared libraries.
9038 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
ea04106b
AX
9039 fi
9040 fi
9041 ;;
9042
9043 amigaos*)
9044 case $host_cpu in
9045 powerpc)
9046 # see comment about AmigaOS4 .so support
3d248aec 9047 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
ea04106b
AX
9048 archive_expsym_cmds=''
9049 ;;
9050 m68k)
9051 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
9052 hardcode_libdir_flag_spec='-L$libdir'
9053 hardcode_minus_L=yes
9054 ;;
9055 esac
9056 ;;
9057
9058 bsdi[45]*)
9059 export_dynamic_flag_spec=-rdynamic
9060 ;;
9061
9062 cygwin* | mingw* | pw32* | cegcc*)
9063 # When not using gcc, we currently assume that we are using
9064 # Microsoft Visual C++.
9065 # hardcode_libdir_flag_spec is actually meaningless, as there is
9066 # no search path for DLLs.
3d248aec
AX
9067 hardcode_libdir_flag_spec=' '
9068 allow_undefined_flag=unsupported
9069 # Tell ltmain to make .lib files, not .a files.
9070 libext=lib
9071 # Tell ltmain to make .dll files, not .so files.
9072 shrext_cmds=".dll"
9073 # FIXME: Setting linknames here is a bad hack.
9074 archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
9075 # The linker will automatically build a .lib file if we build a DLL.
9076 old_archive_from_new_cmds='true'
9077 # FIXME: Should let the user specify the lib program.
9078 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
9079 fix_srcfile_path='`cygpath -w "$srcfile"`'
9080 enable_shared_with_static_runtimes=yes
ea04106b
AX
9081 ;;
9082
9083 darwin* | rhapsody*)
9084
9085
9086 archive_cmds_need_lc=no
9087 hardcode_direct=no
9088 hardcode_automatic=yes
9089 hardcode_shlibpath_var=unsupported
3d248aec 9090 whole_archive_flag_spec=''
ea04106b 9091 link_all_deplibs=yes
3d248aec 9092 allow_undefined_flag="$_lt_dar_allow_undefined"
ea04106b 9093 case $cc_basename in
3d248aec 9094 ifort*) _lt_dar_can_shared=yes ;;
ea04106b
AX
9095 *) _lt_dar_can_shared=$GCC ;;
9096 esac
3d248aec
AX
9097 if test "$_lt_dar_can_shared" = "yes"; then
9098 output_verbose_link_cmd=echo
9099 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
9100 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
9101 archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
9102 module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
ea04106b
AX
9103
9104 else
9105 ld_shlibs=no
9106 fi
9107
9108 ;;
9109
9110 dgux*)
9111 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9112 hardcode_libdir_flag_spec='-L$libdir'
9113 hardcode_shlibpath_var=no
9114 ;;
9115
3d248aec
AX
9116 freebsd1*)
9117 ld_shlibs=no
9118 ;;
9119
ea04106b
AX
9120 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9121 # support. Future versions do this automatically, but an explicit c++rt0.o
9122 # does not break anything, and helps significantly (at the cost of a little
9123 # extra space).
9124 freebsd2.2*)
9125 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9126 hardcode_libdir_flag_spec='-R$libdir'
9127 hardcode_direct=yes
9128 hardcode_shlibpath_var=no
9129 ;;
9130
9131 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
3d248aec 9132 freebsd2*)
ea04106b
AX
9133 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9134 hardcode_direct=yes
9135 hardcode_minus_L=yes
9136 hardcode_shlibpath_var=no
9137 ;;
9138
9139 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9140 freebsd* | dragonfly*)
3d248aec 9141 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9142 hardcode_libdir_flag_spec='-R$libdir'
9143 hardcode_direct=yes
9144 hardcode_shlibpath_var=no
9145 ;;
9146
9147 hpux9*)
3d248aec
AX
9148 if test "$GCC" = yes; then
9149 archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
ea04106b 9150 else
3d248aec 9151 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
ea04106b 9152 fi
3d248aec 9153 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
ea04106b
AX
9154 hardcode_libdir_separator=:
9155 hardcode_direct=yes
9156
9157 # hardcode_minus_L: Not really in the search PATH,
9158 # but as the default location of the library.
9159 hardcode_minus_L=yes
3d248aec 9160 export_dynamic_flag_spec='${wl}-E'
ea04106b
AX
9161 ;;
9162
9163 hpux10*)
3d248aec
AX
9164 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9165 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9166 else
9167 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9168 fi
3d248aec
AX
9169 if test "$with_gnu_ld" = no; then
9170 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9171 hardcode_libdir_flag_spec_ld='+b $libdir'
ea04106b
AX
9172 hardcode_libdir_separator=:
9173 hardcode_direct=yes
9174 hardcode_direct_absolute=yes
3d248aec 9175 export_dynamic_flag_spec='${wl}-E'
ea04106b
AX
9176 # hardcode_minus_L: Not really in the search PATH,
9177 # but as the default location of the library.
9178 hardcode_minus_L=yes
9179 fi
9180 ;;
9181
9182 hpux11*)
3d248aec 9183 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
ea04106b
AX
9184 case $host_cpu in
9185 hppa*64*)
3d248aec 9186 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9187 ;;
9188 ia64*)
3d248aec 9189 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9190 ;;
9191 *)
3d248aec 9192 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9193 ;;
9194 esac
9195 else
9196 case $host_cpu in
9197 hppa*64*)
3d248aec 9198 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9199 ;;
9200 ia64*)
3d248aec 9201 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9202 ;;
9203 *)
3d248aec 9204 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9205 ;;
9206 esac
9207 fi
3d248aec
AX
9208 if test "$with_gnu_ld" = no; then
9209 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
ea04106b
AX
9210 hardcode_libdir_separator=:
9211
9212 case $host_cpu in
9213 hppa*64*|ia64*)
9214 hardcode_direct=no
9215 hardcode_shlibpath_var=no
9216 ;;
9217 *)
9218 hardcode_direct=yes
9219 hardcode_direct_absolute=yes
3d248aec 9220 export_dynamic_flag_spec='${wl}-E'
ea04106b
AX
9221
9222 # hardcode_minus_L: Not really in the search PATH,
9223 # but as the default location of the library.
9224 hardcode_minus_L=yes
9225 ;;
9226 esac
9227 fi
9228 ;;
9229
9230 irix5* | irix6* | nonstopux*)
3d248aec
AX
9231 if test "$GCC" = yes; then
9232 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
ea04106b
AX
9233 # Try to use the -exported_symbol ld option, if it does not
9234 # work, assume that -exports_file does not work either and
9235 # implicitly export all symbols.
3d248aec
AX
9236 save_LDFLAGS="$LDFLAGS"
9237 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
9238 cat >conftest.$ac_ext <<_ACEOF
9239int foo(void) {}
ea04106b 9240_ACEOF
3d248aec
AX
9241rm -f conftest.$ac_objext conftest$ac_exeext
9242if { (ac_try="$ac_link"
9243case "(($ac_try" in
9244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9245 *) ac_try_echo=$ac_try;;
9246esac
9247eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9248$as_echo "$ac_try_echo") >&5
9249 (eval "$ac_link") 2>conftest.er1
9250 ac_status=$?
9251 grep -v '^ *+' conftest.er1 >conftest.err
9252 rm -f conftest.er1
9253 cat conftest.err >&5
9254 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9255 (exit $ac_status); } && {
9256 test -z "$ac_c_werror_flag" ||
9257 test ! -s conftest.err
9258 } && test -s conftest$ac_exeext && {
9259 test "$cross_compiling" = yes ||
9260 $as_test_x conftest$ac_exeext
9261 }; then
9262 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
9263
ea04106b 9264else
3d248aec
AX
9265 $as_echo "$as_me: failed program was:" >&5
9266sed 's/^/| /' conftest.$ac_ext >&5
9267
9268
ea04106b 9269fi
3d248aec
AX
9270
9271rm -rf conftest.dSYM
9272rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9273 conftest$ac_exeext conftest.$ac_ext
9274 LDFLAGS="$save_LDFLAGS"
ea04106b 9275 else
3d248aec
AX
9276 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
9277 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
ea04106b
AX
9278 fi
9279 archive_cmds_need_lc='no'
3d248aec 9280 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
ea04106b
AX
9281 hardcode_libdir_separator=:
9282 inherit_rpath=yes
9283 link_all_deplibs=yes
9284 ;;
9285
3d248aec 9286 netbsd*)
ea04106b
AX
9287 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
9288 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
9289 else
9290 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
9291 fi
9292 hardcode_libdir_flag_spec='-R$libdir'
9293 hardcode_direct=yes
9294 hardcode_shlibpath_var=no
9295 ;;
9296
9297 newsos6)
9298 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9299 hardcode_direct=yes
3d248aec 9300 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
ea04106b
AX
9301 hardcode_libdir_separator=:
9302 hardcode_shlibpath_var=no
9303 ;;
9304
9305 *nto* | *qnx*)
9306 ;;
9307
3d248aec 9308 openbsd*)
ea04106b
AX
9309 if test -f /usr/libexec/ld.so; then
9310 hardcode_direct=yes
9311 hardcode_shlibpath_var=no
9312 hardcode_direct_absolute=yes
3d248aec 9313 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
ea04106b 9314 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
3d248aec
AX
9315 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9316 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9317 export_dynamic_flag_spec='${wl}-E'
ea04106b 9318 else
3d248aec
AX
9319 case $host_os in
9320 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9321 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9322 hardcode_libdir_flag_spec='-R$libdir'
9323 ;;
9324 *)
9325 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9326 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9327 ;;
9328 esac
ea04106b
AX
9329 fi
9330 else
9331 ld_shlibs=no
9332 fi
9333 ;;
9334
9335 os2*)
9336 hardcode_libdir_flag_spec='-L$libdir'
9337 hardcode_minus_L=yes
9338 allow_undefined_flag=unsupported
3d248aec
AX
9339 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
9340 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
ea04106b
AX
9341 ;;
9342
9343 osf3*)
3d248aec
AX
9344 if test "$GCC" = yes; then
9345 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9346 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
ea04106b
AX
9347 else
9348 allow_undefined_flag=' -expect_unresolved \*'
3d248aec 9349 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
ea04106b
AX
9350 fi
9351 archive_cmds_need_lc='no'
3d248aec 9352 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
ea04106b
AX
9353 hardcode_libdir_separator=:
9354 ;;
9355
9356 osf4* | osf5*) # as osf3* with the addition of -msym flag
3d248aec
AX
9357 if test "$GCC" = yes; then
9358 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9359 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
9360 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
ea04106b
AX
9361 else
9362 allow_undefined_flag=' -expect_unresolved \*'
3d248aec 9363 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
ea04106b 9364 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
3d248aec 9365 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
ea04106b
AX
9366
9367 # Both c and cxx compiler support -rpath directly
9368 hardcode_libdir_flag_spec='-rpath $libdir'
9369 fi
9370 archive_cmds_need_lc='no'
9371 hardcode_libdir_separator=:
9372 ;;
9373
9374 solaris*)
9375 no_undefined_flag=' -z defs'
3d248aec
AX
9376 if test "$GCC" = yes; then
9377 wlarc='${wl}'
9378 archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
ea04106b 9379 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
3d248aec 9380 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
ea04106b
AX
9381 else
9382 case `$CC -V 2>&1` in
9383 *"Compilers 5.0"*)
9384 wlarc=''
3d248aec 9385 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
ea04106b 9386 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
3d248aec 9387 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
ea04106b
AX
9388 ;;
9389 *)
3d248aec
AX
9390 wlarc='${wl}'
9391 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
ea04106b 9392 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
3d248aec 9393 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
ea04106b
AX
9394 ;;
9395 esac
9396 fi
9397 hardcode_libdir_flag_spec='-R$libdir'
9398 hardcode_shlibpath_var=no
9399 case $host_os in
9400 solaris2.[0-5] | solaris2.[0-5].*) ;;
9401 *)
9402 # The compiler driver will combine and reorder linker options,
3d248aec 9403 # but understands `-z linker_flag'. GCC discards it without `$wl',
ea04106b
AX
9404 # but is careful enough not to reorder.
9405 # Supported since Solaris 2.6 (maybe 2.5.1?)
3d248aec
AX
9406 if test "$GCC" = yes; then
9407 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
ea04106b
AX
9408 else
9409 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
9410 fi
9411 ;;
9412 esac
9413 link_all_deplibs=yes
9414 ;;
9415
9416 sunos4*)
3d248aec 9417 if test "x$host_vendor" = xsequent; then
ea04106b
AX
9418 # Use $CC to link under sequent, because it throws in some extra .o
9419 # files that make .init and .fini sections work.
3d248aec 9420 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9421 else
9422 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9423 fi
9424 hardcode_libdir_flag_spec='-L$libdir'
9425 hardcode_direct=yes
9426 hardcode_minus_L=yes
9427 hardcode_shlibpath_var=no
9428 ;;
9429
9430 sysv4)
9431 case $host_vendor in
9432 sni)
9433 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9434 hardcode_direct=yes # is this really true???
9435 ;;
9436 siemens)
9437 ## LD is ld it makes a PLAMLIB
9438 ## CC just makes a GrossModule.
9439 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9440 reload_cmds='$CC -r -o $output$reload_objs'
9441 hardcode_direct=no
9442 ;;
9443 motorola)
9444 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9445 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9446 ;;
9447 esac
9448 runpath_var='LD_RUN_PATH'
9449 hardcode_shlibpath_var=no
9450 ;;
9451
9452 sysv4.3*)
9453 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9454 hardcode_shlibpath_var=no
9455 export_dynamic_flag_spec='-Bexport'
9456 ;;
9457
9458 sysv4*MP*)
9459 if test -d /usr/nec; then
9460 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9461 hardcode_shlibpath_var=no
9462 runpath_var=LD_RUN_PATH
9463 hardcode_runpath_var=yes
9464 ld_shlibs=yes
9465 fi
9466 ;;
9467
9468 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
3d248aec 9469 no_undefined_flag='${wl}-z,text'
ea04106b
AX
9470 archive_cmds_need_lc=no
9471 hardcode_shlibpath_var=no
9472 runpath_var='LD_RUN_PATH'
9473
3d248aec
AX
9474 if test "$GCC" = yes; then
9475 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9476 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
ea04106b 9477 else
3d248aec
AX
9478 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9479 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9480 fi
9481 ;;
9482
9483 sysv5* | sco3.2v5* | sco5v6*)
3d248aec 9484 # Note: We can NOT use -z defs as we might desire, because we do not
ea04106b
AX
9485 # link with -lc, and that would cause any symbols used from libc to
9486 # always be unresolved, which means just about no library would
9487 # ever link correctly. If we're not using GNU ld we use -z text
9488 # though, which does catch some bad symbols but isn't as heavy-handed
9489 # as -z defs.
3d248aec
AX
9490 no_undefined_flag='${wl}-z,text'
9491 allow_undefined_flag='${wl}-z,nodefs'
ea04106b
AX
9492 archive_cmds_need_lc=no
9493 hardcode_shlibpath_var=no
3d248aec 9494 hardcode_libdir_flag_spec='${wl}-R,$libdir'
ea04106b
AX
9495 hardcode_libdir_separator=':'
9496 link_all_deplibs=yes
3d248aec 9497 export_dynamic_flag_spec='${wl}-Bexport'
ea04106b
AX
9498 runpath_var='LD_RUN_PATH'
9499
3d248aec
AX
9500 if test "$GCC" = yes; then
9501 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9502 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
ea04106b 9503 else
3d248aec
AX
9504 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
9505 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
ea04106b
AX
9506 fi
9507 ;;
9508
9509 uts4*)
9510 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9511 hardcode_libdir_flag_spec='-L$libdir'
9512 hardcode_shlibpath_var=no
9513 ;;
9514
9515 *)
9516 ld_shlibs=no
9517 ;;
9518 esac
9519
3d248aec 9520 if test x$host_vendor = xsni; then
ea04106b
AX
9521 case $host in
9522 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3d248aec 9523 export_dynamic_flag_spec='${wl}-Blargedynsym'
ea04106b
AX
9524 ;;
9525 esac
9526 fi
9527 fi
9528
3d248aec 9529{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5
ea04106b 9530$as_echo "$ld_shlibs" >&6; }
3d248aec 9531test "$ld_shlibs" = no && can_build_shared=no
ea04106b
AX
9532
9533with_gnu_ld=$with_gnu_ld
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549#
9550# Do we need to explicitly link libc?
9551#
9552case "x$archive_cmds_need_lc" in
9553x|xyes)
9554 # Assume -lc should be added
9555 archive_cmds_need_lc=yes
9556
3d248aec 9557 if test "$enable_shared" = yes && test "$GCC" = yes; then
ea04106b
AX
9558 case $archive_cmds in
9559 *'~'*)
9560 # FIXME: we may have to deal with multi-command sequences.
9561 ;;
9562 '$CC '*)
9563 # Test whether the compiler implicitly links with -lc since on some
9564 # systems, -lgcc has to come before -lc. If gcc already passes -lc
9565 # to ld, don't add -lc before -lgcc.
3d248aec 9566 { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
ea04106b 9567$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
3d248aec
AX
9568 $RM conftest*
9569 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
ea04106b 9570
3d248aec 9571 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ea04106b
AX
9572 (eval $ac_compile) 2>&5
9573 ac_status=$?
3d248aec
AX
9574 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9575 (exit $ac_status); } 2>conftest.err; then
9576 soname=conftest
9577 lib=conftest
9578 libobjs=conftest.$ac_objext
9579 deplibs=
9580 wl=$lt_prog_compiler_wl
9581 pic_flag=$lt_prog_compiler_pic
9582 compiler_flags=-v
9583 linker_flags=-v
9584 verstring=
9585 output_objdir=.
9586 libname=conftest
9587 lt_save_allow_undefined_flag=$allow_undefined_flag
9588 allow_undefined_flag=
9589 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
ea04106b
AX
9590 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
9591 ac_status=$?
3d248aec
AX
9592 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
9593 (exit $ac_status); }
9594 then
9595 archive_cmds_need_lc=no
9596 else
9597 archive_cmds_need_lc=yes
9598 fi
9599 allow_undefined_flag=$lt_save_allow_undefined_flag
9600 else
9601 cat conftest.err 1>&5
9602 fi
9603 $RM conftest*
9604 { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
9605$as_echo "$archive_cmds_need_lc" >&6; }
ea04106b
AX
9606 ;;
9607 esac
9608 fi
9609 ;;
9610esac
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
3d248aec
AX
9763
9764
9765
9766
9767
9768 { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
ea04106b
AX
9769$as_echo_n "checking dynamic linker characteristics... " >&6; }
9770
3d248aec 9771if test "$GCC" = yes; then
ea04106b 9772 case $host_os in
3d248aec
AX
9773 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
9774 *) lt_awk_arg="/^libraries:/" ;;
ea04106b 9775 esac
3d248aec
AX
9776 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9777 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
ea04106b
AX
9778 # if the path contains ";" then we assume it to be the separator
9779 # otherwise default to the standard path separator (i.e. ":") - it is
9780 # assumed that no part of a normal pathname contains ";" but that should
9781 # okay in the real world where ";" in dirpaths is itself problematic.
3d248aec
AX
9782 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
9783 else
9784 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
9785 fi
ea04106b 9786 # Ok, now we have the path, separated by spaces, we can step through it
3d248aec 9787 # and add multilib dir if necessary.
ea04106b 9788 lt_tmp_lt_search_path_spec=
3d248aec 9789 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
ea04106b 9790 for lt_sys_path in $lt_search_path_spec; do
3d248aec
AX
9791 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
9792 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
9793 else
ea04106b
AX
9794 test -d "$lt_sys_path" && \
9795 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
9796 fi
9797 done
3d248aec
AX
9798 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
9799BEGIN {RS=" "; FS="/|\n";} {
9800 lt_foo="";
9801 lt_count=0;
ea04106b
AX
9802 for (lt_i = NF; lt_i > 0; lt_i--) {
9803 if ($lt_i != "" && $lt_i != ".") {
9804 if ($lt_i == "..") {
9805 lt_count++;
9806 } else {
9807 if (lt_count == 0) {
3d248aec 9808 lt_foo="/" $lt_i lt_foo;
ea04106b
AX
9809 } else {
9810 lt_count--;
9811 }
9812 }
9813 }
9814 }
9815 if (lt_foo != "") { lt_freq[lt_foo]++; }
9816 if (lt_freq[lt_foo] == 1) { print lt_foo; }
9817}'`
3d248aec 9818 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
ea04106b
AX
9819else
9820 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9821fi
9822library_names_spec=
9823libname_spec='lib$name'
9824soname_spec=
3d248aec 9825shrext_cmds=".so"
ea04106b
AX
9826postinstall_cmds=
9827postuninstall_cmds=
9828finish_cmds=
9829finish_eval=
9830shlibpath_var=
9831shlibpath_overrides_runpath=unknown
9832version_type=none
9833dynamic_linker="$host_os ld.so"
9834sys_lib_dlsearch_path_spec="/lib /usr/lib"
9835need_lib_prefix=unknown
9836hardcode_into_libs=no
9837
9838# when you set need_version to no, make sure it does not cause -set_version
9839# flags to be left without arguments
9840need_version=unknown
9841
9842case $host_os in
9843aix3*)
3d248aec
AX
9844 version_type=linux
9845 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
ea04106b
AX
9846 shlibpath_var=LIBPATH
9847
9848 # AIX 3 has no versioning support, so we append a major version to the name.
3d248aec 9849 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
9850 ;;
9851
9852aix[4-9]*)
3d248aec 9853 version_type=linux
ea04106b
AX
9854 need_lib_prefix=no
9855 need_version=no
9856 hardcode_into_libs=yes
3d248aec 9857 if test "$host_cpu" = ia64; then
ea04106b 9858 # AIX 5 supports IA64
3d248aec 9859 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
ea04106b
AX
9860 shlibpath_var=LD_LIBRARY_PATH
9861 else
9862 # With GCC up to 2.95.x, collect2 would create an import file
9863 # for dependence libraries. The import file would start with
3d248aec
AX
9864 # the line `#! .'. This would cause the generated library to
9865 # depend on `.', always an invalid library. This was fixed in
ea04106b
AX
9866 # development snapshots of GCC prior to 3.0.
9867 case $host_os in
9868 aix4 | aix4.[01] | aix4.[01].*)
9869 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9870 echo ' yes '
3d248aec 9871 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
ea04106b
AX
9872 :
9873 else
9874 can_build_shared=no
9875 fi
9876 ;;
9877 esac
3d248aec 9878 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
ea04106b
AX
9879 # soname into executable. Probably we can add versioning support to
9880 # collect2, so additional links can be useful in future.
3d248aec 9881 if test "$aix_use_runtimelinking" = yes; then
ea04106b
AX
9882 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9883 # instead of lib<name>.a to let people know that these are not
9884 # typical AIX shared libraries.
3d248aec
AX
9885 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9886 else
ea04106b
AX
9887 # We preserve .a as extension for shared libraries through AIX4.2
9888 # and later when we are not doing run time linking.
3d248aec
AX
9889 library_names_spec='${libname}${release}.a $libname.a'
9890 soname_spec='${libname}${release}${shared_ext}$major'
9891 fi
ea04106b
AX
9892 shlibpath_var=LIBPATH
9893 fi
9894 ;;
9895
9896amigaos*)
9897 case $host_cpu in
9898 powerpc)
9899 # Since July 2007 AmigaOS4 officially supports .so libraries.
9900 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3d248aec 9901 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
ea04106b
AX
9902 ;;
9903 m68k)
9904 library_names_spec='$libname.ixlibrary $libname.a'
9905 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3d248aec 9906 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
ea04106b
AX
9907 ;;
9908 esac
9909 ;;
9910
9911beos*)
3d248aec 9912 library_names_spec='${libname}${shared_ext}'
ea04106b
AX
9913 dynamic_linker="$host_os ld.so"
9914 shlibpath_var=LIBRARY_PATH
9915 ;;
9916
9917bsdi[45]*)
3d248aec 9918 version_type=linux
ea04106b 9919 need_version=no
3d248aec
AX
9920 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9921 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
9922 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9923 shlibpath_var=LD_LIBRARY_PATH
9924 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9925 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9926 # the default ld.so.conf also contains /usr/contrib/lib and
9927 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9928 # libtool to hard-code these into programs
9929 ;;
9930
9931cygwin* | mingw* | pw32* | cegcc*)
9932 version_type=windows
3d248aec 9933 shrext_cmds=".dll"
ea04106b
AX
9934 need_version=no
9935 need_lib_prefix=no
9936
3d248aec
AX
9937 case $GCC,$host_os in
9938 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
ea04106b
AX
9939 library_names_spec='$libname.dll.a'
9940 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3d248aec
AX
9941 postinstall_cmds='base_file=`basename \${file}`~
9942 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
ea04106b
AX
9943 dldir=$destdir/`dirname \$dlpath`~
9944 test -d \$dldir || mkdir -p \$dldir~
9945 $install_prog $dir/$dlname \$dldir/$dlname~
9946 chmod a+x \$dldir/$dlname~
9947 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
9948 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
9949 fi'
9950 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
9951 dlpath=$dir/\$dldll~
9952 $RM \$dlpath'
9953 shlibpath_overrides_runpath=yes
9954
9955 case $host_os in
9956 cygwin*)
9957 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3d248aec
AX
9958 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9959 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
ea04106b
AX
9960 ;;
9961 mingw* | cegcc*)
9962 # MinGW DLLs use traditional 'lib' prefix
3d248aec
AX
9963 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
9964 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
ea04106b 9965 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
3d248aec
AX
9966 # It is most probably a Windows format PATH printed by
9967 # mingw gcc, but we are running on Cygwin. Gcc prints its search
9968 # path with ; separators, and with drive letters. We can handle the
9969 # drive letters (cygwin fileutils understands them), so leave them,
9970 # especially as we might pass files found there to a mingw objdump,
9971 # which wouldn't understand a cygwinified path. Ahh.
ea04106b
AX
9972 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9973 else
3d248aec 9974 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
ea04106b 9975 fi
3d248aec
AX
9976 ;;
9977 pw32*)
9978 # pw32 DLLs use 'pw' prefix rather than 'lib'
9979 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
ea04106b
AX
9980 ;;
9981 esac
ea04106b
AX
9982 ;;
9983
9984 *)
3d248aec 9985 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
ea04106b
AX
9986 ;;
9987 esac
3d248aec 9988 dynamic_linker='Win32 ld.exe'
ea04106b
AX
9989 # FIXME: first we should search . and the directory the executable is in
9990 shlibpath_var=PATH
9991 ;;
9992
9993darwin* | rhapsody*)
9994 dynamic_linker="$host_os dyld"
9995 version_type=darwin
9996 need_lib_prefix=no
9997 need_version=no
3d248aec
AX
9998 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
9999 soname_spec='${libname}${release}${major}$shared_ext'
ea04106b
AX
10000 shlibpath_overrides_runpath=yes
10001 shlibpath_var=DYLD_LIBRARY_PATH
10002 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10003
10004 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
10005 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10006 ;;
10007
10008dgux*)
3d248aec 10009 version_type=linux
ea04106b
AX
10010 need_lib_prefix=no
10011 need_version=no
3d248aec
AX
10012 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10013 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10014 shlibpath_var=LD_LIBRARY_PATH
10015 ;;
10016
3d248aec
AX
10017freebsd1*)
10018 dynamic_linker=no
10019 ;;
10020
ea04106b
AX
10021freebsd* | dragonfly*)
10022 # DragonFly does not have aout. When/if they implement a new
10023 # versioning mechanism, adjust this.
10024 if test -x /usr/bin/objformat; then
10025 objformat=`/usr/bin/objformat`
10026 else
10027 case $host_os in
3d248aec 10028 freebsd[123]*) objformat=aout ;;
ea04106b
AX
10029 *) objformat=elf ;;
10030 esac
10031 fi
10032 version_type=freebsd-$objformat
10033 case $version_type in
10034 freebsd-elf*)
3d248aec 10035 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
ea04106b
AX
10036 need_version=no
10037 need_lib_prefix=no
10038 ;;
10039 freebsd-*)
3d248aec 10040 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
ea04106b
AX
10041 need_version=yes
10042 ;;
10043 esac
10044 shlibpath_var=LD_LIBRARY_PATH
10045 case $host_os in
3d248aec 10046 freebsd2*)
ea04106b
AX
10047 shlibpath_overrides_runpath=yes
10048 ;;
10049 freebsd3.[01]* | freebsdelf3.[01]*)
10050 shlibpath_overrides_runpath=yes
10051 hardcode_into_libs=yes
10052 ;;
10053 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
10054 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
10055 shlibpath_overrides_runpath=no
10056 hardcode_into_libs=yes
10057 ;;
10058 *) # from 4.6 on, and DragonFly
10059 shlibpath_overrides_runpath=yes
10060 hardcode_into_libs=yes
10061 ;;
10062 esac
10063 ;;
10064
3d248aec
AX
10065gnu*)
10066 version_type=linux
ea04106b
AX
10067 need_lib_prefix=no
10068 need_version=no
3d248aec
AX
10069 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10070 soname_spec='${libname}${release}${shared_ext}$major'
10071 shlibpath_var=LD_LIBRARY_PATH
ea04106b
AX
10072 hardcode_into_libs=yes
10073 ;;
10074
10075hpux9* | hpux10* | hpux11*)
10076 # Give a soname corresponding to the major version so that dld.sl refuses to
10077 # link against other versions.
10078 version_type=sunos
10079 need_lib_prefix=no
10080 need_version=no
10081 case $host_cpu in
10082 ia64*)
10083 shrext_cmds='.so'
10084 hardcode_into_libs=yes
10085 dynamic_linker="$host_os dld.so"
10086 shlibpath_var=LD_LIBRARY_PATH
10087 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3d248aec
AX
10088 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10089 soname_spec='${libname}${release}${shared_ext}$major'
10090 if test "X$HPUX_IA64_MODE" = X32; then
ea04106b
AX
10091 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10092 else
10093 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10094 fi
3d248aec 10095 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
ea04106b
AX
10096 ;;
10097 hppa*64*)
10098 shrext_cmds='.sl'
10099 hardcode_into_libs=yes
10100 dynamic_linker="$host_os dld.sl"
10101 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10102 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3d248aec
AX
10103 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10104 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10105 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10106 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10107 ;;
10108 *)
10109 shrext_cmds='.sl'
10110 dynamic_linker="$host_os dld.sl"
10111 shlibpath_var=SHLIB_PATH
10112 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3d248aec
AX
10113 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10114 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10115 ;;
10116 esac
3d248aec 10117 # HP-UX runs *really* slowly unless shared libraries are mode 555.
ea04106b 10118 postinstall_cmds='chmod 555 $lib'
ea04106b
AX
10119 ;;
10120
10121interix[3-9]*)
3d248aec 10122 version_type=linux
ea04106b
AX
10123 need_lib_prefix=no
10124 need_version=no
3d248aec
AX
10125 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10126 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10127 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
10128 shlibpath_var=LD_LIBRARY_PATH
10129 shlibpath_overrides_runpath=no
10130 hardcode_into_libs=yes
10131 ;;
10132
10133irix5* | irix6* | nonstopux*)
10134 case $host_os in
10135 nonstopux*) version_type=nonstopux ;;
10136 *)
3d248aec
AX
10137 if test "$lt_cv_prog_gnu_ld" = yes; then
10138 version_type=linux
ea04106b
AX
10139 else
10140 version_type=irix
10141 fi ;;
10142 esac
10143 need_lib_prefix=no
10144 need_version=no
3d248aec
AX
10145 soname_spec='${libname}${release}${shared_ext}$major'
10146 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
ea04106b
AX
10147 case $host_os in
10148 irix5* | nonstopux*)
10149 libsuff= shlibsuff=
10150 ;;
10151 *)
10152 case $LD in # libtool.m4 will add one of these switches to LD
10153 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10154 libsuff= shlibsuff= libmagic=32-bit;;
10155 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10156 libsuff=32 shlibsuff=N32 libmagic=N32;;
10157 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10158 libsuff=64 shlibsuff=64 libmagic=64-bit;;
10159 *) libsuff= shlibsuff= libmagic=never-match;;
10160 esac
10161 ;;
10162 esac
10163 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10164 shlibpath_overrides_runpath=no
3d248aec
AX
10165 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10166 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
ea04106b
AX
10167 hardcode_into_libs=yes
10168 ;;
10169
10170# No shared lib support for Linux oldld, aout, or coff.
10171linux*oldld* | linux*aout* | linux*coff*)
10172 dynamic_linker=no
10173 ;;
10174
3d248aec
AX
10175# This must be Linux ELF.
10176linux* | k*bsd*-gnu)
10177 version_type=linux
ea04106b
AX
10178 need_lib_prefix=no
10179 need_version=no
3d248aec
AX
10180 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10181 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10182 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10183 shlibpath_var=LD_LIBRARY_PATH
10184 shlibpath_overrides_runpath=no
ea04106b 10185 # Some binutils ld are patched to set DT_RUNPATH
3d248aec
AX
10186 save_LDFLAGS=$LDFLAGS
10187 save_libdir=$libdir
10188 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
10189 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
10190 cat >conftest.$ac_ext <<_ACEOF
10191/* confdefs.h. */
10192_ACEOF
10193cat confdefs.h >>conftest.$ac_ext
10194cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
10195/* end confdefs.h. */
10196
10197int
10198main ()
10199{
10200
10201 ;
10202 return 0;
10203}
10204_ACEOF
3d248aec
AX
10205rm -f conftest.$ac_objext conftest$ac_exeext
10206if { (ac_try="$ac_link"
10207case "(($ac_try" in
10208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10209 *) ac_try_echo=$ac_try;;
10210esac
10211eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10212$as_echo "$ac_try_echo") >&5
10213 (eval "$ac_link") 2>conftest.er1
10214 ac_status=$?
10215 grep -v '^ *+' conftest.er1 >conftest.err
10216 rm -f conftest.er1
10217 cat conftest.err >&5
10218 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10219 (exit $ac_status); } && {
10220 test -z "$ac_c_werror_flag" ||
10221 test ! -s conftest.err
10222 } && test -s conftest$ac_exeext && {
10223 test "$cross_compiling" = yes ||
10224 $as_test_x conftest$ac_exeext
10225 }; then
10226 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
10227 shlibpath_overrides_runpath=yes
ea04106b 10228fi
3d248aec
AX
10229
10230else
10231 $as_echo "$as_me: failed program was:" >&5
10232sed 's/^/| /' conftest.$ac_ext >&5
10233
ea04106b
AX
10234
10235fi
10236
3d248aec
AX
10237rm -rf conftest.dSYM
10238rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10239 conftest$ac_exeext conftest.$ac_ext
10240 LDFLAGS=$save_LDFLAGS
10241 libdir=$save_libdir
ea04106b
AX
10242
10243 # This implies no fast_install, which is unacceptable.
10244 # Some rework will be needed to allow for fast_install
10245 # before this can be enabled.
10246 hardcode_into_libs=yes
10247
3d248aec
AX
10248 # Add ABI-specific directories to the system library path.
10249 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
10250
10251 # Append ld.so.conf contents to the search path
ea04106b 10252 if test -f /etc/ld.so.conf; then
3d248aec
AX
10253 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
10254 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
ea04106b
AX
10255 fi
10256
10257 # We used to test for /lib/ld.so.1 and disable shared libraries on
10258 # powerpc, because MkLinux only supported shared libraries with the
10259 # GNU dynamic linker. Since this was broken with cross compilers,
10260 # most powerpc-linux boxes support dynamic linking these days and
10261 # people can always --disable-shared, the test was removed, and we
10262 # assume the GNU/Linux dynamic linker is in use.
10263 dynamic_linker='GNU/Linux ld.so'
10264 ;;
10265
ea04106b
AX
10266netbsd*)
10267 version_type=sunos
10268 need_lib_prefix=no
10269 need_version=no
10270 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3d248aec 10271 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
ea04106b
AX
10272 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10273 dynamic_linker='NetBSD (a.out) ld.so'
10274 else
3d248aec
AX
10275 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10276 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10277 dynamic_linker='NetBSD ld.elf_so'
10278 fi
10279 shlibpath_var=LD_LIBRARY_PATH
10280 shlibpath_overrides_runpath=yes
10281 hardcode_into_libs=yes
10282 ;;
10283
10284newsos6)
3d248aec
AX
10285 version_type=linux
10286 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
ea04106b
AX
10287 shlibpath_var=LD_LIBRARY_PATH
10288 shlibpath_overrides_runpath=yes
10289 ;;
10290
10291*nto* | *qnx*)
10292 version_type=qnx
10293 need_lib_prefix=no
10294 need_version=no
3d248aec
AX
10295 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10296 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10297 shlibpath_var=LD_LIBRARY_PATH
10298 shlibpath_overrides_runpath=no
10299 hardcode_into_libs=yes
10300 dynamic_linker='ldqnx.so'
10301 ;;
10302
3d248aec 10303openbsd*)
ea04106b 10304 version_type=sunos
3d248aec 10305 sys_lib_dlsearch_path_spec="/usr/lib"
ea04106b 10306 need_lib_prefix=no
3d248aec
AX
10307 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10308 case $host_os in
10309 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10310 *) need_version=no ;;
10311 esac
10312 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
68d83c55
AX
10313 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10314 shlibpath_var=LD_LIBRARY_PATH
3d248aec
AX
10315 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10316 case $host_os in
10317 openbsd2.[89] | openbsd2.[89].*)
10318 shlibpath_overrides_runpath=no
10319 ;;
10320 *)
10321 shlibpath_overrides_runpath=yes
10322 ;;
10323 esac
10324 else
10325 shlibpath_overrides_runpath=yes
10326 fi
ea04106b
AX
10327 ;;
10328
10329os2*)
10330 libname_spec='$name'
3d248aec 10331 shrext_cmds=".dll"
ea04106b 10332 need_lib_prefix=no
3d248aec 10333 library_names_spec='$libname${shared_ext} $libname.a'
ea04106b 10334 dynamic_linker='OS/2 ld.exe'
3d248aec 10335 shlibpath_var=LIBPATH
ea04106b
AX
10336 ;;
10337
10338osf3* | osf4* | osf5*)
10339 version_type=osf
10340 need_lib_prefix=no
10341 need_version=no
3d248aec
AX
10342 soname_spec='${libname}${release}${shared_ext}$major'
10343 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
ea04106b
AX
10344 shlibpath_var=LD_LIBRARY_PATH
10345 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3d248aec 10346 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
ea04106b
AX
10347 ;;
10348
10349rdos*)
10350 dynamic_linker=no
10351 ;;
10352
10353solaris*)
3d248aec 10354 version_type=linux
ea04106b
AX
10355 need_lib_prefix=no
10356 need_version=no
3d248aec
AX
10357 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10358 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10359 shlibpath_var=LD_LIBRARY_PATH
10360 shlibpath_overrides_runpath=yes
10361 hardcode_into_libs=yes
10362 # ldd complains unless libraries are executable
10363 postinstall_cmds='chmod +x $lib'
10364 ;;
10365
10366sunos4*)
10367 version_type=sunos
3d248aec 10368 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
ea04106b
AX
10369 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10370 shlibpath_var=LD_LIBRARY_PATH
10371 shlibpath_overrides_runpath=yes
3d248aec 10372 if test "$with_gnu_ld" = yes; then
ea04106b
AX
10373 need_lib_prefix=no
10374 fi
10375 need_version=yes
10376 ;;
10377
10378sysv4 | sysv4.3*)
3d248aec
AX
10379 version_type=linux
10380 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10381 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10382 shlibpath_var=LD_LIBRARY_PATH
10383 case $host_vendor in
10384 sni)
10385 shlibpath_overrides_runpath=no
10386 need_lib_prefix=no
10387 runpath_var=LD_RUN_PATH
10388 ;;
10389 siemens)
10390 need_lib_prefix=no
10391 ;;
10392 motorola)
10393 need_lib_prefix=no
10394 need_version=no
10395 shlibpath_overrides_runpath=no
10396 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10397 ;;
10398 esac
10399 ;;
10400
10401sysv4*MP*)
3d248aec
AX
10402 if test -d /usr/nec ;then
10403 version_type=linux
10404 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10405 soname_spec='$libname${shared_ext}.$major'
ea04106b
AX
10406 shlibpath_var=LD_LIBRARY_PATH
10407 fi
10408 ;;
10409
10410sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3d248aec 10411 version_type=freebsd-elf
ea04106b
AX
10412 need_lib_prefix=no
10413 need_version=no
3d248aec
AX
10414 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10415 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10416 shlibpath_var=LD_LIBRARY_PATH
10417 shlibpath_overrides_runpath=yes
10418 hardcode_into_libs=yes
3d248aec 10419 if test "$with_gnu_ld" = yes; then
ea04106b
AX
10420 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
10421 else
10422 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
10423 case $host_os in
10424 sco3.2v5*)
10425 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
10426 ;;
10427 esac
10428 fi
10429 sys_lib_dlsearch_path_spec='/usr/lib'
10430 ;;
10431
10432tpf*)
10433 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3d248aec 10434 version_type=linux
ea04106b
AX
10435 need_lib_prefix=no
10436 need_version=no
3d248aec 10437 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
ea04106b
AX
10438 shlibpath_var=LD_LIBRARY_PATH
10439 shlibpath_overrides_runpath=no
10440 hardcode_into_libs=yes
10441 ;;
10442
10443uts4*)
3d248aec
AX
10444 version_type=linux
10445 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10446 soname_spec='${libname}${release}${shared_ext}$major'
ea04106b
AX
10447 shlibpath_var=LD_LIBRARY_PATH
10448 ;;
10449
10450*)
10451 dynamic_linker=no
10452 ;;
10453esac
3d248aec 10454{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
ea04106b 10455$as_echo "$dynamic_linker" >&6; }
3d248aec 10456test "$dynamic_linker" = no && can_build_shared=no
ea04106b
AX
10457
10458variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3d248aec 10459if test "$GCC" = yes; then
ea04106b
AX
10460 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
10461fi
10462
3d248aec
AX
10463if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
10464 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
ea04106b 10465fi
3d248aec
AX
10466if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
10467 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
ea04106b
AX
10468fi
10469
ea04106b
AX
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
3d248aec 10556 { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
ea04106b
AX
10557$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10558hardcode_action=
10559if test -n "$hardcode_libdir_flag_spec" ||
10560 test -n "$runpath_var" ||
3d248aec 10561 test "X$hardcode_automatic" = "Xyes" ; then
ea04106b
AX
10562
10563 # We can hardcode non-existent directories.
3d248aec 10564 if test "$hardcode_direct" != no &&
ea04106b
AX
10565 # If the only mechanism to avoid hardcoding is shlibpath_var, we
10566 # have to relink, otherwise we might link with an installed library
10567 # when we should be linking with a yet-to-be-installed one
3d248aec
AX
10568 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
10569 test "$hardcode_minus_L" != no; then
ea04106b
AX
10570 # Linking always hardcodes the temporary library directory.
10571 hardcode_action=relink
10572 else
10573 # We can link without hardcoding, and we can hardcode nonexisting dirs.
10574 hardcode_action=immediate
10575 fi
10576else
10577 # We cannot hardcode anything, or else we can only hardcode existing
10578 # directories.
10579 hardcode_action=unsupported
10580fi
3d248aec 10581{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5
ea04106b
AX
10582$as_echo "$hardcode_action" >&6; }
10583
3d248aec
AX
10584if test "$hardcode_action" = relink ||
10585 test "$inherit_rpath" = yes; then
ea04106b
AX
10586 # Fast installation is not supported
10587 enable_fast_install=no
3d248aec
AX
10588elif test "$shlibpath_overrides_runpath" = yes ||
10589 test "$enable_shared" = no; then
ea04106b
AX
10590 # Fast installation is not necessary
10591 enable_fast_install=needless
10592fi
10593
10594
10595
10596
10597
10598
3d248aec 10599 if test "x$enable_dlopen" != xyes; then
ea04106b
AX
10600 enable_dlopen=unknown
10601 enable_dlopen_self=unknown
10602 enable_dlopen_self_static=unknown
10603else
10604 lt_cv_dlopen=no
10605 lt_cv_dlopen_libs=
10606
10607 case $host_os in
10608 beos*)
3d248aec 10609 lt_cv_dlopen="load_add_on"
ea04106b
AX
10610 lt_cv_dlopen_libs=
10611 lt_cv_dlopen_self=yes
10612 ;;
10613
10614 mingw* | pw32* | cegcc*)
3d248aec 10615 lt_cv_dlopen="LoadLibrary"
ea04106b
AX
10616 lt_cv_dlopen_libs=
10617 ;;
10618
10619 cygwin*)
3d248aec 10620 lt_cv_dlopen="dlopen"
ea04106b
AX
10621 lt_cv_dlopen_libs=
10622 ;;
10623
10624 darwin*)
3d248aec
AX
10625 # if libdl is installed we need to link against it
10626 { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
ea04106b 10627$as_echo_n "checking for dlopen in -ldl... " >&6; }
3d248aec 10628if test "${ac_cv_lib_dl_dlopen+set}" = set; then
ea04106b
AX
10629 $as_echo_n "(cached) " >&6
10630else
10631 ac_check_lib_save_LIBS=$LIBS
10632LIBS="-ldl $LIBS"
3d248aec
AX
10633cat >conftest.$ac_ext <<_ACEOF
10634/* confdefs.h. */
10635_ACEOF
10636cat confdefs.h >>conftest.$ac_ext
10637cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
10638/* end confdefs.h. */
10639
10640/* Override any GCC internal prototype to avoid an error.
10641 Use char because int might match the return type of a GCC
10642 builtin and then its argument prototype would still apply. */
10643#ifdef __cplusplus
10644extern "C"
10645#endif
10646char dlopen ();
10647int
10648main ()
10649{
10650return dlopen ();
10651 ;
10652 return 0;
10653}
10654_ACEOF
3d248aec
AX
10655rm -f conftest.$ac_objext conftest$ac_exeext
10656if { (ac_try="$ac_link"
10657case "(($ac_try" in
10658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10659 *) ac_try_echo=$ac_try;;
10660esac
10661eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10662$as_echo "$ac_try_echo") >&5
10663 (eval "$ac_link") 2>conftest.er1
10664 ac_status=$?
10665 grep -v '^ *+' conftest.er1 >conftest.err
10666 rm -f conftest.er1
10667 cat conftest.err >&5
10668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10669 (exit $ac_status); } && {
10670 test -z "$ac_c_werror_flag" ||
10671 test ! -s conftest.err
10672 } && test -s conftest$ac_exeext && {
10673 test "$cross_compiling" = yes ||
10674 $as_test_x conftest$ac_exeext
10675 }; then
ea04106b
AX
10676 ac_cv_lib_dl_dlopen=yes
10677else
3d248aec
AX
10678 $as_echo "$as_me: failed program was:" >&5
10679sed 's/^/| /' conftest.$ac_ext >&5
10680
10681 ac_cv_lib_dl_dlopen=no
ea04106b 10682fi
3d248aec
AX
10683
10684rm -rf conftest.dSYM
10685rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10686 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
10687LIBS=$ac_check_lib_save_LIBS
10688fi
3d248aec 10689{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
ea04106b 10690$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
3d248aec
AX
10691if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
10692 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
ea04106b
AX
10693else
10694
3d248aec 10695 lt_cv_dlopen="dyld"
ea04106b
AX
10696 lt_cv_dlopen_libs=
10697 lt_cv_dlopen_self=yes
10698
10699fi
10700
10701 ;;
10702
10703 *)
3d248aec
AX
10704 { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
10705$as_echo_n "checking for shl_load... " >&6; }
10706if test "${ac_cv_func_shl_load+set}" = set; then
10707 $as_echo_n "(cached) " >&6
10708else
10709 cat >conftest.$ac_ext <<_ACEOF
10710/* confdefs.h. */
10711_ACEOF
10712cat confdefs.h >>conftest.$ac_ext
10713cat >>conftest.$ac_ext <<_ACEOF
10714/* end confdefs.h. */
10715/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
10716 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10717#define shl_load innocuous_shl_load
10718
10719/* System header to define __stub macros and hopefully few prototypes,
10720 which can conflict with char shl_load (); below.
10721 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10722 <limits.h> exists even on freestanding compilers. */
10723
10724#ifdef __STDC__
10725# include <limits.h>
10726#else
10727# include <assert.h>
10728#endif
10729
10730#undef shl_load
10731
10732/* Override any GCC internal prototype to avoid an error.
10733 Use char because int might match the return type of a GCC
10734 builtin and then its argument prototype would still apply. */
10735#ifdef __cplusplus
10736extern "C"
10737#endif
10738char shl_load ();
10739/* The GNU C library defines this for functions which it implements
10740 to always fail with ENOSYS. Some functions are actually named
10741 something starting with __ and the normal name is an alias. */
10742#if defined __stub_shl_load || defined __stub___shl_load
10743choke me
10744#endif
10745
10746int
10747main ()
10748{
10749return shl_load ();
10750 ;
10751 return 0;
10752}
10753_ACEOF
10754rm -f conftest.$ac_objext conftest$ac_exeext
10755if { (ac_try="$ac_link"
10756case "(($ac_try" in
10757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10758 *) ac_try_echo=$ac_try;;
10759esac
10760eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10761$as_echo "$ac_try_echo") >&5
10762 (eval "$ac_link") 2>conftest.er1
10763 ac_status=$?
10764 grep -v '^ *+' conftest.er1 >conftest.err
10765 rm -f conftest.er1
10766 cat conftest.err >&5
10767 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10768 (exit $ac_status); } && {
10769 test -z "$ac_c_werror_flag" ||
10770 test ! -s conftest.err
10771 } && test -s conftest$ac_exeext && {
10772 test "$cross_compiling" = yes ||
10773 $as_test_x conftest$ac_exeext
10774 }; then
10775 ac_cv_func_shl_load=yes
ea04106b 10776else
3d248aec
AX
10777 $as_echo "$as_me: failed program was:" >&5
10778sed 's/^/| /' conftest.$ac_ext >&5
10779
10780 ac_cv_func_shl_load=no
10781fi
10782
10783rm -rf conftest.dSYM
10784rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10785 conftest$ac_exeext conftest.$ac_ext
10786fi
10787{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
10788$as_echo "$ac_cv_func_shl_load" >&6; }
10789if test "x$ac_cv_func_shl_load" = x""yes; then
10790 lt_cv_dlopen="shl_load"
10791else
10792 { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
ea04106b 10793$as_echo_n "checking for shl_load in -ldld... " >&6; }
3d248aec 10794if test "${ac_cv_lib_dld_shl_load+set}" = set; then
ea04106b
AX
10795 $as_echo_n "(cached) " >&6
10796else
10797 ac_check_lib_save_LIBS=$LIBS
10798LIBS="-ldld $LIBS"
3d248aec
AX
10799cat >conftest.$ac_ext <<_ACEOF
10800/* confdefs.h. */
10801_ACEOF
10802cat confdefs.h >>conftest.$ac_ext
10803cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
10804/* end confdefs.h. */
10805
10806/* Override any GCC internal prototype to avoid an error.
10807 Use char because int might match the return type of a GCC
10808 builtin and then its argument prototype would still apply. */
10809#ifdef __cplusplus
10810extern "C"
10811#endif
10812char shl_load ();
10813int
10814main ()
10815{
10816return shl_load ();
10817 ;
10818 return 0;
10819}
10820_ACEOF
3d248aec
AX
10821rm -f conftest.$ac_objext conftest$ac_exeext
10822if { (ac_try="$ac_link"
10823case "(($ac_try" in
10824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10825 *) ac_try_echo=$ac_try;;
10826esac
10827eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10828$as_echo "$ac_try_echo") >&5
10829 (eval "$ac_link") 2>conftest.er1
10830 ac_status=$?
10831 grep -v '^ *+' conftest.er1 >conftest.err
10832 rm -f conftest.er1
10833 cat conftest.err >&5
10834 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10835 (exit $ac_status); } && {
10836 test -z "$ac_c_werror_flag" ||
10837 test ! -s conftest.err
10838 } && test -s conftest$ac_exeext && {
10839 test "$cross_compiling" = yes ||
10840 $as_test_x conftest$ac_exeext
10841 }; then
ea04106b
AX
10842 ac_cv_lib_dld_shl_load=yes
10843else
3d248aec
AX
10844 $as_echo "$as_me: failed program was:" >&5
10845sed 's/^/| /' conftest.$ac_ext >&5
10846
10847 ac_cv_lib_dld_shl_load=no
ea04106b 10848fi
3d248aec
AX
10849
10850rm -rf conftest.dSYM
10851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10852 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
10853LIBS=$ac_check_lib_save_LIBS
10854fi
3d248aec 10855{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
ea04106b 10856$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
3d248aec
AX
10857if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
10858 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
ea04106b 10859else
3d248aec
AX
10860 { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
10861$as_echo_n "checking for dlopen... " >&6; }
10862if test "${ac_cv_func_dlopen+set}" = set; then
10863 $as_echo_n "(cached) " >&6
ea04106b 10864else
3d248aec
AX
10865 cat >conftest.$ac_ext <<_ACEOF
10866/* confdefs.h. */
10867_ACEOF
10868cat confdefs.h >>conftest.$ac_ext
10869cat >>conftest.$ac_ext <<_ACEOF
10870/* end confdefs.h. */
10871/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
10872 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10873#define dlopen innocuous_dlopen
10874
10875/* System header to define __stub macros and hopefully few prototypes,
10876 which can conflict with char dlopen (); below.
10877 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10878 <limits.h> exists even on freestanding compilers. */
10879
10880#ifdef __STDC__
10881# include <limits.h>
10882#else
10883# include <assert.h>
10884#endif
10885
10886#undef dlopen
10887
10888/* Override any GCC internal prototype to avoid an error.
10889 Use char because int might match the return type of a GCC
10890 builtin and then its argument prototype would still apply. */
10891#ifdef __cplusplus
10892extern "C"
10893#endif
10894char dlopen ();
10895/* The GNU C library defines this for functions which it implements
10896 to always fail with ENOSYS. Some functions are actually named
10897 something starting with __ and the normal name is an alias. */
10898#if defined __stub_dlopen || defined __stub___dlopen
10899choke me
10900#endif
10901
10902int
10903main ()
10904{
10905return dlopen ();
10906 ;
10907 return 0;
10908}
10909_ACEOF
10910rm -f conftest.$ac_objext conftest$ac_exeext
10911if { (ac_try="$ac_link"
10912case "(($ac_try" in
10913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10914 *) ac_try_echo=$ac_try;;
10915esac
10916eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10917$as_echo "$ac_try_echo") >&5
10918 (eval "$ac_link") 2>conftest.er1
10919 ac_status=$?
10920 grep -v '^ *+' conftest.er1 >conftest.err
10921 rm -f conftest.er1
10922 cat conftest.err >&5
10923 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10924 (exit $ac_status); } && {
10925 test -z "$ac_c_werror_flag" ||
10926 test ! -s conftest.err
10927 } && test -s conftest$ac_exeext && {
10928 test "$cross_compiling" = yes ||
10929 $as_test_x conftest$ac_exeext
10930 }; then
10931 ac_cv_func_dlopen=yes
10932else
10933 $as_echo "$as_me: failed program was:" >&5
10934sed 's/^/| /' conftest.$ac_ext >&5
10935
10936 ac_cv_func_dlopen=no
10937fi
10938
10939rm -rf conftest.dSYM
10940rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10941 conftest$ac_exeext conftest.$ac_ext
10942fi
10943{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
10944$as_echo "$ac_cv_func_dlopen" >&6; }
10945if test "x$ac_cv_func_dlopen" = x""yes; then
10946 lt_cv_dlopen="dlopen"
10947else
10948 { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
ea04106b 10949$as_echo_n "checking for dlopen in -ldl... " >&6; }
3d248aec 10950if test "${ac_cv_lib_dl_dlopen+set}" = set; then
ea04106b
AX
10951 $as_echo_n "(cached) " >&6
10952else
10953 ac_check_lib_save_LIBS=$LIBS
10954LIBS="-ldl $LIBS"
3d248aec
AX
10955cat >conftest.$ac_ext <<_ACEOF
10956/* confdefs.h. */
10957_ACEOF
10958cat confdefs.h >>conftest.$ac_ext
10959cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
10960/* end confdefs.h. */
10961
10962/* Override any GCC internal prototype to avoid an error.
10963 Use char because int might match the return type of a GCC
10964 builtin and then its argument prototype would still apply. */
10965#ifdef __cplusplus
10966extern "C"
10967#endif
10968char dlopen ();
10969int
10970main ()
10971{
10972return dlopen ();
10973 ;
10974 return 0;
10975}
10976_ACEOF
3d248aec
AX
10977rm -f conftest.$ac_objext conftest$ac_exeext
10978if { (ac_try="$ac_link"
10979case "(($ac_try" in
10980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10981 *) ac_try_echo=$ac_try;;
10982esac
10983eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10984$as_echo "$ac_try_echo") >&5
10985 (eval "$ac_link") 2>conftest.er1
10986 ac_status=$?
10987 grep -v '^ *+' conftest.er1 >conftest.err
10988 rm -f conftest.er1
10989 cat conftest.err >&5
10990 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
10991 (exit $ac_status); } && {
10992 test -z "$ac_c_werror_flag" ||
10993 test ! -s conftest.err
10994 } && test -s conftest$ac_exeext && {
10995 test "$cross_compiling" = yes ||
10996 $as_test_x conftest$ac_exeext
10997 }; then
ea04106b
AX
10998 ac_cv_lib_dl_dlopen=yes
10999else
3d248aec
AX
11000 $as_echo "$as_me: failed program was:" >&5
11001sed 's/^/| /' conftest.$ac_ext >&5
11002
11003 ac_cv_lib_dl_dlopen=no
ea04106b 11004fi
3d248aec
AX
11005
11006rm -rf conftest.dSYM
11007rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11008 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
11009LIBS=$ac_check_lib_save_LIBS
11010fi
3d248aec 11011{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
ea04106b 11012$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
3d248aec
AX
11013if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
11014 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
ea04106b 11015else
3d248aec 11016 { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
ea04106b 11017$as_echo_n "checking for dlopen in -lsvld... " >&6; }
3d248aec 11018if test "${ac_cv_lib_svld_dlopen+set}" = set; then
ea04106b
AX
11019 $as_echo_n "(cached) " >&6
11020else
11021 ac_check_lib_save_LIBS=$LIBS
11022LIBS="-lsvld $LIBS"
3d248aec
AX
11023cat >conftest.$ac_ext <<_ACEOF
11024/* confdefs.h. */
11025_ACEOF
11026cat confdefs.h >>conftest.$ac_ext
11027cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
11028/* end confdefs.h. */
11029
11030/* Override any GCC internal prototype to avoid an error.
11031 Use char because int might match the return type of a GCC
11032 builtin and then its argument prototype would still apply. */
11033#ifdef __cplusplus
11034extern "C"
11035#endif
11036char dlopen ();
11037int
11038main ()
11039{
11040return dlopen ();
11041 ;
11042 return 0;
11043}
11044_ACEOF
3d248aec
AX
11045rm -f conftest.$ac_objext conftest$ac_exeext
11046if { (ac_try="$ac_link"
11047case "(($ac_try" in
11048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11049 *) ac_try_echo=$ac_try;;
11050esac
11051eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11052$as_echo "$ac_try_echo") >&5
11053 (eval "$ac_link") 2>conftest.er1
11054 ac_status=$?
11055 grep -v '^ *+' conftest.er1 >conftest.err
11056 rm -f conftest.er1
11057 cat conftest.err >&5
11058 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11059 (exit $ac_status); } && {
11060 test -z "$ac_c_werror_flag" ||
11061 test ! -s conftest.err
11062 } && test -s conftest$ac_exeext && {
11063 test "$cross_compiling" = yes ||
11064 $as_test_x conftest$ac_exeext
11065 }; then
ea04106b
AX
11066 ac_cv_lib_svld_dlopen=yes
11067else
3d248aec
AX
11068 $as_echo "$as_me: failed program was:" >&5
11069sed 's/^/| /' conftest.$ac_ext >&5
11070
11071 ac_cv_lib_svld_dlopen=no
ea04106b 11072fi
3d248aec
AX
11073
11074rm -rf conftest.dSYM
11075rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11076 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
11077LIBS=$ac_check_lib_save_LIBS
11078fi
3d248aec 11079{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
ea04106b 11080$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
3d248aec
AX
11081if test "x$ac_cv_lib_svld_dlopen" = x""yes; then
11082 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
ea04106b 11083else
3d248aec 11084 { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
ea04106b 11085$as_echo_n "checking for dld_link in -ldld... " >&6; }
3d248aec 11086if test "${ac_cv_lib_dld_dld_link+set}" = set; then
ea04106b
AX
11087 $as_echo_n "(cached) " >&6
11088else
11089 ac_check_lib_save_LIBS=$LIBS
11090LIBS="-ldld $LIBS"
3d248aec
AX
11091cat >conftest.$ac_ext <<_ACEOF
11092/* confdefs.h. */
11093_ACEOF
11094cat confdefs.h >>conftest.$ac_ext
11095cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
11096/* end confdefs.h. */
11097
11098/* Override any GCC internal prototype to avoid an error.
11099 Use char because int might match the return type of a GCC
11100 builtin and then its argument prototype would still apply. */
11101#ifdef __cplusplus
11102extern "C"
11103#endif
11104char dld_link ();
11105int
11106main ()
11107{
11108return dld_link ();
11109 ;
11110 return 0;
11111}
11112_ACEOF
3d248aec
AX
11113rm -f conftest.$ac_objext conftest$ac_exeext
11114if { (ac_try="$ac_link"
11115case "(($ac_try" in
11116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11117 *) ac_try_echo=$ac_try;;
11118esac
11119eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11120$as_echo "$ac_try_echo") >&5
11121 (eval "$ac_link") 2>conftest.er1
11122 ac_status=$?
11123 grep -v '^ *+' conftest.er1 >conftest.err
11124 rm -f conftest.er1
11125 cat conftest.err >&5
11126 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11127 (exit $ac_status); } && {
11128 test -z "$ac_c_werror_flag" ||
11129 test ! -s conftest.err
11130 } && test -s conftest$ac_exeext && {
11131 test "$cross_compiling" = yes ||
11132 $as_test_x conftest$ac_exeext
11133 }; then
ea04106b
AX
11134 ac_cv_lib_dld_dld_link=yes
11135else
3d248aec
AX
11136 $as_echo "$as_me: failed program was:" >&5
11137sed 's/^/| /' conftest.$ac_ext >&5
11138
11139 ac_cv_lib_dld_dld_link=no
ea04106b 11140fi
3d248aec
AX
11141
11142rm -rf conftest.dSYM
11143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11144 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
11145LIBS=$ac_check_lib_save_LIBS
11146fi
3d248aec 11147{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
ea04106b 11148$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
3d248aec
AX
11149if test "x$ac_cv_lib_dld_dld_link" = x""yes; then
11150 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
ea04106b
AX
11151fi
11152
11153
11154fi
11155
11156
11157fi
11158
11159
11160fi
11161
11162
11163fi
11164
11165
11166fi
11167
11168 ;;
11169 esac
11170
3d248aec 11171 if test "x$lt_cv_dlopen" != xno; then
68d83c55 11172 enable_dlopen=yes
3d248aec
AX
11173 else
11174 enable_dlopen=no
ea04106b
AX
11175 fi
11176
11177 case $lt_cv_dlopen in
11178 dlopen)
3d248aec
AX
11179 save_CPPFLAGS="$CPPFLAGS"
11180 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
ea04106b 11181
3d248aec 11182 save_LDFLAGS="$LDFLAGS"
ea04106b
AX
11183 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
11184
3d248aec 11185 save_LIBS="$LIBS"
ea04106b
AX
11186 LIBS="$lt_cv_dlopen_libs $LIBS"
11187
3d248aec 11188 { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
ea04106b 11189$as_echo_n "checking whether a program can dlopen itself... " >&6; }
3d248aec 11190if test "${lt_cv_dlopen_self+set}" = set; then
ea04106b
AX
11191 $as_echo_n "(cached) " >&6
11192else
3d248aec 11193 if test "$cross_compiling" = yes; then :
ea04106b
AX
11194 lt_cv_dlopen_self=cross
11195else
11196 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11197 lt_status=$lt_dlunknown
11198 cat > conftest.$ac_ext <<_LT_EOF
3d248aec 11199#line 11199 "configure"
ea04106b
AX
11200#include "confdefs.h"
11201
11202#if HAVE_DLFCN_H
11203#include <dlfcn.h>
11204#endif
11205
11206#include <stdio.h>
11207
11208#ifdef RTLD_GLOBAL
11209# define LT_DLGLOBAL RTLD_GLOBAL
11210#else
11211# ifdef DL_GLOBAL
11212# define LT_DLGLOBAL DL_GLOBAL
11213# else
11214# define LT_DLGLOBAL 0
11215# endif
11216#endif
11217
11218/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11219 find out it does not work in some platform. */
11220#ifndef LT_DLLAZY_OR_NOW
11221# ifdef RTLD_LAZY
11222# define LT_DLLAZY_OR_NOW RTLD_LAZY
11223# else
11224# ifdef DL_LAZY
11225# define LT_DLLAZY_OR_NOW DL_LAZY
11226# else
11227# ifdef RTLD_NOW
11228# define LT_DLLAZY_OR_NOW RTLD_NOW
11229# else
11230# ifdef DL_NOW
11231# define LT_DLLAZY_OR_NOW DL_NOW
11232# else
11233# define LT_DLLAZY_OR_NOW 0
11234# endif
11235# endif
11236# endif
11237# endif
11238#endif
11239
3d248aec 11240void fnord() { int i=42;}
ea04106b
AX
11241int main ()
11242{
11243 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11244 int status = $lt_dlunknown;
11245
11246 if (self)
11247 {
11248 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3d248aec 11249 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
ea04106b
AX
11250 /* dlclose (self); */
11251 }
11252 else
11253 puts (dlerror ());
11254
11255 return status;
11256}
11257_LT_EOF
3d248aec 11258 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ea04106b
AX
11259 (eval $ac_link) 2>&5
11260 ac_status=$?
3d248aec
AX
11261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11262 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
ea04106b
AX
11263 (./conftest; exit; ) >&5 2>/dev/null
11264 lt_status=$?
11265 case x$lt_status in
11266 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
11267 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
11268 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
11269 esac
11270 else :
11271 # compilation failed
11272 lt_cv_dlopen_self=no
11273 fi
11274fi
11275rm -fr conftest*
11276
11277
11278fi
3d248aec 11279{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
ea04106b
AX
11280$as_echo "$lt_cv_dlopen_self" >&6; }
11281
3d248aec 11282 if test "x$lt_cv_dlopen_self" = xyes; then
ea04106b 11283 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3d248aec 11284 { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
ea04106b 11285$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
3d248aec 11286if test "${lt_cv_dlopen_self_static+set}" = set; then
ea04106b
AX
11287 $as_echo_n "(cached) " >&6
11288else
3d248aec 11289 if test "$cross_compiling" = yes; then :
ea04106b
AX
11290 lt_cv_dlopen_self_static=cross
11291else
11292 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11293 lt_status=$lt_dlunknown
11294 cat > conftest.$ac_ext <<_LT_EOF
3d248aec 11295#line 11295 "configure"
ea04106b
AX
11296#include "confdefs.h"
11297
11298#if HAVE_DLFCN_H
11299#include <dlfcn.h>
11300#endif
11301
11302#include <stdio.h>
11303
11304#ifdef RTLD_GLOBAL
11305# define LT_DLGLOBAL RTLD_GLOBAL
11306#else
11307# ifdef DL_GLOBAL
11308# define LT_DLGLOBAL DL_GLOBAL
11309# else
11310# define LT_DLGLOBAL 0
11311# endif
11312#endif
11313
11314/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
11315 find out it does not work in some platform. */
11316#ifndef LT_DLLAZY_OR_NOW
11317# ifdef RTLD_LAZY
11318# define LT_DLLAZY_OR_NOW RTLD_LAZY
11319# else
11320# ifdef DL_LAZY
11321# define LT_DLLAZY_OR_NOW DL_LAZY
11322# else
11323# ifdef RTLD_NOW
11324# define LT_DLLAZY_OR_NOW RTLD_NOW
11325# else
11326# ifdef DL_NOW
11327# define LT_DLLAZY_OR_NOW DL_NOW
11328# else
11329# define LT_DLLAZY_OR_NOW 0
11330# endif
11331# endif
11332# endif
11333# endif
11334#endif
11335
3d248aec 11336void fnord() { int i=42;}
ea04106b
AX
11337int main ()
11338{
11339 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
11340 int status = $lt_dlunknown;
11341
11342 if (self)
11343 {
11344 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3d248aec 11345 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
ea04106b
AX
11346 /* dlclose (self); */
11347 }
11348 else
11349 puts (dlerror ());
11350
11351 return status;
11352}
11353_LT_EOF
3d248aec 11354 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ea04106b
AX
11355 (eval $ac_link) 2>&5
11356 ac_status=$?
3d248aec
AX
11357 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11358 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
ea04106b
AX
11359 (./conftest; exit; ) >&5 2>/dev/null
11360 lt_status=$?
11361 case x$lt_status in
11362 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
11363 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
11364 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
11365 esac
11366 else :
11367 # compilation failed
11368 lt_cv_dlopen_self_static=no
11369 fi
11370fi
11371rm -fr conftest*
11372
11373
11374fi
3d248aec 11375{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
ea04106b
AX
11376$as_echo "$lt_cv_dlopen_self_static" >&6; }
11377 fi
11378
3d248aec
AX
11379 CPPFLAGS="$save_CPPFLAGS"
11380 LDFLAGS="$save_LDFLAGS"
11381 LIBS="$save_LIBS"
ea04106b
AX
11382 ;;
11383 esac
11384
11385 case $lt_cv_dlopen_self in
11386 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
11387 *) enable_dlopen_self=unknown ;;
11388 esac
11389
11390 case $lt_cv_dlopen_self_static in
11391 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
11392 *) enable_dlopen_self_static=unknown ;;
11393 esac
11394fi
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412striplib=
11413old_striplib=
3d248aec 11414{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
ea04106b
AX
11415$as_echo_n "checking whether stripping libraries is possible... " >&6; }
11416if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
11417 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
11418 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3d248aec 11419 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
11420$as_echo "yes" >&6; }
11421else
11422# FIXME - insert some real tests, host_os isn't really good enough
11423 case $host_os in
11424 darwin*)
3d248aec 11425 if test -n "$STRIP" ; then
ea04106b
AX
11426 striplib="$STRIP -x"
11427 old_striplib="$STRIP -S"
3d248aec 11428 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
11429$as_echo "yes" >&6; }
11430 else
3d248aec 11431 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
11432$as_echo "no" >&6; }
11433 fi
11434 ;;
11435 *)
3d248aec 11436 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
11437$as_echo "no" >&6; }
11438 ;;
11439 esac
11440fi
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
3d248aec
AX
11453 # Report which library types will actually be built
11454 { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
ea04106b 11455$as_echo_n "checking if libtool supports shared libraries... " >&6; }
3d248aec 11456 { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
ea04106b
AX
11457$as_echo "$can_build_shared" >&6; }
11458
3d248aec 11459 { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
ea04106b 11460$as_echo_n "checking whether to build shared libraries... " >&6; }
3d248aec 11461 test "$can_build_shared" = "no" && enable_shared=no
ea04106b
AX
11462
11463 # On AIX, shared libraries and static libraries use the same namespace, and
11464 # are all built from PIC.
11465 case $host_os in
11466 aix3*)
3d248aec 11467 test "$enable_shared" = yes && enable_static=no
ea04106b
AX
11468 if test -n "$RANLIB"; then
11469 archive_cmds="$archive_cmds~\$RANLIB \$lib"
11470 postinstall_cmds='$RANLIB $lib'
11471 fi
11472 ;;
11473
11474 aix[4-9]*)
3d248aec
AX
11475 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11476 test "$enable_shared" = yes && enable_static=no
ea04106b
AX
11477 fi
11478 ;;
11479 esac
3d248aec 11480 { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
ea04106b
AX
11481$as_echo "$enable_shared" >&6; }
11482
3d248aec 11483 { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
ea04106b
AX
11484$as_echo_n "checking whether to build static libraries... " >&6; }
11485 # Make sure either enable_shared or enable_static is yes.
3d248aec
AX
11486 test "$enable_shared" = yes || enable_static=yes
11487 { $as_echo "$as_me:$LINENO: result: $enable_static" >&5
ea04106b
AX
11488$as_echo "$enable_static" >&6; }
11489
11490
11491
11492
11493fi
11494ac_ext=c
11495ac_cpp='$CPP $CPPFLAGS'
11496ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11497ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11498ac_compiler_gnu=$ac_cv_c_compiler_gnu
11499
3d248aec 11500CC="$lt_save_CC"
ea04106b
AX
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514 ac_config_commands="$ac_config_commands libtool"
11515
11516
11517
11518
11519# Only expand once:
11520
11521
11522# By default we simply use the C compiler to build assembly code.
11523
11524test "${CCAS+set}" = set || CCAS=$CC
11525test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
11526
11527
11528
11529depcc="$CCAS" am_compiler_list=
11530
3d248aec 11531{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
ea04106b 11532$as_echo_n "checking dependency style of $depcc... " >&6; }
3d248aec 11533if test "${am_cv_CCAS_dependencies_compiler_type+set}" = set; then
ea04106b
AX
11534 $as_echo_n "(cached) " >&6
11535else
11536 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11537 # We make a subdir and do the tests there. Otherwise we can end up
11538 # making bogus files that we don't know about and never remove. For
11539 # instance it was reported that on HP-UX the gcc test will end up
3d248aec
AX
11540 # making a dummy file named `D' -- because `-MD' means `put the output
11541 # in D'.
ea04106b
AX
11542 mkdir conftest.dir
11543 # Copy depcomp to subdir because otherwise we won't find it if we're
11544 # using a relative directory.
11545 cp "$am_depcomp" conftest.dir
11546 cd conftest.dir
11547 # We will build objects and dependencies in a subdirectory because
11548 # it helps to detect inapplicable dependency modes. For instance
11549 # both Tru64's cc and ICC support -MD to output dependencies as a
11550 # side effect of compilation, but ICC will put the dependencies in
11551 # the current directory while Tru64 will put them in the object
11552 # directory.
11553 mkdir sub
11554
11555 am_cv_CCAS_dependencies_compiler_type=none
11556 if test "$am_compiler_list" = ""; then
11557 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
11558 fi
11559 am__universal=false
11560
11561
11562 for depmode in $am_compiler_list; do
11563 # Setup a source with many dependencies, because some compilers
11564 # like to wrap large dependency lists on column 80 (with \), and
11565 # we should not choose a depcomp mode which is confused by this.
11566 #
11567 # We need to recreate these files for each test, as the compiler may
11568 # overwrite some of them when testing with obscure command lines.
11569 # This happens at least with the AIX C compiler.
11570 : > sub/conftest.c
11571 for i in 1 2 3 4 5 6; do
11572 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3d248aec
AX
11573 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
11574 # Solaris 8's {/usr,}/bin/sh.
11575 touch sub/conftst$i.h
ea04106b
AX
11576 done
11577 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
11578
3d248aec 11579 # We check with `-c' and `-o' for the sake of the "dashmstdout"
ea04106b 11580 # mode. It turns out that the SunPro C++ compiler does not properly
3d248aec
AX
11581 # handle `-M -o', and we need to detect this. Also, some Intel
11582 # versions had trouble with output in subdirs
ea04106b
AX
11583 am__obj=sub/conftest.${OBJEXT-o}
11584 am__minus_obj="-o $am__obj"
11585 case $depmode in
11586 gcc)
11587 # This depmode causes a compiler race in universal mode.
11588 test "$am__universal" = false || continue
11589 ;;
11590 nosideeffect)
3d248aec
AX
11591 # after this tag, mechanisms are not by side-effect, so they'll
11592 # only be used when explicitly requested
ea04106b
AX
11593 if test "x$enable_dependency_tracking" = xyes; then
11594 continue
11595 else
11596 break
11597 fi
11598 ;;
3d248aec
AX
11599 msvisualcpp | msvcmsys)
11600 # This compiler won't grok `-c -o', but also, the minuso test has
ea04106b
AX
11601 # not run yet. These depmodes are late enough in the game, and
11602 # so weak that their functioning should not be impacted.
11603 am__obj=conftest.${OBJEXT-o}
11604 am__minus_obj=
11605 ;;
11606 none) break ;;
11607 esac
11608 if depmode=$depmode \
11609 source=sub/conftest.c object=$am__obj \
11610 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
11611 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
11612 >/dev/null 2>conftest.err &&
11613 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
11614 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
11615 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
11616 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
11617 # icc doesn't choke on unknown options, it will just issue warnings
11618 # or remarks (even with -Werror). So we grep stderr for any message
11619 # that says an option was ignored or not supported.
11620 # When given -MP, icc 7.0 and 7.1 complain thusly:
11621 # icc: Command line warning: ignoring option '-M'; no argument required
11622 # The diagnosis changed in icc 8.0:
11623 # icc: Command line remark: option '-MP' not supported
11624 if (grep 'ignoring option' conftest.err ||
11625 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
11626 am_cv_CCAS_dependencies_compiler_type=$depmode
11627 break
11628 fi
11629 fi
11630 done
11631
11632 cd ..
11633 rm -rf conftest.dir
11634else
11635 am_cv_CCAS_dependencies_compiler_type=none
11636fi
11637
11638fi
3d248aec 11639{ $as_echo "$as_me:$LINENO: result: $am_cv_CCAS_dependencies_compiler_type" >&5
ea04106b
AX
11640$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; }
11641CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type
11642
11643 if
11644 test "x$enable_dependency_tracking" != xno \
11645 && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then
11646 am__fastdepCCAS_TRUE=
11647 am__fastdepCCAS_FALSE='#'
11648else
11649 am__fastdepCCAS_TRUE='#'
11650 am__fastdepCCAS_FALSE=
11651fi
11652
11653
11654
11655
3d248aec 11656 { $as_echo "$as_me:$LINENO: checking zfs author" >&5
ea04106b 11657$as_echo_n "checking zfs author... " >&6; }
3d248aec 11658 { $as_echo "$as_me:$LINENO: result: $ZFS_META_AUTHOR" >&5
ea04106b
AX
11659$as_echo "$ZFS_META_AUTHOR" >&6; }
11660
3d248aec 11661 { $as_echo "$as_me:$LINENO: checking zfs license" >&5
ea04106b 11662$as_echo_n "checking zfs license... " >&6; }
3d248aec 11663 { $as_echo "$as_me:$LINENO: result: $ZFS_META_LICENSE" >&5
ea04106b
AX
11664$as_echo "$ZFS_META_LICENSE" >&6; }
11665
11666
11667
3d248aec 11668 { $as_echo "$as_me:$LINENO: checking linux distribution" >&5
ea04106b
AX
11669$as_echo_n "checking linux distribution... " >&6; }
11670 if test -f /etc/toss-release ; then
11671 VENDOR=toss ;
11672 elif test -f /etc/fedora-release ; then
11673 VENDOR=fedora ;
11674 elif test -f /etc/redhat-release ; then
11675 VENDOR=redhat ;
11676 elif test -f /etc/gentoo-release ; then
11677 VENDOR=gentoo ;
11678 elif test -f /etc/arch-release ; then
11679 VENDOR=arch ;
11680 elif test -f /etc/SuSE-release ; then
11681 VENDOR=sles ;
11682 elif test -f /etc/slackware-version ; then
11683 VENDOR=slackware ;
11684 elif test -f /etc/lunar.release ; then
11685 VENDOR=lunar ;
11686 elif test -f /etc/lsb-release ; then
11687 VENDOR=ubuntu ;
11688 elif test -f /etc/debian_version ; then
11689 VENDOR=debian ;
11690 else
11691 VENDOR= ;
11692 fi
3d248aec 11693 { $as_echo "$as_me:$LINENO: result: $VENDOR" >&5
ea04106b
AX
11694$as_echo "$VENDOR" >&6; }
11695
11696
3d248aec 11697 { $as_echo "$as_me:$LINENO: checking default package type" >&5
ea04106b
AX
11698$as_echo_n "checking default package type... " >&6; }
11699 case "$VENDOR" in
11700 toss) DEFAULT_PACKAGE=rpm ;;
11701 redhat) DEFAULT_PACKAGE=rpm ;;
11702 fedora) DEFAULT_PACKAGE=rpm ;;
11703 gentoo) DEFAULT_PACKAGE=tgz ;;
11704 arch) DEFAULT_PACKAGE=tgz ;;
11705 sles) DEFAULT_PACKAGE=rpm ;;
11706 slackware) DEFAULT_PACKAGE=tgz ;;
11707 lunar) DEFAULT_PACKAGE=tgz ;;
11708 ubuntu) DEFAULT_PACKAGE=deb ;;
11709 debian) DEFAULT_PACKAGE=deb ;;
11710 *) DEFAULT_PACKAGE=rpm ;;
11711 esac
3d248aec 11712 { $as_echo "$as_me:$LINENO: result: $DEFAULT_PACKAGE" >&5
ea04106b
AX
11713$as_echo "$DEFAULT_PACKAGE" >&6; }
11714
11715
11716 DEFAULT_INIT_DIR=$sysconfdir/init.d
3d248aec 11717 { $as_echo "$as_me:$LINENO: checking default init directory" >&5
ea04106b 11718$as_echo_n "checking default init directory... " >&6; }
3d248aec 11719 { $as_echo "$as_me:$LINENO: result: $DEFAULT_INIT_DIR" >&5
ea04106b
AX
11720$as_echo "$DEFAULT_INIT_DIR" >&6; }
11721
11722
3d248aec 11723 { $as_echo "$as_me:$LINENO: checking default init script type" >&5
ea04106b
AX
11724$as_echo_n "checking default init script type... " >&6; }
11725 case "$VENDOR" in
11726 toss) DEFAULT_INIT_SCRIPT=redhat ;;
11727 redhat) DEFAULT_INIT_SCRIPT=redhat ;;
11728 fedora) DEFAULT_INIT_SCRIPT=fedora ;;
11729 gentoo) DEFAULT_INIT_SCRIPT=gentoo ;;
11730 arch) DEFAULT_INIT_SCRIPT=lsb ;;
11731 sles) DEFAULT_INIT_SCRIPT=lsb ;;
11732 slackware) DEFAULT_INIT_SCRIPT=lsb ;;
11733 lunar) DEFAULT_INIT_SCRIPT=lunar ;;
11734 ubuntu) DEFAULT_INIT_SCRIPT=lsb ;;
11735 debian) DEFAULT_INIT_SCRIPT=lsb ;;
11736 *) DEFAULT_INIT_SCRIPT=lsb ;;
11737 esac
3d248aec 11738 { $as_echo "$as_me:$LINENO: result: $DEFAULT_INIT_SCRIPT" >&5
ea04106b
AX
11739$as_echo "$DEFAULT_INIT_SCRIPT" >&6; }
11740
11741
3d248aec 11742 { $as_echo "$as_me:$LINENO: checking default init config direectory" >&5
e10b0808
AX
11743$as_echo_n "checking default init config direectory... " >&6; }
11744 case "$VENDOR" in
11745 gentoo) DEFAULT_INITCONF_DIR=/etc/conf.d ;;
11746 toss) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
11747 redhat) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
11748 fedora) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
11749 sles) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
11750 ubuntu) DEFAULT_INITCONF_DIR=/etc/default ;;
11751 debian) DEFAULT_INITCONF_DIR=/etc/default ;;
11752 *) DEFAULT_INITCONF_DIR=/etc/default ;;
11753 esac
3d248aec 11754 { $as_echo "$as_me:$LINENO: result: $DEFAULT_INITCONF_DIR" >&5
e10b0808
AX
11755$as_echo "$DEFAULT_INITCONF_DIR" >&6; }
11756
11757
3d248aec 11758 { $as_echo "$as_me:$LINENO: checking whether initramfs-tools is available" >&5
e10b0808
AX
11759$as_echo_n "checking whether initramfs-tools is available... " >&6; }
11760 if test -d /usr/share/initramfs-tools ; then
11761 DEFINE_INITRAMFS='--define "_initramfs 1"'
3d248aec 11762 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
11763$as_echo "yes" >&6; }
11764 else
11765 DEFINE_INITRAMFS=''
3d248aec 11766 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
11767$as_echo "no" >&6; }
11768 fi
11769
11770
ea04106b
AX
11771
11772 RPM=rpm
11773 RPMBUILD=rpmbuild
11774
3d248aec 11775 { $as_echo "$as_me:$LINENO: checking whether $RPM is available" >&5
ea04106b 11776$as_echo_n "checking whether $RPM is available... " >&6; }
3d248aec 11777 if tmp=$($RPM --version 2>/dev/null); then
ea04106b
AX
11778
11779 RPM_VERSION=$(echo $tmp | $AWK '/RPM/ { print $3 }')
11780 HAVE_RPM=yes
3d248aec 11781 { $as_echo "$as_me:$LINENO: result: $HAVE_RPM ($RPM_VERSION)" >&5
ea04106b
AX
11782$as_echo "$HAVE_RPM ($RPM_VERSION)" >&6; }
11783
11784else
11785
11786 HAVE_RPM=no
3d248aec 11787 { $as_echo "$as_me:$LINENO: result: $HAVE_RPM" >&5
ea04106b
AX
11788$as_echo "$HAVE_RPM" >&6; }
11789
11790fi
11791
3d248aec
AX
11792
11793 { $as_echo "$as_me:$LINENO: checking whether $RPMBUILD is available" >&5
ea04106b 11794$as_echo_n "checking whether $RPMBUILD is available... " >&6; }
3d248aec 11795 if tmp=$($RPMBUILD --version 2>/dev/null); then
ea04106b
AX
11796
11797 RPMBUILD_VERSION=$(echo $tmp | $AWK '/RPM/ { print $3 }')
11798 HAVE_RPMBUILD=yes
3d248aec 11799 { $as_echo "$as_me:$LINENO: result: $HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&5
ea04106b
AX
11800$as_echo "$HAVE_RPMBUILD ($RPMBUILD_VERSION)" >&6; }
11801
11802else
11803
11804 HAVE_RPMBUILD=no
3d248aec 11805 { $as_echo "$as_me:$LINENO: result: $HAVE_RPMBUILD" >&5
ea04106b
AX
11806$as_echo "$HAVE_RPMBUILD" >&6; }
11807
11808fi
11809
3d248aec 11810
ea04106b 11811 RPM_DEFINE_COMMON='--define "$(DEBUG_ZFS) 1" --define "$(DEBUG_DMU_TX) 1"'
e10b0808 11812 RPM_DEFINE_UTIL='--define "_dracutdir $(dracutdir)" --define "_udevdir $(udevdir)" --define "_udevruledir $(udevruledir)" --define "_initconfdir $(DEFAULT_INITCONF_DIR)" $(DEFINE_INITRAMFS)'
ea04106b
AX
11813 RPM_DEFINE_KMOD='--define "kernels $(LINUX_VERSION)" --define "require_spldir $(SPL)" --define "require_splobj $(SPL_OBJ)" --define "ksrc $(LINUX)" --define "kobj $(LINUX_OBJ)"'
11814 RPM_DEFINE_DKMS=
11815
11816 SRPM_DEFINE_COMMON='--define "build_src_rpm 1"'
11817 SRPM_DEFINE_UTIL=
11818 SRPM_DEFINE_KMOD=
11819 SRPM_DEFINE_DKMS=
11820
11821 RPM_SPEC_DIR="rpm/generic"
11822
11823# Check whether --with-spec was given.
3d248aec 11824if test "${with_spec+set}" = set; then
ea04106b
AX
11825 withval=$with_spec; RPM_SPEC_DIR="rpm/$withval"
11826fi
11827
11828
3d248aec 11829 { $as_echo "$as_me:$LINENO: checking whether spec files are available" >&5
ea04106b 11830$as_echo_n "checking whether spec files are available... " >&6; }
3d248aec 11831 { $as_echo "$as_me:$LINENO: result: yes ($RPM_SPEC_DIR/*.spec.in)" >&5
ea04106b
AX
11832$as_echo "yes ($RPM_SPEC_DIR/*.spec.in)" >&6; }
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853 DPKG=dpkg
11854 DPKGBUILD=dpkg-buildpackage
11855
3d248aec 11856 { $as_echo "$as_me:$LINENO: checking whether $DPKG is available" >&5
ea04106b 11857$as_echo_n "checking whether $DPKG is available... " >&6; }
3d248aec 11858 if tmp=$($DPKG --version 2>/dev/null); then
ea04106b
AX
11859
11860 DPKG_VERSION=$(echo $tmp | $AWK '/Debian/ { print $7 }')
11861 HAVE_DPKG=yes
3d248aec 11862 { $as_echo "$as_me:$LINENO: result: $HAVE_DPKG ($DPKG_VERSION)" >&5
ea04106b
AX
11863$as_echo "$HAVE_DPKG ($DPKG_VERSION)" >&6; }
11864
11865else
11866
11867 HAVE_DPKG=no
3d248aec 11868 { $as_echo "$as_me:$LINENO: result: $HAVE_DPKG" >&5
ea04106b
AX
11869$as_echo "$HAVE_DPKG" >&6; }
11870
11871fi
11872
3d248aec
AX
11873
11874 { $as_echo "$as_me:$LINENO: checking whether $DPKGBUILD is available" >&5
ea04106b 11875$as_echo_n "checking whether $DPKGBUILD is available... " >&6; }
3d248aec 11876 if tmp=$($DPKGBUILD --version 2>/dev/null); then
ea04106b
AX
11877
11878 DPKGBUILD_VERSION=$(echo $tmp | \
11879 $AWK '/Debian/ { print $4 }' | cut -f-4 -d'.')
11880 HAVE_DPKGBUILD=yes
3d248aec 11881 { $as_echo "$as_me:$LINENO: result: $HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&5
ea04106b
AX
11882$as_echo "$HAVE_DPKGBUILD ($DPKGBUILD_VERSION)" >&6; }
11883
11884else
11885
11886 HAVE_DPKGBUILD=no
3d248aec 11887 { $as_echo "$as_me:$LINENO: result: $HAVE_DPKGBUILD" >&5
ea04106b
AX
11888$as_echo "$HAVE_DPKGBUILD" >&6; }
11889
11890fi
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
3d248aec 11901
ea04106b
AX
11902 ALIEN=alien
11903
3d248aec 11904 { $as_echo "$as_me:$LINENO: checking whether $ALIEN is available" >&5
ea04106b 11905$as_echo_n "checking whether $ALIEN is available... " >&6; }
3d248aec 11906 if tmp=$($ALIEN --version 2>/dev/null); then
ea04106b
AX
11907
11908 ALIEN_VERSION=$(echo $tmp | $AWK '{ print $3 }')
11909 HAVE_ALIEN=yes
3d248aec 11910 { $as_echo "$as_me:$LINENO: result: $HAVE_ALIEN ($ALIEN_VERSION)" >&5
ea04106b
AX
11911$as_echo "$HAVE_ALIEN ($ALIEN_VERSION)" >&6; }
11912
11913else
11914
11915 HAVE_ALIEN=no
3d248aec 11916 { $as_echo "$as_me:$LINENO: result: $HAVE_ALIEN" >&5
ea04106b
AX
11917$as_echo "$HAVE_ALIEN" >&6; }
11918
11919fi
11920
11921
11922
11923
11924
11925
11926
3d248aec 11927
ea04106b
AX
11928 TARGET_ASM_DIR=asm-generic
11929
11930
11931 ZFS_CONFIG=all
11932
11933# Check whether --with-config was given.
3d248aec 11934if test "${with_config+set}" = set; then
ea04106b
AX
11935 withval=$with_config; ZFS_CONFIG="$withval"
11936fi
11937
11938 # Check whether --enable-linux-builtin was given.
3d248aec 11939if test "${enable_linux_builtin+set}" = set; then
ea04106b
AX
11940 enableval=$enable_linux_builtin;
11941else
11942 enable_linux_builtin=no
11943fi
11944
11945
3d248aec 11946 { $as_echo "$as_me:$LINENO: checking zfs config" >&5
ea04106b 11947$as_echo_n "checking zfs config... " >&6; }
3d248aec 11948 { $as_echo "$as_me:$LINENO: result: $ZFS_CONFIG" >&5
ea04106b
AX
11949$as_echo "$ZFS_CONFIG" >&6; };
11950
11951
11952
11953
3d248aec 11954 { $as_echo "$as_me:$LINENO: checking for -Wno-unused-but-set-variable support" >&5
ea04106b
AX
11955$as_echo_n "checking for -Wno-unused-but-set-variable support... " >&6; }
11956
11957 saved_flags="$CFLAGS"
11958 CFLAGS="$CFLAGS -Wunused-but-set-variable"
11959
3d248aec
AX
11960 cat >conftest.$ac_ext <<_ACEOF
11961/* confdefs.h. */
11962_ACEOF
11963cat confdefs.h >>conftest.$ac_ext
11964cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
11965/* end confdefs.h. */
11966
11967int
11968main ()
11969{
11970
11971 ;
11972 return 0;
11973}
11974_ACEOF
3d248aec
AX
11975rm -f conftest.$ac_objext
11976if { (ac_try="$ac_compile"
11977case "(($ac_try" in
11978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11979 *) ac_try_echo=$ac_try;;
11980esac
11981eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11982$as_echo "$ac_try_echo") >&5
11983 (eval "$ac_compile") 2>conftest.er1
11984 ac_status=$?
11985 grep -v '^ *+' conftest.er1 >conftest.err
11986 rm -f conftest.er1
11987 cat conftest.err >&5
11988 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
11989 (exit $ac_status); } && {
11990 test -z "$ac_c_werror_flag" ||
11991 test ! -s conftest.err
11992 } && test -s conftest.$ac_objext; then
ea04106b
AX
11993
11994 NO_UNUSED_BUT_SET_VARIABLE=-Wno-unused-but-set-variable
3d248aec 11995 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
11996$as_echo "yes" >&6; }
11997
11998else
3d248aec
AX
11999 $as_echo "$as_me: failed program was:" >&5
12000sed 's/^/| /' conftest.$ac_ext >&5
12001
ea04106b
AX
12002
12003 NO_UNUSED_BUT_SET_VARIABLE=
3d248aec 12004 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
12005$as_echo "no" >&6; }
12006
12007fi
3d248aec 12008
ea04106b
AX
12009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12010
12011 CFLAGS="$saved_flags"
12012
12013
12014
3d248aec 12015 { $as_echo "$as_me:$LINENO: checking for -Wno-bool-compare support" >&5
e10b0808
AX
12016$as_echo_n "checking for -Wno-bool-compare support... " >&6; }
12017
12018 saved_flags="$CFLAGS"
12019 CFLAGS="$CFLAGS -Wbool-compare"
12020
3d248aec
AX
12021 cat >conftest.$ac_ext <<_ACEOF
12022/* confdefs.h. */
12023_ACEOF
12024cat confdefs.h >>conftest.$ac_ext
12025cat >>conftest.$ac_ext <<_ACEOF
e10b0808
AX
12026/* end confdefs.h. */
12027
12028int
12029main ()
12030{
12031
12032 ;
12033 return 0;
12034}
12035_ACEOF
3d248aec
AX
12036rm -f conftest.$ac_objext
12037if { (ac_try="$ac_compile"
12038case "(($ac_try" in
12039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12040 *) ac_try_echo=$ac_try;;
12041esac
12042eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12043$as_echo "$ac_try_echo") >&5
12044 (eval "$ac_compile") 2>conftest.er1
12045 ac_status=$?
12046 grep -v '^ *+' conftest.er1 >conftest.err
12047 rm -f conftest.er1
12048 cat conftest.err >&5
12049 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12050 (exit $ac_status); } && {
12051 test -z "$ac_c_werror_flag" ||
12052 test ! -s conftest.err
12053 } && test -s conftest.$ac_objext; then
e10b0808
AX
12054
12055 NO_BOOL_COMPARE=-Wno-bool-compare
3d248aec 12056 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
12057$as_echo "yes" >&6; }
12058
12059else
3d248aec
AX
12060 $as_echo "$as_me: failed program was:" >&5
12061sed 's/^/| /' conftest.$ac_ext >&5
12062
e10b0808
AX
12063
12064 NO_BOOL_COMPARE=
3d248aec 12065 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
12066$as_echo "no" >&6; }
12067
12068fi
3d248aec 12069
e10b0808
AX
12070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12071
12072 CFLAGS="$saved_flags"
12073
12074
12075
ea04106b
AX
12076
12077 case "$ZFS_CONFIG" in
12078 kernel)
12079
12080
12081# Check whether --with-linux was given.
3d248aec 12082if test "${with_linux+set}" = set; then
ea04106b
AX
12083 withval=$with_linux; kernelsrc="$withval"
12084fi
12085
12086
12087
12088# Check whether --with-linux-obj was given.
3d248aec 12089if test "${with_linux_obj+set}" = set; then
ea04106b
AX
12090 withval=$with_linux_obj; kernelbuild="$withval"
12091fi
12092
12093
3d248aec 12094 { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
ea04106b 12095$as_echo_n "checking kernel source directory... " >&6; }
3d248aec 12096 if test -z "$kernelsrc"; then
ea04106b 12097
3d248aec 12098 if test -e "/lib/modules/$(uname -r)/source"; then
ea04106b
AX
12099
12100 headersdir="/lib/modules/$(uname -r)/source"
12101 sourcelink=$(readlink -f "$headersdir")
12102
3d248aec 12103elif test -e "/lib/modules/$(uname -r)/build"; then
ea04106b
AX
12104
12105 headersdir="/lib/modules/$(uname -r)/build"
12106 sourcelink=$(readlink -f "$headersdir")
12107
12108else
12109
12110 sourcelink=$(ls -1d /usr/src/kernels/* \
12111 /usr/src/linux-* \
12112 2>/dev/null | grep -v obj | tail -1)
12113
12114fi
12115
3d248aec
AX
12116
12117 if test -n "$sourcelink" && test -e ${sourcelink}; then
ea04106b
AX
12118
12119 kernelsrc=`readlink -f ${sourcelink}`
12120
12121else
12122
12123 kernelsrc="Not found"
12124
12125fi
12126
3d248aec 12127
ea04106b
AX
12128else
12129
3d248aec 12130 if test "$kernelsrc" = "NONE"; then
ea04106b
AX
12131
12132 kernsrcver=NONE
12133
12134fi
12135
3d248aec 12136
ea04106b
AX
12137fi
12138
3d248aec
AX
12139
12140 { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5
ea04106b 12141$as_echo "$kernelsrc" >&6; }
3d248aec 12142 if test ! -d "$kernelsrc"; then
ea04106b 12143
3d248aec
AX
12144 { { $as_echo "$as_me:$LINENO: error:
12145 *** Please make sure the kernel devel package for your distribution
12146 *** is installed and then try again. If that fails, you can specify the
12147 *** location of the kernel source with the '--with-linux=PATH' option." >&5
12148$as_echo "$as_me: error:
ea04106b
AX
12149 *** Please make sure the kernel devel package for your distribution
12150 *** is installed and then try again. If that fails, you can specify the
3d248aec
AX
12151 *** location of the kernel source with the '--with-linux=PATH' option." >&2;}
12152 { (exit 1); exit 1; }; }
ea04106b
AX
12153
12154fi
12155
3d248aec
AX
12156
12157 { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
ea04106b 12158$as_echo_n "checking kernel build directory... " >&6; }
3d248aec 12159 if test -z "$kernelbuild"; then
ea04106b 12160
3d248aec 12161 if test -e "/lib/modules/$(uname -r)/build"; then
ea04106b
AX
12162
12163 kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
12164
3d248aec 12165elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
ea04106b
AX
12166
12167 kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
12168
3d248aec 12169elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
ea04106b
AX
12170
12171 kernelbuild=${kernelsrc}-obj/${target_cpu}/default
12172
3d248aec 12173elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
ea04106b
AX
12174
12175 kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
12176
12177else
12178
12179 kernelbuild=${kernelsrc}
12180
12181fi
12182
3d248aec 12183
ea04106b 12184fi
3d248aec
AX
12185
12186 { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5
ea04106b
AX
12187$as_echo "$kernelbuild" >&6; }
12188
3d248aec 12189 { $as_echo "$as_me:$LINENO: checking kernel source version" >&5
ea04106b
AX
12190$as_echo_n "checking kernel source version... " >&6; }
12191 utsrelease1=$kernelbuild/include/linux/version.h
12192 utsrelease2=$kernelbuild/include/linux/utsrelease.h
12193 utsrelease3=$kernelbuild/include/generated/utsrelease.h
3d248aec 12194 if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then
ea04106b
AX
12195
12196 utsrelease=linux/version.h
12197
3d248aec 12198elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then
ea04106b
AX
12199
12200 utsrelease=linux/utsrelease.h
12201
3d248aec 12202elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then
ea04106b
AX
12203
12204 utsrelease=generated/utsrelease.h
12205
12206fi
12207
3d248aec
AX
12208
12209 if test "$utsrelease"; then
ea04106b
AX
12210
12211 kernsrcver=`(echo "#include <$utsrelease>";
12212 echo "kernsrcver=UTS_RELEASE") |
12213 cpp -I $kernelbuild/include |
12214 grep "^kernsrcver=" | cut -d \" -f 2`
12215
3d248aec 12216 if test -z "$kernsrcver"; then
ea04106b 12217
3d248aec 12218 { $as_echo "$as_me:$LINENO: result: Not found" >&5
ea04106b 12219$as_echo "Not found" >&6; }
3d248aec
AX
12220 { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5
12221$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;}
12222 { (exit 1); exit 1; }; }
ea04106b
AX
12223
12224fi
12225
3d248aec 12226
ea04106b
AX
12227else
12228
3d248aec 12229 { $as_echo "$as_me:$LINENO: result: Not found" >&5
ea04106b
AX
12230$as_echo "Not found" >&6; }
12231 if test "x$enable_linux_builtin" != xyes; then
3d248aec
AX
12232 { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5
12233$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;}
12234 { (exit 1); exit 1; }; }
ea04106b 12235 else
3d248aec 12236 { { $as_echo "$as_me:$LINENO: error:
ea04106b 12237 *** Cannot find UTS_RELEASE definition.
3d248aec
AX
12238 *** Please run 'make prepare' inside the kernel source tree." >&5
12239$as_echo "$as_me: error:
12240 *** Cannot find UTS_RELEASE definition.
12241 *** Please run 'make prepare' inside the kernel source tree." >&2;}
12242 { (exit 1); exit 1; }; }
ea04106b
AX
12243 fi
12244
12245fi
12246
3d248aec
AX
12247
12248 { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5
ea04106b
AX
12249$as_echo "$kernsrcver" >&6; }
12250
12251 LINUX=${kernelsrc}
12252 LINUX_OBJ=${kernelbuild}
12253 LINUX_VERSION=${kernsrcver}
12254
12255
12256
12257
12258
12259
12260 modpost=$LINUX/scripts/Makefile.modpost
3d248aec 12261 { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5
ea04106b 12262$as_echo_n "checking kernel file name for module symbols... " >&6; }
3d248aec 12263 if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then
ea04106b 12264
3d248aec 12265 if grep -q Modules.symvers $modpost; then
ea04106b
AX
12266
12267 LINUX_SYMBOLS=Modules.symvers
12268
12269else
12270
12271 LINUX_SYMBOLS=Module.symvers
12272
12273fi
12274
ea04106b 12275
3d248aec
AX
12276 if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
12277
12278 { { $as_echo "$as_me:$LINENO: error:
ea04106b
AX
12279 *** Please make sure the kernel devel package for your distribution
12280 *** is installed. If you are building with a custom kernel, make sure the
12281 *** kernel is configured, built, and the '--with-linux=PATH' configure
3d248aec
AX
12282 *** option refers to the location of the kernel source." >&5
12283$as_echo "$as_me: error:
12284 *** Please make sure the kernel devel package for your distribution
12285 *** is installed. If you are building with a custom kernel, make sure the
12286 *** kernel is configured, built, and the '--with-linux=PATH' configure
12287 *** option refers to the location of the kernel source." >&2;}
12288 { (exit 1); exit 1; }; }
ea04106b
AX
12289
12290fi
12291
3d248aec 12292
ea04106b
AX
12293else
12294
12295 LINUX_SYMBOLS=NONE
12296
12297fi
3d248aec
AX
12298
12299 { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
ea04106b
AX
12300$as_echo "$LINUX_SYMBOLS" >&6; }
12301
12302
12303
12304
12305
12306# Check whether --with-spl was given.
3d248aec 12307if test "${with_spl+set}" = set; then
ea04106b
AX
12308 withval=$with_spl; splsrc="$withval"
12309fi
12310
12311
12312
12313# Check whether --with-spl-obj was given.
3d248aec 12314if test "${with_spl_obj+set}" = set; then
ea04106b
AX
12315 withval=$with_spl_obj; splbuild="$withval"
12316fi
12317
12318
12319
12320# Check whether --with-spl-timeout was given.
3d248aec 12321if test "${with_spl_timeout+set}" = set; then
ea04106b
AX
12322 withval=$with_spl_timeout; timeout="$withval"
12323else
12324 timeout=0
12325fi
12326
12327
12328 splsrc0="/var/lib/dkms/spl/${VERSION}/build"
12329 splsrc1="/usr/local/src/spl-${VERSION}/${LINUX_VERSION}"
12330 splsrc2="/usr/local/src/spl-${VERSION}"
12331 splsrc3="/usr/src/spl-${VERSION}/${LINUX_VERSION}"
12332 splsrc4="/usr/src/spl-${VERSION}"
12333 splsrc5="../spl/"
12334 splsrc6="$LINUX"
12335
3d248aec 12336 { $as_echo "$as_me:$LINENO: checking spl source directory" >&5
ea04106b 12337$as_echo_n "checking spl source directory... " >&6; }
3d248aec 12338 if test -z "${splsrc}"; then
ea04106b 12339
3d248aec 12340 if test -e "${splsrc0}/spl.release.in"; then
ea04106b
AX
12341
12342 splsrc=${splsrc0}
12343
3d248aec 12344elif test -e "${splsrc1}/spl.release.in"; then
ea04106b
AX
12345
12346 splsrc=${splsrc1}
12347
3d248aec 12348elif test -e "${splsrc2}/spl.release.in"; then
ea04106b
AX
12349
12350 splsrc=${splsrc2}
12351
3d248aec 12352elif test -e "${splsrc3}/spl.release.in"; then
ea04106b
AX
12353
12354 splsrc=$(readlink -f "${splsrc3}")
12355
3d248aec 12356elif test -e "${splsrc4}/spl.release.in" ; then
ea04106b
AX
12357
12358 splsrc=${splsrc4}
12359
3d248aec 12360elif test -e "${splsrc5}/spl.release.in"; then
ea04106b
AX
12361
12362 splsrc=$(readlink -f "${splsrc5}")
12363
3d248aec 12364elif test -e "${splsrc6}/spl.release.in" ; then
ea04106b
AX
12365
12366 splsrc=${splsrc6}
12367
12368else
12369
12370 splsrc="Not found"
12371
12372fi
12373
3d248aec 12374
ea04106b
AX
12375else
12376
3d248aec 12377 if test "$splsrc" = "NONE"; then
ea04106b
AX
12378
12379 splbuild=NONE
12380 splsrcver=NONE
12381
12382fi
12383
3d248aec 12384
ea04106b
AX
12385fi
12386
3d248aec
AX
12387
12388 { $as_echo "$as_me:$LINENO: result: $splsrc" >&5
ea04106b 12389$as_echo "$splsrc" >&6; }
3d248aec 12390 if test ! -e "$splsrc/spl.release.in"; then
ea04106b 12391
3d248aec 12392 { { $as_echo "$as_me:$LINENO: error:
ea04106b
AX
12393 *** Please make sure the kmod spl devel package for your distribution
12394 *** is installed then try again. If that fails you can specify the
3d248aec
AX
12395 *** location of the spl source with the '--with-spl=PATH' option." >&5
12396$as_echo "$as_me: error:
12397 *** Please make sure the kmod spl devel package for your distribution
12398 *** is installed then try again. If that fails you can specify the
12399 *** location of the spl source with the '--with-spl=PATH' option." >&2;}
12400 { (exit 1); exit 1; }; }
ea04106b
AX
12401
12402fi
12403
3d248aec
AX
12404
12405 { $as_echo "$as_me:$LINENO: checking spl build directory" >&5
ea04106b
AX
12406$as_echo_n "checking spl build directory... " >&6; }
12407 while true; do
3d248aec 12408 if test -z "$splbuild"; then
ea04106b 12409
3d248aec 12410 if test -e "${splsrc}/${LINUX_VERSION}/spl_config.h" ; then
ea04106b
AX
12411
12412 splbuild="${splsrc}/${LINUX_VERSION}"
12413
3d248aec 12414elif test -e "${splsrc}/spl_config.h" ; then
ea04106b
AX
12415
12416 splbuild="${splsrc}"
12417
3d248aec 12418elif find -L "${splsrc}" -name spl_config.h 2> /dev/null | grep -wq spl_config.h ; then
e10b0808
AX
12419
12420 splbuild=$(find -L "${splsrc}" -name spl_config.h | sed 's,/spl_config.h,,')
12421
ea04106b
AX
12422else
12423
12424 splbuild="Not found"
12425
12426fi
12427
3d248aec 12428
ea04106b 12429fi
3d248aec
AX
12430
12431 if test -e "$splbuild/spl_config.h" -o $timeout -le 0; then
ea04106b
AX
12432
12433 break;
12434
12435else
12436
12437 sleep 1
12438 timeout=$((timeout-1))
12439
12440fi
3d248aec 12441
ea04106b
AX
12442 done
12443
3d248aec 12444 { $as_echo "$as_me:$LINENO: result: $splbuild" >&5
ea04106b 12445$as_echo "$splbuild" >&6; }
3d248aec 12446 if ! test -e "$splbuild/spl_config.h"; then
ea04106b 12447
3d248aec 12448 { { $as_echo "$as_me:$LINENO: error:
ea04106b
AX
12449 *** Please make sure the kmod spl devel <kernel> package for your
12450 *** distribution is installed then try again. If that fails you
12451 *** can specify the location of the spl objects with the
3d248aec
AX
12452 *** '--with-spl-obj=PATH' option." >&5
12453$as_echo "$as_me: error:
12454 *** Please make sure the kmod spl devel <kernel> package for your
12455 *** distribution is installed then try again. If that fails you
12456 *** can specify the location of the spl objects with the
12457 *** '--with-spl-obj=PATH' option." >&2;}
12458 { (exit 1); exit 1; }; }
ea04106b
AX
12459
12460fi
12461
3d248aec
AX
12462
12463 { $as_echo "$as_me:$LINENO: checking spl source version" >&5
ea04106b
AX
12464$as_echo_n "checking spl source version... " >&6; }
12465 if test -r $splbuild/spl_config.h &&
3d248aec 12466 fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then
ea04106b
AX
12467
12468
12469 splsrcver=`(echo "#include <spl_config.h>";
12470 echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
12471 cpp -I $splbuild |
12472 grep "^splsrcver=" | tr -d \" | cut -d= -f2`
12473
12474fi
12475
ea04106b 12476
3d248aec
AX
12477 if test -z "$splsrcver"; then
12478
12479 { $as_echo "$as_me:$LINENO: result: Not found" >&5
ea04106b 12480$as_echo "Not found" >&6; }
3d248aec
AX
12481 { { $as_echo "$as_me:$LINENO: error:
12482 *** Cannot determine the version of the spl source.
12483 *** Please prepare the spl source before running this script" >&5
12484$as_echo "$as_me: error:
ea04106b 12485 *** Cannot determine the version of the spl source.
3d248aec
AX
12486 *** Please prepare the spl source before running this script" >&2;}
12487 { (exit 1); exit 1; }; }
ea04106b
AX
12488
12489fi
12490
3d248aec
AX
12491
12492 { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5
ea04106b
AX
12493$as_echo "$splsrcver" >&6; }
12494
12495 SPL=${splsrc}
12496 SPL_OBJ=${splbuild}
12497 SPL_VERSION=${splsrcver}
12498
12499
12500
12501
12502
3d248aec 12503 { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5
ea04106b
AX
12504$as_echo_n "checking spl file name for module symbols... " >&6; }
12505 SPL_SYMBOLS=NONE
12506
12507 while true; do
3d248aec 12508 if test -r $SPL_OBJ/Module.symvers; then
ea04106b
AX
12509
12510 SPL_SYMBOLS=Module.symvers
12511
3d248aec 12512elif test -r $SPL_OBJ/Modules.symvers; then
ea04106b
AX
12513
12514 SPL_SYMBOLS=Modules.symvers
12515
3d248aec 12516elif test -r $SPL_OBJ/module/Module.symvers; then
ea04106b
AX
12517
12518 SPL_SYMBOLS=Module.symvers
12519
3d248aec 12520elif test -r $SPL_OBJ/module/Modules.symvers; then
ea04106b
AX
12521
12522 SPL_SYMBOLS=Modules.symvers
12523
12524fi
12525
3d248aec
AX
12526
12527 if test $SPL_SYMBOLS != NONE -o $timeout -le 0; then
ea04106b
AX
12528
12529 break;
12530
12531else
12532
12533 sleep 1
12534 timeout=$((timeout-1))
12535
12536fi
3d248aec 12537
ea04106b
AX
12538 done
12539
3d248aec 12540 if test "$SPL_SYMBOLS" = NONE; then
ea04106b
AX
12541
12542 SPL_SYMBOLS=$LINUX_SYMBOLS
12543
12544fi
12545
3d248aec
AX
12546
12547 { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5
ea04106b
AX
12548$as_echo "$SPL_SYMBOLS" >&6; }
12549
12550
12551
3d248aec 12552 { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5
ea04106b
AX
12553$as_echo_n "checking whether modules can be built... " >&6; }
12554
12555
12556cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
12557/* confdefs.h. */
12558_ACEOF
12559cat confdefs.h >>conftest.$ac_ext
12560cat >>conftest.$ac_ext <<_ACEOF
12561/* end confdefs.h. */
ea04106b
AX
12562
12563
12564int
12565main (void)
12566{
12567
12568 ;
12569 return 0;
12570}
12571
12572_ACEOF
12573
12574
12575
12576cat - <<_ACEOF >conftest.h
12577
12578_ACEOF
12579
12580
12581 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
12582 echo "obj-m := conftest.o" >build/Makefile
12583 modpost_flag=''
12584 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
12585 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 12586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
12587 (eval $ac_try) 2>&5
12588 ac_status=$?
3d248aec
AX
12589 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12590 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
12591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
12592 (eval $ac_try) 2>&5
12593 ac_status=$?
3d248aec
AX
12594 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12595 (exit $ac_status); }; }; then
ea04106b 12596
3d248aec 12597 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
12598$as_echo "yes" >&6; }
12599
12600else
12601 $as_echo "$as_me: failed program was:" >&5
12602sed 's/^/| /' conftest.$ac_ext >&5
12603
3d248aec 12604 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
12605$as_echo "no" >&6; }
12606 if test "x$enable_linux_builtin" != xyes; then
3d248aec
AX
12607 { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5
12608$as_echo "$as_me: error: *** Unable to build an empty module." >&2;}
12609 { (exit 1); exit 1; }; }
ea04106b 12610 else
3d248aec 12611 { { $as_echo "$as_me:$LINENO: error:
ea04106b 12612 *** Unable to build an empty module.
3d248aec
AX
12613 *** Please run 'make scripts' inside the kernel source tree." >&5
12614$as_echo "$as_me: error:
12615 *** Unable to build an empty module.
12616 *** Please run 'make scripts' inside the kernel source tree." >&2;}
12617 { (exit 1); exit 1; }; }
ea04106b
AX
12618 fi
12619
12620
12621
12622fi
3d248aec 12623
ea04106b
AX
12624 rm -Rf build
12625
12626
12627
12628
3d248aec 12629 if test "x$cross_compiling" != xyes; then
94a40997 12630
3d248aec
AX
12631 if test "$cross_compiling" = yes; then
12632 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 12633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
12634{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
12635See \`config.log' for more details." >&5
12636$as_echo "$as_me: error: cannot run test program while cross compiling
12637See \`config.log' for more details." >&2;}
12638 { (exit 1); exit 1; }; }; }
ea04106b 12639else
3d248aec 12640 cat >conftest.$ac_ext <<_ACEOF
ea04106b 12641
3d248aec
AX
12642 /* confdefs.h. */
12643_ACEOF
12644cat confdefs.h >>conftest.$ac_ext
12645cat >>conftest.$ac_ext <<_ACEOF
12646/* end confdefs.h. */
ea04106b 12647
94a40997 12648 #include "$LINUX/include/linux/license.h"
ea04106b
AX
12649
12650int
12651main ()
12652{
12653
94a40997 12654 return !license_is_gpl_compatible("$ZFS_META_LICENSE");
ea04106b
AX
12655
12656 ;
12657 return 0;
12658}
12659
12660_ACEOF
3d248aec
AX
12661rm -f conftest$ac_exeext
12662if { (ac_try="$ac_link"
12663case "(($ac_try" in
12664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12665 *) ac_try_echo=$ac_try;;
12666esac
12667eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12668$as_echo "$ac_try_echo") >&5
12669 (eval "$ac_link") 2>&5
12670 ac_status=$?
12671 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12672 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12673 { (case "(($ac_try" in
12674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12675 *) ac_try_echo=$ac_try;;
12676esac
12677eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12678$as_echo "$ac_try_echo") >&5
12679 (eval "$ac_try") 2>&5
12680 ac_status=$?
12681 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12682 (exit $ac_status); }; }; then
12683
12684
12685cat >>confdefs.h <<\_ACEOF
12686#define ZFS_IS_GPL_COMPATIBLE 1
12687_ACEOF
12688
ea04106b 12689
3d248aec
AX
12690else
12691 $as_echo "$as_me: program exited with status $ac_status" >&5
12692$as_echo "$as_me: failed program was:" >&5
12693sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 12694
3d248aec 12695( exit $ac_status )
ea04106b
AX
12696
12697
12698fi
3d248aec
AX
12699rm -rf conftest.dSYM
12700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ea04106b
AX
12701fi
12702
12703
3d248aec 12704
94a40997
AX
12705fi
12706
ea04106b 12707
3d248aec
AX
12708
12709 { $as_echo "$as_me:$LINENO: checking whether kernel was built with 16K or larger stacks" >&5
68d83c55
AX
12710$as_echo_n "checking whether kernel was built with 16K or larger stacks... " >&6; }
12711
12712
12713cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
12714/* confdefs.h. */
12715_ACEOF
12716cat confdefs.h >>conftest.$ac_ext
12717cat >>conftest.$ac_ext <<_ACEOF
12718/* end confdefs.h. */
68d83c55
AX
12719
12720
12721 #include <linux/module.h>
12722
12723int
12724main (void)
12725{
12726
12727 #if (THREAD_SIZE < 16384)
12728 #error "THREAD_SIZE is less than 16K"
12729 #endif
12730
12731 ;
12732 return 0;
12733}
12734
12735_ACEOF
12736
12737
12738
12739cat - <<_ACEOF >conftest.h
12740
12741_ACEOF
12742
12743
12744 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
12745 echo "obj-m := conftest.o" >build/Makefile
12746 modpost_flag=''
12747 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
12748 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 12749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
12750 (eval $ac_try) 2>&5
12751 ac_status=$?
3d248aec
AX
12752 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12753 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
12754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
12755 (eval $ac_try) 2>&5
12756 ac_status=$?
3d248aec
AX
12757 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12758 (exit $ac_status); }; }; then
68d83c55 12759
3d248aec 12760 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
12761$as_echo "yes" >&6; }
12762
3d248aec
AX
12763cat >>confdefs.h <<\_ACEOF
12764#define HAVE_LARGE_STACKS 1
12765_ACEOF
68d83c55
AX
12766
12767
12768else
12769 $as_echo "$as_me: failed program was:" >&5
12770sed 's/^/| /' conftest.$ac_ext >&5
12771
3d248aec 12772 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
12773$as_echo "no" >&6; }
12774
12775
12776
12777fi
3d248aec 12778
68d83c55 12779 rm -Rf build
ea04106b 12780
68d83c55
AX
12781
12782
12783
12784
3d248aec 12785 { $as_echo "$as_me:$LINENO: checking whether kernel was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
68d83c55 12786$as_echo_n "checking whether kernel was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
ea04106b
AX
12787
12788
12789cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
12790/* confdefs.h. */
12791_ACEOF
12792cat confdefs.h >>conftest.$ac_ext
12793cat >>conftest.$ac_ext <<_ACEOF
12794/* end confdefs.h. */
ea04106b
AX
12795
12796
12797 #include <linux/module.h>
12798
12799int
12800main (void)
12801{
12802
12803 #ifndef CONFIG_DEBUG_LOCK_ALLOC
12804 #error CONFIG_DEBUG_LOCK_ALLOC not #defined
12805 #endif
12806
12807 ;
12808 return 0;
12809}
12810
12811_ACEOF
12812
12813
12814
12815cat - <<_ACEOF >conftest.h
12816
12817_ACEOF
12818
12819
12820 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
12821 echo "obj-m := conftest.o" >build/Makefile
12822 modpost_flag=''
12823 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
12824 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 12825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
12826 (eval $ac_try) 2>&5
12827 ac_status=$?
3d248aec
AX
12828 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12829 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
12830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
12831 (eval $ac_try) 2>&5
12832 ac_status=$?
3d248aec
AX
12833 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12834 (exit $ac_status); }; }; then
ea04106b 12835
3d248aec 12836 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
12837$as_echo "yes" >&6; }
12838
3d248aec 12839 { $as_echo "$as_me:$LINENO: checking whether mutex_lock() is GPL-only" >&5
ea04106b
AX
12840$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; }
12841 tmp_flags="$EXTRA_KCFLAGS"
12842
12843
12844cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
12845/* confdefs.h. */
12846_ACEOF
12847cat confdefs.h >>conftest.$ac_ext
12848cat >>conftest.$ac_ext <<_ACEOF
12849/* end confdefs.h. */
ea04106b
AX
12850
12851
12852 #include <linux/module.h>
12853 #include <linux/mutex.h>
12854
12855 MODULE_LICENSE("$ZFS_META_LICENSE");
12856
12857int
12858main (void)
12859{
12860
12861 struct mutex lock;
12862
12863 mutex_init(&lock);
12864 mutex_lock(&lock);
12865 mutex_unlock(&lock);
12866
12867 ;
12868 return 0;
12869}
12870
12871_ACEOF
12872
12873
12874
12875cat - <<_ACEOF >conftest.h
12876
12877_ACEOF
12878
12879
12880 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
12881 echo "obj-m := conftest.o" >build/Makefile
12882 modpost_flag=''
12883 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
12884 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 12885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
12886 (eval $ac_try) 2>&5
12887 ac_status=$?
3d248aec
AX
12888 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12889 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
12890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
12891 (eval $ac_try) 2>&5
12892 ac_status=$?
3d248aec
AX
12893 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12894 (exit $ac_status); }; }; then
ea04106b 12895
3d248aec 12896 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
12897$as_echo "no" >&6; }
12898
12899else
12900 $as_echo "$as_me: failed program was:" >&5
12901sed 's/^/| /' conftest.$ac_ext >&5
12902
3d248aec 12903 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b 12904$as_echo "yes" >&6; }
3d248aec 12905 { { $as_echo "$as_me:$LINENO: error:
ea04106b
AX
12906 *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
12907 *** with the CDDL license and will prevent the module linking stage
12908 *** from succeeding. You must rebuild your kernel without this
3d248aec
AX
12909 *** option enabled." >&5
12910$as_echo "$as_me: error:
12911 *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
12912 *** with the CDDL license and will prevent the module linking stage
12913 *** from succeeding. You must rebuild your kernel without this
12914 *** option enabled." >&2;}
12915 { (exit 1); exit 1; }; }
ea04106b
AX
12916
12917
12918
12919fi
3d248aec 12920
ea04106b
AX
12921 rm -Rf build
12922
12923
12924 EXTRA_KCFLAGS="$tmp_flags"
12925
12926
12927else
12928 $as_echo "$as_me: failed program was:" >&5
12929sed 's/^/| /' conftest.$ac_ext >&5
12930
3d248aec 12931 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
12932$as_echo "no" >&6; }
12933
12934
12935
12936
12937fi
3d248aec 12938
ea04106b
AX
12939 rm -Rf build
12940
12941
12942
12943
12944
12945
12946 tmp_flags="$EXTRA_KCFLAGS"
12947 EXTRA_KCFLAGS="-I\$(src)"
12948
3d248aec 12949 { $as_echo "$as_me:$LINENO: checking whether DECLARE_EVENT_CLASS() is available" >&5
ea04106b
AX
12950$as_echo_n "checking whether DECLARE_EVENT_CLASS() is available... " >&6; }
12951
12952
12953cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
12954/* confdefs.h. */
12955_ACEOF
12956cat confdefs.h >>conftest.$ac_ext
12957cat >>conftest.$ac_ext <<_ACEOF
12958/* end confdefs.h. */
ea04106b
AX
12959
12960
12961 #include <linux/module.h>
12962 MODULE_LICENSE(ZFS_META_LICENSE);
12963
12964 #define CREATE_TRACE_POINTS
12965 #include "conftest.h"
12966
12967int
12968main (void)
12969{
12970
12971 trace_zfs_autoconf_event_one(1UL);
12972 trace_zfs_autoconf_event_two(2UL);
12973
12974 ;
12975 return 0;
12976}
12977
12978_ACEOF
12979
12980
12981
12982cat - <<_ACEOF >conftest.h
12983
12984 #if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
12985 #define _CONFTEST_H
12986
12987 #undef TRACE_SYSTEM
12988 #define TRACE_SYSTEM zfs
12989 #include <linux/tracepoint.h>
12990
12991 DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
12992 TP_PROTO(unsigned long i),
12993 TP_ARGS(i),
12994 TP_STRUCT__entry(
12995 __field(unsigned long, i)
12996 ),
12997 TP_fast_assign(
12998 __entry->i = i;
12999 ),
13000 TP_printk("i = %lu", __entry->i)
13001 );
13002
13003 #define DEFINE_AUTOCONF_EVENT(name) \
13004 DEFINE_EVENT(zfs_autoconf_event_class, name, \
13005 TP_PROTO(unsigned long i), \
13006 TP_ARGS(i))
13007 DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
13008 DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
13009
13010 #endif /* _CONFTEST_H */
13011
13012 #undef TRACE_INCLUDE_PATH
13013 #define TRACE_INCLUDE_PATH .
13014 #define TRACE_INCLUDE_FILE conftest
13015 #include <trace/define_trace.h>
13016
13017_ACEOF
13018
13019
13020 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13021 echo "obj-m := conftest.o" >build/Makefile
13022 modpost_flag=''
13023 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13024 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13026 (eval $ac_try) 2>&5
13027 ac_status=$?
3d248aec
AX
13028 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13029 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13031 (eval $ac_try) 2>&5
13032 ac_status=$?
3d248aec
AX
13033 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13034 (exit $ac_status); }; }; then
ea04106b 13035
3d248aec 13036 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
13037$as_echo "yes" >&6; }
13038
3d248aec
AX
13039cat >>confdefs.h <<\_ACEOF
13040#define HAVE_DECLARE_EVENT_CLASS 1
13041_ACEOF
ea04106b
AX
13042
13043
13044else
13045 $as_echo "$as_me: failed program was:" >&5
13046sed 's/^/| /' conftest.$ac_ext >&5
13047
3d248aec 13048 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
13049$as_echo "no" >&6; }
13050
13051
13052
13053fi
3d248aec 13054
ea04106b
AX
13055 rm -Rf build
13056
13057
13058 EXTRA_KCFLAGS="$tmp_flags"
13059
13060
3d248aec 13061 { $as_echo "$as_me:$LINENO: checking whether current->bio_tail exists" >&5
e10b0808
AX
13062$as_echo_n "checking whether current->bio_tail exists... " >&6; }
13063
13064
13065cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13066/* confdefs.h. */
13067_ACEOF
13068cat confdefs.h >>conftest.$ac_ext
13069cat >>conftest.$ac_ext <<_ACEOF
13070/* end confdefs.h. */
e10b0808
AX
13071
13072
13073 #include <linux/sched.h>
13074
13075int
13076main (void)
13077{
13078
13079 current->bio_tail = (struct bio **) NULL;
13080
13081 ;
13082 return 0;
13083}
13084
13085_ACEOF
13086
13087
13088
13089cat - <<_ACEOF >conftest.h
13090
13091_ACEOF
13092
13093
13094 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13095 echo "obj-m := conftest.o" >build/Makefile
13096 modpost_flag=''
13097 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13098 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
13100 (eval $ac_try) 2>&5
13101 ac_status=$?
3d248aec
AX
13102 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13103 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
13105 (eval $ac_try) 2>&5
13106 ac_status=$?
3d248aec
AX
13107 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13108 (exit $ac_status); }; }; then
e10b0808 13109
3d248aec 13110 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
13111$as_echo "yes" >&6; }
13112
3d248aec
AX
13113cat >>confdefs.h <<\_ACEOF
13114#define HAVE_CURRENT_BIO_TAIL 1
13115_ACEOF
e10b0808
AX
13116
13117
13118else
13119 $as_echo "$as_me: failed program was:" >&5
13120sed 's/^/| /' conftest.$ac_ext >&5
13121
3d248aec 13122 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 13123$as_echo "no" >&6; }
3d248aec 13124 { $as_echo "$as_me:$LINENO: checking whether current->bio_list exists" >&5
e10b0808
AX
13125$as_echo_n "checking whether current->bio_list exists... " >&6; }
13126
13127
13128cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13129/* confdefs.h. */
13130_ACEOF
13131cat confdefs.h >>conftest.$ac_ext
13132cat >>conftest.$ac_ext <<_ACEOF
13133/* end confdefs.h. */
e10b0808
AX
13134
13135
13136 #include <linux/sched.h>
13137
13138int
13139main (void)
13140{
13141
13142 current->bio_list = (struct bio_list *) NULL;
13143
13144 ;
13145 return 0;
13146}
13147
13148_ACEOF
13149
13150
13151
13152cat - <<_ACEOF >conftest.h
13153
13154_ACEOF
13155
13156
13157 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13158 echo "obj-m := conftest.o" >build/Makefile
13159 modpost_flag=''
13160 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13161 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
13163 (eval $ac_try) 2>&5
13164 ac_status=$?
3d248aec
AX
13165 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13166 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13167 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
13168 (eval $ac_try) 2>&5
13169 ac_status=$?
3d248aec
AX
13170 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13171 (exit $ac_status); }; }; then
e10b0808 13172
3d248aec 13173 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
13174$as_echo "yes" >&6; }
13175
3d248aec
AX
13176cat >>confdefs.h <<\_ACEOF
13177#define HAVE_CURRENT_BIO_LIST 1
13178_ACEOF
e10b0808
AX
13179
13180
13181else
13182 $as_echo "$as_me: failed program was:" >&5
13183sed 's/^/| /' conftest.$ac_ext >&5
13184
3d248aec
AX
13185 { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
13186 https://github.com/zfsonlinux/zfs/issues/new" >&5
13187$as_echo "$as_me: error: no - Please file a bug report at
13188 https://github.com/zfsonlinux/zfs/issues/new" >&2;}
13189 { (exit 1); exit 1; }; }
e10b0808
AX
13190
13191
13192
13193fi
3d248aec 13194
e10b0808
AX
13195 rm -Rf build
13196
13197
13198
13199
13200
87dac73d 13201fi
3d248aec 13202
87dac73d
AX
13203 rm -Rf build
13204
13205
13206
13207
3d248aec 13208 { $as_echo "$as_me:$LINENO: checking whether submit_bio() wants 1 arg" >&5
87dac73d
AX
13209$as_echo_n "checking whether submit_bio() wants 1 arg... " >&6; }
13210
13211
13212cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13213/* confdefs.h. */
13214_ACEOF
13215cat confdefs.h >>conftest.$ac_ext
13216cat >>conftest.$ac_ext <<_ACEOF
13217/* end confdefs.h. */
87dac73d
AX
13218
13219
13220 #include <linux/bio.h>
13221
13222int
13223main (void)
13224{
13225
13226 blk_qc_t blk_qc;
13227 struct bio *bio = NULL;
13228 blk_qc = submit_bio(bio);
13229
13230 ;
13231 return 0;
13232}
13233
13234_ACEOF
13235
13236
13237
13238cat - <<_ACEOF >conftest.h
13239
13240_ACEOF
13241
13242
13243 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13244 echo "obj-m := conftest.o" >build/Makefile
13245 modpost_flag=''
13246 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13247 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
13249 (eval $ac_try) 2>&5
13250 ac_status=$?
3d248aec
AX
13251 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13252 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
13254 (eval $ac_try) 2>&5
13255 ac_status=$?
3d248aec
AX
13256 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13257 (exit $ac_status); }; }; then
87dac73d 13258
3d248aec 13259 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
13260$as_echo "yes" >&6; }
13261
3d248aec
AX
13262cat >>confdefs.h <<\_ACEOF
13263#define HAVE_1ARG_SUBMIT_BIO 1
13264_ACEOF
87dac73d
AX
13265
13266
13267else
13268 $as_echo "$as_me: failed program was:" >&5
13269sed 's/^/| /' conftest.$ac_ext >&5
13270
3d248aec 13271 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
13272$as_echo "no" >&6; }
13273
13274
13275
e10b0808 13276fi
3d248aec 13277
e10b0808
AX
13278 rm -Rf build
13279
13280
13281
13282
3d248aec 13283 { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5
ea04106b
AX
13284$as_echo_n "checking block device operation prototypes... " >&6; }
13285 tmp_flags="$EXTRA_KCFLAGS"
13286 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
13287
13288
13289cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13290/* confdefs.h. */
13291_ACEOF
13292cat confdefs.h >>conftest.$ac_ext
13293cat >>conftest.$ac_ext <<_ACEOF
13294/* end confdefs.h. */
ea04106b
AX
13295
13296
13297 #include <linux/blkdev.h>
13298
13299 int blk_open(struct block_device *bdev, fmode_t mode)
13300 { return 0; }
13301 int blk_ioctl(struct block_device *bdev, fmode_t mode,
13302 unsigned x, unsigned long y) { return 0; }
13303 int blk_compat_ioctl(struct block_device * bdev, fmode_t mode,
13304 unsigned x, unsigned long y) { return 0; }
13305
13306 static const struct block_device_operations
13307 bops __attribute__ ((unused)) = {
13308 .open = blk_open,
13309 .release = NULL,
13310 .ioctl = blk_ioctl,
13311 .compat_ioctl = blk_compat_ioctl,
13312 };
13313
13314int
13315main (void)
13316{
13317
13318
13319 ;
13320 return 0;
13321}
13322
13323_ACEOF
13324
13325
13326
13327cat - <<_ACEOF >conftest.h
13328
13329_ACEOF
13330
13331
13332 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13333 echo "obj-m := conftest.o" >build/Makefile
13334 modpost_flag=''
13335 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13336 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13338 (eval $ac_try) 2>&5
13339 ac_status=$?
3d248aec
AX
13340 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13341 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13343 (eval $ac_try) 2>&5
13344 ac_status=$?
3d248aec
AX
13345 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13346 (exit $ac_status); }; }; then
ea04106b 13347
3d248aec 13348 { $as_echo "$as_me:$LINENO: result: struct block_device" >&5
ea04106b
AX
13349$as_echo "struct block_device" >&6; }
13350
3d248aec
AX
13351cat >>confdefs.h <<\_ACEOF
13352#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1
13353_ACEOF
ea04106b
AX
13354
13355
13356else
13357 $as_echo "$as_me: failed program was:" >&5
13358sed 's/^/| /' conftest.$ac_ext >&5
13359
3d248aec 13360 { $as_echo "$as_me:$LINENO: result: struct inode" >&5
ea04106b
AX
13361$as_echo "struct inode" >&6; }
13362
13363
13364
13365fi
3d248aec 13366
ea04106b
AX
13367 rm -Rf build
13368
13369
13370 EXTRA_KCFLAGS="$tmp_flags"
13371
13372
3d248aec 13373 { $as_echo "$as_me:$LINENO: checking whether block_device_operations.release is void" >&5
ea04106b
AX
13374$as_echo_n "checking whether block_device_operations.release is void... " >&6; }
13375 tmp_flags="$EXTRA_KCFLAGS"
13376 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
13377
13378
13379cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13380/* confdefs.h. */
13381_ACEOF
13382cat confdefs.h >>conftest.$ac_ext
13383cat >>conftest.$ac_ext <<_ACEOF
13384/* end confdefs.h. */
ea04106b
AX
13385
13386
13387 #include <linux/blkdev.h>
13388
13389 void blk_release(struct gendisk *g, fmode_t mode) { return; }
13390
13391 static const struct block_device_operations
13392 bops __attribute__ ((unused)) = {
13393 .open = NULL,
13394 .release = blk_release,
13395 .ioctl = NULL,
13396 .compat_ioctl = NULL,
13397 };
13398
13399int
13400main (void)
13401{
13402
13403
13404 ;
13405 return 0;
13406}
13407
13408_ACEOF
13409
13410
13411
13412cat - <<_ACEOF >conftest.h
13413
13414_ACEOF
13415
13416
13417 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13418 echo "obj-m := conftest.o" >build/Makefile
13419 modpost_flag=''
13420 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13421 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13423 (eval $ac_try) 2>&5
13424 ac_status=$?
3d248aec
AX
13425 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13426 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13428 (eval $ac_try) 2>&5
13429 ac_status=$?
3d248aec
AX
13430 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13431 (exit $ac_status); }; }; then
ea04106b 13432
3d248aec 13433 { $as_echo "$as_me:$LINENO: result: void" >&5
ea04106b
AX
13434$as_echo "void" >&6; }
13435
3d248aec
AX
13436cat >>confdefs.h <<\_ACEOF
13437#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID 1
13438_ACEOF
ea04106b
AX
13439
13440
13441else
13442 $as_echo "$as_me: failed program was:" >&5
13443sed 's/^/| /' conftest.$ac_ext >&5
13444
3d248aec 13445 { $as_echo "$as_me:$LINENO: result: int" >&5
ea04106b
AX
13446$as_echo "int" >&6; }
13447
13448
13449
13450fi
3d248aec 13451
ea04106b
AX
13452 rm -Rf build
13453
13454
13455 EXTRA_KCFLAGS="$tmp_flags"
13456
3d248aec 13457 { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5
ea04106b
AX
13458$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
13459
13460
13461cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13462/* confdefs.h. */
13463_ACEOF
13464cat confdefs.h >>conftest.$ac_ext
13465cat >>conftest.$ac_ext <<_ACEOF
13466/* end confdefs.h. */
ea04106b
AX
13467
13468
13469 #include <linux/types.h>
13470
13471int
13472main (void)
13473{
13474
13475 fmode_t *ptr __attribute__ ((unused));
13476
13477 ;
13478 return 0;
13479}
13480
13481_ACEOF
13482
13483
13484
13485cat - <<_ACEOF >conftest.h
13486
13487_ACEOF
13488
13489
13490 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13491 echo "obj-m := conftest.o" >build/Makefile
13492 modpost_flag=''
13493 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13494 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13496 (eval $ac_try) 2>&5
13497 ac_status=$?
3d248aec
AX
13498 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13499 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13501 (eval $ac_try) 2>&5
13502 ac_status=$?
3d248aec
AX
13503 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13504 (exit $ac_status); }; }; then
ea04106b 13505
3d248aec 13506 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
13507$as_echo "yes" >&6; }
13508
3d248aec
AX
13509cat >>confdefs.h <<\_ACEOF
13510#define HAVE_FMODE_T 1
13511_ACEOF
ea04106b
AX
13512
13513
13514else
13515 $as_echo "$as_me: failed program was:" >&5
13516sed 's/^/| /' conftest.$ac_ext >&5
13517
3d248aec 13518 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
13519$as_echo "no" >&6; }
13520
13521
13522
13523fi
3d248aec 13524
ea04106b
AX
13525 rm -Rf build
13526
13527
13528
13529
3d248aec 13530 { $as_echo "$as_me:$LINENO: checking whether kernel defines KOBJ_NAME_LEN" >&5
ea04106b
AX
13531$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; }
13532
13533
13534cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13535/* confdefs.h. */
13536_ACEOF
13537cat confdefs.h >>conftest.$ac_ext
13538cat >>conftest.$ac_ext <<_ACEOF
13539/* end confdefs.h. */
ea04106b
AX
13540
13541
13542 #include <linux/kobject.h>
13543
13544int
13545main (void)
13546{
13547
13548 int val __attribute__ ((unused));
13549 val = KOBJ_NAME_LEN;
13550
13551 ;
13552 return 0;
13553}
13554
13555_ACEOF
13556
13557
13558
13559cat - <<_ACEOF >conftest.h
13560
13561_ACEOF
13562
13563
13564 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13565 echo "obj-m := conftest.o" >build/Makefile
13566 modpost_flag=''
13567 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13568 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13570 (eval $ac_try) 2>&5
13571 ac_status=$?
3d248aec
AX
13572 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13573 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13575 (eval $ac_try) 2>&5
13576 ac_status=$?
3d248aec
AX
13577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13578 (exit $ac_status); }; }; then
ea04106b 13579
3d248aec 13580 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
13581$as_echo "yes" >&6; }
13582
3d248aec
AX
13583cat >>confdefs.h <<\_ACEOF
13584#define HAVE_KOBJ_NAME_LEN 1
13585_ACEOF
ea04106b
AX
13586
13587
13588else
13589 $as_echo "$as_me: failed program was:" >&5
13590sed 's/^/| /' conftest.$ac_ext >&5
13591
3d248aec 13592 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
13593$as_echo "no" >&6; }
13594
13595
13596
13597fi
3d248aec 13598
ea04106b
AX
13599 rm -Rf build
13600
13601
13602
13603
3d248aec 13604 { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5
ea04106b
AX
13605$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
13606
13607
13608cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13609/* confdefs.h. */
13610_ACEOF
13611cat confdefs.h >>conftest.$ac_ext
13612cat >>conftest.$ac_ext <<_ACEOF
13613/* end confdefs.h. */
ea04106b
AX
13614
13615
13616 #include <linux/fs.h>
13617
13618int
13619main (void)
13620{
13621
13622 struct block_device *bdev = NULL;
13623 (void) blkdev_get(bdev, 0, NULL);
13624
13625 ;
13626 return 0;
13627}
13628
13629_ACEOF
13630
13631
13632
13633cat - <<_ACEOF >conftest.h
13634
13635_ACEOF
13636
13637
13638 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13639 echo "obj-m := conftest.o" >build/Makefile
13640 modpost_flag=''
13641 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13642 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13644 (eval $ac_try) 2>&5
13645 ac_status=$?
3d248aec
AX
13646 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13647 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13649 (eval $ac_try) 2>&5
13650 ac_status=$?
3d248aec
AX
13651 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13652 (exit $ac_status); }; }; then
ea04106b 13653
3d248aec 13654 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
13655$as_echo "yes" >&6; }
13656
3d248aec
AX
13657cat >>confdefs.h <<\_ACEOF
13658#define HAVE_3ARG_BLKDEV_GET 1
13659_ACEOF
ea04106b
AX
13660
13661
13662else
13663 $as_echo "$as_me: failed program was:" >&5
13664sed 's/^/| /' conftest.$ac_ext >&5
13665
3d248aec 13666 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
13667$as_echo "no" >&6; }
13668
13669
13670
13671fi
3d248aec 13672
ea04106b
AX
13673 rm -Rf build
13674
13675
13676
3d248aec 13677 { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5
ea04106b
AX
13678$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
13679
13680
13681
13682cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13683/* confdefs.h. */
13684_ACEOF
13685cat confdefs.h >>conftest.$ac_ext
13686cat >>conftest.$ac_ext <<_ACEOF
13687/* end confdefs.h. */
ea04106b
AX
13688
13689
13690 #include <linux/fs.h>
13691
13692int
13693main (void)
13694{
13695
13696 blkdev_get_by_path(NULL, 0, NULL);
13697
13698 ;
13699 return 0;
13700}
13701
13702_ACEOF
13703
13704
13705
13706cat - <<_ACEOF >conftest.h
13707
13708_ACEOF
13709
13710
13711 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13712 echo "obj-m := conftest.o" >build/Makefile
13713 modpost_flag=''
13714 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13715 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13717 (eval $ac_try) 2>&5
13718 ac_status=$?
3d248aec
AX
13719 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13720 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13721 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13722 (eval $ac_try) 2>&5
13723 ac_status=$?
3d248aec
AX
13724 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13725 (exit $ac_status); }; }; then
ea04106b
AX
13726 rc=0
13727else
13728 $as_echo "$as_me: failed program was:" >&5
13729sed 's/^/| /' conftest.$ac_ext >&5
13730 rc=1
13731
13732
13733fi
3d248aec 13734
ea04106b
AX
13735 rm -Rf build
13736
13737
13738 if test $rc -ne 0; then :
13739
3d248aec 13740 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
13741$as_echo "no" >&6; }
13742
13743 else
13744 if test "x$enable_linux_builtin" != xyes; then
13745
13746 grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
13747 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
13748 rc=$?
13749 if test $rc -ne 0; then
13750 export=0
13751 for file in fs/block_dev.c; do
13752 grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
13753 "$LINUX/$file" 2>/dev/null
13754 rc=$?
13755 if test $rc -eq 0; then
13756 export=1
13757 break;
13758 fi
13759 done
13760 if test $export -eq 0; then :
13761 rc=1
13762 else :
13763 rc=0
13764 fi
13765 else :
13766 rc=0
13767 fi
13768
13769 fi
13770 if test $rc -ne 0; then :
13771
3d248aec 13772 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
13773$as_echo "no" >&6; }
13774
13775 else :
13776
3d248aec 13777 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
13778$as_echo "yes" >&6; }
13779
3d248aec
AX
13780cat >>confdefs.h <<\_ACEOF
13781#define HAVE_BLKDEV_GET_BY_PATH 1
13782_ACEOF
ea04106b
AX
13783
13784
13785 fi
13786 fi
13787
13788
3d248aec 13789 { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5
ea04106b
AX
13790$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
13791
13792
13793
13794cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13795/* confdefs.h. */
13796_ACEOF
13797cat confdefs.h >>conftest.$ac_ext
13798cat >>conftest.$ac_ext <<_ACEOF
13799/* end confdefs.h. */
ea04106b
AX
13800
13801
13802 #include <linux/fs.h>
13803
13804int
13805main (void)
13806{
13807
13808 open_bdev_exclusive(NULL, 0, NULL);
13809
13810 ;
13811 return 0;
13812}
13813
13814_ACEOF
13815
13816
13817
13818cat - <<_ACEOF >conftest.h
13819
13820_ACEOF
13821
13822
13823 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13824 echo "obj-m := conftest.o" >build/Makefile
13825 modpost_flag=''
13826 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13827 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13829 (eval $ac_try) 2>&5
13830 ac_status=$?
3d248aec
AX
13831 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13832 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13834 (eval $ac_try) 2>&5
13835 ac_status=$?
3d248aec
AX
13836 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13837 (exit $ac_status); }; }; then
ea04106b
AX
13838 rc=0
13839else
13840 $as_echo "$as_me: failed program was:" >&5
13841sed 's/^/| /' conftest.$ac_ext >&5
13842 rc=1
13843
13844
13845fi
3d248aec 13846
ea04106b
AX
13847 rm -Rf build
13848
13849
13850 if test $rc -ne 0; then :
13851
3d248aec 13852 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
13853$as_echo "no" >&6; }
13854
13855 else
13856 if test "x$enable_linux_builtin" != xyes; then
13857
13858 grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
13859 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
13860 rc=$?
13861 if test $rc -ne 0; then
13862 export=0
13863 for file in fs/block_dev.c; do
13864 grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
13865 "$LINUX/$file" 2>/dev/null
13866 rc=$?
13867 if test $rc -eq 0; then
13868 export=1
13869 break;
13870 fi
13871 done
13872 if test $export -eq 0; then :
13873 rc=1
13874 else :
13875 rc=0
13876 fi
13877 else :
13878 rc=0
13879 fi
13880
13881 fi
13882 if test $rc -ne 0; then :
13883
3d248aec 13884 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
13885$as_echo "no" >&6; }
13886
13887 else :
13888
3d248aec 13889 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
13890$as_echo "yes" >&6; }
13891
3d248aec
AX
13892cat >>confdefs.h <<\_ACEOF
13893#define HAVE_OPEN_BDEV_EXCLUSIVE 1
13894_ACEOF
ea04106b
AX
13895
13896
13897 fi
13898 fi
13899
13900
3d248aec 13901 { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 1 arg" >&5
68d83c55 13902$as_echo_n "checking whether lookup_bdev() wants 1 arg... " >&6; }
ea04106b
AX
13903
13904
13905
13906cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13907/* confdefs.h. */
13908_ACEOF
13909cat confdefs.h >>conftest.$ac_ext
13910cat >>conftest.$ac_ext <<_ACEOF
13911/* end confdefs.h. */
ea04106b
AX
13912
13913
13914 #include <linux/fs.h>
13915
13916int
13917main (void)
13918{
13919
13920 lookup_bdev(NULL);
13921
13922 ;
13923 return 0;
13924}
13925
13926_ACEOF
13927
13928
13929
13930cat - <<_ACEOF >conftest.h
13931
13932_ACEOF
13933
13934
13935 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
13936 echo "obj-m := conftest.o" >build/Makefile
13937 modpost_flag=''
13938 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
13939 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 13940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13941 (eval $ac_try) 2>&5
13942 ac_status=$?
3d248aec
AX
13943 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13944 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
13945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
13946 (eval $ac_try) 2>&5
13947 ac_status=$?
3d248aec
AX
13948 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13949 (exit $ac_status); }; }; then
ea04106b
AX
13950 rc=0
13951else
13952 $as_echo "$as_me: failed program was:" >&5
13953sed 's/^/| /' conftest.$ac_ext >&5
13954 rc=1
13955
13956
13957fi
3d248aec 13958
ea04106b
AX
13959 rm -Rf build
13960
13961
13962 if test $rc -ne 0; then :
13963
3d248aec 13964 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 13965$as_echo "no" >&6; }
3d248aec 13966 { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 2 args" >&5
68d83c55 13967$as_echo_n "checking whether lookup_bdev() wants 2 args... " >&6; }
ea04106b 13968
ea04106b
AX
13969
13970
13971cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
13972/* confdefs.h. */
13973_ACEOF
13974cat confdefs.h >>conftest.$ac_ext
13975cat >>conftest.$ac_ext <<_ACEOF
13976/* end confdefs.h. */
ea04106b
AX
13977
13978
68d83c55 13979 #include <linux/fs.h>
ea04106b
AX
13980
13981int
13982main (void)
13983{
13984
68d83c55 13985 lookup_bdev(NULL, FMODE_READ);
ea04106b
AX
13986
13987 ;
13988 return 0;
13989}
13990
13991_ACEOF
13992
13993
13994
13995cat - <<_ACEOF >conftest.h
13996
13997_ACEOF
13998
13999
14000 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14001 echo "obj-m := conftest.o" >build/Makefile
14002 modpost_flag=''
14003 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14004 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14006 (eval $ac_try) 2>&5
14007 ac_status=$?
3d248aec
AX
14008 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14009 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14011 (eval $ac_try) 2>&5
14012 ac_status=$?
3d248aec
AX
14013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14014 (exit $ac_status); }; }; then
68d83c55
AX
14015 rc=0
14016else
14017 $as_echo "$as_me: failed program was:" >&5
14018sed 's/^/| /' conftest.$ac_ext >&5
14019 rc=1
ea04106b 14020
ea04106b 14021
68d83c55 14022fi
3d248aec 14023
68d83c55 14024 rm -Rf build
ea04106b
AX
14025
14026
68d83c55 14027 if test $rc -ne 0; then :
ea04106b 14028
3d248aec 14029 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
14030$as_echo "no" >&6; }
14031
68d83c55
AX
14032 else
14033 if test "x$enable_linux_builtin" != xyes; then
ea04106b 14034
68d83c55
AX
14035 grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
14036 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
14037 rc=$?
14038 if test $rc -ne 0; then
14039 export=0
14040 for file in fs/block_dev.c; do
14041 grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
14042 "$LINUX/$file" 2>/dev/null
14043 rc=$?
14044 if test $rc -eq 0; then
14045 export=1
14046 break;
14047 fi
14048 done
14049 if test $export -eq 0; then :
14050 rc=1
14051 else :
14052 rc=0
14053 fi
14054 else :
14055 rc=0
14056 fi
ea04106b 14057
68d83c55
AX
14058 fi
14059 if test $rc -ne 0; then :
14060
3d248aec 14061 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
14062$as_echo "no" >&6; }
14063
14064 else :
ea04106b 14065
3d248aec 14066 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 14067$as_echo "yes" >&6; }
ea04106b 14068
3d248aec
AX
14069cat >>confdefs.h <<\_ACEOF
14070#define HAVE_2ARGS_LOOKUP_BDEV 1
14071_ACEOF
ea04106b
AX
14072
14073
68d83c55
AX
14074 fi
14075 fi
14076
14077
14078 else
14079 if test "x$enable_linux_builtin" != xyes; then
14080
14081 grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
14082 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
14083 rc=$?
14084 if test $rc -ne 0; then
14085 export=0
14086 for file in fs/block_dev.c; do
14087 grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
14088 "$LINUX/$file" 2>/dev/null
14089 rc=$?
14090 if test $rc -eq 0; then
14091 export=1
14092 break;
14093 fi
14094 done
14095 if test $export -eq 0; then :
14096 rc=1
14097 else :
14098 rc=0
14099 fi
14100 else :
14101 rc=0
14102 fi
14103
14104 fi
14105 if test $rc -ne 0; then :
14106
3d248aec 14107 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 14108$as_echo "no" >&6; }
3d248aec 14109 { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 2 args" >&5
68d83c55
AX
14110$as_echo_n "checking whether lookup_bdev() wants 2 args... " >&6; }
14111
ea04106b
AX
14112
14113
14114cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14115/* confdefs.h. */
14116_ACEOF
14117cat confdefs.h >>conftest.$ac_ext
14118cat >>conftest.$ac_ext <<_ACEOF
14119/* end confdefs.h. */
ea04106b
AX
14120
14121
68d83c55 14122 #include <linux/fs.h>
ea04106b
AX
14123
14124int
14125main (void)
14126{
14127
68d83c55 14128 lookup_bdev(NULL, FMODE_READ);
ea04106b
AX
14129
14130 ;
14131 return 0;
14132}
14133
14134_ACEOF
14135
14136
14137
14138cat - <<_ACEOF >conftest.h
14139
14140_ACEOF
14141
14142
14143 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14144 echo "obj-m := conftest.o" >build/Makefile
14145 modpost_flag=''
14146 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14147 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14149 (eval $ac_try) 2>&5
14150 ac_status=$?
3d248aec
AX
14151 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14152 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14154 (eval $ac_try) 2>&5
14155 ac_status=$?
3d248aec
AX
14156 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14157 (exit $ac_status); }; }; then
68d83c55 14158 rc=0
ea04106b
AX
14159else
14160 $as_echo "$as_me: failed program was:" >&5
14161sed 's/^/| /' conftest.$ac_ext >&5
68d83c55 14162 rc=1
ea04106b
AX
14163
14164
14165fi
3d248aec 14166
ea04106b
AX
14167 rm -Rf build
14168
14169
68d83c55 14170 if test $rc -ne 0; then :
ea04106b 14171
3d248aec 14172 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
14173$as_echo "no" >&6; }
14174
68d83c55
AX
14175 else
14176 if test "x$enable_linux_builtin" != xyes; then
ea04106b 14177
68d83c55
AX
14178 grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
14179 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
14180 rc=$?
14181 if test $rc -ne 0; then
14182 export=0
14183 for file in fs/block_dev.c; do
14184 grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
14185 "$LINUX/$file" 2>/dev/null
14186 rc=$?
14187 if test $rc -eq 0; then
14188 export=1
14189 break;
14190 fi
14191 done
14192 if test $export -eq 0; then :
14193 rc=1
14194 else :
14195 rc=0
14196 fi
14197 else :
14198 rc=0
14199 fi
ea04106b 14200
68d83c55
AX
14201 fi
14202 if test $rc -ne 0; then :
ea04106b 14203
3d248aec 14204 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 14205$as_echo "no" >&6; }
ea04106b 14206
68d83c55 14207 else :
ea04106b 14208
3d248aec 14209 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 14210$as_echo "yes" >&6; }
ea04106b 14211
3d248aec
AX
14212cat >>confdefs.h <<\_ACEOF
14213#define HAVE_2ARGS_LOOKUP_BDEV 1
14214_ACEOF
ea04106b 14215
ea04106b 14216
68d83c55
AX
14217 fi
14218 fi
ea04106b
AX
14219
14220
68d83c55 14221 else :
ea04106b 14222
3d248aec 14223 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
14224$as_echo "yes" >&6; }
14225
3d248aec
AX
14226cat >>confdefs.h <<\_ACEOF
14227#define HAVE_1ARG_LOOKUP_BDEV 1
14228_ACEOF
ea04106b
AX
14229
14230
68d83c55
AX
14231 fi
14232 fi
ea04106b
AX
14233
14234
14235
3d248aec 14236 { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5
68d83c55 14237$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
ea04106b
AX
14238
14239
14240cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14241/* confdefs.h. */
14242_ACEOF
14243cat confdefs.h >>conftest.$ac_ext
14244cat >>conftest.$ac_ext <<_ACEOF
14245/* end confdefs.h. */
ea04106b
AX
14246
14247
68d83c55 14248 #include <linux/buffer_head.h>
ea04106b
AX
14249
14250int
14251main (void)
14252{
14253
68d83c55
AX
14254 struct block_device *bdev = NULL;
14255 invalidate_bdev(bdev);
ea04106b
AX
14256
14257 ;
14258 return 0;
14259}
14260
14261_ACEOF
14262
14263
14264
14265cat - <<_ACEOF >conftest.h
14266
14267_ACEOF
14268
14269
14270 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14271 echo "obj-m := conftest.o" >build/Makefile
14272 modpost_flag=''
14273 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14274 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14276 (eval $ac_try) 2>&5
14277 ac_status=$?
3d248aec
AX
14278 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14279 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14281 (eval $ac_try) 2>&5
14282 ac_status=$?
3d248aec
AX
14283 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14284 (exit $ac_status); }; }; then
ea04106b 14285
3d248aec 14286 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
14287$as_echo "yes" >&6; }
14288
3d248aec
AX
14289cat >>confdefs.h <<\_ACEOF
14290#define HAVE_1ARG_INVALIDATE_BDEV 1
14291_ACEOF
ea04106b
AX
14292
14293
14294else
14295 $as_echo "$as_me: failed program was:" >&5
14296sed 's/^/| /' conftest.$ac_ext >&5
14297
3d248aec 14298 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
14299$as_echo "no" >&6; }
14300
14301
14302
14303fi
3d248aec 14304
ea04106b
AX
14305 rm -Rf build
14306
14307
14308
14309
3d248aec 14310 { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5
68d83c55
AX
14311$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
14312 tmp_flags="$EXTRA_KCFLAGS"
14313 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
14314
14315
14316cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14317/* confdefs.h. */
14318_ACEOF
14319cat confdefs.h >>conftest.$ac_ext
14320cat >>conftest.$ac_ext <<_ACEOF
14321/* end confdefs.h. */
ea04106b
AX
14322
14323
68d83c55 14324 #include <linux/blkdev.h>
ea04106b
AX
14325
14326int
14327main (void)
14328{
14329
68d83c55
AX
14330 struct block_device *bdev = NULL;
14331 bdev_logical_block_size(bdev);
ea04106b
AX
14332
14333 ;
14334 return 0;
14335}
14336
14337_ACEOF
14338
14339
14340
14341cat - <<_ACEOF >conftest.h
14342
14343_ACEOF
14344
14345
14346 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14347 echo "obj-m := conftest.o" >build/Makefile
14348 modpost_flag=''
14349 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14350 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14352 (eval $ac_try) 2>&5
14353 ac_status=$?
3d248aec
AX
14354 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14355 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14357 (eval $ac_try) 2>&5
14358 ac_status=$?
3d248aec
AX
14359 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14360 (exit $ac_status); }; }; then
ea04106b 14361
3d248aec 14362 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
14363$as_echo "yes" >&6; }
14364
3d248aec
AX
14365cat >>confdefs.h <<\_ACEOF
14366#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1
14367_ACEOF
ea04106b
AX
14368
14369
14370else
14371 $as_echo "$as_me: failed program was:" >&5
14372sed 's/^/| /' conftest.$ac_ext >&5
14373
3d248aec 14374 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
14375$as_echo "no" >&6; }
14376
14377
14378
14379fi
3d248aec 14380
ea04106b
AX
14381 rm -Rf build
14382
14383
68d83c55 14384 EXTRA_KCFLAGS="$tmp_flags"
ea04106b
AX
14385
14386
3d248aec 14387 { $as_echo "$as_me:$LINENO: checking whether bdev_physical_block_size() is available" >&5
68d83c55
AX
14388$as_echo_n "checking whether bdev_physical_block_size() is available... " >&6; }
14389 tmp_flags="$EXTRA_KCFLAGS"
14390 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
14391
14392
14393cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14394/* confdefs.h. */
14395_ACEOF
14396cat confdefs.h >>conftest.$ac_ext
14397cat >>conftest.$ac_ext <<_ACEOF
14398/* end confdefs.h. */
ea04106b
AX
14399
14400
68d83c55 14401 #include <linux/blkdev.h>
e10b0808 14402
ea04106b
AX
14403int
14404main (void)
14405{
14406
68d83c55
AX
14407 struct block_device *bdev = NULL;
14408 bdev_physical_block_size(bdev);
ea04106b
AX
14409
14410 ;
14411 return 0;
14412}
14413
14414_ACEOF
14415
14416
14417
14418cat - <<_ACEOF >conftest.h
14419
14420_ACEOF
14421
14422
14423 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14424 echo "obj-m := conftest.o" >build/Makefile
14425 modpost_flag=''
14426 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14427 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14429 (eval $ac_try) 2>&5
14430 ac_status=$?
3d248aec
AX
14431 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14432 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14434 (eval $ac_try) 2>&5
14435 ac_status=$?
3d248aec
AX
14436 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14437 (exit $ac_status); }; }; then
ea04106b 14438
3d248aec 14439 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
14440$as_echo "yes" >&6; }
14441
3d248aec
AX
14442cat >>confdefs.h <<\_ACEOF
14443#define HAVE_BDEV_PHYSICAL_BLOCK_SIZE 1
14444_ACEOF
ea04106b
AX
14445
14446
14447else
14448 $as_echo "$as_me: failed program was:" >&5
14449sed 's/^/| /' conftest.$ac_ext >&5
14450
3d248aec 14451 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
14452$as_echo "no" >&6; }
14453
14454
14455
14456fi
3d248aec 14457
ea04106b
AX
14458 rm -Rf build
14459
14460
68d83c55 14461 EXTRA_KCFLAGS="$tmp_flags"
ea04106b
AX
14462
14463
3d248aec 14464 { $as_echo "$as_me:$LINENO: checking whether bio has bi_iter" >&5
68d83c55 14465$as_echo_n "checking whether bio has bi_iter... " >&6; }
ea04106b
AX
14466
14467
14468cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14469/* confdefs.h. */
14470_ACEOF
14471cat confdefs.h >>conftest.$ac_ext
14472cat >>conftest.$ac_ext <<_ACEOF
14473/* end confdefs.h. */
ea04106b
AX
14474
14475
68d83c55 14476 #include <linux/bio.h>
ea04106b 14477
ea04106b
AX
14478int
14479main (void)
14480{
14481
68d83c55
AX
14482 struct bio bio;
14483 bio.bi_iter.bi_sector = 0;
ea04106b
AX
14484
14485 ;
14486 return 0;
14487}
14488
14489_ACEOF
14490
14491
14492
14493cat - <<_ACEOF >conftest.h
14494
14495_ACEOF
14496
14497
14498 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14499 echo "obj-m := conftest.o" >build/Makefile
14500 modpost_flag=''
14501 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14502 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14504 (eval $ac_try) 2>&5
14505 ac_status=$?
3d248aec
AX
14506 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14507 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14509 (eval $ac_try) 2>&5
14510 ac_status=$?
3d248aec
AX
14511 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14512 (exit $ac_status); }; }; then
ea04106b 14513
3d248aec 14514 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
14515$as_echo "yes" >&6; }
14516
3d248aec
AX
14517cat >>confdefs.h <<\_ACEOF
14518#define HAVE_BIO_BVEC_ITER 1
14519_ACEOF
ea04106b
AX
14520
14521
14522else
14523 $as_echo "$as_me: failed program was:" >&5
14524sed 's/^/| /' conftest.$ac_ext >&5
14525
3d248aec 14526 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
14527$as_echo "no" >&6; }
14528
14529
14530
14531fi
3d248aec 14532
ea04106b
AX
14533 rm -Rf build
14534
14535
14536
14537
3d248aec 14538 { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
68d83c55 14539$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
ea04106b
AX
14540
14541
14542cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14543/* confdefs.h. */
14544_ACEOF
14545cat confdefs.h >>conftest.$ac_ext
14546cat >>conftest.$ac_ext <<_ACEOF
14547/* end confdefs.h. */
ea04106b
AX
14548
14549
68d83c55 14550 #include <linux/bio.h>
ea04106b
AX
14551
14552int
14553main (void)
14554{
14555
68d83c55
AX
14556 int flags __attribute__ ((unused));
14557 flags = ((1 << BIO_RW_FAILFAST_DEV) |
14558 (1 << BIO_RW_FAILFAST_TRANSPORT) |
14559 (1 << BIO_RW_FAILFAST_DRIVER));
ea04106b
AX
14560
14561 ;
14562 return 0;
14563}
14564
14565_ACEOF
14566
14567
14568
14569cat - <<_ACEOF >conftest.h
14570
14571_ACEOF
14572
14573
14574 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14575 echo "obj-m := conftest.o" >build/Makefile
14576 modpost_flag=''
14577 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14578 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14580 (eval $ac_try) 2>&5
14581 ac_status=$?
3d248aec
AX
14582 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14583 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14585 (eval $ac_try) 2>&5
14586 ac_status=$?
3d248aec
AX
14587 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14588 (exit $ac_status); }; }; then
ea04106b 14589
3d248aec 14590 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
14591$as_echo "yes" >&6; }
14592
3d248aec
AX
14593cat >>confdefs.h <<\_ACEOF
14594#define HAVE_BIO_RW_FAILFAST_DTD 1
14595_ACEOF
ea04106b
AX
14596
14597
14598else
14599 $as_echo "$as_me: failed program was:" >&5
14600sed 's/^/| /' conftest.$ac_ext >&5
14601
3d248aec 14602 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
14603$as_echo "no" >&6; }
14604
14605
14606
14607fi
3d248aec 14608
ea04106b
AX
14609 rm -Rf build
14610
14611
14612
14613
3d248aec 14614 { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5
68d83c55 14615$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
ea04106b
AX
14616
14617
14618cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14619/* confdefs.h. */
14620_ACEOF
14621cat confdefs.h >>conftest.$ac_ext
14622cat >>conftest.$ac_ext <<_ACEOF
14623/* end confdefs.h. */
ea04106b
AX
14624
14625
87dac73d 14626 #include <linux/bio.h>
ea04106b
AX
14627
14628int
14629main (void)
14630{
14631
68d83c55
AX
14632 int flags __attribute__ ((unused));
14633 flags = REQ_FAILFAST_MASK;
ea04106b
AX
14634
14635 ;
14636 return 0;
14637}
14638
14639_ACEOF
14640
14641
14642
14643cat - <<_ACEOF >conftest.h
14644
14645_ACEOF
14646
14647
14648 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14649 echo "obj-m := conftest.o" >build/Makefile
14650 modpost_flag=''
14651 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14652 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14654 (eval $ac_try) 2>&5
14655 ac_status=$?
3d248aec
AX
14656 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14657 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14659 (eval $ac_try) 2>&5
14660 ac_status=$?
3d248aec
AX
14661 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14662 (exit $ac_status); }; }; then
ea04106b 14663
3d248aec 14664 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
14665$as_echo "yes" >&6; }
14666
3d248aec
AX
14667cat >>confdefs.h <<\_ACEOF
14668#define HAVE_REQ_FAILFAST_MASK 1
14669_ACEOF
ea04106b
AX
14670
14671
14672else
14673 $as_echo "$as_me: failed program was:" >&5
14674sed 's/^/| /' conftest.$ac_ext >&5
14675
3d248aec 14676 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
14677$as_echo "no" >&6; }
14678
14679
14680
14681fi
3d248aec 14682
ea04106b
AX
14683 rm -Rf build
14684
14685
14686
ea04106b 14687
3d248aec 14688 { $as_echo "$as_me:$LINENO: checking whether REQ_OP_DISCARD is defined" >&5
68d83c55 14689$as_echo_n "checking whether REQ_OP_DISCARD is defined... " >&6; }
ea04106b
AX
14690
14691
14692cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14693/* confdefs.h. */
14694_ACEOF
14695cat confdefs.h >>conftest.$ac_ext
14696cat >>conftest.$ac_ext <<_ACEOF
14697/* end confdefs.h. */
ea04106b
AX
14698
14699
68d83c55 14700 #include <linux/blk_types.h>
ea04106b 14701
ea04106b
AX
14702int
14703main (void)
14704{
14705
68d83c55 14706 int op __attribute__ ((unused)) = REQ_OP_DISCARD;
ea04106b
AX
14707
14708 ;
14709 return 0;
14710}
14711
14712_ACEOF
14713
14714
14715
14716cat - <<_ACEOF >conftest.h
14717
14718_ACEOF
14719
14720
14721 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14722 echo "obj-m := conftest.o" >build/Makefile
14723 modpost_flag=''
14724 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14725 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14727 (eval $ac_try) 2>&5
14728 ac_status=$?
3d248aec
AX
14729 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14730 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14731 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14732 (eval $ac_try) 2>&5
14733 ac_status=$?
3d248aec
AX
14734 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14735 (exit $ac_status); }; }; then
ea04106b 14736
3d248aec 14737 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
14738$as_echo "yes" >&6; }
14739
3d248aec
AX
14740cat >>confdefs.h <<\_ACEOF
14741#define HAVE_REQ_OP_DISCARD 1
14742_ACEOF
e10b0808 14743
ea04106b
AX
14744
14745else
14746 $as_echo "$as_me: failed program was:" >&5
14747sed 's/^/| /' conftest.$ac_ext >&5
14748
3d248aec 14749 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 14750$as_echo "no" >&6; }
ea04106b
AX
14751
14752
14753
14754fi
3d248aec 14755
ea04106b
AX
14756 rm -Rf build
14757
14758
ea04106b
AX
14759
14760
3d248aec 14761 { $as_echo "$as_me:$LINENO: checking whether REQ_OP_SECURE_ERASE is defined" >&5
68d83c55 14762$as_echo_n "checking whether REQ_OP_SECURE_ERASE is defined... " >&6; }
ea04106b
AX
14763
14764
14765cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14766/* confdefs.h. */
14767_ACEOF
14768cat confdefs.h >>conftest.$ac_ext
14769cat >>conftest.$ac_ext <<_ACEOF
14770/* end confdefs.h. */
ea04106b
AX
14771
14772
68d83c55 14773 #include <linux/blk_types.h>
ea04106b
AX
14774
14775int
14776main (void)
14777{
14778
68d83c55 14779 int op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
ea04106b
AX
14780
14781 ;
14782 return 0;
14783}
14784
14785_ACEOF
14786
14787
14788
14789cat - <<_ACEOF >conftest.h
14790
14791_ACEOF
14792
14793
14794 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14795 echo "obj-m := conftest.o" >build/Makefile
14796 modpost_flag=''
14797 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14798 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14800 (eval $ac_try) 2>&5
14801 ac_status=$?
3d248aec
AX
14802 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14803 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
14805 (eval $ac_try) 2>&5
14806 ac_status=$?
3d248aec
AX
14807 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14808 (exit $ac_status); }; }; then
ea04106b 14809
3d248aec 14810 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
14811$as_echo "yes" >&6; }
14812
3d248aec
AX
14813cat >>confdefs.h <<\_ACEOF
14814#define HAVE_REQ_OP_SECURE_ERASE 1
14815_ACEOF
ea04106b
AX
14816
14817
14818else
14819 $as_echo "$as_me: failed program was:" >&5
14820sed 's/^/| /' conftest.$ac_ext >&5
14821
3d248aec 14822 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
14823$as_echo "no" >&6; }
14824
14825
14826
14827fi
3d248aec 14828
ea04106b
AX
14829 rm -Rf build
14830
14831
14832
ea04106b 14833
3d248aec 14834 { $as_echo "$as_me:$LINENO: checking whether REQ_OP_FLUSH is defined" >&5
68d83c55 14835$as_echo_n "checking whether REQ_OP_FLUSH is defined... " >&6; }
ea04106b 14836
ea04106b 14837
e10b0808 14838cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14839/* confdefs.h. */
14840_ACEOF
14841cat confdefs.h >>conftest.$ac_ext
14842cat >>conftest.$ac_ext <<_ACEOF
14843/* end confdefs.h. */
ea04106b 14844
ea04106b 14845
68d83c55 14846 #include <linux/blk_types.h>
ea04106b
AX
14847
14848int
14849main (void)
14850{
14851
68d83c55 14852 int op __attribute__ ((unused)) = REQ_OP_FLUSH;
87dac73d
AX
14853
14854 ;
14855 return 0;
14856}
14857
14858_ACEOF
14859
14860
14861
14862cat - <<_ACEOF >conftest.h
14863
14864_ACEOF
14865
14866
14867 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14868 echo "obj-m := conftest.o" >build/Makefile
14869 modpost_flag=''
14870 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14871 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
14873 (eval $ac_try) 2>&5
14874 ac_status=$?
3d248aec
AX
14875 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14876 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
14878 (eval $ac_try) 2>&5
14879 ac_status=$?
3d248aec
AX
14880 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14881 (exit $ac_status); }; }; then
87dac73d 14882
3d248aec 14883 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
14884$as_echo "yes" >&6; }
14885
3d248aec
AX
14886cat >>confdefs.h <<\_ACEOF
14887#define HAVE_REQ_OP_FLUSH 1
14888_ACEOF
87dac73d
AX
14889
14890
14891else
14892 $as_echo "$as_me: failed program was:" >&5
14893sed 's/^/| /' conftest.$ac_ext >&5
14894
3d248aec 14895 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
14896$as_echo "no" >&6; }
14897
14898
14899
14900fi
3d248aec 14901
87dac73d
AX
14902 rm -Rf build
14903
14904
14905
14906
3d248aec 14907 { $as_echo "$as_me:$LINENO: checking whether bio->bi_opf is defined" >&5
68d83c55 14908$as_echo_n "checking whether bio->bi_opf is defined... " >&6; }
87dac73d
AX
14909
14910
14911cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14912/* confdefs.h. */
14913_ACEOF
14914cat confdefs.h >>conftest.$ac_ext
14915cat >>conftest.$ac_ext <<_ACEOF
14916/* end confdefs.h. */
87dac73d
AX
14917
14918
68d83c55 14919 #include <linux/bio.h>
87dac73d
AX
14920
14921int
14922main (void)
14923{
14924
68d83c55
AX
14925 struct bio bio __attribute__ ((unused));
14926 bio.bi_opf = 0;
87dac73d
AX
14927
14928 ;
14929 return 0;
14930}
14931
14932_ACEOF
14933
14934
14935
14936cat - <<_ACEOF >conftest.h
14937
14938_ACEOF
14939
14940
14941 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
14942 echo "obj-m := conftest.o" >build/Makefile
14943 modpost_flag=''
14944 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
14945 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 14946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
14947 (eval $ac_try) 2>&5
14948 ac_status=$?
3d248aec
AX
14949 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14950 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
14951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
14952 (eval $ac_try) 2>&5
14953 ac_status=$?
3d248aec
AX
14954 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14955 (exit $ac_status); }; }; then
87dac73d 14956
3d248aec 14957 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
14958$as_echo "yes" >&6; }
14959
3d248aec
AX
14960cat >>confdefs.h <<\_ACEOF
14961#define HAVE_BIO_BI_OPF 1
14962_ACEOF
87dac73d
AX
14963
14964
68d83c55
AX
14965else
14966 $as_echo "$as_me: failed program was:" >&5
14967sed 's/^/| /' conftest.$ac_ext >&5
14968
3d248aec 14969 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
14970$as_echo "no" >&6; }
14971
14972
14973
14974fi
3d248aec 14975
68d83c55
AX
14976 rm -Rf build
14977
14978
14979
14980
3d248aec 14981 { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 1 arg" >&5
68d83c55 14982$as_echo_n "checking whether bio_end_io_t wants 1 arg... " >&6; }
87dac73d
AX
14983
14984
14985cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
14986/* confdefs.h. */
14987_ACEOF
14988cat confdefs.h >>conftest.$ac_ext
14989cat >>conftest.$ac_ext <<_ACEOF
14990/* end confdefs.h. */
87dac73d
AX
14991
14992
68d83c55 14993 #include <linux/bio.h>
87dac73d 14994
68d83c55
AX
14995 void wanted_end_io(struct bio *bio) { return; }
14996
14997 bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
87dac73d
AX
14998
14999int
15000main (void)
15001{
15002
87dac73d
AX
15003
15004 ;
15005 return 0;
15006}
15007
15008_ACEOF
15009
15010
15011
15012cat - <<_ACEOF >conftest.h
15013
15014_ACEOF
15015
15016
15017 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15018 echo "obj-m := conftest.o" >build/Makefile
15019 modpost_flag=''
15020 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15021 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15023 (eval $ac_try) 2>&5
15024 ac_status=$?
3d248aec
AX
15025 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15026 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15028 (eval $ac_try) 2>&5
15029 ac_status=$?
3d248aec
AX
15030 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15031 (exit $ac_status); }; }; then
87dac73d 15032
3d248aec 15033 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
15034$as_echo "yes" >&6; }
15035
3d248aec
AX
15036cat >>confdefs.h <<\_ACEOF
15037#define HAVE_1ARG_BIO_END_IO_T 1
15038_ACEOF
87dac73d
AX
15039
15040
15041else
15042 $as_echo "$as_me: failed program was:" >&5
15043sed 's/^/| /' conftest.$ac_ext >&5
15044
3d248aec 15045 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
15046$as_echo "no" >&6; }
15047
15048
15049
15050fi
3d248aec 15051
87dac73d
AX
15052 rm -Rf build
15053
15054
15055
87dac73d 15056
3d248aec 15057 { $as_echo "$as_me:$LINENO: checking whether BIO_RW_BARRIER is defined" >&5
68d83c55 15058$as_echo_n "checking whether BIO_RW_BARRIER is defined... " >&6; }
87dac73d 15059
87dac73d 15060
68d83c55 15061cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15062/* confdefs.h. */
15063_ACEOF
15064cat confdefs.h >>conftest.$ac_ext
15065cat >>conftest.$ac_ext <<_ACEOF
15066/* end confdefs.h. */
87dac73d 15067
87dac73d 15068
68d83c55 15069 #include <linux/bio.h>
87dac73d
AX
15070
15071int
15072main (void)
15073{
15074
68d83c55
AX
15075 int flags __attribute__ ((unused));
15076 flags = BIO_RW_BARRIER;
87dac73d
AX
15077
15078 ;
15079 return 0;
15080}
15081
15082_ACEOF
15083
15084
15085
15086cat - <<_ACEOF >conftest.h
15087
15088_ACEOF
15089
15090
15091 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15092 echo "obj-m := conftest.o" >build/Makefile
15093 modpost_flag=''
15094 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15095 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15097 (eval $ac_try) 2>&5
15098 ac_status=$?
3d248aec
AX
15099 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15102 (eval $ac_try) 2>&5
15103 ac_status=$?
3d248aec
AX
15104 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15105 (exit $ac_status); }; }; then
87dac73d 15106
3d248aec 15107 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
15108$as_echo "yes" >&6; }
15109
3d248aec
AX
15110cat >>confdefs.h <<\_ACEOF
15111#define HAVE_BIO_RW_BARRIER 1
15112_ACEOF
87dac73d
AX
15113
15114
68d83c55
AX
15115else
15116 $as_echo "$as_me: failed program was:" >&5
15117sed 's/^/| /' conftest.$ac_ext >&5
87dac73d 15118
3d248aec 15119 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 15120$as_echo "no" >&6; }
87dac73d 15121
87dac73d
AX
15122
15123
68d83c55 15124fi
3d248aec 15125
68d83c55 15126 rm -Rf build
87dac73d 15127
68d83c55
AX
15128
15129
15130
3d248aec 15131 { $as_echo "$as_me:$LINENO: checking whether BIO_RW_DISCARD is defined" >&5
68d83c55
AX
15132$as_echo_n "checking whether BIO_RW_DISCARD is defined... " >&6; }
15133
15134
15135cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15136/* confdefs.h. */
15137_ACEOF
15138cat confdefs.h >>conftest.$ac_ext
15139cat >>conftest.$ac_ext <<_ACEOF
15140/* end confdefs.h. */
68d83c55
AX
15141
15142
15143 #include <linux/bio.h>
87dac73d
AX
15144
15145int
15146main (void)
15147{
15148
68d83c55
AX
15149 int flags __attribute__ ((unused));
15150 flags = BIO_RW_DISCARD;
87dac73d
AX
15151
15152 ;
15153 return 0;
15154}
15155
15156_ACEOF
15157
15158
15159
15160cat - <<_ACEOF >conftest.h
15161
15162_ACEOF
15163
15164
15165 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15166 echo "obj-m := conftest.o" >build/Makefile
15167 modpost_flag=''
15168 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15169 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15171 (eval $ac_try) 2>&5
15172 ac_status=$?
3d248aec
AX
15173 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15174 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15176 (eval $ac_try) 2>&5
15177 ac_status=$?
3d248aec
AX
15178 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15179 (exit $ac_status); }; }; then
87dac73d 15180
3d248aec 15181 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
15182$as_echo "yes" >&6; }
15183
3d248aec
AX
15184cat >>confdefs.h <<\_ACEOF
15185#define HAVE_BIO_RW_DISCARD 1
15186_ACEOF
87dac73d
AX
15187
15188
15189else
15190 $as_echo "$as_me: failed program was:" >&5
15191sed 's/^/| /' conftest.$ac_ext >&5
15192
3d248aec 15193 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
15194$as_echo "no" >&6; }
15195
15196
15197
15198fi
3d248aec 15199
87dac73d
AX
15200 rm -Rf build
15201
15202
15203
87dac73d 15204
3d248aec 15205 { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5
68d83c55 15206$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
87dac73d
AX
15207 tmp_flags="$EXTRA_KCFLAGS"
15208 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
15209
15210
15211cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15212/* confdefs.h. */
15213_ACEOF
15214cat confdefs.h >>conftest.$ac_ext
15215cat >>conftest.$ac_ext <<_ACEOF
15216/* end confdefs.h. */
87dac73d
AX
15217
15218
15219 #include <linux/blkdev.h>
15220
15221int
15222main (void)
15223{
15224
15225 struct request_queue *q = NULL;
68d83c55 15226 (void) blk_queue_flush(q, REQ_FLUSH);
87dac73d
AX
15227
15228 ;
15229 return 0;
15230}
15231
15232_ACEOF
15233
15234
15235
15236cat - <<_ACEOF >conftest.h
15237
15238_ACEOF
15239
15240
15241 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15242 echo "obj-m := conftest.o" >build/Makefile
15243 modpost_flag=''
15244 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15245 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15247 (eval $ac_try) 2>&5
15248 ac_status=$?
3d248aec
AX
15249 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15250 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15252 (eval $ac_try) 2>&5
15253 ac_status=$?
3d248aec
AX
15254 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255 (exit $ac_status); }; }; then
87dac73d 15256
3d248aec 15257 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
15258$as_echo "yes" >&6; }
15259
3d248aec
AX
15260cat >>confdefs.h <<\_ACEOF
15261#define HAVE_BLK_QUEUE_FLUSH 1
15262_ACEOF
68d83c55
AX
15263
15264
3d248aec 15265 { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5
68d83c55
AX
15266$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
15267
15268
15269cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15270/* confdefs.h. */
15271_ACEOF
15272cat confdefs.h >>conftest.$ac_ext
15273cat >>conftest.$ac_ext <<_ACEOF
15274/* end confdefs.h. */
68d83c55
AX
15275
15276
15277 #include <linux/module.h>
15278 #include <linux/blkdev.h>
15279
15280 MODULE_LICENSE("$ZFS_META_LICENSE");
15281
15282int
15283main (void)
15284{
15285
15286 struct request_queue *q = NULL;
15287 (void) blk_queue_flush(q, REQ_FLUSH);
15288
15289 ;
15290 return 0;
15291}
15292
15293_ACEOF
15294
15295
15296
15297cat - <<_ACEOF >conftest.h
15298
15299_ACEOF
15300
15301
15302 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15303 echo "obj-m := conftest.o" >build/Makefile
15304 modpost_flag=''
15305 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15306 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
15308 (eval $ac_try) 2>&5
15309 ac_status=$?
3d248aec
AX
15310 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15312 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
15313 (eval $ac_try) 2>&5
15314 ac_status=$?
3d248aec
AX
15315 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15316 (exit $ac_status); }; }; then
68d83c55 15317
3d248aec 15318 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
15319$as_echo "no" >&6; }
15320
15321else
15322 $as_echo "$as_me: failed program was:" >&5
15323sed 's/^/| /' conftest.$ac_ext >&5
15324
3d248aec 15325 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
15326$as_echo "yes" >&6; }
15327
3d248aec
AX
15328cat >>confdefs.h <<\_ACEOF
15329#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1
15330_ACEOF
68d83c55
AX
15331
15332
15333
15334
15335fi
3d248aec 15336
68d83c55
AX
15337 rm -Rf build
15338
87dac73d
AX
15339
15340
15341else
15342 $as_echo "$as_me: failed program was:" >&5
15343sed 's/^/| /' conftest.$ac_ext >&5
15344
3d248aec 15345 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
15346$as_echo "no" >&6; }
15347
15348
15349
15350fi
3d248aec 15351
87dac73d
AX
15352 rm -Rf build
15353
15354
87dac73d 15355
3d248aec 15356 { $as_echo "$as_me:$LINENO: checking whether blk_queue_write_cache() exists" >&5
68d83c55 15357$as_echo_n "checking whether blk_queue_write_cache() exists... " >&6; }
87dac73d
AX
15358
15359
15360cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15361/* confdefs.h. */
15362_ACEOF
15363cat confdefs.h >>conftest.$ac_ext
15364cat >>conftest.$ac_ext <<_ACEOF
15365/* end confdefs.h. */
87dac73d
AX
15366
15367
68d83c55 15368 #include <linux/kernel.h>
87dac73d
AX
15369 #include <linux/blkdev.h>
15370
68d83c55 15371
87dac73d
AX
15372int
15373main (void)
15374{
15375
15376 struct request_queue *q = NULL;
68d83c55 15377 blk_queue_write_cache(q, true, true);
87dac73d
AX
15378
15379 ;
15380 return 0;
15381}
15382
15383_ACEOF
15384
15385
15386
15387cat - <<_ACEOF >conftest.h
15388
15389_ACEOF
15390
15391
15392 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15393 echo "obj-m := conftest.o" >build/Makefile
15394 modpost_flag=''
15395 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15396 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15398 (eval $ac_try) 2>&5
15399 ac_status=$?
3d248aec
AX
15400 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15401 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15403 (eval $ac_try) 2>&5
15404 ac_status=$?
3d248aec
AX
15405 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15406 (exit $ac_status); }; }; then
87dac73d 15407
3d248aec 15408 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
15409$as_echo "yes" >&6; }
15410
3d248aec
AX
15411cat >>confdefs.h <<\_ACEOF
15412#define HAVE_BLK_QUEUE_WRITE_CACHE 1
15413_ACEOF
87dac73d
AX
15414
15415
3d248aec 15416 { $as_echo "$as_me:$LINENO: checking whether blk_queue_write_cache() is GPL-only" >&5
68d83c55 15417$as_echo_n "checking whether blk_queue_write_cache() is GPL-only... " >&6; }
87dac73d
AX
15418
15419
15420cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15421/* confdefs.h. */
15422_ACEOF
15423cat confdefs.h >>conftest.$ac_ext
15424cat >>conftest.$ac_ext <<_ACEOF
15425/* end confdefs.h. */
87dac73d
AX
15426
15427
68d83c55
AX
15428 #include <linux/kernel.h>
15429 #include <linux/module.h>
15430 #include <linux/blkdev.h>
15431
15432 MODULE_LICENSE("$ZFS_META_LICENSE");
87dac73d
AX
15433
15434int
15435main (void)
15436{
15437
68d83c55
AX
15438 struct request_queue *q = NULL;
15439 blk_queue_write_cache(q, true, true);
87dac73d
AX
15440
15441 ;
15442 return 0;
15443}
15444
15445_ACEOF
15446
15447
15448
15449cat - <<_ACEOF >conftest.h
15450
15451_ACEOF
15452
15453
15454 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15455 echo "obj-m := conftest.o" >build/Makefile
15456 modpost_flag=''
15457 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15458 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15460 (eval $ac_try) 2>&5
15461 ac_status=$?
3d248aec
AX
15462 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15463 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
15465 (eval $ac_try) 2>&5
15466 ac_status=$?
3d248aec
AX
15467 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15468 (exit $ac_status); }; }; then
87dac73d 15469
3d248aec 15470 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
15471$as_echo "no" >&6; }
15472
15473else
15474 $as_echo "$as_me: failed program was:" >&5
15475sed 's/^/| /' conftest.$ac_ext >&5
15476
3d248aec 15477 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
15478$as_echo "yes" >&6; }
15479
3d248aec
AX
15480cat >>confdefs.h <<\_ACEOF
15481#define HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY 1
15482_ACEOF
68d83c55
AX
15483
15484
15485
15486
15487fi
3d248aec 15488
68d83c55
AX
15489 rm -Rf build
15490
87dac73d
AX
15491
15492
15493else
15494 $as_echo "$as_me: failed program was:" >&5
15495sed 's/^/| /' conftest.$ac_ext >&5
15496
3d248aec 15497 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
15498$as_echo "no" >&6; }
15499
15500
15501
15502fi
3d248aec 15503
87dac73d
AX
15504 rm -Rf build
15505
15506
68d83c55 15507
87dac73d
AX
15508 EXTRA_KCFLAGS="$tmp_flags"
15509
87dac73d 15510
3d248aec 15511 { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5
68d83c55
AX
15512$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
15513 tmp_flags="$EXTRA_KCFLAGS"
15514 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
87dac73d
AX
15515
15516
15517cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15518/* confdefs.h. */
15519_ACEOF
15520cat confdefs.h >>conftest.$ac_ext
15521cat >>conftest.$ac_ext <<_ACEOF
15522/* end confdefs.h. */
87dac73d
AX
15523
15524
68d83c55 15525 #include <linux/blkdev.h>
87dac73d
AX
15526
15527int
15528main (void)
15529{
15530
68d83c55
AX
15531 struct request_queue *q = NULL;
15532 (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
ea04106b
AX
15533
15534 ;
15535 return 0;
15536}
15537
15538_ACEOF
15539
15540
15541
15542cat - <<_ACEOF >conftest.h
15543
15544_ACEOF
15545
15546
15547 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15548 echo "obj-m := conftest.o" >build/Makefile
15549 modpost_flag=''
15550 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15551 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
15553 (eval $ac_try) 2>&5
15554 ac_status=$?
3d248aec
AX
15555 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15556 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
15558 (eval $ac_try) 2>&5
15559 ac_status=$?
3d248aec
AX
15560 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15561 (exit $ac_status); }; }; then
e10b0808 15562
3d248aec 15563 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 15564$as_echo "yes" >&6; }
ea04106b 15565
3d248aec
AX
15566cat >>confdefs.h <<\_ACEOF
15567#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1
15568_ACEOF
ea04106b 15569
ea04106b 15570
68d83c55
AX
15571else
15572 $as_echo "$as_me: failed program was:" >&5
15573sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 15574
3d248aec 15575 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 15576$as_echo "no" >&6; }
ea04106b
AX
15577
15578
ea04106b 15579
68d83c55 15580fi
3d248aec 15581
68d83c55 15582 rm -Rf build
ea04106b 15583
ea04106b 15584
68d83c55 15585 EXTRA_KCFLAGS="$tmp_flags"
ea04106b 15586
e10b0808 15587
3d248aec 15588 { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5
68d83c55
AX
15589$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
15590 tmp_flags="$EXTRA_KCFLAGS"
15591 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
15592
15593
15594cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15595/* confdefs.h. */
15596_ACEOF
15597cat confdefs.h >>conftest.$ac_ext
15598cat >>conftest.$ac_ext <<_ACEOF
15599/* end confdefs.h. */
ea04106b
AX
15600
15601
15602 #include <linux/blkdev.h>
15603
15604int
15605main (void)
15606{
15607
68d83c55
AX
15608 struct request_queue *q = NULL;
15609 (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
ea04106b
AX
15610
15611 ;
15612 return 0;
15613}
15614
15615_ACEOF
15616
15617
15618
15619cat - <<_ACEOF >conftest.h
15620
15621_ACEOF
15622
15623
15624 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15625 echo "obj-m := conftest.o" >build/Makefile
15626 modpost_flag=''
15627 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15628 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
15630 (eval $ac_try) 2>&5
15631 ac_status=$?
3d248aec
AX
15632 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15633 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
15635 (eval $ac_try) 2>&5
15636 ac_status=$?
3d248aec
AX
15637 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15638 (exit $ac_status); }; }; then
ea04106b 15639
3d248aec 15640 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
15641$as_echo "yes" >&6; }
15642
3d248aec
AX
15643cat >>confdefs.h <<\_ACEOF
15644#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1
15645_ACEOF
ea04106b
AX
15646
15647
15648else
15649 $as_echo "$as_me: failed program was:" >&5
15650sed 's/^/| /' conftest.$ac_ext >&5
15651
3d248aec 15652 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
15653$as_echo "no" >&6; }
15654
15655
15656
15657fi
3d248aec 15658
ea04106b
AX
15659 rm -Rf build
15660
15661
68d83c55 15662 EXTRA_KCFLAGS="$tmp_flags"
ea04106b 15663
4d815aed 15664
3d248aec 15665 { $as_echo "$as_me:$LINENO: checking whether the BIO_RW_UNPLUG enum is available" >&5
68d83c55
AX
15666$as_echo_n "checking whether the BIO_RW_UNPLUG enum is available... " >&6; }
15667 tmp_flags="$EXTRA_KCFLAGS"
15668 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
15669
15670
15671cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15672/* confdefs.h. */
15673_ACEOF
15674cat confdefs.h >>conftest.$ac_ext
15675cat >>conftest.$ac_ext <<_ACEOF
15676/* end confdefs.h. */
ea04106b
AX
15677
15678
68d83c55 15679 #include <linux/blkdev.h>
ea04106b
AX
15680
15681int
15682main (void)
15683{
15684
68d83c55
AX
15685 extern enum bio_rw_flags rw;
15686
15687 rw = BIO_RW_UNPLUG;
ea04106b
AX
15688
15689 ;
15690 return 0;
15691}
15692
15693_ACEOF
15694
15695
15696
15697cat - <<_ACEOF >conftest.h
15698
15699_ACEOF
15700
15701
15702 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15703 echo "obj-m := conftest.o" >build/Makefile
15704 modpost_flag=''
15705 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15706 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
15708 (eval $ac_try) 2>&5
15709 ac_status=$?
3d248aec
AX
15710 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15711 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
15713 (eval $ac_try) 2>&5
15714 ac_status=$?
3d248aec
AX
15715 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15716 (exit $ac_status); }; }; then
ea04106b 15717
3d248aec 15718 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
15719$as_echo "yes" >&6; }
15720
3d248aec
AX
15721cat >>confdefs.h <<\_ACEOF
15722#define HAVE_BLK_QUEUE_HAVE_BIO_RW_UNPLUG 1
15723_ACEOF
ea04106b
AX
15724
15725
15726else
15727 $as_echo "$as_me: failed program was:" >&5
15728sed 's/^/| /' conftest.$ac_ext >&5
15729
3d248aec 15730 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
15731$as_echo "no" >&6; }
15732
15733
15734
5eacc075 15735fi
3d248aec 15736
5eacc075
AX
15737 rm -Rf build
15738
15739
68d83c55 15740 EXTRA_KCFLAGS="$tmp_flags"
5eacc075
AX
15741
15742
3d248aec 15743 { $as_echo "$as_me:$LINENO: checking whether struct blk_plug is available" >&5
68d83c55
AX
15744$as_echo_n "checking whether struct blk_plug is available... " >&6; }
15745 tmp_flags="$EXTRA_KCFLAGS"
15746 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
5eacc075
AX
15747
15748
15749cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15750/* confdefs.h. */
15751_ACEOF
15752cat confdefs.h >>conftest.$ac_ext
15753cat >>conftest.$ac_ext <<_ACEOF
15754/* end confdefs.h. */
5eacc075
AX
15755
15756
68d83c55 15757 #include <linux/blkdev.h>
5eacc075
AX
15758
15759int
15760main (void)
15761{
15762
68d83c55
AX
15763 struct blk_plug plug;
15764
15765 blk_start_plug(&plug);
15766 blk_finish_plug(&plug);
5eacc075
AX
15767
15768 ;
15769 return 0;
15770}
15771
15772_ACEOF
15773
15774
15775
15776cat - <<_ACEOF >conftest.h
15777
15778_ACEOF
15779
15780
15781 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15782 echo "obj-m := conftest.o" >build/Makefile
15783 modpost_flag=''
15784 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15785 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15786 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5eacc075
AX
15787 (eval $ac_try) 2>&5
15788 ac_status=$?
3d248aec
AX
15789 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15790 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5eacc075
AX
15792 (eval $ac_try) 2>&5
15793 ac_status=$?
3d248aec
AX
15794 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15795 (exit $ac_status); }; }; then
5eacc075 15796
3d248aec 15797 { $as_echo "$as_me:$LINENO: result: yes" >&5
5eacc075
AX
15798$as_echo "yes" >&6; }
15799
3d248aec
AX
15800cat >>confdefs.h <<\_ACEOF
15801#define HAVE_BLK_QUEUE_HAVE_BLK_PLUG 1
15802_ACEOF
5eacc075
AX
15803
15804
15805else
15806 $as_echo "$as_me: failed program was:" >&5
15807sed 's/^/| /' conftest.$ac_ext >&5
15808
3d248aec 15809 { $as_echo "$as_me:$LINENO: result: no" >&5
5eacc075
AX
15810$as_echo "no" >&6; }
15811
15812
15813
ea04106b 15814fi
3d248aec 15815
ea04106b
AX
15816 rm -Rf build
15817
15818
68d83c55 15819 EXTRA_KCFLAGS="$tmp_flags"
ea04106b
AX
15820
15821
3d248aec 15822 { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5
68d83c55
AX
15823$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
15824 tmp_flags="$EXTRA_KCFLAGS"
15825 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
15826
15827
15828cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15829/* confdefs.h. */
15830_ACEOF
15831cat confdefs.h >>conftest.$ac_ext
15832cat >>conftest.$ac_ext <<_ACEOF
15833/* end confdefs.h. */
ea04106b
AX
15834
15835
68d83c55 15836 #include <linux/blkdev.h>
ea04106b
AX
15837
15838int
15839main (void)
15840{
15841
68d83c55
AX
15842 struct gendisk *disk = NULL;
15843 (void) get_disk_ro(disk);
ea04106b
AX
15844
15845 ;
15846 return 0;
15847}
15848
15849_ACEOF
15850
15851
15852
15853cat - <<_ACEOF >conftest.h
15854
15855_ACEOF
15856
15857
15858 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15859 echo "obj-m := conftest.o" >build/Makefile
15860 modpost_flag=''
15861 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15862 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
15864 (eval $ac_try) 2>&5
15865 ac_status=$?
3d248aec
AX
15866 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15867 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
15869 (eval $ac_try) 2>&5
15870 ac_status=$?
3d248aec
AX
15871 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15872 (exit $ac_status); }; }; then
ea04106b 15873
3d248aec 15874 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
15875$as_echo "yes" >&6; }
15876
3d248aec
AX
15877cat >>confdefs.h <<\_ACEOF
15878#define HAVE_GET_DISK_RO 1
15879_ACEOF
ea04106b
AX
15880
15881
15882else
15883 $as_echo "$as_me: failed program was:" >&5
15884sed 's/^/| /' conftest.$ac_ext >&5
15885
3d248aec 15886 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 15887$as_echo "no" >&6; }
94a40997
AX
15888
15889
94a40997 15890
68d83c55 15891fi
3d248aec 15892
68d83c55
AX
15893 rm -Rf build
15894
15895
15896 EXTRA_KCFLAGS="$tmp_flags"
15897
3d248aec 15898 { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5
68d83c55 15899$as_echo_n "checking whether get_gendisk() is available... " >&6; }
94a40997 15900
94a40997 15901
68d83c55
AX
15902
15903cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
15904/* confdefs.h. */
15905_ACEOF
15906cat confdefs.h >>conftest.$ac_ext
15907cat >>conftest.$ac_ext <<_ACEOF
15908/* end confdefs.h. */
68d83c55
AX
15909
15910
15911 #include <linux/genhd.h>
94a40997
AX
15912
15913int
15914main (void)
15915{
15916
68d83c55 15917 get_gendisk(0, NULL);
94a40997
AX
15918
15919 ;
15920 return 0;
15921}
15922
15923_ACEOF
15924
15925
15926
15927cat - <<_ACEOF >conftest.h
15928
15929_ACEOF
15930
15931
15932 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
15933 echo "obj-m := conftest.o" >build/Makefile
15934 modpost_flag=''
15935 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
15936 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 15937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
15938 (eval $ac_try) 2>&5
15939 ac_status=$?
3d248aec
AX
15940 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15941 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
15942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
15943 (eval $ac_try) 2>&5
15944 ac_status=$?
3d248aec
AX
15945 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15946 (exit $ac_status); }; }; then
68d83c55
AX
15947 rc=0
15948else
15949 $as_echo "$as_me: failed program was:" >&5
15950sed 's/^/| /' conftest.$ac_ext >&5
15951 rc=1
94a40997 15952
87dac73d 15953
68d83c55 15954fi
3d248aec 15955
68d83c55 15956 rm -Rf build
87dac73d
AX
15957
15958
68d83c55 15959 if test $rc -ne 0; then :
87dac73d 15960
3d248aec 15961 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d 15962$as_echo "no" >&6; }
87dac73d 15963
68d83c55
AX
15964 else
15965 if test "x$enable_linux_builtin" != xyes; then
87dac73d 15966
68d83c55
AX
15967 grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
15968 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
15969 rc=$?
15970 if test $rc -ne 0; then
15971 export=0
15972 for file in block/genhd.c; do
15973 grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
15974 "$LINUX/$file" 2>/dev/null
15975 rc=$?
15976 if test $rc -eq 0; then
15977 export=1
15978 break;
15979 fi
15980 done
15981 if test $export -eq 0; then :
15982 rc=1
15983 else :
15984 rc=0
15985 fi
15986 else :
15987 rc=0
15988 fi
87dac73d 15989
68d83c55
AX
15990 fi
15991 if test $rc -ne 0; then :
87dac73d 15992
3d248aec 15993 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
15994$as_echo "no" >&6; }
15995
15996 else :
15997
3d248aec 15998 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
15999$as_echo "yes" >&6; }
16000
3d248aec
AX
16001cat >>confdefs.h <<\_ACEOF
16002#define HAVE_GET_GENDISK 1
16003_ACEOF
68d83c55
AX
16004
16005
16006 fi
16007 fi
87dac73d 16008
68d83c55
AX
16009
16010
3d248aec 16011 { $as_echo "$as_me:$LINENO: checking whether bio_set_op_attrs is available" >&5
68d83c55
AX
16012$as_echo_n "checking whether bio_set_op_attrs is available... " >&6; }
16013
16014
16015cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
68d83c55
AX
16021
16022
3d248aec 16023 #include <linux/bio.h>
87dac73d
AX
16024
16025int
16026main (void)
16027{
16028
68d83c55
AX
16029 struct bio *bio __attribute__ ((unused)) = NULL;
16030
16031 bio_set_op_attrs(bio, 0, 0);
87dac73d
AX
16032
16033 ;
16034 return 0;
16035}
16036
16037_ACEOF
16038
16039
16040
16041cat - <<_ACEOF >conftest.h
16042
16043_ACEOF
16044
16045
16046 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16047 echo "obj-m := conftest.o" >build/Makefile
16048 modpost_flag=''
16049 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16050 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
16052 (eval $ac_try) 2>&5
16053 ac_status=$?
3d248aec
AX
16054 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16055 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
16057 (eval $ac_try) 2>&5
16058 ac_status=$?
3d248aec
AX
16059 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16060 (exit $ac_status); }; }; then
87dac73d 16061
3d248aec 16062 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
16063$as_echo "yes" >&6; }
16064
3d248aec
AX
16065cat >>confdefs.h <<\_ACEOF
16066#define HAVE_BIO_SET_OP_ATTRS 1
16067_ACEOF
87dac73d
AX
16068
16069
16070else
16071 $as_echo "$as_me: failed program was:" >&5
16072sed 's/^/| /' conftest.$ac_ext >&5
16073
3d248aec 16074 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d 16075$as_echo "no" >&6; }
87dac73d
AX
16076
16077
68d83c55
AX
16078
16079fi
3d248aec 16080
68d83c55 16081 rm -Rf build
87dac73d
AX
16082
16083
87dac73d 16084
68d83c55 16085
3d248aec 16086 { $as_echo "$as_me:$LINENO: checking whether generic_readlink is global" >&5
68d83c55
AX
16087$as_echo_n "checking whether generic_readlink is global... " >&6; }
16088
16089
16090cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16091/* confdefs.h. */
16092_ACEOF
16093cat confdefs.h >>conftest.$ac_ext
16094cat >>conftest.$ac_ext <<_ACEOF
16095/* end confdefs.h. */
68d83c55
AX
16096
16097
16098 #include <linux/fs.h>
87dac73d
AX
16099
16100int
16101main (void)
16102{
16103
68d83c55
AX
16104 int i __attribute__ ((unused));
16105
16106 i = generic_readlink(NULL, NULL, 0);
87dac73d
AX
16107
16108 ;
16109 return 0;
16110}
16111
16112_ACEOF
16113
16114
16115
16116cat - <<_ACEOF >conftest.h
16117
16118_ACEOF
16119
16120
16121 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16122 echo "obj-m := conftest.o" >build/Makefile
16123 modpost_flag=''
16124 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16125 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
16127 (eval $ac_try) 2>&5
16128 ac_status=$?
3d248aec
AX
16129 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16130 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
16132 (eval $ac_try) 2>&5
16133 ac_status=$?
3d248aec
AX
16134 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16135 (exit $ac_status); }; }; then
87dac73d 16136
3d248aec 16137 { $as_echo "$as_me:$LINENO: result: yes" >&5
94a40997
AX
16138$as_echo "yes" >&6; }
16139
3d248aec
AX
16140cat >>confdefs.h <<\_ACEOF
16141#define HAVE_GENERIC_READLINK 1
16142_ACEOF
94a40997
AX
16143
16144
16145else
16146 $as_echo "$as_me: failed program was:" >&5
16147sed 's/^/| /' conftest.$ac_ext >&5
16148
3d248aec 16149 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 16150$as_echo "no" >&6; }
87dac73d
AX
16151
16152
16153
16154fi
3d248aec 16155
87dac73d
AX
16156 rm -Rf build
16157
16158
16159
16160
3d248aec 16161 { $as_echo "$as_me:$LINENO: checking whether ql->discard_granularity is available" >&5
68d83c55 16162$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
4d815aed
AX
16163
16164
16165cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16166/* confdefs.h. */
16167_ACEOF
16168cat confdefs.h >>conftest.$ac_ext
16169cat >>conftest.$ac_ext <<_ACEOF
16170/* end confdefs.h. */
4d815aed
AX
16171
16172
68d83c55 16173 #include <linux/blkdev.h>
4d815aed
AX
16174
16175int
16176main (void)
16177{
16178
68d83c55
AX
16179 struct queue_limits ql __attribute__ ((unused));
16180
16181 ql.discard_granularity = 0;
4d815aed
AX
16182
16183 ;
16184 return 0;
16185}
16186
16187_ACEOF
16188
16189
16190
16191cat - <<_ACEOF >conftest.h
16192
16193_ACEOF
16194
16195
16196 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16197 echo "obj-m := conftest.o" >build/Makefile
16198 modpost_flag=''
16199 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16200 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
16202 (eval $ac_try) 2>&5
16203 ac_status=$?
3d248aec
AX
16204 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16205 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
16207 (eval $ac_try) 2>&5
16208 ac_status=$?
3d248aec
AX
16209 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16210 (exit $ac_status); }; }; then
4d815aed 16211
3d248aec 16212 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
16213$as_echo "yes" >&6; }
16214
3d248aec
AX
16215cat >>confdefs.h <<\_ACEOF
16216#define HAVE_DISCARD_GRANULARITY 1
16217_ACEOF
4d815aed
AX
16218
16219
16220else
16221 $as_echo "$as_me: failed program was:" >&5
16222sed 's/^/| /' conftest.$ac_ext >&5
16223
3d248aec 16224 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 16225$as_echo "no" >&6; }
ea04106b 16226
ea04106b 16227
ea04106b 16228
68d83c55 16229fi
3d248aec 16230
68d83c55 16231 rm -Rf build
ea04106b 16232
ea04106b 16233
ea04106b 16234
ea04106b 16235
3d248aec 16236 { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_handler" >&5
68d83c55 16237$as_echo_n "checking whether super_block uses const struct xattr_handler... " >&6; }
ea04106b 16238
ea04106b 16239
68d83c55 16240cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16241/* confdefs.h. */
16242_ACEOF
16243cat confdefs.h >>conftest.$ac_ext
16244cat >>conftest.$ac_ext <<_ACEOF
16245/* end confdefs.h. */
94a40997
AX
16246
16247
68d83c55
AX
16248 #include <linux/fs.h>
16249 #include <linux/xattr.h>
94a40997 16250
68d83c55
AX
16251 const struct xattr_handler xattr_test_handler = {
16252 .prefix = "test",
16253 .get = NULL,
16254 .set = NULL,
16255 };
94a40997 16256
68d83c55
AX
16257 const struct xattr_handler *xattr_handlers[] = {
16258 &xattr_test_handler,
16259 };
94a40997 16260
68d83c55
AX
16261 const struct super_block sb __attribute__ ((unused)) = {
16262 .s_xattr = xattr_handlers,
16263 };
94a40997
AX
16264
16265int
16266main (void)
16267{
16268
16269
16270 ;
16271 return 0;
16272}
16273
16274_ACEOF
16275
16276
16277
16278cat - <<_ACEOF >conftest.h
16279
16280_ACEOF
16281
16282
16283 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16284 echo "obj-m := conftest.o" >build/Makefile
16285 modpost_flag=''
16286 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16287 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
16289 (eval $ac_try) 2>&5
16290 ac_status=$?
3d248aec
AX
16291 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16292 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
16294 (eval $ac_try) 2>&5
16295 ac_status=$?
3d248aec
AX
16296 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16297 (exit $ac_status); }; }; then
94a40997 16298
3d248aec 16299 { $as_echo "$as_me:$LINENO: result: yes" >&5
94a40997
AX
16300$as_echo "yes" >&6; }
16301
3d248aec
AX
16302cat >>confdefs.h <<\_ACEOF
16303#define HAVE_CONST_XATTR_HANDLER 1
16304_ACEOF
94a40997
AX
16305
16306
16307else
16308 $as_echo "$as_me: failed program was:" >&5
16309sed 's/^/| /' conftest.$ac_ext >&5
16310
3d248aec 16311 { $as_echo "$as_me:$LINENO: result: no" >&5
94a40997 16312$as_echo "no" >&6; }
68d83c55
AX
16313
16314
16315
16316fi
3d248aec 16317
68d83c55
AX
16318 rm -Rf build
16319
16320
16321
16322
3d248aec 16323 { $as_echo "$as_me:$LINENO: checking whether xattr_handler has name" >&5
68d83c55 16324$as_echo_n "checking whether xattr_handler has name... " >&6; }
4d815aed
AX
16325
16326
16327cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16328/* confdefs.h. */
16329_ACEOF
16330cat confdefs.h >>conftest.$ac_ext
16331cat >>conftest.$ac_ext <<_ACEOF
16332/* end confdefs.h. */
4d815aed
AX
16333
16334
68d83c55 16335 #include <linux/xattr.h>
4d815aed 16336
68d83c55
AX
16337 static const struct xattr_handler
16338 xops __attribute__ ((unused)) = {
16339 .name = XATTR_NAME_POSIX_ACL_ACCESS,
16340 };
4d815aed
AX
16341
16342int
16343main (void)
16344{
16345
16346
16347 ;
16348 return 0;
16349}
16350
16351_ACEOF
16352
16353
16354
16355cat - <<_ACEOF >conftest.h
16356
16357_ACEOF
16358
16359
16360 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16361 echo "obj-m := conftest.o" >build/Makefile
16362 modpost_flag=''
16363 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16364 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
16366 (eval $ac_try) 2>&5
16367 ac_status=$?
3d248aec
AX
16368 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16369 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
16371 (eval $ac_try) 2>&5
16372 ac_status=$?
3d248aec
AX
16373 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16374 (exit $ac_status); }; }; then
4d815aed 16375
3d248aec 16376 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
16377$as_echo "yes" >&6; }
16378
3d248aec
AX
16379cat >>confdefs.h <<\_ACEOF
16380#define HAVE_XATTR_HANDLER_NAME 1
16381_ACEOF
4d815aed
AX
16382
16383
16384else
16385 $as_echo "$as_me: failed program was:" >&5
16386sed 's/^/| /' conftest.$ac_ext >&5
16387
3d248aec 16388 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 16389$as_echo "no" >&6; }
ea04106b
AX
16390
16391
4d815aed
AX
16392
16393fi
3d248aec 16394
4d815aed
AX
16395 rm -Rf build
16396
16397
16398
16399
3d248aec 16400 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants both dentry and inode" >&5
68d83c55 16401$as_echo_n "checking whether xattr_handler->get() wants both dentry and inode... " >&6; }
ea04106b
AX
16402
16403
16404cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16405/* confdefs.h. */
16406_ACEOF
16407cat confdefs.h >>conftest.$ac_ext
16408cat >>conftest.$ac_ext <<_ACEOF
16409/* end confdefs.h. */
ea04106b
AX
16410
16411
e10b0808
AX
16412 #include <linux/xattr.h>
16413
68d83c55
AX
16414 int get(const struct xattr_handler *handler,
16415 struct dentry *dentry, struct inode *inode,
16416 const char *name, void *buffer, size_t size) { return 0; }
e10b0808
AX
16417 static const struct xattr_handler
16418 xops __attribute__ ((unused)) = {
68d83c55 16419 .get = get,
e10b0808 16420 };
ea04106b
AX
16421
16422int
16423main (void)
16424{
16425
ea04106b
AX
16426
16427 ;
16428 return 0;
16429}
16430
16431_ACEOF
16432
16433
16434
16435cat - <<_ACEOF >conftest.h
16436
16437_ACEOF
16438
16439
16440 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16441 echo "obj-m := conftest.o" >build/Makefile
16442 modpost_flag=''
16443 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16444 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16446 (eval $ac_try) 2>&5
16447 ac_status=$?
3d248aec
AX
16448 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16449 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16451 (eval $ac_try) 2>&5
16452 ac_status=$?
3d248aec
AX
16453 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16454 (exit $ac_status); }; }; then
ea04106b 16455
3d248aec 16456 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
16457$as_echo "yes" >&6; }
16458
3d248aec
AX
16459cat >>confdefs.h <<\_ACEOF
16460#define HAVE_XATTR_GET_DENTRY_INODE 1
16461_ACEOF
ea04106b
AX
16462
16463
16464else
16465 $as_echo "$as_me: failed program was:" >&5
16466sed 's/^/| /' conftest.$ac_ext >&5
16467
3d248aec 16468 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants xattr_handler" >&5
68d83c55 16469$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
94a40997
AX
16470
16471
16472cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16473/* confdefs.h. */
16474_ACEOF
16475cat confdefs.h >>conftest.$ac_ext
16476cat >>conftest.$ac_ext <<_ACEOF
16477/* end confdefs.h. */
94a40997
AX
16478
16479
16480 #include <linux/xattr.h>
16481
68d83c55
AX
16482 int get(const struct xattr_handler *handler,
16483 struct dentry *dentry, const char *name,
16484 void *buffer, size_t size) { return 0; }
94a40997
AX
16485 static const struct xattr_handler
16486 xops __attribute__ ((unused)) = {
68d83c55 16487 .get = get,
94a40997
AX
16488 };
16489
16490int
16491main (void)
16492{
16493
16494
16495 ;
16496 return 0;
16497}
16498
16499_ACEOF
16500
16501
16502
16503cat - <<_ACEOF >conftest.h
16504
16505_ACEOF
16506
16507
16508 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16509 echo "obj-m := conftest.o" >build/Makefile
16510 modpost_flag=''
16511 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16512 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
16514 (eval $ac_try) 2>&5
16515 ac_status=$?
3d248aec
AX
16516 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16517 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
16519 (eval $ac_try) 2>&5
16520 ac_status=$?
3d248aec
AX
16521 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16522 (exit $ac_status); }; }; then
94a40997 16523
3d248aec 16524 { $as_echo "$as_me:$LINENO: result: yes" >&5
94a40997
AX
16525$as_echo "yes" >&6; }
16526
3d248aec
AX
16527cat >>confdefs.h <<\_ACEOF
16528#define HAVE_XATTR_GET_HANDLER 1
16529_ACEOF
94a40997
AX
16530
16531
16532else
16533 $as_echo "$as_me: failed program was:" >&5
16534sed 's/^/| /' conftest.$ac_ext >&5
16535
3d248aec 16536 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 16537$as_echo "no" >&6; }
3d248aec 16538 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5
68d83c55 16539$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
4d815aed
AX
16540
16541
16542cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16543/* confdefs.h. */
16544_ACEOF
16545cat confdefs.h >>conftest.$ac_ext
16546cat >>conftest.$ac_ext <<_ACEOF
16547/* end confdefs.h. */
4d815aed
AX
16548
16549
16550 #include <linux/xattr.h>
16551
68d83c55
AX
16552 int get(struct dentry *dentry, const char *name,
16553 void *buffer, size_t size, int handler_flags)
16554 { return 0; }
4d815aed
AX
16555 static const struct xattr_handler
16556 xops __attribute__ ((unused)) = {
68d83c55 16557 .get = get,
4d815aed
AX
16558 };
16559
16560int
16561main (void)
16562{
16563
16564
16565 ;
16566 return 0;
16567}
16568
16569_ACEOF
16570
16571
16572
16573cat - <<_ACEOF >conftest.h
16574
16575_ACEOF
16576
16577
16578 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16579 echo "obj-m := conftest.o" >build/Makefile
16580 modpost_flag=''
16581 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16582 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
16584 (eval $ac_try) 2>&5
16585 ac_status=$?
3d248aec
AX
16586 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16587 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
16589 (eval $ac_try) 2>&5
16590 ac_status=$?
3d248aec
AX
16591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16592 (exit $ac_status); }; }; then
4d815aed 16593
3d248aec 16594 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
16595$as_echo "yes" >&6; }
16596
3d248aec
AX
16597cat >>confdefs.h <<\_ACEOF
16598#define HAVE_XATTR_GET_DENTRY 1
16599_ACEOF
4d815aed
AX
16600
16601
16602else
16603 $as_echo "$as_me: failed program was:" >&5
16604sed 's/^/| /' conftest.$ac_ext >&5
16605
3d248aec 16606 { $as_echo "$as_me:$LINENO: result: no" >&5
94a40997 16607$as_echo "no" >&6; }
3d248aec 16608 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants inode" >&5
68d83c55 16609$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
4d815aed
AX
16610
16611
16612cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16613/* confdefs.h. */
16614_ACEOF
16615cat confdefs.h >>conftest.$ac_ext
16616cat >>conftest.$ac_ext <<_ACEOF
16617/* end confdefs.h. */
4d815aed
AX
16618
16619
16620 #include <linux/xattr.h>
16621
68d83c55
AX
16622 int get(struct inode *ip, const char *name,
16623 void *buffer, size_t size) { return 0; }
4d815aed
AX
16624 static const struct xattr_handler
16625 xops __attribute__ ((unused)) = {
68d83c55 16626 .get = get,
4d815aed
AX
16627 };
16628
16629int
16630main (void)
16631{
16632
16633
16634 ;
16635 return 0;
16636}
16637
16638_ACEOF
16639
16640
16641
16642cat - <<_ACEOF >conftest.h
16643
16644_ACEOF
16645
16646
16647 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16648 echo "obj-m := conftest.o" >build/Makefile
16649 modpost_flag=''
16650 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16651 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
16653 (eval $ac_try) 2>&5
16654 ac_status=$?
3d248aec
AX
16655 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16656 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16657 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
16658 (eval $ac_try) 2>&5
16659 ac_status=$?
3d248aec
AX
16660 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16661 (exit $ac_status); }; }; then
4d815aed 16662
3d248aec 16663 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
16664$as_echo "yes" >&6; }
16665
3d248aec
AX
16666cat >>confdefs.h <<\_ACEOF
16667#define HAVE_XATTR_GET_INODE 1
16668_ACEOF
4d815aed
AX
16669
16670
16671else
16672 $as_echo "$as_me: failed program was:" >&5
16673sed 's/^/| /' conftest.$ac_ext >&5
16674
3d248aec
AX
16675 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
16676$as_echo "$as_me: error: no; please file a bug report" >&2;}
16677 { (exit 1); exit 1; }; }
4d815aed
AX
16678
16679
16680
16681fi
3d248aec 16682
4d815aed
AX
16683 rm -Rf build
16684
16685
16686
16687
16688
16689fi
3d248aec 16690
4d815aed
AX
16691 rm -Rf build
16692
16693
94a40997
AX
16694
16695
16696
16697fi
3d248aec 16698
94a40997
AX
16699 rm -Rf build
16700
16701
ea04106b
AX
16702
16703
16704
16705fi
3d248aec 16706
ea04106b
AX
16707 rm -Rf build
16708
16709
ea04106b
AX
16710
16711
3d248aec 16712 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants both dentry and inode" >&5
68d83c55 16713$as_echo_n "checking whether xattr_handler->set() wants both dentry and inode... " >&6; }
ea04106b
AX
16714
16715
16716cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16717/* confdefs.h. */
16718_ACEOF
16719cat confdefs.h >>conftest.$ac_ext
16720cat >>conftest.$ac_ext <<_ACEOF
16721/* end confdefs.h. */
ea04106b
AX
16722
16723
68d83c55
AX
16724 #include <linux/xattr.h>
16725
16726 int set(const struct xattr_handler *handler,
16727 struct dentry *dentry, struct inode *inode,
16728 const char *name, const void *buffer,
16729 size_t size, int flags)
16730 { return 0; }
16731 static const struct xattr_handler
16732 xops __attribute__ ((unused)) = {
16733 .set = set,
16734 };
ea04106b
AX
16735
16736int
16737main (void)
16738{
16739
ea04106b
AX
16740
16741 ;
16742 return 0;
16743}
16744
16745_ACEOF
16746
16747
16748
16749cat - <<_ACEOF >conftest.h
16750
16751_ACEOF
16752
16753
16754 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16755 echo "obj-m := conftest.o" >build/Makefile
16756 modpost_flag=''
16757 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16758 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16760 (eval $ac_try) 2>&5
16761 ac_status=$?
3d248aec
AX
16762 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16763 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16765 (eval $ac_try) 2>&5
16766 ac_status=$?
3d248aec
AX
16767 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16768 (exit $ac_status); }; }; then
ea04106b 16769
3d248aec 16770 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
16771$as_echo "yes" >&6; }
16772
3d248aec
AX
16773cat >>confdefs.h <<\_ACEOF
16774#define HAVE_XATTR_SET_DENTRY_INODE 1
16775_ACEOF
ea04106b
AX
16776
16777
16778else
16779 $as_echo "$as_me: failed program was:" >&5
16780sed 's/^/| /' conftest.$ac_ext >&5
16781
3d248aec 16782 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants xattr_handler" >&5
68d83c55 16783$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
ea04106b
AX
16784
16785
16786cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16787/* confdefs.h. */
16788_ACEOF
16789cat confdefs.h >>conftest.$ac_ext
16790cat >>conftest.$ac_ext <<_ACEOF
16791/* end confdefs.h. */
ea04106b
AX
16792
16793
68d83c55
AX
16794 #include <linux/xattr.h>
16795
16796 int set(const struct xattr_handler *handler,
16797 struct dentry *dentry, const char *name,
16798 const void *buffer, size_t size, int flags)
16799 { return 0; }
16800 static const struct xattr_handler
16801 xops __attribute__ ((unused)) = {
16802 .set = set,
16803 };
ea04106b
AX
16804
16805int
16806main (void)
16807{
16808
ea04106b
AX
16809
16810 ;
16811 return 0;
16812}
16813
16814_ACEOF
16815
16816
16817
16818cat - <<_ACEOF >conftest.h
16819
16820_ACEOF
16821
16822
16823 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16824 echo "obj-m := conftest.o" >build/Makefile
16825 modpost_flag=''
16826 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16827 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16829 (eval $ac_try) 2>&5
16830 ac_status=$?
3d248aec
AX
16831 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16832 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16833 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16834 (eval $ac_try) 2>&5
16835 ac_status=$?
3d248aec
AX
16836 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16837 (exit $ac_status); }; }; then
ea04106b 16838
3d248aec 16839 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
16840$as_echo "yes" >&6; }
16841
3d248aec
AX
16842cat >>confdefs.h <<\_ACEOF
16843#define HAVE_XATTR_SET_HANDLER 1
16844_ACEOF
ea04106b
AX
16845
16846
16847else
16848 $as_echo "$as_me: failed program was:" >&5
16849sed 's/^/| /' conftest.$ac_ext >&5
16850
3d248aec 16851 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 16852$as_echo "no" >&6; }
3d248aec 16853 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5
68d83c55 16854$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
ea04106b
AX
16855
16856
16857cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
ea04106b
AX
16863
16864
68d83c55
AX
16865 #include <linux/xattr.h>
16866
16867 int set(struct dentry *dentry, const char *name,
16868 const void *buffer, size_t size, int flags,
16869 int handler_flags) { return 0; }
16870 static const struct xattr_handler
16871 xops __attribute__ ((unused)) = {
16872 .set = set,
16873 };
ea04106b
AX
16874
16875int
16876main (void)
16877{
16878
ea04106b
AX
16879
16880 ;
16881 return 0;
16882}
16883
16884_ACEOF
16885
16886
16887
16888cat - <<_ACEOF >conftest.h
16889
16890_ACEOF
16891
16892
16893 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16894 echo "obj-m := conftest.o" >build/Makefile
16895 modpost_flag=''
16896 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16897 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16899 (eval $ac_try) 2>&5
16900 ac_status=$?
3d248aec
AX
16901 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16902 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16904 (eval $ac_try) 2>&5
16905 ac_status=$?
3d248aec
AX
16906 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16907 (exit $ac_status); }; }; then
ea04106b 16908
3d248aec 16909 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
16910$as_echo "yes" >&6; }
16911
3d248aec
AX
16912cat >>confdefs.h <<\_ACEOF
16913#define HAVE_XATTR_SET_DENTRY 1
16914_ACEOF
ea04106b
AX
16915
16916
16917else
16918 $as_echo "$as_me: failed program was:" >&5
16919sed 's/^/| /' conftest.$ac_ext >&5
16920
3d248aec 16921 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 16922$as_echo "no" >&6; }
3d248aec 16923 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants inode" >&5
68d83c55 16924$as_echo_n "checking whether xattr_handler->set() wants inode... " >&6; }
ea04106b
AX
16925
16926
16927cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
16928/* confdefs.h. */
16929_ACEOF
16930cat confdefs.h >>conftest.$ac_ext
16931cat >>conftest.$ac_ext <<_ACEOF
16932/* end confdefs.h. */
ea04106b
AX
16933
16934
68d83c55
AX
16935 #include <linux/xattr.h>
16936
16937 int set(struct inode *ip, const char *name,
16938 const void *buffer, size_t size, int flags)
16939 { return 0; }
16940 static const struct xattr_handler
16941 xops __attribute__ ((unused)) = {
16942 .set = set,
16943 };
ea04106b
AX
16944
16945int
16946main (void)
16947{
16948
ea04106b
AX
16949
16950 ;
16951 return 0;
16952}
16953
16954_ACEOF
16955
16956
16957
16958cat - <<_ACEOF >conftest.h
16959
16960_ACEOF
16961
16962
16963 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
16964 echo "obj-m := conftest.o" >build/Makefile
16965 modpost_flag=''
16966 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
16967 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 16968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16969 (eval $ac_try) 2>&5
16970 ac_status=$?
3d248aec
AX
16971 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16972 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
16973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
16974 (eval $ac_try) 2>&5
16975 ac_status=$?
3d248aec
AX
16976 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
16977 (exit $ac_status); }; }; then
ea04106b 16978
3d248aec 16979 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
16980$as_echo "yes" >&6; }
16981
3d248aec
AX
16982cat >>confdefs.h <<\_ACEOF
16983#define HAVE_XATTR_SET_INODE 1
16984_ACEOF
ea04106b
AX
16985
16986
16987else
16988 $as_echo "$as_me: failed program was:" >&5
16989sed 's/^/| /' conftest.$ac_ext >&5
16990
3d248aec
AX
16991 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
16992$as_echo "$as_me: error: no; please file a bug report" >&2;}
16993 { (exit 1); exit 1; }; }
ea04106b
AX
16994
16995
16996
16997fi
3d248aec 16998
ea04106b
AX
16999 rm -Rf build
17000
17001
17002
68d83c55
AX
17003
17004
17005fi
3d248aec 17006
68d83c55
AX
17007 rm -Rf build
17008
17009
17010
17011
17012
17013fi
3d248aec 17014
68d83c55
AX
17015 rm -Rf build
17016
17017
17018
17019
17020
17021fi
3d248aec 17022
68d83c55
AX
17023 rm -Rf build
17024
17025
17026
17027
3d248aec 17028 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants simple" >&5
68d83c55 17029$as_echo_n "checking whether xattr_handler->list() wants simple... " >&6; }
ea04106b
AX
17030
17031
17032cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17033/* confdefs.h. */
17034_ACEOF
17035cat confdefs.h >>conftest.$ac_ext
17036cat >>conftest.$ac_ext <<_ACEOF
17037/* end confdefs.h. */
ea04106b
AX
17038
17039
68d83c55 17040 #include <linux/xattr.h>
ea04106b 17041
68d83c55
AX
17042 bool list(struct dentry *dentry) { return 0; }
17043 static const struct xattr_handler
17044 xops __attribute__ ((unused)) = {
17045 .list = list,
17046 };
ea04106b
AX
17047
17048int
17049main (void)
17050{
17051
ea04106b
AX
17052
17053 ;
17054 return 0;
17055}
17056
17057_ACEOF
17058
17059
17060
17061cat - <<_ACEOF >conftest.h
17062
17063_ACEOF
17064
17065
17066 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17067 echo "obj-m := conftest.o" >build/Makefile
17068 modpost_flag=''
17069 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17070 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17072 (eval $ac_try) 2>&5
17073 ac_status=$?
3d248aec
AX
17074 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17075 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17077 (eval $ac_try) 2>&5
17078 ac_status=$?
3d248aec
AX
17079 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17080 (exit $ac_status); }; }; then
ea04106b 17081
3d248aec 17082 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17083$as_echo "yes" >&6; }
17084
3d248aec
AX
17085cat >>confdefs.h <<\_ACEOF
17086#define HAVE_XATTR_LIST_SIMPLE 1
17087_ACEOF
ea04106b 17088
ea04106b 17089
68d83c55
AX
17090else
17091 $as_echo "$as_me: failed program was:" >&5
17092sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 17093
3d248aec 17094 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 17095$as_echo "no" >&6; }
3d248aec 17096 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants xattr_handler" >&5
68d83c55 17097$as_echo_n "checking whether xattr_handler->list() wants xattr_handler... " >&6; }
ea04106b
AX
17098
17099
17100cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17101/* confdefs.h. */
17102_ACEOF
17103cat confdefs.h >>conftest.$ac_ext
17104cat >>conftest.$ac_ext <<_ACEOF
17105/* end confdefs.h. */
ea04106b
AX
17106
17107
68d83c55
AX
17108 #include <linux/xattr.h>
17109
17110 size_t list(const struct xattr_handler *handler,
17111 struct dentry *dentry, char *list, size_t list_size,
17112 const char *name, size_t name_len) { return 0; }
17113 static const struct xattr_handler
17114 xops __attribute__ ((unused)) = {
17115 .list = list,
17116 };
ea04106b
AX
17117
17118int
17119main (void)
17120{
17121
ea04106b
AX
17122
17123 ;
17124 return 0;
17125}
17126
17127_ACEOF
17128
17129
17130
17131cat - <<_ACEOF >conftest.h
17132
17133_ACEOF
17134
17135
17136 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17137 echo "obj-m := conftest.o" >build/Makefile
17138 modpost_flag=''
17139 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17140 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17142 (eval $ac_try) 2>&5
17143 ac_status=$?
3d248aec
AX
17144 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17145 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17147 (eval $ac_try) 2>&5
17148 ac_status=$?
3d248aec
AX
17149 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17150 (exit $ac_status); }; }; then
ea04106b 17151
3d248aec 17152 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17153$as_echo "yes" >&6; }
17154
3d248aec
AX
17155cat >>confdefs.h <<\_ACEOF
17156#define HAVE_XATTR_LIST_HANDLER 1
17157_ACEOF
ea04106b
AX
17158
17159
17160else
17161 $as_echo "$as_me: failed program was:" >&5
17162sed 's/^/| /' conftest.$ac_ext >&5
17163
3d248aec 17164 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 17165$as_echo "no" >&6; }
3d248aec 17166 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants dentry" >&5
68d83c55 17167$as_echo_n "checking whether xattr_handler->list() wants dentry... " >&6; }
ea04106b
AX
17168
17169
17170cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17171/* confdefs.h. */
17172_ACEOF
17173cat confdefs.h >>conftest.$ac_ext
17174cat >>conftest.$ac_ext <<_ACEOF
17175/* end confdefs.h. */
ea04106b
AX
17176
17177
68d83c55
AX
17178 #include <linux/xattr.h>
17179
17180 size_t list(struct dentry *dentry,
17181 char *list, size_t list_size,
17182 const char *name, size_t name_len,
17183 int handler_flags) { return 0; }
17184 static const struct xattr_handler
17185 xops __attribute__ ((unused)) = {
17186 .list = list,
17187 };
ea04106b
AX
17188
17189int
17190main (void)
17191{
17192
ea04106b
AX
17193
17194 ;
17195 return 0;
17196}
17197
17198_ACEOF
17199
17200
17201
17202cat - <<_ACEOF >conftest.h
17203
17204_ACEOF
17205
17206
17207 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17208 echo "obj-m := conftest.o" >build/Makefile
17209 modpost_flag=''
17210 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17211 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17213 (eval $ac_try) 2>&5
17214 ac_status=$?
3d248aec
AX
17215 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17216 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17218 (eval $ac_try) 2>&5
17219 ac_status=$?
3d248aec
AX
17220 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17221 (exit $ac_status); }; }; then
ea04106b 17222
3d248aec 17223 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17224$as_echo "yes" >&6; }
17225
3d248aec
AX
17226cat >>confdefs.h <<\_ACEOF
17227#define HAVE_XATTR_LIST_DENTRY 1
17228_ACEOF
ea04106b
AX
17229
17230
17231else
17232 $as_echo "$as_me: failed program was:" >&5
17233sed 's/^/| /' conftest.$ac_ext >&5
17234
3d248aec 17235 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 17236$as_echo "no" >&6; }
3d248aec 17237 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants inode" >&5
68d83c55 17238$as_echo_n "checking whether xattr_handler->list() wants inode... " >&6; }
ea04106b
AX
17239
17240
17241cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17242/* confdefs.h. */
17243_ACEOF
17244cat confdefs.h >>conftest.$ac_ext
17245cat >>conftest.$ac_ext <<_ACEOF
17246/* end confdefs.h. */
ea04106b
AX
17247
17248
68d83c55
AX
17249 #include <linux/xattr.h>
17250
17251 size_t list(struct inode *ip, char *lst,
17252 size_t list_size, const char *name,
17253 size_t name_len) { return 0; }
17254 static const struct xattr_handler
17255 xops __attribute__ ((unused)) = {
17256 .list = list,
17257 };
ea04106b
AX
17258
17259int
17260main (void)
17261{
17262
ea04106b
AX
17263
17264 ;
17265 return 0;
17266}
17267
17268_ACEOF
17269
17270
17271
17272cat - <<_ACEOF >conftest.h
17273
17274_ACEOF
17275
17276
17277 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17278 echo "obj-m := conftest.o" >build/Makefile
17279 modpost_flag=''
17280 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17281 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17283 (eval $ac_try) 2>&5
17284 ac_status=$?
3d248aec
AX
17285 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17286 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17287 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17288 (eval $ac_try) 2>&5
17289 ac_status=$?
3d248aec
AX
17290 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17291 (exit $ac_status); }; }; then
ea04106b 17292
3d248aec 17293 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17294$as_echo "yes" >&6; }
17295
3d248aec
AX
17296cat >>confdefs.h <<\_ACEOF
17297#define HAVE_XATTR_LIST_INODE 1
17298_ACEOF
ea04106b
AX
17299
17300
17301else
17302 $as_echo "$as_me: failed program was:" >&5
17303sed 's/^/| /' conftest.$ac_ext >&5
17304
3d248aec
AX
17305 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
17306$as_echo "$as_me: error: no; please file a bug report" >&2;}
17307 { (exit 1); exit 1; }; }
ea04106b
AX
17308
17309
17310
17311fi
3d248aec 17312
ea04106b
AX
17313 rm -Rf build
17314
17315
ea04106b 17316
ea04106b 17317
68d83c55
AX
17318
17319fi
3d248aec 17320
68d83c55
AX
17321 rm -Rf build
17322
17323
17324
17325
17326
17327fi
3d248aec 17328
68d83c55
AX
17329 rm -Rf build
17330
17331
17332
17333
17334
17335fi
3d248aec 17336
68d83c55
AX
17337 rm -Rf build
17338
17339
17340
17341
3d248aec 17342 { $as_echo "$as_me:$LINENO: checking whether inode_owner_or_capable() exists" >&5
68d83c55 17343$as_echo_n "checking whether inode_owner_or_capable() exists... " >&6; }
ea04106b
AX
17344
17345
17346cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17347/* confdefs.h. */
17348_ACEOF
17349cat confdefs.h >>conftest.$ac_ext
17350cat >>conftest.$ac_ext <<_ACEOF
17351/* end confdefs.h. */
ea04106b
AX
17352
17353
e10b0808 17354 #include <linux/fs.h>
ea04106b
AX
17355
17356int
17357main (void)
17358{
17359
68d83c55
AX
17360 struct inode *ip = NULL;
17361 (void) inode_owner_or_capable(ip);
ea04106b
AX
17362
17363 ;
17364 return 0;
17365}
17366
17367_ACEOF
17368
17369
17370
17371cat - <<_ACEOF >conftest.h
17372
17373_ACEOF
17374
17375
17376 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17377 echo "obj-m := conftest.o" >build/Makefile
17378 modpost_flag=''
17379 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17380 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17382 (eval $ac_try) 2>&5
17383 ac_status=$?
3d248aec
AX
17384 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17385 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17387 (eval $ac_try) 2>&5
17388 ac_status=$?
3d248aec
AX
17389 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17390 (exit $ac_status); }; }; then
ea04106b 17391
3d248aec 17392 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 17393$as_echo "yes" >&6; }
ea04106b 17394
3d248aec
AX
17395cat >>confdefs.h <<\_ACEOF
17396#define HAVE_INODE_OWNER_OR_CAPABLE 1
17397_ACEOF
ea04106b
AX
17398
17399
e10b0808
AX
17400else
17401 $as_echo "$as_me: failed program was:" >&5
17402sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 17403
3d248aec 17404 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 17405$as_echo "no" >&6; }
3d248aec 17406 { $as_echo "$as_me:$LINENO: checking whether is_owner_or_cap() exists" >&5
68d83c55 17407$as_echo_n "checking whether is_owner_or_cap() exists... " >&6; }
ea04106b
AX
17408
17409
e10b0808 17410cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17411/* confdefs.h. */
17412_ACEOF
17413cat confdefs.h >>conftest.$ac_ext
17414cat >>conftest.$ac_ext <<_ACEOF
17415/* end confdefs.h. */
ea04106b
AX
17416
17417
68d83c55
AX
17418 #include <linux/fs.h>
17419 #include <linux/sched.h>
ea04106b
AX
17420
17421int
17422main (void)
17423{
17424
68d83c55
AX
17425 struct inode *ip = NULL;
17426 (void) is_owner_or_cap(ip);
ea04106b
AX
17427
17428 ;
17429 return 0;
17430}
17431
17432_ACEOF
17433
17434
17435
17436cat - <<_ACEOF >conftest.h
17437
17438_ACEOF
17439
17440
17441 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17442 echo "obj-m := conftest.o" >build/Makefile
17443 modpost_flag=''
17444 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17445 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17447 (eval $ac_try) 2>&5
17448 ac_status=$?
3d248aec
AX
17449 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17450 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17451 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17452 (eval $ac_try) 2>&5
17453 ac_status=$?
3d248aec
AX
17454 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17455 (exit $ac_status); }; }; then
ea04106b 17456
3d248aec 17457 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17458$as_echo "yes" >&6; }
17459
3d248aec
AX
17460cat >>confdefs.h <<\_ACEOF
17461#define HAVE_IS_OWNER_OR_CAP 1
17462_ACEOF
ea04106b
AX
17463
17464
17465else
17466 $as_echo "$as_me: failed program was:" >&5
17467sed 's/^/| /' conftest.$ac_ext >&5
17468
3d248aec
AX
17469 { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
17470 https://github.com/zfsonlinux/zfs/issues/new" >&5
17471$as_echo "$as_me: error: no - Please file a bug report at
17472 https://github.com/zfsonlinux/zfs/issues/new" >&2;}
17473 { (exit 1); exit 1; }; }
ea04106b
AX
17474
17475
17476
17477fi
3d248aec 17478
ea04106b
AX
17479 rm -Rf build
17480
17481
ea04106b 17482
ea04106b 17483
ea04106b 17484
68d83c55 17485fi
3d248aec 17486
68d83c55 17487 rm -Rf build
ea04106b 17488
ea04106b
AX
17489
17490
e10b0808 17491
3d248aec 17492 { $as_echo "$as_me:$LINENO: checking whether posix_acl_from_xattr() needs user_ns" >&5
68d83c55
AX
17493$as_echo_n "checking whether posix_acl_from_xattr() needs user_ns... " >&6; }
17494
17495
17496cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17497/* confdefs.h. */
17498_ACEOF
17499cat confdefs.h >>conftest.$ac_ext
17500cat >>conftest.$ac_ext <<_ACEOF
17501/* end confdefs.h. */
e10b0808 17502
68d83c55
AX
17503
17504 #include <linux/cred.h>
17505 #include <linux/fs.h>
17506 #include <linux/posix_acl_xattr.h>
ea04106b
AX
17507
17508int
17509main (void)
17510{
17511
68d83c55 17512 posix_acl_from_xattr(&init_user_ns, NULL, 0);
ea04106b
AX
17513
17514 ;
17515 return 0;
17516}
17517
17518_ACEOF
17519
17520
17521
17522cat - <<_ACEOF >conftest.h
17523
17524_ACEOF
17525
17526
17527 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17528 echo "obj-m := conftest.o" >build/Makefile
17529 modpost_flag=''
17530 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17531 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17532 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17533 (eval $ac_try) 2>&5
17534 ac_status=$?
3d248aec
AX
17535 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17536 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17538 (eval $ac_try) 2>&5
17539 ac_status=$?
3d248aec
AX
17540 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17541 (exit $ac_status); }; }; then
ea04106b 17542
3d248aec 17543 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17544$as_echo "yes" >&6; }
17545
3d248aec
AX
17546cat >>confdefs.h <<\_ACEOF
17547#define HAVE_POSIX_ACL_FROM_XATTR_USERNS 1
17548_ACEOF
ea04106b
AX
17549
17550
17551else
17552 $as_echo "$as_me: failed program was:" >&5
17553sed 's/^/| /' conftest.$ac_ext >&5
17554
3d248aec 17555 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
17556$as_echo "no" >&6; }
17557
17558
17559
17560fi
3d248aec 17561
ea04106b
AX
17562 rm -Rf build
17563
17564
17565
e10b0808 17566
3d248aec 17567 { $as_echo "$as_me:$LINENO: checking whether posix_acl_release() is available" >&5
68d83c55 17568$as_echo_n "checking whether posix_acl_release() is available... " >&6; }
ea04106b
AX
17569
17570
17571cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17572/* confdefs.h. */
17573_ACEOF
17574cat confdefs.h >>conftest.$ac_ext
17575cat >>conftest.$ac_ext <<_ACEOF
17576/* end confdefs.h. */
ea04106b
AX
17577
17578
68d83c55 17579 #include <linux/cred.h>
e10b0808 17580 #include <linux/fs.h>
68d83c55 17581 #include <linux/posix_acl.h>
ea04106b
AX
17582
17583int
17584main (void)
17585{
17586
68d83c55
AX
17587 struct posix_acl* tmp = posix_acl_alloc(1, 0);
17588 posix_acl_release(tmp);
ea04106b
AX
17589
17590 ;
17591 return 0;
17592}
17593
17594_ACEOF
17595
17596
17597
17598cat - <<_ACEOF >conftest.h
17599
17600_ACEOF
17601
17602
17603 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17604 echo "obj-m := conftest.o" >build/Makefile
17605 modpost_flag=''
17606 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17607 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17609 (eval $ac_try) 2>&5
17610 ac_status=$?
3d248aec
AX
17611 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17612 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17614 (eval $ac_try) 2>&5
17615 ac_status=$?
3d248aec
AX
17616 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17617 (exit $ac_status); }; }; then
ea04106b 17618
3d248aec 17619 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17620$as_echo "yes" >&6; }
17621
3d248aec
AX
17622cat >>confdefs.h <<\_ACEOF
17623#define HAVE_POSIX_ACL_RELEASE 1
17624_ACEOF
ea04106b
AX
17625
17626
17627else
17628 $as_echo "$as_me: failed program was:" >&5
17629sed 's/^/| /' conftest.$ac_ext >&5
17630
3d248aec 17631 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
17632$as_echo "no" >&6; }
17633
17634
17635
17636fi
3d248aec 17637
ea04106b
AX
17638 rm -Rf build
17639
17640
17641
3d248aec 17642 { $as_echo "$as_me:$LINENO: checking whether posix_acl_release() is GPL-only" >&5
68d83c55 17643$as_echo_n "checking whether posix_acl_release() is GPL-only... " >&6; }
ea04106b
AX
17644
17645
17646cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17647/* confdefs.h. */
17648_ACEOF
17649cat confdefs.h >>conftest.$ac_ext
17650cat >>conftest.$ac_ext <<_ACEOF
17651/* end confdefs.h. */
ea04106b
AX
17652
17653
68d83c55 17654 #include <linux/cred.h>
e10b0808 17655 #include <linux/fs.h>
68d83c55 17656 #include <linux/posix_acl.h>
e10b0808 17657
68d83c55 17658 MODULE_LICENSE("$ZFS_META_LICENSE");
ea04106b
AX
17659
17660int
17661main (void)
17662{
17663
68d83c55
AX
17664 struct posix_acl* tmp = posix_acl_alloc(1, 0);
17665 posix_acl_release(tmp);
ea04106b
AX
17666
17667 ;
17668 return 0;
17669}
17670
17671_ACEOF
17672
17673
17674
17675cat - <<_ACEOF >conftest.h
17676
17677_ACEOF
17678
17679
17680 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17681 echo "obj-m := conftest.o" >build/Makefile
17682 modpost_flag=''
17683 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17684 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17686 (eval $ac_try) 2>&5
17687 ac_status=$?
3d248aec
AX
17688 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17689 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17691 (eval $ac_try) 2>&5
17692 ac_status=$?
3d248aec
AX
17693 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17694 (exit $ac_status); }; }; then
ea04106b 17695
3d248aec 17696 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
17697$as_echo "no" >&6; }
17698
17699else
17700 $as_echo "$as_me: failed program was:" >&5
17701sed 's/^/| /' conftest.$ac_ext >&5
17702
3d248aec 17703 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17704$as_echo "yes" >&6; }
17705
3d248aec
AX
17706cat >>confdefs.h <<\_ACEOF
17707#define HAVE_POSIX_ACL_RELEASE_GPL_ONLY 1
17708_ACEOF
e10b0808
AX
17709
17710
68d83c55
AX
17711
17712
17713fi
3d248aec 17714
68d83c55
AX
17715 rm -Rf build
17716
17717
17718
17719
3d248aec 17720 { $as_echo "$as_me:$LINENO: checking whether set_cached_acl() is usable" >&5
68d83c55
AX
17721$as_echo_n "checking whether set_cached_acl() is usable... " >&6; }
17722
17723
17724cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17725/* confdefs.h. */
17726_ACEOF
17727cat confdefs.h >>conftest.$ac_ext
17728cat >>conftest.$ac_ext <<_ACEOF
17729/* end confdefs.h. */
68d83c55
AX
17730
17731
17732 #include <linux/module.h>
17733 #include <linux/cred.h>
17734 #include <linux/fs.h>
17735 #include <linux/posix_acl.h>
17736
17737 MODULE_LICENSE("$ZFS_META_LICENSE");
17738
17739int
17740main (void)
17741{
17742
17743 struct inode *ip = NULL;
17744 struct posix_acl *acl = posix_acl_alloc(1, 0);
17745 set_cached_acl(ip, ACL_TYPE_ACCESS, acl);
17746 forget_cached_acl(ip, ACL_TYPE_ACCESS);
17747
17748 ;
17749 return 0;
17750}
17751
17752_ACEOF
17753
17754
17755
17756cat - <<_ACEOF >conftest.h
17757
17758_ACEOF
17759
17760
17761 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17762 echo "obj-m := conftest.o" >build/Makefile
17763 modpost_flag=''
17764 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17765 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
17767 (eval $ac_try) 2>&5
17768 ac_status=$?
3d248aec
AX
17769 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17770 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
17772 (eval $ac_try) 2>&5
17773 ac_status=$?
3d248aec
AX
17774 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17775 (exit $ac_status); }; }; then
68d83c55 17776
3d248aec 17777 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
17778$as_echo "yes" >&6; }
17779
3d248aec
AX
17780cat >>confdefs.h <<\_ACEOF
17781#define HAVE_SET_CACHED_ACL_USABLE 1
17782_ACEOF
ea04106b
AX
17783
17784
17785else
17786 $as_echo "$as_me: failed program was:" >&5
17787sed 's/^/| /' conftest.$ac_ext >&5
17788
3d248aec 17789 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
17790$as_echo "no" >&6; }
17791
17792
17793
17794fi
3d248aec 17795
ea04106b
AX
17796 rm -Rf build
17797
17798
17799
e10b0808 17800
3d248aec 17801 { $as_echo "$as_me:$LINENO: checking whether posix_acl_chmod exists" >&5
68d83c55 17802$as_echo_n "checking whether posix_acl_chmod exists... " >&6; }
ea04106b
AX
17803
17804
17805cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17806/* confdefs.h. */
17807_ACEOF
17808cat confdefs.h >>conftest.$ac_ext
17809cat >>conftest.$ac_ext <<_ACEOF
17810/* end confdefs.h. */
ea04106b
AX
17811
17812
17813 #include <linux/fs.h>
68d83c55 17814 #include <linux/posix_acl.h>
ea04106b
AX
17815
17816int
17817main (void)
17818{
17819
68d83c55 17820 posix_acl_chmod(NULL, 0, 0)
ea04106b
AX
17821
17822 ;
17823 return 0;
17824}
17825
17826_ACEOF
17827
17828
17829
17830cat - <<_ACEOF >conftest.h
17831
17832_ACEOF
17833
17834
17835 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17836 echo "obj-m := conftest.o" >build/Makefile
17837 modpost_flag=''
17838 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17839 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17840 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17841 (eval $ac_try) 2>&5
17842 ac_status=$?
3d248aec
AX
17843 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17844 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17846 (eval $ac_try) 2>&5
17847 ac_status=$?
3d248aec
AX
17848 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17849 (exit $ac_status); }; }; then
ea04106b 17850
3d248aec 17851 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17852$as_echo "yes" >&6; }
17853
3d248aec
AX
17854cat >>confdefs.h <<\_ACEOF
17855#define HAVE_POSIX_ACL_CHMOD 1
17856_ACEOF
ea04106b
AX
17857
17858
17859else
17860 $as_echo "$as_me: failed program was:" >&5
17861sed 's/^/| /' conftest.$ac_ext >&5
17862
3d248aec 17863 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
17864$as_echo "no" >&6; }
17865
17866
17867
17868fi
3d248aec 17869
ea04106b
AX
17870 rm -Rf build
17871
17872
17873
3d248aec 17874 { $as_echo "$as_me:$LINENO: checking whether __posix_acl_chmod exists" >&5
68d83c55 17875$as_echo_n "checking whether __posix_acl_chmod exists... " >&6; }
ea04106b
AX
17876
17877
17878cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17879/* confdefs.h. */
17880_ACEOF
17881cat confdefs.h >>conftest.$ac_ext
17882cat >>conftest.$ac_ext <<_ACEOF
17883/* end confdefs.h. */
ea04106b
AX
17884
17885
e10b0808 17886 #include <linux/fs.h>
68d83c55 17887 #include <linux/posix_acl.h>
ea04106b
AX
17888
17889int
17890main (void)
17891{
17892
68d83c55 17893 __posix_acl_chmod(NULL, 0, 0)
ea04106b
AX
17894
17895 ;
17896 return 0;
17897}
17898
17899_ACEOF
17900
17901
17902
17903cat - <<_ACEOF >conftest.h
17904
17905_ACEOF
17906
17907
17908 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17909 echo "obj-m := conftest.o" >build/Makefile
17910 modpost_flag=''
17911 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17912 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17914 (eval $ac_try) 2>&5
17915 ac_status=$?
3d248aec
AX
17916 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17917 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17919 (eval $ac_try) 2>&5
17920 ac_status=$?
3d248aec
AX
17921 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17922 (exit $ac_status); }; }; then
ea04106b 17923
3d248aec 17924 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
17925$as_echo "yes" >&6; }
17926
3d248aec
AX
17927cat >>confdefs.h <<\_ACEOF
17928#define HAVE___POSIX_ACL_CHMOD 1
17929_ACEOF
ea04106b
AX
17930
17931
17932else
17933 $as_echo "$as_me: failed program was:" >&5
17934sed 's/^/| /' conftest.$ac_ext >&5
17935
3d248aec 17936 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
17937$as_echo "no" >&6; }
17938
17939
17940
17941fi
3d248aec 17942
ea04106b
AX
17943 rm -Rf build
17944
17945
17946
17947
3d248aec 17948 { $as_echo "$as_me:$LINENO: checking whether posix_acl_equiv_mode() wants umode_t" >&5
68d83c55 17949$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
ea04106b
AX
17950
17951
17952cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
17953/* confdefs.h. */
17954_ACEOF
17955cat confdefs.h >>conftest.$ac_ext
17956cat >>conftest.$ac_ext <<_ACEOF
17957/* end confdefs.h. */
ea04106b
AX
17958
17959
e10b0808 17960 #include <linux/fs.h>
68d83c55 17961 #include <linux/posix_acl.h>
ea04106b
AX
17962
17963int
17964main (void)
17965{
17966
68d83c55
AX
17967 umode_t tmp;
17968 posix_acl_equiv_mode(NULL,&tmp);
ea04106b
AX
17969
17970 ;
17971 return 0;
17972}
17973
17974_ACEOF
17975
17976
17977
17978cat - <<_ACEOF >conftest.h
17979
17980_ACEOF
17981
17982
17983 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
17984 echo "obj-m := conftest.o" >build/Makefile
17985 modpost_flag=''
17986 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
17987 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 17988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17989 (eval $ac_try) 2>&5
17990 ac_status=$?
3d248aec
AX
17991 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17992 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
17993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
17994 (eval $ac_try) 2>&5
17995 ac_status=$?
3d248aec
AX
17996 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
17997 (exit $ac_status); }; }; then
ea04106b 17998
3d248aec 17999 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
18000$as_echo "yes" >&6; }
18001
3d248aec
AX
18002cat >>confdefs.h <<\_ACEOF
18003#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1
18004_ACEOF
ea04106b
AX
18005
18006
18007else
18008 $as_echo "$as_me: failed program was:" >&5
18009sed 's/^/| /' conftest.$ac_ext >&5
18010
3d248aec 18011 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
18012$as_echo "no" >&6; }
18013
18014
18015
18016fi
3d248aec 18017
ea04106b
AX
18018 rm -Rf build
18019
18020
18021
18022
3d248aec 18023 { $as_echo "$as_me:$LINENO: checking whether posix_acl_valid() wants user namespace" >&5
68d83c55 18024$as_echo_n "checking whether posix_acl_valid() wants user namespace... " >&6; }
ea04106b
AX
18025
18026
18027cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18028/* confdefs.h. */
18029_ACEOF
18030cat confdefs.h >>conftest.$ac_ext
18031cat >>conftest.$ac_ext <<_ACEOF
18032/* end confdefs.h. */
ea04106b
AX
18033
18034
e10b0808 18035 #include <linux/fs.h>
68d83c55 18036 #include <linux/posix_acl.h>
ea04106b
AX
18037
18038int
18039main (void)
18040{
18041
68d83c55
AX
18042 struct user_namespace *user_ns = NULL;
18043 const struct posix_acl *acl = NULL;
18044 int error;
18045
18046 error = posix_acl_valid(user_ns, acl);
ea04106b
AX
18047
18048 ;
18049 return 0;
18050}
18051
18052_ACEOF
18053
18054
18055
18056cat - <<_ACEOF >conftest.h
18057
18058_ACEOF
18059
18060
18061 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18062 echo "obj-m := conftest.o" >build/Makefile
18063 modpost_flag=''
18064 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18065 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18067 (eval $ac_try) 2>&5
18068 ac_status=$?
3d248aec
AX
18069 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18070 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18071 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18072 (eval $ac_try) 2>&5
18073 ac_status=$?
3d248aec
AX
18074 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18075 (exit $ac_status); }; }; then
ea04106b 18076
3d248aec 18077 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
18078$as_echo "yes" >&6; }
18079
3d248aec
AX
18080cat >>confdefs.h <<\_ACEOF
18081#define HAVE_POSIX_ACL_VALID_WITH_NS 1
18082_ACEOF
ea04106b
AX
18083
18084
18085else
18086 $as_echo "$as_me: failed program was:" >&5
18087sed 's/^/| /' conftest.$ac_ext >&5
18088
3d248aec 18089 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
18090$as_echo "no" >&6; }
18091
18092
18093
18094fi
3d248aec 18095
ea04106b
AX
18096 rm -Rf build
18097
18098
18099
18100
3d248aec 18101 { $as_echo "$as_me:$LINENO: checking whether iops->permission() exists" >&5
68d83c55 18102$as_echo_n "checking whether iops->permission() exists... " >&6; }
ea04106b
AX
18103
18104
18105cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18106/* confdefs.h. */
18107_ACEOF
18108cat confdefs.h >>conftest.$ac_ext
18109cat >>conftest.$ac_ext <<_ACEOF
18110/* end confdefs.h. */
ea04106b
AX
18111
18112
18113 #include <linux/fs.h>
18114
68d83c55 18115 int permission_fn(struct inode *inode, int mask) { return 0; }
e10b0808 18116
68d83c55
AX
18117 static const struct inode_operations
18118 iops __attribute__ ((unused)) = {
18119 .permission = permission_fn,
e10b0808
AX
18120 };
18121
ea04106b
AX
18122int
18123main (void)
18124{
18125
ea04106b
AX
18126
18127 ;
18128 return 0;
18129}
18130
18131_ACEOF
18132
18133
18134
18135cat - <<_ACEOF >conftest.h
18136
18137_ACEOF
18138
18139
18140 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18141 echo "obj-m := conftest.o" >build/Makefile
18142 modpost_flag=''
18143 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18144 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18146 (eval $ac_try) 2>&5
18147 ac_status=$?
3d248aec
AX
18148 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18149 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18151 (eval $ac_try) 2>&5
18152 ac_status=$?
3d248aec
AX
18153 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18154 (exit $ac_status); }; }; then
ea04106b 18155
3d248aec 18156 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 18157$as_echo "yes" >&6; }
ea04106b 18158
3d248aec
AX
18159cat >>confdefs.h <<\_ACEOF
18160#define HAVE_PERMISSION 1
18161_ACEOF
ea04106b
AX
18162
18163
18164else
18165 $as_echo "$as_me: failed program was:" >&5
18166sed 's/^/| /' conftest.$ac_ext >&5
18167
3d248aec 18168 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 18169$as_echo "no" >&6; }
e10b0808
AX
18170
18171
18172
18173fi
3d248aec 18174
e10b0808
AX
18175 rm -Rf build
18176
18177
18178
18179
3d248aec 18180 { $as_echo "$as_me:$LINENO: checking whether iops->permission() wants nameidata" >&5
68d83c55 18181$as_echo_n "checking whether iops->permission() wants nameidata... " >&6; }
ea04106b
AX
18182
18183
18184cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18185/* confdefs.h. */
18186_ACEOF
18187cat confdefs.h >>conftest.$ac_ext
18188cat >>conftest.$ac_ext <<_ACEOF
18189/* end confdefs.h. */
ea04106b
AX
18190
18191
e10b0808
AX
18192 #include <linux/fs.h>
18193
68d83c55
AX
18194 int permission_fn(struct inode *inode, int mask,
18195 struct nameidata *nd) { return 0; }
e10b0808 18196
68d83c55
AX
18197 static const struct inode_operations
18198 iops __attribute__ ((unused)) = {
18199 .permission = permission_fn,
e10b0808 18200 };
ea04106b
AX
18201
18202int
18203main (void)
18204{
18205
ea04106b
AX
18206
18207 ;
18208 return 0;
18209}
18210
18211_ACEOF
18212
18213
18214
18215cat - <<_ACEOF >conftest.h
18216
18217_ACEOF
18218
18219
18220 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18221 echo "obj-m := conftest.o" >build/Makefile
18222 modpost_flag=''
18223 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18224 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18226 (eval $ac_try) 2>&5
18227 ac_status=$?
3d248aec
AX
18228 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18229 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18231 (eval $ac_try) 2>&5
18232 ac_status=$?
3d248aec
AX
18233 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18234 (exit $ac_status); }; }; then
ea04106b 18235
3d248aec 18236 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
18237$as_echo "yes" >&6; }
18238
3d248aec
AX
18239cat >>confdefs.h <<\_ACEOF
18240#define HAVE_PERMISSION 1
18241_ACEOF
ea04106b 18242
68d83c55 18243
3d248aec
AX
18244cat >>confdefs.h <<\_ACEOF
18245#define HAVE_PERMISSION_WITH_NAMEIDATA 1
18246_ACEOF
ea04106b
AX
18247
18248
18249else
18250 $as_echo "$as_me: failed program was:" >&5
18251sed 's/^/| /' conftest.$ac_ext >&5
18252
3d248aec 18253 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 18254$as_echo "no" >&6; }
ea04106b
AX
18255
18256
18257
18258fi
3d248aec 18259
ea04106b
AX
18260 rm -Rf build
18261
18262
18263
18264
3d248aec 18265 { $as_echo "$as_me:$LINENO: checking whether iops->check_acl() exists" >&5
68d83c55 18266$as_echo_n "checking whether iops->check_acl() exists... " >&6; }
ea04106b
AX
18267
18268
18269cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18270/* confdefs.h. */
18271_ACEOF
18272cat confdefs.h >>conftest.$ac_ext
18273cat >>conftest.$ac_ext <<_ACEOF
18274/* end confdefs.h. */
ea04106b
AX
18275
18276
ea04106b 18277 #include <linux/fs.h>
e10b0808 18278
68d83c55 18279 int check_acl_fn(struct inode *inode, int mask) { return 0; }
e10b0808 18280
68d83c55
AX
18281 static const struct inode_operations
18282 iops __attribute__ ((unused)) = {
18283 .check_acl = check_acl_fn,
e10b0808 18284 };
ea04106b
AX
18285
18286int
18287main (void)
18288{
18289
ea04106b
AX
18290
18291 ;
18292 return 0;
18293}
18294
18295_ACEOF
18296
18297
18298
18299cat - <<_ACEOF >conftest.h
18300
18301_ACEOF
18302
18303
18304 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18305 echo "obj-m := conftest.o" >build/Makefile
18306 modpost_flag=''
18307 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18308 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18310 (eval $ac_try) 2>&5
18311 ac_status=$?
3d248aec
AX
18312 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18313 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18315 (eval $ac_try) 2>&5
18316 ac_status=$?
3d248aec
AX
18317 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18318 (exit $ac_status); }; }; then
ea04106b 18319
3d248aec 18320 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 18321$as_echo "yes" >&6; }
ea04106b 18322
3d248aec
AX
18323cat >>confdefs.h <<\_ACEOF
18324#define HAVE_CHECK_ACL 1
18325_ACEOF
ea04106b
AX
18326
18327
18328else
18329 $as_echo "$as_me: failed program was:" >&5
18330sed 's/^/| /' conftest.$ac_ext >&5
18331
3d248aec 18332 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 18333$as_echo "no" >&6; }
ea04106b
AX
18334
18335
18336
18337fi
3d248aec 18338
ea04106b
AX
18339 rm -Rf build
18340
18341
18342
18343
3d248aec 18344 { $as_echo "$as_me:$LINENO: checking whether iops->check_acl() wants flags" >&5
68d83c55 18345$as_echo_n "checking whether iops->check_acl() wants flags... " >&6; }
ea04106b
AX
18346
18347
18348cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18349/* confdefs.h. */
18350_ACEOF
18351cat confdefs.h >>conftest.$ac_ext
18352cat >>conftest.$ac_ext <<_ACEOF
18353/* end confdefs.h. */
ea04106b
AX
18354
18355
ea04106b 18356 #include <linux/fs.h>
68d83c55
AX
18357
18358 int check_acl_fn(struct inode *inode, int mask,
18359 unsigned int flags) { return 0; }
18360
18361 static const struct inode_operations
18362 iops __attribute__ ((unused)) = {
18363 .check_acl = check_acl_fn,
e10b0808 18364 };
ea04106b
AX
18365
18366int
18367main (void)
18368{
18369
ea04106b
AX
18370
18371 ;
18372 return 0;
18373}
18374
18375_ACEOF
18376
18377
18378
18379cat - <<_ACEOF >conftest.h
18380
18381_ACEOF
18382
18383
18384 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18385 echo "obj-m := conftest.o" >build/Makefile
18386 modpost_flag=''
18387 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18388 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18389 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18390 (eval $ac_try) 2>&5
18391 ac_status=$?
3d248aec
AX
18392 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18393 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18395 (eval $ac_try) 2>&5
18396 ac_status=$?
3d248aec
AX
18397 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18398 (exit $ac_status); }; }; then
ea04106b 18399
3d248aec 18400 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
18401$as_echo "yes" >&6; }
18402
3d248aec
AX
18403cat >>confdefs.h <<\_ACEOF
18404#define HAVE_CHECK_ACL 1
18405_ACEOF
68d83c55
AX
18406
18407
3d248aec
AX
18408cat >>confdefs.h <<\_ACEOF
18409#define HAVE_CHECK_ACL_WITH_FLAGS 1
18410_ACEOF
ea04106b
AX
18411
18412
18413else
18414 $as_echo "$as_me: failed program was:" >&5
18415sed 's/^/| /' conftest.$ac_ext >&5
18416
3d248aec 18417 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
18418$as_echo "no" >&6; }
18419
18420
18421
18422fi
3d248aec 18423
ea04106b
AX
18424 rm -Rf build
18425
18426
18427
e10b0808 18428
3d248aec 18429 { $as_echo "$as_me:$LINENO: checking whether iops->get_acl() exists" >&5
68d83c55 18430$as_echo_n "checking whether iops->get_acl() exists... " >&6; }
ea04106b
AX
18431
18432
18433cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18434/* confdefs.h. */
18435_ACEOF
18436cat confdefs.h >>conftest.$ac_ext
18437cat >>conftest.$ac_ext <<_ACEOF
18438/* end confdefs.h. */
ea04106b
AX
18439
18440
ea04106b 18441 #include <linux/fs.h>
ea04106b 18442
68d83c55
AX
18443 struct posix_acl *get_acl_fn(struct inode *inode, int type)
18444 { return NULL; }
e10b0808 18445
68d83c55
AX
18446 static const struct inode_operations
18447 iops __attribute__ ((unused)) = {
18448 .get_acl = get_acl_fn,
e10b0808 18449 };
ea04106b
AX
18450
18451int
18452main (void)
18453{
18454
ea04106b
AX
18455
18456 ;
18457 return 0;
18458}
18459
18460_ACEOF
18461
18462
18463
18464cat - <<_ACEOF >conftest.h
18465
18466_ACEOF
18467
18468
18469 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18470 echo "obj-m := conftest.o" >build/Makefile
18471 modpost_flag=''
18472 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18473 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18475 (eval $ac_try) 2>&5
18476 ac_status=$?
3d248aec
AX
18477 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18478 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18480 (eval $ac_try) 2>&5
18481 ac_status=$?
3d248aec
AX
18482 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18483 (exit $ac_status); }; }; then
ea04106b 18484
3d248aec 18485 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
18486$as_echo "yes" >&6; }
18487
3d248aec
AX
18488cat >>confdefs.h <<\_ACEOF
18489#define HAVE_GET_ACL 1
18490_ACEOF
e10b0808 18491
ea04106b
AX
18492
18493else
18494 $as_echo "$as_me: failed program was:" >&5
18495sed 's/^/| /' conftest.$ac_ext >&5
18496
3d248aec 18497 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 18498$as_echo "no" >&6; }
ea04106b
AX
18499
18500
18501
18502fi
3d248aec 18503
ea04106b
AX
18504 rm -Rf build
18505
18506
18507
18508
3d248aec 18509 { $as_echo "$as_me:$LINENO: checking whether iops->set_acl() exists" >&5
68d83c55 18510$as_echo_n "checking whether iops->set_acl() exists... " >&6; }
ea04106b
AX
18511
18512
18513cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18514/* confdefs.h. */
18515_ACEOF
18516cat confdefs.h >>conftest.$ac_ext
18517cat >>conftest.$ac_ext <<_ACEOF
18518/* end confdefs.h. */
ea04106b
AX
18519
18520
18521 #include <linux/fs.h>
e10b0808 18522
68d83c55
AX
18523 int set_acl_fn(struct inode *inode, struct posix_acl *acl, int type)
18524 { return 0; }
e10b0808 18525
68d83c55
AX
18526 static const struct inode_operations
18527 iops __attribute__ ((unused)) = {
18528 .set_acl = set_acl_fn,
e10b0808 18529 };
ea04106b
AX
18530
18531int
18532main (void)
18533{
18534
ea04106b
AX
18535
18536 ;
18537 return 0;
18538}
18539
18540_ACEOF
18541
18542
18543
18544cat - <<_ACEOF >conftest.h
18545
18546_ACEOF
18547
18548
18549 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18550 echo "obj-m := conftest.o" >build/Makefile
18551 modpost_flag=''
18552 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18553 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18555 (eval $ac_try) 2>&5
18556 ac_status=$?
3d248aec
AX
18557 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18558 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18560 (eval $ac_try) 2>&5
18561 ac_status=$?
3d248aec
AX
18562 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18563 (exit $ac_status); }; }; then
ea04106b 18564
3d248aec 18565 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
18566$as_echo "yes" >&6; }
18567
3d248aec
AX
18568cat >>confdefs.h <<\_ACEOF
18569#define HAVE_SET_ACL 1
ea04106b
AX
18570_ACEOF
18571
18572
ea04106b
AX
18573else
18574 $as_echo "$as_me: failed program was:" >&5
18575sed 's/^/| /' conftest.$ac_ext >&5
18576
3d248aec 18577 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
18578$as_echo "no" >&6; }
18579
18580
18581
18582fi
3d248aec 18583
ea04106b
AX
18584 rm -Rf build
18585
18586
18587
18588
e10b0808 18589
3d248aec
AX
18590 { $as_echo "$as_me:$LINENO: checking whether iops->getattr() takes a path" >&5
18591$as_echo_n "checking whether iops->getattr() takes a path... " >&6; }
ea04106b
AX
18592
18593
18594cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18595/* confdefs.h. */
18596_ACEOF
18597cat confdefs.h >>conftest.$ac_ext
18598cat >>conftest.$ac_ext <<_ACEOF
18599/* end confdefs.h. */
ea04106b
AX
18600
18601
18602 #include <linux/fs.h>
18603
3d248aec
AX
18604 int test_getattr(
18605 const struct path *p, struct kstat *k,
18606 u32 request_mask, unsigned int query_flags)
18607 { return 0; }
18608
18609 static const struct inode_operations
18610 iops __attribute__ ((unused)) = {
18611 .getattr = test_getattr,
e10b0808
AX
18612 };
18613
ea04106b
AX
18614int
18615main (void)
18616{
18617
ea04106b
AX
18618
18619 ;
18620 return 0;
18621}
18622
18623_ACEOF
18624
18625
18626
18627cat - <<_ACEOF >conftest.h
18628
18629_ACEOF
18630
18631
18632 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18633 echo "obj-m := conftest.o" >build/Makefile
18634 modpost_flag=''
18635 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18636 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18638 (eval $ac_try) 2>&5
18639 ac_status=$?
3d248aec
AX
18640 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18641 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18643 (eval $ac_try) 2>&5
18644 ac_status=$?
3d248aec
AX
18645 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18646 (exit $ac_status); }; }; then
ea04106b 18647
3d248aec 18648 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
18649$as_echo "yes" >&6; }
18650
3d248aec
AX
18651cat >>confdefs.h <<\_ACEOF
18652#define HAVE_PATH_IOPS_GETATTR 1
ea04106b
AX
18653_ACEOF
18654
18655
ea04106b
AX
18656else
18657 $as_echo "$as_me: failed program was:" >&5
18658sed 's/^/| /' conftest.$ac_ext >&5
18659
3d248aec 18660 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
18661$as_echo "no" >&6; }
18662
18663
18664
18665fi
ea04106b 18666
3d248aec 18667 rm -Rf build
ea04106b
AX
18668
18669
18670
e10b0808 18671
3d248aec
AX
18672 { $as_echo "$as_me:$LINENO: checking whether iops->getattr() takes a vfsmount" >&5
18673$as_echo_n "checking whether iops->getattr() takes a vfsmount... " >&6; }
ea04106b
AX
18674
18675
18676cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18677/* confdefs.h. */
18678_ACEOF
18679cat confdefs.h >>conftest.$ac_ext
18680cat >>conftest.$ac_ext <<_ACEOF
18681/* end confdefs.h. */
ea04106b
AX
18682
18683
18684 #include <linux/fs.h>
18685
3d248aec
AX
18686 int test_getattr(
18687 struct vfsmount *mnt, struct dentry *d,
18688 struct kstat *k)
68d83c55 18689 { return 0; }
ea04106b 18690
3d248aec
AX
18691 static const struct inode_operations
18692 iops __attribute__ ((unused)) = {
18693 .getattr = test_getattr,
ea04106b
AX
18694 };
18695
18696int
18697main (void)
18698{
18699
18700
18701 ;
18702 return 0;
18703}
18704
18705_ACEOF
18706
18707
18708
18709cat - <<_ACEOF >conftest.h
18710
18711_ACEOF
18712
18713
18714 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18715 echo "obj-m := conftest.o" >build/Makefile
18716 modpost_flag=''
18717 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18718 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18720 (eval $ac_try) 2>&5
18721 ac_status=$?
3d248aec
AX
18722 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18723 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18725 (eval $ac_try) 2>&5
18726 ac_status=$?
3d248aec
AX
18727 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18728 (exit $ac_status); }; }; then
ea04106b 18729
3d248aec
AX
18730 { $as_echo "$as_me:$LINENO: result: yes" >&5
18731$as_echo "yes" >&6; }
ea04106b 18732
3d248aec
AX
18733cat >>confdefs.h <<\_ACEOF
18734#define HAVE_VFSMOUNT_IOPS_GETATTR 1
18735_ACEOF
ea04106b
AX
18736
18737
18738else
18739 $as_echo "$as_me: failed program was:" >&5
18740sed 's/^/| /' conftest.$ac_ext >&5
18741
3d248aec
AX
18742 { $as_echo "$as_me:$LINENO: result: no" >&5
18743$as_echo "no" >&6; }
ea04106b
AX
18744
18745
18746
18747fi
3d248aec 18748
ea04106b
AX
18749 rm -Rf build
18750
18751
18752
18753
ea04106b 18754
3d248aec
AX
18755 { $as_echo "$as_me:$LINENO: checking whether uncached_acl_sentinel() exists" >&5
18756$as_echo_n "checking whether uncached_acl_sentinel() exists... " >&6; }
18757
ea04106b
AX
18758
18759cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18760/* confdefs.h. */
18761_ACEOF
18762cat confdefs.h >>conftest.$ac_ext
18763cat >>conftest.$ac_ext <<_ACEOF
18764/* end confdefs.h. */
ea04106b
AX
18765
18766
18767 #include <linux/fs.h>
18768
ea04106b
AX
18769int
18770main (void)
18771{
18772
3d248aec 18773 void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
ea04106b
AX
18774
18775 ;
18776 return 0;
18777}
18778
18779_ACEOF
18780
18781
18782
18783cat - <<_ACEOF >conftest.h
18784
18785_ACEOF
18786
18787
18788 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18789 echo "obj-m := conftest.o" >build/Makefile
18790 modpost_flag=''
18791 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18792 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18794 (eval $ac_try) 2>&5
18795 ac_status=$?
3d248aec
AX
18796 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18797 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18799 (eval $ac_try) 2>&5
18800 ac_status=$?
3d248aec
AX
18801 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18802 (exit $ac_status); }; }; then
ea04106b 18803
3d248aec
AX
18804 { $as_echo "$as_me:$LINENO: result: yes" >&5
18805$as_echo "yes" >&6; }
ea04106b 18806
3d248aec
AX
18807cat >>confdefs.h <<\_ACEOF
18808#define HAVE_KERNEL_GET_ACL_HANDLE_CACHE 1
18809_ACEOF
ea04106b
AX
18810
18811
18812else
18813 $as_echo "$as_me: failed program was:" >&5
18814sed 's/^/| /' conftest.$ac_ext >&5
18815
3d248aec
AX
18816 { $as_echo "$as_me:$LINENO: result: no" >&5
18817$as_echo "no" >&6; }
ea04106b
AX
18818
18819
18820
18821fi
3d248aec 18822
ea04106b
AX
18823 rm -Rf build
18824
18825
18826
18827
3d248aec
AX
18828 { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5
18829$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
18830
ea04106b
AX
18831
18832
18833cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18834/* confdefs.h. */
18835_ACEOF
18836cat confdefs.h >>conftest.$ac_ext
18837cat >>conftest.$ac_ext <<_ACEOF
18838/* end confdefs.h. */
ea04106b
AX
18839
18840
18841 #include <linux/fs.h>
18842
3d248aec
AX
18843 int show_options (struct seq_file * x, struct dentry * y) { return 0; };
18844 static struct super_operations sops __attribute__ ((unused)) = {
18845 .show_options = show_options,
ea04106b
AX
18846 };
18847
18848int
18849main (void)
18850{
18851
18852
18853 ;
18854 return 0;
18855}
18856
18857_ACEOF
18858
18859
18860
18861cat - <<_ACEOF >conftest.h
18862
18863_ACEOF
18864
18865
18866 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18867 echo "obj-m := conftest.o" >build/Makefile
18868 modpost_flag=''
18869 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18870 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18872 (eval $ac_try) 2>&5
18873 ac_status=$?
3d248aec
AX
18874 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18875 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18877 (eval $ac_try) 2>&5
18878 ac_status=$?
3d248aec
AX
18879 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18880 (exit $ac_status); }; }; then
ea04106b 18881
3d248aec
AX
18882 { $as_echo "$as_me:$LINENO: result: yes" >&5
18883$as_echo "yes" >&6; }
ea04106b 18884
3d248aec
AX
18885cat >>confdefs.h <<\_ACEOF
18886#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1
18887_ACEOF
ea04106b
AX
18888
18889
18890else
18891 $as_echo "$as_me: failed program was:" >&5
18892sed 's/^/| /' conftest.$ac_ext >&5
18893
3d248aec
AX
18894 { $as_echo "$as_me:$LINENO: result: no" >&5
18895$as_echo "no" >&6; }
ea04106b
AX
18896
18897
18898
18899fi
ea04106b 18900
3d248aec 18901 rm -Rf build
ea04106b
AX
18902
18903
18904
ea04106b 18905
3d248aec
AX
18906 { $as_echo "$as_me:$LINENO: checking whether file_inode() is available" >&5
18907$as_echo_n "checking whether file_inode() is available... " >&6; }
ea04106b
AX
18908
18909
18910cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18911/* confdefs.h. */
18912_ACEOF
18913cat confdefs.h >>conftest.$ac_ext
18914cat >>conftest.$ac_ext <<_ACEOF
18915/* end confdefs.h. */
ea04106b
AX
18916
18917
18918 #include <linux/fs.h>
18919
18920int
18921main (void)
18922{
18923
3d248aec
AX
18924 struct file *f = NULL;
18925 file_inode(f);
ea04106b
AX
18926
18927 ;
18928 return 0;
18929}
18930
18931_ACEOF
18932
18933
18934
18935cat - <<_ACEOF >conftest.h
18936
18937_ACEOF
18938
18939
18940 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
18941 echo "obj-m := conftest.o" >build/Makefile
18942 modpost_flag=''
18943 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
18944 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 18945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18946 (eval $ac_try) 2>&5
18947 ac_status=$?
3d248aec
AX
18948 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18949 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
18950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
18951 (eval $ac_try) 2>&5
18952 ac_status=$?
3d248aec
AX
18953 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
18954 (exit $ac_status); }; }; then
ea04106b 18955
3d248aec 18956 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
18957$as_echo "yes" >&6; }
18958
3d248aec
AX
18959cat >>confdefs.h <<\_ACEOF
18960#define HAVE_FILE_INODE 1
18961_ACEOF
ea04106b
AX
18962
18963
18964else
18965 $as_echo "$as_me: failed program was:" >&5
18966sed 's/^/| /' conftest.$ac_ext >&5
18967
3d248aec 18968 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 18969$as_echo "no" >&6; }
68d83c55
AX
18970
18971
18972
18973fi
3d248aec 18974
68d83c55
AX
18975 rm -Rf build
18976
18977
18978
18979
3d248aec
AX
18980 { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5
18981$as_echo_n "checking whether fops->fsync() wants... " >&6; }
18982
ea04106b
AX
18983
18984
18985cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
18986/* confdefs.h. */
18987_ACEOF
18988cat confdefs.h >>conftest.$ac_ext
18989cat >>conftest.$ac_ext <<_ACEOF
18990/* end confdefs.h. */
ea04106b
AX
18991
18992
4d815aed 18993 #include <linux/fs.h>
68d83c55 18994
3d248aec
AX
18995 int test_fsync(struct file *f, struct dentry *dentry, int x)
18996 { return 0; }
68d83c55 18997
3d248aec
AX
18998 static const struct file_operations
18999 fops __attribute__ ((unused)) = {
19000 .fsync = test_fsync,
68d83c55 19001 };
ea04106b
AX
19002
19003int
19004main (void)
19005{
19006
19007
19008 ;
19009 return 0;
19010}
19011
19012_ACEOF
19013
19014
19015
19016cat - <<_ACEOF >conftest.h
19017
19018_ACEOF
19019
19020
19021 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19022 echo "obj-m := conftest.o" >build/Makefile
19023 modpost_flag=''
19024 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19025 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 19026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19027 (eval $ac_try) 2>&5
19028 ac_status=$?
3d248aec
AX
19029 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19030 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19032 (eval $ac_try) 2>&5
19033 ac_status=$?
3d248aec
AX
19034 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19035 (exit $ac_status); }; }; then
ea04106b 19036
3d248aec
AX
19037 { $as_echo "$as_me:$LINENO: result: dentry" >&5
19038$as_echo "dentry" >&6; }
ea04106b 19039
3d248aec
AX
19040cat >>confdefs.h <<\_ACEOF
19041#define HAVE_FSYNC_WITH_DENTRY 1
19042_ACEOF
ea04106b
AX
19043
19044
19045else
19046 $as_echo "$as_me: failed program was:" >&5
19047sed 's/^/| /' conftest.$ac_ext >&5
19048
4d815aed
AX
19049
19050
19051
19052fi
3d248aec 19053
4d815aed
AX
19054 rm -Rf build
19055
19056
19057
19058
19059
4d815aed 19060
68d83c55 19061cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
19062/* confdefs.h. */
19063_ACEOF
19064cat confdefs.h >>conftest.$ac_ext
19065cat >>conftest.$ac_ext <<_ACEOF
19066/* end confdefs.h. */
4d815aed
AX
19067
19068
68d83c55 19069 #include <linux/fs.h>
4d815aed 19070
3d248aec 19071 int test_fsync(struct file *f, int x) { return 0; }
4d815aed 19072
3d248aec
AX
19073 static const struct file_operations
19074 fops __attribute__ ((unused)) = {
19075 .fsync = test_fsync,
19076 };
19077
19078int
19079main (void)
19080{
19081
19082
19083 ;
19084 return 0;
19085}
19086
19087_ACEOF
19088
19089
19090
19091cat - <<_ACEOF >conftest.h
19092
19093_ACEOF
19094
19095
19096 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19097 echo "obj-m := conftest.o" >build/Makefile
19098 modpost_flag=''
19099 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19100 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
19101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19102 (eval $ac_try) 2>&5
19103 ac_status=$?
19104 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19105 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19107 (eval $ac_try) 2>&5
19108 ac_status=$?
19109 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19110 (exit $ac_status); }; }; then
19111
19112 { $as_echo "$as_me:$LINENO: result: no dentry" >&5
19113$as_echo "no dentry" >&6; }
19114
19115cat >>confdefs.h <<\_ACEOF
19116#define HAVE_FSYNC_WITHOUT_DENTRY 1
19117_ACEOF
19118
19119
19120else
19121 $as_echo "$as_me: failed program was:" >&5
19122sed 's/^/| /' conftest.$ac_ext >&5
19123
19124
19125
19126
19127fi
19128
19129 rm -Rf build
19130
19131
19132
19133
19134
19135
19136cat confdefs.h - <<_ACEOF >conftest.c
19137/* confdefs.h. */
19138_ACEOF
19139cat confdefs.h >>conftest.$ac_ext
19140cat >>conftest.$ac_ext <<_ACEOF
19141/* end confdefs.h. */
19142
19143
19144 #include <linux/fs.h>
19145
19146 int test_fsync(struct file *f, loff_t a, loff_t b, int c)
19147 { return 0; }
19148
19149 static const struct file_operations
19150 fops __attribute__ ((unused)) = {
19151 .fsync = test_fsync,
68d83c55
AX
19152 };
19153
19154int
19155main (void)
19156{
19157
19158
19159 ;
19160 return 0;
19161}
19162
19163_ACEOF
19164
19165
19166
19167cat - <<_ACEOF >conftest.h
19168
19169_ACEOF
4d815aed 19170
4d815aed 19171
68d83c55
AX
19172 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19173 echo "obj-m := conftest.o" >build/Makefile
19174 modpost_flag=''
19175 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19176 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 19177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
19178 (eval $ac_try) 2>&5
19179 ac_status=$?
3d248aec
AX
19180 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19181 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
19183 (eval $ac_try) 2>&5
19184 ac_status=$?
3d248aec
AX
19185 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19186 (exit $ac_status); }; }; then
19187
19188 { $as_echo "$as_me:$LINENO: result: range" >&5
19189$as_echo "range" >&6; }
19190
19191cat >>confdefs.h <<\_ACEOF
19192#define HAVE_FSYNC_RANGE 1
19193_ACEOF
19194
19195
19196else
19197 $as_echo "$as_me: failed program was:" >&5
19198sed 's/^/| /' conftest.$ac_ext >&5
19199
19200
19201
19202
19203fi
19204
19205 rm -Rf build
19206
19207
68d83c55 19208
3d248aec
AX
19209
19210
19211 { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5
19212$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
19213
19214
19215cat confdefs.h - <<_ACEOF >conftest.c
19216/* confdefs.h. */
19217_ACEOF
19218cat confdefs.h >>conftest.$ac_ext
19219cat >>conftest.$ac_ext <<_ACEOF
19220/* end confdefs.h. */
19221
19222
19223 #include <linux/fs.h>
19224 void evict_inode (struct inode * t) { return; }
19225 static struct super_operations sops __attribute__ ((unused)) = {
19226 .evict_inode = evict_inode,
19227 };
19228
19229int
19230main (void)
19231{
19232
19233
19234 ;
19235 return 0;
19236}
19237
19238_ACEOF
19239
19240
19241
19242cat - <<_ACEOF >conftest.h
19243
19244_ACEOF
19245
19246
19247 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19248 echo "obj-m := conftest.o" >build/Makefile
19249 modpost_flag=''
19250 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19251 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
19252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19253 (eval $ac_try) 2>&5
19254 ac_status=$?
19255 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19256 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19258 (eval $ac_try) 2>&5
19259 ac_status=$?
19260 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19261 (exit $ac_status); }; }; then
19262
19263 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
19264$as_echo "yes" >&6; }
19265
3d248aec
AX
19266cat >>confdefs.h <<\_ACEOF
19267#define HAVE_EVICT_INODE 1
19268_ACEOF
4d815aed 19269
ea04106b 19270
68d83c55
AX
19271else
19272 $as_echo "$as_me: failed program was:" >&5
19273sed 's/^/| /' conftest.$ac_ext >&5
19274
3d248aec 19275 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
19276$as_echo "no" >&6; }
19277
ea04106b
AX
19278
19279
19280fi
3d248aec 19281
ea04106b
AX
19282 rm -Rf build
19283
19284
19285
19286
3d248aec
AX
19287 { $as_echo "$as_me:$LINENO: checking whether sops->dirty_inode() wants flags" >&5
19288$as_echo_n "checking whether sops->dirty_inode() wants flags... " >&6; }
ea04106b
AX
19289
19290
19291cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
19292/* confdefs.h. */
19293_ACEOF
19294cat confdefs.h >>conftest.$ac_ext
19295cat >>conftest.$ac_ext <<_ACEOF
19296/* end confdefs.h. */
ea04106b
AX
19297
19298
68d83c55
AX
19299 #include <linux/fs.h>
19300
3d248aec 19301 void dirty_inode(struct inode *a, int b) { return; }
68d83c55
AX
19302
19303 static const struct super_operations
19304 sops __attribute__ ((unused)) = {
3d248aec 19305 .dirty_inode = dirty_inode,
68d83c55 19306 };
ea04106b
AX
19307
19308int
19309main (void)
19310{
19311
ea04106b
AX
19312
19313 ;
19314 return 0;
19315}
19316
19317_ACEOF
19318
19319
19320
19321cat - <<_ACEOF >conftest.h
19322
19323_ACEOF
19324
19325
19326 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19327 echo "obj-m := conftest.o" >build/Makefile
19328 modpost_flag=''
19329 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19330 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 19331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19332 (eval $ac_try) 2>&5
19333 ac_status=$?
3d248aec
AX
19334 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19335 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19337 (eval $ac_try) 2>&5
19338 ac_status=$?
3d248aec
AX
19339 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19340 (exit $ac_status); }; }; then
ea04106b 19341
3d248aec 19342 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 19343$as_echo "yes" >&6; }
ea04106b 19344
3d248aec
AX
19345cat >>confdefs.h <<\_ACEOF
19346#define HAVE_DIRTY_INODE_WITH_FLAGS 1
19347_ACEOF
ea04106b
AX
19348
19349
19350else
19351 $as_echo "$as_me: failed program was:" >&5
19352sed 's/^/| /' conftest.$ac_ext >&5
19353
3d248aec 19354 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
19355$as_echo "no" >&6; }
19356
19357
19358
19359fi
68d83c55 19360
3d248aec 19361 rm -Rf build
68d83c55
AX
19362
19363
19364
19365
3d248aec
AX
19366 { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5
19367$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
ea04106b
AX
19368
19369
19370cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
19371/* confdefs.h. */
19372_ACEOF
19373cat confdefs.h >>conftest.$ac_ext
19374cat >>conftest.$ac_ext <<_ACEOF
19375/* end confdefs.h. */
ea04106b
AX
19376
19377
68d83c55
AX
19378 #include <linux/fs.h>
19379
3d248aec 19380 int nr_cached_objects(struct super_block *sb) { return 0; }
68d83c55 19381
3d248aec
AX
19382 static const struct super_operations
19383 sops __attribute__ ((unused)) = {
19384 .nr_cached_objects = nr_cached_objects,
68d83c55 19385 };
ea04106b
AX
19386
19387int
19388main (void)
19389{
19390
19391
19392 ;
19393 return 0;
19394}
19395
19396_ACEOF
19397
19398
19399
19400cat - <<_ACEOF >conftest.h
19401
19402_ACEOF
19403
19404
19405 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19406 echo "obj-m := conftest.o" >build/Makefile
19407 modpost_flag=''
19408 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19409 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 19410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19411 (eval $ac_try) 2>&5
19412 ac_status=$?
3d248aec
AX
19413 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19414 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19416 (eval $ac_try) 2>&5
19417 ac_status=$?
3d248aec
AX
19418 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19419 (exit $ac_status); }; }; then
ea04106b 19420
3d248aec 19421 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 19422$as_echo "yes" >&6; }
ea04106b 19423
3d248aec
AX
19424cat >>confdefs.h <<\_ACEOF
19425#define HAVE_NR_CACHED_OBJECTS 1
19426_ACEOF
ea04106b
AX
19427
19428
19429else
19430 $as_echo "$as_me: failed program was:" >&5
19431sed 's/^/| /' conftest.$ac_ext >&5
19432
3d248aec 19433 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 19434$as_echo "no" >&6; }
68d83c55
AX
19435
19436
19437
19438fi
3d248aec 19439
68d83c55
AX
19440 rm -Rf build
19441
19442
19443
19444
3d248aec
AX
19445 { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5
19446$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
ea04106b
AX
19447
19448
19449cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
19450/* confdefs.h. */
19451_ACEOF
19452cat confdefs.h >>conftest.$ac_ext
19453cat >>conftest.$ac_ext <<_ACEOF
19454/* end confdefs.h. */
ea04106b
AX
19455
19456
68d83c55
AX
19457 #include <linux/fs.h>
19458
3d248aec
AX
19459 void free_cached_objects(struct super_block *sb, int x)
19460 { return; }
68d83c55 19461
3d248aec
AX
19462 static const struct super_operations
19463 sops __attribute__ ((unused)) = {
19464 .free_cached_objects = free_cached_objects,
68d83c55 19465 };
ea04106b 19466
ea04106b
AX
19467int
19468main (void)
19469{
19470
19471
19472 ;
19473 return 0;
19474}
19475
19476_ACEOF
19477
19478
19479
19480cat - <<_ACEOF >conftest.h
19481
19482_ACEOF
19483
19484
19485 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19486 echo "obj-m := conftest.o" >build/Makefile
19487 modpost_flag=''
19488 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19489 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 19490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19491 (eval $ac_try) 2>&5
19492 ac_status=$?
3d248aec
AX
19493 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19494 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19496 (eval $ac_try) 2>&5
19497 ac_status=$?
3d248aec
AX
19498 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19499 (exit $ac_status); }; }; then
4d815aed 19500
3d248aec 19501 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
19502$as_echo "yes" >&6; }
19503
3d248aec
AX
19504cat >>confdefs.h <<\_ACEOF
19505#define HAVE_FREE_CACHED_OBJECTS 1
19506_ACEOF
4d815aed
AX
19507
19508
e10b0808
AX
19509else
19510 $as_echo "$as_me: failed program was:" >&5
19511sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 19512
3d248aec 19513 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 19514$as_echo "no" >&6; }
e10b0808 19515
e10b0808 19516
ea04106b 19517
4d815aed 19518fi
3d248aec 19519
4d815aed 19520 rm -Rf build
ea04106b
AX
19521
19522
19523
ea04106b
AX
19524
19525
3d248aec
AX
19526 { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5
19527$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
ea04106b
AX
19528
19529
e10b0808 19530cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
19531/* confdefs.h. */
19532_ACEOF
19533cat confdefs.h >>conftest.$ac_ext
19534cat >>conftest.$ac_ext <<_ACEOF
19535/* end confdefs.h. */
ea04106b 19536
ea04106b 19537
e10b0808 19538 #include <linux/fs.h>
68d83c55 19539
3d248aec
AX
19540 long test_fallocate(struct file *file, int mode,
19541 loff_t offset, loff_t len) { return 0; }
19542
68d83c55
AX
19543 static const struct file_operations
19544 fops __attribute__ ((unused)) = {
3d248aec 19545 .fallocate = test_fallocate,
4d815aed 19546 };
ea04106b
AX
19547
19548int
19549main (void)
19550{
19551
19552
19553 ;
19554 return 0;
19555}
19556
19557_ACEOF
19558
19559
19560
19561cat - <<_ACEOF >conftest.h
19562
19563_ACEOF
19564
19565
19566 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19567 echo "obj-m := conftest.o" >build/Makefile
19568 modpost_flag=''
19569 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19570 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 19571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19572 (eval $ac_try) 2>&5
19573 ac_status=$?
3d248aec
AX
19574 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19575 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19576 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19577 (eval $ac_try) 2>&5
19578 ac_status=$?
3d248aec
AX
19579 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19580 (exit $ac_status); }; }; then
4d815aed 19581
3d248aec 19582 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
19583$as_echo "yes" >&6; }
19584
3d248aec
AX
19585cat >>confdefs.h <<\_ACEOF
19586#define HAVE_FILE_FALLOCATE 1
19587_ACEOF
4d815aed
AX
19588
19589
e10b0808
AX
19590else
19591 $as_echo "$as_me: failed program was:" >&5
19592sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 19593
3d248aec 19594 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
19595$as_echo "no" >&6; }
19596
ea04106b 19597
ea04106b 19598
e10b0808 19599fi
3d248aec 19600
e10b0808 19601 rm -Rf build
ea04106b
AX
19602
19603
e10b0808 19604
e10b0808 19605
3d248aec
AX
19606 { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5
19607$as_echo_n "checking whether iops->fallocate() exists... " >&6; }
e10b0808 19608
ea04106b 19609
4d815aed 19610cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
19611/* confdefs.h. */
19612_ACEOF
19613cat confdefs.h >>conftest.$ac_ext
19614cat >>conftest.$ac_ext <<_ACEOF
19615/* end confdefs.h. */
ea04106b
AX
19616
19617
68d83c55
AX
19618 #include <linux/fs.h>
19619
3d248aec
AX
19620 long test_fallocate(struct inode *inode, int mode,
19621 loff_t offset, loff_t len) { return 0; }
68d83c55
AX
19622
19623 static const struct inode_operations
3d248aec
AX
19624 fops __attribute__ ((unused)) = {
19625 .fallocate = test_fallocate,
4d815aed
AX
19626 };
19627
19628int
19629main (void)
19630{
19631
19632
19633 ;
19634 return 0;
19635}
19636
19637_ACEOF
19638
19639
19640
19641cat - <<_ACEOF >conftest.h
19642
19643_ACEOF
19644
19645
19646 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19647 echo "obj-m := conftest.o" >build/Makefile
19648 modpost_flag=''
19649 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19650 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 19651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
19652 (eval $ac_try) 2>&5
19653 ac_status=$?
3d248aec
AX
19654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19655 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19656 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
19657 (eval $ac_try) 2>&5
19658 ac_status=$?
3d248aec
AX
19659 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19660 (exit $ac_status); }; }; then
ea04106b 19661
3d248aec 19662 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 19663$as_echo "yes" >&6; }
ea04106b 19664
3d248aec
AX
19665cat >>confdefs.h <<\_ACEOF
19666#define HAVE_INODE_FALLOCATE 1
19667_ACEOF
ea04106b
AX
19668
19669
4d815aed
AX
19670else
19671 $as_echo "$as_me: failed program was:" >&5
19672sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 19673
3d248aec 19674 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 19675$as_echo "no" >&6; }
ea04106b 19676
e10b0808 19677
ea04106b 19678
4d815aed 19679fi
3d248aec 19680
4d815aed
AX
19681 rm -Rf build
19682
19683
19684
19685
3d248aec
AX
19686
19687 { $as_echo "$as_me:$LINENO: checking whether fops->aio_fsync() exists" >&5
19688$as_echo_n "checking whether fops->aio_fsync() exists... " >&6; }
4d815aed 19689
ea04106b
AX
19690
19691cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
19692/* confdefs.h. */
19693_ACEOF
19694cat confdefs.h >>conftest.$ac_ext
19695cat >>conftest.$ac_ext <<_ACEOF
19696/* end confdefs.h. */
ea04106b
AX
19697
19698
68d83c55
AX
19699 #include <linux/fs.h>
19700
3d248aec
AX
19701 static const struct file_operations
19702 fops __attribute__ ((unused)) = {
19703 .aio_fsync = NULL,
4d815aed 19704 };
ea04106b
AX
19705
19706int
19707main (void)
19708{
19709
19710
19711 ;
19712 return 0;
19713}
19714
19715_ACEOF
19716
19717
19718
19719cat - <<_ACEOF >conftest.h
19720
19721_ACEOF
19722
19723
19724 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19725 echo "obj-m := conftest.o" >build/Makefile
19726 modpost_flag=''
19727 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19728 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 19729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19730 (eval $ac_try) 2>&5
19731 ac_status=$?
3d248aec
AX
19732 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19733 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
19735 (eval $ac_try) 2>&5
19736 ac_status=$?
3d248aec
AX
19737 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19738 (exit $ac_status); }; }; then
4d815aed 19739
3d248aec 19740 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
19741$as_echo "yes" >&6; }
19742
3d248aec
AX
19743cat >>confdefs.h <<\_ACEOF
19744#define HAVE_FILE_AIO_FSYNC 1
19745_ACEOF
19746
19747
19748else
19749 $as_echo "$as_me: failed program was:" >&5
19750sed 's/^/| /' conftest.$ac_ext >&5
19751
19752 { $as_echo "$as_me:$LINENO: result: no" >&5
19753$as_echo "no" >&6; }
19754
19755
19756
19757fi
19758
19759 rm -Rf build
19760
19761
19762
19763
19764 { $as_echo "$as_me:$LINENO: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5
19765$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; }
19766
19767
19768cat confdefs.h - <<_ACEOF >conftest.c
19769/* confdefs.h. */
19770_ACEOF
19771cat confdefs.h >>conftest.$ac_ext
19772cat >>conftest.$ac_ext <<_ACEOF
19773/* end confdefs.h. */
19774
19775
19776 #include <linux/fs.h>
19777
19778 int mkdir(struct inode *inode, struct dentry *dentry,
19779 umode_t umode) { return 0; }
19780
19781 static const struct inode_operations
19782 iops __attribute__ ((unused)) = {
19783 .mkdir = mkdir,
19784 };
19785
19786int
19787main (void)
19788{
19789
19790
19791 ;
19792 return 0;
19793}
19794
19795_ACEOF
19796
19797
19798
19799cat - <<_ACEOF >conftest.h
19800
19801_ACEOF
19802
19803
19804 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19805 echo "obj-m := conftest.o" >build/Makefile
19806 modpost_flag=''
19807 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19808 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
19809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19810 (eval $ac_try) 2>&5
19811 ac_status=$?
19812 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19813 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19815 (eval $ac_try) 2>&5
19816 ac_status=$?
19817 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19818 (exit $ac_status); }; }; then
19819
19820 { $as_echo "$as_me:$LINENO: result: yes" >&5
19821$as_echo "yes" >&6; }
19822
19823cat >>confdefs.h <<\_ACEOF
19824#define HAVE_MKDIR_UMODE_T 1
19825_ACEOF
4d815aed
AX
19826
19827
ea04106b
AX
19828else
19829 $as_echo "$as_me: failed program was:" >&5
19830sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 19831
3d248aec 19832 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
19833$as_echo "no" >&6; }
19834
ea04106b
AX
19835
19836
19837fi
3d248aec 19838
ea04106b
AX
19839 rm -Rf build
19840
19841
19842
19843
3d248aec
AX
19844 { $as_echo "$as_me:$LINENO: checking whether iops->lookup() passes nameidata" >&5
19845$as_echo_n "checking whether iops->lookup() passes nameidata... " >&6; }
19846
19847
19848cat confdefs.h - <<_ACEOF >conftest.c
19849/* confdefs.h. */
19850_ACEOF
19851cat confdefs.h >>conftest.$ac_ext
19852cat >>conftest.$ac_ext <<_ACEOF
19853/* end confdefs.h. */
19854
19855
19856 #include <linux/fs.h>
19857
19858 struct dentry *inode_lookup(struct inode *inode,
19859 struct dentry *dentry, struct nameidata *nidata)
19860 { return NULL; }
19861
19862 static const struct inode_operations iops
19863 __attribute__ ((unused)) = {
19864 .lookup = inode_lookup,
19865 };
19866
19867int
19868main (void)
19869{
19870
19871
19872 ;
19873 return 0;
19874}
19875
19876_ACEOF
19877
19878
19879
19880cat - <<_ACEOF >conftest.h
19881
19882_ACEOF
19883
19884
19885 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19886 echo "obj-m := conftest.o" >build/Makefile
19887 modpost_flag=''
19888 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19889 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
19890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19891 (eval $ac_try) 2>&5
19892 ac_status=$?
19893 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19894 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19896 (eval $ac_try) 2>&5
19897 ac_status=$?
19898 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19899 (exit $ac_status); }; }; then
19900
19901 { $as_echo "$as_me:$LINENO: result: yes" >&5
19902$as_echo "yes" >&6; }
19903
19904cat >>confdefs.h <<\_ACEOF
19905#define HAVE_LOOKUP_NAMEIDATA 1
19906_ACEOF
19907
19908
19909else
19910 $as_echo "$as_me: failed program was:" >&5
19911sed 's/^/| /' conftest.$ac_ext >&5
19912
19913 { $as_echo "$as_me:$LINENO: result: no" >&5
19914$as_echo "no" >&6; }
19915
19916
19917
19918fi
19919
19920 rm -Rf build
19921
19922
19923
19924
19925 { $as_echo "$as_me:$LINENO: checking whether iops->create() passes nameidata" >&5
68d83c55 19926$as_echo_n "checking whether iops->create() passes nameidata... " >&6; }
ea04106b
AX
19927
19928
4d815aed 19929cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
19930/* confdefs.h. */
19931_ACEOF
19932cat confdefs.h >>conftest.$ac_ext
19933cat >>conftest.$ac_ext <<_ACEOF
19934/* end confdefs.h. */
ea04106b
AX
19935
19936
68d83c55
AX
19937 #include <linux/fs.h>
19938
19939 #ifdef HAVE_MKDIR_UMODE_T
19940 int inode_create(struct inode *inode ,struct dentry *dentry,
19941 umode_t umode, struct nameidata *nidata) { return 0; }
19942 #else
19943 int inode_create(struct inode *inode,struct dentry *dentry,
19944 int umode, struct nameidata * nidata) { return 0; }
19945 #endif
19946
19947 static const struct inode_operations
19948 iops __attribute__ ((unused)) = {
19949 .create = inode_create,
4d815aed
AX
19950 };
19951
19952int
19953main (void)
19954{
19955
19956
19957 ;
19958 return 0;
19959}
19960
19961_ACEOF
19962
19963
19964
19965cat - <<_ACEOF >conftest.h
19966
19967_ACEOF
19968
19969
19970 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
19971 echo "obj-m := conftest.o" >build/Makefile
19972 modpost_flag=''
19973 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
19974 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 19975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
19976 (eval $ac_try) 2>&5
19977 ac_status=$?
3d248aec
AX
19978 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19979 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
19980 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
19981 (eval $ac_try) 2>&5
19982 ac_status=$?
3d248aec
AX
19983 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
19984 (exit $ac_status); }; }; then
ea04106b 19985
3d248aec 19986 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
19987$as_echo "yes" >&6; }
19988
3d248aec
AX
19989cat >>confdefs.h <<\_ACEOF
19990#define HAVE_CREATE_NAMEIDATA 1
19991_ACEOF
ea04106b 19992
ea04106b 19993
4d815aed
AX
19994else
19995 $as_echo "$as_me: failed program was:" >&5
19996sed 's/^/| /' conftest.$ac_ext >&5
19997
3d248aec 19998 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 19999$as_echo "no" >&6; }
ea04106b
AX
20000
20001
4d815aed
AX
20002
20003fi
3d248aec 20004
4d815aed
AX
20005 rm -Rf build
20006
20007
20008
ea04106b 20009
3d248aec 20010 { $as_echo "$as_me:$LINENO: checking whether iops->get_link() passes delayed" >&5
68d83c55 20011$as_echo_n "checking whether iops->get_link() passes delayed... " >&6; }
ea04106b
AX
20012
20013
20014cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20015/* confdefs.h. */
20016_ACEOF
20017cat confdefs.h >>conftest.$ac_ext
20018cat >>conftest.$ac_ext <<_ACEOF
20019/* end confdefs.h. */
ea04106b
AX
20020
20021
4d815aed 20022 #include <linux/fs.h>
68d83c55
AX
20023 const char *get_link(struct dentry *de, struct inode *ip,
20024 struct delayed_call *done) { return "symlink"; }
20025 static struct inode_operations
20026 iops __attribute__ ((unused)) = {
20027 .get_link = get_link,
20028 };
ea04106b
AX
20029
20030int
20031main (void)
20032{
20033
20034
20035 ;
20036 return 0;
20037}
20038
20039_ACEOF
20040
20041
20042
20043cat - <<_ACEOF >conftest.h
20044
20045_ACEOF
20046
20047
20048 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20049 echo "obj-m := conftest.o" >build/Makefile
20050 modpost_flag=''
20051 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20052 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20054 (eval $ac_try) 2>&5
20055 ac_status=$?
3d248aec
AX
20056 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20057 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20059 (eval $ac_try) 2>&5
20060 ac_status=$?
3d248aec
AX
20061 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20062 (exit $ac_status); }; }; then
ea04106b 20063
3d248aec 20064 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 20065$as_echo "yes" >&6; }
ea04106b 20066
3d248aec
AX
20067cat >>confdefs.h <<\_ACEOF
20068#define HAVE_GET_LINK_DELAYED 1
20069_ACEOF
ea04106b
AX
20070
20071
68d83c55
AX
20072else
20073 $as_echo "$as_me: failed program was:" >&5
20074sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 20075
3d248aec 20076 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 20077$as_echo "no" >&6; }
3d248aec 20078 { $as_echo "$as_me:$LINENO: checking whether iops->get_link() passes cookie" >&5
68d83c55 20079$as_echo_n "checking whether iops->get_link() passes cookie... " >&6; }
ea04106b 20080
ea04106b 20081
e10b0808 20082cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20083/* confdefs.h. */
20084_ACEOF
20085cat confdefs.h >>conftest.$ac_ext
20086cat >>conftest.$ac_ext <<_ACEOF
20087/* end confdefs.h. */
ea04106b 20088
e10b0808 20089
68d83c55
AX
20090 #include <linux/fs.h>
20091 const char *get_link(struct dentry *de, struct
20092 inode *ip, void **cookie) { return "symlink"; }
20093 static struct inode_operations
20094 iops __attribute__ ((unused)) = {
20095 .get_link = get_link,
20096 };
ea04106b
AX
20097
20098int
20099main (void)
20100{
20101
20102
20103 ;
20104 return 0;
20105}
20106
20107_ACEOF
20108
20109
20110
20111cat - <<_ACEOF >conftest.h
20112
20113_ACEOF
20114
20115
20116 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20117 echo "obj-m := conftest.o" >build/Makefile
20118 modpost_flag=''
20119 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20120 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20122 (eval $ac_try) 2>&5
20123 ac_status=$?
3d248aec
AX
20124 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20125 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20127 (eval $ac_try) 2>&5
20128 ac_status=$?
3d248aec
AX
20129 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20130 (exit $ac_status); }; }; then
ea04106b 20131
3d248aec 20132 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 20133$as_echo "yes" >&6; }
ea04106b 20134
3d248aec
AX
20135cat >>confdefs.h <<\_ACEOF
20136#define HAVE_GET_LINK_COOKIE 1
20137_ACEOF
ea04106b
AX
20138
20139
68d83c55
AX
20140else
20141 $as_echo "$as_me: failed program was:" >&5
20142sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 20143
3d248aec 20144 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 20145$as_echo "no" >&6; }
ea04106b 20146
3d248aec 20147 { $as_echo "$as_me:$LINENO: checking whether iops->follow_link() passes cookie" >&5
68d83c55 20148$as_echo_n "checking whether iops->follow_link() passes cookie... " >&6; }
ea04106b
AX
20149
20150
e10b0808 20151cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20152/* confdefs.h. */
20153_ACEOF
20154cat confdefs.h >>conftest.$ac_ext
20155cat >>conftest.$ac_ext <<_ACEOF
20156/* end confdefs.h. */
ea04106b 20157
ea04106b 20158
68d83c55
AX
20159 #include <linux/fs.h>
20160 const char *follow_link(struct dentry *de,
20161 void **cookie) { return "symlink"; }
20162 static struct inode_operations
20163 iops __attribute__ ((unused)) = {
20164 .follow_link = follow_link,
20165 };
ea04106b
AX
20166
20167int
20168main (void)
20169{
20170
20171
20172 ;
20173 return 0;
20174}
20175
20176_ACEOF
20177
20178
20179
20180cat - <<_ACEOF >conftest.h
20181
20182_ACEOF
20183
20184
20185 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20186 echo "obj-m := conftest.o" >build/Makefile
20187 modpost_flag=''
20188 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20189 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20191 (eval $ac_try) 2>&5
20192 ac_status=$?
3d248aec
AX
20193 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20194 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20196 (eval $ac_try) 2>&5
20197 ac_status=$?
3d248aec
AX
20198 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20199 (exit $ac_status); }; }; then
e10b0808 20200
3d248aec 20201 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
20202$as_echo "yes" >&6; }
20203
3d248aec
AX
20204cat >>confdefs.h <<\_ACEOF
20205#define HAVE_FOLLOW_LINK_COOKIE 1
20206_ACEOF
e10b0808
AX
20207
20208
68d83c55
AX
20209else
20210 $as_echo "$as_me: failed program was:" >&5
20211sed 's/^/| /' conftest.$ac_ext >&5
e10b0808 20212
3d248aec 20213 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 20214$as_echo "no" >&6; }
3d248aec 20215 { $as_echo "$as_me:$LINENO: checking whether iops->follow_link() passes nameidata" >&5
68d83c55 20216$as_echo_n "checking whether iops->follow_link() passes nameidata... " >&6; }
e10b0808
AX
20217
20218
20219cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20220/* confdefs.h. */
20221_ACEOF
20222cat confdefs.h >>conftest.$ac_ext
20223cat >>conftest.$ac_ext <<_ACEOF
20224/* end confdefs.h. */
e10b0808
AX
20225
20226
68d83c55
AX
20227 #include <linux/fs.h>
20228 void *follow_link(struct dentry *de, struct
20229 nameidata *nd) { return (void *)NULL; }
20230 static struct inode_operations
20231 iops __attribute__ ((unused)) = {
20232 .follow_link = follow_link,
20233 };
e10b0808 20234
ea04106b
AX
20235int
20236main (void)
20237{
20238
20239
20240 ;
20241 return 0;
20242}
20243
20244_ACEOF
20245
20246
20247
20248cat - <<_ACEOF >conftest.h
20249
20250_ACEOF
20251
20252
20253 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20254 echo "obj-m := conftest.o" >build/Makefile
20255 modpost_flag=''
20256 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20257 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20259 (eval $ac_try) 2>&5
20260 ac_status=$?
3d248aec
AX
20261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20262 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20264 (eval $ac_try) 2>&5
20265 ac_status=$?
3d248aec
AX
20266 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20267 (exit $ac_status); }; }; then
68d83c55 20268
3d248aec 20269 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
20270$as_echo "yes" >&6; }
20271
3d248aec
AX
20272cat >>confdefs.h <<\_ACEOF
20273#define HAVE_FOLLOW_LINK_NAMEIDATA 1
20274_ACEOF
68d83c55
AX
20275
20276
ea04106b
AX
20277else
20278 $as_echo "$as_me: failed program was:" >&5
20279sed 's/^/| /' conftest.$ac_ext >&5
68d83c55 20280
3d248aec
AX
20281 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
20282$as_echo "$as_me: error: no; please file a bug report" >&2;}
20283 { (exit 1); exit 1; }; }
68d83c55 20284
ea04106b
AX
20285
20286
20287fi
3d248aec 20288
ea04106b
AX
20289 rm -Rf build
20290
20291
20292
20293
ea04106b 20294
68d83c55 20295fi
3d248aec 20296
68d83c55 20297 rm -Rf build
ea04106b 20298
ea04106b
AX
20299
20300
ea04106b 20301
ea04106b 20302
ea04106b 20303
68d83c55 20304fi
3d248aec 20305
68d83c55
AX
20306 rm -Rf build
20307
20308
20309
20310
20311
20312fi
3d248aec 20313
68d83c55 20314 rm -Rf build
ea04106b
AX
20315
20316
20317
20318
ea04106b
AX
20319
20320
20321cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20322/* confdefs.h. */
20323_ACEOF
20324cat confdefs.h >>conftest.$ac_ext
20325cat >>conftest.$ac_ext <<_ACEOF
20326/* end confdefs.h. */
ea04106b
AX
20327
20328
68d83c55
AX
20329 #if !defined(HAVE_GET_LINK_DELAYED)
20330 #error "Expecting get_link() delayed done"
20331 #endif
ea04106b 20332
ea04106b
AX
20333int
20334main (void)
20335{
20336
20337
20338 ;
20339 return 0;
20340}
20341
20342_ACEOF
20343
20344
20345
20346cat - <<_ACEOF >conftest.h
20347
20348_ACEOF
20349
20350
20351 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20352 echo "obj-m := conftest.o" >build/Makefile
20353 modpost_flag=''
20354 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20355 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20357 (eval $ac_try) 2>&5
20358 ac_status=$?
3d248aec
AX
20359 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20360 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20361 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20362 (eval $ac_try) 2>&5
20363 ac_status=$?
3d248aec
AX
20364 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20365 (exit $ac_status); }; }; then
68d83c55
AX
20366
20367
3d248aec
AX
20368cat >>confdefs.h <<\_ACEOF
20369#define HAVE_PUT_LINK_DELAYED 1
20370_ACEOF
68d83c55
AX
20371
20372
e10b0808
AX
20373else
20374 $as_echo "$as_me: failed program was:" >&5
20375sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 20376
3d248aec 20377 { $as_echo "$as_me:$LINENO: checking whether iops->put_link() passes cookie" >&5
68d83c55 20378$as_echo_n "checking whether iops->put_link() passes cookie... " >&6; }
ea04106b 20379
ea04106b 20380
68d83c55 20381cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20382/* confdefs.h. */
20383_ACEOF
20384cat confdefs.h >>conftest.$ac_ext
20385cat >>conftest.$ac_ext <<_ACEOF
20386/* end confdefs.h. */
ea04106b 20387
ea04106b 20388
68d83c55
AX
20389 #include <linux/fs.h>
20390 void put_link(struct inode *ip, void *cookie)
20391 { return; }
20392 static struct inode_operations
20393 iops __attribute__ ((unused)) = {
20394 .put_link = put_link,
20395 };
ea04106b 20396
68d83c55
AX
20397int
20398main (void)
20399{
e10b0808 20400
e10b0808 20401
68d83c55
AX
20402 ;
20403 return 0;
20404}
ea04106b 20405
68d83c55 20406_ACEOF
ea04106b 20407
ea04106b
AX
20408
20409
68d83c55 20410cat - <<_ACEOF >conftest.h
ea04106b 20411
68d83c55 20412_ACEOF
ea04106b 20413
ea04106b 20414
68d83c55
AX
20415 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20416 echo "obj-m := conftest.o" >build/Makefile
20417 modpost_flag=''
20418 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20419 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
20421 (eval $ac_try) 2>&5
20422 ac_status=$?
3d248aec
AX
20423 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20424 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20425 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
20426 (eval $ac_try) 2>&5
20427 ac_status=$?
3d248aec
AX
20428 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20429 (exit $ac_status); }; }; then
ea04106b 20430
3d248aec 20431 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
20432$as_echo "yes" >&6; }
20433
3d248aec
AX
20434cat >>confdefs.h <<\_ACEOF
20435#define HAVE_PUT_LINK_COOKIE 1
20436_ACEOF
68d83c55
AX
20437
20438
20439else
20440 $as_echo "$as_me: failed program was:" >&5
20441sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 20442
3d248aec 20443 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 20444$as_echo "no" >&6; }
3d248aec 20445 { $as_echo "$as_me:$LINENO: checking whether iops->put_link() passes nameidata" >&5
68d83c55 20446$as_echo_n "checking whether iops->put_link() passes nameidata... " >&6; }
ea04106b 20447
ea04106b 20448
e10b0808 20449cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20450/* confdefs.h. */
20451_ACEOF
20452cat confdefs.h >>conftest.$ac_ext
20453cat >>conftest.$ac_ext <<_ACEOF
20454/* end confdefs.h. */
ea04106b 20455
e10b0808 20456
68d83c55
AX
20457 #include <linux/fs.h>
20458 void put_link(struct dentry *de, struct
20459 nameidata *nd, void *ptr) { return; }
20460 static struct inode_operations
20461 iops __attribute__ ((unused)) = {
20462 .put_link = put_link,
20463 };
ea04106b
AX
20464
20465int
20466main (void)
20467{
20468
20469
20470 ;
20471 return 0;
20472}
20473
20474_ACEOF
20475
20476
20477
20478cat - <<_ACEOF >conftest.h
20479
20480_ACEOF
20481
20482
20483 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20484 echo "obj-m := conftest.o" >build/Makefile
20485 modpost_flag=''
20486 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20487 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20488 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20489 (eval $ac_try) 2>&5
20490 ac_status=$?
3d248aec
AX
20491 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20492 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20494 (eval $ac_try) 2>&5
20495 ac_status=$?
3d248aec
AX
20496 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20497 (exit $ac_status); }; }; then
68d83c55 20498
3d248aec 20499 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
20500$as_echo "yes" >&6; }
20501
3d248aec
AX
20502cat >>confdefs.h <<\_ACEOF
20503#define HAVE_PUT_LINK_NAMEIDATA 1
20504_ACEOF
68d83c55
AX
20505
20506
e10b0808
AX
20507else
20508 $as_echo "$as_me: failed program was:" >&5
20509sed 's/^/| /' conftest.$ac_ext >&5
68d83c55 20510
3d248aec
AX
20511 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
20512$as_echo "$as_me: error: no; please file a bug report" >&2;}
20513 { (exit 1); exit 1; }; }
68d83c55 20514
ea04106b 20515
ea04106b 20516
e10b0808 20517fi
3d248aec 20518
e10b0808 20519 rm -Rf build
ea04106b
AX
20520
20521
e10b0808 20522
e10b0808 20523
e10b0808 20524
68d83c55 20525fi
3d248aec 20526
68d83c55 20527 rm -Rf build
ea04106b 20528
ea04106b
AX
20529
20530
20531
ea04106b 20532
68d83c55 20533fi
3d248aec 20534
68d83c55 20535 rm -Rf build
ea04106b
AX
20536
20537
20538
e10b0808 20539
3d248aec 20540 { $as_echo "$as_me:$LINENO: checking whether iops->truncate_range() exists" >&5
68d83c55 20541$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
ea04106b
AX
20542
20543
20544cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20545/* confdefs.h. */
20546_ACEOF
20547cat confdefs.h >>conftest.$ac_ext
20548cat >>conftest.$ac_ext <<_ACEOF
20549/* end confdefs.h. */
ea04106b
AX
20550
20551
68d83c55
AX
20552 #include <linux/fs.h>
20553 void truncate_range(struct inode *inode, loff_t start,
20554 loff_t end) { return; }
20555 static struct inode_operations iops __attribute__ ((unused)) = {
20556 .truncate_range = truncate_range,
4d815aed 20557 };
ea04106b
AX
20558
20559int
20560main (void)
20561{
20562
20563
20564 ;
20565 return 0;
20566}
20567
20568_ACEOF
20569
20570
20571
20572cat - <<_ACEOF >conftest.h
20573
20574_ACEOF
20575
20576
20577 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20578 echo "obj-m := conftest.o" >build/Makefile
20579 modpost_flag=''
20580 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20581 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20583 (eval $ac_try) 2>&5
20584 ac_status=$?
3d248aec
AX
20585 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20586 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20588 (eval $ac_try) 2>&5
20589 ac_status=$?
3d248aec
AX
20590 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20591 (exit $ac_status); }; }; then
ea04106b 20592
3d248aec 20593 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
20594$as_echo "yes" >&6; }
20595
3d248aec
AX
20596cat >>confdefs.h <<\_ACEOF
20597#define HAVE_INODE_TRUNCATE_RANGE 1
20598_ACEOF
ea04106b
AX
20599
20600
20601else
20602 $as_echo "$as_me: failed program was:" >&5
20603sed 's/^/| /' conftest.$ac_ext >&5
20604
3d248aec 20605 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
20606$as_echo "no" >&6; }
20607
20608
20609
20610fi
3d248aec 20611
ea04106b
AX
20612 rm -Rf build
20613
20614
20615
20616
3d248aec 20617 { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5
68d83c55 20618$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
ea04106b
AX
20619
20620
20621cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20622/* confdefs.h. */
20623_ACEOF
20624cat confdefs.h >>conftest.$ac_ext
20625cat >>conftest.$ac_ext <<_ACEOF
20626/* end confdefs.h. */
ea04106b
AX
20627
20628
4d815aed 20629 #include <linux/dcache.h>
68d83c55
AX
20630 struct vfsmount *d_automount(struct path *p) { return NULL; }
20631 struct dentry_operations dops __attribute__ ((unused)) = {
20632 .d_automount = d_automount,
4d815aed 20633 };
ea04106b
AX
20634
20635int
20636main (void)
20637{
20638
e10b0808
AX
20639
20640 ;
ea04106b
AX
20641 return 0;
20642}
20643
20644_ACEOF
20645
20646
20647
20648cat - <<_ACEOF >conftest.h
20649
20650_ACEOF
20651
20652
20653 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20654 echo "obj-m := conftest.o" >build/Makefile
20655 modpost_flag=''
20656 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20657 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20659 (eval $ac_try) 2>&5
20660 ac_status=$?
3d248aec
AX
20661 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20662 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20664 (eval $ac_try) 2>&5
20665 ac_status=$?
3d248aec
AX
20666 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20667 (exit $ac_status); }; }; then
ea04106b 20668
3d248aec 20669 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
20670$as_echo "yes" >&6; }
20671
3d248aec
AX
20672cat >>confdefs.h <<\_ACEOF
20673#define HAVE_AUTOMOUNT 1
20674_ACEOF
ea04106b
AX
20675
20676
20677else
20678 $as_echo "$as_me: failed program was:" >&5
20679sed 's/^/| /' conftest.$ac_ext >&5
20680
3d248aec 20681 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
20682$as_echo "no" >&6; }
20683
20684
20685
20686fi
3d248aec 20687
ea04106b
AX
20688 rm -Rf build
20689
20690
20691
20692
3d248aec 20693 { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5
68d83c55 20694$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
ea04106b
AX
20695
20696
20697cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20698/* confdefs.h. */
20699_ACEOF
20700cat confdefs.h >>conftest.$ac_ext
20701cat >>conftest.$ac_ext <<_ACEOF
20702/* end confdefs.h. */
ea04106b
AX
20703
20704
68d83c55
AX
20705 #include <linux/exportfs.h>
20706 int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
20707 struct inode *parent) { return 0; }
20708 static struct export_operations eops __attribute__ ((unused))={
20709 .encode_fh = encode_fh,
20710 };
ea04106b
AX
20711
20712int
20713main (void)
20714{
20715
20716
20717 ;
20718 return 0;
20719}
20720
20721_ACEOF
20722
20723
20724
20725cat - <<_ACEOF >conftest.h
20726
20727_ACEOF
20728
20729
20730 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20731 echo "obj-m := conftest.o" >build/Makefile
20732 modpost_flag=''
20733 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20734 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20736 (eval $ac_try) 2>&5
20737 ac_status=$?
3d248aec
AX
20738 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20739 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
20741 (eval $ac_try) 2>&5
20742 ac_status=$?
3d248aec
AX
20743 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20744 (exit $ac_status); }; }; then
68d83c55 20745
3d248aec 20746 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
20747$as_echo "yes" >&6; }
20748
3d248aec
AX
20749cat >>confdefs.h <<\_ACEOF
20750#define HAVE_ENCODE_FH_WITH_INODE 1
20751_ACEOF
68d83c55
AX
20752
20753
20754else
20755 $as_echo "$as_me: failed program was:" >&5
20756sed 's/^/| /' conftest.$ac_ext >&5
20757
3d248aec 20758 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
20759$as_echo "no" >&6; }
20760
20761
20762
20763fi
3d248aec 20764
68d83c55
AX
20765 rm -Rf build
20766
20767
20768
20769
3d248aec 20770 { $as_echo "$as_me:$LINENO: checking whether eops->commit_metadata() exists" >&5
68d83c55
AX
20771$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; }
20772
20773
20774cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20775/* confdefs.h. */
20776_ACEOF
20777cat confdefs.h >>conftest.$ac_ext
20778cat >>conftest.$ac_ext <<_ACEOF
20779/* end confdefs.h. */
68d83c55
AX
20780
20781
20782 #include <linux/exportfs.h>
20783 int commit_metadata(struct inode *inode) { return 0; }
20784 static struct export_operations eops __attribute__ ((unused))={
20785 .commit_metadata = commit_metadata,
20786 };
20787
20788int
20789main (void)
20790{
20791
20792
20793 ;
20794 return 0;
20795}
20796
20797_ACEOF
20798
20799
20800
20801cat - <<_ACEOF >conftest.h
20802
20803_ACEOF
20804
20805
20806 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20807 echo "obj-m := conftest.o" >build/Makefile
20808 modpost_flag=''
20809 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20810 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
20812 (eval $ac_try) 2>&5
20813 ac_status=$?
3d248aec
AX
20814 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20815 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
20817 (eval $ac_try) 2>&5
20818 ac_status=$?
3d248aec
AX
20819 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20820 (exit $ac_status); }; }; then
68d83c55 20821
3d248aec 20822 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
20823$as_echo "yes" >&6; }
20824
3d248aec
AX
20825cat >>confdefs.h <<\_ACEOF
20826#define HAVE_COMMIT_METADATA 1
20827_ACEOF
68d83c55
AX
20828
20829
20830else
20831 $as_echo "$as_me: failed program was:" >&5
20832sed 's/^/| /' conftest.$ac_ext >&5
20833
3d248aec 20834 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
20835$as_echo "no" >&6; }
20836
20837
20838
20839fi
3d248aec 20840
68d83c55
AX
20841 rm -Rf build
20842
20843
20844
3d248aec 20845 { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5
68d83c55
AX
20846$as_echo_n "checking whether clear_inode() is available... " >&6; }
20847
20848
20849
20850cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20851/* confdefs.h. */
20852_ACEOF
20853cat confdefs.h >>conftest.$ac_ext
20854cat >>conftest.$ac_ext <<_ACEOF
20855/* end confdefs.h. */
68d83c55
AX
20856
20857
20858 #include <linux/fs.h>
20859
20860int
20861main (void)
20862{
20863
20864 clear_inode(NULL);
20865
20866 ;
20867 return 0;
20868}
20869
20870_ACEOF
20871
20872
20873
20874cat - <<_ACEOF >conftest.h
20875
20876_ACEOF
20877
20878
20879 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20880 echo "obj-m := conftest.o" >build/Makefile
20881 modpost_flag=''
20882 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20883 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 20884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
20885 (eval $ac_try) 2>&5
20886 ac_status=$?
3d248aec
AX
20887 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20888 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
20889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
20890 (eval $ac_try) 2>&5
20891 ac_status=$?
3d248aec
AX
20892 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
20893 (exit $ac_status); }; }; then
68d83c55
AX
20894 rc=0
20895else
20896 $as_echo "$as_me: failed program was:" >&5
20897sed 's/^/| /' conftest.$ac_ext >&5
20898 rc=1
ea04106b 20899
ea04106b 20900
e10b0808 20901fi
3d248aec 20902
e10b0808 20903 rm -Rf build
ea04106b
AX
20904
20905
e10b0808 20906 if test $rc -ne 0; then :
ea04106b 20907
3d248aec 20908 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
20909$as_echo "no" >&6; }
20910
e10b0808
AX
20911 else
20912 if test "x$enable_linux_builtin" != xyes; then
20913
68d83c55 20914 grep -q -E '[[:space:]]clear_inode[[:space:]]' \
e10b0808
AX
20915 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
20916 rc=$?
20917 if test $rc -ne 0; then
20918 export=0
68d83c55
AX
20919 for file in fs/inode.c; do
20920 grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
e10b0808
AX
20921 "$LINUX/$file" 2>/dev/null
20922 rc=$?
20923 if test $rc -eq 0; then
20924 export=1
20925 break;
20926 fi
20927 done
20928 if test $export -eq 0; then :
20929 rc=1
20930 else :
20931 rc=0
20932 fi
20933 else :
20934 rc=0
20935 fi
20936
20937 fi
20938 if test $rc -ne 0; then :
ea04106b 20939
3d248aec 20940 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 20941$as_echo "no" >&6; }
ea04106b 20942
e10b0808 20943 else :
ea04106b 20944
3d248aec 20945 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 20946$as_echo "yes" >&6; }
ea04106b 20947
3d248aec
AX
20948cat >>confdefs.h <<\_ACEOF
20949#define HAVE_CLEAR_INODE 1
20950_ACEOF
ea04106b
AX
20951
20952
e10b0808
AX
20953 fi
20954 fi
20955
20956
3d248aec 20957 { $as_echo "$as_me:$LINENO: checking whether setattr_prepare() is available" >&5
68d83c55 20958$as_echo_n "checking whether setattr_prepare() is available... " >&6; }
e10b0808 20959
ea04106b
AX
20960
20961
20962cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
20963/* confdefs.h. */
20964_ACEOF
20965cat confdefs.h >>conftest.$ac_ext
20966cat >>conftest.$ac_ext <<_ACEOF
20967/* end confdefs.h. */
ea04106b
AX
20968
20969
68d83c55 20970 #include <linux/fs.h>
ea04106b
AX
20971
20972int
20973main (void)
20974{
20975
68d83c55
AX
20976 struct dentry *dentry = NULL;
20977 struct iattr *attr = NULL;
20978 int error;
20979
20980 error = setattr_prepare(dentry, attr);
ea04106b
AX
20981
20982 ;
20983 return 0;
20984}
20985
20986_ACEOF
20987
20988
20989
20990cat - <<_ACEOF >conftest.h
20991
20992_ACEOF
20993
20994
20995 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
20996 echo "obj-m := conftest.o" >build/Makefile
20997 modpost_flag=''
20998 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
20999 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21001 (eval $ac_try) 2>&5
21002 ac_status=$?
3d248aec
AX
21003 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21004 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21006 (eval $ac_try) 2>&5
21007 ac_status=$?
3d248aec
AX
21008 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21009 (exit $ac_status); }; }; then
4d815aed
AX
21010 rc=0
21011else
21012 $as_echo "$as_me: failed program was:" >&5
21013sed 's/^/| /' conftest.$ac_ext >&5
21014 rc=1
ea04106b 21015
ea04106b 21016
4d815aed 21017fi
3d248aec 21018
4d815aed 21019 rm -Rf build
e10b0808 21020
ea04106b 21021
4d815aed 21022 if test $rc -ne 0; then :
ea04106b 21023
3d248aec 21024 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
21025$as_echo "no" >&6; }
21026
21027 else
21028 if test "x$enable_linux_builtin" != xyes; then
21029
68d83c55 21030 grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \
4d815aed
AX
21031 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
21032 rc=$?
21033 if test $rc -ne 0; then
21034 export=0
68d83c55
AX
21035 for file in fs/attr.c; do
21036 grep -q -E "EXPORT_SYMBOL.*(setattr_prepare)" \
4d815aed
AX
21037 "$LINUX/$file" 2>/dev/null
21038 rc=$?
21039 if test $rc -eq 0; then
21040 export=1
21041 break;
21042 fi
21043 done
21044 if test $export -eq 0; then :
21045 rc=1
21046 else :
21047 rc=0
21048 fi
21049 else :
21050 rc=0
21051 fi
21052
21053 fi
21054 if test $rc -ne 0; then :
ea04106b 21055
3d248aec 21056 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
21057$as_echo "no" >&6; }
21058
4d815aed 21059 else :
ea04106b 21060
3d248aec 21061 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 21062$as_echo "yes" >&6; }
ea04106b 21063
3d248aec
AX
21064cat >>confdefs.h <<\_ACEOF
21065#define HAVE_SETATTR_PREPARE 1
21066_ACEOF
ea04106b
AX
21067
21068
4d815aed
AX
21069 fi
21070 fi
21071
ea04106b 21072
3d248aec 21073 { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5
68d83c55 21074$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
ea04106b
AX
21075
21076
21077
21078cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
21079/* confdefs.h. */
21080_ACEOF
21081cat confdefs.h >>conftest.$ac_ext
21082cat >>conftest.$ac_ext <<_ACEOF
21083/* end confdefs.h. */
ea04106b
AX
21084
21085
68d83c55 21086 #include <linux/fs.h>
ea04106b
AX
21087
21088int
21089main (void)
21090{
21091
68d83c55 21092 insert_inode_locked(NULL);
4d815aed
AX
21093
21094 ;
ea04106b
AX
21095 return 0;
21096}
21097
21098_ACEOF
21099
21100
21101
21102cat - <<_ACEOF >conftest.h
21103
21104_ACEOF
21105
21106
21107 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
21108 echo "obj-m := conftest.o" >build/Makefile
21109 modpost_flag=''
21110 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
21111 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21112 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21113 (eval $ac_try) 2>&5
21114 ac_status=$?
3d248aec
AX
21115 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21116 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21118 (eval $ac_try) 2>&5
21119 ac_status=$?
3d248aec
AX
21120 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21121 (exit $ac_status); }; }; then
68d83c55
AX
21122 rc=0
21123else
21124 $as_echo "$as_me: failed program was:" >&5
21125sed 's/^/| /' conftest.$ac_ext >&5
21126 rc=1
ea04106b 21127
ea04106b 21128
68d83c55 21129fi
3d248aec 21130
68d83c55 21131 rm -Rf build
ea04106b 21132
ea04106b 21133
68d83c55
AX
21134 if test $rc -ne 0; then :
21135
3d248aec 21136 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
21137$as_echo "no" >&6; }
21138
21139 else
21140 if test "x$enable_linux_builtin" != xyes; then
21141
21142 grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
21143 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
21144 rc=$?
21145 if test $rc -ne 0; then
21146 export=0
21147 for file in fs/inode.c; do
21148 grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
21149 "$LINUX/$file" 2>/dev/null
21150 rc=$?
21151 if test $rc -eq 0; then
21152 export=1
21153 break;
21154 fi
21155 done
21156 if test $export -eq 0; then :
21157 rc=1
21158 else :
21159 rc=0
21160 fi
21161 else :
21162 rc=0
21163 fi
21164
21165 fi
21166 if test $rc -ne 0; then :
ea04106b 21167
3d248aec 21168 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
21169$as_echo "no" >&6; }
21170
68d83c55 21171 else :
ea04106b 21172
3d248aec 21173 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 21174$as_echo "yes" >&6; }
ea04106b 21175
3d248aec
AX
21176cat >>confdefs.h <<\_ACEOF
21177#define HAVE_INSERT_INODE_LOCKED 1
21178_ACEOF
ea04106b 21179
ea04106b 21180
68d83c55
AX
21181 fi
21182 fi
21183
ea04106b 21184
3d248aec 21185 { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5
68d83c55 21186$as_echo_n "checking whether d_make_root() is available... " >&6; }
ea04106b
AX
21187
21188
21189
21190cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
21191/* confdefs.h. */
21192_ACEOF
21193cat confdefs.h >>conftest.$ac_ext
21194cat >>conftest.$ac_ext <<_ACEOF
21195/* end confdefs.h. */
ea04106b
AX
21196
21197
68d83c55 21198 #include <linux/dcache.h>
ea04106b
AX
21199
21200int
21201main (void)
21202{
21203
68d83c55 21204 d_make_root(NULL);
ea04106b
AX
21205
21206 ;
21207 return 0;
21208}
21209
21210_ACEOF
21211
21212
21213
21214cat - <<_ACEOF >conftest.h
21215
21216_ACEOF
21217
21218
21219 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
21220 echo "obj-m := conftest.o" >build/Makefile
21221 modpost_flag=''
21222 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
21223 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21225 (eval $ac_try) 2>&5
21226 ac_status=$?
3d248aec
AX
21227 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21228 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21230 (eval $ac_try) 2>&5
21231 ac_status=$?
3d248aec
AX
21232 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21233 (exit $ac_status); }; }; then
68d83c55
AX
21234 rc=0
21235else
21236 $as_echo "$as_me: failed program was:" >&5
21237sed 's/^/| /' conftest.$ac_ext >&5
21238 rc=1
ea04106b 21239
ea04106b 21240
68d83c55 21241fi
3d248aec 21242
68d83c55 21243 rm -Rf build
ea04106b 21244
ea04106b 21245
68d83c55
AX
21246 if test $rc -ne 0; then :
21247
3d248aec 21248 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
21249$as_echo "no" >&6; }
21250
21251 else
21252 if test "x$enable_linux_builtin" != xyes; then
21253
21254 grep -q -E '[[:space:]]d_make_root[[:space:]]' \
21255 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
21256 rc=$?
21257 if test $rc -ne 0; then
21258 export=0
21259 for file in fs/dcache.c; do
21260 grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
21261 "$LINUX/$file" 2>/dev/null
21262 rc=$?
21263 if test $rc -eq 0; then
21264 export=1
21265 break;
21266 fi
21267 done
21268 if test $export -eq 0; then :
21269 rc=1
21270 else :
21271 rc=0
21272 fi
21273 else :
21274 rc=0
21275 fi
21276
21277 fi
21278 if test $rc -ne 0; then :
ea04106b 21279
3d248aec 21280 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
21281$as_echo "no" >&6; }
21282
68d83c55 21283 else :
ea04106b 21284
3d248aec 21285 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 21286$as_echo "yes" >&6; }
ea04106b 21287
3d248aec
AX
21288cat >>confdefs.h <<\_ACEOF
21289#define HAVE_D_MAKE_ROOT 1
21290_ACEOF
ea04106b
AX
21291
21292
68d83c55
AX
21293 fi
21294 fi
21295
ea04106b 21296
3d248aec 21297 { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5
68d83c55 21298$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
4d815aed 21299
ea04106b
AX
21300
21301
21302cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
21303/* confdefs.h. */
21304_ACEOF
21305cat confdefs.h >>conftest.$ac_ext
21306cat >>conftest.$ac_ext <<_ACEOF
21307/* end confdefs.h. */
ea04106b
AX
21308
21309
68d83c55 21310 #include <linux/dcache.h>
ea04106b
AX
21311
21312int
21313main (void)
21314{
21315
68d83c55 21316 d_obtain_alias(NULL);
ea04106b
AX
21317
21318 ;
21319 return 0;
21320}
21321
21322_ACEOF
21323
21324
21325
21326cat - <<_ACEOF >conftest.h
21327
21328_ACEOF
21329
21330
21331 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
21332 echo "obj-m := conftest.o" >build/Makefile
21333 modpost_flag=''
21334 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
21335 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21337 (eval $ac_try) 2>&5
21338 ac_status=$?
3d248aec
AX
21339 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21340 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21342 (eval $ac_try) 2>&5
21343 ac_status=$?
3d248aec
AX
21344 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21345 (exit $ac_status); }; }; then
4d815aed
AX
21346 rc=0
21347else
21348 $as_echo "$as_me: failed program was:" >&5
21349sed 's/^/| /' conftest.$ac_ext >&5
21350 rc=1
e10b0808 21351
e10b0808 21352
4d815aed 21353fi
3d248aec 21354
4d815aed 21355 rm -Rf build
e10b0808
AX
21356
21357
4d815aed
AX
21358 if test $rc -ne 0; then :
21359
3d248aec 21360 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
21361$as_echo "no" >&6; }
21362
21363 else
21364 if test "x$enable_linux_builtin" != xyes; then
21365
68d83c55 21366 grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
4d815aed
AX
21367 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
21368 rc=$?
21369 if test $rc -ne 0; then
21370 export=0
68d83c55
AX
21371 for file in fs/dcache.c; do
21372 grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
4d815aed
AX
21373 "$LINUX/$file" 2>/dev/null
21374 rc=$?
21375 if test $rc -eq 0; then
21376 export=1
21377 break;
21378 fi
21379 done
21380 if test $export -eq 0; then :
21381 rc=1
21382 else :
21383 rc=0
21384 fi
21385 else :
21386 rc=0
21387 fi
21388
21389 fi
21390 if test $rc -ne 0; then :
e10b0808 21391
3d248aec 21392 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
21393$as_echo "no" >&6; }
21394
4d815aed 21395 else :
ea04106b 21396
3d248aec 21397 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 21398$as_echo "yes" >&6; }
ea04106b 21399
3d248aec
AX
21400cat >>confdefs.h <<\_ACEOF
21401#define HAVE_D_OBTAIN_ALIAS 1
21402_ACEOF
ea04106b
AX
21403
21404
4d815aed
AX
21405 fi
21406 fi
ea04106b 21407
ea04106b 21408
3d248aec 21409 { $as_echo "$as_me:$LINENO: checking whether d_prune_aliases() is available" >&5
68d83c55 21410$as_echo_n "checking whether d_prune_aliases() is available... " >&6; }
ea04106b
AX
21411
21412
21413
21414cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
21415/* confdefs.h. */
21416_ACEOF
21417cat confdefs.h >>conftest.$ac_ext
21418cat >>conftest.$ac_ext <<_ACEOF
21419/* end confdefs.h. */
ea04106b
AX
21420
21421
68d83c55 21422 #include <linux/dcache.h>
ea04106b
AX
21423
21424int
21425main (void)
21426{
21427
68d83c55
AX
21428 struct inode *ip = NULL;
21429 d_prune_aliases(ip);
ea04106b
AX
21430
21431 ;
21432 return 0;
21433}
21434
21435_ACEOF
21436
21437
21438
21439cat - <<_ACEOF >conftest.h
21440
21441_ACEOF
21442
21443
21444 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
21445 echo "obj-m := conftest.o" >build/Makefile
21446 modpost_flag=''
21447 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
21448 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21449 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21450 (eval $ac_try) 2>&5
21451 ac_status=$?
3d248aec
AX
21452 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21453 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21455 (eval $ac_try) 2>&5
21456 ac_status=$?
3d248aec
AX
21457 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21458 (exit $ac_status); }; }; then
68d83c55
AX
21459 rc=0
21460else
21461 $as_echo "$as_me: failed program was:" >&5
21462sed 's/^/| /' conftest.$ac_ext >&5
21463 rc=1
4d815aed 21464
4d815aed 21465
68d83c55 21466fi
3d248aec 21467
68d83c55 21468 rm -Rf build
4d815aed
AX
21469
21470
68d83c55 21471 if test $rc -ne 0; then :
4d815aed 21472
3d248aec 21473 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
21474$as_echo "no" >&6; }
21475
21476 else
21477 if test "x$enable_linux_builtin" != xyes; then
21478
21479 grep -q -E '[[:space:]]d_prune_aliases[[:space:]]' \
21480 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
21481 rc=$?
21482 if test $rc -ne 0; then
21483 export=0
21484 for file in fs/dcache.c; do
21485 grep -q -E "EXPORT_SYMBOL.*(d_prune_aliases)" \
21486 "$LINUX/$file" 2>/dev/null
21487 rc=$?
21488 if test $rc -eq 0; then
21489 export=1
21490 break;
21491 fi
21492 done
21493 if test $export -eq 0; then :
21494 rc=1
21495 else :
21496 rc=0
21497 fi
21498 else :
21499 rc=0
21500 fi
21501
21502 fi
21503 if test $rc -ne 0; then :
4d815aed 21504
3d248aec 21505 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
21506$as_echo "no" >&6; }
21507
68d83c55 21508 else :
ea04106b 21509
3d248aec 21510 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 21511$as_echo "yes" >&6; }
ea04106b 21512
3d248aec
AX
21513cat >>confdefs.h <<\_ACEOF
21514#define HAVE_D_PRUNE_ALIASES 1
21515_ACEOF
ea04106b
AX
21516
21517
68d83c55
AX
21518 fi
21519 fi
ea04106b 21520
ea04106b 21521
3d248aec 21522 { $as_echo "$as_me:$LINENO: checking whether d_set_d_op() is available" >&5
68d83c55
AX
21523$as_echo_n "checking whether d_set_d_op() is available... " >&6; }
21524
ea04106b
AX
21525
21526
21527cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
21528/* confdefs.h. */
21529_ACEOF
21530cat confdefs.h >>conftest.$ac_ext
21531cat >>conftest.$ac_ext <<_ACEOF
21532/* end confdefs.h. */
ea04106b
AX
21533
21534
68d83c55 21535 #include <linux/dcache.h>
ea04106b
AX
21536
21537int
21538main (void)
21539{
21540
68d83c55 21541 d_set_d_op(NULL, NULL);
ea04106b
AX
21542
21543 ;
21544 return 0;
21545}
21546
21547_ACEOF
21548
21549
21550
21551cat - <<_ACEOF >conftest.h
21552
21553_ACEOF
21554
21555
21556 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
21557 echo "obj-m := conftest.o" >build/Makefile
21558 modpost_flag=''
21559 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
21560 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21562 (eval $ac_try) 2>&5
21563 ac_status=$?
3d248aec
AX
21564 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21565 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21567 (eval $ac_try) 2>&5
21568 ac_status=$?
3d248aec
AX
21569 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21570 (exit $ac_status); }; }; then
68d83c55
AX
21571 rc=0
21572else
21573 $as_echo "$as_me: failed program was:" >&5
21574sed 's/^/| /' conftest.$ac_ext >&5
21575 rc=1
ea04106b 21576
ea04106b 21577
68d83c55 21578fi
3d248aec 21579
68d83c55 21580 rm -Rf build
ea04106b 21581
ea04106b 21582
68d83c55
AX
21583 if test $rc -ne 0; then :
21584
3d248aec 21585 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
21586$as_echo "no" >&6; }
21587
21588 else
21589 if test "x$enable_linux_builtin" != xyes; then
21590
21591 grep -q -E '[[:space:]]d_set_d_op[[:space:]]' \
21592 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
21593 rc=$?
21594 if test $rc -ne 0; then
21595 export=0
21596 for file in fs/dcache.c; do
21597 grep -q -E "EXPORT_SYMBOL.*(d_set_d_op)" \
21598 "$LINUX/$file" 2>/dev/null
21599 rc=$?
21600 if test $rc -eq 0; then
21601 export=1
21602 break;
21603 fi
21604 done
21605 if test $export -eq 0; then :
21606 rc=1
21607 else :
21608 rc=0
21609 fi
21610 else :
21611 rc=0
21612 fi
21613
21614 fi
21615 if test $rc -ne 0; then :
ea04106b 21616
3d248aec 21617 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
21618$as_echo "no" >&6; }
21619
68d83c55
AX
21620 else :
21621
3d248aec 21622 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 21623$as_echo "yes" >&6; }
ea04106b 21624
3d248aec
AX
21625cat >>confdefs.h <<\_ACEOF
21626#define HAVE_D_SET_D_OP 1
21627_ACEOF
ea04106b 21628
e10b0808 21629
68d83c55
AX
21630 fi
21631 fi
e10b0808 21632
e10b0808 21633
ea04106b 21634
3d248aec 21635 { $as_echo "$as_me:$LINENO: checking whether dops->d_revalidate() takes struct nameidata" >&5
68d83c55 21636$as_echo_n "checking whether dops->d_revalidate() takes struct nameidata... " >&6; }
ea04106b
AX
21637
21638
21639cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
21640/* confdefs.h. */
21641_ACEOF
21642cat confdefs.h >>conftest.$ac_ext
21643cat >>conftest.$ac_ext <<_ACEOF
21644/* end confdefs.h. */
ea04106b
AX
21645
21646
68d83c55
AX
21647 #include <linux/dcache.h>
21648
21649 int revalidate (struct dentry *dentry,
21650 struct nameidata *nidata) { return 0; }
21651
21652 static const struct dentry_operations
21653 dops __attribute__ ((unused)) = {
21654 .d_revalidate = revalidate,
21655 };
ea04106b
AX
21656
21657int
21658main (void)
21659{
21660
ea04106b
AX
21661
21662 ;
21663 return 0;
21664}
21665
21666_ACEOF
21667
21668
21669
21670cat - <<_ACEOF >conftest.h
21671
21672_ACEOF
21673
21674
21675 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
21676 echo "obj-m := conftest.o" >build/Makefile
21677 modpost_flag=''
21678 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
21679 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21680 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21681 (eval $ac_try) 2>&5
21682 ac_status=$?
3d248aec
AX
21683 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21684 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21686 (eval $ac_try) 2>&5
21687 ac_status=$?
3d248aec
AX
21688 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21689 (exit $ac_status); }; }; then
4d815aed 21690
3d248aec 21691 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
21692$as_echo "yes" >&6; }
21693
3d248aec
AX
21694cat >>confdefs.h <<\_ACEOF
21695#define HAVE_D_REVALIDATE_NAMEIDATA 1
21696_ACEOF
4d815aed
AX
21697
21698
ea04106b
AX
21699else
21700 $as_echo "$as_me: failed program was:" >&5
21701sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 21702
3d248aec 21703 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
21704$as_echo "no" >&6; }
21705
ea04106b
AX
21706
21707
21708fi
3d248aec 21709
ea04106b
AX
21710 rm -Rf build
21711
21712
ea04106b 21713
68d83c55 21714
3d248aec 21715 { $as_echo "$as_me:$LINENO: checking whether dentry uses const struct dentry_operations" >&5
68d83c55 21716$as_echo_n "checking whether dentry uses const struct dentry_operations... " >&6; }
e10b0808
AX
21717
21718
21719cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
21720/* confdefs.h. */
21721_ACEOF
21722cat confdefs.h >>conftest.$ac_ext
21723cat >>conftest.$ac_ext <<_ACEOF
21724/* end confdefs.h. */
e10b0808
AX
21725
21726
68d83c55
AX
21727 #include <linux/dcache.h>
21728
21729 const struct dentry_operations test_d_op = {
21730 .d_revalidate = NULL,
21731 };
ea04106b
AX
21732
21733int
21734main (void)
21735{
21736
68d83c55
AX
21737 struct dentry d __attribute__ ((unused));
21738
21739 d.d_op = &test_d_op;
ea04106b
AX
21740
21741 ;
21742 return 0;
21743}
21744
21745_ACEOF
21746
21747
21748
21749cat - <<_ACEOF >conftest.h
21750
21751_ACEOF
21752
21753
21754 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
21755 echo "obj-m := conftest.o" >build/Makefile
21756 modpost_flag=''
21757 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
21758 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21760 (eval $ac_try) 2>&5
21761 ac_status=$?
3d248aec
AX
21762 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21763 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21765 (eval $ac_try) 2>&5
21766 ac_status=$?
3d248aec
AX
21767 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21768 (exit $ac_status); }; }; then
ea04106b 21769
3d248aec 21770 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
21771$as_echo "yes" >&6; }
21772
3d248aec
AX
21773cat >>confdefs.h <<\_ACEOF
21774#define HAVE_CONST_DENTRY_OPERATIONS 1
21775_ACEOF
ea04106b
AX
21776
21777
21778else
21779 $as_echo "$as_me: failed program was:" >&5
21780sed 's/^/| /' conftest.$ac_ext >&5
21781
3d248aec 21782 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
21783$as_echo "no" >&6; }
21784
21785
21786
21787fi
3d248aec 21788
ea04106b
AX
21789 rm -Rf build
21790
21791
21792
3d248aec 21793 { $as_echo "$as_me:$LINENO: checking whether check_disk_size_change() is available" >&5
68d83c55 21794$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
4d815aed 21795
ea04106b
AX
21796
21797
21798cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
21799/* confdefs.h. */
21800_ACEOF
21801cat confdefs.h >>conftest.$ac_ext
21802cat >>conftest.$ac_ext <<_ACEOF
21803/* end confdefs.h. */
ea04106b
AX
21804
21805
68d83c55 21806 #include <linux/fs.h>
ea04106b
AX
21807
21808int
21809main (void)
21810{
21811
68d83c55 21812 check_disk_size_change(NULL, NULL);
ea04106b
AX
21813
21814 ;
21815 return 0;
21816}
21817
21818_ACEOF
21819
21820
21821
21822cat - <<_ACEOF >conftest.h
21823
21824_ACEOF
21825
21826
21827 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
21828 echo "obj-m := conftest.o" >build/Makefile
21829 modpost_flag=''
21830 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
21831 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21833 (eval $ac_try) 2>&5
21834 ac_status=$?
3d248aec
AX
21835 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21836 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21838 (eval $ac_try) 2>&5
21839 ac_status=$?
3d248aec
AX
21840 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21841 (exit $ac_status); }; }; then
4d815aed 21842 rc=0
ea04106b
AX
21843else
21844 $as_echo "$as_me: failed program was:" >&5
21845sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 21846 rc=1
ea04106b
AX
21847
21848
21849fi
3d248aec 21850
ea04106b
AX
21851 rm -Rf build
21852
21853
4d815aed
AX
21854 if test $rc -ne 0; then :
21855
3d248aec 21856 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 21857$as_echo "no" >&6; }
ea04106b 21858
68d83c55
AX
21859 else
21860 if test "x$enable_linux_builtin" != xyes; then
ea04106b 21861
68d83c55 21862 grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
4d815aed
AX
21863 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
21864 rc=$?
21865 if test $rc -ne 0; then
21866 export=0
68d83c55
AX
21867 for file in fs/block_dev.c; do
21868 grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
4d815aed
AX
21869 "$LINUX/$file" 2>/dev/null
21870 rc=$?
21871 if test $rc -eq 0; then
21872 export=1
21873 break;
21874 fi
21875 done
21876 if test $export -eq 0; then :
21877 rc=1
21878 else :
21879 rc=0
21880 fi
21881 else :
21882 rc=0
21883 fi
21884
21885 fi
21886 if test $rc -ne 0; then :
21887
3d248aec 21888 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
21889$as_echo "no" >&6; }
21890
4d815aed 21891 else :
ea04106b 21892
3d248aec 21893 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 21894$as_echo "yes" >&6; }
ea04106b 21895
3d248aec
AX
21896cat >>confdefs.h <<\_ACEOF
21897#define HAVE_CHECK_DISK_SIZE_CHANGE 1
21898_ACEOF
ea04106b 21899
4d815aed 21900
4d815aed 21901 fi
4d815aed
AX
21902 fi
21903
4d815aed 21904
3d248aec 21905 { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5
68d83c55 21906$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
ea04106b
AX
21907
21908
21909
21910cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
21911/* confdefs.h. */
21912_ACEOF
21913cat confdefs.h >>conftest.$ac_ext
21914cat >>conftest.$ac_ext <<_ACEOF
21915/* end confdefs.h. */
ea04106b
AX
21916
21917
68d83c55 21918 #include <linux/mm.h>
ea04106b
AX
21919
21920int
21921main (void)
21922{
21923
68d83c55 21924 truncate_setsize(NULL, 0);
ea04106b
AX
21925
21926 ;
21927 return 0;
21928}
21929
21930_ACEOF
21931
21932
21933
21934cat - <<_ACEOF >conftest.h
21935
21936_ACEOF
21937
21938
21939 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
21940 echo "obj-m := conftest.o" >build/Makefile
21941 modpost_flag=''
21942 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
21943 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 21944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21945 (eval $ac_try) 2>&5
21946 ac_status=$?
3d248aec
AX
21947 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21948 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
21949 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
21950 (eval $ac_try) 2>&5
21951 ac_status=$?
3d248aec
AX
21952 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
21953 (exit $ac_status); }; }; then
ea04106b
AX
21954 rc=0
21955else
21956 $as_echo "$as_me: failed program was:" >&5
21957sed 's/^/| /' conftest.$ac_ext >&5
21958 rc=1
21959
21960
21961fi
3d248aec 21962
ea04106b
AX
21963 rm -Rf build
21964
21965
21966 if test $rc -ne 0; then :
21967
3d248aec 21968 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
21969$as_echo "no" >&6; }
21970
21971 else
21972 if test "x$enable_linux_builtin" != xyes; then
21973
68d83c55 21974 grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
ea04106b
AX
21975 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
21976 rc=$?
21977 if test $rc -ne 0; then
21978 export=0
68d83c55
AX
21979 for file in mm/truncate.c; do
21980 grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
ea04106b
AX
21981 "$LINUX/$file" 2>/dev/null
21982 rc=$?
21983 if test $rc -eq 0; then
21984 export=1
21985 break;
21986 fi
21987 done
21988 if test $export -eq 0; then :
21989 rc=1
21990 else :
21991 rc=0
21992 fi
21993 else :
21994 rc=0
21995 fi
21996
21997 fi
21998 if test $rc -ne 0; then :
21999
3d248aec 22000 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
22001$as_echo "no" >&6; }
22002
4d815aed 22003 else :
ea04106b 22004
3d248aec 22005 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 22006$as_echo "yes" >&6; }
ea04106b 22007
3d248aec
AX
22008cat >>confdefs.h <<\_ACEOF
22009#define HAVE_TRUNCATE_SETSIZE 1
22010_ACEOF
ea04106b 22011
ea04106b 22012
4d815aed
AX
22013 fi
22014 fi
ea04106b 22015
e10b0808 22016
4d815aed 22017
3d248aec 22018 { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5
68d83c55 22019$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
4d815aed
AX
22020
22021
22022cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22023/* confdefs.h. */
22024_ACEOF
22025cat confdefs.h >>conftest.$ac_ext
22026cat >>conftest.$ac_ext <<_ACEOF
22027/* end confdefs.h. */
4d815aed
AX
22028
22029
68d83c55 22030 #include <linux/security.h>
ea04106b
AX
22031
22032int
22033main (void)
22034{
22035
68d83c55
AX
22036 struct inode *ip __attribute__ ((unused)) = NULL;
22037 struct inode *dip __attribute__ ((unused)) = NULL;
22038 const struct qstr *str __attribute__ ((unused)) = NULL;
22039 char *name __attribute__ ((unused)) = NULL;
22040 void *value __attribute__ ((unused)) = NULL;
22041 size_t len __attribute__ ((unused)) = 0;
22042
22043 security_inode_init_security(ip, dip, str, &name, &value, &len);
ea04106b
AX
22044
22045 ;
22046 return 0;
22047}
22048
22049_ACEOF
22050
22051
22052
22053cat - <<_ACEOF >conftest.h
22054
22055_ACEOF
22056
22057
22058 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22059 echo "obj-m := conftest.o" >build/Makefile
22060 modpost_flag=''
22061 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22062 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 22063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22064 (eval $ac_try) 2>&5
22065 ac_status=$?
3d248aec
AX
22066 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22067 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22069 (eval $ac_try) 2>&5
22070 ac_status=$?
3d248aec
AX
22071 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22072 (exit $ac_status); }; }; then
ea04106b 22073
3d248aec 22074 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
22075$as_echo "yes" >&6; }
22076
3d248aec
AX
22077cat >>confdefs.h <<\_ACEOF
22078#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1
22079_ACEOF
ea04106b
AX
22080
22081
22082else
22083 $as_echo "$as_me: failed program was:" >&5
22084sed 's/^/| /' conftest.$ac_ext >&5
22085
3d248aec 22086 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
22087$as_echo "no" >&6; }
22088
ea04106b
AX
22089
22090
4d815aed 22091fi
3d248aec 22092
4d815aed 22093 rm -Rf build
ea04106b
AX
22094
22095
e10b0808 22096
4d815aed 22097
3d248aec 22098 { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5
68d83c55 22099$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
4d815aed
AX
22100
22101
22102cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22103/* confdefs.h. */
22104_ACEOF
22105cat confdefs.h >>conftest.$ac_ext
22106cat >>conftest.$ac_ext <<_ACEOF
22107/* end confdefs.h. */
4d815aed
AX
22108
22109
68d83c55 22110 #include <linux/security.h>
ea04106b
AX
22111
22112int
22113main (void)
22114{
22115
68d83c55
AX
22116 struct inode *ip __attribute__ ((unused)) = NULL;
22117 struct inode *dip __attribute__ ((unused)) = NULL;
22118 const struct qstr *str __attribute__ ((unused)) = NULL;
22119 initxattrs func __attribute__ ((unused)) = NULL;
ea04106b 22120
68d83c55 22121 security_inode_init_security(ip, dip, str, func, NULL);
ea04106b
AX
22122
22123 ;
22124 return 0;
22125}
22126
22127_ACEOF
22128
22129
22130
22131cat - <<_ACEOF >conftest.h
22132
22133_ACEOF
22134
22135
22136 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22137 echo "obj-m := conftest.o" >build/Makefile
22138 modpost_flag=''
22139 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22140 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 22141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22142 (eval $ac_try) 2>&5
22143 ac_status=$?
3d248aec
AX
22144 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22145 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22147 (eval $ac_try) 2>&5
22148 ac_status=$?
3d248aec
AX
22149 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22150 (exit $ac_status); }; }; then
ea04106b 22151
3d248aec 22152 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 22153$as_echo "yes" >&6; }
ea04106b 22154
3d248aec
AX
22155cat >>confdefs.h <<\_ACEOF
22156#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1
22157_ACEOF
ea04106b 22158
ea04106b 22159
e10b0808
AX
22160else
22161 $as_echo "$as_me: failed program was:" >&5
22162sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 22163
3d248aec 22164 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
22165$as_echo "no" >&6; }
22166
ea04106b 22167
ea04106b 22168
e10b0808 22169fi
3d248aec 22170
e10b0808 22171 rm -Rf build
ea04106b 22172
ea04106b
AX
22173
22174
3d248aec 22175 { $as_echo "$as_me:$LINENO: checking whether mount_nodev() is available" >&5
68d83c55 22176$as_echo_n "checking whether mount_nodev() is available... " >&6; }
ea04106b 22177
ea04106b
AX
22178
22179
22180cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22181/* confdefs.h. */
22182_ACEOF
22183cat confdefs.h >>conftest.$ac_ext
22184cat >>conftest.$ac_ext <<_ACEOF
22185/* end confdefs.h. */
ea04106b
AX
22186
22187
4d815aed 22188 #include <linux/fs.h>
ea04106b
AX
22189
22190int
22191main (void)
22192{
22193
68d83c55 22194 mount_nodev(NULL, 0, NULL, NULL);
ea04106b
AX
22195
22196 ;
22197 return 0;
22198}
22199
22200_ACEOF
22201
22202
22203
22204cat - <<_ACEOF >conftest.h
22205
22206_ACEOF
22207
22208
22209 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22210 echo "obj-m := conftest.o" >build/Makefile
22211 modpost_flag=''
22212 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22213 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 22214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22215 (eval $ac_try) 2>&5
22216 ac_status=$?
3d248aec
AX
22217 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22218 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22220 (eval $ac_try) 2>&5
22221 ac_status=$?
3d248aec
AX
22222 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22223 (exit $ac_status); }; }; then
4d815aed
AX
22224 rc=0
22225else
22226 $as_echo "$as_me: failed program was:" >&5
22227sed 's/^/| /' conftest.$ac_ext >&5
22228 rc=1
ea04106b 22229
ea04106b 22230
4d815aed 22231fi
3d248aec 22232
4d815aed 22233 rm -Rf build
ea04106b
AX
22234
22235
4d815aed
AX
22236 if test $rc -ne 0; then :
22237
3d248aec 22238 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
22239$as_echo "no" >&6; }
22240
22241 else
22242 if test "x$enable_linux_builtin" != xyes; then
22243
68d83c55 22244 grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
4d815aed
AX
22245 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
22246 rc=$?
22247 if test $rc -ne 0; then
22248 export=0
68d83c55
AX
22249 for file in fs/super.c; do
22250 grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
4d815aed
AX
22251 "$LINUX/$file" 2>/dev/null
22252 rc=$?
22253 if test $rc -eq 0; then
22254 export=1
22255 break;
22256 fi
22257 done
22258 if test $export -eq 0; then :
22259 rc=1
22260 else :
22261 rc=0
22262 fi
22263 else :
22264 rc=0
22265 fi
22266
22267 fi
22268 if test $rc -ne 0; then :
ea04106b 22269
3d248aec 22270 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
22271$as_echo "no" >&6; }
22272
4d815aed 22273 else :
ea04106b 22274
3d248aec 22275 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 22276$as_echo "yes" >&6; }
ea04106b 22277
3d248aec
AX
22278cat >>confdefs.h <<\_ACEOF
22279#define HAVE_MOUNT_NODEV 1
22280_ACEOF
ea04106b
AX
22281
22282
4d815aed
AX
22283 fi
22284 fi
22285
ea04106b
AX
22286
22287
3d248aec 22288 { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5
68d83c55 22289$as_echo_n "checking whether super_block has s_shrink... " >&6; }
ea04106b
AX
22290
22291
22292cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22293/* confdefs.h. */
22294_ACEOF
22295cat confdefs.h >>conftest.$ac_ext
22296cat >>conftest.$ac_ext <<_ACEOF
22297/* end confdefs.h. */
ea04106b
AX
22298
22299
4d815aed 22300 #include <linux/fs.h>
68d83c55
AX
22301
22302 int shrink(struct shrinker *s, struct shrink_control *sc)
4d815aed
AX
22303 { return 0; }
22304
68d83c55
AX
22305 static const struct super_block
22306 sb __attribute__ ((unused)) = {
22307 .s_shrink.shrink = shrink,
22308 .s_shrink.seeks = DEFAULT_SEEKS,
22309 .s_shrink.batch = 0,
4d815aed 22310 };
ea04106b
AX
22311
22312int
22313main (void)
22314{
22315
ea04106b
AX
22316
22317 ;
22318 return 0;
22319}
22320
22321_ACEOF
22322
22323
22324
22325cat - <<_ACEOF >conftest.h
22326
22327_ACEOF
22328
22329
22330 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22331 echo "obj-m := conftest.o" >build/Makefile
22332 modpost_flag=''
22333 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22334 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 22335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22336 (eval $ac_try) 2>&5
22337 ac_status=$?
3d248aec
AX
22338 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22339 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22341 (eval $ac_try) 2>&5
22342 ac_status=$?
3d248aec
AX
22343 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22344 (exit $ac_status); }; }; then
ea04106b 22345
3d248aec 22346 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
22347$as_echo "yes" >&6; }
22348
3d248aec
AX
22349cat >>confdefs.h <<\_ACEOF
22350#define HAVE_SHRINK 1
22351_ACEOF
68d83c55 22352
87dac73d
AX
22353
22354
22355else
22356 $as_echo "$as_me: failed program was:" >&5
22357sed 's/^/| /' conftest.$ac_ext >&5
22358
3d248aec 22359 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
22360$as_echo "no" >&6; }
22361
87dac73d 22362
87dac73d 22363
68d83c55 22364fi
3d248aec 22365
68d83c55 22366 rm -Rf build
87dac73d
AX
22367
22368
87dac73d 22369
87dac73d 22370
3d248aec 22371 { $as_echo "$as_me:$LINENO: checking whether shrink_control has nid" >&5
68d83c55 22372$as_echo_n "checking whether shrink_control has nid... " >&6; }
87dac73d
AX
22373
22374
22375cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22376/* confdefs.h. */
22377_ACEOF
22378cat confdefs.h >>conftest.$ac_ext
22379cat >>conftest.$ac_ext <<_ACEOF
22380/* end confdefs.h. */
87dac73d
AX
22381
22382
68d83c55 22383 #include <linux/fs.h>
87dac73d
AX
22384
22385int
22386main (void)
22387{
22388
68d83c55
AX
22389 struct shrink_control sc __attribute__ ((unused));
22390 unsigned long scnidsize __attribute__ ((unused)) =
22391 sizeof(sc.nid);
87dac73d
AX
22392
22393 ;
22394 return 0;
22395}
22396
22397_ACEOF
22398
22399
22400
22401cat - <<_ACEOF >conftest.h
22402
22403_ACEOF
22404
22405
22406 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22407 echo "obj-m := conftest.o" >build/Makefile
22408 modpost_flag=''
22409 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22410 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 22411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
22412 (eval $ac_try) 2>&5
22413 ac_status=$?
3d248aec
AX
22414 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22415 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
22417 (eval $ac_try) 2>&5
22418 ac_status=$?
3d248aec
AX
22419 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22420 (exit $ac_status); }; }; then
87dac73d 22421
3d248aec 22422 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
22423$as_echo "yes" >&6; }
22424
3d248aec
AX
22425cat >>confdefs.h <<\_ACEOF
22426#define SHRINK_CONTROL_HAS_NID 1
22427_ACEOF
ea04106b
AX
22428
22429
22430else
22431 $as_echo "$as_me: failed program was:" >&5
22432sed 's/^/| /' conftest.$ac_ext >&5
22433
3d248aec 22434 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 22435$as_echo "no" >&6; }
4d815aed
AX
22436
22437
22438
22439fi
3d248aec 22440
4d815aed
AX
22441 rm -Rf build
22442
22443
22444
22445
3d248aec 22446 { $as_echo "$as_me:$LINENO: checking whether super_block has s_instances list_head" >&5
68d83c55 22447$as_echo_n "checking whether super_block has s_instances list_head... " >&6; }
ea04106b
AX
22448
22449
22450cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22451/* confdefs.h. */
22452_ACEOF
22453cat confdefs.h >>conftest.$ac_ext
22454cat >>conftest.$ac_ext <<_ACEOF
22455/* end confdefs.h. */
ea04106b
AX
22456
22457
4d815aed 22458 #include <linux/fs.h>
e10b0808 22459
ea04106b
AX
22460int
22461main (void)
22462{
22463
68d83c55
AX
22464 struct super_block sb __attribute__ ((unused));
22465
22466 INIT_LIST_HEAD(&sb.s_instances);
ea04106b
AX
22467
22468 ;
22469 return 0;
22470}
22471
22472_ACEOF
22473
22474
22475
22476cat - <<_ACEOF >conftest.h
22477
22478_ACEOF
22479
22480
22481 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22482 echo "obj-m := conftest.o" >build/Makefile
22483 modpost_flag=''
22484 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22485 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 22486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22487 (eval $ac_try) 2>&5
22488 ac_status=$?
3d248aec
AX
22489 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22490 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22492 (eval $ac_try) 2>&5
22493 ac_status=$?
3d248aec
AX
22494 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22495 (exit $ac_status); }; }; then
ea04106b 22496
3d248aec 22497 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
22498$as_echo "yes" >&6; }
22499
3d248aec
AX
22500cat >>confdefs.h <<\_ACEOF
22501#define HAVE_S_INSTANCES_LIST_HEAD 1
22502_ACEOF
ea04106b
AX
22503
22504
22505else
22506 $as_echo "$as_me: failed program was:" >&5
22507sed 's/^/| /' conftest.$ac_ext >&5
22508
3d248aec 22509 { $as_echo "$as_me:$LINENO: result: no" >&5
94a40997 22510$as_echo "no" >&6; }
94a40997
AX
22511
22512
94a40997 22513
4d815aed 22514fi
3d248aec 22515
4d815aed 22516 rm -Rf build
94a40997 22517
94a40997 22518
4d815aed 22519
3d248aec 22520 { $as_echo "$as_me:$LINENO: checking whether super_block has s_d_op" >&5
68d83c55 22521$as_echo_n "checking whether super_block has s_d_op... " >&6; }
4d815aed
AX
22522
22523
22524cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22525/* confdefs.h. */
22526_ACEOF
22527cat confdefs.h >>conftest.$ac_ext
22528cat >>conftest.$ac_ext <<_ACEOF
22529/* end confdefs.h. */
4d815aed
AX
22530
22531
68d83c55 22532 #include <linux/fs.h>
94a40997
AX
22533
22534int
22535main (void)
22536{
22537
68d83c55
AX
22538 struct super_block sb __attribute__ ((unused));
22539 sb.s_d_op = NULL;
94a40997
AX
22540
22541 ;
22542 return 0;
22543}
22544
22545_ACEOF
22546
22547
22548
22549cat - <<_ACEOF >conftest.h
22550
22551_ACEOF
22552
22553
22554 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22555 echo "obj-m := conftest.o" >build/Makefile
22556 modpost_flag=''
22557 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22558 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 22559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
22560 (eval $ac_try) 2>&5
22561 ac_status=$?
3d248aec
AX
22562 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22563 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
22565 (eval $ac_try) 2>&5
22566 ac_status=$?
3d248aec
AX
22567 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22568 (exit $ac_status); }; }; then
94a40997 22569
3d248aec 22570 { $as_echo "$as_me:$LINENO: result: yes" >&5
94a40997
AX
22571$as_echo "yes" >&6; }
22572
3d248aec
AX
22573cat >>confdefs.h <<\_ACEOF
22574#define HAVE_S_D_OP 1
22575_ACEOF
94a40997
AX
22576
22577
22578else
22579 $as_echo "$as_me: failed program was:" >&5
22580sed 's/^/| /' conftest.$ac_ext >&5
22581
3d248aec 22582 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 22583$as_echo "no" >&6; }
ea04106b
AX
22584
22585
ea04106b 22586
e10b0808 22587fi
3d248aec 22588
e10b0808 22589 rm -Rf build
ea04106b
AX
22590
22591
ea04106b 22592
ea04106b 22593
3d248aec
AX
22594 { $as_echo "$as_me:$LINENO: checking whether super_setup_bdi_name() exists" >&5
22595$as_echo_n "checking whether super_setup_bdi_name() exists... " >&6; }
68d83c55 22596
ea04106b
AX
22597
22598
22599cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22600/* confdefs.h. */
22601_ACEOF
22602cat confdefs.h >>conftest.$ac_ext
22603cat >>conftest.$ac_ext <<_ACEOF
22604/* end confdefs.h. */
ea04106b
AX
22605
22606
3d248aec
AX
22607 #include <linux/fs.h>
22608 struct super_block sb;
ea04106b
AX
22609
22610int
22611main (void)
22612{
22613
68d83c55
AX
22614 char *name = "bdi";
22615 int error __attribute__((unused)) =
3d248aec 22616 super_setup_bdi_name(&sb, name);
ea04106b
AX
22617
22618 ;
22619 return 0;
22620}
22621
22622_ACEOF
22623
22624
22625
22626cat - <<_ACEOF >conftest.h
22627
22628_ACEOF
22629
22630
22631 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22632 echo "obj-m := conftest.o" >build/Makefile
22633 modpost_flag=''
22634 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22635 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 22636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22637 (eval $ac_try) 2>&5
22638 ac_status=$?
3d248aec
AX
22639 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22640 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
22642 (eval $ac_try) 2>&5
22643 ac_status=$?
3d248aec
AX
22644 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22645 (exit $ac_status); }; }; then
68d83c55 22646 rc=0
4d815aed
AX
22647else
22648 $as_echo "$as_me: failed program was:" >&5
22649sed 's/^/| /' conftest.$ac_ext >&5
68d83c55 22650 rc=1
ea04106b 22651
ea04106b 22652
4d815aed 22653fi
3d248aec 22654
4d815aed 22655 rm -Rf build
ea04106b 22656
ea04106b 22657
68d83c55 22658 if test $rc -ne 0; then :
ea04106b 22659
3d248aec 22660 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 22661$as_echo "no" >&6; }
3d248aec
AX
22662 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 2 args" >&5
22663$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
ea04106b 22664
ea04106b
AX
22665
22666
4d815aed 22667cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22668/* confdefs.h. */
22669_ACEOF
22670cat confdefs.h >>conftest.$ac_ext
22671cat >>conftest.$ac_ext <<_ACEOF
22672/* end confdefs.h. */
ea04106b
AX
22673
22674
68d83c55
AX
22675 #include <linux/backing-dev.h>
22676 struct backing_dev_info bdi;
ea04106b 22677
4d815aed
AX
22678int
22679main (void)
22680{
ea04106b 22681
68d83c55 22682 char *name = "bdi";
68d83c55 22683 int error __attribute__((unused)) =
3d248aec
AX
22684 bdi_setup_and_register(&bdi, name);
22685
22686 ;
22687 return 0;
22688}
22689
22690_ACEOF
22691
22692
22693
22694cat - <<_ACEOF >conftest.h
22695
22696_ACEOF
22697
22698
22699 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22700 echo "obj-m := conftest.o" >build/Makefile
22701 modpost_flag=''
22702 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22703 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
22704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22705 (eval $ac_try) 2>&5
22706 ac_status=$?
22707 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22708 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22710 (eval $ac_try) 2>&5
22711 ac_status=$?
22712 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22713 (exit $ac_status); }; }; then
22714 rc=0
22715else
22716 $as_echo "$as_me: failed program was:" >&5
22717sed 's/^/| /' conftest.$ac_ext >&5
22718 rc=1
22719
22720
22721fi
22722
22723 rm -Rf build
22724
22725
22726 if test $rc -ne 0; then :
22727
22728 { $as_echo "$as_me:$LINENO: result: no" >&5
22729$as_echo "no" >&6; }
22730 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
22731$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
22732
22733
22734
22735cat confdefs.h - <<_ACEOF >conftest.c
22736/* confdefs.h. */
22737_ACEOF
22738cat confdefs.h >>conftest.$ac_ext
22739cat >>conftest.$ac_ext <<_ACEOF
22740/* end confdefs.h. */
22741
22742
22743 #include <linux/backing-dev.h>
22744 struct backing_dev_info bdi;
22745
22746int
22747main (void)
22748{
22749
22750 char *name = "bdi";
22751 unsigned int cap = BDI_CAP_MAP_COPY;
22752 int error __attribute__((unused)) =
22753 bdi_setup_and_register(&bdi, name, cap);
ea04106b 22754
4d815aed
AX
22755 ;
22756 return 0;
22757}
ea04106b 22758
4d815aed 22759_ACEOF
ea04106b 22760
ea04106b 22761
ea04106b 22762
4d815aed 22763cat - <<_ACEOF >conftest.h
ea04106b 22764
4d815aed 22765_ACEOF
ea04106b 22766
ea04106b 22767
4d815aed
AX
22768 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22769 echo "obj-m := conftest.o" >build/Makefile
22770 modpost_flag=''
22771 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22772 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 22773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
22774 (eval $ac_try) 2>&5
22775 ac_status=$?
3d248aec
AX
22776 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22777 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
22779 (eval $ac_try) 2>&5
22780 ac_status=$?
3d248aec
AX
22781 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22782 (exit $ac_status); }; }; then
68d83c55
AX
22783 rc=0
22784else
22785 $as_echo "$as_me: failed program was:" >&5
22786sed 's/^/| /' conftest.$ac_ext >&5
22787 rc=1
ea04106b
AX
22788
22789
68d83c55 22790fi
3d248aec 22791
68d83c55 22792 rm -Rf build
ea04106b 22793
ea04106b 22794
68d83c55 22795 if test $rc -ne 0; then :
4d815aed 22796
3d248aec 22797 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 22798$as_echo "no" >&6; }
ea04106b 22799
68d83c55
AX
22800 else
22801 if test "x$enable_linux_builtin" != xyes; then
ea04106b 22802
68d83c55
AX
22803 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
22804 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
22805 rc=$?
22806 if test $rc -ne 0; then
22807 export=0
22808 for file in mm/backing-dev.c; do
22809 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
22810 "$LINUX/$file" 2>/dev/null
22811 rc=$?
22812 if test $rc -eq 0; then
22813 export=1
22814 break;
22815 fi
22816 done
22817 if test $export -eq 0; then :
22818 rc=1
22819 else :
22820 rc=0
22821 fi
22822 else :
22823 rc=0
22824 fi
22825
22826 fi
22827 if test $rc -ne 0; then :
22828
3d248aec 22829 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 22830$as_echo "no" >&6; }
ea04106b 22831
68d83c55 22832 else :
ea04106b 22833
3d248aec 22834 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 22835$as_echo "yes" >&6; }
ea04106b 22836
3d248aec
AX
22837cat >>confdefs.h <<\_ACEOF
22838#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
22839_ACEOF
ea04106b 22840
ea04106b 22841
68d83c55
AX
22842 fi
22843 fi
ea04106b 22844
ea04106b 22845
68d83c55
AX
22846 else
22847 if test "x$enable_linux_builtin" != xyes; then
22848
22849 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
22850 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
22851 rc=$?
22852 if test $rc -ne 0; then
22853 export=0
22854 for file in mm/backing-dev.c; do
22855 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
22856 "$LINUX/$file" 2>/dev/null
22857 rc=$?
22858 if test $rc -eq 0; then
22859 export=1
22860 break;
22861 fi
22862 done
22863 if test $export -eq 0; then :
22864 rc=1
22865 else :
22866 rc=0
22867 fi
22868 else :
22869 rc=0
22870 fi
22871
22872 fi
22873 if test $rc -ne 0; then :
22874
3d248aec 22875 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 22876$as_echo "no" >&6; }
3d248aec 22877 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
68d83c55
AX
22878$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
22879
22880
22881
22882cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
22883/* confdefs.h. */
22884_ACEOF
22885cat confdefs.h >>conftest.$ac_ext
22886cat >>conftest.$ac_ext <<_ACEOF
22887/* end confdefs.h. */
22888
22889
22890 #include <linux/backing-dev.h>
22891 struct backing_dev_info bdi;
22892
22893int
22894main (void)
22895{
22896
22897 char *name = "bdi";
22898 unsigned int cap = BDI_CAP_MAP_COPY;
22899 int error __attribute__((unused)) =
22900 bdi_setup_and_register(&bdi, name, cap);
22901
22902 ;
22903 return 0;
22904}
22905
22906_ACEOF
22907
22908
22909
22910cat - <<_ACEOF >conftest.h
22911
22912_ACEOF
22913
22914
22915 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
22916 echo "obj-m := conftest.o" >build/Makefile
22917 modpost_flag=''
22918 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
22919 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
22920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22921 (eval $ac_try) 2>&5
22922 ac_status=$?
22923 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22924 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
22925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22926 (eval $ac_try) 2>&5
22927 ac_status=$?
22928 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22929 (exit $ac_status); }; }; then
22930 rc=0
22931else
22932 $as_echo "$as_me: failed program was:" >&5
22933sed 's/^/| /' conftest.$ac_ext >&5
22934 rc=1
22935
22936
22937fi
22938
22939 rm -Rf build
22940
22941
22942 if test $rc -ne 0; then :
22943
22944 { $as_echo "$as_me:$LINENO: result: no" >&5
22945$as_echo "no" >&6; }
22946
22947 else
22948 if test "x$enable_linux_builtin" != xyes; then
22949
22950 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
22951 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
22952 rc=$?
22953 if test $rc -ne 0; then
22954 export=0
22955 for file in mm/backing-dev.c; do
22956 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
22957 "$LINUX/$file" 2>/dev/null
22958 rc=$?
22959 if test $rc -eq 0; then
22960 export=1
22961 break;
22962 fi
22963 done
22964 if test $export -eq 0; then :
22965 rc=1
22966 else :
22967 rc=0
22968 fi
22969 else :
22970 rc=0
22971 fi
22972
22973 fi
22974 if test $rc -ne 0; then :
22975
22976 { $as_echo "$as_me:$LINENO: result: no" >&5
22977$as_echo "no" >&6; }
22978
22979 else :
22980
22981 { $as_echo "$as_me:$LINENO: result: yes" >&5
22982$as_echo "yes" >&6; }
22983
22984cat >>confdefs.h <<\_ACEOF
22985#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
22986_ACEOF
22987
22988
22989 fi
22990 fi
22991
22992
22993 else :
22994
22995 { $as_echo "$as_me:$LINENO: result: yes" >&5
22996$as_echo "yes" >&6; }
22997
22998cat >>confdefs.h <<\_ACEOF
22999#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1
23000_ACEOF
23001
23002
23003 fi
23004 fi
23005
23006
23007 else
23008 if test "x$enable_linux_builtin" != xyes; then
23009
23010 grep -q -E '[[:space:]]super_setup_bdi_name[[:space:]]' \
23011 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
23012 rc=$?
23013 if test $rc -ne 0; then
23014 export=0
23015 for file in fs/super.c; do
23016 grep -q -E "EXPORT_SYMBOL.*(super_setup_bdi_name)" \
23017 "$LINUX/$file" 2>/dev/null
23018 rc=$?
23019 if test $rc -eq 0; then
23020 export=1
23021 break;
23022 fi
23023 done
23024 if test $export -eq 0; then :
23025 rc=1
23026 else :
23027 rc=0
23028 fi
23029 else :
23030 rc=0
23031 fi
23032
23033 fi
23034 if test $rc -ne 0; then :
23035
23036 { $as_echo "$as_me:$LINENO: result: no" >&5
23037$as_echo "no" >&6; }
23038 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 2 args" >&5
23039$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
23040
23041
23042
23043cat confdefs.h - <<_ACEOF >conftest.c
23044/* confdefs.h. */
23045_ACEOF
23046cat confdefs.h >>conftest.$ac_ext
23047cat >>conftest.$ac_ext <<_ACEOF
23048/* end confdefs.h. */
68d83c55
AX
23049
23050
23051 #include <linux/backing-dev.h>
23052 struct backing_dev_info bdi;
23053
23054int
23055main (void)
23056{
23057
23058 char *name = "bdi";
68d83c55 23059 int error __attribute__((unused)) =
3d248aec 23060 bdi_setup_and_register(&bdi, name);
ea04106b 23061
4d815aed
AX
23062 ;
23063 return 0;
23064}
ea04106b 23065
4d815aed 23066_ACEOF
ea04106b 23067
ea04106b 23068
ea04106b 23069
4d815aed 23070cat - <<_ACEOF >conftest.h
ea04106b 23071
4d815aed 23072_ACEOF
ea04106b
AX
23073
23074
4d815aed
AX
23075 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23076 echo "obj-m := conftest.o" >build/Makefile
23077 modpost_flag=''
23078 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23079 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 23080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
23081 (eval $ac_try) 2>&5
23082 ac_status=$?
3d248aec
AX
23083 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23084 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
23086 (eval $ac_try) 2>&5
23087 ac_status=$?
3d248aec
AX
23088 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23089 (exit $ac_status); }; }; then
68d83c55
AX
23090 rc=0
23091else
23092 $as_echo "$as_me: failed program was:" >&5
23093sed 's/^/| /' conftest.$ac_ext >&5
23094 rc=1
23095
23096
23097fi
3d248aec 23098
68d83c55
AX
23099 rm -Rf build
23100
23101
23102 if test $rc -ne 0; then :
23103
3d248aec
AX
23104 { $as_echo "$as_me:$LINENO: result: no" >&5
23105$as_echo "no" >&6; }
23106 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
23107$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
23108
23109
23110
23111cat confdefs.h - <<_ACEOF >conftest.c
23112/* confdefs.h. */
23113_ACEOF
23114cat confdefs.h >>conftest.$ac_ext
23115cat >>conftest.$ac_ext <<_ACEOF
23116/* end confdefs.h. */
23117
23118
23119 #include <linux/backing-dev.h>
23120 struct backing_dev_info bdi;
23121
23122int
23123main (void)
23124{
23125
23126 char *name = "bdi";
23127 unsigned int cap = BDI_CAP_MAP_COPY;
23128 int error __attribute__((unused)) =
23129 bdi_setup_and_register(&bdi, name, cap);
23130
23131 ;
23132 return 0;
23133}
23134
23135_ACEOF
23136
23137
23138
23139cat - <<_ACEOF >conftest.h
23140
23141_ACEOF
23142
23143
23144 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23145 echo "obj-m := conftest.o" >build/Makefile
23146 modpost_flag=''
23147 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23148 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
23149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23150 (eval $ac_try) 2>&5
23151 ac_status=$?
23152 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23153 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23155 (eval $ac_try) 2>&5
23156 ac_status=$?
23157 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23158 (exit $ac_status); }; }; then
23159 rc=0
23160else
23161 $as_echo "$as_me: failed program was:" >&5
23162sed 's/^/| /' conftest.$ac_ext >&5
23163 rc=1
23164
23165
23166fi
23167
23168 rm -Rf build
23169
23170
23171 if test $rc -ne 0; then :
23172
23173 { $as_echo "$as_me:$LINENO: result: no" >&5
23174$as_echo "no" >&6; }
23175
23176 else
23177 if test "x$enable_linux_builtin" != xyes; then
23178
23179 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
23180 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
23181 rc=$?
23182 if test $rc -ne 0; then
23183 export=0
23184 for file in mm/backing-dev.c; do
23185 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
23186 "$LINUX/$file" 2>/dev/null
23187 rc=$?
23188 if test $rc -eq 0; then
23189 export=1
23190 break;
23191 fi
23192 done
23193 if test $export -eq 0; then :
23194 rc=1
23195 else :
23196 rc=0
23197 fi
23198 else :
23199 rc=0
23200 fi
23201
23202 fi
23203 if test $rc -ne 0; then :
23204
23205 { $as_echo "$as_me:$LINENO: result: no" >&5
23206$as_echo "no" >&6; }
23207
23208 else :
23209
23210 { $as_echo "$as_me:$LINENO: result: yes" >&5
23211$as_echo "yes" >&6; }
23212
23213cat >>confdefs.h <<\_ACEOF
23214#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
23215_ACEOF
23216
23217
23218 fi
23219 fi
23220
23221
23222 else
23223 if test "x$enable_linux_builtin" != xyes; then
23224
23225 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
23226 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
23227 rc=$?
23228 if test $rc -ne 0; then
23229 export=0
23230 for file in mm/backing-dev.c; do
23231 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
23232 "$LINUX/$file" 2>/dev/null
23233 rc=$?
23234 if test $rc -eq 0; then
23235 export=1
23236 break;
23237 fi
23238 done
23239 if test $export -eq 0; then :
23240 rc=1
23241 else :
23242 rc=0
23243 fi
23244 else :
23245 rc=0
23246 fi
23247
23248 fi
23249 if test $rc -ne 0; then :
23250
23251 { $as_echo "$as_me:$LINENO: result: no" >&5
23252$as_echo "no" >&6; }
23253 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
23254$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
23255
23256
23257
23258cat confdefs.h - <<_ACEOF >conftest.c
23259/* confdefs.h. */
23260_ACEOF
23261cat confdefs.h >>conftest.$ac_ext
23262cat >>conftest.$ac_ext <<_ACEOF
23263/* end confdefs.h. */
23264
23265
23266 #include <linux/backing-dev.h>
23267 struct backing_dev_info bdi;
23268
23269int
23270main (void)
23271{
23272
23273 char *name = "bdi";
23274 unsigned int cap = BDI_CAP_MAP_COPY;
23275 int error __attribute__((unused)) =
23276 bdi_setup_and_register(&bdi, name, cap);
23277
23278 ;
23279 return 0;
23280}
23281
23282_ACEOF
23283
23284
23285
23286cat - <<_ACEOF >conftest.h
23287
23288_ACEOF
23289
23290
23291 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23292 echo "obj-m := conftest.o" >build/Makefile
23293 modpost_flag=''
23294 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23295 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
23296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23297 (eval $ac_try) 2>&5
23298 ac_status=$?
23299 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23300 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
23302 (eval $ac_try) 2>&5
23303 ac_status=$?
23304 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23305 (exit $ac_status); }; }; then
23306 rc=0
23307else
23308 $as_echo "$as_me: failed program was:" >&5
23309sed 's/^/| /' conftest.$ac_ext >&5
23310 rc=1
23311
23312
23313fi
23314
23315 rm -Rf build
23316
23317
23318 if test $rc -ne 0; then :
23319
23320 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
23321$as_echo "no" >&6; }
23322
23323 else
23324 if test "x$enable_linux_builtin" != xyes; then
23325
23326 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
23327 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
23328 rc=$?
23329 if test $rc -ne 0; then
23330 export=0
23331 for file in mm/backing-dev.c; do
23332 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
23333 "$LINUX/$file" 2>/dev/null
23334 rc=$?
23335 if test $rc -eq 0; then
23336 export=1
23337 break;
23338 fi
23339 done
23340 if test $export -eq 0; then :
23341 rc=1
23342 else :
23343 rc=0
23344 fi
23345 else :
23346 rc=0
23347 fi
23348
23349 fi
23350 if test $rc -ne 0; then :
23351
3d248aec 23352 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
23353$as_echo "no" >&6; }
23354
23355 else :
4d815aed 23356
3d248aec
AX
23357 { $as_echo "$as_me:$LINENO: result: yes" >&5
23358$as_echo "yes" >&6; }
23359
23360cat >>confdefs.h <<\_ACEOF
23361#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
23362_ACEOF
23363
23364
23365 fi
23366 fi
23367
23368
23369 else :
23370
23371 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
23372$as_echo "yes" >&6; }
23373
3d248aec
AX
23374cat >>confdefs.h <<\_ACEOF
23375#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1
23376_ACEOF
68d83c55
AX
23377
23378
23379 fi
23380 fi
23381
23382
23383 else :
23384
3d248aec 23385 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
23386$as_echo "yes" >&6; }
23387
3d248aec
AX
23388cat >>confdefs.h <<\_ACEOF
23389#define HAVE_SUPER_SETUP_BDI_NAME 1
23390_ACEOF
68d83c55
AX
23391
23392
23393 fi
23394 fi
23395
23396
23397
3d248aec 23398 { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5
68d83c55
AX
23399$as_echo_n "checking whether set_nlink() is available... " >&6; }
23400
23401
23402cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
23403/* confdefs.h. */
23404_ACEOF
23405cat confdefs.h >>conftest.$ac_ext
23406cat >>conftest.$ac_ext <<_ACEOF
23407/* end confdefs.h. */
68d83c55
AX
23408
23409
23410 #include <linux/fs.h>
23411
23412int
23413main (void)
23414{
23415
23416 struct inode node;
23417 unsigned int link = 0;
23418 (void) set_nlink(&node, link);
23419
23420 ;
23421 return 0;
23422}
23423
23424_ACEOF
23425
23426
23427
23428cat - <<_ACEOF >conftest.h
23429
23430_ACEOF
23431
23432
23433 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23434 echo "obj-m := conftest.o" >build/Makefile
23435 modpost_flag=''
23436 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23437 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 23438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23439 (eval $ac_try) 2>&5
23440 ac_status=$?
3d248aec
AX
23441 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23442 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23444 (eval $ac_try) 2>&5
23445 ac_status=$?
3d248aec
AX
23446 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23447 (exit $ac_status); }; }; then
68d83c55 23448
3d248aec 23449 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
23450$as_echo "yes" >&6; }
23451
3d248aec
AX
23452cat >>confdefs.h <<\_ACEOF
23453#define HAVE_SET_NLINK 1
23454_ACEOF
ea04106b 23455
ea04106b 23456
e10b0808 23457else
4d815aed
AX
23458 $as_echo "$as_me: failed program was:" >&5
23459sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 23460
3d248aec 23461 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 23462$as_echo "no" >&6; }
ea04106b 23463
ea04106b
AX
23464
23465
68d83c55 23466fi
3d248aec 23467
68d83c55 23468 rm -Rf build
ea04106b 23469
ea04106b 23470
68d83c55
AX
23471
23472
3d248aec 23473 { $as_echo "$as_me:$LINENO: checking whether elevator_change() is available" >&5
68d83c55
AX
23474$as_echo_n "checking whether elevator_change() is available... " >&6; }
23475 tmp_flags="$EXTRA_KCFLAGS"
23476 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
23477
23478
23479cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
23480/* confdefs.h. */
23481_ACEOF
23482cat confdefs.h >>conftest.$ac_ext
23483cat >>conftest.$ac_ext <<_ACEOF
23484/* end confdefs.h. */
68d83c55
AX
23485
23486
23487 #include <linux/blkdev.h>
23488 #include <linux/elevator.h>
ea04106b 23489
4d815aed
AX
23490int
23491main (void)
23492{
ea04106b 23493
68d83c55
AX
23494 int ret;
23495 struct request_queue *q = NULL;
23496 char *elevator = NULL;
23497 ret = elevator_change(q, elevator);
ea04106b 23498
4d815aed
AX
23499 ;
23500 return 0;
23501}
ea04106b 23502
4d815aed 23503_ACEOF
ea04106b
AX
23504
23505
ea04106b 23506
4d815aed 23507cat - <<_ACEOF >conftest.h
ea04106b 23508
4d815aed 23509_ACEOF
ea04106b 23510
ea04106b 23511
4d815aed
AX
23512 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23513 echo "obj-m := conftest.o" >build/Makefile
23514 modpost_flag=''
23515 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23516 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 23517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
23518 (eval $ac_try) 2>&5
23519 ac_status=$?
3d248aec
AX
23520 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23521 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23522 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
23523 (eval $ac_try) 2>&5
23524 ac_status=$?
3d248aec
AX
23525 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23526 (exit $ac_status); }; }; then
ea04106b 23527
3d248aec 23528 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 23529$as_echo "yes" >&6; }
ea04106b 23530
3d248aec
AX
23531cat >>confdefs.h <<\_ACEOF
23532#define HAVE_ELEVATOR_CHANGE 1
23533_ACEOF
ea04106b 23534
ea04106b 23535
4d815aed
AX
23536else
23537 $as_echo "$as_me: failed program was:" >&5
23538sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 23539
3d248aec 23540 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 23541$as_echo "no" >&6; }
ea04106b
AX
23542
23543
ea04106b 23544
e10b0808 23545fi
3d248aec 23546
4d815aed 23547 rm -Rf build
ea04106b 23548
ea04106b 23549
68d83c55 23550 EXTRA_KCFLAGS="$tmp_flags"
ea04106b 23551
3d248aec 23552 { $as_echo "$as_me:$LINENO: checking whether sget() wants 5 args" >&5
68d83c55 23553$as_echo_n "checking whether sget() wants 5 args... " >&6; }
ea04106b 23554
ea04106b 23555
68d83c55 23556cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
23557/* confdefs.h. */
23558_ACEOF
23559cat confdefs.h >>conftest.$ac_ext
23560cat >>conftest.$ac_ext <<_ACEOF
23561/* end confdefs.h. */
68d83c55
AX
23562
23563
23564 #include <linux/fs.h>
23565
23566int
23567main (void)
23568{
23569
23570 struct file_system_type *type = NULL;
23571 int (*test)(struct super_block *,void *) = NULL;
23572 int (*set)(struct super_block *,void *) = NULL;
23573 int flags = 0;
23574 void *data = NULL;
23575 (void) sget(type, test, set, flags, data);
23576
23577 ;
23578 return 0;
23579}
23580
23581_ACEOF
23582
23583
23584
23585cat - <<_ACEOF >conftest.h
23586
23587_ACEOF
23588
23589
23590 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23591 echo "obj-m := conftest.o" >build/Makefile
23592 modpost_flag=''
23593 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23594 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 23595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23596 (eval $ac_try) 2>&5
23597 ac_status=$?
3d248aec
AX
23598 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23599 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23601 (eval $ac_try) 2>&5
23602 ac_status=$?
3d248aec
AX
23603 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23604 (exit $ac_status); }; }; then
68d83c55 23605
3d248aec 23606 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 23607$as_echo "yes" >&6; }
ea04106b 23608
3d248aec
AX
23609cat >>confdefs.h <<\_ACEOF
23610#define HAVE_5ARG_SGET 1
23611_ACEOF
68d83c55
AX
23612
23613
23614else
23615 $as_echo "$as_me: failed program was:" >&5
23616sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 23617
3d248aec 23618 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 23619$as_echo "no" >&6; }
ea04106b
AX
23620
23621
ea04106b 23622
4d815aed 23623fi
3d248aec 23624
4d815aed 23625 rm -Rf build
ea04106b
AX
23626
23627
ea04106b 23628
3d248aec 23629 { $as_echo "$as_me:$LINENO: checking whether lseek_execute() is available" >&5
68d83c55 23630$as_echo_n "checking whether lseek_execute() is available... " >&6; }
ea04106b 23631
e10b0808 23632
ea04106b 23633
4d815aed 23634cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
23635/* confdefs.h. */
23636_ACEOF
23637cat confdefs.h >>conftest.$ac_ext
23638cat >>conftest.$ac_ext <<_ACEOF
23639/* end confdefs.h. */
ea04106b 23640
ea04106b 23641
68d83c55 23642 #include <linux/fs.h>
ea04106b 23643
e10b0808 23644int
4d815aed 23645main (void)
e10b0808 23646{
4d815aed 23647
68d83c55
AX
23648 struct file *fp __attribute__ ((unused)) = NULL;
23649 struct inode *ip __attribute__ ((unused)) = NULL;
23650 loff_t offset __attribute__ ((unused)) = 0;
23651 loff_t maxsize __attribute__ ((unused)) = 0;
23652
23653 lseek_execute(fp, ip, offset, maxsize);
4d815aed 23654
e10b0808
AX
23655 ;
23656 return 0;
23657}
ea04106b 23658
4d815aed 23659_ACEOF
ea04106b 23660
ea04106b
AX
23661
23662
4d815aed 23663cat - <<_ACEOF >conftest.h
ea04106b 23664
ea04106b
AX
23665_ACEOF
23666
23667
4d815aed
AX
23668 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23669 echo "obj-m := conftest.o" >build/Makefile
23670 modpost_flag=''
23671 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23672 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 23673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
23674 (eval $ac_try) 2>&5
23675 ac_status=$?
3d248aec
AX
23676 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23677 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
23679 (eval $ac_try) 2>&5
23680 ac_status=$?
3d248aec
AX
23681 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23682 (exit $ac_status); }; }; then
4d815aed 23683 rc=0
e10b0808 23684else
4d815aed
AX
23685 $as_echo "$as_me: failed program was:" >&5
23686sed 's/^/| /' conftest.$ac_ext >&5
23687 rc=1
23688
23689
e10b0808 23690fi
3d248aec 23691
4d815aed 23692 rm -Rf build
ea04106b
AX
23693
23694
4d815aed
AX
23695 if test $rc -ne 0; then :
23696
3d248aec 23697 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
23698$as_echo "no" >&6; }
23699
23700 else
23701 if test "x$enable_linux_builtin" != xyes; then
23702
68d83c55 23703 grep -q -E '[[:space:]]lseek_exclusive[[:space:]]' \
4d815aed
AX
23704 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
23705 rc=$?
23706 if test $rc -ne 0; then
23707 export=0
68d83c55
AX
23708 for file in fs/read_write.c; do
23709 grep -q -E "EXPORT_SYMBOL.*(lseek_exclusive)" \
4d815aed
AX
23710 "$LINUX/$file" 2>/dev/null
23711 rc=$?
23712 if test $rc -eq 0; then
23713 export=1
23714 break;
23715 fi
23716 done
23717 if test $export -eq 0; then :
23718 rc=1
23719 else :
23720 rc=0
23721 fi
23722 else :
23723 rc=0
23724 fi
23725
23726 fi
23727 if test $rc -ne 0; then :
23728
3d248aec 23729 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
23730$as_echo "no" >&6; }
23731
23732 else :
23733
3d248aec 23734 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
23735$as_echo "yes" >&6; }
23736
3d248aec
AX
23737cat >>confdefs.h <<\_ACEOF
23738#define HAVE_LSEEK_EXECUTE 1
23739_ACEOF
4d815aed
AX
23740
23741
23742 fi
23743 fi
23744
23745
23746
3d248aec 23747 { $as_echo "$as_me:$LINENO: checking whether fops->iterate_shared() is available" >&5
68d83c55 23748$as_echo_n "checking whether fops->iterate_shared() is available... " >&6; }
4d815aed 23749
ea04106b 23750
68d83c55 23751cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
23752/* confdefs.h. */
23753_ACEOF
23754cat confdefs.h >>conftest.$ac_ext
23755cat >>conftest.$ac_ext <<_ACEOF
23756/* end confdefs.h. */
4d815aed
AX
23757
23758
68d83c55
AX
23759 #include <linux/fs.h>
23760 int iterate(struct file *filp, struct dir_context * context)
23761 { return 0; }
4d815aed 23762
68d83c55
AX
23763 static const struct file_operations fops
23764 __attribute__ ((unused)) = {
23765 .iterate_shared = iterate,
23766 };
4d815aed 23767
68d83c55
AX
23768int
23769main (void)
23770{
4d815aed 23771
4d815aed 23772
68d83c55
AX
23773 ;
23774 return 0;
23775}
4d815aed 23776
68d83c55 23777_ACEOF
ea04106b 23778
ea04106b 23779
4d815aed 23780
68d83c55 23781cat - <<_ACEOF >conftest.h
4d815aed 23782
68d83c55 23783_ACEOF
4d815aed 23784
4d815aed 23785
68d83c55
AX
23786 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23787 echo "obj-m := conftest.o" >build/Makefile
23788 modpost_flag=''
23789 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23790 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 23791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23792 (eval $ac_try) 2>&5
23793 ac_status=$?
3d248aec
AX
23794 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23795 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23797 (eval $ac_try) 2>&5
23798 ac_status=$?
3d248aec
AX
23799 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23800 (exit $ac_status); }; }; then
ea04106b 23801
3d248aec 23802 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 23803$as_echo "yes" >&6; }
ea04106b 23804
3d248aec
AX
23805cat >>confdefs.h <<\_ACEOF
23806#define HAVE_VFS_ITERATE_SHARED 1
23807_ACEOF
ea04106b
AX
23808
23809
4d815aed 23810else
68d83c55
AX
23811 $as_echo "$as_me: failed program was:" >&5
23812sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 23813
3d248aec 23814 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 23815$as_echo "no" >&6; }
ea04106b 23816
3d248aec 23817 { $as_echo "$as_me:$LINENO: checking whether fops->iterate() is available" >&5
68d83c55 23818$as_echo_n "checking whether fops->iterate() is available... " >&6; }
ea04106b
AX
23819
23820
68d83c55 23821cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
23822/* confdefs.h. */
23823_ACEOF
23824cat confdefs.h >>conftest.$ac_ext
23825cat >>conftest.$ac_ext <<_ACEOF
23826/* end confdefs.h. */
ea04106b
AX
23827
23828
68d83c55
AX
23829 #include <linux/fs.h>
23830 int iterate(struct file *filp, struct dir_context * context)
23831 { return 0; }
23832
23833 static const struct file_operations fops
23834 __attribute__ ((unused)) = {
23835 .iterate = iterate,
23836 };
ea04106b 23837
68d83c55
AX
23838int
23839main (void)
23840{
ea04106b 23841
4d815aed 23842
68d83c55
AX
23843 ;
23844 return 0;
23845}
4d815aed 23846
68d83c55 23847_ACEOF
4d815aed 23848
ea04106b 23849
4d815aed 23850
68d83c55 23851cat - <<_ACEOF >conftest.h
4d815aed 23852
68d83c55 23853_ACEOF
4d815aed
AX
23854
23855
68d83c55
AX
23856 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23857 echo "obj-m := conftest.o" >build/Makefile
23858 modpost_flag=''
23859 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23860 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 23861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23862 (eval $ac_try) 2>&5
23863 ac_status=$?
3d248aec
AX
23864 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23865 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23867 (eval $ac_try) 2>&5
23868 ac_status=$?
3d248aec
AX
23869 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23870 (exit $ac_status); }; }; then
4d815aed 23871
3d248aec 23872 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 23873$as_echo "yes" >&6; }
ea04106b 23874
3d248aec
AX
23875cat >>confdefs.h <<\_ACEOF
23876#define HAVE_VFS_ITERATE 1
23877_ACEOF
ea04106b 23878
4d815aed 23879
e10b0808 23880else
68d83c55
AX
23881 $as_echo "$as_me: failed program was:" >&5
23882sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 23883
3d248aec 23884 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 23885$as_echo "no" >&6; }
ea04106b 23886
3d248aec 23887 { $as_echo "$as_me:$LINENO: checking whether fops->readdir() is available" >&5
68d83c55 23888$as_echo_n "checking whether fops->readdir() is available... " >&6; }
4d815aed 23889
4d815aed 23890
68d83c55 23891cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
23892/* confdefs.h. */
23893_ACEOF
23894cat confdefs.h >>conftest.$ac_ext
23895cat >>conftest.$ac_ext <<_ACEOF
23896/* end confdefs.h. */
4d815aed 23897
4d815aed 23898
68d83c55
AX
23899 #include <linux/fs.h>
23900 int readdir(struct file *filp, void *entry, filldir_t func)
23901 { return 0; }
4d815aed 23902
68d83c55
AX
23903 static const struct file_operations fops
23904 __attribute__ ((unused)) = {
23905 .readdir = readdir,
23906 };
4d815aed 23907
68d83c55
AX
23908int
23909main (void)
23910{
4d815aed
AX
23911
23912
68d83c55
AX
23913 ;
23914 return 0;
23915}
4d815aed 23916
68d83c55 23917_ACEOF
4d815aed
AX
23918
23919
ea04106b 23920
68d83c55
AX
23921cat - <<_ACEOF >conftest.h
23922
23923_ACEOF
4d815aed 23924
4d815aed 23925
68d83c55
AX
23926 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
23927 echo "obj-m := conftest.o" >build/Makefile
23928 modpost_flag=''
23929 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
23930 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 23931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23932 (eval $ac_try) 2>&5
23933 ac_status=$?
3d248aec
AX
23934 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23935 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
23936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
23937 (eval $ac_try) 2>&5
23938 ac_status=$?
3d248aec
AX
23939 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23940 (exit $ac_status); }; }; then
4d815aed 23941
3d248aec 23942 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 23943$as_echo "yes" >&6; }
4d815aed 23944
3d248aec
AX
23945cat >>confdefs.h <<\_ACEOF
23946#define HAVE_VFS_READDIR 1
23947_ACEOF
4d815aed 23948
4d815aed 23949
4d815aed 23950else
68d83c55
AX
23951 $as_echo "$as_me: failed program was:" >&5
23952sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 23953
3d248aec
AX
23954 { { $as_echo "$as_me:$LINENO: error: no; file a bug report with ZFSOnLinux" >&5
23955$as_echo "$as_me: error: no; file a bug report with ZFSOnLinux" >&2;}
23956 { (exit 1); exit 1; }; }
4d815aed 23957
4d815aed 23958
4d815aed 23959
4d815aed 23960fi
3d248aec 23961
68d83c55
AX
23962 rm -Rf build
23963
23964
23965
4d815aed 23966
4d815aed
AX
23967
23968fi
3d248aec 23969
68d83c55 23970 rm -Rf build
4d815aed
AX
23971
23972
4d815aed
AX
23973
23974
4d815aed 23975
68d83c55 23976fi
3d248aec 23977
68d83c55 23978 rm -Rf build
4d815aed
AX
23979
23980
4d815aed 23981
3d248aec 23982 { $as_echo "$as_me:$LINENO: checking whether fops->read/write_iter() are available" >&5
68d83c55 23983$as_echo_n "checking whether fops->read/write_iter() are available... " >&6; }
4d815aed 23984
4d815aed 23985
68d83c55 23986cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
23987/* confdefs.h. */
23988_ACEOF
23989cat confdefs.h >>conftest.$ac_ext
23990cat >>conftest.$ac_ext <<_ACEOF
23991/* end confdefs.h. */
4d815aed 23992
4d815aed 23993
68d83c55 23994 #include <linux/fs.h>
4d815aed 23995
68d83c55
AX
23996 ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
23997 { return 0; }
23998 ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
23999 { return 0; }
4d815aed 24000
68d83c55
AX
24001 static const struct file_operations
24002 fops __attribute__ ((unused)) = {
24003 .read_iter = test_read,
24004 .write_iter = test_write,
24005 };
4d815aed 24006
4d815aed 24007int
68d83c55 24008main (void)
4d815aed 24009{
68d83c55
AX
24010
24011
4d815aed
AX
24012 ;
24013 return 0;
24014}
68d83c55 24015
4d815aed 24016_ACEOF
68d83c55
AX
24017
24018
24019
24020cat - <<_ACEOF >conftest.h
24021
4d815aed
AX
24022_ACEOF
24023
4d815aed 24024
68d83c55
AX
24025 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24026 echo "obj-m := conftest.o" >build/Makefile
24027 modpost_flag=''
24028 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24029 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24031 (eval $ac_try) 2>&5
24032 ac_status=$?
3d248aec
AX
24033 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24034 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24036 (eval $ac_try) 2>&5
24037 ac_status=$?
3d248aec
AX
24038 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24039 (exit $ac_status); }; }; then
4d815aed 24040
3d248aec 24041 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
24042$as_echo "yes" >&6; }
24043
3d248aec
AX
24044cat >>confdefs.h <<\_ACEOF
24045#define HAVE_VFS_RW_ITERATE 1
24046_ACEOF
24047
24048
24049 { $as_echo "$as_me:$LINENO: checking whether new_sync_read() is available" >&5
24050$as_echo_n "checking whether new_sync_read() is available... " >&6; }
24051
24052
24053cat confdefs.h - <<_ACEOF >conftest.c
24054/* confdefs.h. */
24055_ACEOF
24056cat confdefs.h >>conftest.$ac_ext
24057cat >>conftest.$ac_ext <<_ACEOF
24058/* end confdefs.h. */
24059
24060
24061 #include <linux/fs.h>
24062
24063int
24064main (void)
24065{
24066
24067 new_sync_read(NULL, NULL, 0, NULL);
24068
24069 ;
24070 return 0;
24071}
24072
24073_ACEOF
24074
24075
24076
24077cat - <<_ACEOF >conftest.h
24078
24079_ACEOF
24080
24081
24082 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24083 echo "obj-m := conftest.o" >build/Makefile
24084 modpost_flag=''
24085 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24086 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
24087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24088 (eval $ac_try) 2>&5
24089 ac_status=$?
24090 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24091 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24092 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24093 (eval $ac_try) 2>&5
24094 ac_status=$?
24095 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24096 (exit $ac_status); }; }; then
24097
24098 { $as_echo "$as_me:$LINENO: result: yes" >&5
24099$as_echo "yes" >&6; }
24100
24101cat >>confdefs.h <<\_ACEOF
24102#define HAVE_NEW_SYNC_READ 1
24103_ACEOF
4d815aed 24104
4d815aed 24105
4d815aed 24106else
68d83c55
AX
24107 $as_echo "$as_me: failed program was:" >&5
24108sed 's/^/| /' conftest.$ac_ext >&5
24109
3d248aec 24110 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
24111$as_echo "no" >&6; }
24112
4d815aed 24113
4d815aed 24114
4d815aed 24115fi
3d248aec 24116
68d83c55 24117 rm -Rf build
4d815aed
AX
24118
24119
4d815aed 24120
3d248aec
AX
24121
24122else
24123 $as_echo "$as_me: failed program was:" >&5
24124sed 's/^/| /' conftest.$ac_ext >&5
24125
24126 { $as_echo "$as_me:$LINENO: result: no" >&5
24127$as_echo "no" >&6; }
24128
24129
24130
24131fi
24132
24133 rm -Rf build
24134
24135
24136
24137 { $as_echo "$as_me:$LINENO: checking whether generic_write_checks() takes kiocb" >&5
68d83c55
AX
24138$as_echo_n "checking whether generic_write_checks() takes kiocb... " >&6; }
24139
24140
24141cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
24142/* confdefs.h. */
24143_ACEOF
24144cat confdefs.h >>conftest.$ac_ext
24145cat >>conftest.$ac_ext <<_ACEOF
24146/* end confdefs.h. */
68d83c55
AX
24147
24148
24149 #include <linux/fs.h>
24150
24151
4d815aed 24152int
68d83c55 24153main (void)
4d815aed 24154{
68d83c55
AX
24155
24156 struct kiocb *iocb = NULL;
24157 struct iov_iter *iov = NULL;
24158 generic_write_checks(iocb, iov);
24159
4d815aed
AX
24160 ;
24161 return 0;
24162}
68d83c55 24163
4d815aed 24164_ACEOF
68d83c55
AX
24165
24166
24167
24168cat - <<_ACEOF >conftest.h
24169
4d815aed
AX
24170_ACEOF
24171
68d83c55
AX
24172
24173 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24174 echo "obj-m := conftest.o" >build/Makefile
24175 modpost_flag=''
24176 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24177 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24179 (eval $ac_try) 2>&5
24180 ac_status=$?
3d248aec
AX
24181 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24182 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24184 (eval $ac_try) 2>&5
24185 ac_status=$?
3d248aec
AX
24186 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24187 (exit $ac_status); }; }; then
68d83c55 24188
3d248aec 24189 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
24190$as_echo "yes" >&6; }
24191
3d248aec
AX
24192cat >>confdefs.h <<\_ACEOF
24193#define HAVE_GENERIC_WRITE_CHECKS_KIOCB 1
24194_ACEOF
68d83c55 24195
4d815aed
AX
24196
24197else
68d83c55
AX
24198 $as_echo "$as_me: failed program was:" >&5
24199sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 24200
3d248aec 24201 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 24202$as_echo "no" >&6; }
4d815aed 24203
4d815aed
AX
24204
24205
68d83c55 24206fi
3d248aec 24207
68d83c55 24208 rm -Rf build
4d815aed
AX
24209
24210
24211
4d815aed 24212
3d248aec 24213 { $as_echo "$as_me:$LINENO: checking whether kmap_atomic wants 1 args" >&5
68d83c55 24214$as_echo_n "checking whether kmap_atomic wants 1 args... " >&6; }
4d815aed 24215
4d815aed 24216
68d83c55 24217cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
24218/* confdefs.h. */
24219_ACEOF
24220cat confdefs.h >>conftest.$ac_ext
24221cat >>conftest.$ac_ext <<_ACEOF
24222/* end confdefs.h. */
4d815aed
AX
24223
24224
68d83c55 24225 #include <linux/pagemap.h>
4d815aed 24226
4d815aed 24227int
68d83c55 24228main (void)
4d815aed 24229{
68d83c55
AX
24230
24231 struct page page;
24232 kmap_atomic(&page);
24233
4d815aed
AX
24234 ;
24235 return 0;
24236}
68d83c55 24237
4d815aed 24238_ACEOF
68d83c55
AX
24239
24240
24241
24242cat - <<_ACEOF >conftest.h
24243
4d815aed
AX
24244_ACEOF
24245
68d83c55
AX
24246
24247 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24248 echo "obj-m := conftest.o" >build/Makefile
24249 modpost_flag=''
24250 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24251 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24253 (eval $ac_try) 2>&5
24254 ac_status=$?
3d248aec
AX
24255 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24256 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24258 (eval $ac_try) 2>&5
24259 ac_status=$?
3d248aec
AX
24260 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24261 (exit $ac_status); }; }; then
68d83c55 24262
3d248aec 24263 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
24264$as_echo "yes" >&6; }
24265
3d248aec
AX
24266cat >>confdefs.h <<\_ACEOF
24267#define HAVE_1ARG_KMAP_ATOMIC 1
24268_ACEOF
68d83c55 24269
4d815aed
AX
24270
24271else
68d83c55
AX
24272 $as_echo "$as_me: failed program was:" >&5
24273sed 's/^/| /' conftest.$ac_ext >&5
24274
3d248aec 24275 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
24276$as_echo "no" >&6; }
24277
24278
24279
4d815aed 24280fi
3d248aec 24281
68d83c55 24282 rm -Rf build
4d815aed
AX
24283
24284
4d815aed 24285
68d83c55 24286
3d248aec 24287 { $as_echo "$as_me:$LINENO: checking whether follow_down_one() is available" >&5
68d83c55
AX
24288$as_echo_n "checking whether follow_down_one() is available... " >&6; }
24289
24290
24291cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
24292/* confdefs.h. */
24293_ACEOF
24294cat confdefs.h >>conftest.$ac_ext
24295cat >>conftest.$ac_ext <<_ACEOF
24296/* end confdefs.h. */
68d83c55
AX
24297
24298
24299 #include <linux/namei.h>
24300
4d815aed 24301int
68d83c55 24302main (void)
4d815aed 24303{
68d83c55
AX
24304
24305 struct path *p = NULL;
24306 follow_down_one(p);
24307
4d815aed
AX
24308 ;
24309 return 0;
24310}
68d83c55 24311
4d815aed
AX
24312_ACEOF
24313
4d815aed 24314
4d815aed 24315
68d83c55 24316cat - <<_ACEOF >conftest.h
4d815aed 24317
68d83c55 24318_ACEOF
4d815aed
AX
24319
24320
68d83c55
AX
24321 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24322 echo "obj-m := conftest.o" >build/Makefile
24323 modpost_flag=''
24324 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24325 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24327 (eval $ac_try) 2>&5
24328 ac_status=$?
3d248aec
AX
24329 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24330 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24332 (eval $ac_try) 2>&5
24333 ac_status=$?
3d248aec
AX
24334 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24335 (exit $ac_status); }; }; then
4d815aed 24336
3d248aec 24337 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 24338$as_echo "yes" >&6; }
4d815aed 24339
3d248aec
AX
24340cat >>confdefs.h <<\_ACEOF
24341#define HAVE_FOLLOW_DOWN_ONE 1
24342_ACEOF
4d815aed
AX
24343
24344
4d815aed 24345else
68d83c55
AX
24346 $as_echo "$as_me: failed program was:" >&5
24347sed 's/^/| /' conftest.$ac_ext >&5
24348
3d248aec 24349 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
24350$as_echo "no" >&6; }
24351
24352
24353
4d815aed 24354fi
3d248aec 24355
68d83c55 24356 rm -Rf build
4d815aed
AX
24357
24358
4d815aed 24359
4d815aed 24360
3d248aec 24361 { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns int" >&5
68d83c55 24362$as_echo_n "checking whether make_request_fn() returns int... " >&6; }
4d815aed 24363
4d815aed 24364
68d83c55 24365cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
24366/* confdefs.h. */
24367_ACEOF
24368cat confdefs.h >>conftest.$ac_ext
24369cat >>conftest.$ac_ext <<_ACEOF
24370/* end confdefs.h. */
4d815aed 24371
4d815aed 24372
68d83c55 24373 #include <linux/blkdev.h>
4d815aed 24374
68d83c55
AX
24375 int make_request(struct request_queue *q, struct bio *bio)
24376 {
24377 return (0);
24378 }
4d815aed 24379
4d815aed 24380int
68d83c55 24381main (void)
4d815aed 24382{
68d83c55
AX
24383
24384 blk_queue_make_request(NULL, &make_request);
24385
4d815aed
AX
24386 ;
24387 return 0;
24388}
68d83c55 24389
4d815aed 24390_ACEOF
68d83c55
AX
24391
24392
24393
24394cat - <<_ACEOF >conftest.h
24395
24396_ACEOF
24397
24398
24399 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24400 echo "obj-m := conftest.o" >build/Makefile
24401 modpost_flag=''
24402 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24403 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24405 (eval $ac_try) 2>&5
24406 ac_status=$?
3d248aec
AX
24407 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24408 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24410 (eval $ac_try) 2>&5
24411 ac_status=$?
3d248aec
AX
24412 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24413 (exit $ac_status); }; }; then
68d83c55 24414
3d248aec 24415 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
24416$as_echo "yes" >&6; }
24417
3d248aec
AX
24418cat >>confdefs.h <<\_ACEOF
24419#define MAKE_REQUEST_FN_RET int
24420_ACEOF
68d83c55
AX
24421
24422
3d248aec
AX
24423cat >>confdefs.h <<\_ACEOF
24424#define HAVE_MAKE_REQUEST_FN_RET_INT 1
24425_ACEOF
68d83c55
AX
24426
24427
24428else
24429 $as_echo "$as_me: failed program was:" >&5
24430sed 's/^/| /' conftest.$ac_ext >&5
24431
3d248aec 24432 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 24433$as_echo "no" >&6; }
3d248aec 24434 { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns void" >&5
68d83c55
AX
24435$as_echo_n "checking whether make_request_fn() returns void... " >&6; }
24436
24437
24438cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
24439/* confdefs.h. */
24440_ACEOF
24441cat confdefs.h >>conftest.$ac_ext
24442cat >>conftest.$ac_ext <<_ACEOF
24443/* end confdefs.h. */
68d83c55
AX
24444
24445
24446 #include <linux/blkdev.h>
24447
24448 void make_request(struct request_queue *q, struct bio *bio)
24449 {
24450 return;
24451 }
24452
24453int
24454main (void)
24455{
24456
24457 blk_queue_make_request(NULL, &make_request);
24458
24459 ;
24460 return 0;
24461}
24462
24463_ACEOF
24464
24465
24466
24467cat - <<_ACEOF >conftest.h
24468
24469_ACEOF
24470
24471
24472 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24473 echo "obj-m := conftest.o" >build/Makefile
24474 modpost_flag=''
24475 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24476 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24478 (eval $ac_try) 2>&5
24479 ac_status=$?
3d248aec
AX
24480 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24481 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24483 (eval $ac_try) 2>&5
24484 ac_status=$?
3d248aec
AX
24485 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24486 (exit $ac_status); }; }; then
68d83c55 24487
3d248aec 24488 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
24489$as_echo "yes" >&6; }
24490
3d248aec
AX
24491cat >>confdefs.h <<\_ACEOF
24492#define MAKE_REQUEST_FN_RET void
24493_ACEOF
68d83c55
AX
24494
24495
24496else
24497 $as_echo "$as_me: failed program was:" >&5
24498sed 's/^/| /' conftest.$ac_ext >&5
24499
3d248aec 24500 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 24501$as_echo "no" >&6; }
3d248aec 24502 { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns blk_qc_t" >&5
68d83c55
AX
24503$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; }
24504
24505
24506cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
24507/* confdefs.h. */
24508_ACEOF
24509cat confdefs.h >>conftest.$ac_ext
24510cat >>conftest.$ac_ext <<_ACEOF
24511/* end confdefs.h. */
68d83c55
AX
24512
24513
24514 #include <linux/blkdev.h>
24515
24516 blk_qc_t make_request(struct request_queue *q, struct bio *bio)
24517 {
24518 return (BLK_QC_T_NONE);
24519 }
24520
24521int
24522main (void)
24523{
24524
24525 blk_queue_make_request(NULL, &make_request);
24526
24527 ;
24528 return 0;
24529}
24530
24531_ACEOF
24532
24533
24534
24535cat - <<_ACEOF >conftest.h
24536
24537_ACEOF
24538
24539
24540 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24541 echo "obj-m := conftest.o" >build/Makefile
24542 modpost_flag=''
24543 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24544 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24546 (eval $ac_try) 2>&5
24547 ac_status=$?
3d248aec
AX
24548 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24549 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24551 (eval $ac_try) 2>&5
24552 ac_status=$?
3d248aec
AX
24553 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24554 (exit $ac_status); }; }; then
68d83c55 24555
3d248aec 24556 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
24557$as_echo "yes" >&6; }
24558
3d248aec
AX
24559cat >>confdefs.h <<\_ACEOF
24560#define MAKE_REQUEST_FN_RET blk_qc_t
24561_ACEOF
68d83c55
AX
24562
24563
3d248aec
AX
24564cat >>confdefs.h <<\_ACEOF
24565#define HAVE_MAKE_REQUEST_FN_RET_QC 1
24566_ACEOF
68d83c55
AX
24567
24568
24569else
24570 $as_echo "$as_me: failed program was:" >&5
24571sed 's/^/| /' conftest.$ac_ext >&5
24572
3d248aec
AX
24573 { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
24574 https://github.com/zfsonlinux/zfs/issues/new" >&5
24575$as_echo "$as_me: error: no - Please file a bug report at
24576 https://github.com/zfsonlinux/zfs/issues/new" >&2;}
24577 { (exit 1); exit 1; }; }
68d83c55
AX
24578
24579
24580
24581fi
3d248aec 24582
68d83c55
AX
24583 rm -Rf build
24584
24585
24586
24587
24588
24589fi
3d248aec 24590
68d83c55
AX
24591 rm -Rf build
24592
24593
24594
24595
24596
24597fi
3d248aec 24598
68d83c55
AX
24599 rm -Rf build
24600
24601
24602
24603
3d248aec 24604 { $as_echo "$as_me:$LINENO: checking whether generic IO accounting symbols are avaliable" >&5
68d83c55
AX
24605$as_echo_n "checking whether generic IO accounting symbols are avaliable... " >&6; }
24606
24607
24608
24609cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
24610/* confdefs.h. */
24611_ACEOF
24612cat confdefs.h >>conftest.$ac_ext
24613cat >>conftest.$ac_ext <<_ACEOF
24614/* end confdefs.h. */
68d83c55
AX
24615
24616
24617 #include <linux/bio.h>
24618
24619 void (*generic_start_io_acct_f)(int, unsigned long,
24620 struct hd_struct *) = &generic_start_io_acct;
24621 void (*generic_end_io_acct_f)(int, struct hd_struct *,
24622 unsigned long) = &generic_end_io_acct;
24623
24624int
24625main (void)
24626{
24627
24628 generic_start_io_acct(0, 0, NULL);
24629 generic_end_io_acct(0, NULL, 0);
24630
24631 ;
24632 return 0;
24633}
24634
24635_ACEOF
24636
24637
24638
24639cat - <<_ACEOF >conftest.h
24640
24641_ACEOF
24642
24643
24644 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24645 echo "obj-m := conftest.o" >build/Makefile
24646 modpost_flag=''
24647 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24648 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24650 (eval $ac_try) 2>&5
24651 ac_status=$?
3d248aec
AX
24652 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24653 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24655 (eval $ac_try) 2>&5
24656 ac_status=$?
3d248aec
AX
24657 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24658 (exit $ac_status); }; }; then
68d83c55
AX
24659 rc=0
24660else
24661 $as_echo "$as_me: failed program was:" >&5
24662sed 's/^/| /' conftest.$ac_ext >&5
24663 rc=1
24664
24665
24666fi
3d248aec 24667
68d83c55
AX
24668 rm -Rf build
24669
24670
24671 if test $rc -ne 0; then :
24672
3d248aec 24673 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
24674$as_echo "no" >&6; }
24675
24676 else
24677 if test "x$enable_linux_builtin" != xyes; then
24678
24679 grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \
24680 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
24681 rc=$?
24682 if test $rc -ne 0; then
24683 export=0
24684 for file in block/bio.c; do
24685 grep -q -E "EXPORT_SYMBOL.*(generic_start_io_acct)" \
24686 "$LINUX/$file" 2>/dev/null
24687 rc=$?
24688 if test $rc -eq 0; then
24689 export=1
24690 break;
24691 fi
24692 done
24693 if test $export -eq 0; then :
24694 rc=1
24695 else :
24696 rc=0
24697 fi
24698 else :
24699 rc=0
24700 fi
24701
24702 fi
24703 if test $rc -ne 0; then :
24704
3d248aec 24705 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
24706$as_echo "no" >&6; }
24707
24708 else :
24709
3d248aec 24710 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
24711$as_echo "yes" >&6; }
24712
3d248aec
AX
24713cat >>confdefs.h <<\_ACEOF
24714#define HAVE_GENERIC_IO_ACCT 1
24715_ACEOF
68d83c55
AX
24716
24717
24718 fi
24719 fi
24720
24721
24722
3d248aec 24723 { $as_echo "$as_me:$LINENO: checking whether iops->rename() wants flags" >&5
68d83c55
AX
24724$as_echo_n "checking whether iops->rename() wants flags... " >&6; }
24725
24726
24727cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
24728/* confdefs.h. */
24729_ACEOF
24730cat confdefs.h >>conftest.$ac_ext
24731cat >>conftest.$ac_ext <<_ACEOF
24732/* end confdefs.h. */
68d83c55
AX
24733
24734
24735 #include <linux/fs.h>
24736 int rename_fn(struct inode *sip, struct dentry *sdp,
24737 struct inode *tip, struct dentry *tdp,
24738 unsigned int flags) { return 0; }
24739
24740 static const struct inode_operations
24741 iops __attribute__ ((unused)) = {
24742 .rename = rename_fn,
24743 };
24744
24745int
24746main (void)
24747{
24748
24749
24750 ;
24751 return 0;
24752}
24753
24754_ACEOF
24755
24756
24757
24758cat - <<_ACEOF >conftest.h
24759
24760_ACEOF
24761
24762
24763 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24764 echo "obj-m := conftest.o" >build/Makefile
24765 modpost_flag=''
24766 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24767 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24769 (eval $ac_try) 2>&5
24770 ac_status=$?
3d248aec
AX
24771 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24772 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24774 (eval $ac_try) 2>&5
24775 ac_status=$?
3d248aec
AX
24776 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24777 (exit $ac_status); }; }; then
68d83c55 24778
3d248aec 24779 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
24780$as_echo "yes" >&6; }
24781
3d248aec
AX
24782cat >>confdefs.h <<\_ACEOF
24783#define HAVE_RENAME_WANTS_FLAGS 1
24784_ACEOF
68d83c55
AX
24785
24786
24787else
24788 $as_echo "$as_me: failed program was:" >&5
24789sed 's/^/| /' conftest.$ac_ext >&5
24790
3d248aec 24791 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
24792$as_echo "no" >&6; }
24793
24794
24795
24796fi
3d248aec 24797
68d83c55
AX
24798 rm -Rf build
24799
24800
24801
24802
3d248aec 24803 { $as_echo "$as_me:$LINENO: checking whether generic_setxattr() exists" >&5
68d83c55
AX
24804$as_echo_n "checking whether generic_setxattr() exists... " >&6; }
24805
24806
24807cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
24808/* confdefs.h. */
24809_ACEOF
24810cat confdefs.h >>conftest.$ac_ext
24811cat >>conftest.$ac_ext <<_ACEOF
24812/* end confdefs.h. */
68d83c55
AX
24813
24814
24815 #include <linux/fs.h>
24816 #include <linux/xattr.h>
24817
24818 static const struct inode_operations
24819 iops __attribute__ ((unused)) = {
24820 .setxattr = generic_setxattr
24821 };
24822
24823int
24824main (void)
24825{
24826
24827
24828 ;
24829 return 0;
24830}
24831
24832_ACEOF
24833
24834
24835
24836cat - <<_ACEOF >conftest.h
24837
24838_ACEOF
24839
24840
24841 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24842 echo "obj-m := conftest.o" >build/Makefile
24843 modpost_flag=''
24844 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24845 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 24846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24847 (eval $ac_try) 2>&5
24848 ac_status=$?
3d248aec
AX
24849 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24850 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
24852 (eval $ac_try) 2>&5
24853 ac_status=$?
3d248aec
AX
24854 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24855 (exit $ac_status); }; }; then
68d83c55 24856
3d248aec 24857 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
24858$as_echo "yes" >&6; }
24859
3d248aec
AX
24860cat >>confdefs.h <<\_ACEOF
24861#define HAVE_GENERIC_SETXATTR 1
24862_ACEOF
68d83c55
AX
24863
24864
24865else
24866 $as_echo "$as_me: failed program was:" >&5
24867sed 's/^/| /' conftest.$ac_ext >&5
24868
3d248aec 24869 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
24870$as_echo "no" >&6; }
24871
24872
24873
24874fi
3d248aec 24875
68d83c55
AX
24876 rm -Rf build
24877
24878
24879
3d248aec
AX
24880 { $as_echo "$as_me:$LINENO: checking whether current_time() exists" >&5
24881$as_echo_n "checking whether current_time() exists... " >&6; }
24882
24883
24884
24885cat confdefs.h - <<_ACEOF >conftest.c
24886/* confdefs.h. */
24887_ACEOF
24888cat confdefs.h >>conftest.$ac_ext
24889cat >>conftest.$ac_ext <<_ACEOF
24890/* end confdefs.h. */
24891
24892
24893 #include <linux/fs.h>
24894
24895int
24896main (void)
24897{
24898
24899 struct inode ip;
24900 struct timespec now __attribute__ ((unused));
24901
24902 now = current_time(&ip);
24903
24904 ;
24905 return 0;
24906}
24907
24908_ACEOF
24909
24910
24911
24912cat - <<_ACEOF >conftest.h
24913
24914_ACEOF
24915
24916
24917 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
24918 echo "obj-m := conftest.o" >build/Makefile
24919 modpost_flag=''
24920 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
24921 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
24922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24923 (eval $ac_try) 2>&5
24924 ac_status=$?
24925 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24926 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
24927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
24928 (eval $ac_try) 2>&5
24929 ac_status=$?
24930 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24931 (exit $ac_status); }; }; then
24932 rc=0
24933else
24934 $as_echo "$as_me: failed program was:" >&5
24935sed 's/^/| /' conftest.$ac_ext >&5
24936 rc=1
24937
24938
24939fi
24940
24941 rm -Rf build
24942
24943
24944 if test $rc -ne 0; then :
24945
24946 { $as_echo "$as_me:$LINENO: result: no" >&5
24947$as_echo "no" >&6; }
24948
24949 else
24950 if test "x$enable_linux_builtin" != xyes; then
24951
24952 grep -q -E '[[:space:]]current_time[[:space:]]' \
24953 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
24954 rc=$?
24955 if test $rc -ne 0; then
24956 export=0
24957 for file in fs/inode.c; do
24958 grep -q -E "EXPORT_SYMBOL.*(current_time)" \
24959 "$LINUX/$file" 2>/dev/null
24960 rc=$?
24961 if test $rc -eq 0; then
24962 export=1
24963 break;
24964 fi
24965 done
24966 if test $export -eq 0; then :
24967 rc=1
24968 else :
24969 rc=0
24970 fi
24971 else :
24972 rc=0
24973 fi
24974
24975 fi
24976 if test $rc -ne 0; then :
24977
24978 { $as_echo "$as_me:$LINENO: result: no" >&5
24979$as_echo "no" >&6; }
24980
24981 else :
24982
24983 { $as_echo "$as_me:$LINENO: result: yes" >&5
24984$as_echo "yes" >&6; }
24985
24986cat >>confdefs.h <<\_ACEOF
24987#define HAVE_CURRENT_TIME 1
24988_ACEOF
24989
24990
24991 fi
24992 fi
24993
24994
68d83c55 24995
3d248aec 24996 if test "$LINUX_OBJ" != "$LINUX"; then
68d83c55
AX
24997
24998 KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
24999
25000fi
25001
25002
25003
3d248aec 25004
68d83c55
AX
25005 KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
25006 KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_BOOL_COMPARE"
25007 KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
25008 KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
25009
25010
25011 ;;
25012 user)
25013
25014
25015# Check whether --with-mounthelperdir was given.
3d248aec 25016if test "${with_mounthelperdir+set}" = set; then
68d83c55
AX
25017 withval=$with_mounthelperdir; mounthelperdir=$withval
25018else
25019 mounthelperdir=/sbin
25020fi
25021
25022
25023
25024
25025
3d248aec 25026 { $as_echo "$as_me:$LINENO: checking for udev directories" >&5
68d83c55
AX
25027$as_echo_n "checking for udev directories... " >&6; }
25028
25029# Check whether --with-udevdir was given.
3d248aec 25030if test "${with_udevdir+set}" = set; then
68d83c55
AX
25031 withval=$with_udevdir; udevdir=$withval
25032else
25033 udevdir=check
25034fi
25035
25036
3d248aec 25037 if test "x$udevdir" = xcheck; then
68d83c55
AX
25038
25039 path1=/lib/udev
25040 path2=/usr/lib/udev
25041 default=$path2
25042
3d248aec 25043 if test -d "$path1"; then
68d83c55
AX
25044 udevdir="$path1"
25045else
25046
3d248aec 25047 if test -d "$path2"; then
68d83c55
AX
25048 udevdir="$path2"
25049else
25050 udevdir="$default"
25051fi
25052
3d248aec 25053
68d83c55
AX
25054fi
25055
3d248aec 25056
68d83c55
AX
25057fi
25058
25059
3d248aec 25060
68d83c55 25061# Check whether --with-udevruledir was given.
3d248aec 25062if test "${with_udevruledir+set}" = set; then
68d83c55
AX
25063 withval=$with_udevruledir; udevruledir=$withval
25064else
25065 udevruledir="${udevdir}/rules.d"
25066fi
25067
25068
25069
25070
3d248aec 25071 { $as_echo "$as_me:$LINENO: result: $udevdir;$udevruledir" >&5
68d83c55
AX
25072$as_echo "$udevdir;$udevruledir" >&6; }
25073
25074
25075 # Check whether --enable-systemd was given.
3d248aec 25076if test "${enable_systemd+set}" = set; then
68d83c55
AX
25077 enableval=$enable_systemd;
25078else
25079 enable_systemd=yes
25080fi
25081
25082
25083
25084# Check whether --with-systemdunitdir was given.
3d248aec 25085if test "${with_systemdunitdir+set}" = set; then
68d83c55
AX
25086 withval=$with_systemdunitdir; systemdunitdir=$withval
25087else
25088 systemdunitdir=/usr/lib/systemd/system
25089fi
25090
25091
25092
25093# Check whether --with-systemdpresetdir was given.
3d248aec 25094if test "${with_systemdpresetdir+set}" = set; then
68d83c55
AX
25095 withval=$with_systemdpresetdir; systemdpresetdir=$withval
25096else
25097 systemdpresetdir=/usr/lib/systemd/system-preset
25098fi
25099
25100
25101
25102# Check whether --with-systemdmodulesloaddir was given.
3d248aec 25103if test "${with_systemdmodulesloaddir+set}" = set; then
68d83c55
AX
25104 withval=$with_systemdmodulesloaddir; systemdmoduleloaddir=$withval
25105else
25106 systemdmodulesloaddir=/usr/lib/modules-load.d
25107fi
25108
25109
25110
3d248aec 25111 if test "x$enable_systemd" = xyes; then
68d83c55
AX
25112
25113 ZFS_INIT_SYSTEMD=systemd
25114 ZFS_MODULE_LOAD=modules-load.d
25115 modulesloaddir=$systemdmodulesloaddir
25116
25117fi
25118
25119
25120
25121
25122
25123
25124
25125
3d248aec 25126
68d83c55 25127 # Check whether --enable-sysvinit was given.
3d248aec 25128if test "${enable_sysvinit+set}" = set; then
68d83c55
AX
25129 enableval=$enable_sysvinit;
25130else
25131 enable_sysvinit=yes
25132fi
25133
25134
3d248aec 25135 if test "x$enable_sysvinit" = xyes; then
68d83c55
AX
25136 ZFS_INIT_SYSV=init.d
25137fi
25138
25139
25140
25141
3d248aec
AX
25142
25143 { $as_echo "$as_me:$LINENO: checking for dracut directory" >&5
68d83c55
AX
25144$as_echo_n "checking for dracut directory... " >&6; }
25145
25146# Check whether --with-dracutdir was given.
3d248aec 25147if test "${with_dracutdir+set}" = set; then
68d83c55
AX
25148 withval=$with_dracutdir; dracutdir=$withval
25149else
25150 dracutdir=check
25151fi
25152
25153
3d248aec 25154 if test "x$dracutdir" = xcheck; then
68d83c55
AX
25155
25156 path1=/usr/share/dracut
25157 path2=/usr/lib/dracut
25158 default=$path2
25159
3d248aec 25160 if test -d "$path1"; then
68d83c55
AX
25161 dracutdir="$path1"
25162else
25163
3d248aec 25164 if test -d "$path2"; then
68d83c55
AX
25165 dracutdir="$path2"
25166else
25167 dracutdir="$default"
25168fi
25169
3d248aec 25170
68d83c55
AX
25171fi
25172
3d248aec 25173
68d83c55
AX
25174fi
25175
25176
3d248aec
AX
25177
25178 { $as_echo "$as_me:$LINENO: result: $dracutdir" >&5
68d83c55
AX
25179$as_echo "$dracutdir" >&6; }
25180
25181
3d248aec 25182 { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5
68d83c55
AX
25183$as_echo_n "checking for target asm dir... " >&6; }
25184 TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/`
25185
25186 case $TARGET_ARCH in
25187 i386|x86_64)
25188 TARGET_ASM_DIR=asm-${TARGET_ARCH}
25189 ;;
25190 *)
25191 TARGET_ASM_DIR=asm-generic
25192 ;;
25193 esac
25194
25195
3d248aec 25196 { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5
68d83c55
AX
25197$as_echo "$TARGET_ASM_DIR" >&6; }
25198
25199
25200 ZLIB=
25201
3d248aec
AX
25202 if test "${ac_cv_header_zlib_h+set}" = set; then
25203 { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
25204$as_echo_n "checking for zlib.h... " >&6; }
25205if test "${ac_cv_header_zlib_h+set}" = set; then
25206 $as_echo_n "(cached) " >&6
25207fi
25208{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
25209$as_echo "$ac_cv_header_zlib_h" >&6; }
25210else
25211 # Is the header compilable?
25212{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
25213$as_echo_n "checking zlib.h usability... " >&6; }
25214cat >conftest.$ac_ext <<_ACEOF
25215/* confdefs.h. */
25216_ACEOF
25217cat confdefs.h >>conftest.$ac_ext
25218cat >>conftest.$ac_ext <<_ACEOF
25219/* end confdefs.h. */
25220$ac_includes_default
25221#include <zlib.h>
25222_ACEOF
25223rm -f conftest.$ac_objext
25224if { (ac_try="$ac_compile"
25225case "(($ac_try" in
25226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25227 *) ac_try_echo=$ac_try;;
25228esac
25229eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25230$as_echo "$ac_try_echo") >&5
25231 (eval "$ac_compile") 2>conftest.er1
25232 ac_status=$?
25233 grep -v '^ *+' conftest.er1 >conftest.err
25234 rm -f conftest.er1
25235 cat conftest.err >&5
25236 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25237 (exit $ac_status); } && {
25238 test -z "$ac_c_werror_flag" ||
25239 test ! -s conftest.err
25240 } && test -s conftest.$ac_objext; then
25241 ac_header_compiler=yes
25242else
25243 $as_echo "$as_me: failed program was:" >&5
25244sed 's/^/| /' conftest.$ac_ext >&5
25245
25246 ac_header_compiler=no
25247fi
25248
25249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25250{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25251$as_echo "$ac_header_compiler" >&6; }
25252
25253# Is the header present?
25254{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
25255$as_echo_n "checking zlib.h presence... " >&6; }
25256cat >conftest.$ac_ext <<_ACEOF
25257/* confdefs.h. */
25258_ACEOF
25259cat confdefs.h >>conftest.$ac_ext
25260cat >>conftest.$ac_ext <<_ACEOF
25261/* end confdefs.h. */
25262#include <zlib.h>
25263_ACEOF
25264if { (ac_try="$ac_cpp conftest.$ac_ext"
25265case "(($ac_try" in
25266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25267 *) ac_try_echo=$ac_try;;
25268esac
25269eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25270$as_echo "$ac_try_echo") >&5
25271 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
25272 ac_status=$?
25273 grep -v '^ *+' conftest.er1 >conftest.err
25274 rm -f conftest.er1
25275 cat conftest.err >&5
25276 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25277 (exit $ac_status); } >/dev/null && {
25278 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25279 test ! -s conftest.err
25280 }; then
25281 ac_header_preproc=yes
25282else
25283 $as_echo "$as_me: failed program was:" >&5
25284sed 's/^/| /' conftest.$ac_ext >&5
25285
25286 ac_header_preproc=no
25287fi
25288
25289rm -f conftest.err conftest.$ac_ext
25290{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25291$as_echo "$ac_header_preproc" >&6; }
25292
25293# So? What about this header?
25294case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25295 yes:no: )
25296 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
25297$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
25298 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
25299$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
25300 ac_header_preproc=yes
25301 ;;
25302 no:yes:* )
25303 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
25304$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
25305 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
25306$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
25307 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
25308$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
25309 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
25310$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
25311 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
25312$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
25313 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
25314$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
25315
25316 ;;
25317esac
25318{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
25319$as_echo_n "checking for zlib.h... " >&6; }
25320if test "${ac_cv_header_zlib_h+set}" = set; then
25321 $as_echo_n "(cached) " >&6
25322else
25323 ac_cv_header_zlib_h=$ac_header_preproc
25324fi
25325{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
25326$as_echo "$ac_cv_header_zlib_h" >&6; }
68d83c55 25327
3d248aec
AX
25328fi
25329if test "x$ac_cv_header_zlib_h" = x""yes; then
25330 :
68d83c55 25331else
3d248aec 25332 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 25333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
25334{ { $as_echo "$as_me:$LINENO: error:
25335 *** zlib.h missing, zlib-devel package required
25336See \`config.log' for more details." >&5
25337$as_echo "$as_me: error:
68d83c55 25338 *** zlib.h missing, zlib-devel package required
3d248aec
AX
25339See \`config.log' for more details." >&2;}
25340 { (exit 1); exit 1; }; }; }
68d83c55
AX
25341fi
25342
25343
25344
3d248aec
AX
25345
25346{ $as_echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
68d83c55 25347$as_echo_n "checking for compress2 in -lz... " >&6; }
3d248aec 25348if test "${ac_cv_lib_z_compress2+set}" = set; then
68d83c55
AX
25349 $as_echo_n "(cached) " >&6
25350else
25351 ac_check_lib_save_LIBS=$LIBS
25352LIBS="-lz $LIBS"
3d248aec
AX
25353cat >conftest.$ac_ext <<_ACEOF
25354/* confdefs.h. */
25355_ACEOF
25356cat confdefs.h >>conftest.$ac_ext
25357cat >>conftest.$ac_ext <<_ACEOF
68d83c55
AX
25358/* end confdefs.h. */
25359
25360/* Override any GCC internal prototype to avoid an error.
25361 Use char because int might match the return type of a GCC
25362 builtin and then its argument prototype would still apply. */
25363#ifdef __cplusplus
25364extern "C"
25365#endif
25366char compress2 ();
25367int
25368main ()
25369{
25370return compress2 ();
25371 ;
25372 return 0;
25373}
25374_ACEOF
3d248aec
AX
25375rm -f conftest.$ac_objext conftest$ac_exeext
25376if { (ac_try="$ac_link"
25377case "(($ac_try" in
25378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25379 *) ac_try_echo=$ac_try;;
25380esac
25381eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25382$as_echo "$ac_try_echo") >&5
25383 (eval "$ac_link") 2>conftest.er1
25384 ac_status=$?
25385 grep -v '^ *+' conftest.er1 >conftest.err
25386 rm -f conftest.er1
25387 cat conftest.err >&5
25388 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25389 (exit $ac_status); } && {
25390 test -z "$ac_c_werror_flag" ||
25391 test ! -s conftest.err
25392 } && test -s conftest$ac_exeext && {
25393 test "$cross_compiling" = yes ||
25394 $as_test_x conftest$ac_exeext
25395 }; then
68d83c55
AX
25396 ac_cv_lib_z_compress2=yes
25397else
3d248aec
AX
25398 $as_echo "$as_me: failed program was:" >&5
25399sed 's/^/| /' conftest.$ac_ext >&5
25400
25401 ac_cv_lib_z_compress2=no
68d83c55 25402fi
3d248aec
AX
25403
25404rm -rf conftest.dSYM
25405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25406 conftest$ac_exeext conftest.$ac_ext
68d83c55
AX
25407LIBS=$ac_check_lib_save_LIBS
25408fi
3d248aec 25409{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
68d83c55 25410$as_echo "$ac_cv_lib_z_compress2" >&6; }
3d248aec 25411if test "x$ac_cv_lib_z_compress2" = x""yes; then
68d83c55
AX
25412 cat >>confdefs.h <<_ACEOF
25413#define HAVE_LIBZ 1
25414_ACEOF
25415
25416 LIBS="-lz $LIBS"
25417
25418else
3d248aec 25419 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 25420$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec 25421{ { $as_echo "$as_me:$LINENO: error:
68d83c55 25422 *** compress2() missing, zlib-devel package required
3d248aec
AX
25423See \`config.log' for more details." >&5
25424$as_echo "$as_me: error:
25425 *** compress2() missing, zlib-devel package required
25426See \`config.log' for more details." >&2;}
25427 { (exit 1); exit 1; }; }; }
68d83c55
AX
25428fi
25429
25430
3d248aec
AX
25431
25432{ $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
68d83c55 25433$as_echo_n "checking for uncompress in -lz... " >&6; }
3d248aec 25434if test "${ac_cv_lib_z_uncompress+set}" = set; then
68d83c55
AX
25435 $as_echo_n "(cached) " >&6
25436else
25437 ac_check_lib_save_LIBS=$LIBS
25438LIBS="-lz $LIBS"
3d248aec
AX
25439cat >conftest.$ac_ext <<_ACEOF
25440/* confdefs.h. */
25441_ACEOF
25442cat confdefs.h >>conftest.$ac_ext
25443cat >>conftest.$ac_ext <<_ACEOF
68d83c55
AX
25444/* end confdefs.h. */
25445
25446/* Override any GCC internal prototype to avoid an error.
25447 Use char because int might match the return type of a GCC
25448 builtin and then its argument prototype would still apply. */
25449#ifdef __cplusplus
25450extern "C"
25451#endif
25452char uncompress ();
25453int
25454main ()
25455{
25456return uncompress ();
25457 ;
25458 return 0;
25459}
25460_ACEOF
3d248aec
AX
25461rm -f conftest.$ac_objext conftest$ac_exeext
25462if { (ac_try="$ac_link"
25463case "(($ac_try" in
25464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25465 *) ac_try_echo=$ac_try;;
25466esac
25467eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25468$as_echo "$ac_try_echo") >&5
25469 (eval "$ac_link") 2>conftest.er1
25470 ac_status=$?
25471 grep -v '^ *+' conftest.er1 >conftest.err
25472 rm -f conftest.er1
25473 cat conftest.err >&5
25474 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25475 (exit $ac_status); } && {
25476 test -z "$ac_c_werror_flag" ||
25477 test ! -s conftest.err
25478 } && test -s conftest$ac_exeext && {
25479 test "$cross_compiling" = yes ||
25480 $as_test_x conftest$ac_exeext
25481 }; then
68d83c55
AX
25482 ac_cv_lib_z_uncompress=yes
25483else
3d248aec
AX
25484 $as_echo "$as_me: failed program was:" >&5
25485sed 's/^/| /' conftest.$ac_ext >&5
25486
25487 ac_cv_lib_z_uncompress=no
68d83c55 25488fi
3d248aec
AX
25489
25490rm -rf conftest.dSYM
25491rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25492 conftest$ac_exeext conftest.$ac_ext
68d83c55
AX
25493LIBS=$ac_check_lib_save_LIBS
25494fi
3d248aec 25495{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&5
68d83c55 25496$as_echo "$ac_cv_lib_z_uncompress" >&6; }
3d248aec 25497if test "x$ac_cv_lib_z_uncompress" = x""yes; then
68d83c55
AX
25498 cat >>confdefs.h <<_ACEOF
25499#define HAVE_LIBZ 1
25500_ACEOF
25501
25502 LIBS="-lz $LIBS"
25503
25504else
3d248aec 25505 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 25506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec 25507{ { $as_echo "$as_me:$LINENO: error:
68d83c55 25508 *** uncompress() missing, zlib-devel package required
3d248aec
AX
25509See \`config.log' for more details." >&5
25510$as_echo "$as_me: error:
25511 *** uncompress() missing, zlib-devel package required
25512See \`config.log' for more details." >&2;}
25513 { (exit 1); exit 1; }; }; }
68d83c55
AX
25514fi
25515
25516
3d248aec
AX
25517
25518{ $as_echo "$as_me:$LINENO: checking for crc32 in -lz" >&5
68d83c55 25519$as_echo_n "checking for crc32 in -lz... " >&6; }
3d248aec 25520if test "${ac_cv_lib_z_crc32+set}" = set; then
68d83c55
AX
25521 $as_echo_n "(cached) " >&6
25522else
25523 ac_check_lib_save_LIBS=$LIBS
25524LIBS="-lz $LIBS"
3d248aec
AX
25525cat >conftest.$ac_ext <<_ACEOF
25526/* confdefs.h. */
25527_ACEOF
25528cat confdefs.h >>conftest.$ac_ext
25529cat >>conftest.$ac_ext <<_ACEOF
68d83c55
AX
25530/* end confdefs.h. */
25531
25532/* Override any GCC internal prototype to avoid an error.
25533 Use char because int might match the return type of a GCC
25534 builtin and then its argument prototype would still apply. */
25535#ifdef __cplusplus
25536extern "C"
25537#endif
25538char crc32 ();
25539int
25540main ()
25541{
25542return crc32 ();
25543 ;
25544 return 0;
25545}
25546_ACEOF
3d248aec
AX
25547rm -f conftest.$ac_objext conftest$ac_exeext
25548if { (ac_try="$ac_link"
25549case "(($ac_try" in
25550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25551 *) ac_try_echo=$ac_try;;
25552esac
25553eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25554$as_echo "$ac_try_echo") >&5
25555 (eval "$ac_link") 2>conftest.er1
25556 ac_status=$?
25557 grep -v '^ *+' conftest.er1 >conftest.err
25558 rm -f conftest.er1
25559 cat conftest.err >&5
25560 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25561 (exit $ac_status); } && {
25562 test -z "$ac_c_werror_flag" ||
25563 test ! -s conftest.err
25564 } && test -s conftest$ac_exeext && {
25565 test "$cross_compiling" = yes ||
25566 $as_test_x conftest$ac_exeext
25567 }; then
68d83c55
AX
25568 ac_cv_lib_z_crc32=yes
25569else
3d248aec
AX
25570 $as_echo "$as_me: failed program was:" >&5
25571sed 's/^/| /' conftest.$ac_ext >&5
25572
25573 ac_cv_lib_z_crc32=no
68d83c55 25574fi
3d248aec
AX
25575
25576rm -rf conftest.dSYM
25577rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25578 conftest$ac_exeext conftest.$ac_ext
68d83c55
AX
25579LIBS=$ac_check_lib_save_LIBS
25580fi
3d248aec 25581{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5
68d83c55 25582$as_echo "$ac_cv_lib_z_crc32" >&6; }
3d248aec 25583if test "x$ac_cv_lib_z_crc32" = x""yes; then
68d83c55
AX
25584 cat >>confdefs.h <<_ACEOF
25585#define HAVE_LIBZ 1
25586_ACEOF
25587
25588 LIBS="-lz $LIBS"
25589
25590else
3d248aec 25591 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 25592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
25593{ { $as_echo "$as_me:$LINENO: error:
25594 *** crc32() missing, zlib-devel package required
25595See \`config.log' for more details." >&5
25596$as_echo "$as_me: error:
68d83c55 25597 *** crc32() missing, zlib-devel package required
3d248aec
AX
25598See \`config.log' for more details." >&2;}
25599 { (exit 1); exit 1; }; }; }
68d83c55
AX
25600fi
25601
25602
25603 ZLIB="-lz"
25604
25605
3d248aec
AX
25606cat >>confdefs.h <<\_ACEOF
25607#define HAVE_ZLIB 1
25608_ACEOF
68d83c55
AX
25609
25610
25611
25612 LIBUUID=
25613
3d248aec
AX
25614 if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
25615 { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
25616$as_echo_n "checking for uuid/uuid.h... " >&6; }
25617if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
25618 $as_echo_n "(cached) " >&6
25619fi
25620{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
25621$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
25622else
25623 # Is the header compilable?
25624{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5
25625$as_echo_n "checking uuid/uuid.h usability... " >&6; }
25626cat >conftest.$ac_ext <<_ACEOF
25627/* confdefs.h. */
25628_ACEOF
25629cat confdefs.h >>conftest.$ac_ext
25630cat >>conftest.$ac_ext <<_ACEOF
25631/* end confdefs.h. */
25632$ac_includes_default
25633#include <uuid/uuid.h>
25634_ACEOF
25635rm -f conftest.$ac_objext
25636if { (ac_try="$ac_compile"
25637case "(($ac_try" in
25638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25639 *) ac_try_echo=$ac_try;;
25640esac
25641eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25642$as_echo "$ac_try_echo") >&5
25643 (eval "$ac_compile") 2>conftest.er1
25644 ac_status=$?
25645 grep -v '^ *+' conftest.er1 >conftest.err
25646 rm -f conftest.er1
25647 cat conftest.err >&5
25648 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25649 (exit $ac_status); } && {
25650 test -z "$ac_c_werror_flag" ||
25651 test ! -s conftest.err
25652 } && test -s conftest.$ac_objext; then
25653 ac_header_compiler=yes
25654else
25655 $as_echo "$as_me: failed program was:" >&5
25656sed 's/^/| /' conftest.$ac_ext >&5
25657
25658 ac_header_compiler=no
25659fi
25660
25661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25662{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
25663$as_echo "$ac_header_compiler" >&6; }
25664
25665# Is the header present?
25666{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5
25667$as_echo_n "checking uuid/uuid.h presence... " >&6; }
25668cat >conftest.$ac_ext <<_ACEOF
25669/* confdefs.h. */
25670_ACEOF
25671cat confdefs.h >>conftest.$ac_ext
25672cat >>conftest.$ac_ext <<_ACEOF
25673/* end confdefs.h. */
25674#include <uuid/uuid.h>
25675_ACEOF
25676if { (ac_try="$ac_cpp conftest.$ac_ext"
25677case "(($ac_try" in
25678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25679 *) ac_try_echo=$ac_try;;
25680esac
25681eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25682$as_echo "$ac_try_echo") >&5
25683 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
25684 ac_status=$?
25685 grep -v '^ *+' conftest.er1 >conftest.err
25686 rm -f conftest.er1
25687 cat conftest.err >&5
25688 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25689 (exit $ac_status); } >/dev/null && {
25690 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25691 test ! -s conftest.err
25692 }; then
25693 ac_header_preproc=yes
25694else
25695 $as_echo "$as_me: failed program was:" >&5
25696sed 's/^/| /' conftest.$ac_ext >&5
25697
25698 ac_header_preproc=no
25699fi
25700
25701rm -f conftest.err conftest.$ac_ext
25702{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25703$as_echo "$ac_header_preproc" >&6; }
25704
25705# So? What about this header?
25706case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25707 yes:no: )
25708 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
25709$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
25710 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5
25711$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;}
25712 ac_header_preproc=yes
25713 ;;
25714 no:yes:* )
25715 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5
25716$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;}
25717 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&5
25718$as_echo "$as_me: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&2;}
25719 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5
25720$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;}
25721 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&5
25722$as_echo "$as_me: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&2;}
25723 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5
25724$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;}
25725 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5
25726$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;}
25727
25728 ;;
25729esac
25730{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
25731$as_echo_n "checking for uuid/uuid.h... " >&6; }
25732if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
25733 $as_echo_n "(cached) " >&6
25734else
25735 ac_cv_header_uuid_uuid_h=$ac_header_preproc
25736fi
25737{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
25738$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
68d83c55 25739
3d248aec
AX
25740fi
25741if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then
25742 :
68d83c55 25743else
3d248aec 25744 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 25745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec 25746{ { $as_echo "$as_me:$LINENO: error:
68d83c55 25747 *** uuid/uuid.h missing, libuuid-devel package required
3d248aec
AX
25748See \`config.log' for more details." >&5
25749$as_echo "$as_me: error:
25750 *** uuid/uuid.h missing, libuuid-devel package required
25751See \`config.log' for more details." >&2;}
25752 { (exit 1); exit 1; }; }; }
68d83c55
AX
25753fi
25754
25755
25756
3d248aec
AX
25757
25758{ $as_echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5
68d83c55 25759$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
3d248aec 25760if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then
68d83c55
AX
25761 $as_echo_n "(cached) " >&6
25762else
25763 ac_check_lib_save_LIBS=$LIBS
25764LIBS="-luuid $LIBS"
3d248aec
AX
25765cat >conftest.$ac_ext <<_ACEOF
25766/* confdefs.h. */
25767_ACEOF
25768cat confdefs.h >>conftest.$ac_ext
25769cat >>conftest.$ac_ext <<_ACEOF
68d83c55
AX
25770/* end confdefs.h. */
25771
25772/* Override any GCC internal prototype to avoid an error.
25773 Use char because int might match the return type of a GCC
25774 builtin and then its argument prototype would still apply. */
25775#ifdef __cplusplus
25776extern "C"
25777#endif
25778char uuid_generate ();
25779int
25780main ()
25781{
25782return uuid_generate ();
25783 ;
25784 return 0;
25785}
25786_ACEOF
3d248aec
AX
25787rm -f conftest.$ac_objext conftest$ac_exeext
25788if { (ac_try="$ac_link"
25789case "(($ac_try" in
25790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25791 *) ac_try_echo=$ac_try;;
25792esac
25793eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25794$as_echo "$ac_try_echo") >&5
25795 (eval "$ac_link") 2>conftest.er1
25796 ac_status=$?
25797 grep -v '^ *+' conftest.er1 >conftest.err
25798 rm -f conftest.er1
25799 cat conftest.err >&5
25800 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25801 (exit $ac_status); } && {
25802 test -z "$ac_c_werror_flag" ||
25803 test ! -s conftest.err
25804 } && test -s conftest$ac_exeext && {
25805 test "$cross_compiling" = yes ||
25806 $as_test_x conftest$ac_exeext
25807 }; then
68d83c55
AX
25808 ac_cv_lib_uuid_uuid_generate=yes
25809else
3d248aec
AX
25810 $as_echo "$as_me: failed program was:" >&5
25811sed 's/^/| /' conftest.$ac_ext >&5
25812
25813 ac_cv_lib_uuid_uuid_generate=no
68d83c55 25814fi
3d248aec
AX
25815
25816rm -rf conftest.dSYM
25817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25818 conftest$ac_exeext conftest.$ac_ext
68d83c55
AX
25819LIBS=$ac_check_lib_save_LIBS
25820fi
3d248aec 25821{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5
68d83c55 25822$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
3d248aec 25823if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then
68d83c55
AX
25824 cat >>confdefs.h <<_ACEOF
25825#define HAVE_LIBUUID 1
25826_ACEOF
25827
25828 LIBS="-luuid $LIBS"
25829
25830else
3d248aec 25831 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 25832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec 25833{ { $as_echo "$as_me:$LINENO: error:
68d83c55 25834 *** uuid_generate() missing, libuuid-devel package required
3d248aec
AX
25835See \`config.log' for more details." >&5
25836$as_echo "$as_me: error:
25837 *** uuid_generate() missing, libuuid-devel package required
25838See \`config.log' for more details." >&2;}
25839 { (exit 1); exit 1; }; }; }
68d83c55
AX
25840fi
25841
25842
3d248aec
AX
25843
25844{ $as_echo "$as_me:$LINENO: checking for uuid_is_null in -luuid" >&5
68d83c55 25845$as_echo_n "checking for uuid_is_null in -luuid... " >&6; }
3d248aec 25846if test "${ac_cv_lib_uuid_uuid_is_null+set}" = set; then
68d83c55
AX
25847 $as_echo_n "(cached) " >&6
25848else
25849 ac_check_lib_save_LIBS=$LIBS
25850LIBS="-luuid $LIBS"
3d248aec
AX
25851cat >conftest.$ac_ext <<_ACEOF
25852/* confdefs.h. */
25853_ACEOF
25854cat confdefs.h >>conftest.$ac_ext
25855cat >>conftest.$ac_ext <<_ACEOF
68d83c55
AX
25856/* end confdefs.h. */
25857
25858/* Override any GCC internal prototype to avoid an error.
25859 Use char because int might match the return type of a GCC
25860 builtin and then its argument prototype would still apply. */
25861#ifdef __cplusplus
25862extern "C"
25863#endif
25864char uuid_is_null ();
25865int
25866main ()
25867{
25868return uuid_is_null ();
25869 ;
25870 return 0;
25871}
25872_ACEOF
3d248aec
AX
25873rm -f conftest.$ac_objext conftest$ac_exeext
25874if { (ac_try="$ac_link"
25875case "(($ac_try" in
25876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25877 *) ac_try_echo=$ac_try;;
25878esac
25879eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25880$as_echo "$ac_try_echo") >&5
25881 (eval "$ac_link") 2>conftest.er1
25882 ac_status=$?
25883 grep -v '^ *+' conftest.er1 >conftest.err
25884 rm -f conftest.er1
25885 cat conftest.err >&5
25886 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25887 (exit $ac_status); } && {
25888 test -z "$ac_c_werror_flag" ||
25889 test ! -s conftest.err
25890 } && test -s conftest$ac_exeext && {
25891 test "$cross_compiling" = yes ||
25892 $as_test_x conftest$ac_exeext
25893 }; then
68d83c55
AX
25894 ac_cv_lib_uuid_uuid_is_null=yes
25895else
3d248aec
AX
25896 $as_echo "$as_me: failed program was:" >&5
25897sed 's/^/| /' conftest.$ac_ext >&5
25898
25899 ac_cv_lib_uuid_uuid_is_null=no
68d83c55 25900fi
3d248aec
AX
25901
25902rm -rf conftest.dSYM
25903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25904 conftest$ac_exeext conftest.$ac_ext
68d83c55
AX
25905LIBS=$ac_check_lib_save_LIBS
25906fi
3d248aec 25907{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_is_null" >&5
68d83c55 25908$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; }
3d248aec 25909if test "x$ac_cv_lib_uuid_uuid_is_null" = x""yes; then
68d83c55
AX
25910 cat >>confdefs.h <<_ACEOF
25911#define HAVE_LIBUUID 1
25912_ACEOF
25913
25914 LIBS="-luuid $LIBS"
25915
25916else
3d248aec 25917 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 25918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
25919{ { $as_echo "$as_me:$LINENO: error:
25920 *** uuid_is_null() missing, libuuid-devel package required
25921See \`config.log' for more details." >&5
25922$as_echo "$as_me: error:
68d83c55 25923 *** uuid_is_null() missing, libuuid-devel package required
3d248aec
AX
25924See \`config.log' for more details." >&2;}
25925 { (exit 1); exit 1; }; }; }
68d83c55
AX
25926fi
25927
25928
25929 LIBUUID="-luuid"
25930
25931
3d248aec
AX
25932cat >>confdefs.h <<\_ACEOF
25933#define HAVE_LIBUUID 1
25934_ACEOF
68d83c55
AX
25935
25936
25937
25938
25939# Check whether --with-blkid was given.
3d248aec 25940if test "${with_blkid+set}" = set; then
68d83c55
AX
25941 withval=$with_blkid;
25942else
25943 with_blkid=check
25944fi
25945
25946
25947 LIBBLKID=
3d248aec 25948 if test "x$with_blkid" = xyes; then
68d83c55
AX
25949
25950 LIBBLKID="-lblkid"
25951
25952
3d248aec
AX
25953cat >>confdefs.h <<\_ACEOF
25954#define HAVE_LIBBLKID 1
25955_ACEOF
68d83c55
AX
25956
25957
25958fi
25959
68d83c55 25960
3d248aec
AX
25961 if test "x$with_blkid" = xcheck; then
25962
25963 { $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5
68d83c55 25964$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
3d248aec 25965if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then
68d83c55
AX
25966 $as_echo_n "(cached) " >&6
25967else
25968 ac_check_lib_save_LIBS=$LIBS
25969LIBS="-lblkid $LIBS"
3d248aec
AX
25970cat >conftest.$ac_ext <<_ACEOF
25971/* confdefs.h. */
25972_ACEOF
25973cat confdefs.h >>conftest.$ac_ext
25974cat >>conftest.$ac_ext <<_ACEOF
68d83c55
AX
25975/* end confdefs.h. */
25976
25977/* Override any GCC internal prototype to avoid an error.
25978 Use char because int might match the return type of a GCC
25979 builtin and then its argument prototype would still apply. */
25980#ifdef __cplusplus
25981extern "C"
25982#endif
25983char blkid_get_cache ();
25984int
25985main ()
25986{
25987return blkid_get_cache ();
25988 ;
25989 return 0;
25990}
25991_ACEOF
3d248aec
AX
25992rm -f conftest.$ac_objext conftest$ac_exeext
25993if { (ac_try="$ac_link"
25994case "(($ac_try" in
25995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25996 *) ac_try_echo=$ac_try;;
25997esac
25998eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25999$as_echo "$ac_try_echo") >&5
26000 (eval "$ac_link") 2>conftest.er1
26001 ac_status=$?
26002 grep -v '^ *+' conftest.er1 >conftest.err
26003 rm -f conftest.er1
26004 cat conftest.err >&5
26005 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26006 (exit $ac_status); } && {
26007 test -z "$ac_c_werror_flag" ||
26008 test ! -s conftest.err
26009 } && test -s conftest$ac_exeext && {
26010 test "$cross_compiling" = yes ||
26011 $as_test_x conftest$ac_exeext
26012 }; then
68d83c55
AX
26013 ac_cv_lib_blkid_blkid_get_cache=yes
26014else
3d248aec
AX
26015 $as_echo "$as_me: failed program was:" >&5
26016sed 's/^/| /' conftest.$ac_ext >&5
26017
26018 ac_cv_lib_blkid_blkid_get_cache=no
68d83c55 26019fi
3d248aec
AX
26020
26021rm -rf conftest.dSYM
26022rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26023 conftest$ac_exeext conftest.$ac_ext
68d83c55
AX
26024LIBS=$ac_check_lib_save_LIBS
26025fi
3d248aec 26026{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
68d83c55 26027$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
3d248aec 26028if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then
68d83c55 26029
3d248aec 26030 { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5
68d83c55
AX
26031$as_echo_n "checking for blkid zfs support... " >&6; }
26032
26033 ZFS_DEV=`mktemp`
26034 truncate -s 64M $ZFS_DEV
26035 echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
26036 dd of=$ZFS_DEV bs=1k count=8 \
26037 seek=128 conv=notrunc &>/dev/null \
26038 >/dev/null 2>/dev/null
26039 echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
26040 dd of=$ZFS_DEV bs=1k count=8 \
26041 seek=132 conv=notrunc &>/dev/null \
26042 >/dev/null 2>/dev/null
26043 echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
26044 dd of=$ZFS_DEV bs=1k count=8 \
26045 seek=136 conv=notrunc &>/dev/null \
26046 >/dev/null 2>/dev/null
26047 echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
26048 dd of=$ZFS_DEV bs=1k count=8 \
26049 seek=140 conv=notrunc &>/dev/null \
26050 >/dev/null 2>/dev/null
26051
26052 saved_LIBS="$LIBS"
26053 LIBS="-lblkid"
26054
3d248aec
AX
26055 if test "$cross_compiling" = yes; then
26056 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 26057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
26058{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
26059See \`config.log' for more details." >&5
26060$as_echo "$as_me: error: cannot run test program while cross compiling
26061See \`config.log' for more details." >&2;}
26062 { (exit 1); exit 1; }; }; }
68d83c55 26063else
3d248aec
AX
26064 cat >conftest.$ac_ext <<_ACEOF
26065/* confdefs.h. */
26066_ACEOF
26067cat confdefs.h >>conftest.$ac_ext
26068cat >>conftest.$ac_ext <<_ACEOF
68d83c55
AX
26069/* end confdefs.h. */
26070
26071 #include <stdio.h>
26072 #include <stdlib.h>
26073 #include <blkid/blkid.h>
26074
26075int
26076main ()
26077{
26078
26079 blkid_cache cache;
26080 char *value;
26081
26082 if (blkid_get_cache(&cache, NULL) < 0)
26083 return 1;
26084
26085 value = blkid_get_tag_value(cache, "TYPE",
26086 "$ZFS_DEV");
26087 if (!value) {
26088 blkid_put_cache(cache);
26089 return 2;
26090 }
26091
26092 if (strcmp(value, "zfs_member")) {
26093 free(value);
26094 blkid_put_cache(cache);
26095 return 0;
26096 }
26097
26098 free(value);
26099 blkid_put_cache(cache);
26100
26101 ;
26102 return 0;
26103}
26104_ACEOF
3d248aec
AX
26105rm -f conftest$ac_exeext
26106if { (ac_try="$ac_link"
26107case "(($ac_try" in
26108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26109 *) ac_try_echo=$ac_try;;
26110esac
26111eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26112$as_echo "$ac_try_echo") >&5
26113 (eval "$ac_link") 2>&5
26114 ac_status=$?
26115 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26117 { (case "(($ac_try" in
26118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26119 *) ac_try_echo=$ac_try;;
26120esac
26121eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26122$as_echo "$ac_try_echo") >&5
26123 (eval "$ac_try") 2>&5
26124 ac_status=$?
26125 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26126 (exit $ac_status); }; }; then
68d83c55
AX
26127
26128 rm -f $ZFS_DEV
3d248aec 26129 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
26130$as_echo "yes" >&6; }
26131 LIBBLKID="-lblkid"
26132
26133
3d248aec
AX
26134cat >>confdefs.h <<\_ACEOF
26135#define HAVE_LIBBLKID 1
26136_ACEOF
68d83c55
AX
26137
26138
26139else
3d248aec
AX
26140 $as_echo "$as_me: program exited with status $ac_status" >&5
26141$as_echo "$as_me: failed program was:" >&5
26142sed 's/^/| /' conftest.$ac_ext >&5
26143
26144( exit $ac_status )
68d83c55
AX
26145
26146 rm -f $ZFS_DEV
3d248aec 26147 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 26148$as_echo "no" >&6; }
3d248aec
AX
26149 if test "x$with_blkid" != xcheck; then
26150 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 26151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
26152{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
26153See \`config.log' for more details." >&5
26154$as_echo "$as_me: error: --with-blkid given but unavailable
26155See \`config.log' for more details." >&2;}
26156 { (exit 1); exit 1; }; }; }
68d83c55
AX
26157fi
26158
3d248aec 26159
68d83c55 26160fi
3d248aec
AX
26161rm -rf conftest.dSYM
26162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
68d83c55
AX
26163fi
26164
26165
3d248aec 26166
68d83c55
AX
26167 LIBS="$saved_LIBS"
26168
26169else
26170
3d248aec
AX
26171 if test "x$with_blkid" != xcheck; then
26172 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
68d83c55 26173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
26174{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
26175See \`config.log' for more details." >&5
26176$as_echo "$as_me: error: --with-blkid given but unavailable
26177See \`config.log' for more details." >&2;}
26178 { (exit 1); exit 1; }; }; }
68d83c55
AX
26179fi
26180
26181
3d248aec 26182
68d83c55
AX
26183fi
26184
26185
26186fi
26187
26188
3d248aec
AX
26189
26190 { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than=<size> support" >&5
68d83c55
AX
26191$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
26192
26193 saved_flags="$CFLAGS"
26194 CFLAGS="$CFLAGS -Wframe-larger-than=1024"
26195
3d248aec
AX
26196 cat >conftest.$ac_ext <<_ACEOF
26197/* confdefs.h. */
26198_ACEOF
26199cat confdefs.h >>conftest.$ac_ext
26200cat >>conftest.$ac_ext <<_ACEOF
68d83c55
AX
26201/* end confdefs.h. */
26202
26203int
26204main ()
26205{
26206
26207 ;
26208 return 0;
26209}
26210_ACEOF
3d248aec
AX
26211rm -f conftest.$ac_objext
26212if { (ac_try="$ac_compile"
26213case "(($ac_try" in
26214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26215 *) ac_try_echo=$ac_try;;
26216esac
26217eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26218$as_echo "$ac_try_echo") >&5
26219 (eval "$ac_compile") 2>conftest.er1
26220 ac_status=$?
26221 grep -v '^ *+' conftest.er1 >conftest.err
26222 rm -f conftest.er1
26223 cat conftest.err >&5
26224 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26225 (exit $ac_status); } && {
26226 test -z "$ac_c_werror_flag" ||
26227 test ! -s conftest.err
26228 } && test -s conftest.$ac_objext; then
68d83c55
AX
26229
26230 FRAME_LARGER_THAN=-Wframe-larger-than=1024
3d248aec 26231 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
26232$as_echo "yes" >&6; }
26233
26234else
3d248aec
AX
26235 $as_echo "$as_me: failed program was:" >&5
26236sed 's/^/| /' conftest.$ac_ext >&5
26237
68d83c55
AX
26238
26239 FRAME_LARGER_THAN=
3d248aec 26240 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
26241$as_echo "no" >&6; }
26242
26243fi
3d248aec 26244
68d83c55
AX
26245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26246
26247 CFLAGS="$saved_flags"
26248
26249
26250
26251 if test "x$runstatedir" = x; then
26252 runstatedir='${localstatedir}/run'
26253
26254 fi
26255
3d248aec
AX
26256
26257 { $as_echo "$as_me:$LINENO: checking makedev() is declared in sys/sysmacros.h" >&5
26258$as_echo_n "checking makedev() is declared in sys/sysmacros.h... " >&6; }
26259 cat >conftest.$ac_ext <<_ACEOF
26260/* confdefs.h. */
26261_ACEOF
26262cat confdefs.h >>conftest.$ac_ext
26263cat >>conftest.$ac_ext <<_ACEOF
26264/* end confdefs.h. */
26265
26266 #include <sys/sysmacros.h>
26267
26268int
26269main ()
26270{
26271
26272 int k;
26273 k = makedev(0,0);
26274
26275 ;
26276 return 0;
26277}
26278_ACEOF
26279rm -f conftest.$ac_objext
26280if { (ac_try="$ac_compile"
26281case "(($ac_try" in
26282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26283 *) ac_try_echo=$ac_try;;
26284esac
26285eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26286$as_echo "$ac_try_echo") >&5
26287 (eval "$ac_compile") 2>conftest.er1
26288 ac_status=$?
26289 grep -v '^ *+' conftest.er1 >conftest.err
26290 rm -f conftest.er1
26291 cat conftest.err >&5
26292 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26293 (exit $ac_status); } && {
26294 test -z "$ac_c_werror_flag" ||
26295 test ! -s conftest.err
26296 } && test -s conftest.$ac_objext; then
26297
26298 { $as_echo "$as_me:$LINENO: result: yes" >&5
26299$as_echo "yes" >&6; }
26300
26301cat >>confdefs.h <<\_ACEOF
26302#define HAVE_MAKEDEV_IN_SYSMACROS 1
26303_ACEOF
26304
26305
26306else
26307 $as_echo "$as_me: failed program was:" >&5
26308sed 's/^/| /' conftest.$ac_ext >&5
26309
26310
26311 { $as_echo "$as_me:$LINENO: result: no" >&5
26312$as_echo "no" >&6; }
26313
26314fi
26315
26316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26317
26318
26319 { $as_echo "$as_me:$LINENO: checking makedev() is declared in sys/mkdev.h" >&5
26320$as_echo_n "checking makedev() is declared in sys/mkdev.h... " >&6; }
26321 cat >conftest.$ac_ext <<_ACEOF
26322/* confdefs.h. */
26323_ACEOF
26324cat confdefs.h >>conftest.$ac_ext
26325cat >>conftest.$ac_ext <<_ACEOF
26326/* end confdefs.h. */
26327
26328 #include <sys/mkdev.h>
26329
26330int
26331main ()
26332{
26333
26334 int k;
26335 k = makedev(0,0);
26336
26337 ;
26338 return 0;
26339}
26340_ACEOF
26341rm -f conftest.$ac_objext
26342if { (ac_try="$ac_compile"
26343case "(($ac_try" in
26344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26345 *) ac_try_echo=$ac_try;;
26346esac
26347eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26348$as_echo "$ac_try_echo") >&5
26349 (eval "$ac_compile") 2>conftest.er1
26350 ac_status=$?
26351 grep -v '^ *+' conftest.er1 >conftest.err
26352 rm -f conftest.er1
26353 cat conftest.err >&5
26354 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26355 (exit $ac_status); } && {
26356 test -z "$ac_c_werror_flag" ||
26357 test ! -s conftest.err
26358 } && test -s conftest.$ac_objext; then
26359
26360 { $as_echo "$as_me:$LINENO: result: yes" >&5
26361$as_echo "yes" >&6; }
26362
26363cat >>confdefs.h <<\_ACEOF
26364#define HAVE_MAKEDEV_IN_MKDEV 1
26365_ACEOF
26366
26367
26368else
26369 $as_echo "$as_me: failed program was:" >&5
26370sed 's/^/| /' conftest.$ac_ext >&5
26371
26372
26373 { $as_echo "$as_me:$LINENO: result: no" >&5
26374$as_echo "no" >&6; }
26375
26376fi
26377
26378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26379
26380
26381 { $as_echo "$as_me:$LINENO: checking for -Wno-format-truncation support" >&5
26382$as_echo_n "checking for -Wno-format-truncation support... " >&6; }
26383
26384 saved_flags="$CFLAGS"
26385 CFLAGS="$CFLAGS -Wno-format-truncation"
26386
26387 cat >conftest.$ac_ext <<_ACEOF
26388/* confdefs.h. */
26389_ACEOF
26390cat confdefs.h >>conftest.$ac_ext
26391cat >>conftest.$ac_ext <<_ACEOF
26392/* end confdefs.h. */
26393
26394int
26395main ()
26396{
26397
26398 ;
26399 return 0;
26400}
26401_ACEOF
26402rm -f conftest.$ac_objext
26403if { (ac_try="$ac_compile"
26404case "(($ac_try" in
26405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26406 *) ac_try_echo=$ac_try;;
26407esac
26408eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26409$as_echo "$ac_try_echo") >&5
26410 (eval "$ac_compile") 2>conftest.er1
26411 ac_status=$?
26412 grep -v '^ *+' conftest.er1 >conftest.err
26413 rm -f conftest.er1
26414 cat conftest.err >&5
26415 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26416 (exit $ac_status); } && {
26417 test -z "$ac_c_werror_flag" ||
26418 test ! -s conftest.err
26419 } && test -s conftest.$ac_objext; then
26420
26421 NO_FORMAT_TRUNCATION=-Wno-format-truncation
26422 { $as_echo "$as_me:$LINENO: result: yes" >&5
26423$as_echo "yes" >&6; }
26424
26425else
26426 $as_echo "$as_me: failed program was:" >&5
26427sed 's/^/| /' conftest.$ac_ext >&5
26428
26429
26430 NO_FORMAT_TRUNCATION=
26431 { $as_echo "$as_me:$LINENO: result: no" >&5
26432$as_echo "no" >&6; }
26433
26434fi
26435
26436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26437
26438 CFLAGS="$saved_flags"
26439
26440
26441
26442for ac_func in mlockall
26443do
26444as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
26445{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
26446$as_echo_n "checking for $ac_func... " >&6; }
26447if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
26448 $as_echo_n "(cached) " >&6
26449else
26450 cat >conftest.$ac_ext <<_ACEOF
26451/* confdefs.h. */
26452_ACEOF
26453cat confdefs.h >>conftest.$ac_ext
26454cat >>conftest.$ac_ext <<_ACEOF
26455/* end confdefs.h. */
26456/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
26457 For example, HP-UX 11i <limits.h> declares gettimeofday. */
26458#define $ac_func innocuous_$ac_func
26459
26460/* System header to define __stub macros and hopefully few prototypes,
26461 which can conflict with char $ac_func (); below.
26462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
26463 <limits.h> exists even on freestanding compilers. */
26464
26465#ifdef __STDC__
26466# include <limits.h>
26467#else
26468# include <assert.h>
26469#endif
26470
26471#undef $ac_func
26472
26473/* Override any GCC internal prototype to avoid an error.
26474 Use char because int might match the return type of a GCC
26475 builtin and then its argument prototype would still apply. */
26476#ifdef __cplusplus
26477extern "C"
26478#endif
26479char $ac_func ();
26480/* The GNU C library defines this for functions which it implements
26481 to always fail with ENOSYS. Some functions are actually named
26482 something starting with __ and the normal name is an alias. */
26483#if defined __stub_$ac_func || defined __stub___$ac_func
26484choke me
26485#endif
26486
26487int
26488main ()
26489{
26490return $ac_func ();
26491 ;
26492 return 0;
26493}
26494_ACEOF
26495rm -f conftest.$ac_objext conftest$ac_exeext
26496if { (ac_try="$ac_link"
26497case "(($ac_try" in
26498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26499 *) ac_try_echo=$ac_try;;
26500esac
26501eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26502$as_echo "$ac_try_echo") >&5
26503 (eval "$ac_link") 2>conftest.er1
26504 ac_status=$?
26505 grep -v '^ *+' conftest.er1 >conftest.err
26506 rm -f conftest.er1
26507 cat conftest.err >&5
26508 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26509 (exit $ac_status); } && {
26510 test -z "$ac_c_werror_flag" ||
26511 test ! -s conftest.err
26512 } && test -s conftest$ac_exeext && {
26513 test "$cross_compiling" = yes ||
26514 $as_test_x conftest$ac_exeext
26515 }; then
26516 eval "$as_ac_var=yes"
26517else
26518 $as_echo "$as_me: failed program was:" >&5
26519sed 's/^/| /' conftest.$ac_ext >&5
26520
26521 eval "$as_ac_var=no"
26522fi
26523
26524rm -rf conftest.dSYM
26525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26526 conftest$ac_exeext conftest.$ac_ext
26527fi
26528ac_res=`eval 'as_val=${'$as_ac_var'}
26529 $as_echo "$as_val"'`
26530 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
26531$as_echo "$ac_res" >&6; }
26532as_val=`eval 'as_val=${'$as_ac_var'}
26533 $as_echo "$as_val"'`
26534 if test "x$as_val" = x""yes; then
68d83c55 26535 cat >>confdefs.h <<_ACEOF
3d248aec 26536#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
68d83c55
AX
26537_ACEOF
26538
26539fi
26540done
26541
26542 ;;
26543 all)
26544
26545
26546# Check whether --with-linux was given.
3d248aec 26547if test "${with_linux+set}" = set; then
68d83c55
AX
26548 withval=$with_linux; kernelsrc="$withval"
26549fi
26550
26551
26552
26553# Check whether --with-linux-obj was given.
3d248aec 26554if test "${with_linux_obj+set}" = set; then
68d83c55
AX
26555 withval=$with_linux_obj; kernelbuild="$withval"
26556fi
26557
26558
3d248aec 26559 { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
68d83c55 26560$as_echo_n "checking kernel source directory... " >&6; }
3d248aec 26561 if test -z "$kernelsrc"; then
68d83c55 26562
3d248aec 26563 if test -e "/lib/modules/$(uname -r)/source"; then
68d83c55
AX
26564
26565 headersdir="/lib/modules/$(uname -r)/source"
26566 sourcelink=$(readlink -f "$headersdir")
26567
3d248aec 26568elif test -e "/lib/modules/$(uname -r)/build"; then
68d83c55
AX
26569
26570 headersdir="/lib/modules/$(uname -r)/build"
26571 sourcelink=$(readlink -f "$headersdir")
26572
26573else
26574
26575 sourcelink=$(ls -1d /usr/src/kernels/* \
26576 /usr/src/linux-* \
26577 2>/dev/null | grep -v obj | tail -1)
26578
26579fi
26580
3d248aec
AX
26581
26582 if test -n "$sourcelink" && test -e ${sourcelink}; then
68d83c55
AX
26583
26584 kernelsrc=`readlink -f ${sourcelink}`
26585
26586else
26587
26588 kernelsrc="Not found"
26589
26590fi
26591
3d248aec 26592
68d83c55
AX
26593else
26594
3d248aec 26595 if test "$kernelsrc" = "NONE"; then
68d83c55
AX
26596
26597 kernsrcver=NONE
26598
26599fi
26600
3d248aec 26601
68d83c55
AX
26602fi
26603
3d248aec
AX
26604
26605 { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5
68d83c55 26606$as_echo "$kernelsrc" >&6; }
3d248aec 26607 if test ! -d "$kernelsrc"; then
68d83c55 26608
3d248aec 26609 { { $as_echo "$as_me:$LINENO: error:
68d83c55
AX
26610 *** Please make sure the kernel devel package for your distribution
26611 *** is installed and then try again. If that fails, you can specify the
3d248aec
AX
26612 *** location of the kernel source with the '--with-linux=PATH' option." >&5
26613$as_echo "$as_me: error:
26614 *** Please make sure the kernel devel package for your distribution
26615 *** is installed and then try again. If that fails, you can specify the
26616 *** location of the kernel source with the '--with-linux=PATH' option." >&2;}
26617 { (exit 1); exit 1; }; }
68d83c55
AX
26618
26619fi
26620
3d248aec
AX
26621
26622 { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
68d83c55 26623$as_echo_n "checking kernel build directory... " >&6; }
3d248aec 26624 if test -z "$kernelbuild"; then
68d83c55 26625
3d248aec 26626 if test -e "/lib/modules/$(uname -r)/build"; then
68d83c55
AX
26627
26628 kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
26629
3d248aec 26630elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
68d83c55
AX
26631
26632 kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
26633
3d248aec 26634elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
68d83c55
AX
26635
26636 kernelbuild=${kernelsrc}-obj/${target_cpu}/default
26637
3d248aec 26638elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
68d83c55
AX
26639
26640 kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
26641
26642else
26643
26644 kernelbuild=${kernelsrc}
26645
26646fi
26647
3d248aec 26648
68d83c55 26649fi
3d248aec
AX
26650
26651 { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5
68d83c55
AX
26652$as_echo "$kernelbuild" >&6; }
26653
3d248aec 26654 { $as_echo "$as_me:$LINENO: checking kernel source version" >&5
68d83c55
AX
26655$as_echo_n "checking kernel source version... " >&6; }
26656 utsrelease1=$kernelbuild/include/linux/version.h
26657 utsrelease2=$kernelbuild/include/linux/utsrelease.h
26658 utsrelease3=$kernelbuild/include/generated/utsrelease.h
3d248aec 26659 if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then
68d83c55
AX
26660
26661 utsrelease=linux/version.h
26662
3d248aec 26663elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then
68d83c55
AX
26664
26665 utsrelease=linux/utsrelease.h
26666
3d248aec 26667elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then
68d83c55
AX
26668
26669 utsrelease=generated/utsrelease.h
26670
26671fi
26672
3d248aec
AX
26673
26674 if test "$utsrelease"; then
68d83c55
AX
26675
26676 kernsrcver=`(echo "#include <$utsrelease>";
26677 echo "kernsrcver=UTS_RELEASE") |
26678 cpp -I $kernelbuild/include |
26679 grep "^kernsrcver=" | cut -d \" -f 2`
26680
3d248aec 26681 if test -z "$kernsrcver"; then
68d83c55 26682
3d248aec 26683 { $as_echo "$as_me:$LINENO: result: Not found" >&5
68d83c55 26684$as_echo "Not found" >&6; }
3d248aec
AX
26685 { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5
26686$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;}
26687 { (exit 1); exit 1; }; }
68d83c55
AX
26688
26689fi
26690
3d248aec 26691
68d83c55
AX
26692else
26693
3d248aec 26694 { $as_echo "$as_me:$LINENO: result: Not found" >&5
68d83c55
AX
26695$as_echo "Not found" >&6; }
26696 if test "x$enable_linux_builtin" != xyes; then
3d248aec
AX
26697 { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5
26698$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;}
26699 { (exit 1); exit 1; }; }
68d83c55 26700 else
3d248aec 26701 { { $as_echo "$as_me:$LINENO: error:
68d83c55 26702 *** Cannot find UTS_RELEASE definition.
3d248aec
AX
26703 *** Please run 'make prepare' inside the kernel source tree." >&5
26704$as_echo "$as_me: error:
26705 *** Cannot find UTS_RELEASE definition.
26706 *** Please run 'make prepare' inside the kernel source tree." >&2;}
26707 { (exit 1); exit 1; }; }
68d83c55
AX
26708 fi
26709
26710fi
26711
3d248aec
AX
26712
26713 { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5
68d83c55
AX
26714$as_echo "$kernsrcver" >&6; }
26715
26716 LINUX=${kernelsrc}
26717 LINUX_OBJ=${kernelbuild}
26718 LINUX_VERSION=${kernsrcver}
26719
26720
26721
26722
26723
26724
26725 modpost=$LINUX/scripts/Makefile.modpost
3d248aec 26726 { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5
68d83c55 26727$as_echo_n "checking kernel file name for module symbols... " >&6; }
3d248aec 26728 if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then
68d83c55 26729
3d248aec 26730 if grep -q Modules.symvers $modpost; then
68d83c55
AX
26731
26732 LINUX_SYMBOLS=Modules.symvers
26733
26734else
26735
26736 LINUX_SYMBOLS=Module.symvers
26737
26738fi
26739
68d83c55 26740
3d248aec
AX
26741 if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
26742
26743 { { $as_echo "$as_me:$LINENO: error:
26744 *** Please make sure the kernel devel package for your distribution
26745 *** is installed. If you are building with a custom kernel, make sure the
26746 *** kernel is configured, built, and the '--with-linux=PATH' configure
26747 *** option refers to the location of the kernel source." >&5
26748$as_echo "$as_me: error:
68d83c55
AX
26749 *** Please make sure the kernel devel package for your distribution
26750 *** is installed. If you are building with a custom kernel, make sure the
26751 *** kernel is configured, built, and the '--with-linux=PATH' configure
3d248aec
AX
26752 *** option refers to the location of the kernel source." >&2;}
26753 { (exit 1); exit 1; }; }
68d83c55
AX
26754
26755fi
26756
3d248aec 26757
68d83c55
AX
26758else
26759
26760 LINUX_SYMBOLS=NONE
26761
26762fi
3d248aec
AX
26763
26764 { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
68d83c55
AX
26765$as_echo "$LINUX_SYMBOLS" >&6; }
26766
26767
26768
26769
26770
26771# Check whether --with-spl was given.
3d248aec 26772if test "${with_spl+set}" = set; then
68d83c55
AX
26773 withval=$with_spl; splsrc="$withval"
26774fi
26775
26776
26777
26778# Check whether --with-spl-obj was given.
3d248aec 26779if test "${with_spl_obj+set}" = set; then
68d83c55
AX
26780 withval=$with_spl_obj; splbuild="$withval"
26781fi
26782
26783
26784
26785# Check whether --with-spl-timeout was given.
3d248aec 26786if test "${with_spl_timeout+set}" = set; then
68d83c55
AX
26787 withval=$with_spl_timeout; timeout="$withval"
26788else
26789 timeout=0
26790fi
26791
26792
26793 splsrc0="/var/lib/dkms/spl/${VERSION}/build"
26794 splsrc1="/usr/local/src/spl-${VERSION}/${LINUX_VERSION}"
26795 splsrc2="/usr/local/src/spl-${VERSION}"
26796 splsrc3="/usr/src/spl-${VERSION}/${LINUX_VERSION}"
26797 splsrc4="/usr/src/spl-${VERSION}"
26798 splsrc5="../spl/"
26799 splsrc6="$LINUX"
26800
3d248aec 26801 { $as_echo "$as_me:$LINENO: checking spl source directory" >&5
68d83c55 26802$as_echo_n "checking spl source directory... " >&6; }
3d248aec 26803 if test -z "${splsrc}"; then
68d83c55 26804
3d248aec 26805 if test -e "${splsrc0}/spl.release.in"; then
68d83c55
AX
26806
26807 splsrc=${splsrc0}
26808
3d248aec 26809elif test -e "${splsrc1}/spl.release.in"; then
68d83c55
AX
26810
26811 splsrc=${splsrc1}
26812
3d248aec 26813elif test -e "${splsrc2}/spl.release.in"; then
68d83c55
AX
26814
26815 splsrc=${splsrc2}
26816
3d248aec 26817elif test -e "${splsrc3}/spl.release.in"; then
68d83c55
AX
26818
26819 splsrc=$(readlink -f "${splsrc3}")
26820
3d248aec 26821elif test -e "${splsrc4}/spl.release.in" ; then
68d83c55
AX
26822
26823 splsrc=${splsrc4}
26824
3d248aec 26825elif test -e "${splsrc5}/spl.release.in"; then
68d83c55
AX
26826
26827 splsrc=$(readlink -f "${splsrc5}")
26828
3d248aec 26829elif test -e "${splsrc6}/spl.release.in" ; then
68d83c55
AX
26830
26831 splsrc=${splsrc6}
26832
26833else
26834
26835 splsrc="Not found"
26836
26837fi
26838
3d248aec 26839
68d83c55
AX
26840else
26841
3d248aec 26842 if test "$splsrc" = "NONE"; then
68d83c55
AX
26843
26844 splbuild=NONE
26845 splsrcver=NONE
26846
26847fi
26848
3d248aec 26849
68d83c55
AX
26850fi
26851
3d248aec
AX
26852
26853 { $as_echo "$as_me:$LINENO: result: $splsrc" >&5
68d83c55 26854$as_echo "$splsrc" >&6; }
3d248aec 26855 if test ! -e "$splsrc/spl.release.in"; then
68d83c55 26856
3d248aec 26857 { { $as_echo "$as_me:$LINENO: error:
68d83c55
AX
26858 *** Please make sure the kmod spl devel package for your distribution
26859 *** is installed then try again. If that fails you can specify the
3d248aec
AX
26860 *** location of the spl source with the '--with-spl=PATH' option." >&5
26861$as_echo "$as_me: error:
26862 *** Please make sure the kmod spl devel package for your distribution
26863 *** is installed then try again. If that fails you can specify the
26864 *** location of the spl source with the '--with-spl=PATH' option." >&2;}
26865 { (exit 1); exit 1; }; }
68d83c55
AX
26866
26867fi
26868
3d248aec
AX
26869
26870 { $as_echo "$as_me:$LINENO: checking spl build directory" >&5
68d83c55
AX
26871$as_echo_n "checking spl build directory... " >&6; }
26872 while true; do
3d248aec 26873 if test -z "$splbuild"; then
68d83c55 26874
3d248aec 26875 if test -e "${splsrc}/${LINUX_VERSION}/spl_config.h" ; then
68d83c55
AX
26876
26877 splbuild="${splsrc}/${LINUX_VERSION}"
26878
3d248aec 26879elif test -e "${splsrc}/spl_config.h" ; then
68d83c55
AX
26880
26881 splbuild="${splsrc}"
26882
3d248aec 26883elif find -L "${splsrc}" -name spl_config.h 2> /dev/null | grep -wq spl_config.h ; then
68d83c55
AX
26884
26885 splbuild=$(find -L "${splsrc}" -name spl_config.h | sed 's,/spl_config.h,,')
26886
26887else
26888
26889 splbuild="Not found"
26890
26891fi
26892
3d248aec 26893
68d83c55 26894fi
3d248aec
AX
26895
26896 if test -e "$splbuild/spl_config.h" -o $timeout -le 0; then
68d83c55
AX
26897
26898 break;
26899
26900else
26901
26902 sleep 1
26903 timeout=$((timeout-1))
26904
26905fi
3d248aec 26906
68d83c55
AX
26907 done
26908
3d248aec 26909 { $as_echo "$as_me:$LINENO: result: $splbuild" >&5
68d83c55 26910$as_echo "$splbuild" >&6; }
3d248aec 26911 if ! test -e "$splbuild/spl_config.h"; then
68d83c55 26912
3d248aec
AX
26913 { { $as_echo "$as_me:$LINENO: error:
26914 *** Please make sure the kmod spl devel <kernel> package for your
26915 *** distribution is installed then try again. If that fails you
26916 *** can specify the location of the spl objects with the
26917 *** '--with-spl-obj=PATH' option." >&5
26918$as_echo "$as_me: error:
68d83c55
AX
26919 *** Please make sure the kmod spl devel <kernel> package for your
26920 *** distribution is installed then try again. If that fails you
26921 *** can specify the location of the spl objects with the
3d248aec
AX
26922 *** '--with-spl-obj=PATH' option." >&2;}
26923 { (exit 1); exit 1; }; }
68d83c55
AX
26924
26925fi
26926
3d248aec
AX
26927
26928 { $as_echo "$as_me:$LINENO: checking spl source version" >&5
68d83c55
AX
26929$as_echo_n "checking spl source version... " >&6; }
26930 if test -r $splbuild/spl_config.h &&
3d248aec 26931 fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then
68d83c55
AX
26932
26933
26934 splsrcver=`(echo "#include <spl_config.h>";
26935 echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
26936 cpp -I $splbuild |
26937 grep "^splsrcver=" | tr -d \" | cut -d= -f2`
26938
26939fi
26940
68d83c55 26941
3d248aec
AX
26942 if test -z "$splsrcver"; then
26943
26944 { $as_echo "$as_me:$LINENO: result: Not found" >&5
68d83c55 26945$as_echo "Not found" >&6; }
3d248aec
AX
26946 { { $as_echo "$as_me:$LINENO: error:
26947 *** Cannot determine the version of the spl source.
26948 *** Please prepare the spl source before running this script" >&5
26949$as_echo "$as_me: error:
68d83c55 26950 *** Cannot determine the version of the spl source.
3d248aec
AX
26951 *** Please prepare the spl source before running this script" >&2;}
26952 { (exit 1); exit 1; }; }
68d83c55
AX
26953
26954fi
26955
3d248aec
AX
26956
26957 { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5
68d83c55
AX
26958$as_echo "$splsrcver" >&6; }
26959
26960 SPL=${splsrc}
26961 SPL_OBJ=${splbuild}
26962 SPL_VERSION=${splsrcver}
26963
26964
26965
26966
26967
3d248aec 26968 { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5
68d83c55
AX
26969$as_echo_n "checking spl file name for module symbols... " >&6; }
26970 SPL_SYMBOLS=NONE
26971
26972 while true; do
3d248aec 26973 if test -r $SPL_OBJ/Module.symvers; then
68d83c55
AX
26974
26975 SPL_SYMBOLS=Module.symvers
26976
3d248aec 26977elif test -r $SPL_OBJ/Modules.symvers; then
68d83c55
AX
26978
26979 SPL_SYMBOLS=Modules.symvers
26980
3d248aec 26981elif test -r $SPL_OBJ/module/Module.symvers; then
68d83c55
AX
26982
26983 SPL_SYMBOLS=Module.symvers
26984
3d248aec 26985elif test -r $SPL_OBJ/module/Modules.symvers; then
68d83c55
AX
26986
26987 SPL_SYMBOLS=Modules.symvers
26988
26989fi
26990
3d248aec
AX
26991
26992 if test $SPL_SYMBOLS != NONE -o $timeout -le 0; then
68d83c55
AX
26993
26994 break;
26995
26996else
26997
26998 sleep 1
26999 timeout=$((timeout-1))
27000
27001fi
3d248aec 27002
68d83c55
AX
27003 done
27004
3d248aec 27005 if test "$SPL_SYMBOLS" = NONE; then
68d83c55
AX
27006
27007 SPL_SYMBOLS=$LINUX_SYMBOLS
27008
27009fi
27010
3d248aec
AX
27011
27012 { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5
68d83c55
AX
27013$as_echo "$SPL_SYMBOLS" >&6; }
27014
27015
27016
3d248aec 27017 { $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5
68d83c55
AX
27018$as_echo_n "checking whether modules can be built... " >&6; }
27019
27020
27021cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27022/* confdefs.h. */
27023_ACEOF
27024cat confdefs.h >>conftest.$ac_ext
27025cat >>conftest.$ac_ext <<_ACEOF
27026/* end confdefs.h. */
68d83c55
AX
27027
27028
27029int
27030main (void)
27031{
27032
27033 ;
27034 return 0;
27035}
27036
27037_ACEOF
27038
27039
27040
27041cat - <<_ACEOF >conftest.h
27042
27043_ACEOF
27044
27045
27046 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27047 echo "obj-m := conftest.o" >build/Makefile
27048 modpost_flag=''
27049 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27050 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27052 (eval $ac_try) 2>&5
27053 ac_status=$?
3d248aec
AX
27054 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27055 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27057 (eval $ac_try) 2>&5
27058 ac_status=$?
3d248aec
AX
27059 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27060 (exit $ac_status); }; }; then
68d83c55 27061
3d248aec 27062 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
27063$as_echo "yes" >&6; }
27064
27065else
27066 $as_echo "$as_me: failed program was:" >&5
27067sed 's/^/| /' conftest.$ac_ext >&5
27068
3d248aec 27069 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
27070$as_echo "no" >&6; }
27071 if test "x$enable_linux_builtin" != xyes; then
3d248aec
AX
27072 { { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5
27073$as_echo "$as_me: error: *** Unable to build an empty module." >&2;}
27074 { (exit 1); exit 1; }; }
68d83c55 27075 else
3d248aec
AX
27076 { { $as_echo "$as_me:$LINENO: error:
27077 *** Unable to build an empty module.
27078 *** Please run 'make scripts' inside the kernel source tree." >&5
27079$as_echo "$as_me: error:
68d83c55 27080 *** Unable to build an empty module.
3d248aec
AX
27081 *** Please run 'make scripts' inside the kernel source tree." >&2;}
27082 { (exit 1); exit 1; }; }
68d83c55
AX
27083 fi
27084
27085
27086
4d815aed 27087fi
3d248aec 27088
68d83c55 27089 rm -Rf build
4d815aed 27090
4d815aed 27091
4d815aed 27092
4d815aed 27093
3d248aec 27094 if test "x$cross_compiling" != xyes; then
68d83c55 27095
3d248aec
AX
27096 if test "$cross_compiling" = yes; then
27097 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
4d815aed 27098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
27099{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
27100See \`config.log' for more details." >&5
27101$as_echo "$as_me: error: cannot run test program while cross compiling
27102See \`config.log' for more details." >&2;}
27103 { (exit 1); exit 1; }; }; }
4d815aed 27104else
3d248aec 27105 cat >conftest.$ac_ext <<_ACEOF
4d815aed 27106
3d248aec
AX
27107 /* confdefs.h. */
27108_ACEOF
27109cat confdefs.h >>conftest.$ac_ext
27110cat >>conftest.$ac_ext <<_ACEOF
27111/* end confdefs.h. */
68d83c55
AX
27112
27113 #include "$LINUX/include/linux/license.h"
4d815aed
AX
27114
27115int
27116main ()
27117{
27118
68d83c55 27119 return !license_is_gpl_compatible("$ZFS_META_LICENSE");
4d815aed
AX
27120
27121 ;
27122 return 0;
27123}
68d83c55 27124
4d815aed 27125_ACEOF
3d248aec
AX
27126rm -f conftest$ac_exeext
27127if { (ac_try="$ac_link"
27128case "(($ac_try" in
27129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27130 *) ac_try_echo=$ac_try;;
27131esac
27132eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27133$as_echo "$ac_try_echo") >&5
27134 (eval "$ac_link") 2>&5
27135 ac_status=$?
27136 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27137 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27138 { (case "(($ac_try" in
27139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27140 *) ac_try_echo=$ac_try;;
27141esac
27142eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27143$as_echo "$ac_try_echo") >&5
27144 (eval "$ac_try") 2>&5
27145 ac_status=$?
27146 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27147 (exit $ac_status); }; }; then
27148
27149
27150cat >>confdefs.h <<\_ACEOF
27151#define ZFS_IS_GPL_COMPATIBLE 1
27152_ACEOF
4d815aed 27153
4d815aed 27154
3d248aec
AX
27155else
27156 $as_echo "$as_me: program exited with status $ac_status" >&5
27157$as_echo "$as_me: failed program was:" >&5
27158sed 's/^/| /' conftest.$ac_ext >&5
27159
27160( exit $ac_status )
4d815aed 27161
4d815aed
AX
27162
27163fi
3d248aec
AX
27164rm -rf conftest.dSYM
27165rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4d815aed
AX
27166fi
27167
27168
3d248aec 27169
4d815aed
AX
27170fi
27171
27172
3d248aec
AX
27173
27174 { $as_echo "$as_me:$LINENO: checking whether kernel was built with 16K or larger stacks" >&5
68d83c55 27175$as_echo_n "checking whether kernel was built with 16K or larger stacks... " >&6; }
4d815aed
AX
27176
27177
68d83c55 27178cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27179/* confdefs.h. */
27180_ACEOF
27181cat confdefs.h >>conftest.$ac_ext
27182cat >>conftest.$ac_ext <<_ACEOF
27183/* end confdefs.h. */
4d815aed 27184
4d815aed 27185
68d83c55 27186 #include <linux/module.h>
4d815aed
AX
27187
27188int
68d83c55 27189main (void)
4d815aed
AX
27190{
27191
68d83c55
AX
27192 #if (THREAD_SIZE < 16384)
27193 #error "THREAD_SIZE is less than 16K"
27194 #endif
27195
4d815aed
AX
27196 ;
27197 return 0;
27198}
68d83c55 27199
4d815aed 27200_ACEOF
4d815aed 27201
4d815aed 27202
4d815aed 27203
68d83c55 27204cat - <<_ACEOF >conftest.h
4d815aed 27205
68d83c55 27206_ACEOF
4d815aed 27207
4d815aed 27208
68d83c55
AX
27209 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27210 echo "obj-m := conftest.o" >build/Makefile
27211 modpost_flag=''
27212 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27213 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27215 (eval $ac_try) 2>&5
27216 ac_status=$?
3d248aec
AX
27217 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27218 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27220 (eval $ac_try) 2>&5
27221 ac_status=$?
3d248aec
AX
27222 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27223 (exit $ac_status); }; }; then
4d815aed 27224
3d248aec 27225 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 27226$as_echo "yes" >&6; }
4d815aed 27227
3d248aec
AX
27228cat >>confdefs.h <<\_ACEOF
27229#define HAVE_LARGE_STACKS 1
27230_ACEOF
4d815aed 27231
4d815aed 27232
68d83c55
AX
27233else
27234 $as_echo "$as_me: failed program was:" >&5
27235sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 27236
3d248aec 27237 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 27238$as_echo "no" >&6; }
4d815aed 27239
4d815aed
AX
27240
27241
4d815aed 27242fi
3d248aec 27243
68d83c55 27244 rm -Rf build
4d815aed
AX
27245
27246
27247
4d815aed
AX
27248
27249
3d248aec 27250 { $as_echo "$as_me:$LINENO: checking whether kernel was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
68d83c55 27251$as_echo_n "checking whether kernel was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
4d815aed 27252
4d815aed 27253
68d83c55 27254cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27255/* confdefs.h. */
27256_ACEOF
27257cat confdefs.h >>conftest.$ac_ext
27258cat >>conftest.$ac_ext <<_ACEOF
27259/* end confdefs.h. */
4d815aed 27260
4d815aed 27261
68d83c55 27262 #include <linux/module.h>
4d815aed 27263
68d83c55
AX
27264int
27265main (void)
27266{
4d815aed 27267
68d83c55
AX
27268 #ifndef CONFIG_DEBUG_LOCK_ALLOC
27269 #error CONFIG_DEBUG_LOCK_ALLOC not #defined
27270 #endif
4d815aed 27271
68d83c55
AX
27272 ;
27273 return 0;
27274}
4d815aed 27275
68d83c55 27276_ACEOF
4d815aed 27277
4d815aed 27278
4d815aed 27279
68d83c55 27280cat - <<_ACEOF >conftest.h
4d815aed 27281
68d83c55 27282_ACEOF
4d815aed 27283
4d815aed 27284
68d83c55
AX
27285 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27286 echo "obj-m := conftest.o" >build/Makefile
27287 modpost_flag=''
27288 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27289 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27290 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27291 (eval $ac_try) 2>&5
27292 ac_status=$?
3d248aec
AX
27293 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27294 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27295 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27296 (eval $ac_try) 2>&5
27297 ac_status=$?
3d248aec
AX
27298 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27299 (exit $ac_status); }; }; then
4d815aed 27300
3d248aec 27301 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 27302$as_echo "yes" >&6; }
4d815aed 27303
3d248aec 27304 { $as_echo "$as_me:$LINENO: checking whether mutex_lock() is GPL-only" >&5
68d83c55
AX
27305$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; }
27306 tmp_flags="$EXTRA_KCFLAGS"
4d815aed 27307
4d815aed 27308
68d83c55 27309cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27310/* confdefs.h. */
27311_ACEOF
27312cat confdefs.h >>conftest.$ac_ext
27313cat >>conftest.$ac_ext <<_ACEOF
27314/* end confdefs.h. */
4d815aed 27315
4d815aed 27316
68d83c55
AX
27317 #include <linux/module.h>
27318 #include <linux/mutex.h>
4d815aed 27319
68d83c55 27320 MODULE_LICENSE("$ZFS_META_LICENSE");
4d815aed 27321
68d83c55
AX
27322int
27323main (void)
27324{
4d815aed 27325
68d83c55 27326 struct mutex lock;
4d815aed 27327
68d83c55
AX
27328 mutex_init(&lock);
27329 mutex_lock(&lock);
27330 mutex_unlock(&lock);
4d815aed 27331
68d83c55
AX
27332 ;
27333 return 0;
27334}
4d815aed 27335
68d83c55 27336_ACEOF
4d815aed 27337
4d815aed 27338
4d815aed 27339
68d83c55
AX
27340cat - <<_ACEOF >conftest.h
27341
27342_ACEOF
27343
27344
27345 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27346 echo "obj-m := conftest.o" >build/Makefile
27347 modpost_flag=''
27348 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27349 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27351 (eval $ac_try) 2>&5
27352 ac_status=$?
3d248aec
AX
27353 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27354 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27356 (eval $ac_try) 2>&5
27357 ac_status=$?
3d248aec
AX
27358 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27359 (exit $ac_status); }; }; then
68d83c55 27360
3d248aec 27361 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 27362$as_echo "no" >&6; }
4d815aed
AX
27363
27364else
68d83c55
AX
27365 $as_echo "$as_me: failed program was:" >&5
27366sed 's/^/| /' conftest.$ac_ext >&5
27367
3d248aec 27368 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 27369$as_echo "yes" >&6; }
3d248aec
AX
27370 { { $as_echo "$as_me:$LINENO: error:
27371 *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
27372 *** with the CDDL license and will prevent the module linking stage
27373 *** from succeeding. You must rebuild your kernel without this
27374 *** option enabled." >&5
27375$as_echo "$as_me: error:
68d83c55
AX
27376 *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
27377 *** with the CDDL license and will prevent the module linking stage
27378 *** from succeeding. You must rebuild your kernel without this
3d248aec
AX
27379 *** option enabled." >&2;}
27380 { (exit 1); exit 1; }; }
4d815aed 27381
4d815aed 27382
4d815aed
AX
27383
27384fi
3d248aec 27385
68d83c55 27386 rm -Rf build
4d815aed 27387
4d815aed 27388
68d83c55 27389 EXTRA_KCFLAGS="$tmp_flags"
4d815aed 27390
4d815aed 27391
68d83c55
AX
27392else
27393 $as_echo "$as_me: failed program was:" >&5
27394sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 27395
3d248aec 27396 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 27397$as_echo "no" >&6; }
4d815aed 27398
4d815aed 27399
4d815aed 27400
4d815aed 27401
68d83c55 27402fi
3d248aec 27403
68d83c55 27404 rm -Rf build
4d815aed 27405
4d815aed 27406
4d815aed 27407
4d815aed 27408
4d815aed 27409
4d815aed 27410
68d83c55
AX
27411 tmp_flags="$EXTRA_KCFLAGS"
27412 EXTRA_KCFLAGS="-I\$(src)"
4d815aed 27413
3d248aec 27414 { $as_echo "$as_me:$LINENO: checking whether DECLARE_EVENT_CLASS() is available" >&5
68d83c55 27415$as_echo_n "checking whether DECLARE_EVENT_CLASS() is available... " >&6; }
4d815aed 27416
4d815aed 27417
68d83c55 27418cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27419/* confdefs.h. */
27420_ACEOF
27421cat confdefs.h >>conftest.$ac_ext
27422cat >>conftest.$ac_ext <<_ACEOF
27423/* end confdefs.h. */
4d815aed
AX
27424
27425
68d83c55
AX
27426 #include <linux/module.h>
27427 MODULE_LICENSE(ZFS_META_LICENSE);
4d815aed 27428
68d83c55
AX
27429 #define CREATE_TRACE_POINTS
27430 #include "conftest.h"
4d815aed 27431
68d83c55
AX
27432int
27433main (void)
27434{
4d815aed 27435
68d83c55
AX
27436 trace_zfs_autoconf_event_one(1UL);
27437 trace_zfs_autoconf_event_two(2UL);
4d815aed 27438
68d83c55
AX
27439 ;
27440 return 0;
27441}
4d815aed 27442
68d83c55 27443_ACEOF
4d815aed 27444
4d815aed 27445
4d815aed 27446
68d83c55 27447cat - <<_ACEOF >conftest.h
4d815aed 27448
68d83c55
AX
27449 #if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
27450 #define _CONFTEST_H
4d815aed 27451
68d83c55
AX
27452 #undef TRACE_SYSTEM
27453 #define TRACE_SYSTEM zfs
27454 #include <linux/tracepoint.h>
4d815aed 27455
68d83c55
AX
27456 DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
27457 TP_PROTO(unsigned long i),
27458 TP_ARGS(i),
27459 TP_STRUCT__entry(
27460 __field(unsigned long, i)
27461 ),
27462 TP_fast_assign(
27463 __entry->i = i;
27464 ),
27465 TP_printk("i = %lu", __entry->i)
27466 );
4d815aed 27467
68d83c55
AX
27468 #define DEFINE_AUTOCONF_EVENT(name) \
27469 DEFINE_EVENT(zfs_autoconf_event_class, name, \
27470 TP_PROTO(unsigned long i), \
27471 TP_ARGS(i))
27472 DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
27473 DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
4d815aed 27474
68d83c55 27475 #endif /* _CONFTEST_H */
4d815aed 27476
68d83c55
AX
27477 #undef TRACE_INCLUDE_PATH
27478 #define TRACE_INCLUDE_PATH .
27479 #define TRACE_INCLUDE_FILE conftest
27480 #include <trace/define_trace.h>
4d815aed 27481
68d83c55 27482_ACEOF
4d815aed
AX
27483
27484
68d83c55
AX
27485 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27486 echo "obj-m := conftest.o" >build/Makefile
27487 modpost_flag=''
27488 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27489 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27490 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27491 (eval $ac_try) 2>&5
27492 ac_status=$?
3d248aec
AX
27493 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27494 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27496 (eval $ac_try) 2>&5
27497 ac_status=$?
3d248aec
AX
27498 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27499 (exit $ac_status); }; }; then
4d815aed 27500
3d248aec 27501 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 27502$as_echo "yes" >&6; }
4d815aed 27503
3d248aec
AX
27504cat >>confdefs.h <<\_ACEOF
27505#define HAVE_DECLARE_EVENT_CLASS 1
27506_ACEOF
4d815aed
AX
27507
27508
68d83c55
AX
27509else
27510 $as_echo "$as_me: failed program was:" >&5
27511sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 27512
3d248aec 27513 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 27514$as_echo "no" >&6; }
4d815aed
AX
27515
27516
27517
4d815aed 27518fi
3d248aec 27519
68d83c55 27520 rm -Rf build
4d815aed
AX
27521
27522
68d83c55 27523 EXTRA_KCFLAGS="$tmp_flags"
4d815aed 27524
4d815aed 27525
3d248aec 27526 { $as_echo "$as_me:$LINENO: checking whether current->bio_tail exists" >&5
68d83c55 27527$as_echo_n "checking whether current->bio_tail exists... " >&6; }
4d815aed 27528
4d815aed 27529
68d83c55 27530cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27531/* confdefs.h. */
27532_ACEOF
27533cat confdefs.h >>conftest.$ac_ext
27534cat >>conftest.$ac_ext <<_ACEOF
27535/* end confdefs.h. */
4d815aed 27536
4d815aed 27537
68d83c55 27538 #include <linux/sched.h>
4d815aed 27539
68d83c55
AX
27540int
27541main (void)
27542{
4d815aed 27543
68d83c55 27544 current->bio_tail = (struct bio **) NULL;
4d815aed 27545
68d83c55
AX
27546 ;
27547 return 0;
27548}
4d815aed 27549
68d83c55 27550_ACEOF
4d815aed 27551
4d815aed 27552
4d815aed 27553
68d83c55 27554cat - <<_ACEOF >conftest.h
4d815aed 27555
68d83c55 27556_ACEOF
4d815aed 27557
4d815aed 27558
68d83c55
AX
27559 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27560 echo "obj-m := conftest.o" >build/Makefile
27561 modpost_flag=''
27562 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27563 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27565 (eval $ac_try) 2>&5
27566 ac_status=$?
3d248aec
AX
27567 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27568 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27570 (eval $ac_try) 2>&5
27571 ac_status=$?
3d248aec
AX
27572 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27573 (exit $ac_status); }; }; then
68d83c55 27574
3d248aec 27575 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 27576$as_echo "yes" >&6; }
4d815aed 27577
3d248aec
AX
27578cat >>confdefs.h <<\_ACEOF
27579#define HAVE_CURRENT_BIO_TAIL 1
27580_ACEOF
4d815aed 27581
4d815aed
AX
27582
27583else
68d83c55
AX
27584 $as_echo "$as_me: failed program was:" >&5
27585sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 27586
3d248aec 27587 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 27588$as_echo "no" >&6; }
3d248aec 27589 { $as_echo "$as_me:$LINENO: checking whether current->bio_list exists" >&5
68d83c55 27590$as_echo_n "checking whether current->bio_list exists... " >&6; }
4d815aed 27591
4d815aed 27592
68d83c55 27593cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27594/* confdefs.h. */
27595_ACEOF
27596cat confdefs.h >>conftest.$ac_ext
27597cat >>conftest.$ac_ext <<_ACEOF
27598/* end confdefs.h. */
4d815aed 27599
4d815aed 27600
68d83c55 27601 #include <linux/sched.h>
4d815aed 27602
68d83c55
AX
27603int
27604main (void)
27605{
4d815aed 27606
68d83c55 27607 current->bio_list = (struct bio_list *) NULL;
4d815aed 27608
68d83c55
AX
27609 ;
27610 return 0;
27611}
4d815aed 27612
68d83c55 27613_ACEOF
4d815aed 27614
4d815aed 27615
4d815aed 27616
68d83c55 27617cat - <<_ACEOF >conftest.h
4d815aed 27618
68d83c55 27619_ACEOF
4d815aed 27620
4d815aed 27621
68d83c55
AX
27622 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27623 echo "obj-m := conftest.o" >build/Makefile
27624 modpost_flag=''
27625 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27626 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27628 (eval $ac_try) 2>&5
27629 ac_status=$?
3d248aec
AX
27630 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27631 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27633 (eval $ac_try) 2>&5
27634 ac_status=$?
3d248aec
AX
27635 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27636 (exit $ac_status); }; }; then
4d815aed 27637
3d248aec 27638 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 27639$as_echo "yes" >&6; }
4d815aed 27640
3d248aec
AX
27641cat >>confdefs.h <<\_ACEOF
27642#define HAVE_CURRENT_BIO_LIST 1
27643_ACEOF
4d815aed 27644
4d815aed
AX
27645
27646else
68d83c55
AX
27647 $as_echo "$as_me: failed program was:" >&5
27648sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 27649
3d248aec
AX
27650 { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
27651 https://github.com/zfsonlinux/zfs/issues/new" >&5
27652$as_echo "$as_me: error: no - Please file a bug report at
27653 https://github.com/zfsonlinux/zfs/issues/new" >&2;}
27654 { (exit 1); exit 1; }; }
4d815aed 27655
4d815aed 27656
4d815aed
AX
27657
27658fi
3d248aec 27659
68d83c55
AX
27660 rm -Rf build
27661
4d815aed 27662
4d815aed
AX
27663
27664
4d815aed 27665
e10b0808 27666fi
3d248aec 27667
68d83c55 27668 rm -Rf build
ea04106b 27669
4d815aed 27670
ea04106b
AX
27671
27672
3d248aec 27673 { $as_echo "$as_me:$LINENO: checking whether submit_bio() wants 1 arg" >&5
68d83c55 27674$as_echo_n "checking whether submit_bio() wants 1 arg... " >&6; }
ea04106b 27675
ea04106b 27676
68d83c55 27677cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27678/* confdefs.h. */
27679_ACEOF
27680cat confdefs.h >>conftest.$ac_ext
27681cat >>conftest.$ac_ext <<_ACEOF
27682/* end confdefs.h. */
ea04106b 27683
ea04106b 27684
68d83c55 27685 #include <linux/bio.h>
ea04106b 27686
68d83c55
AX
27687int
27688main (void)
27689{
ea04106b 27690
68d83c55
AX
27691 blk_qc_t blk_qc;
27692 struct bio *bio = NULL;
27693 blk_qc = submit_bio(bio);
ea04106b 27694
68d83c55
AX
27695 ;
27696 return 0;
27697}
ea04106b 27698
68d83c55 27699_ACEOF
ea04106b 27700
ea04106b 27701
4d815aed 27702
68d83c55 27703cat - <<_ACEOF >conftest.h
ea04106b 27704
68d83c55 27705_ACEOF
ea04106b
AX
27706
27707
68d83c55
AX
27708 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27709 echo "obj-m := conftest.o" >build/Makefile
27710 modpost_flag=''
27711 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27712 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27714 (eval $ac_try) 2>&5
27715 ac_status=$?
3d248aec
AX
27716 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27717 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27719 (eval $ac_try) 2>&5
27720 ac_status=$?
3d248aec
AX
27721 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27722 (exit $ac_status); }; }; then
ea04106b 27723
3d248aec 27724 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 27725$as_echo "yes" >&6; }
ea04106b 27726
3d248aec
AX
27727cat >>confdefs.h <<\_ACEOF
27728#define HAVE_1ARG_SUBMIT_BIO 1
27729_ACEOF
4d815aed 27730
ea04106b 27731
e10b0808 27732else
68d83c55
AX
27733 $as_echo "$as_me: failed program was:" >&5
27734sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 27735
3d248aec 27736 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 27737$as_echo "no" >&6; }
4d815aed 27738
4d815aed 27739
4d815aed
AX
27740
27741fi
3d248aec 27742
68d83c55 27743 rm -Rf build
4d815aed 27744
4d815aed
AX
27745
27746
27747
3d248aec 27748 { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5
68d83c55
AX
27749$as_echo_n "checking block device operation prototypes... " >&6; }
27750 tmp_flags="$EXTRA_KCFLAGS"
27751 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
4d815aed
AX
27752
27753
27754cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27755/* confdefs.h. */
27756_ACEOF
27757cat confdefs.h >>conftest.$ac_ext
27758cat >>conftest.$ac_ext <<_ACEOF
27759/* end confdefs.h. */
4d815aed
AX
27760
27761
68d83c55
AX
27762 #include <linux/blkdev.h>
27763
27764 int blk_open(struct block_device *bdev, fmode_t mode)
27765 { return 0; }
27766 int blk_ioctl(struct block_device *bdev, fmode_t mode,
27767 unsigned x, unsigned long y) { return 0; }
27768 int blk_compat_ioctl(struct block_device * bdev, fmode_t mode,
27769 unsigned x, unsigned long y) { return 0; }
27770
27771 static const struct block_device_operations
27772 bops __attribute__ ((unused)) = {
27773 .open = blk_open,
27774 .release = NULL,
27775 .ioctl = blk_ioctl,
27776 .compat_ioctl = blk_compat_ioctl,
27777 };
27778
e10b0808 27779int
4d815aed 27780main (void)
e10b0808 27781{
4d815aed 27782
68d83c55 27783
e10b0808
AX
27784 ;
27785 return 0;
27786}
4d815aed 27787
e10b0808 27788_ACEOF
4d815aed
AX
27789
27790
27791
27792cat - <<_ACEOF >conftest.h
27793
27794_ACEOF
27795
27796
27797 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27798 echo "obj-m := conftest.o" >build/Makefile
27799 modpost_flag=''
27800 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27801 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
27803 (eval $ac_try) 2>&5
27804 ac_status=$?
3d248aec
AX
27805 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27806 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
27808 (eval $ac_try) 2>&5
27809 ac_status=$?
3d248aec
AX
27810 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27811 (exit $ac_status); }; }; then
4d815aed 27812
3d248aec 27813 { $as_echo "$as_me:$LINENO: result: struct block_device" >&5
68d83c55
AX
27814$as_echo "struct block_device" >&6; }
27815
3d248aec
AX
27816cat >>confdefs.h <<\_ACEOF
27817#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1
27818_ACEOF
68d83c55 27819
4d815aed 27820
e10b0808 27821else
4d815aed
AX
27822 $as_echo "$as_me: failed program was:" >&5
27823sed 's/^/| /' conftest.$ac_ext >&5
27824
3d248aec 27825 { $as_echo "$as_me:$LINENO: result: struct inode" >&5
68d83c55 27826$as_echo "struct inode" >&6; }
4d815aed
AX
27827
27828
27829
e10b0808 27830fi
3d248aec 27831
4d815aed 27832 rm -Rf build
ea04106b
AX
27833
27834
68d83c55 27835 EXTRA_KCFLAGS="$tmp_flags"
ea04106b
AX
27836
27837
3d248aec 27838 { $as_echo "$as_me:$LINENO: checking whether block_device_operations.release is void" >&5
68d83c55
AX
27839$as_echo_n "checking whether block_device_operations.release is void... " >&6; }
27840 tmp_flags="$EXTRA_KCFLAGS"
27841 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
4d815aed 27842
68d83c55
AX
27843
27844cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27845/* confdefs.h. */
27846_ACEOF
27847cat confdefs.h >>conftest.$ac_ext
27848cat >>conftest.$ac_ext <<_ACEOF
27849/* end confdefs.h. */
ea04106b 27850
4d815aed 27851
68d83c55
AX
27852 #include <linux/blkdev.h>
27853
27854 void blk_release(struct gendisk *g, fmode_t mode) { return; }
27855
27856 static const struct block_device_operations
27857 bops __attribute__ ((unused)) = {
27858 .open = NULL,
27859 .release = blk_release,
27860 .ioctl = NULL,
27861 .compat_ioctl = NULL,
27862 };
ea04106b 27863
e10b0808 27864int
68d83c55 27865main (void)
e10b0808 27866{
ea04106b 27867
ea04106b
AX
27868
27869 ;
27870 return 0;
27871}
4d815aed 27872
ea04106b
AX
27873_ACEOF
27874
ea04106b
AX
27875
27876
68d83c55
AX
27877cat - <<_ACEOF >conftest.h
27878
27879_ACEOF
27880
27881
27882 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27883 echo "obj-m := conftest.o" >build/Makefile
27884 modpost_flag=''
27885 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27886 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27888 (eval $ac_try) 2>&5
27889 ac_status=$?
3d248aec
AX
27890 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27891 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
27893 (eval $ac_try) 2>&5
27894 ac_status=$?
3d248aec
AX
27895 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27896 (exit $ac_status); }; }; then
68d83c55 27897
3d248aec 27898 { $as_echo "$as_me:$LINENO: result: void" >&5
68d83c55
AX
27899$as_echo "void" >&6; }
27900
3d248aec
AX
27901cat >>confdefs.h <<\_ACEOF
27902#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID 1
27903_ACEOF
68d83c55
AX
27904
27905
27906else
27907 $as_echo "$as_me: failed program was:" >&5
27908sed 's/^/| /' conftest.$ac_ext >&5
27909
3d248aec 27910 { $as_echo "$as_me:$LINENO: result: int" >&5
68d83c55 27911$as_echo "int" >&6; }
ea04106b 27912
ea04106b 27913
ea04106b 27914
ea04106b 27915fi
3d248aec 27916
68d83c55 27917 rm -Rf build
ea04106b
AX
27918
27919
68d83c55 27920 EXTRA_KCFLAGS="$tmp_flags"
ea04106b 27921
3d248aec 27922 { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5
68d83c55 27923$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
ea04106b
AX
27924
27925
4d815aed 27926cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
27927/* confdefs.h. */
27928_ACEOF
27929cat confdefs.h >>conftest.$ac_ext
27930cat >>conftest.$ac_ext <<_ACEOF
27931/* end confdefs.h. */
ea04106b 27932
ea04106b 27933
68d83c55 27934 #include <linux/types.h>
ea04106b
AX
27935
27936int
4d815aed 27937main (void)
ea04106b
AX
27938{
27939
68d83c55 27940 fmode_t *ptr __attribute__ ((unused));
4d815aed 27941
ea04106b
AX
27942 ;
27943 return 0;
27944}
ea04106b 27945
4d815aed 27946_ACEOF
ea04106b 27947
ea04106b
AX
27948
27949
4d815aed 27950cat - <<_ACEOF >conftest.h
ea04106b 27951
4d815aed 27952_ACEOF
ea04106b 27953
ea04106b 27954
4d815aed
AX
27955 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
27956 echo "obj-m := conftest.o" >build/Makefile
27957 modpost_flag=''
27958 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
27959 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 27960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
27961 (eval $ac_try) 2>&5
27962 ac_status=$?
3d248aec
AX
27963 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27964 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
27965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
27966 (eval $ac_try) 2>&5
27967 ac_status=$?
3d248aec
AX
27968 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27969 (exit $ac_status); }; }; then
ea04106b 27970
3d248aec 27971 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 27972$as_echo "yes" >&6; }
ea04106b 27973
3d248aec
AX
27974cat >>confdefs.h <<\_ACEOF
27975#define HAVE_FMODE_T 1
27976_ACEOF
ea04106b 27977
ea04106b 27978
68d83c55
AX
27979else
27980 $as_echo "$as_me: failed program was:" >&5
27981sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 27982
3d248aec 27983 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 27984$as_echo "no" >&6; }
ea04106b
AX
27985
27986
68d83c55
AX
27987
27988fi
3d248aec 27989
68d83c55
AX
27990 rm -Rf build
27991
27992
27993
27994
3d248aec 27995 { $as_echo "$as_me:$LINENO: checking whether kernel defines KOBJ_NAME_LEN" >&5
68d83c55
AX
27996$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; }
27997
27998
27999cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28000/* confdefs.h. */
28001_ACEOF
28002cat confdefs.h >>conftest.$ac_ext
28003cat >>conftest.$ac_ext <<_ACEOF
28004/* end confdefs.h. */
68d83c55
AX
28005
28006
28007 #include <linux/kobject.h>
ea04106b 28008
4d815aed
AX
28009int
28010main (void)
28011{
ea04106b 28012
68d83c55
AX
28013 int val __attribute__ ((unused));
28014 val = KOBJ_NAME_LEN;
ea04106b 28015
4d815aed
AX
28016 ;
28017 return 0;
28018}
ea04106b 28019
4d815aed 28020_ACEOF
ea04106b
AX
28021
28022
28023
4d815aed 28024cat - <<_ACEOF >conftest.h
ea04106b 28025
4d815aed 28026_ACEOF
ea04106b
AX
28027
28028
4d815aed
AX
28029 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28030 echo "obj-m := conftest.o" >build/Makefile
28031 modpost_flag=''
28032 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28033 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28035 (eval $ac_try) 2>&5
28036 ac_status=$?
3d248aec
AX
28037 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28038 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28040 (eval $ac_try) 2>&5
28041 ac_status=$?
3d248aec
AX
28042 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28043 (exit $ac_status); }; }; then
ea04106b 28044
3d248aec 28045 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 28046$as_echo "yes" >&6; }
ea04106b 28047
3d248aec
AX
28048cat >>confdefs.h <<\_ACEOF
28049#define HAVE_KOBJ_NAME_LEN 1
28050_ACEOF
ea04106b 28051
ea04106b 28052
4d815aed
AX
28053else
28054 $as_echo "$as_me: failed program was:" >&5
28055sed 's/^/| /' conftest.$ac_ext >&5
28056
3d248aec 28057 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 28058$as_echo "no" >&6; }
ea04106b
AX
28059
28060
ea04106b 28061
e10b0808 28062fi
3d248aec 28063
4d815aed 28064 rm -Rf build
ea04106b 28065
ea04106b 28066
ea04106b 28067
ea04106b 28068
3d248aec 28069 { $as_echo "$as_me:$LINENO: checking whether blkdev_get() wants 3 args" >&5
68d83c55 28070$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
ea04106b
AX
28071
28072
4d815aed 28073cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28074/* confdefs.h. */
28075_ACEOF
28076cat confdefs.h >>conftest.$ac_ext
28077cat >>conftest.$ac_ext <<_ACEOF
28078/* end confdefs.h. */
ea04106b
AX
28079
28080
68d83c55 28081 #include <linux/fs.h>
ea04106b 28082
4d815aed
AX
28083int
28084main (void)
28085{
ea04106b 28086
68d83c55
AX
28087 struct block_device *bdev = NULL;
28088 (void) blkdev_get(bdev, 0, NULL);
ea04106b 28089
4d815aed
AX
28090 ;
28091 return 0;
28092}
ea04106b 28093
4d815aed 28094_ACEOF
ea04106b 28095
ea04106b 28096
ea04106b 28097
4d815aed 28098cat - <<_ACEOF >conftest.h
ea04106b 28099
4d815aed 28100_ACEOF
ea04106b 28101
ea04106b 28102
4d815aed
AX
28103 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28104 echo "obj-m := conftest.o" >build/Makefile
28105 modpost_flag=''
28106 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28107 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28108 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28109 (eval $ac_try) 2>&5
28110 ac_status=$?
3d248aec
AX
28111 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28112 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28114 (eval $ac_try) 2>&5
28115 ac_status=$?
3d248aec
AX
28116 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28117 (exit $ac_status); }; }; then
ea04106b 28118
3d248aec 28119 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 28120$as_echo "yes" >&6; }
ea04106b 28121
3d248aec
AX
28122cat >>confdefs.h <<\_ACEOF
28123#define HAVE_3ARG_BLKDEV_GET 1
28124_ACEOF
ea04106b 28125
ea04106b 28126
4d815aed
AX
28127else
28128 $as_echo "$as_me: failed program was:" >&5
28129sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 28130
3d248aec 28131 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 28132$as_echo "no" >&6; }
ea04106b
AX
28133
28134
ea04106b 28135
4d815aed 28136fi
3d248aec 28137
4d815aed 28138 rm -Rf build
ea04106b
AX
28139
28140
ea04106b 28141
3d248aec 28142 { $as_echo "$as_me:$LINENO: checking whether blkdev_get_by_path() is available" >&5
68d83c55 28143$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
ea04106b
AX
28144
28145
ea04106b 28146
4d815aed 28147cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28148/* confdefs.h. */
28149_ACEOF
28150cat confdefs.h >>conftest.$ac_ext
28151cat >>conftest.$ac_ext <<_ACEOF
28152/* end confdefs.h. */
ea04106b 28153
ea04106b 28154
68d83c55 28155 #include <linux/fs.h>
ea04106b 28156
4d815aed
AX
28157int
28158main (void)
28159{
ea04106b 28160
68d83c55 28161 blkdev_get_by_path(NULL, 0, NULL);
ea04106b 28162
4d815aed
AX
28163 ;
28164 return 0;
28165}
ea04106b 28166
4d815aed 28167_ACEOF
ea04106b
AX
28168
28169
ea04106b 28170
4d815aed 28171cat - <<_ACEOF >conftest.h
ea04106b 28172
4d815aed 28173_ACEOF
ea04106b 28174
ea04106b 28175
4d815aed
AX
28176 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28177 echo "obj-m := conftest.o" >build/Makefile
28178 modpost_flag=''
28179 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28180 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28182 (eval $ac_try) 2>&5
28183 ac_status=$?
3d248aec
AX
28184 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28185 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28187 (eval $ac_try) 2>&5
28188 ac_status=$?
3d248aec
AX
28189 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28190 (exit $ac_status); }; }; then
68d83c55
AX
28191 rc=0
28192else
28193 $as_echo "$as_me: failed program was:" >&5
28194sed 's/^/| /' conftest.$ac_ext >&5
28195 rc=1
ea04106b 28196
ea04106b 28197
68d83c55 28198fi
3d248aec 28199
68d83c55 28200 rm -Rf build
ea04106b 28201
ea04106b 28202
68d83c55 28203 if test $rc -ne 0; then :
ea04106b 28204
3d248aec 28205 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 28206$as_echo "no" >&6; }
68d83c55
AX
28207
28208 else
28209 if test "x$enable_linux_builtin" != xyes; then
28210
28211 grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
28212 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
28213 rc=$?
28214 if test $rc -ne 0; then
28215 export=0
28216 for file in fs/block_dev.c; do
28217 grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
28218 "$LINUX/$file" 2>/dev/null
28219 rc=$?
28220 if test $rc -eq 0; then
28221 export=1
28222 break;
28223 fi
28224 done
28225 if test $export -eq 0; then :
28226 rc=1
28227 else :
28228 rc=0
28229 fi
28230 else :
28231 rc=0
28232 fi
28233
28234 fi
28235 if test $rc -ne 0; then :
28236
3d248aec 28237 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
28238$as_echo "no" >&6; }
28239
28240 else :
28241
3d248aec 28242 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
28243$as_echo "yes" >&6; }
28244
3d248aec
AX
28245cat >>confdefs.h <<\_ACEOF
28246#define HAVE_BLKDEV_GET_BY_PATH 1
28247_ACEOF
68d83c55
AX
28248
28249
28250 fi
28251 fi
28252
28253
3d248aec 28254 { $as_echo "$as_me:$LINENO: checking whether open_bdev_exclusive() is available" >&5
68d83c55
AX
28255$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
28256
ea04106b 28257
ea04106b 28258
4d815aed 28259cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28260/* confdefs.h. */
28261_ACEOF
28262cat confdefs.h >>conftest.$ac_ext
28263cat >>conftest.$ac_ext <<_ACEOF
28264/* end confdefs.h. */
ea04106b 28265
ea04106b 28266
68d83c55 28267 #include <linux/fs.h>
ea04106b 28268
4d815aed
AX
28269int
28270main (void)
28271{
ea04106b 28272
68d83c55 28273 open_bdev_exclusive(NULL, 0, NULL);
ea04106b 28274
4d815aed
AX
28275 ;
28276 return 0;
28277}
ea04106b 28278
4d815aed 28279_ACEOF
ea04106b
AX
28280
28281
ea04106b 28282
4d815aed 28283cat - <<_ACEOF >conftest.h
ea04106b 28284
4d815aed 28285_ACEOF
ea04106b 28286
ea04106b 28287
4d815aed
AX
28288 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28289 echo "obj-m := conftest.o" >build/Makefile
28290 modpost_flag=''
28291 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28292 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28294 (eval $ac_try) 2>&5
28295 ac_status=$?
3d248aec
AX
28296 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28297 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28299 (eval $ac_try) 2>&5
28300 ac_status=$?
3d248aec
AX
28301 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28302 (exit $ac_status); }; }; then
68d83c55
AX
28303 rc=0
28304else
28305 $as_echo "$as_me: failed program was:" >&5
28306sed 's/^/| /' conftest.$ac_ext >&5
28307 rc=1
ea04106b 28308
4d815aed 28309
68d83c55 28310fi
3d248aec 28311
68d83c55 28312 rm -Rf build
ea04106b 28313
ea04106b 28314
68d83c55 28315 if test $rc -ne 0; then :
4d815aed 28316
3d248aec 28317 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 28318$as_echo "no" >&6; }
4d815aed 28319
68d83c55
AX
28320 else
28321 if test "x$enable_linux_builtin" != xyes; then
ea04106b 28322
68d83c55
AX
28323 grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
28324 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
28325 rc=$?
28326 if test $rc -ne 0; then
28327 export=0
28328 for file in fs/block_dev.c; do
28329 grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
28330 "$LINUX/$file" 2>/dev/null
28331 rc=$?
28332 if test $rc -eq 0; then
28333 export=1
28334 break;
28335 fi
28336 done
28337 if test $export -eq 0; then :
28338 rc=1
28339 else :
28340 rc=0
28341 fi
28342 else :
28343 rc=0
28344 fi
ea04106b 28345
68d83c55
AX
28346 fi
28347 if test $rc -ne 0; then :
ea04106b 28348
3d248aec 28349 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 28350$as_echo "no" >&6; }
ea04106b 28351
68d83c55 28352 else :
ea04106b 28353
3d248aec 28354 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 28355$as_echo "yes" >&6; }
ea04106b 28356
3d248aec
AX
28357cat >>confdefs.h <<\_ACEOF
28358#define HAVE_OPEN_BDEV_EXCLUSIVE 1
28359_ACEOF
ea04106b 28360
87dac73d 28361
68d83c55
AX
28362 fi
28363 fi
87dac73d
AX
28364
28365
3d248aec 28366 { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 1 arg" >&5
68d83c55 28367$as_echo_n "checking whether lookup_bdev() wants 1 arg... " >&6; }
87dac73d 28368
87dac73d
AX
28369
28370
28371cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28372/* confdefs.h. */
28373_ACEOF
28374cat confdefs.h >>conftest.$ac_ext
28375cat >>conftest.$ac_ext <<_ACEOF
28376/* end confdefs.h. */
87dac73d
AX
28377
28378
68d83c55 28379 #include <linux/fs.h>
87dac73d
AX
28380
28381int
28382main (void)
28383{
28384
68d83c55 28385 lookup_bdev(NULL);
87dac73d
AX
28386
28387 ;
28388 return 0;
28389}
28390
28391_ACEOF
28392
28393
28394
28395cat - <<_ACEOF >conftest.h
28396
28397_ACEOF
28398
28399
28400 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28401 echo "obj-m := conftest.o" >build/Makefile
28402 modpost_flag=''
28403 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28404 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
28406 (eval $ac_try) 2>&5
28407 ac_status=$?
3d248aec
AX
28408 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28409 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
28411 (eval $ac_try) 2>&5
28412 ac_status=$?
3d248aec
AX
28413 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28414 (exit $ac_status); }; }; then
68d83c55 28415 rc=0
87dac73d
AX
28416else
28417 $as_echo "$as_me: failed program was:" >&5
28418sed 's/^/| /' conftest.$ac_ext >&5
68d83c55 28419 rc=1
87dac73d
AX
28420
28421
e10b0808 28422fi
3d248aec 28423
4d815aed 28424 rm -Rf build
ea04106b 28425
ea04106b 28426
68d83c55 28427 if test $rc -ne 0; then :
ea04106b 28428
3d248aec 28429 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 28430$as_echo "no" >&6; }
3d248aec 28431 { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 2 args" >&5
68d83c55 28432$as_echo_n "checking whether lookup_bdev() wants 2 args... " >&6; }
ea04106b
AX
28433
28434
ea04106b 28435
4d815aed 28436cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28437/* confdefs.h. */
28438_ACEOF
28439cat confdefs.h >>conftest.$ac_ext
28440cat >>conftest.$ac_ext <<_ACEOF
28441/* end confdefs.h. */
ea04106b 28442
ea04106b 28443
68d83c55 28444 #include <linux/fs.h>
ea04106b 28445
4d815aed
AX
28446int
28447main (void)
28448{
ea04106b 28449
68d83c55 28450 lookup_bdev(NULL, FMODE_READ);
ea04106b 28451
4d815aed
AX
28452 ;
28453 return 0;
28454}
ea04106b 28455
4d815aed 28456_ACEOF
ea04106b 28457
ea04106b
AX
28458
28459
4d815aed 28460cat - <<_ACEOF >conftest.h
ea04106b 28461
4d815aed 28462_ACEOF
ea04106b
AX
28463
28464
4d815aed
AX
28465 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28466 echo "obj-m := conftest.o" >build/Makefile
28467 modpost_flag=''
28468 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28469 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28471 (eval $ac_try) 2>&5
28472 ac_status=$?
3d248aec
AX
28473 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28474 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28476 (eval $ac_try) 2>&5
28477 ac_status=$?
3d248aec
AX
28478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28479 (exit $ac_status); }; }; then
68d83c55
AX
28480 rc=0
28481else
28482 $as_echo "$as_me: failed program was:" >&5
28483sed 's/^/| /' conftest.$ac_ext >&5
28484 rc=1
ea04106b
AX
28485
28486
68d83c55 28487fi
3d248aec 28488
68d83c55 28489 rm -Rf build
4d815aed
AX
28490
28491
68d83c55 28492 if test $rc -ne 0; then :
4d815aed 28493
3d248aec 28494 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 28495$as_echo "no" >&6; }
ea04106b 28496
68d83c55
AX
28497 else
28498 if test "x$enable_linux_builtin" != xyes; then
ea04106b 28499
68d83c55
AX
28500 grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
28501 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
28502 rc=$?
28503 if test $rc -ne 0; then
28504 export=0
28505 for file in fs/block_dev.c; do
28506 grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
28507 "$LINUX/$file" 2>/dev/null
28508 rc=$?
28509 if test $rc -eq 0; then
28510 export=1
28511 break;
28512 fi
28513 done
28514 if test $export -eq 0; then :
28515 rc=1
28516 else :
28517 rc=0
28518 fi
28519 else :
28520 rc=0
28521 fi
ea04106b 28522
68d83c55
AX
28523 fi
28524 if test $rc -ne 0; then :
ea04106b 28525
3d248aec 28526 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 28527$as_echo "no" >&6; }
ea04106b 28528
68d83c55 28529 else :
ea04106b 28530
3d248aec 28531 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 28532$as_echo "yes" >&6; }
ea04106b 28533
3d248aec
AX
28534cat >>confdefs.h <<\_ACEOF
28535#define HAVE_2ARGS_LOOKUP_BDEV 1
28536_ACEOF
ea04106b 28537
ea04106b 28538
68d83c55
AX
28539 fi
28540 fi
ea04106b 28541
ea04106b 28542
68d83c55
AX
28543 else
28544 if test "x$enable_linux_builtin" != xyes; then
ea04106b 28545
68d83c55
AX
28546 grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
28547 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
28548 rc=$?
28549 if test $rc -ne 0; then
28550 export=0
28551 for file in fs/block_dev.c; do
28552 grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
28553 "$LINUX/$file" 2>/dev/null
28554 rc=$?
28555 if test $rc -eq 0; then
28556 export=1
28557 break;
28558 fi
28559 done
28560 if test $export -eq 0; then :
28561 rc=1
28562 else :
28563 rc=0
28564 fi
28565 else :
28566 rc=0
28567 fi
ea04106b 28568
68d83c55
AX
28569 fi
28570 if test $rc -ne 0; then :
28571
3d248aec 28572 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 28573$as_echo "no" >&6; }
3d248aec 28574 { $as_echo "$as_me:$LINENO: checking whether lookup_bdev() wants 2 args" >&5
68d83c55
AX
28575$as_echo_n "checking whether lookup_bdev() wants 2 args... " >&6; }
28576
28577
28578
28579cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28580/* confdefs.h. */
28581_ACEOF
28582cat confdefs.h >>conftest.$ac_ext
28583cat >>conftest.$ac_ext <<_ACEOF
28584/* end confdefs.h. */
68d83c55
AX
28585
28586
28587 #include <linux/fs.h>
ea04106b 28588
4d815aed
AX
28589int
28590main (void)
28591{
ea04106b 28592
68d83c55 28593 lookup_bdev(NULL, FMODE_READ);
ea04106b 28594
4d815aed
AX
28595 ;
28596 return 0;
28597}
ea04106b 28598
4d815aed 28599_ACEOF
ea04106b 28600
e10b0808 28601
e10b0808 28602
4d815aed 28603cat - <<_ACEOF >conftest.h
e10b0808 28604
4d815aed 28605_ACEOF
e10b0808 28606
e10b0808 28607
4d815aed
AX
28608 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28609 echo "obj-m := conftest.o" >build/Makefile
28610 modpost_flag=''
28611 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28612 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28614 (eval $ac_try) 2>&5
28615 ac_status=$?
3d248aec
AX
28616 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28617 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28619 (eval $ac_try) 2>&5
28620 ac_status=$?
3d248aec
AX
28621 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28622 (exit $ac_status); }; }; then
68d83c55
AX
28623 rc=0
28624else
28625 $as_echo "$as_me: failed program was:" >&5
28626sed 's/^/| /' conftest.$ac_ext >&5
28627 rc=1
e10b0808 28628
e10b0808 28629
68d83c55 28630fi
3d248aec 28631
68d83c55 28632 rm -Rf build
ea04106b 28633
ea04106b 28634
68d83c55 28635 if test $rc -ne 0; then :
ea04106b 28636
3d248aec 28637 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 28638$as_echo "no" >&6; }
ea04106b 28639
68d83c55
AX
28640 else
28641 if test "x$enable_linux_builtin" != xyes; then
ea04106b 28642
68d83c55
AX
28643 grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
28644 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
28645 rc=$?
28646 if test $rc -ne 0; then
28647 export=0
28648 for file in fs/block_dev.c; do
28649 grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
28650 "$LINUX/$file" 2>/dev/null
28651 rc=$?
28652 if test $rc -eq 0; then
28653 export=1
28654 break;
28655 fi
28656 done
28657 if test $export -eq 0; then :
28658 rc=1
28659 else :
28660 rc=0
28661 fi
28662 else :
28663 rc=0
28664 fi
ea04106b 28665
68d83c55
AX
28666 fi
28667 if test $rc -ne 0; then :
ea04106b 28668
3d248aec 28669 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 28670$as_echo "no" >&6; }
ea04106b 28671
68d83c55 28672 else :
ea04106b 28673
3d248aec 28674 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
28675$as_echo "yes" >&6; }
28676
3d248aec
AX
28677cat >>confdefs.h <<\_ACEOF
28678#define HAVE_2ARGS_LOOKUP_BDEV 1
28679_ACEOF
68d83c55
AX
28680
28681
28682 fi
28683 fi
28684
28685
28686 else :
28687
3d248aec 28688 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
28689$as_echo "yes" >&6; }
28690
3d248aec
AX
28691cat >>confdefs.h <<\_ACEOF
28692#define HAVE_1ARG_LOOKUP_BDEV 1
28693_ACEOF
68d83c55
AX
28694
28695
28696 fi
28697 fi
28698
28699
28700
3d248aec 28701 { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5
68d83c55 28702$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
ea04106b
AX
28703
28704
28705cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28706/* confdefs.h. */
28707_ACEOF
28708cat confdefs.h >>conftest.$ac_ext
28709cat >>conftest.$ac_ext <<_ACEOF
28710/* end confdefs.h. */
ea04106b
AX
28711
28712
68d83c55 28713 #include <linux/buffer_head.h>
4d815aed 28714
ea04106b
AX
28715int
28716main (void)
28717{
28718
68d83c55
AX
28719 struct block_device *bdev = NULL;
28720 invalidate_bdev(bdev);
4d815aed 28721
ea04106b
AX
28722 ;
28723 return 0;
28724}
28725
28726_ACEOF
28727
28728
28729
28730cat - <<_ACEOF >conftest.h
28731
28732_ACEOF
28733
28734
28735 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28736 echo "obj-m := conftest.o" >build/Makefile
28737 modpost_flag=''
28738 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28739 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
28741 (eval $ac_try) 2>&5
28742 ac_status=$?
3d248aec
AX
28743 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28744 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
28746 (eval $ac_try) 2>&5
28747 ac_status=$?
3d248aec
AX
28748 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28749 (exit $ac_status); }; }; then
ea04106b 28750
3d248aec 28751 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
28752$as_echo "yes" >&6; }
28753
3d248aec
AX
28754cat >>confdefs.h <<\_ACEOF
28755#define HAVE_1ARG_INVALIDATE_BDEV 1
28756_ACEOF
4d815aed
AX
28757
28758
ea04106b
AX
28759else
28760 $as_echo "$as_me: failed program was:" >&5
28761sed 's/^/| /' conftest.$ac_ext >&5
28762
3d248aec 28763 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
28764$as_echo "no" >&6; }
28765
28766
28767
28768fi
3d248aec 28769
ea04106b
AX
28770 rm -Rf build
28771
28772
28773
28774
3d248aec 28775 { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5
68d83c55
AX
28776$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
28777 tmp_flags="$EXTRA_KCFLAGS"
28778 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
94a40997 28779
4d815aed
AX
28780
28781cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28782/* confdefs.h. */
28783_ACEOF
28784cat confdefs.h >>conftest.$ac_ext
28785cat >>conftest.$ac_ext <<_ACEOF
28786/* end confdefs.h. */
e10b0808
AX
28787
28788
68d83c55 28789 #include <linux/blkdev.h>
e10b0808
AX
28790
28791int
4d815aed 28792main (void)
e10b0808
AX
28793{
28794
68d83c55
AX
28795 struct block_device *bdev = NULL;
28796 bdev_logical_block_size(bdev);
e10b0808
AX
28797
28798 ;
28799 return 0;
28800}
28801
28802_ACEOF
e10b0808
AX
28803
28804
e10b0808 28805
4d815aed
AX
28806cat - <<_ACEOF >conftest.h
28807
28808_ACEOF
28809
28810
28811 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28812 echo "obj-m := conftest.o" >build/Makefile
28813 modpost_flag=''
28814 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28815 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28817 (eval $ac_try) 2>&5
28818 ac_status=$?
3d248aec
AX
28819 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28820 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4d815aed
AX
28822 (eval $ac_try) 2>&5
28823 ac_status=$?
3d248aec
AX
28824 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28825 (exit $ac_status); }; }; then
4d815aed 28826
3d248aec 28827 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
28828$as_echo "yes" >&6; }
28829
3d248aec
AX
28830cat >>confdefs.h <<\_ACEOF
28831#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1
28832_ACEOF
4d815aed
AX
28833
28834
28835else
28836 $as_echo "$as_me: failed program was:" >&5
28837sed 's/^/| /' conftest.$ac_ext >&5
28838
3d248aec 28839 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 28840$as_echo "no" >&6; }
e10b0808 28841
e10b0808
AX
28842
28843
94a40997 28844fi
3d248aec 28845
4d815aed 28846 rm -Rf build
94a40997 28847
e10b0808 28848
68d83c55 28849 EXTRA_KCFLAGS="$tmp_flags"
e10b0808 28850
4d815aed 28851
3d248aec 28852 { $as_echo "$as_me:$LINENO: checking whether bdev_physical_block_size() is available" >&5
68d83c55
AX
28853$as_echo_n "checking whether bdev_physical_block_size() is available... " >&6; }
28854 tmp_flags="$EXTRA_KCFLAGS"
28855 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
28856
28857
28858cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28859/* confdefs.h. */
28860_ACEOF
28861cat confdefs.h >>conftest.$ac_ext
28862cat >>conftest.$ac_ext <<_ACEOF
28863/* end confdefs.h. */
ea04106b
AX
28864
28865
68d83c55 28866 #include <linux/blkdev.h>
ea04106b
AX
28867
28868int
28869main (void)
28870{
28871
4d815aed 28872 struct block_device *bdev = NULL;
68d83c55 28873 bdev_physical_block_size(bdev);
ea04106b
AX
28874
28875 ;
28876 return 0;
28877}
28878
28879_ACEOF
28880
28881
28882
28883cat - <<_ACEOF >conftest.h
28884
28885_ACEOF
28886
28887
28888 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28889 echo "obj-m := conftest.o" >build/Makefile
28890 modpost_flag=''
28891 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28892 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
28894 (eval $ac_try) 2>&5
28895 ac_status=$?
3d248aec
AX
28896 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28897 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
28899 (eval $ac_try) 2>&5
28900 ac_status=$?
3d248aec
AX
28901 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28902 (exit $ac_status); }; }; then
ea04106b 28903
3d248aec 28904 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
28905$as_echo "yes" >&6; }
28906
3d248aec
AX
28907cat >>confdefs.h <<\_ACEOF
28908#define HAVE_BDEV_PHYSICAL_BLOCK_SIZE 1
28909_ACEOF
ea04106b
AX
28910
28911
4d815aed
AX
28912else
28913 $as_echo "$as_me: failed program was:" >&5
28914sed 's/^/| /' conftest.$ac_ext >&5
28915
3d248aec 28916 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 28917$as_echo "no" >&6; }
ea04106b
AX
28918
28919
e10b0808 28920
4d815aed 28921fi
3d248aec 28922
4d815aed
AX
28923 rm -Rf build
28924
28925
68d83c55 28926 EXTRA_KCFLAGS="$tmp_flags"
4d815aed 28927
4d815aed 28928
3d248aec 28929 { $as_echo "$as_me:$LINENO: checking whether bio has bi_iter" >&5
68d83c55 28930$as_echo_n "checking whether bio has bi_iter... " >&6; }
4d815aed
AX
28931
28932
28933cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
28934/* confdefs.h. */
28935_ACEOF
28936cat confdefs.h >>conftest.$ac_ext
28937cat >>conftest.$ac_ext <<_ACEOF
28938/* end confdefs.h. */
4d815aed
AX
28939
28940
68d83c55 28941 #include <linux/bio.h>
ea04106b
AX
28942
28943int
28944main (void)
28945{
28946
68d83c55
AX
28947 struct bio bio;
28948 bio.bi_iter.bi_sector = 0;
ea04106b
AX
28949
28950 ;
28951 return 0;
28952}
28953
28954_ACEOF
28955
28956
28957
28958cat - <<_ACEOF >conftest.h
28959
28960_ACEOF
28961
28962
28963 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
28964 echo "obj-m := conftest.o" >build/Makefile
28965 modpost_flag=''
28966 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
28967 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 28968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
28969 (eval $ac_try) 2>&5
28970 ac_status=$?
3d248aec
AX
28971 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28972 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
28973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
28974 (eval $ac_try) 2>&5
28975 ac_status=$?
3d248aec
AX
28976 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
28977 (exit $ac_status); }; }; then
e10b0808 28978
3d248aec 28979 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 28980$as_echo "yes" >&6; }
ea04106b 28981
3d248aec
AX
28982cat >>confdefs.h <<\_ACEOF
28983#define HAVE_BIO_BVEC_ITER 1
28984_ACEOF
4d815aed 28985
ea04106b 28986
68d83c55
AX
28987else
28988 $as_echo "$as_me: failed program was:" >&5
28989sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 28990
3d248aec 28991 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
28992$as_echo "no" >&6; }
28993
ea04106b 28994
ea04106b 28995
68d83c55 28996fi
3d248aec 28997
68d83c55 28998 rm -Rf build
ea04106b 28999
e10b0808
AX
29000
29001
e10b0808 29002
3d248aec 29003 { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
68d83c55 29004$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
ea04106b
AX
29005
29006
29007cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29008/* confdefs.h. */
29009_ACEOF
29010cat confdefs.h >>conftest.$ac_ext
29011cat >>conftest.$ac_ext <<_ACEOF
29012/* end confdefs.h. */
ea04106b
AX
29013
29014
68d83c55 29015 #include <linux/bio.h>
ea04106b
AX
29016
29017int
29018main (void)
29019{
29020
68d83c55
AX
29021 int flags __attribute__ ((unused));
29022 flags = ((1 << BIO_RW_FAILFAST_DEV) |
29023 (1 << BIO_RW_FAILFAST_TRANSPORT) |
29024 (1 << BIO_RW_FAILFAST_DRIVER));
ea04106b
AX
29025
29026 ;
29027 return 0;
29028}
29029
29030_ACEOF
29031
29032
29033
29034cat - <<_ACEOF >conftest.h
29035
29036_ACEOF
29037
29038
29039 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29040 echo "obj-m := conftest.o" >build/Makefile
29041 modpost_flag=''
29042 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29043 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29045 (eval $ac_try) 2>&5
29046 ac_status=$?
3d248aec
AX
29047 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29048 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29050 (eval $ac_try) 2>&5
29051 ac_status=$?
3d248aec
AX
29052 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29053 (exit $ac_status); }; }; then
ea04106b 29054
3d248aec 29055 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 29056$as_echo "yes" >&6; }
ea04106b 29057
3d248aec
AX
29058cat >>confdefs.h <<\_ACEOF
29059#define HAVE_BIO_RW_FAILFAST_DTD 1
29060_ACEOF
4d815aed 29061
4d815aed 29062
68d83c55
AX
29063else
29064 $as_echo "$as_me: failed program was:" >&5
29065sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 29066
3d248aec 29067 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 29068$as_echo "no" >&6; }
ea04106b 29069
ea04106b
AX
29070
29071
68d83c55 29072fi
3d248aec 29073
68d83c55 29074 rm -Rf build
ea04106b 29075
4d815aed
AX
29076
29077
4d815aed 29078
3d248aec 29079 { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5
68d83c55 29080$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
ea04106b
AX
29081
29082
29083cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29084/* confdefs.h. */
29085_ACEOF
29086cat confdefs.h >>conftest.$ac_ext
29087cat >>conftest.$ac_ext <<_ACEOF
29088/* end confdefs.h. */
ea04106b
AX
29089
29090
68d83c55 29091 #include <linux/bio.h>
ea04106b
AX
29092
29093int
29094main (void)
29095{
29096
68d83c55
AX
29097 int flags __attribute__ ((unused));
29098 flags = REQ_FAILFAST_MASK;
ea04106b
AX
29099
29100 ;
29101 return 0;
29102}
29103
29104_ACEOF
29105
29106
29107
29108cat - <<_ACEOF >conftest.h
29109
29110_ACEOF
29111
29112
29113 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29114 echo "obj-m := conftest.o" >build/Makefile
29115 modpost_flag=''
29116 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29117 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29119 (eval $ac_try) 2>&5
29120 ac_status=$?
3d248aec
AX
29121 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29122 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29124 (eval $ac_try) 2>&5
29125 ac_status=$?
3d248aec
AX
29126 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29127 (exit $ac_status); }; }; then
ea04106b 29128
3d248aec 29129 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 29130$as_echo "yes" >&6; }
4d815aed 29131
3d248aec
AX
29132cat >>confdefs.h <<\_ACEOF
29133#define HAVE_REQ_FAILFAST_MASK 1
29134_ACEOF
4d815aed 29135
4d815aed 29136
68d83c55
AX
29137else
29138 $as_echo "$as_me: failed program was:" >&5
29139sed 's/^/| /' conftest.$ac_ext >&5
4d815aed 29140
3d248aec 29141 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed
AX
29142$as_echo "no" >&6; }
29143
4d815aed 29144
4d815aed 29145
68d83c55 29146fi
3d248aec 29147
68d83c55 29148 rm -Rf build
4d815aed 29149
4d815aed
AX
29150
29151
29152
3d248aec 29153 { $as_echo "$as_me:$LINENO: checking whether REQ_OP_DISCARD is defined" >&5
68d83c55 29154$as_echo_n "checking whether REQ_OP_DISCARD is defined... " >&6; }
ea04106b
AX
29155
29156
29157cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29158/* confdefs.h. */
29159_ACEOF
29160cat confdefs.h >>conftest.$ac_ext
29161cat >>conftest.$ac_ext <<_ACEOF
29162/* end confdefs.h. */
ea04106b
AX
29163
29164
68d83c55 29165 #include <linux/blk_types.h>
ea04106b
AX
29166
29167int
29168main (void)
29169{
29170
68d83c55 29171 int op __attribute__ ((unused)) = REQ_OP_DISCARD;
ea04106b
AX
29172
29173 ;
29174 return 0;
29175}
29176
29177_ACEOF
29178
29179
29180
29181cat - <<_ACEOF >conftest.h
29182
29183_ACEOF
29184
29185
29186 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29187 echo "obj-m := conftest.o" >build/Makefile
29188 modpost_flag=''
29189 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29190 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29192 (eval $ac_try) 2>&5
29193 ac_status=$?
3d248aec
AX
29194 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29195 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29197 (eval $ac_try) 2>&5
29198 ac_status=$?
3d248aec
AX
29199 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29200 (exit $ac_status); }; }; then
ea04106b 29201
3d248aec 29202 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
29203$as_echo "yes" >&6; }
29204
3d248aec
AX
29205cat >>confdefs.h <<\_ACEOF
29206#define HAVE_REQ_OP_DISCARD 1
29207_ACEOF
ea04106b
AX
29208
29209
29210else
29211 $as_echo "$as_me: failed program was:" >&5
29212sed 's/^/| /' conftest.$ac_ext >&5
29213
3d248aec 29214 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 29215$as_echo "no" >&6; }
ea04106b
AX
29216
29217
e10b0808
AX
29218
29219fi
3d248aec 29220
e10b0808
AX
29221 rm -Rf build
29222
29223
29224
29225
3d248aec 29226 { $as_echo "$as_me:$LINENO: checking whether REQ_OP_SECURE_ERASE is defined" >&5
68d83c55 29227$as_echo_n "checking whether REQ_OP_SECURE_ERASE is defined... " >&6; }
ea04106b
AX
29228
29229
29230cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29231/* confdefs.h. */
29232_ACEOF
29233cat confdefs.h >>conftest.$ac_ext
29234cat >>conftest.$ac_ext <<_ACEOF
29235/* end confdefs.h. */
ea04106b
AX
29236
29237
68d83c55 29238 #include <linux/blk_types.h>
e10b0808 29239
ea04106b
AX
29240int
29241main (void)
29242{
29243
68d83c55 29244 int op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
ea04106b
AX
29245
29246 ;
29247 return 0;
29248}
29249
29250_ACEOF
29251
29252
29253
29254cat - <<_ACEOF >conftest.h
29255
29256_ACEOF
29257
29258
29259 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29260 echo "obj-m := conftest.o" >build/Makefile
29261 modpost_flag=''
29262 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29263 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29265 (eval $ac_try) 2>&5
29266 ac_status=$?
3d248aec
AX
29267 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29268 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29270 (eval $ac_try) 2>&5
29271 ac_status=$?
3d248aec
AX
29272 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29273 (exit $ac_status); }; }; then
ea04106b 29274
3d248aec 29275 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 29276$as_echo "yes" >&6; }
ea04106b 29277
3d248aec
AX
29278cat >>confdefs.h <<\_ACEOF
29279#define HAVE_REQ_OP_SECURE_ERASE 1
29280_ACEOF
ea04106b
AX
29281
29282
29283else
29284 $as_echo "$as_me: failed program was:" >&5
29285sed 's/^/| /' conftest.$ac_ext >&5
29286
3d248aec 29287 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 29288$as_echo "no" >&6; }
ea04106b
AX
29289
29290
29291
29292fi
3d248aec 29293
ea04106b
AX
29294 rm -Rf build
29295
29296
29297
29298
3d248aec 29299 { $as_echo "$as_me:$LINENO: checking whether REQ_OP_FLUSH is defined" >&5
68d83c55 29300$as_echo_n "checking whether REQ_OP_FLUSH is defined... " >&6; }
ea04106b
AX
29301
29302
29303cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29304/* confdefs.h. */
29305_ACEOF
29306cat confdefs.h >>conftest.$ac_ext
29307cat >>conftest.$ac_ext <<_ACEOF
29308/* end confdefs.h. */
ea04106b
AX
29309
29310
68d83c55 29311 #include <linux/blk_types.h>
ea04106b 29312
ea04106b
AX
29313int
29314main (void)
29315{
29316
68d83c55 29317 int op __attribute__ ((unused)) = REQ_OP_FLUSH;
ea04106b
AX
29318
29319 ;
29320 return 0;
29321}
29322
29323_ACEOF
29324
29325
29326
29327cat - <<_ACEOF >conftest.h
29328
29329_ACEOF
29330
29331
29332 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29333 echo "obj-m := conftest.o" >build/Makefile
29334 modpost_flag=''
29335 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29336 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29338 (eval $ac_try) 2>&5
29339 ac_status=$?
3d248aec
AX
29340 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29341 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29343 (eval $ac_try) 2>&5
29344 ac_status=$?
3d248aec
AX
29345 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29346 (exit $ac_status); }; }; then
ea04106b 29347
3d248aec 29348 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 29349$as_echo "yes" >&6; }
ea04106b 29350
3d248aec
AX
29351cat >>confdefs.h <<\_ACEOF
29352#define HAVE_REQ_OP_FLUSH 1
29353_ACEOF
87dac73d
AX
29354
29355
29356else
29357 $as_echo "$as_me: failed program was:" >&5
29358sed 's/^/| /' conftest.$ac_ext >&5
29359
3d248aec 29360 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
29361$as_echo "no" >&6; }
29362
29363
29364
29365fi
3d248aec 29366
87dac73d
AX
29367 rm -Rf build
29368
29369
87dac73d
AX
29370
29371
3d248aec 29372 { $as_echo "$as_me:$LINENO: checking whether bio->bi_opf is defined" >&5
68d83c55 29373$as_echo_n "checking whether bio->bi_opf is defined... " >&6; }
87dac73d
AX
29374
29375
29376cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29377/* confdefs.h. */
29378_ACEOF
29379cat confdefs.h >>conftest.$ac_ext
29380cat >>conftest.$ac_ext <<_ACEOF
29381/* end confdefs.h. */
87dac73d
AX
29382
29383
29384 #include <linux/bio.h>
29385
29386int
29387main (void)
29388{
29389
68d83c55
AX
29390 struct bio bio __attribute__ ((unused));
29391 bio.bi_opf = 0;
87dac73d
AX
29392
29393 ;
29394 return 0;
29395}
29396
29397_ACEOF
29398
29399
29400
29401cat - <<_ACEOF >conftest.h
29402
29403_ACEOF
29404
29405
29406 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29407 echo "obj-m := conftest.o" >build/Makefile
29408 modpost_flag=''
29409 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29410 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
29412 (eval $ac_try) 2>&5
29413 ac_status=$?
3d248aec
AX
29414 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29415 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
29417 (eval $ac_try) 2>&5
29418 ac_status=$?
3d248aec
AX
29419 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29420 (exit $ac_status); }; }; then
87dac73d 29421
3d248aec 29422 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
29423$as_echo "yes" >&6; }
29424
3d248aec
AX
29425cat >>confdefs.h <<\_ACEOF
29426#define HAVE_BIO_BI_OPF 1
29427_ACEOF
87dac73d
AX
29428
29429
29430else
29431 $as_echo "$as_me: failed program was:" >&5
29432sed 's/^/| /' conftest.$ac_ext >&5
29433
3d248aec 29434 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
29435$as_echo "no" >&6; }
29436
29437
29438
29439fi
3d248aec 29440
87dac73d
AX
29441 rm -Rf build
29442
29443
29444
29445
3d248aec 29446 { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 1 arg" >&5
68d83c55 29447$as_echo_n "checking whether bio_end_io_t wants 1 arg... " >&6; }
87dac73d
AX
29448
29449
29450cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29451/* confdefs.h. */
29452_ACEOF
29453cat confdefs.h >>conftest.$ac_ext
29454cat >>conftest.$ac_ext <<_ACEOF
29455/* end confdefs.h. */
87dac73d
AX
29456
29457
29458 #include <linux/bio.h>
29459
68d83c55
AX
29460 void wanted_end_io(struct bio *bio) { return; }
29461
29462 bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
29463
87dac73d
AX
29464int
29465main (void)
29466{
29467
87dac73d
AX
29468
29469 ;
29470 return 0;
29471}
29472
29473_ACEOF
29474
29475
29476
29477cat - <<_ACEOF >conftest.h
29478
29479_ACEOF
29480
29481
29482 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29483 echo "obj-m := conftest.o" >build/Makefile
29484 modpost_flag=''
29485 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29486 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
29488 (eval $ac_try) 2>&5
29489 ac_status=$?
3d248aec
AX
29490 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29491 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
29493 (eval $ac_try) 2>&5
29494 ac_status=$?
3d248aec
AX
29495 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29496 (exit $ac_status); }; }; then
87dac73d 29497
3d248aec 29498 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
29499$as_echo "yes" >&6; }
29500
3d248aec
AX
29501cat >>confdefs.h <<\_ACEOF
29502#define HAVE_1ARG_BIO_END_IO_T 1
29503_ACEOF
ea04106b
AX
29504
29505
29506else
29507 $as_echo "$as_me: failed program was:" >&5
29508sed 's/^/| /' conftest.$ac_ext >&5
29509
3d248aec 29510 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 29511$as_echo "no" >&6; }
ea04106b
AX
29512
29513
29514
29515fi
3d248aec 29516
ea04106b
AX
29517 rm -Rf build
29518
29519
29520
4d815aed 29521
3d248aec 29522 { $as_echo "$as_me:$LINENO: checking whether BIO_RW_BARRIER is defined" >&5
68d83c55 29523$as_echo_n "checking whether BIO_RW_BARRIER is defined... " >&6; }
ea04106b
AX
29524
29525
29526cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29527/* confdefs.h. */
29528_ACEOF
29529cat confdefs.h >>conftest.$ac_ext
29530cat >>conftest.$ac_ext <<_ACEOF
29531/* end confdefs.h. */
ea04106b
AX
29532
29533
4d815aed 29534 #include <linux/bio.h>
ea04106b
AX
29535
29536int
29537main (void)
29538{
29539
87dac73d 29540 int flags __attribute__ ((unused));
68d83c55 29541 flags = BIO_RW_BARRIER;
ea04106b
AX
29542
29543 ;
29544 return 0;
29545}
29546
29547_ACEOF
29548
29549
29550
29551cat - <<_ACEOF >conftest.h
29552
29553_ACEOF
29554
29555
29556 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29557 echo "obj-m := conftest.o" >build/Makefile
29558 modpost_flag=''
29559 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29560 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29562 (eval $ac_try) 2>&5
29563 ac_status=$?
3d248aec
AX
29564 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29565 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29567 (eval $ac_try) 2>&5
29568 ac_status=$?
3d248aec
AX
29569 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29570 (exit $ac_status); }; }; then
ea04106b 29571
3d248aec 29572 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
29573$as_echo "yes" >&6; }
29574
3d248aec
AX
29575cat >>confdefs.h <<\_ACEOF
29576#define HAVE_BIO_RW_BARRIER 1
29577_ACEOF
ea04106b
AX
29578
29579
29580else
29581 $as_echo "$as_me: failed program was:" >&5
29582sed 's/^/| /' conftest.$ac_ext >&5
29583
3d248aec 29584 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
29585$as_echo "no" >&6; }
29586
29587
29588
29589fi
3d248aec 29590
ea04106b
AX
29591 rm -Rf build
29592
29593
29594
29595
3d248aec 29596 { $as_echo "$as_me:$LINENO: checking whether BIO_RW_DISCARD is defined" >&5
68d83c55 29597$as_echo_n "checking whether BIO_RW_DISCARD is defined... " >&6; }
ea04106b
AX
29598
29599
29600cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29601/* confdefs.h. */
29602_ACEOF
29603cat confdefs.h >>conftest.$ac_ext
29604cat >>conftest.$ac_ext <<_ACEOF
29605/* end confdefs.h. */
ea04106b
AX
29606
29607
68d83c55 29608 #include <linux/bio.h>
ea04106b
AX
29609
29610int
29611main (void)
29612{
29613
68d83c55
AX
29614 int flags __attribute__ ((unused));
29615 flags = BIO_RW_DISCARD;
ea04106b
AX
29616
29617 ;
29618 return 0;
29619}
29620
29621_ACEOF
29622
29623
29624
29625cat - <<_ACEOF >conftest.h
29626
29627_ACEOF
29628
29629
29630 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29631 echo "obj-m := conftest.o" >build/Makefile
29632 modpost_flag=''
29633 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29634 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29636 (eval $ac_try) 2>&5
29637 ac_status=$?
3d248aec
AX
29638 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29639 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
29641 (eval $ac_try) 2>&5
29642 ac_status=$?
3d248aec
AX
29643 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29644 (exit $ac_status); }; }; then
ea04106b 29645
3d248aec 29646 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
29647$as_echo "yes" >&6; }
29648
3d248aec
AX
29649cat >>confdefs.h <<\_ACEOF
29650#define HAVE_BIO_RW_DISCARD 1
29651_ACEOF
ea04106b
AX
29652
29653
29654else
29655 $as_echo "$as_me: failed program was:" >&5
29656sed 's/^/| /' conftest.$ac_ext >&5
29657
3d248aec 29658 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
29659$as_echo "no" >&6; }
29660
29661
29662
29663fi
3d248aec 29664
ea04106b
AX
29665 rm -Rf build
29666
29667
29668
29669
3d248aec 29670 { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5
68d83c55
AX
29671$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
29672 tmp_flags="$EXTRA_KCFLAGS"
29673 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
87dac73d
AX
29674
29675
29676cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29677/* confdefs.h. */
29678_ACEOF
29679cat confdefs.h >>conftest.$ac_ext
29680cat >>conftest.$ac_ext <<_ACEOF
29681/* end confdefs.h. */
87dac73d
AX
29682
29683
68d83c55 29684 #include <linux/blkdev.h>
87dac73d
AX
29685
29686int
29687main (void)
29688{
29689
68d83c55
AX
29690 struct request_queue *q = NULL;
29691 (void) blk_queue_flush(q, REQ_FLUSH);
87dac73d
AX
29692
29693 ;
29694 return 0;
29695}
29696
29697_ACEOF
29698
29699
29700
29701cat - <<_ACEOF >conftest.h
29702
29703_ACEOF
29704
29705
29706 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29707 echo "obj-m := conftest.o" >build/Makefile
29708 modpost_flag=''
29709 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29710 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
29712 (eval $ac_try) 2>&5
29713 ac_status=$?
3d248aec
AX
29714 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29715 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29716 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
29717 (eval $ac_try) 2>&5
29718 ac_status=$?
3d248aec
AX
29719 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29720 (exit $ac_status); }; }; then
87dac73d 29721
3d248aec 29722 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
29723$as_echo "yes" >&6; }
29724
3d248aec
AX
29725cat >>confdefs.h <<\_ACEOF
29726#define HAVE_BLK_QUEUE_FLUSH 1
29727_ACEOF
68d83c55
AX
29728
29729
3d248aec 29730 { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5
68d83c55
AX
29731$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
29732
29733
29734cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29735/* confdefs.h. */
29736_ACEOF
29737cat confdefs.h >>conftest.$ac_ext
29738cat >>conftest.$ac_ext <<_ACEOF
29739/* end confdefs.h. */
68d83c55
AX
29740
29741
29742 #include <linux/module.h>
29743 #include <linux/blkdev.h>
29744
29745 MODULE_LICENSE("$ZFS_META_LICENSE");
29746
29747int
29748main (void)
29749{
29750
29751 struct request_queue *q = NULL;
29752 (void) blk_queue_flush(q, REQ_FLUSH);
29753
29754 ;
29755 return 0;
29756}
29757
29758_ACEOF
29759
29760
29761
29762cat - <<_ACEOF >conftest.h
29763
29764_ACEOF
29765
29766
29767 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29768 echo "obj-m := conftest.o" >build/Makefile
29769 modpost_flag=''
29770 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29771 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
29773 (eval $ac_try) 2>&5
29774 ac_status=$?
3d248aec
AX
29775 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29776 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
29778 (eval $ac_try) 2>&5
29779 ac_status=$?
3d248aec
AX
29780 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29781 (exit $ac_status); }; }; then
68d83c55 29782
3d248aec 29783 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
29784$as_echo "no" >&6; }
29785
29786else
29787 $as_echo "$as_me: failed program was:" >&5
29788sed 's/^/| /' conftest.$ac_ext >&5
29789
3d248aec 29790 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
29791$as_echo "yes" >&6; }
29792
3d248aec
AX
29793cat >>confdefs.h <<\_ACEOF
29794#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1
29795_ACEOF
68d83c55
AX
29796
29797
29798
29799
29800fi
3d248aec 29801
68d83c55
AX
29802 rm -Rf build
29803
87dac73d
AX
29804
29805
29806else
29807 $as_echo "$as_me: failed program was:" >&5
29808sed 's/^/| /' conftest.$ac_ext >&5
29809
3d248aec 29810 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
29811$as_echo "no" >&6; }
29812
29813
29814
29815fi
3d248aec 29816
87dac73d
AX
29817 rm -Rf build
29818
29819
29820
3d248aec 29821 { $as_echo "$as_me:$LINENO: checking whether blk_queue_write_cache() exists" >&5
68d83c55 29822$as_echo_n "checking whether blk_queue_write_cache() exists... " >&6; }
87dac73d
AX
29823
29824
29825cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29826/* confdefs.h. */
29827_ACEOF
29828cat confdefs.h >>conftest.$ac_ext
29829cat >>conftest.$ac_ext <<_ACEOF
29830/* end confdefs.h. */
87dac73d
AX
29831
29832
68d83c55
AX
29833 #include <linux/kernel.h>
29834 #include <linux/blkdev.h>
29835
87dac73d
AX
29836
29837int
29838main (void)
29839{
29840
68d83c55
AX
29841 struct request_queue *q = NULL;
29842 blk_queue_write_cache(q, true, true);
87dac73d
AX
29843
29844 ;
29845 return 0;
29846}
29847
29848_ACEOF
29849
29850
29851
29852cat - <<_ACEOF >conftest.h
29853
29854_ACEOF
29855
29856
29857 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29858 echo "obj-m := conftest.o" >build/Makefile
29859 modpost_flag=''
29860 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29861 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
29863 (eval $ac_try) 2>&5
29864 ac_status=$?
3d248aec
AX
29865 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29866 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
29868 (eval $ac_try) 2>&5
29869 ac_status=$?
3d248aec
AX
29870 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29871 (exit $ac_status); }; }; then
87dac73d 29872
3d248aec 29873 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
29874$as_echo "yes" >&6; }
29875
3d248aec
AX
29876cat >>confdefs.h <<\_ACEOF
29877#define HAVE_BLK_QUEUE_WRITE_CACHE 1
29878_ACEOF
68d83c55
AX
29879
29880
3d248aec 29881 { $as_echo "$as_me:$LINENO: checking whether blk_queue_write_cache() is GPL-only" >&5
68d83c55
AX
29882$as_echo_n "checking whether blk_queue_write_cache() is GPL-only... " >&6; }
29883
29884
29885cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29886/* confdefs.h. */
29887_ACEOF
29888cat confdefs.h >>conftest.$ac_ext
29889cat >>conftest.$ac_ext <<_ACEOF
29890/* end confdefs.h. */
68d83c55
AX
29891
29892
29893 #include <linux/kernel.h>
29894 #include <linux/module.h>
29895 #include <linux/blkdev.h>
29896
29897 MODULE_LICENSE("$ZFS_META_LICENSE");
29898
29899int
29900main (void)
29901{
29902
29903 struct request_queue *q = NULL;
29904 blk_queue_write_cache(q, true, true);
29905
29906 ;
29907 return 0;
29908}
29909
29910_ACEOF
29911
29912
29913
29914cat - <<_ACEOF >conftest.h
29915
29916_ACEOF
29917
29918
29919 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
29920 echo "obj-m := conftest.o" >build/Makefile
29921 modpost_flag=''
29922 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
29923 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 29924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
29925 (eval $ac_try) 2>&5
29926 ac_status=$?
3d248aec
AX
29927 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29928 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
29929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
29930 (eval $ac_try) 2>&5
29931 ac_status=$?
3d248aec
AX
29932 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
29933 (exit $ac_status); }; }; then
68d83c55 29934
3d248aec 29935 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
29936$as_echo "no" >&6; }
29937
29938else
29939 $as_echo "$as_me: failed program was:" >&5
29940sed 's/^/| /' conftest.$ac_ext >&5
29941
3d248aec 29942 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
29943$as_echo "yes" >&6; }
29944
3d248aec
AX
29945cat >>confdefs.h <<\_ACEOF
29946#define HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY 1
29947_ACEOF
68d83c55
AX
29948
29949
29950
29951
29952fi
3d248aec 29953
68d83c55
AX
29954 rm -Rf build
29955
87dac73d
AX
29956
29957
29958else
29959 $as_echo "$as_me: failed program was:" >&5
29960sed 's/^/| /' conftest.$ac_ext >&5
29961
3d248aec 29962 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
29963$as_echo "no" >&6; }
29964
29965
29966
29967fi
3d248aec 29968
87dac73d
AX
29969 rm -Rf build
29970
29971
29972
68d83c55 29973 EXTRA_KCFLAGS="$tmp_flags"
87dac73d 29974
68d83c55 29975
3d248aec 29976 { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5
68d83c55
AX
29977$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
29978 tmp_flags="$EXTRA_KCFLAGS"
29979 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
29980
29981
29982cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
29983/* confdefs.h. */
29984_ACEOF
29985cat confdefs.h >>conftest.$ac_ext
29986cat >>conftest.$ac_ext <<_ACEOF
29987/* end confdefs.h. */
ea04106b
AX
29988
29989
68d83c55 29990 #include <linux/blkdev.h>
ea04106b
AX
29991
29992int
29993main (void)
29994{
29995
68d83c55
AX
29996 struct request_queue *q = NULL;
29997 (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
ea04106b
AX
29998
29999 ;
30000 return 0;
30001}
30002
30003_ACEOF
30004
30005
30006
30007cat - <<_ACEOF >conftest.h
30008
30009_ACEOF
30010
30011
30012 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30013 echo "obj-m := conftest.o" >build/Makefile
30014 modpost_flag=''
30015 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30016 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30018 (eval $ac_try) 2>&5
30019 ac_status=$?
3d248aec
AX
30020 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30021 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30023 (eval $ac_try) 2>&5
30024 ac_status=$?
3d248aec
AX
30025 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30026 (exit $ac_status); }; }; then
ea04106b 30027
3d248aec 30028 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
30029$as_echo "yes" >&6; }
30030
3d248aec
AX
30031cat >>confdefs.h <<\_ACEOF
30032#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1
30033_ACEOF
ea04106b
AX
30034
30035
30036else
30037 $as_echo "$as_me: failed program was:" >&5
30038sed 's/^/| /' conftest.$ac_ext >&5
30039
3d248aec 30040 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
30041$as_echo "no" >&6; }
30042
30043
30044
30045fi
3d248aec 30046
ea04106b
AX
30047 rm -Rf build
30048
30049
68d83c55 30050 EXTRA_KCFLAGS="$tmp_flags"
ea04106b
AX
30051
30052
3d248aec 30053 { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5
68d83c55
AX
30054$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
30055 tmp_flags="$EXTRA_KCFLAGS"
30056 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
30057
30058
30059cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30060/* confdefs.h. */
30061_ACEOF
30062cat confdefs.h >>conftest.$ac_ext
30063cat >>conftest.$ac_ext <<_ACEOF
30064/* end confdefs.h. */
ea04106b
AX
30065
30066
68d83c55 30067 #include <linux/blkdev.h>
ea04106b
AX
30068
30069int
30070main (void)
30071{
30072
68d83c55
AX
30073 struct request_queue *q = NULL;
30074 (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
ea04106b
AX
30075
30076 ;
30077 return 0;
30078}
30079
30080_ACEOF
30081
30082
30083
30084cat - <<_ACEOF >conftest.h
30085
30086_ACEOF
30087
30088
30089 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30090 echo "obj-m := conftest.o" >build/Makefile
30091 modpost_flag=''
30092 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30093 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30095 (eval $ac_try) 2>&5
30096 ac_status=$?
3d248aec
AX
30097 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30098 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30100 (eval $ac_try) 2>&5
30101 ac_status=$?
3d248aec
AX
30102 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30103 (exit $ac_status); }; }; then
ea04106b 30104
3d248aec 30105 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 30106$as_echo "yes" >&6; }
ea04106b 30107
3d248aec
AX
30108cat >>confdefs.h <<\_ACEOF
30109#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1
30110_ACEOF
e10b0808 30111
ea04106b 30112
4d815aed
AX
30113else
30114 $as_echo "$as_me: failed program was:" >&5
30115sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 30116
3d248aec 30117 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 30118$as_echo "no" >&6; }
ea04106b 30119
ea04106b 30120
ea04106b 30121
4d815aed 30122fi
3d248aec 30123
4d815aed 30124 rm -Rf build
ea04106b 30125
ea04106b 30126
68d83c55 30127 EXTRA_KCFLAGS="$tmp_flags"
ea04106b 30128
ea04106b 30129
3d248aec 30130 { $as_echo "$as_me:$LINENO: checking whether the BIO_RW_UNPLUG enum is available" >&5
68d83c55
AX
30131$as_echo_n "checking whether the BIO_RW_UNPLUG enum is available... " >&6; }
30132 tmp_flags="$EXTRA_KCFLAGS"
30133 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
e10b0808
AX
30134
30135
30136cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30137/* confdefs.h. */
30138_ACEOF
30139cat confdefs.h >>conftest.$ac_ext
30140cat >>conftest.$ac_ext <<_ACEOF
30141/* end confdefs.h. */
e10b0808
AX
30142
30143
68d83c55 30144 #include <linux/blkdev.h>
ea04106b
AX
30145
30146int
30147main (void)
30148{
30149
68d83c55
AX
30150 extern enum bio_rw_flags rw;
30151
30152 rw = BIO_RW_UNPLUG;
ea04106b
AX
30153
30154 ;
30155 return 0;
30156}
30157
30158_ACEOF
30159
30160
30161
30162cat - <<_ACEOF >conftest.h
30163
30164_ACEOF
30165
30166
30167 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30168 echo "obj-m := conftest.o" >build/Makefile
30169 modpost_flag=''
30170 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30171 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30173 (eval $ac_try) 2>&5
30174 ac_status=$?
3d248aec
AX
30175 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30176 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30178 (eval $ac_try) 2>&5
30179 ac_status=$?
3d248aec
AX
30180 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30181 (exit $ac_status); }; }; then
e10b0808 30182
3d248aec 30183 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 30184$as_echo "yes" >&6; }
e10b0808 30185
3d248aec
AX
30186cat >>confdefs.h <<\_ACEOF
30187#define HAVE_BLK_QUEUE_HAVE_BIO_RW_UNPLUG 1
30188_ACEOF
ea04106b 30189
ea04106b 30190
4d815aed
AX
30191else
30192 $as_echo "$as_me: failed program was:" >&5
30193sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 30194
3d248aec 30195 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 30196$as_echo "no" >&6; }
ea04106b 30197
ea04106b 30198
ea04106b 30199
4d815aed 30200fi
3d248aec 30201
4d815aed 30202 rm -Rf build
ea04106b 30203
ea04106b 30204
68d83c55 30205 EXTRA_KCFLAGS="$tmp_flags"
ea04106b 30206
e10b0808 30207
3d248aec 30208 { $as_echo "$as_me:$LINENO: checking whether struct blk_plug is available" >&5
68d83c55
AX
30209$as_echo_n "checking whether struct blk_plug is available... " >&6; }
30210 tmp_flags="$EXTRA_KCFLAGS"
30211 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
30212
30213
30214cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30215/* confdefs.h. */
30216_ACEOF
30217cat confdefs.h >>conftest.$ac_ext
30218cat >>conftest.$ac_ext <<_ACEOF
30219/* end confdefs.h. */
ea04106b
AX
30220
30221
68d83c55 30222 #include <linux/blkdev.h>
ea04106b
AX
30223
30224int
30225main (void)
30226{
30227
68d83c55
AX
30228 struct blk_plug plug;
30229
30230 blk_start_plug(&plug);
30231 blk_finish_plug(&plug);
ea04106b
AX
30232
30233 ;
30234 return 0;
30235}
30236
30237_ACEOF
30238
30239
30240
30241cat - <<_ACEOF >conftest.h
30242
30243_ACEOF
30244
30245
30246 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30247 echo "obj-m := conftest.o" >build/Makefile
30248 modpost_flag=''
30249 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30250 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30251 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30252 (eval $ac_try) 2>&5
30253 ac_status=$?
3d248aec
AX
30254 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30255 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30257 (eval $ac_try) 2>&5
30258 ac_status=$?
3d248aec
AX
30259 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30260 (exit $ac_status); }; }; then
ea04106b 30261
3d248aec 30262 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 30263$as_echo "yes" >&6; }
ea04106b 30264
3d248aec
AX
30265cat >>confdefs.h <<\_ACEOF
30266#define HAVE_BLK_QUEUE_HAVE_BLK_PLUG 1
30267_ACEOF
e10b0808 30268
e10b0808 30269
4d815aed
AX
30270else
30271 $as_echo "$as_me: failed program was:" >&5
30272sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 30273
3d248aec 30274 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
30275$as_echo "no" >&6; }
30276
e10b0808 30277
ea04106b 30278
4d815aed 30279fi
3d248aec 30280
4d815aed 30281 rm -Rf build
ea04106b 30282
ea04106b 30283
68d83c55 30284 EXTRA_KCFLAGS="$tmp_flags"
ea04106b
AX
30285
30286
3d248aec 30287 { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5
68d83c55 30288$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
4d815aed
AX
30289 tmp_flags="$EXTRA_KCFLAGS"
30290 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
ea04106b
AX
30291
30292
30293cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30294/* confdefs.h. */
30295_ACEOF
30296cat confdefs.h >>conftest.$ac_ext
30297cat >>conftest.$ac_ext <<_ACEOF
30298/* end confdefs.h. */
ea04106b
AX
30299
30300
4d815aed 30301 #include <linux/blkdev.h>
ea04106b
AX
30302
30303int
30304main (void)
30305{
30306
68d83c55
AX
30307 struct gendisk *disk = NULL;
30308 (void) get_disk_ro(disk);
ea04106b
AX
30309
30310 ;
30311 return 0;
30312}
30313
30314_ACEOF
30315
30316
30317
30318cat - <<_ACEOF >conftest.h
30319
30320_ACEOF
30321
30322
30323 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30324 echo "obj-m := conftest.o" >build/Makefile
30325 modpost_flag=''
30326 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30327 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30329 (eval $ac_try) 2>&5
30330 ac_status=$?
3d248aec
AX
30331 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30332 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30334 (eval $ac_try) 2>&5
30335 ac_status=$?
3d248aec
AX
30336 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30337 (exit $ac_status); }; }; then
ea04106b 30338
3d248aec 30339 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
30340$as_echo "yes" >&6; }
30341
3d248aec
AX
30342cat >>confdefs.h <<\_ACEOF
30343#define HAVE_GET_DISK_RO 1
30344_ACEOF
e10b0808 30345
ea04106b 30346
68d83c55
AX
30347else
30348 $as_echo "$as_me: failed program was:" >&5
30349sed 's/^/| /' conftest.$ac_ext >&5
87dac73d 30350
3d248aec 30351 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 30352$as_echo "no" >&6; }
87dac73d 30353
87dac73d
AX
30354
30355
68d83c55 30356fi
3d248aec 30357
68d83c55 30358 rm -Rf build
87dac73d 30359
68d83c55
AX
30360
30361 EXTRA_KCFLAGS="$tmp_flags"
30362
3d248aec 30363 { $as_echo "$as_me:$LINENO: checking whether get_gendisk() is available" >&5
68d83c55
AX
30364$as_echo_n "checking whether get_gendisk() is available... " >&6; }
30365
30366
30367
30368cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30369/* confdefs.h. */
30370_ACEOF
30371cat confdefs.h >>conftest.$ac_ext
30372cat >>conftest.$ac_ext <<_ACEOF
30373/* end confdefs.h. */
68d83c55
AX
30374
30375
30376 #include <linux/genhd.h>
87dac73d
AX
30377
30378int
30379main (void)
30380{
30381
68d83c55 30382 get_gendisk(0, NULL);
87dac73d
AX
30383
30384 ;
30385 return 0;
30386}
30387
30388_ACEOF
30389
30390
30391
30392cat - <<_ACEOF >conftest.h
30393
30394_ACEOF
30395
30396
30397 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30398 echo "obj-m := conftest.o" >build/Makefile
30399 modpost_flag=''
30400 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30401 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
30403 (eval $ac_try) 2>&5
30404 ac_status=$?
3d248aec
AX
30405 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30406 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
30408 (eval $ac_try) 2>&5
30409 ac_status=$?
3d248aec
AX
30410 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30411 (exit $ac_status); }; }; then
68d83c55 30412 rc=0
87dac73d
AX
30413else
30414 $as_echo "$as_me: failed program was:" >&5
30415sed 's/^/| /' conftest.$ac_ext >&5
68d83c55 30416 rc=1
87dac73d 30417
87dac73d 30418
68d83c55 30419fi
3d248aec 30420
68d83c55 30421 rm -Rf build
87dac73d
AX
30422
30423
68d83c55 30424 if test $rc -ne 0; then :
87dac73d 30425
3d248aec 30426 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 30427$as_echo "no" >&6; }
87dac73d 30428
68d83c55
AX
30429 else
30430 if test "x$enable_linux_builtin" != xyes; then
87dac73d 30431
68d83c55
AX
30432 grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
30433 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
30434 rc=$?
30435 if test $rc -ne 0; then
30436 export=0
30437 for file in block/genhd.c; do
30438 grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
30439 "$LINUX/$file" 2>/dev/null
30440 rc=$?
30441 if test $rc -eq 0; then
30442 export=1
30443 break;
30444 fi
30445 done
30446 if test $export -eq 0; then :
30447 rc=1
30448 else :
30449 rc=0
30450 fi
30451 else :
30452 rc=0
30453 fi
87dac73d 30454
68d83c55
AX
30455 fi
30456 if test $rc -ne 0; then :
ea04106b 30457
3d248aec 30458 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 30459$as_echo "no" >&6; }
ea04106b 30460
68d83c55 30461 else :
ea04106b 30462
3d248aec 30463 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 30464$as_echo "yes" >&6; }
ea04106b 30465
3d248aec
AX
30466cat >>confdefs.h <<\_ACEOF
30467#define HAVE_GET_GENDISK 1
30468_ACEOF
ea04106b
AX
30469
30470
68d83c55
AX
30471 fi
30472 fi
ea04106b 30473
ea04106b
AX
30474
30475
3d248aec 30476 { $as_echo "$as_me:$LINENO: checking whether bio_set_op_attrs is available" >&5
68d83c55 30477$as_echo_n "checking whether bio_set_op_attrs is available... " >&6; }
ea04106b
AX
30478
30479
68d83c55 30480cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30481/* confdefs.h. */
30482_ACEOF
30483cat confdefs.h >>conftest.$ac_ext
30484cat >>conftest.$ac_ext <<_ACEOF
30485/* end confdefs.h. */
ea04106b 30486
4d815aed 30487
3d248aec 30488 #include <linux/bio.h>
68d83c55 30489
ea04106b
AX
30490int
30491main (void)
30492{
30493
68d83c55
AX
30494 struct bio *bio __attribute__ ((unused)) = NULL;
30495
30496 bio_set_op_attrs(bio, 0, 0);
87dac73d
AX
30497
30498 ;
30499 return 0;
30500}
30501
30502_ACEOF
30503
30504
30505
30506cat - <<_ACEOF >conftest.h
30507
30508_ACEOF
30509
30510
30511 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30512 echo "obj-m := conftest.o" >build/Makefile
30513 modpost_flag=''
30514 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30515 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
30517 (eval $ac_try) 2>&5
30518 ac_status=$?
3d248aec
AX
30519 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30520 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
30522 (eval $ac_try) 2>&5
30523 ac_status=$?
3d248aec
AX
30524 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30525 (exit $ac_status); }; }; then
87dac73d 30526
3d248aec 30527 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
30528$as_echo "yes" >&6; }
30529
3d248aec
AX
30530cat >>confdefs.h <<\_ACEOF
30531#define HAVE_BIO_SET_OP_ATTRS 1
30532_ACEOF
87dac73d
AX
30533
30534
68d83c55
AX
30535else
30536 $as_echo "$as_me: failed program was:" >&5
30537sed 's/^/| /' conftest.$ac_ext >&5
87dac73d 30538
3d248aec 30539 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 30540$as_echo "no" >&6; }
87dac73d 30541
87dac73d
AX
30542
30543
68d83c55 30544fi
3d248aec 30545
68d83c55 30546 rm -Rf build
87dac73d 30547
68d83c55
AX
30548
30549
30550
3d248aec 30551 { $as_echo "$as_me:$LINENO: checking whether generic_readlink is global" >&5
68d83c55
AX
30552$as_echo_n "checking whether generic_readlink is global... " >&6; }
30553
30554
30555cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30556/* confdefs.h. */
30557_ACEOF
30558cat confdefs.h >>conftest.$ac_ext
30559cat >>conftest.$ac_ext <<_ACEOF
30560/* end confdefs.h. */
68d83c55
AX
30561
30562
30563 #include <linux/fs.h>
87dac73d
AX
30564
30565int
30566main (void)
30567{
30568
68d83c55
AX
30569 int i __attribute__ ((unused));
30570
30571 i = generic_readlink(NULL, NULL, 0);
ea04106b
AX
30572
30573 ;
30574 return 0;
30575}
30576
30577_ACEOF
30578
30579
30580
30581cat - <<_ACEOF >conftest.h
30582
30583_ACEOF
30584
30585
30586 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30587 echo "obj-m := conftest.o" >build/Makefile
30588 modpost_flag=''
30589 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30590 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30592 (eval $ac_try) 2>&5
30593 ac_status=$?
3d248aec
AX
30594 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30595 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30597 (eval $ac_try) 2>&5
30598 ac_status=$?
3d248aec
AX
30599 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30600 (exit $ac_status); }; }; then
ea04106b 30601
3d248aec 30602 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
30603$as_echo "yes" >&6; }
30604
3d248aec
AX
30605cat >>confdefs.h <<\_ACEOF
30606#define HAVE_GENERIC_READLINK 1
30607_ACEOF
ea04106b 30608
87dac73d
AX
30609
30610else
30611 $as_echo "$as_me: failed program was:" >&5
30612sed 's/^/| /' conftest.$ac_ext >&5
30613
3d248aec 30614 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d
AX
30615$as_echo "no" >&6; }
30616
30617
30618
30619fi
3d248aec 30620
87dac73d
AX
30621 rm -Rf build
30622
30623
30624
ea04106b 30625
3d248aec 30626 { $as_echo "$as_me:$LINENO: checking whether ql->discard_granularity is available" >&5
68d83c55 30627$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
ea04106b
AX
30628
30629
30630cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30631/* confdefs.h. */
30632_ACEOF
30633cat confdefs.h >>conftest.$ac_ext
30634cat >>conftest.$ac_ext <<_ACEOF
30635/* end confdefs.h. */
ea04106b
AX
30636
30637
30638 #include <linux/blkdev.h>
30639
30640int
30641main (void)
30642{
30643
68d83c55
AX
30644 struct queue_limits ql __attribute__ ((unused));
30645
30646 ql.discard_granularity = 0;
ea04106b
AX
30647
30648 ;
30649 return 0;
30650}
30651
30652_ACEOF
30653
30654
30655
30656cat - <<_ACEOF >conftest.h
30657
30658_ACEOF
30659
30660
30661 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30662 echo "obj-m := conftest.o" >build/Makefile
30663 modpost_flag=''
30664 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30665 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30667 (eval $ac_try) 2>&5
30668 ac_status=$?
3d248aec
AX
30669 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30670 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30672 (eval $ac_try) 2>&5
30673 ac_status=$?
3d248aec
AX
30674 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30675 (exit $ac_status); }; }; then
ea04106b 30676
3d248aec 30677 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
30678$as_echo "yes" >&6; }
30679
3d248aec
AX
30680cat >>confdefs.h <<\_ACEOF
30681#define HAVE_DISCARD_GRANULARITY 1
30682_ACEOF
ea04106b
AX
30683
30684
30685else
30686 $as_echo "$as_me: failed program was:" >&5
30687sed 's/^/| /' conftest.$ac_ext >&5
30688
3d248aec 30689 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
30690$as_echo "no" >&6; }
30691
30692
30693
30694fi
3d248aec 30695
ea04106b
AX
30696 rm -Rf build
30697
30698
ea04106b
AX
30699
30700
3d248aec 30701 { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_handler" >&5
68d83c55 30702$as_echo_n "checking whether super_block uses const struct xattr_handler... " >&6; }
ea04106b
AX
30703
30704
30705cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30706/* confdefs.h. */
30707_ACEOF
30708cat confdefs.h >>conftest.$ac_ext
30709cat >>conftest.$ac_ext <<_ACEOF
30710/* end confdefs.h. */
ea04106b
AX
30711
30712
68d83c55
AX
30713 #include <linux/fs.h>
30714 #include <linux/xattr.h>
30715
30716 const struct xattr_handler xattr_test_handler = {
30717 .prefix = "test",
30718 .get = NULL,
30719 .set = NULL,
30720 };
30721
30722 const struct xattr_handler *xattr_handlers[] = {
30723 &xattr_test_handler,
30724 };
30725
30726 const struct super_block sb __attribute__ ((unused)) = {
30727 .s_xattr = xattr_handlers,
30728 };
ea04106b
AX
30729
30730int
30731main (void)
30732{
30733
ea04106b
AX
30734
30735 ;
30736 return 0;
30737}
30738
30739_ACEOF
30740
30741
30742
30743cat - <<_ACEOF >conftest.h
30744
30745_ACEOF
30746
30747
30748 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30749 echo "obj-m := conftest.o" >build/Makefile
30750 modpost_flag=''
30751 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30752 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30754 (eval $ac_try) 2>&5
30755 ac_status=$?
3d248aec
AX
30756 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30757 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30759 (eval $ac_try) 2>&5
30760 ac_status=$?
3d248aec
AX
30761 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30762 (exit $ac_status); }; }; then
ea04106b 30763
3d248aec 30764 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
30765$as_echo "yes" >&6; }
30766
3d248aec
AX
30767cat >>confdefs.h <<\_ACEOF
30768#define HAVE_CONST_XATTR_HANDLER 1
30769_ACEOF
ea04106b
AX
30770
30771
30772else
30773 $as_echo "$as_me: failed program was:" >&5
30774sed 's/^/| /' conftest.$ac_ext >&5
30775
3d248aec 30776 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
30777$as_echo "no" >&6; }
30778
30779
30780
30781fi
3d248aec 30782
ea04106b
AX
30783 rm -Rf build
30784
30785
ea04106b
AX
30786
30787
3d248aec 30788 { $as_echo "$as_me:$LINENO: checking whether xattr_handler has name" >&5
68d83c55 30789$as_echo_n "checking whether xattr_handler has name... " >&6; }
ea04106b
AX
30790
30791
30792cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30793/* confdefs.h. */
30794_ACEOF
30795cat confdefs.h >>conftest.$ac_ext
30796cat >>conftest.$ac_ext <<_ACEOF
30797/* end confdefs.h. */
ea04106b
AX
30798
30799
68d83c55
AX
30800 #include <linux/xattr.h>
30801
30802 static const struct xattr_handler
30803 xops __attribute__ ((unused)) = {
30804 .name = XATTR_NAME_POSIX_ACL_ACCESS,
30805 };
ea04106b
AX
30806
30807int
30808main (void)
30809{
30810
ea04106b
AX
30811
30812 ;
30813 return 0;
30814}
30815
30816_ACEOF
30817
30818
30819
30820cat - <<_ACEOF >conftest.h
30821
30822_ACEOF
30823
30824
30825 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30826 echo "obj-m := conftest.o" >build/Makefile
30827 modpost_flag=''
30828 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30829 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30831 (eval $ac_try) 2>&5
30832 ac_status=$?
3d248aec
AX
30833 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30834 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30836 (eval $ac_try) 2>&5
30837 ac_status=$?
3d248aec
AX
30838 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30839 (exit $ac_status); }; }; then
ea04106b 30840
3d248aec 30841 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
30842$as_echo "yes" >&6; }
30843
3d248aec
AX
30844cat >>confdefs.h <<\_ACEOF
30845#define HAVE_XATTR_HANDLER_NAME 1
30846_ACEOF
ea04106b
AX
30847
30848
30849else
30850 $as_echo "$as_me: failed program was:" >&5
30851sed 's/^/| /' conftest.$ac_ext >&5
30852
3d248aec 30853 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
30854$as_echo "no" >&6; }
30855
30856
30857
30858fi
3d248aec 30859
ea04106b
AX
30860 rm -Rf build
30861
30862
ea04106b
AX
30863
30864
3d248aec 30865 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants both dentry and inode" >&5
68d83c55 30866$as_echo_n "checking whether xattr_handler->get() wants both dentry and inode... " >&6; }
ea04106b
AX
30867
30868
30869cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30870/* confdefs.h. */
30871_ACEOF
30872cat confdefs.h >>conftest.$ac_ext
30873cat >>conftest.$ac_ext <<_ACEOF
30874/* end confdefs.h. */
ea04106b
AX
30875
30876
68d83c55
AX
30877 #include <linux/xattr.h>
30878
30879 int get(const struct xattr_handler *handler,
30880 struct dentry *dentry, struct inode *inode,
30881 const char *name, void *buffer, size_t size) { return 0; }
30882 static const struct xattr_handler
30883 xops __attribute__ ((unused)) = {
30884 .get = get,
30885 };
ea04106b
AX
30886
30887int
30888main (void)
30889{
30890
ea04106b
AX
30891
30892 ;
30893 return 0;
30894}
30895
30896_ACEOF
30897
30898
30899
30900cat - <<_ACEOF >conftest.h
30901
30902_ACEOF
30903
30904
30905 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30906 echo "obj-m := conftest.o" >build/Makefile
30907 modpost_flag=''
30908 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30909 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30911 (eval $ac_try) 2>&5
30912 ac_status=$?
3d248aec
AX
30913 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30914 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30916 (eval $ac_try) 2>&5
30917 ac_status=$?
3d248aec
AX
30918 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30919 (exit $ac_status); }; }; then
ea04106b 30920
3d248aec 30921 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 30922$as_echo "yes" >&6; }
ea04106b 30923
3d248aec
AX
30924cat >>confdefs.h <<\_ACEOF
30925#define HAVE_XATTR_GET_DENTRY_INODE 1
30926_ACEOF
ea04106b
AX
30927
30928
68d83c55
AX
30929else
30930 $as_echo "$as_me: failed program was:" >&5
30931sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 30932
3d248aec 30933 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants xattr_handler" >&5
68d83c55 30934$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
ea04106b 30935
e10b0808 30936
4d815aed 30937cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
30938/* confdefs.h. */
30939_ACEOF
30940cat confdefs.h >>conftest.$ac_ext
30941cat >>conftest.$ac_ext <<_ACEOF
30942/* end confdefs.h. */
e10b0808 30943
4d815aed 30944
68d83c55
AX
30945 #include <linux/xattr.h>
30946
30947 int get(const struct xattr_handler *handler,
30948 struct dentry *dentry, const char *name,
30949 void *buffer, size_t size) { return 0; }
30950 static const struct xattr_handler
30951 xops __attribute__ ((unused)) = {
30952 .get = get,
30953 };
ea04106b
AX
30954
30955int
30956main (void)
30957{
30958
ea04106b
AX
30959
30960 ;
30961 return 0;
30962}
30963
30964_ACEOF
30965
30966
30967
30968cat - <<_ACEOF >conftest.h
30969
30970_ACEOF
30971
30972
30973 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
30974 echo "obj-m := conftest.o" >build/Makefile
30975 modpost_flag=''
30976 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
30977 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 30978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30979 (eval $ac_try) 2>&5
30980 ac_status=$?
3d248aec
AX
30981 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30982 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
30983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
30984 (eval $ac_try) 2>&5
30985 ac_status=$?
3d248aec
AX
30986 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
30987 (exit $ac_status); }; }; then
ea04106b 30988
3d248aec 30989 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
30990$as_echo "yes" >&6; }
30991
3d248aec
AX
30992cat >>confdefs.h <<\_ACEOF
30993#define HAVE_XATTR_GET_HANDLER 1
30994_ACEOF
ea04106b
AX
30995
30996
30997else
30998 $as_echo "$as_me: failed program was:" >&5
30999sed 's/^/| /' conftest.$ac_ext >&5
31000
3d248aec 31001 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 31002$as_echo "no" >&6; }
3d248aec 31003 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5
68d83c55 31004$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
ea04106b
AX
31005
31006
31007cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31008/* confdefs.h. */
31009_ACEOF
31010cat confdefs.h >>conftest.$ac_ext
31011cat >>conftest.$ac_ext <<_ACEOF
31012/* end confdefs.h. */
ea04106b
AX
31013
31014
68d83c55 31015 #include <linux/xattr.h>
4d815aed 31016
68d83c55
AX
31017 int get(struct dentry *dentry, const char *name,
31018 void *buffer, size_t size, int handler_flags)
31019 { return 0; }
31020 static const struct xattr_handler
31021 xops __attribute__ ((unused)) = {
31022 .get = get,
31023 };
ea04106b
AX
31024
31025int
31026main (void)
31027{
31028
ea04106b
AX
31029
31030 ;
31031 return 0;
31032}
31033
31034_ACEOF
31035
31036
31037
31038cat - <<_ACEOF >conftest.h
31039
31040_ACEOF
31041
31042
31043 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31044 echo "obj-m := conftest.o" >build/Makefile
31045 modpost_flag=''
31046 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31047 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31049 (eval $ac_try) 2>&5
31050 ac_status=$?
3d248aec
AX
31051 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31052 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31054 (eval $ac_try) 2>&5
31055 ac_status=$?
3d248aec
AX
31056 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31057 (exit $ac_status); }; }; then
ea04106b 31058
3d248aec 31059 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
31060$as_echo "yes" >&6; }
31061
3d248aec
AX
31062cat >>confdefs.h <<\_ACEOF
31063#define HAVE_XATTR_GET_DENTRY 1
31064_ACEOF
ea04106b
AX
31065
31066
31067else
31068 $as_echo "$as_me: failed program was:" >&5
31069sed 's/^/| /' conftest.$ac_ext >&5
31070
3d248aec 31071 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 31072$as_echo "no" >&6; }
3d248aec 31073 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants inode" >&5
68d83c55 31074$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
5eacc075
AX
31075
31076
31077cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31078/* confdefs.h. */
31079_ACEOF
31080cat confdefs.h >>conftest.$ac_ext
31081cat >>conftest.$ac_ext <<_ACEOF
31082/* end confdefs.h. */
5eacc075
AX
31083
31084
68d83c55 31085 #include <linux/xattr.h>
5eacc075 31086
68d83c55
AX
31087 int get(struct inode *ip, const char *name,
31088 void *buffer, size_t size) { return 0; }
31089 static const struct xattr_handler
31090 xops __attribute__ ((unused)) = {
31091 .get = get,
31092 };
5eacc075
AX
31093
31094int
31095main (void)
31096{
31097
31098
31099 ;
31100 return 0;
31101}
31102
31103_ACEOF
31104
31105
31106
31107cat - <<_ACEOF >conftest.h
31108
31109_ACEOF
31110
31111
31112 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31113 echo "obj-m := conftest.o" >build/Makefile
31114 modpost_flag=''
31115 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31116 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5eacc075
AX
31118 (eval $ac_try) 2>&5
31119 ac_status=$?
3d248aec
AX
31120 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31121 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5eacc075
AX
31123 (eval $ac_try) 2>&5
31124 ac_status=$?
3d248aec
AX
31125 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31126 (exit $ac_status); }; }; then
5eacc075 31127
3d248aec 31128 { $as_echo "$as_me:$LINENO: result: yes" >&5
5eacc075
AX
31129$as_echo "yes" >&6; }
31130
3d248aec
AX
31131cat >>confdefs.h <<\_ACEOF
31132#define HAVE_XATTR_GET_INODE 1
31133_ACEOF
5eacc075
AX
31134
31135
31136else
31137 $as_echo "$as_me: failed program was:" >&5
31138sed 's/^/| /' conftest.$ac_ext >&5
31139
3d248aec
AX
31140 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
31141$as_echo "$as_me: error: no; please file a bug report" >&2;}
31142 { (exit 1); exit 1; }; }
5eacc075
AX
31143
31144
31145
ea04106b 31146fi
3d248aec 31147
ea04106b
AX
31148 rm -Rf build
31149
31150
ea04106b
AX
31151
31152
68d83c55
AX
31153
31154fi
3d248aec 31155
68d83c55
AX
31156 rm -Rf build
31157
31158
31159
31160
31161
31162fi
3d248aec 31163
68d83c55
AX
31164 rm -Rf build
31165
31166
31167
31168
31169
31170fi
3d248aec 31171
68d83c55
AX
31172 rm -Rf build
31173
31174
31175
31176
3d248aec 31177 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants both dentry and inode" >&5
68d83c55 31178$as_echo_n "checking whether xattr_handler->set() wants both dentry and inode... " >&6; }
ea04106b
AX
31179
31180
31181cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31182/* confdefs.h. */
31183_ACEOF
31184cat confdefs.h >>conftest.$ac_ext
31185cat >>conftest.$ac_ext <<_ACEOF
31186/* end confdefs.h. */
ea04106b
AX
31187
31188
4d815aed
AX
31189 #include <linux/xattr.h>
31190
68d83c55 31191 int set(const struct xattr_handler *handler,
87dac73d 31192 struct dentry *dentry, struct inode *inode,
68d83c55
AX
31193 const char *name, const void *buffer,
31194 size_t size, int flags)
31195 { return 0; }
4d815aed
AX
31196 static const struct xattr_handler
31197 xops __attribute__ ((unused)) = {
68d83c55 31198 .set = set,
4d815aed 31199 };
ea04106b
AX
31200
31201int
31202main (void)
31203{
31204
ea04106b
AX
31205
31206 ;
31207 return 0;
31208}
31209
31210_ACEOF
31211
31212
31213
31214cat - <<_ACEOF >conftest.h
31215
31216_ACEOF
31217
31218
31219 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31220 echo "obj-m := conftest.o" >build/Makefile
31221 modpost_flag=''
31222 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31223 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31225 (eval $ac_try) 2>&5
31226 ac_status=$?
3d248aec
AX
31227 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31228 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31230 (eval $ac_try) 2>&5
31231 ac_status=$?
3d248aec
AX
31232 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31233 (exit $ac_status); }; }; then
ea04106b 31234
3d248aec 31235 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
31236$as_echo "yes" >&6; }
31237
3d248aec
AX
31238cat >>confdefs.h <<\_ACEOF
31239#define HAVE_XATTR_SET_DENTRY_INODE 1
31240_ACEOF
ea04106b
AX
31241
31242
31243else
31244 $as_echo "$as_me: failed program was:" >&5
31245sed 's/^/| /' conftest.$ac_ext >&5
31246
3d248aec 31247 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants xattr_handler" >&5
68d83c55 31248$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
ea04106b
AX
31249
31250
31251cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31252/* confdefs.h. */
31253_ACEOF
31254cat confdefs.h >>conftest.$ac_ext
31255cat >>conftest.$ac_ext <<_ACEOF
31256/* end confdefs.h. */
ea04106b
AX
31257
31258
4d815aed
AX
31259 #include <linux/xattr.h>
31260
68d83c55 31261 int set(const struct xattr_handler *handler,
87dac73d 31262 struct dentry *dentry, const char *name,
68d83c55
AX
31263 const void *buffer, size_t size, int flags)
31264 { return 0; }
4d815aed
AX
31265 static const struct xattr_handler
31266 xops __attribute__ ((unused)) = {
68d83c55 31267 .set = set,
4d815aed 31268 };
ea04106b
AX
31269
31270int
31271main (void)
31272{
31273
ea04106b
AX
31274
31275 ;
31276 return 0;
31277}
31278
31279_ACEOF
31280
31281
31282
31283cat - <<_ACEOF >conftest.h
31284
31285_ACEOF
31286
31287
31288 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31289 echo "obj-m := conftest.o" >build/Makefile
31290 modpost_flag=''
31291 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31292 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31294 (eval $ac_try) 2>&5
31295 ac_status=$?
3d248aec
AX
31296 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31297 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31299 (eval $ac_try) 2>&5
31300 ac_status=$?
3d248aec
AX
31301 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31302 (exit $ac_status); }; }; then
ea04106b 31303
3d248aec 31304 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
31305$as_echo "yes" >&6; }
31306
3d248aec
AX
31307cat >>confdefs.h <<\_ACEOF
31308#define HAVE_XATTR_SET_HANDLER 1
31309_ACEOF
ea04106b
AX
31310
31311
31312else
31313 $as_echo "$as_me: failed program was:" >&5
31314sed 's/^/| /' conftest.$ac_ext >&5
31315
3d248aec 31316 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 31317$as_echo "no" >&6; }
3d248aec 31318 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5
68d83c55 31319$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
ea04106b
AX
31320
31321
31322cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31323/* confdefs.h. */
31324_ACEOF
31325cat confdefs.h >>conftest.$ac_ext
31326cat >>conftest.$ac_ext <<_ACEOF
31327/* end confdefs.h. */
ea04106b
AX
31328
31329
4d815aed 31330 #include <linux/xattr.h>
ea04106b 31331
68d83c55
AX
31332 int set(struct dentry *dentry, const char *name,
31333 const void *buffer, size_t size, int flags,
31334 int handler_flags) { return 0; }
4d815aed
AX
31335 static const struct xattr_handler
31336 xops __attribute__ ((unused)) = {
68d83c55 31337 .set = set,
4d815aed 31338 };
ea04106b
AX
31339
31340int
31341main (void)
31342{
31343
ea04106b
AX
31344
31345 ;
31346 return 0;
31347}
31348
31349_ACEOF
31350
31351
31352
31353cat - <<_ACEOF >conftest.h
31354
31355_ACEOF
31356
31357
31358 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31359 echo "obj-m := conftest.o" >build/Makefile
31360 modpost_flag=''
31361 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31362 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31364 (eval $ac_try) 2>&5
31365 ac_status=$?
3d248aec
AX
31366 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31367 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31369 (eval $ac_try) 2>&5
31370 ac_status=$?
3d248aec
AX
31371 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31372 (exit $ac_status); }; }; then
ea04106b 31373
3d248aec 31374 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
31375$as_echo "yes" >&6; }
31376
3d248aec
AX
31377cat >>confdefs.h <<\_ACEOF
31378#define HAVE_XATTR_SET_DENTRY 1
31379_ACEOF
87dac73d
AX
31380
31381
31382else
31383 $as_echo "$as_me: failed program was:" >&5
31384sed 's/^/| /' conftest.$ac_ext >&5
31385
3d248aec 31386 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d 31387$as_echo "no" >&6; }
3d248aec 31388 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants inode" >&5
68d83c55 31389$as_echo_n "checking whether xattr_handler->set() wants inode... " >&6; }
87dac73d
AX
31390
31391
31392cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31393/* confdefs.h. */
31394_ACEOF
31395cat confdefs.h >>conftest.$ac_ext
31396cat >>conftest.$ac_ext <<_ACEOF
31397/* end confdefs.h. */
87dac73d
AX
31398
31399
31400 #include <linux/xattr.h>
31401
68d83c55
AX
31402 int set(struct inode *ip, const char *name,
31403 const void *buffer, size_t size, int flags)
31404 { return 0; }
87dac73d
AX
31405 static const struct xattr_handler
31406 xops __attribute__ ((unused)) = {
68d83c55 31407 .set = set,
87dac73d
AX
31408 };
31409
31410int
31411main (void)
31412{
31413
31414
31415 ;
31416 return 0;
31417}
31418
31419_ACEOF
31420
31421
31422
31423cat - <<_ACEOF >conftest.h
31424
31425_ACEOF
31426
31427
31428 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31429 echo "obj-m := conftest.o" >build/Makefile
31430 modpost_flag=''
31431 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31432 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
31434 (eval $ac_try) 2>&5
31435 ac_status=$?
3d248aec
AX
31436 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31437 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
31439 (eval $ac_try) 2>&5
31440 ac_status=$?
3d248aec
AX
31441 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31442 (exit $ac_status); }; }; then
87dac73d 31443
3d248aec 31444 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
31445$as_echo "yes" >&6; }
31446
3d248aec
AX
31447cat >>confdefs.h <<\_ACEOF
31448#define HAVE_XATTR_SET_INODE 1
31449_ACEOF
4d815aed 31450
ea04106b
AX
31451
31452else
31453 $as_echo "$as_me: failed program was:" >&5
31454sed 's/^/| /' conftest.$ac_ext >&5
31455
3d248aec
AX
31456 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
31457$as_echo "$as_me: error: no; please file a bug report" >&2;}
31458 { (exit 1); exit 1; }; }
4d815aed
AX
31459
31460
31461
31462fi
3d248aec 31463
4d815aed
AX
31464 rm -Rf build
31465
31466
31467
31468
31469
31470fi
3d248aec 31471
4d815aed 31472 rm -Rf build
ea04106b 31473
ea04106b
AX
31474
31475
31476
31477
31478fi
3d248aec 31479
ea04106b
AX
31480 rm -Rf build
31481
31482
ea04106b
AX
31483
31484
87dac73d
AX
31485
31486fi
3d248aec 31487
87dac73d
AX
31488 rm -Rf build
31489
31490
31491
31492
3d248aec 31493 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants simple" >&5
68d83c55 31494$as_echo_n "checking whether xattr_handler->list() wants simple... " >&6; }
ea04106b
AX
31495
31496
31497cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31498/* confdefs.h. */
31499_ACEOF
31500cat confdefs.h >>conftest.$ac_ext
31501cat >>conftest.$ac_ext <<_ACEOF
31502/* end confdefs.h. */
ea04106b
AX
31503
31504
4d815aed
AX
31505 #include <linux/xattr.h>
31506
68d83c55 31507 bool list(struct dentry *dentry) { return 0; }
4d815aed
AX
31508 static const struct xattr_handler
31509 xops __attribute__ ((unused)) = {
68d83c55 31510 .list = list,
4d815aed 31511 };
ea04106b
AX
31512
31513int
31514main (void)
31515{
31516
ea04106b
AX
31517
31518 ;
31519 return 0;
31520}
31521
31522_ACEOF
31523
31524
31525
31526cat - <<_ACEOF >conftest.h
31527
31528_ACEOF
31529
31530
31531 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31532 echo "obj-m := conftest.o" >build/Makefile
31533 modpost_flag=''
31534 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31535 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31537 (eval $ac_try) 2>&5
31538 ac_status=$?
3d248aec
AX
31539 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31540 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31542 (eval $ac_try) 2>&5
31543 ac_status=$?
3d248aec
AX
31544 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31545 (exit $ac_status); }; }; then
ea04106b 31546
3d248aec 31547 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
31548$as_echo "yes" >&6; }
31549
3d248aec
AX
31550cat >>confdefs.h <<\_ACEOF
31551#define HAVE_XATTR_LIST_SIMPLE 1
31552_ACEOF
ea04106b
AX
31553
31554
31555else
31556 $as_echo "$as_me: failed program was:" >&5
31557sed 's/^/| /' conftest.$ac_ext >&5
31558
3d248aec 31559 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 31560$as_echo "no" >&6; }
3d248aec 31561 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants xattr_handler" >&5
68d83c55 31562$as_echo_n "checking whether xattr_handler->list() wants xattr_handler... " >&6; }
ea04106b
AX
31563
31564
31565cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31566/* confdefs.h. */
31567_ACEOF
31568cat confdefs.h >>conftest.$ac_ext
31569cat >>conftest.$ac_ext <<_ACEOF
31570/* end confdefs.h. */
ea04106b
AX
31571
31572
4d815aed
AX
31573 #include <linux/xattr.h>
31574
68d83c55
AX
31575 size_t list(const struct xattr_handler *handler,
31576 struct dentry *dentry, char *list, size_t list_size,
31577 const char *name, size_t name_len) { return 0; }
4d815aed
AX
31578 static const struct xattr_handler
31579 xops __attribute__ ((unused)) = {
68d83c55 31580 .list = list,
4d815aed 31581 };
ea04106b
AX
31582
31583int
31584main (void)
31585{
31586
ea04106b
AX
31587
31588 ;
31589 return 0;
31590}
31591
31592_ACEOF
31593
31594
31595
31596cat - <<_ACEOF >conftest.h
31597
31598_ACEOF
31599
31600
31601 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31602 echo "obj-m := conftest.o" >build/Makefile
31603 modpost_flag=''
31604 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31605 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31607 (eval $ac_try) 2>&5
31608 ac_status=$?
3d248aec
AX
31609 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31610 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31612 (eval $ac_try) 2>&5
31613 ac_status=$?
3d248aec
AX
31614 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31615 (exit $ac_status); }; }; then
ea04106b 31616
3d248aec 31617 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
31618$as_echo "yes" >&6; }
31619
3d248aec
AX
31620cat >>confdefs.h <<\_ACEOF
31621#define HAVE_XATTR_LIST_HANDLER 1
31622_ACEOF
ea04106b
AX
31623
31624
31625else
31626 $as_echo "$as_me: failed program was:" >&5
31627sed 's/^/| /' conftest.$ac_ext >&5
31628
3d248aec 31629 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 31630$as_echo "no" >&6; }
3d248aec 31631 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants dentry" >&5
68d83c55 31632$as_echo_n "checking whether xattr_handler->list() wants dentry... " >&6; }
ea04106b
AX
31633
31634
31635cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31636/* confdefs.h. */
31637_ACEOF
31638cat confdefs.h >>conftest.$ac_ext
31639cat >>conftest.$ac_ext <<_ACEOF
31640/* end confdefs.h. */
ea04106b
AX
31641
31642
4d815aed
AX
31643 #include <linux/xattr.h>
31644
68d83c55
AX
31645 size_t list(struct dentry *dentry,
31646 char *list, size_t list_size,
31647 const char *name, size_t name_len,
87dac73d 31648 int handler_flags) { return 0; }
4d815aed
AX
31649 static const struct xattr_handler
31650 xops __attribute__ ((unused)) = {
68d83c55 31651 .list = list,
4d815aed 31652 };
ea04106b
AX
31653
31654int
31655main (void)
31656{
31657
ea04106b
AX
31658
31659 ;
31660 return 0;
31661}
31662
31663_ACEOF
31664
31665
31666
31667cat - <<_ACEOF >conftest.h
31668
31669_ACEOF
31670
31671
31672 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31673 echo "obj-m := conftest.o" >build/Makefile
31674 modpost_flag=''
31675 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31676 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31678 (eval $ac_try) 2>&5
31679 ac_status=$?
3d248aec
AX
31680 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31681 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31683 (eval $ac_try) 2>&5
31684 ac_status=$?
3d248aec
AX
31685 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31686 (exit $ac_status); }; }; then
ea04106b 31687
3d248aec 31688 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
31689$as_echo "yes" >&6; }
31690
3d248aec
AX
31691cat >>confdefs.h <<\_ACEOF
31692#define HAVE_XATTR_LIST_DENTRY 1
31693_ACEOF
87dac73d
AX
31694
31695
31696else
31697 $as_echo "$as_me: failed program was:" >&5
31698sed 's/^/| /' conftest.$ac_ext >&5
31699
3d248aec 31700 { $as_echo "$as_me:$LINENO: result: no" >&5
87dac73d 31701$as_echo "no" >&6; }
3d248aec 31702 { $as_echo "$as_me:$LINENO: checking whether xattr_handler->list() wants inode" >&5
68d83c55 31703$as_echo_n "checking whether xattr_handler->list() wants inode... " >&6; }
87dac73d
AX
31704
31705
31706cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31707/* confdefs.h. */
31708_ACEOF
31709cat confdefs.h >>conftest.$ac_ext
31710cat >>conftest.$ac_ext <<_ACEOF
31711/* end confdefs.h. */
87dac73d
AX
31712
31713
31714 #include <linux/xattr.h>
31715
68d83c55
AX
31716 size_t list(struct inode *ip, char *lst,
31717 size_t list_size, const char *name,
31718 size_t name_len) { return 0; }
87dac73d
AX
31719 static const struct xattr_handler
31720 xops __attribute__ ((unused)) = {
68d83c55 31721 .list = list,
87dac73d
AX
31722 };
31723
31724int
31725main (void)
31726{
31727
31728
31729 ;
31730 return 0;
31731}
31732
31733_ACEOF
31734
31735
31736
31737cat - <<_ACEOF >conftest.h
31738
31739_ACEOF
31740
31741
31742 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31743 echo "obj-m := conftest.o" >build/Makefile
31744 modpost_flag=''
31745 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31746 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
31748 (eval $ac_try) 2>&5
31749 ac_status=$?
3d248aec
AX
31750 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31751 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
31753 (eval $ac_try) 2>&5
31754 ac_status=$?
3d248aec
AX
31755 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31756 (exit $ac_status); }; }; then
87dac73d 31757
3d248aec 31758 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
31759$as_echo "yes" >&6; }
31760
3d248aec
AX
31761cat >>confdefs.h <<\_ACEOF
31762#define HAVE_XATTR_LIST_INODE 1
31763_ACEOF
ea04106b
AX
31764
31765
31766else
31767 $as_echo "$as_me: failed program was:" >&5
31768sed 's/^/| /' conftest.$ac_ext >&5
31769
3d248aec
AX
31770 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
31771$as_echo "$as_me: error: no; please file a bug report" >&2;}
31772 { (exit 1); exit 1; }; }
87dac73d
AX
31773
31774
31775
31776fi
3d248aec 31777
87dac73d
AX
31778 rm -Rf build
31779
31780
ea04106b
AX
31781
31782
31783
31784fi
3d248aec 31785
ea04106b
AX
31786 rm -Rf build
31787
31788
ea04106b 31789
4d815aed
AX
31790
31791
31792fi
3d248aec 31793
4d815aed 31794 rm -Rf build
ea04106b
AX
31795
31796
31797
4d815aed
AX
31798
31799
31800fi
3d248aec 31801
4d815aed
AX
31802 rm -Rf build
31803
31804
31805
31806
3d248aec 31807 { $as_echo "$as_me:$LINENO: checking whether inode_owner_or_capable() exists" >&5
68d83c55 31808$as_echo_n "checking whether inode_owner_or_capable() exists... " >&6; }
4d815aed
AX
31809
31810
ea04106b 31811cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31812/* confdefs.h. */
31813_ACEOF
31814cat confdefs.h >>conftest.$ac_ext
31815cat >>conftest.$ac_ext <<_ACEOF
31816/* end confdefs.h. */
ea04106b
AX
31817
31818
68d83c55 31819 #include <linux/fs.h>
ea04106b
AX
31820
31821int
31822main (void)
31823{
31824
68d83c55
AX
31825 struct inode *ip = NULL;
31826 (void) inode_owner_or_capable(ip);
ea04106b
AX
31827
31828 ;
31829 return 0;
31830}
31831
31832_ACEOF
31833
31834
31835
31836cat - <<_ACEOF >conftest.h
31837
31838_ACEOF
31839
31840
31841 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31842 echo "obj-m := conftest.o" >build/Makefile
31843 modpost_flag=''
31844 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31845 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31847 (eval $ac_try) 2>&5
31848 ac_status=$?
3d248aec
AX
31849 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31850 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31851 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31852 (eval $ac_try) 2>&5
31853 ac_status=$?
3d248aec
AX
31854 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31855 (exit $ac_status); }; }; then
ea04106b 31856
3d248aec 31857 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
31858$as_echo "yes" >&6; }
31859
3d248aec
AX
31860cat >>confdefs.h <<\_ACEOF
31861#define HAVE_INODE_OWNER_OR_CAPABLE 1
31862_ACEOF
ea04106b
AX
31863
31864
4d815aed
AX
31865else
31866 $as_echo "$as_me: failed program was:" >&5
31867sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 31868
3d248aec 31869 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 31870$as_echo "no" >&6; }
3d248aec 31871 { $as_echo "$as_me:$LINENO: checking whether is_owner_or_cap() exists" >&5
68d83c55 31872$as_echo_n "checking whether is_owner_or_cap() exists... " >&6; }
ea04106b
AX
31873
31874
31875cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31876/* confdefs.h. */
31877_ACEOF
31878cat confdefs.h >>conftest.$ac_ext
31879cat >>conftest.$ac_ext <<_ACEOF
31880/* end confdefs.h. */
ea04106b
AX
31881
31882
68d83c55
AX
31883 #include <linux/fs.h>
31884 #include <linux/sched.h>
ea04106b
AX
31885
31886int
31887main (void)
31888{
31889
68d83c55
AX
31890 struct inode *ip = NULL;
31891 (void) is_owner_or_cap(ip);
ea04106b
AX
31892
31893 ;
31894 return 0;
31895}
31896
31897_ACEOF
31898
31899
31900
31901cat - <<_ACEOF >conftest.h
31902
31903_ACEOF
31904
31905
31906 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31907 echo "obj-m := conftest.o" >build/Makefile
31908 modpost_flag=''
31909 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31910 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31911 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31912 (eval $ac_try) 2>&5
31913 ac_status=$?
3d248aec
AX
31914 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31915 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
31916 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31917 (eval $ac_try) 2>&5
31918 ac_status=$?
3d248aec
AX
31919 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
31920 (exit $ac_status); }; }; then
ea04106b 31921
3d248aec 31922 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
31923$as_echo "yes" >&6; }
31924
3d248aec
AX
31925cat >>confdefs.h <<\_ACEOF
31926#define HAVE_IS_OWNER_OR_CAP 1
31927_ACEOF
ea04106b
AX
31928
31929
31930else
31931 $as_echo "$as_me: failed program was:" >&5
31932sed 's/^/| /' conftest.$ac_ext >&5
31933
3d248aec
AX
31934 { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
31935 https://github.com/zfsonlinux/zfs/issues/new" >&5
31936$as_echo "$as_me: error: no - Please file a bug report at
31937 https://github.com/zfsonlinux/zfs/issues/new" >&2;}
31938 { (exit 1); exit 1; }; }
ea04106b
AX
31939
31940
ea04106b 31941
68d83c55 31942fi
3d248aec 31943
68d83c55 31944 rm -Rf build
ea04106b 31945
ea04106b 31946
68d83c55
AX
31947
31948
31949
31950fi
3d248aec 31951
68d83c55
AX
31952 rm -Rf build
31953
31954
31955
31956
3d248aec 31957 { $as_echo "$as_me:$LINENO: checking whether posix_acl_from_xattr() needs user_ns" >&5
68d83c55
AX
31958$as_echo_n "checking whether posix_acl_from_xattr() needs user_ns... " >&6; }
31959
31960
31961cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
31962/* confdefs.h. */
31963_ACEOF
31964cat confdefs.h >>conftest.$ac_ext
31965cat >>conftest.$ac_ext <<_ACEOF
31966/* end confdefs.h. */
68d83c55
AX
31967
31968
31969 #include <linux/cred.h>
31970 #include <linux/fs.h>
31971 #include <linux/posix_acl_xattr.h>
ea04106b
AX
31972
31973int
31974main (void)
31975{
31976
68d83c55 31977 posix_acl_from_xattr(&init_user_ns, NULL, 0);
ea04106b
AX
31978
31979 ;
31980 return 0;
31981}
31982
31983_ACEOF
31984
31985
31986
31987cat - <<_ACEOF >conftest.h
31988
31989_ACEOF
31990
31991
31992 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
31993 echo "obj-m := conftest.o" >build/Makefile
31994 modpost_flag=''
31995 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
31996 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 31997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
31998 (eval $ac_try) 2>&5
31999 ac_status=$?
3d248aec
AX
32000 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32001 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32003 (eval $ac_try) 2>&5
32004 ac_status=$?
3d248aec
AX
32005 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32006 (exit $ac_status); }; }; then
ea04106b 32007
3d248aec 32008 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32009$as_echo "yes" >&6; }
32010
3d248aec
AX
32011cat >>confdefs.h <<\_ACEOF
32012#define HAVE_POSIX_ACL_FROM_XATTR_USERNS 1
32013_ACEOF
ea04106b
AX
32014
32015
32016else
32017 $as_echo "$as_me: failed program was:" >&5
32018sed 's/^/| /' conftest.$ac_ext >&5
32019
3d248aec 32020 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 32021$as_echo "no" >&6; }
ea04106b
AX
32022
32023
ea04106b 32024
68d83c55 32025fi
3d248aec 32026
68d83c55 32027 rm -Rf build
ea04106b 32028
e10b0808 32029
68d83c55
AX
32030
32031
3d248aec 32032 { $as_echo "$as_me:$LINENO: checking whether posix_acl_release() is available" >&5
68d83c55
AX
32033$as_echo_n "checking whether posix_acl_release() is available... " >&6; }
32034
32035
32036cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32037/* confdefs.h. */
32038_ACEOF
32039cat confdefs.h >>conftest.$ac_ext
32040cat >>conftest.$ac_ext <<_ACEOF
32041/* end confdefs.h. */
68d83c55
AX
32042
32043
32044 #include <linux/cred.h>
32045 #include <linux/fs.h>
32046 #include <linux/posix_acl.h>
ea04106b
AX
32047
32048int
32049main (void)
32050{
32051
68d83c55
AX
32052 struct posix_acl* tmp = posix_acl_alloc(1, 0);
32053 posix_acl_release(tmp);
ea04106b
AX
32054
32055 ;
32056 return 0;
32057}
32058
32059_ACEOF
32060
32061
32062
32063cat - <<_ACEOF >conftest.h
32064
32065_ACEOF
32066
32067
32068 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32069 echo "obj-m := conftest.o" >build/Makefile
32070 modpost_flag=''
32071 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32072 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32074 (eval $ac_try) 2>&5
32075 ac_status=$?
3d248aec
AX
32076 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32077 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32079 (eval $ac_try) 2>&5
32080 ac_status=$?
3d248aec
AX
32081 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32082 (exit $ac_status); }; }; then
ea04106b 32083
3d248aec 32084 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32085$as_echo "yes" >&6; }
32086
3d248aec
AX
32087cat >>confdefs.h <<\_ACEOF
32088#define HAVE_POSIX_ACL_RELEASE 1
32089_ACEOF
e10b0808
AX
32090
32091
32092else
32093 $as_echo "$as_me: failed program was:" >&5
32094sed 's/^/| /' conftest.$ac_ext >&5
32095
3d248aec 32096 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 32097$as_echo "no" >&6; }
4d815aed
AX
32098
32099
32100
32101fi
3d248aec 32102
4d815aed
AX
32103 rm -Rf build
32104
32105
32106
3d248aec 32107 { $as_echo "$as_me:$LINENO: checking whether posix_acl_release() is GPL-only" >&5
68d83c55 32108$as_echo_n "checking whether posix_acl_release() is GPL-only... " >&6; }
4d815aed
AX
32109
32110
32111cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32112/* confdefs.h. */
32113_ACEOF
32114cat confdefs.h >>conftest.$ac_ext
32115cat >>conftest.$ac_ext <<_ACEOF
32116/* end confdefs.h. */
4d815aed
AX
32117
32118
68d83c55 32119 #include <linux/cred.h>
4d815aed 32120 #include <linux/fs.h>
68d83c55
AX
32121 #include <linux/posix_acl.h>
32122
32123 MODULE_LICENSE("$ZFS_META_LICENSE");
94a40997
AX
32124
32125int
32126main (void)
32127{
32128
68d83c55
AX
32129 struct posix_acl* tmp = posix_acl_alloc(1, 0);
32130 posix_acl_release(tmp);
94a40997
AX
32131
32132 ;
32133 return 0;
32134}
32135
32136_ACEOF
32137
32138
32139
32140cat - <<_ACEOF >conftest.h
32141
32142_ACEOF
32143
32144
32145 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32146 echo "obj-m := conftest.o" >build/Makefile
32147 modpost_flag=''
32148 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32149 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
32151 (eval $ac_try) 2>&5
32152 ac_status=$?
3d248aec
AX
32153 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32154 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32155 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
32156 (eval $ac_try) 2>&5
32157 ac_status=$?
3d248aec
AX
32158 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32159 (exit $ac_status); }; }; then
94a40997 32160
3d248aec 32161 { $as_echo "$as_me:$LINENO: result: no" >&5
94a40997 32162$as_echo "no" >&6; }
ea04106b
AX
32163
32164else
32165 $as_echo "$as_me: failed program was:" >&5
32166sed 's/^/| /' conftest.$ac_ext >&5
32167
3d248aec 32168 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55 32169$as_echo "yes" >&6; }
4d815aed 32170
3d248aec
AX
32171cat >>confdefs.h <<\_ACEOF
32172#define HAVE_POSIX_ACL_RELEASE_GPL_ONLY 1
32173_ACEOF
4d815aed
AX
32174
32175
32176
32177
32178fi
3d248aec 32179
4d815aed 32180 rm -Rf build
94a40997
AX
32181
32182
94a40997 32183
4d815aed 32184
3d248aec 32185 { $as_echo "$as_me:$LINENO: checking whether set_cached_acl() is usable" >&5
68d83c55 32186$as_echo_n "checking whether set_cached_acl() is usable... " >&6; }
4d815aed
AX
32187
32188
32189cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32190/* confdefs.h. */
32191_ACEOF
32192cat confdefs.h >>conftest.$ac_ext
32193cat >>conftest.$ac_ext <<_ACEOF
32194/* end confdefs.h. */
4d815aed
AX
32195
32196
68d83c55 32197 #include <linux/module.h>
4d815aed
AX
32198 #include <linux/cred.h>
32199 #include <linux/fs.h>
68d83c55
AX
32200 #include <linux/posix_acl.h>
32201
32202 MODULE_LICENSE("$ZFS_META_LICENSE");
94a40997
AX
32203
32204int
32205main (void)
32206{
32207
68d83c55
AX
32208 struct inode *ip = NULL;
32209 struct posix_acl *acl = posix_acl_alloc(1, 0);
32210 set_cached_acl(ip, ACL_TYPE_ACCESS, acl);
32211 forget_cached_acl(ip, ACL_TYPE_ACCESS);
94a40997
AX
32212
32213 ;
32214 return 0;
32215}
32216
32217_ACEOF
32218
32219
32220
32221cat - <<_ACEOF >conftest.h
32222
32223_ACEOF
32224
32225
32226 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32227 echo "obj-m := conftest.o" >build/Makefile
32228 modpost_flag=''
32229 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32230 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
32232 (eval $ac_try) 2>&5
32233 ac_status=$?
3d248aec
AX
32234 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32235 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32236 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
32237 (eval $ac_try) 2>&5
32238 ac_status=$?
3d248aec
AX
32239 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32240 (exit $ac_status); }; }; then
94a40997 32241
3d248aec 32242 { $as_echo "$as_me:$LINENO: result: yes" >&5
94a40997
AX
32243$as_echo "yes" >&6; }
32244
3d248aec
AX
32245cat >>confdefs.h <<\_ACEOF
32246#define HAVE_SET_CACHED_ACL_USABLE 1
32247_ACEOF
94a40997
AX
32248
32249
32250else
32251 $as_echo "$as_me: failed program was:" >&5
32252sed 's/^/| /' conftest.$ac_ext >&5
32253
3d248aec 32254 { $as_echo "$as_me:$LINENO: result: no" >&5
94a40997
AX
32255$as_echo "no" >&6; }
32256
32257
32258
32259fi
3d248aec 32260
94a40997
AX
32261 rm -Rf build
32262
32263
ea04106b
AX
32264
32265
3d248aec 32266 { $as_echo "$as_me:$LINENO: checking whether posix_acl_chmod exists" >&5
68d83c55 32267$as_echo_n "checking whether posix_acl_chmod exists... " >&6; }
ea04106b
AX
32268
32269
32270cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32271/* confdefs.h. */
32272_ACEOF
32273cat confdefs.h >>conftest.$ac_ext
32274cat >>conftest.$ac_ext <<_ACEOF
32275/* end confdefs.h. */
ea04106b
AX
32276
32277
4d815aed
AX
32278 #include <linux/fs.h>
32279 #include <linux/posix_acl.h>
ea04106b
AX
32280
32281int
32282main (void)
32283{
32284
68d83c55 32285 posix_acl_chmod(NULL, 0, 0)
ea04106b
AX
32286
32287 ;
32288 return 0;
32289}
32290
32291_ACEOF
32292
32293
32294
32295cat - <<_ACEOF >conftest.h
32296
32297_ACEOF
32298
32299
32300 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32301 echo "obj-m := conftest.o" >build/Makefile
32302 modpost_flag=''
32303 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32304 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32306 (eval $ac_try) 2>&5
32307 ac_status=$?
3d248aec
AX
32308 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32309 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32311 (eval $ac_try) 2>&5
32312 ac_status=$?
3d248aec
AX
32313 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32314 (exit $ac_status); }; }; then
ea04106b 32315
3d248aec 32316 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32317$as_echo "yes" >&6; }
32318
3d248aec
AX
32319cat >>confdefs.h <<\_ACEOF
32320#define HAVE_POSIX_ACL_CHMOD 1
32321_ACEOF
ea04106b
AX
32322
32323
32324else
32325 $as_echo "$as_me: failed program was:" >&5
32326sed 's/^/| /' conftest.$ac_ext >&5
32327
3d248aec 32328 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 32329$as_echo "no" >&6; }
4d815aed
AX
32330
32331
32332
32333fi
3d248aec 32334
4d815aed
AX
32335 rm -Rf build
32336
32337
32338
3d248aec 32339 { $as_echo "$as_me:$LINENO: checking whether __posix_acl_chmod exists" >&5
68d83c55 32340$as_echo_n "checking whether __posix_acl_chmod exists... " >&6; }
ea04106b
AX
32341
32342
32343cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32344/* confdefs.h. */
32345_ACEOF
32346cat confdefs.h >>conftest.$ac_ext
32347cat >>conftest.$ac_ext <<_ACEOF
32348/* end confdefs.h. */
ea04106b
AX
32349
32350
32351 #include <linux/fs.h>
4d815aed 32352 #include <linux/posix_acl.h>
ea04106b
AX
32353
32354int
32355main (void)
32356{
32357
68d83c55 32358 __posix_acl_chmod(NULL, 0, 0)
ea04106b
AX
32359
32360 ;
32361 return 0;
32362}
32363
32364_ACEOF
32365
32366
32367
32368cat - <<_ACEOF >conftest.h
32369
32370_ACEOF
32371
32372
32373 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32374 echo "obj-m := conftest.o" >build/Makefile
32375 modpost_flag=''
32376 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32377 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32379 (eval $ac_try) 2>&5
32380 ac_status=$?
3d248aec
AX
32381 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32382 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32383 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32384 (eval $ac_try) 2>&5
32385 ac_status=$?
3d248aec
AX
32386 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32387 (exit $ac_status); }; }; then
ea04106b 32388
3d248aec 32389 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32390$as_echo "yes" >&6; }
32391
3d248aec
AX
32392cat >>confdefs.h <<\_ACEOF
32393#define HAVE___POSIX_ACL_CHMOD 1
32394_ACEOF
ea04106b
AX
32395
32396
32397else
32398 $as_echo "$as_me: failed program was:" >&5
32399sed 's/^/| /' conftest.$ac_ext >&5
32400
3d248aec 32401 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 32402$as_echo "no" >&6; }
4d815aed
AX
32403
32404
32405
32406fi
3d248aec 32407
4d815aed
AX
32408 rm -Rf build
32409
32410
32411
68d83c55 32412
3d248aec 32413 { $as_echo "$as_me:$LINENO: checking whether posix_acl_equiv_mode() wants umode_t" >&5
68d83c55 32414$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
ea04106b
AX
32415
32416
32417cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32418/* confdefs.h. */
32419_ACEOF
32420cat confdefs.h >>conftest.$ac_ext
32421cat >>conftest.$ac_ext <<_ACEOF
32422/* end confdefs.h. */
ea04106b
AX
32423
32424
4d815aed
AX
32425 #include <linux/fs.h>
32426 #include <linux/posix_acl.h>
ea04106b
AX
32427
32428int
32429main (void)
32430{
32431
68d83c55
AX
32432 umode_t tmp;
32433 posix_acl_equiv_mode(NULL,&tmp);
ea04106b
AX
32434
32435 ;
32436 return 0;
32437}
32438
32439_ACEOF
32440
32441
32442
32443cat - <<_ACEOF >conftest.h
32444
32445_ACEOF
32446
32447
32448 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32449 echo "obj-m := conftest.o" >build/Makefile
32450 modpost_flag=''
32451 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32452 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32454 (eval $ac_try) 2>&5
32455 ac_status=$?
3d248aec
AX
32456 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32457 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32459 (eval $ac_try) 2>&5
32460 ac_status=$?
3d248aec
AX
32461 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32462 (exit $ac_status); }; }; then
ea04106b 32463
3d248aec 32464 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32465$as_echo "yes" >&6; }
32466
3d248aec
AX
32467cat >>confdefs.h <<\_ACEOF
32468#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1
32469_ACEOF
ea04106b
AX
32470
32471
32472else
32473 $as_echo "$as_me: failed program was:" >&5
32474sed 's/^/| /' conftest.$ac_ext >&5
32475
3d248aec 32476 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 32477$as_echo "no" >&6; }
ea04106b
AX
32478
32479
ea04106b 32480
e10b0808 32481fi
3d248aec 32482
e10b0808 32483 rm -Rf build
ea04106b 32484
ea04106b
AX
32485
32486
ea04106b 32487
3d248aec 32488 { $as_echo "$as_me:$LINENO: checking whether posix_acl_valid() wants user namespace" >&5
68d83c55 32489$as_echo_n "checking whether posix_acl_valid() wants user namespace... " >&6; }
e10b0808
AX
32490
32491
32492cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32493/* confdefs.h. */
32494_ACEOF
32495cat confdefs.h >>conftest.$ac_ext
32496cat >>conftest.$ac_ext <<_ACEOF
32497/* end confdefs.h. */
e10b0808
AX
32498
32499
e10b0808 32500 #include <linux/fs.h>
87dac73d 32501 #include <linux/posix_acl.h>
ea04106b
AX
32502
32503int
32504main (void)
32505{
32506
68d83c55
AX
32507 struct user_namespace *user_ns = NULL;
32508 const struct posix_acl *acl = NULL;
32509 int error;
32510
32511 error = posix_acl_valid(user_ns, acl);
ea04106b
AX
32512
32513 ;
32514 return 0;
32515}
32516
32517_ACEOF
32518
32519
32520
32521cat - <<_ACEOF >conftest.h
32522
32523_ACEOF
32524
32525
32526 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32527 echo "obj-m := conftest.o" >build/Makefile
32528 modpost_flag=''
32529 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32530 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32532 (eval $ac_try) 2>&5
32533 ac_status=$?
3d248aec
AX
32534 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32535 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32537 (eval $ac_try) 2>&5
32538 ac_status=$?
3d248aec
AX
32539 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32540 (exit $ac_status); }; }; then
ea04106b 32541
3d248aec 32542 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32543$as_echo "yes" >&6; }
32544
3d248aec
AX
32545cat >>confdefs.h <<\_ACEOF
32546#define HAVE_POSIX_ACL_VALID_WITH_NS 1
32547_ACEOF
ea04106b
AX
32548
32549
32550else
32551 $as_echo "$as_me: failed program was:" >&5
32552sed 's/^/| /' conftest.$ac_ext >&5
32553
3d248aec 32554 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
32555$as_echo "no" >&6; }
32556
32557
32558
32559fi
3d248aec 32560
ea04106b
AX
32561 rm -Rf build
32562
32563
32564
32565
3d248aec 32566 { $as_echo "$as_me:$LINENO: checking whether iops->permission() exists" >&5
68d83c55 32567$as_echo_n "checking whether iops->permission() exists... " >&6; }
ea04106b
AX
32568
32569
32570cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32571/* confdefs.h. */
32572_ACEOF
32573cat confdefs.h >>conftest.$ac_ext
32574cat >>conftest.$ac_ext <<_ACEOF
32575/* end confdefs.h. */
ea04106b
AX
32576
32577
e10b0808 32578 #include <linux/fs.h>
68d83c55
AX
32579
32580 int permission_fn(struct inode *inode, int mask) { return 0; }
32581
32582 static const struct inode_operations
32583 iops __attribute__ ((unused)) = {
32584 .permission = permission_fn,
32585 };
ea04106b
AX
32586
32587int
32588main (void)
32589{
32590
32591
32592 ;
32593 return 0;
32594}
32595
32596_ACEOF
32597
32598
32599
32600cat - <<_ACEOF >conftest.h
32601
32602_ACEOF
32603
32604
32605 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32606 echo "obj-m := conftest.o" >build/Makefile
32607 modpost_flag=''
32608 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32609 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32611 (eval $ac_try) 2>&5
32612 ac_status=$?
3d248aec
AX
32613 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32614 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32616 (eval $ac_try) 2>&5
32617 ac_status=$?
3d248aec
AX
32618 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32619 (exit $ac_status); }; }; then
ea04106b 32620
3d248aec 32621 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32622$as_echo "yes" >&6; }
32623
3d248aec
AX
32624cat >>confdefs.h <<\_ACEOF
32625#define HAVE_PERMISSION 1
32626_ACEOF
ea04106b
AX
32627
32628
32629else
32630 $as_echo "$as_me: failed program was:" >&5
32631sed 's/^/| /' conftest.$ac_ext >&5
32632
3d248aec 32633 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
32634$as_echo "no" >&6; }
32635
32636
32637
32638fi
3d248aec 32639
ea04106b
AX
32640 rm -Rf build
32641
32642
32643
4d815aed 32644
3d248aec 32645 { $as_echo "$as_me:$LINENO: checking whether iops->permission() wants nameidata" >&5
68d83c55 32646$as_echo_n "checking whether iops->permission() wants nameidata... " >&6; }
ea04106b
AX
32647
32648
32649cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32650/* confdefs.h. */
32651_ACEOF
32652cat confdefs.h >>conftest.$ac_ext
32653cat >>conftest.$ac_ext <<_ACEOF
32654/* end confdefs.h. */
ea04106b
AX
32655
32656
32657 #include <linux/fs.h>
e10b0808 32658
68d83c55
AX
32659 int permission_fn(struct inode *inode, int mask,
32660 struct nameidata *nd) { return 0; }
4d815aed
AX
32661
32662 static const struct inode_operations
32663 iops __attribute__ ((unused)) = {
32664 .permission = permission_fn,
32665 };
ea04106b
AX
32666
32667int
32668main (void)
32669{
32670
ea04106b
AX
32671
32672 ;
32673 return 0;
32674}
32675
32676_ACEOF
32677
32678
32679
32680cat - <<_ACEOF >conftest.h
32681
32682_ACEOF
32683
32684
32685 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32686 echo "obj-m := conftest.o" >build/Makefile
32687 modpost_flag=''
32688 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32689 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32691 (eval $ac_try) 2>&5
32692 ac_status=$?
3d248aec
AX
32693 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32694 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32696 (eval $ac_try) 2>&5
32697 ac_status=$?
3d248aec
AX
32698 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32699 (exit $ac_status); }; }; then
ea04106b 32700
3d248aec 32701 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed
AX
32702$as_echo "yes" >&6; }
32703
3d248aec
AX
32704cat >>confdefs.h <<\_ACEOF
32705#define HAVE_PERMISSION 1
32706_ACEOF
4d815aed 32707
e10b0808 32708
3d248aec
AX
32709cat >>confdefs.h <<\_ACEOF
32710#define HAVE_PERMISSION_WITH_NAMEIDATA 1
32711_ACEOF
68d83c55
AX
32712
32713
e10b0808
AX
32714else
32715 $as_echo "$as_me: failed program was:" >&5
32716sed 's/^/| /' conftest.$ac_ext >&5
32717
3d248aec 32718 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 32719$as_echo "no" >&6; }
ea04106b 32720
ea04106b 32721
e10b0808
AX
32722
32723fi
3d248aec 32724
e10b0808
AX
32725 rm -Rf build
32726
32727
32728
32729
3d248aec 32730 { $as_echo "$as_me:$LINENO: checking whether iops->check_acl() exists" >&5
68d83c55 32731$as_echo_n "checking whether iops->check_acl() exists... " >&6; }
ea04106b
AX
32732
32733
32734cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32735/* confdefs.h. */
32736_ACEOF
32737cat confdefs.h >>conftest.$ac_ext
32738cat >>conftest.$ac_ext <<_ACEOF
32739/* end confdefs.h. */
ea04106b
AX
32740
32741
e10b0808 32742 #include <linux/fs.h>
4d815aed 32743
68d83c55 32744 int check_acl_fn(struct inode *inode, int mask) { return 0; }
4d815aed
AX
32745
32746 static const struct inode_operations
32747 iops __attribute__ ((unused)) = {
68d83c55 32748 .check_acl = check_acl_fn,
4d815aed 32749 };
ea04106b
AX
32750
32751int
32752main (void)
32753{
32754
ea04106b
AX
32755
32756 ;
32757 return 0;
32758}
32759
32760_ACEOF
32761
32762
32763
32764cat - <<_ACEOF >conftest.h
32765
32766_ACEOF
32767
32768
32769 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32770 echo "obj-m := conftest.o" >build/Makefile
32771 modpost_flag=''
32772 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32773 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32775 (eval $ac_try) 2>&5
32776 ac_status=$?
3d248aec
AX
32777 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32778 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32780 (eval $ac_try) 2>&5
32781 ac_status=$?
3d248aec
AX
32782 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32783 (exit $ac_status); }; }; then
ea04106b 32784
3d248aec 32785 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32786$as_echo "yes" >&6; }
32787
3d248aec
AX
32788cat >>confdefs.h <<\_ACEOF
32789#define HAVE_CHECK_ACL 1
32790_ACEOF
ea04106b
AX
32791
32792
32793else
32794 $as_echo "$as_me: failed program was:" >&5
32795sed 's/^/| /' conftest.$ac_ext >&5
32796
3d248aec 32797 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 32798$as_echo "no" >&6; }
ea04106b
AX
32799
32800
32801
32802fi
3d248aec 32803
ea04106b
AX
32804 rm -Rf build
32805
32806
32807
4d815aed 32808
3d248aec 32809 { $as_echo "$as_me:$LINENO: checking whether iops->check_acl() wants flags" >&5
68d83c55 32810$as_echo_n "checking whether iops->check_acl() wants flags... " >&6; }
ea04106b
AX
32811
32812
32813cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32814/* confdefs.h. */
32815_ACEOF
32816cat confdefs.h >>conftest.$ac_ext
32817cat >>conftest.$ac_ext <<_ACEOF
32818/* end confdefs.h. */
ea04106b
AX
32819
32820
ea04106b 32821 #include <linux/fs.h>
4d815aed 32822
68d83c55
AX
32823 int check_acl_fn(struct inode *inode, int mask,
32824 unsigned int flags) { return 0; }
4d815aed
AX
32825
32826 static const struct inode_operations
32827 iops __attribute__ ((unused)) = {
32828 .check_acl = check_acl_fn,
32829 };
ea04106b
AX
32830
32831int
32832main (void)
32833{
32834
ea04106b
AX
32835
32836 ;
32837 return 0;
32838}
32839
32840_ACEOF
32841
32842
32843
32844cat - <<_ACEOF >conftest.h
32845
32846_ACEOF
32847
32848
32849 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32850 echo "obj-m := conftest.o" >build/Makefile
32851 modpost_flag=''
32852 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32853 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32855 (eval $ac_try) 2>&5
32856 ac_status=$?
3d248aec
AX
32857 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32858 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32859 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32860 (eval $ac_try) 2>&5
32861 ac_status=$?
3d248aec
AX
32862 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32863 (exit $ac_status); }; }; then
ea04106b 32864
3d248aec 32865 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32866$as_echo "yes" >&6; }
32867
3d248aec
AX
32868cat >>confdefs.h <<\_ACEOF
32869#define HAVE_CHECK_ACL 1
32870_ACEOF
ea04106b
AX
32871
32872
3d248aec
AX
32873cat >>confdefs.h <<\_ACEOF
32874#define HAVE_CHECK_ACL_WITH_FLAGS 1
32875_ACEOF
68d83c55
AX
32876
32877
ea04106b
AX
32878else
32879 $as_echo "$as_me: failed program was:" >&5
32880sed 's/^/| /' conftest.$ac_ext >&5
32881
3d248aec 32882 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
32883$as_echo "no" >&6; }
32884
32885
32886
32887fi
3d248aec 32888
ea04106b
AX
32889 rm -Rf build
32890
32891
32892
32893
3d248aec 32894 { $as_echo "$as_me:$LINENO: checking whether iops->get_acl() exists" >&5
68d83c55 32895$as_echo_n "checking whether iops->get_acl() exists... " >&6; }
ea04106b
AX
32896
32897
32898cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32899/* confdefs.h. */
32900_ACEOF
32901cat confdefs.h >>conftest.$ac_ext
32902cat >>conftest.$ac_ext <<_ACEOF
32903/* end confdefs.h. */
ea04106b
AX
32904
32905
ea04106b 32906 #include <linux/fs.h>
ea04106b 32907
68d83c55
AX
32908 struct posix_acl *get_acl_fn(struct inode *inode, int type)
32909 { return NULL; }
4d815aed
AX
32910
32911 static const struct inode_operations
32912 iops __attribute__ ((unused)) = {
68d83c55 32913 .get_acl = get_acl_fn,
4d815aed
AX
32914 };
32915
ea04106b
AX
32916int
32917main (void)
32918{
32919
ea04106b
AX
32920
32921 ;
32922 return 0;
32923}
32924
32925_ACEOF
32926
32927
32928
32929cat - <<_ACEOF >conftest.h
32930
32931_ACEOF
32932
32933
32934 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
32935 echo "obj-m := conftest.o" >build/Makefile
32936 modpost_flag=''
32937 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
32938 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 32939 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32940 (eval $ac_try) 2>&5
32941 ac_status=$?
3d248aec
AX
32942 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32943 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
32944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
32945 (eval $ac_try) 2>&5
32946 ac_status=$?
3d248aec
AX
32947 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
32948 (exit $ac_status); }; }; then
ea04106b 32949
3d248aec 32950 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
32951$as_echo "yes" >&6; }
32952
3d248aec
AX
32953cat >>confdefs.h <<\_ACEOF
32954#define HAVE_GET_ACL 1
32955_ACEOF
ea04106b
AX
32956
32957
32958else
32959 $as_echo "$as_me: failed program was:" >&5
32960sed 's/^/| /' conftest.$ac_ext >&5
32961
3d248aec 32962 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
32963$as_echo "no" >&6; }
32964
32965
32966
32967fi
3d248aec 32968
ea04106b
AX
32969 rm -Rf build
32970
32971
32972
e10b0808 32973
3d248aec 32974 { $as_echo "$as_me:$LINENO: checking whether iops->set_acl() exists" >&5
68d83c55 32975$as_echo_n "checking whether iops->set_acl() exists... " >&6; }
ea04106b
AX
32976
32977
32978cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
32979/* confdefs.h. */
32980_ACEOF
32981cat confdefs.h >>conftest.$ac_ext
32982cat >>conftest.$ac_ext <<_ACEOF
32983/* end confdefs.h. */
ea04106b
AX
32984
32985
ea04106b 32986 #include <linux/fs.h>
4d815aed 32987
68d83c55
AX
32988 int set_acl_fn(struct inode *inode, struct posix_acl *acl, int type)
32989 { return 0; }
4d815aed
AX
32990
32991 static const struct inode_operations
32992 iops __attribute__ ((unused)) = {
68d83c55 32993 .set_acl = set_acl_fn,
4d815aed 32994 };
ea04106b 32995
ea04106b
AX
32996int
32997main (void)
32998{
32999
ea04106b
AX
33000
33001 ;
33002 return 0;
33003}
33004
33005_ACEOF
33006
33007
33008
33009cat - <<_ACEOF >conftest.h
33010
33011_ACEOF
33012
33013
33014 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33015 echo "obj-m := conftest.o" >build/Makefile
33016 modpost_flag=''
33017 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33018 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec
AX
33019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33020 (eval $ac_try) 2>&5
33021 ac_status=$?
33022 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33023 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33025 (eval $ac_try) 2>&5
33026 ac_status=$?
33027 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33028 (exit $ac_status); }; }; then
33029
33030 { $as_echo "$as_me:$LINENO: result: yes" >&5
33031$as_echo "yes" >&6; }
33032
33033cat >>confdefs.h <<\_ACEOF
33034#define HAVE_SET_ACL 1
33035_ACEOF
33036
33037
33038else
33039 $as_echo "$as_me: failed program was:" >&5
33040sed 's/^/| /' conftest.$ac_ext >&5
33041
33042 { $as_echo "$as_me:$LINENO: result: no" >&5
33043$as_echo "no" >&6; }
33044
33045
33046
33047fi
33048
33049 rm -Rf build
33050
33051
33052
33053
33054
33055 { $as_echo "$as_me:$LINENO: checking whether iops->getattr() takes a path" >&5
33056$as_echo_n "checking whether iops->getattr() takes a path... " >&6; }
33057
33058
33059cat confdefs.h - <<_ACEOF >conftest.c
33060/* confdefs.h. */
33061_ACEOF
33062cat confdefs.h >>conftest.$ac_ext
33063cat >>conftest.$ac_ext <<_ACEOF
33064/* end confdefs.h. */
33065
33066
33067 #include <linux/fs.h>
33068
33069 int test_getattr(
33070 const struct path *p, struct kstat *k,
33071 u32 request_mask, unsigned int query_flags)
33072 { return 0; }
33073
33074 static const struct inode_operations
33075 iops __attribute__ ((unused)) = {
33076 .getattr = test_getattr,
33077 };
33078
33079int
33080main (void)
33081{
33082
33083
33084 ;
33085 return 0;
33086}
33087
33088_ACEOF
33089
33090
33091
33092cat - <<_ACEOF >conftest.h
33093
33094_ACEOF
33095
33096
33097 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33098 echo "obj-m := conftest.o" >build/Makefile
33099 modpost_flag=''
33100 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33101 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
33102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33103 (eval $ac_try) 2>&5
33104 ac_status=$?
33105 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33106 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33107 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
33108 (eval $ac_try) 2>&5
33109 ac_status=$?
33110 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33111 (exit $ac_status); }; }; then
33112
33113 { $as_echo "$as_me:$LINENO: result: yes" >&5
33114$as_echo "yes" >&6; }
33115
33116cat >>confdefs.h <<\_ACEOF
33117#define HAVE_PATH_IOPS_GETATTR 1
33118_ACEOF
33119
33120
33121else
33122 $as_echo "$as_me: failed program was:" >&5
33123sed 's/^/| /' conftest.$ac_ext >&5
33124
33125 { $as_echo "$as_me:$LINENO: result: no" >&5
33126$as_echo "no" >&6; }
33127
33128
33129
33130fi
33131
33132 rm -Rf build
33133
33134
33135
33136
33137 { $as_echo "$as_me:$LINENO: checking whether iops->getattr() takes a vfsmount" >&5
33138$as_echo_n "checking whether iops->getattr() takes a vfsmount... " >&6; }
33139
33140
33141cat confdefs.h - <<_ACEOF >conftest.c
33142/* confdefs.h. */
33143_ACEOF
33144cat confdefs.h >>conftest.$ac_ext
33145cat >>conftest.$ac_ext <<_ACEOF
33146/* end confdefs.h. */
33147
33148
33149 #include <linux/fs.h>
33150
33151 int test_getattr(
33152 struct vfsmount *mnt, struct dentry *d,
33153 struct kstat *k)
33154 { return 0; }
33155
33156 static const struct inode_operations
33157 iops __attribute__ ((unused)) = {
33158 .getattr = test_getattr,
33159 };
33160
33161int
33162main (void)
33163{
33164
33165
33166 ;
33167 return 0;
33168}
33169
33170_ACEOF
33171
33172
33173
33174cat - <<_ACEOF >conftest.h
33175
33176_ACEOF
33177
33178
33179 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33180 echo "obj-m := conftest.o" >build/Makefile
33181 modpost_flag=''
33182 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33183 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
33184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33185 (eval $ac_try) 2>&5
33186 ac_status=$?
3d248aec
AX
33187 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33188 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33189 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33190 (eval $ac_try) 2>&5
33191 ac_status=$?
3d248aec
AX
33192 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33193 (exit $ac_status); }; }; then
ea04106b 33194
3d248aec 33195 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
33196$as_echo "yes" >&6; }
33197
3d248aec
AX
33198cat >>confdefs.h <<\_ACEOF
33199#define HAVE_VFSMOUNT_IOPS_GETATTR 1
33200_ACEOF
e10b0808 33201
ea04106b
AX
33202
33203else
33204 $as_echo "$as_me: failed program was:" >&5
33205sed 's/^/| /' conftest.$ac_ext >&5
33206
3d248aec 33207 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 33208$as_echo "no" >&6; }
ea04106b
AX
33209
33210
33211
33212fi
3d248aec 33213
ea04106b
AX
33214 rm -Rf build
33215
33216
33217
33218
3d248aec
AX
33219
33220 { $as_echo "$as_me:$LINENO: checking whether uncached_acl_sentinel() exists" >&5
87dac73d 33221$as_echo_n "checking whether uncached_acl_sentinel() exists... " >&6; }
ea04106b
AX
33222
33223
33224cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33225/* confdefs.h. */
33226_ACEOF
33227cat confdefs.h >>conftest.$ac_ext
33228cat >>conftest.$ac_ext <<_ACEOF
33229/* end confdefs.h. */
ea04106b
AX
33230
33231
33232 #include <linux/fs.h>
e10b0808 33233
ea04106b
AX
33234int
33235main (void)
33236{
33237
87dac73d 33238 void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
ea04106b
AX
33239
33240 ;
33241 return 0;
33242}
33243
33244_ACEOF
33245
33246
33247
33248cat - <<_ACEOF >conftest.h
33249
33250_ACEOF
33251
33252
33253 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33254 echo "obj-m := conftest.o" >build/Makefile
33255 modpost_flag=''
33256 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33257 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33259 (eval $ac_try) 2>&5
33260 ac_status=$?
3d248aec
AX
33261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33262 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33264 (eval $ac_try) 2>&5
33265 ac_status=$?
3d248aec
AX
33266 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33267 (exit $ac_status); }; }; then
ea04106b 33268
3d248aec 33269 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
33270$as_echo "yes" >&6; }
33271
3d248aec
AX
33272cat >>confdefs.h <<\_ACEOF
33273#define HAVE_KERNEL_GET_ACL_HANDLE_CACHE 1
33274_ACEOF
ea04106b
AX
33275
33276
33277else
33278 $as_echo "$as_me: failed program was:" >&5
33279sed 's/^/| /' conftest.$ac_ext >&5
33280
3d248aec 33281 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
33282$as_echo "no" >&6; }
33283
33284
33285
33286fi
3d248aec 33287
ea04106b
AX
33288 rm -Rf build
33289
33290
33291
e10b0808 33292
3d248aec 33293 { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5
4d815aed
AX
33294$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
33295
ea04106b
AX
33296
33297
33298cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33299/* confdefs.h. */
33300_ACEOF
33301cat confdefs.h >>conftest.$ac_ext
33302cat >>conftest.$ac_ext <<_ACEOF
33303/* end confdefs.h. */
ea04106b
AX
33304
33305
33306 #include <linux/fs.h>
e10b0808 33307
4d815aed
AX
33308 int show_options (struct seq_file * x, struct dentry * y) { return 0; };
33309 static struct super_operations sops __attribute__ ((unused)) = {
33310 .show_options = show_options,
e10b0808 33311 };
ea04106b
AX
33312
33313int
33314main (void)
33315{
33316
ea04106b
AX
33317
33318 ;
33319 return 0;
33320}
33321
33322_ACEOF
33323
33324
33325
33326cat - <<_ACEOF >conftest.h
33327
33328_ACEOF
33329
33330
33331 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33332 echo "obj-m := conftest.o" >build/Makefile
33333 modpost_flag=''
33334 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33335 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33337 (eval $ac_try) 2>&5
33338 ac_status=$?
3d248aec
AX
33339 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33340 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33342 (eval $ac_try) 2>&5
33343 ac_status=$?
3d248aec
AX
33344 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33345 (exit $ac_status); }; }; then
ea04106b 33346
3d248aec 33347 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
33348$as_echo "yes" >&6; }
33349
3d248aec
AX
33350cat >>confdefs.h <<\_ACEOF
33351#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1
33352_ACEOF
ea04106b
AX
33353
33354
33355else
33356 $as_echo "$as_me: failed program was:" >&5
33357sed 's/^/| /' conftest.$ac_ext >&5
33358
3d248aec 33359 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
33360$as_echo "no" >&6; }
33361
33362
33363
33364fi
3d248aec 33365
ea04106b
AX
33366 rm -Rf build
33367
33368
33369
33370
3d248aec 33371 { $as_echo "$as_me:$LINENO: checking whether file_inode() is available" >&5
4d815aed 33372$as_echo_n "checking whether file_inode() is available... " >&6; }
ea04106b
AX
33373
33374
33375cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33376/* confdefs.h. */
33377_ACEOF
33378cat confdefs.h >>conftest.$ac_ext
33379cat >>conftest.$ac_ext <<_ACEOF
33380/* end confdefs.h. */
ea04106b
AX
33381
33382
33383 #include <linux/fs.h>
33384
33385int
33386main (void)
33387{
33388
4d815aed
AX
33389 struct file *f = NULL;
33390 file_inode(f);
ea04106b
AX
33391
33392 ;
33393 return 0;
33394}
33395
33396_ACEOF
33397
33398
33399
33400cat - <<_ACEOF >conftest.h
33401
33402_ACEOF
33403
33404
33405 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33406 echo "obj-m := conftest.o" >build/Makefile
33407 modpost_flag=''
33408 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33409 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33411 (eval $ac_try) 2>&5
33412 ac_status=$?
3d248aec
AX
33413 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33414 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33416 (eval $ac_try) 2>&5
33417 ac_status=$?
3d248aec
AX
33418 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33419 (exit $ac_status); }; }; then
ea04106b 33420
3d248aec 33421 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
33422$as_echo "yes" >&6; }
33423
3d248aec
AX
33424cat >>confdefs.h <<\_ACEOF
33425#define HAVE_FILE_INODE 1
33426_ACEOF
ea04106b
AX
33427
33428
33429else
33430 $as_echo "$as_me: failed program was:" >&5
33431sed 's/^/| /' conftest.$ac_ext >&5
33432
3d248aec 33433 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
33434$as_echo "no" >&6; }
33435
33436
33437
33438fi
3d248aec 33439
ea04106b
AX
33440 rm -Rf build
33441
33442
33443
33444
3d248aec 33445 { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5
4d815aed
AX
33446$as_echo_n "checking whether fops->fsync() wants... " >&6; }
33447
ea04106b
AX
33448
33449
33450cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33451/* confdefs.h. */
33452_ACEOF
33453cat confdefs.h >>conftest.$ac_ext
33454cat >>conftest.$ac_ext <<_ACEOF
33455/* end confdefs.h. */
ea04106b
AX
33456
33457
33458 #include <linux/fs.h>
e10b0808 33459
4d815aed
AX
33460 int test_fsync(struct file *f, struct dentry *dentry, int x)
33461 { return 0; }
e10b0808 33462
4d815aed
AX
33463 static const struct file_operations
33464 fops __attribute__ ((unused)) = {
33465 .fsync = test_fsync,
e10b0808 33466 };
ea04106b
AX
33467
33468int
33469main (void)
33470{
33471
ea04106b
AX
33472
33473 ;
33474 return 0;
33475}
33476
33477_ACEOF
33478
33479
33480
33481cat - <<_ACEOF >conftest.h
33482
33483_ACEOF
33484
33485
33486 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33487 echo "obj-m := conftest.o" >build/Makefile
33488 modpost_flag=''
33489 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33490 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33492 (eval $ac_try) 2>&5
33493 ac_status=$?
3d248aec
AX
33494 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33495 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33496 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33497 (eval $ac_try) 2>&5
33498 ac_status=$?
3d248aec
AX
33499 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33500 (exit $ac_status); }; }; then
ea04106b 33501
3d248aec 33502 { $as_echo "$as_me:$LINENO: result: dentry" >&5
4d815aed 33503$as_echo "dentry" >&6; }
e10b0808 33504
3d248aec
AX
33505cat >>confdefs.h <<\_ACEOF
33506#define HAVE_FSYNC_WITH_DENTRY 1
33507_ACEOF
ea04106b
AX
33508
33509
33510else
33511 $as_echo "$as_me: failed program was:" >&5
33512sed 's/^/| /' conftest.$ac_ext >&5
33513
ea04106b
AX
33514
33515
33516
33517fi
3d248aec 33518
ea04106b
AX
33519 rm -Rf build
33520
33521
33522
33523
ea04106b
AX
33524
33525
33526cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33527/* confdefs.h. */
33528_ACEOF
33529cat confdefs.h >>conftest.$ac_ext
33530cat >>conftest.$ac_ext <<_ACEOF
33531/* end confdefs.h. */
ea04106b
AX
33532
33533
33534 #include <linux/fs.h>
33535
4d815aed 33536 int test_fsync(struct file *f, int x) { return 0; }
ea04106b 33537
4d815aed
AX
33538 static const struct file_operations
33539 fops __attribute__ ((unused)) = {
33540 .fsync = test_fsync,
ea04106b
AX
33541 };
33542
33543int
33544main (void)
33545{
33546
33547
33548 ;
33549 return 0;
33550}
33551
33552_ACEOF
33553
33554
33555
33556cat - <<_ACEOF >conftest.h
33557
33558_ACEOF
33559
33560
33561 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33562 echo "obj-m := conftest.o" >build/Makefile
33563 modpost_flag=''
33564 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33565 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33567 (eval $ac_try) 2>&5
33568 ac_status=$?
3d248aec
AX
33569 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33570 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33572 (eval $ac_try) 2>&5
33573 ac_status=$?
3d248aec
AX
33574 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33575 (exit $ac_status); }; }; then
ea04106b 33576
3d248aec 33577 { $as_echo "$as_me:$LINENO: result: no dentry" >&5
4d815aed 33578$as_echo "no dentry" >&6; }
ea04106b 33579
3d248aec
AX
33580cat >>confdefs.h <<\_ACEOF
33581#define HAVE_FSYNC_WITHOUT_DENTRY 1
33582_ACEOF
ea04106b
AX
33583
33584
33585else
33586 $as_echo "$as_me: failed program was:" >&5
33587sed 's/^/| /' conftest.$ac_ext >&5
33588
ea04106b
AX
33589
33590
33591
33592fi
3d248aec 33593
ea04106b
AX
33594 rm -Rf build
33595
33596
33597
33598
ea04106b
AX
33599
33600
33601cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33602/* confdefs.h. */
33603_ACEOF
33604cat confdefs.h >>conftest.$ac_ext
33605cat >>conftest.$ac_ext <<_ACEOF
33606/* end confdefs.h. */
ea04106b
AX
33607
33608
33609 #include <linux/fs.h>
33610
4d815aed
AX
33611 int test_fsync(struct file *f, loff_t a, loff_t b, int c)
33612 { return 0; }
33613
33614 static const struct file_operations
33615 fops __attribute__ ((unused)) = {
33616 .fsync = test_fsync,
33617 };
33618
ea04106b
AX
33619int
33620main (void)
33621{
33622
33623
33624 ;
33625 return 0;
33626}
33627
33628_ACEOF
33629
33630
33631
33632cat - <<_ACEOF >conftest.h
33633
33634_ACEOF
33635
33636
33637 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33638 echo "obj-m := conftest.o" >build/Makefile
33639 modpost_flag=''
33640 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33641 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33643 (eval $ac_try) 2>&5
33644 ac_status=$?
3d248aec
AX
33645 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33646 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33648 (eval $ac_try) 2>&5
33649 ac_status=$?
3d248aec
AX
33650 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33651 (exit $ac_status); }; }; then
ea04106b 33652
3d248aec 33653 { $as_echo "$as_me:$LINENO: result: range" >&5
4d815aed 33654$as_echo "range" >&6; }
ea04106b 33655
3d248aec
AX
33656cat >>confdefs.h <<\_ACEOF
33657#define HAVE_FSYNC_RANGE 1
33658_ACEOF
ea04106b
AX
33659
33660
33661else
33662 $as_echo "$as_me: failed program was:" >&5
33663sed 's/^/| /' conftest.$ac_ext >&5
33664
ea04106b
AX
33665
33666
33667
33668fi
3d248aec 33669
ea04106b
AX
33670 rm -Rf build
33671
33672
33673
33674
e10b0808 33675
3d248aec 33676 { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5
4d815aed 33677$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
ea04106b
AX
33678
33679
33680cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33681/* confdefs.h. */
33682_ACEOF
33683cat confdefs.h >>conftest.$ac_ext
33684cat >>conftest.$ac_ext <<_ACEOF
33685/* end confdefs.h. */
ea04106b
AX
33686
33687
33688 #include <linux/fs.h>
4d815aed 33689 void evict_inode (struct inode * t) { return; }
e10b0808 33690 static struct super_operations sops __attribute__ ((unused)) = {
4d815aed 33691 .evict_inode = evict_inode,
ea04106b
AX
33692 };
33693
33694int
33695main (void)
33696{
33697
33698
33699 ;
33700 return 0;
33701}
33702
33703_ACEOF
33704
33705
33706
33707cat - <<_ACEOF >conftest.h
33708
33709_ACEOF
33710
33711
33712 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33713 echo "obj-m := conftest.o" >build/Makefile
33714 modpost_flag=''
33715 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33716 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33718 (eval $ac_try) 2>&5
33719 ac_status=$?
3d248aec
AX
33720 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33721 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33723 (eval $ac_try) 2>&5
33724 ac_status=$?
3d248aec
AX
33725 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33726 (exit $ac_status); }; }; then
ea04106b 33727
3d248aec 33728 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
33729$as_echo "yes" >&6; }
33730
3d248aec
AX
33731cat >>confdefs.h <<\_ACEOF
33732#define HAVE_EVICT_INODE 1
33733_ACEOF
ea04106b
AX
33734
33735
33736else
33737 $as_echo "$as_me: failed program was:" >&5
33738sed 's/^/| /' conftest.$ac_ext >&5
33739
3d248aec 33740 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
33741$as_echo "no" >&6; }
33742
33743
33744
33745fi
3d248aec 33746
ea04106b
AX
33747 rm -Rf build
33748
33749
33750
33751
3d248aec 33752 { $as_echo "$as_me:$LINENO: checking whether sops->dirty_inode() wants flags" >&5
4d815aed 33753$as_echo_n "checking whether sops->dirty_inode() wants flags... " >&6; }
ea04106b
AX
33754
33755
33756cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33757/* confdefs.h. */
33758_ACEOF
33759cat confdefs.h >>conftest.$ac_ext
33760cat >>conftest.$ac_ext <<_ACEOF
33761/* end confdefs.h. */
ea04106b
AX
33762
33763
33764 #include <linux/fs.h>
33765
4d815aed
AX
33766 void dirty_inode(struct inode *a, int b) { return; }
33767
33768 static const struct super_operations
33769 sops __attribute__ ((unused)) = {
33770 .dirty_inode = dirty_inode,
33771 };
33772
ea04106b
AX
33773int
33774main (void)
33775{
33776
33777
33778 ;
33779 return 0;
33780}
33781
33782_ACEOF
33783
33784
33785
33786cat - <<_ACEOF >conftest.h
33787
33788_ACEOF
33789
33790
33791 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33792 echo "obj-m := conftest.o" >build/Makefile
33793 modpost_flag=''
33794 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33795 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33797 (eval $ac_try) 2>&5
33798 ac_status=$?
3d248aec
AX
33799 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33800 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33802 (eval $ac_try) 2>&5
33803 ac_status=$?
3d248aec
AX
33804 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33805 (exit $ac_status); }; }; then
ea04106b 33806
3d248aec 33807 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
33808$as_echo "yes" >&6; }
33809
3d248aec
AX
33810cat >>confdefs.h <<\_ACEOF
33811#define HAVE_DIRTY_INODE_WITH_FLAGS 1
33812_ACEOF
ea04106b
AX
33813
33814
33815else
33816 $as_echo "$as_me: failed program was:" >&5
33817sed 's/^/| /' conftest.$ac_ext >&5
33818
3d248aec 33819 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
33820$as_echo "no" >&6; }
33821
33822
33823
33824fi
3d248aec 33825
ea04106b
AX
33826 rm -Rf build
33827
33828
33829
33830
3d248aec 33831 { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5
4d815aed 33832$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
ea04106b
AX
33833
33834
33835cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33836/* confdefs.h. */
33837_ACEOF
33838cat confdefs.h >>conftest.$ac_ext
33839cat >>conftest.$ac_ext <<_ACEOF
33840/* end confdefs.h. */
ea04106b
AX
33841
33842
33843 #include <linux/fs.h>
33844
4d815aed 33845 int nr_cached_objects(struct super_block *sb) { return 0; }
ea04106b 33846
4d815aed
AX
33847 static const struct super_operations
33848 sops __attribute__ ((unused)) = {
33849 .nr_cached_objects = nr_cached_objects,
ea04106b
AX
33850 };
33851
33852int
33853main (void)
33854{
33855
33856
33857 ;
33858 return 0;
33859}
33860
33861_ACEOF
33862
33863
33864
33865cat - <<_ACEOF >conftest.h
33866
33867_ACEOF
33868
33869
33870 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33871 echo "obj-m := conftest.o" >build/Makefile
33872 modpost_flag=''
33873 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33874 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33876 (eval $ac_try) 2>&5
33877 ac_status=$?
3d248aec
AX
33878 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33879 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33881 (eval $ac_try) 2>&5
33882 ac_status=$?
3d248aec
AX
33883 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33884 (exit $ac_status); }; }; then
ea04106b 33885
3d248aec 33886 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 33887$as_echo "yes" >&6; }
ea04106b 33888
3d248aec
AX
33889cat >>confdefs.h <<\_ACEOF
33890#define HAVE_NR_CACHED_OBJECTS 1
33891_ACEOF
ea04106b
AX
33892
33893
33894else
33895 $as_echo "$as_me: failed program was:" >&5
33896sed 's/^/| /' conftest.$ac_ext >&5
33897
3d248aec 33898 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 33899$as_echo "no" >&6; }
ea04106b
AX
33900
33901
33902
33903fi
3d248aec 33904
ea04106b
AX
33905 rm -Rf build
33906
33907
33908
33909
3d248aec 33910 { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5
4d815aed 33911$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
ea04106b
AX
33912
33913
33914cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33915/* confdefs.h. */
33916_ACEOF
33917cat confdefs.h >>conftest.$ac_ext
33918cat >>conftest.$ac_ext <<_ACEOF
33919/* end confdefs.h. */
ea04106b
AX
33920
33921
33922 #include <linux/fs.h>
33923
4d815aed
AX
33924 void free_cached_objects(struct super_block *sb, int x)
33925 { return; }
e10b0808 33926
4d815aed
AX
33927 static const struct super_operations
33928 sops __attribute__ ((unused)) = {
33929 .free_cached_objects = free_cached_objects,
e10b0808
AX
33930 };
33931
ea04106b
AX
33932int
33933main (void)
33934{
33935
ea04106b
AX
33936
33937 ;
33938 return 0;
33939}
33940
33941_ACEOF
33942
33943
33944
33945cat - <<_ACEOF >conftest.h
33946
33947_ACEOF
33948
33949
33950 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
33951 echo "obj-m := conftest.o" >build/Makefile
33952 modpost_flag=''
33953 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
33954 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 33955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33956 (eval $ac_try) 2>&5
33957 ac_status=$?
3d248aec
AX
33958 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33959 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
33960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
33961 (eval $ac_try) 2>&5
33962 ac_status=$?
3d248aec
AX
33963 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
33964 (exit $ac_status); }; }; then
ea04106b 33965
3d248aec 33966 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 33967$as_echo "yes" >&6; }
ea04106b 33968
3d248aec
AX
33969cat >>confdefs.h <<\_ACEOF
33970#define HAVE_FREE_CACHED_OBJECTS 1
33971_ACEOF
ea04106b
AX
33972
33973
33974else
33975 $as_echo "$as_me: failed program was:" >&5
33976sed 's/^/| /' conftest.$ac_ext >&5
33977
3d248aec 33978 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 33979$as_echo "no" >&6; }
ea04106b
AX
33980
33981
33982
33983fi
3d248aec 33984
ea04106b
AX
33985 rm -Rf build
33986
33987
33988
33989
ea04106b 33990
3d248aec 33991 { $as_echo "$as_me:$LINENO: checking whether fops->fallocate() exists" >&5
4d815aed
AX
33992$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
33993
ea04106b
AX
33994
33995cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
33996/* confdefs.h. */
33997_ACEOF
33998cat confdefs.h >>conftest.$ac_ext
33999cat >>conftest.$ac_ext <<_ACEOF
34000/* end confdefs.h. */
ea04106b
AX
34001
34002
34003 #include <linux/fs.h>
34004
4d815aed
AX
34005 long test_fallocate(struct file *file, int mode,
34006 loff_t offset, loff_t len) { return 0; }
e10b0808
AX
34007
34008 static const struct file_operations
34009 fops __attribute__ ((unused)) = {
4d815aed 34010 .fallocate = test_fallocate,
ea04106b
AX
34011 };
34012
34013int
34014main (void)
34015{
34016
34017
34018 ;
34019 return 0;
34020}
34021
34022_ACEOF
34023
34024
34025
34026cat - <<_ACEOF >conftest.h
34027
34028_ACEOF
34029
34030
34031 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34032 echo "obj-m := conftest.o" >build/Makefile
34033 modpost_flag=''
34034 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34035 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34037 (eval $ac_try) 2>&5
34038 ac_status=$?
3d248aec
AX
34039 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34040 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34042 (eval $ac_try) 2>&5
34043 ac_status=$?
3d248aec
AX
34044 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34045 (exit $ac_status); }; }; then
ea04106b 34046
3d248aec 34047 { $as_echo "$as_me:$LINENO: result: yes" >&5
4d815aed 34048$as_echo "yes" >&6; }
ea04106b 34049
3d248aec
AX
34050cat >>confdefs.h <<\_ACEOF
34051#define HAVE_FILE_FALLOCATE 1
34052_ACEOF
ea04106b
AX
34053
34054
34055else
34056 $as_echo "$as_me: failed program was:" >&5
34057sed 's/^/| /' conftest.$ac_ext >&5
34058
3d248aec 34059 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 34060$as_echo "no" >&6; }
ea04106b
AX
34061
34062
34063
34064fi
3d248aec 34065
ea04106b
AX
34066 rm -Rf build
34067
34068
34069
34070
3d248aec 34071 { $as_echo "$as_me:$LINENO: checking whether iops->fallocate() exists" >&5
4d815aed 34072$as_echo_n "checking whether iops->fallocate() exists... " >&6; }
ea04106b
AX
34073
34074
34075cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34076/* confdefs.h. */
34077_ACEOF
34078cat confdefs.h >>conftest.$ac_ext
34079cat >>conftest.$ac_ext <<_ACEOF
34080/* end confdefs.h. */
ea04106b
AX
34081
34082
34083 #include <linux/fs.h>
4d815aed
AX
34084
34085 long test_fallocate(struct inode *inode, int mode,
34086 loff_t offset, loff_t len) { return 0; }
34087
34088 static const struct inode_operations
34089 fops __attribute__ ((unused)) = {
34090 .fallocate = test_fallocate,
e10b0808 34091 };
ea04106b
AX
34092
34093int
34094main (void)
34095{
34096
ea04106b
AX
34097
34098 ;
34099 return 0;
34100}
34101
34102_ACEOF
34103
34104
34105
34106cat - <<_ACEOF >conftest.h
34107
34108_ACEOF
34109
34110
34111 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34112 echo "obj-m := conftest.o" >build/Makefile
34113 modpost_flag=''
34114 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34115 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34117 (eval $ac_try) 2>&5
34118 ac_status=$?
3d248aec
AX
34119 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34120 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34122 (eval $ac_try) 2>&5
34123 ac_status=$?
3d248aec
AX
34124 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34125 (exit $ac_status); }; }; then
ea04106b 34126
3d248aec 34127 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
34128$as_echo "yes" >&6; }
34129
3d248aec
AX
34130cat >>confdefs.h <<\_ACEOF
34131#define HAVE_INODE_FALLOCATE 1
34132_ACEOF
ea04106b
AX
34133
34134
34135else
34136 $as_echo "$as_me: failed program was:" >&5
34137sed 's/^/| /' conftest.$ac_ext >&5
34138
3d248aec 34139 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
34140$as_echo "no" >&6; }
34141
34142
34143
34144fi
3d248aec 34145
ea04106b
AX
34146 rm -Rf build
34147
34148
34149
34150
4d815aed 34151
3d248aec 34152 { $as_echo "$as_me:$LINENO: checking whether fops->aio_fsync() exists" >&5
68d83c55
AX
34153$as_echo_n "checking whether fops->aio_fsync() exists... " >&6; }
34154
34155
34156cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34157/* confdefs.h. */
34158_ACEOF
34159cat confdefs.h >>conftest.$ac_ext
34160cat >>conftest.$ac_ext <<_ACEOF
34161/* end confdefs.h. */
68d83c55
AX
34162
34163
34164 #include <linux/fs.h>
34165
34166 static const struct file_operations
34167 fops __attribute__ ((unused)) = {
34168 .aio_fsync = NULL,
34169 };
34170
34171int
34172main (void)
34173{
34174
34175
34176 ;
34177 return 0;
34178}
34179
34180_ACEOF
34181
34182
34183
34184cat - <<_ACEOF >conftest.h
34185
34186_ACEOF
34187
34188
34189 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34190 echo "obj-m := conftest.o" >build/Makefile
34191 modpost_flag=''
34192 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34193 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34194 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
34195 (eval $ac_try) 2>&5
34196 ac_status=$?
3d248aec
AX
34197 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34198 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
34200 (eval $ac_try) 2>&5
34201 ac_status=$?
3d248aec
AX
34202 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34203 (exit $ac_status); }; }; then
68d83c55 34204
3d248aec 34205 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
34206$as_echo "yes" >&6; }
34207
3d248aec
AX
34208cat >>confdefs.h <<\_ACEOF
34209#define HAVE_FILE_AIO_FSYNC 1
34210_ACEOF
68d83c55
AX
34211
34212
34213else
34214 $as_echo "$as_me: failed program was:" >&5
34215sed 's/^/| /' conftest.$ac_ext >&5
34216
3d248aec 34217 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
34218$as_echo "no" >&6; }
34219
34220
34221
34222fi
3d248aec 34223
68d83c55
AX
34224 rm -Rf build
34225
34226
34227
34228
3d248aec 34229 { $as_echo "$as_me:$LINENO: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5
4d815aed 34230$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; }
ea04106b
AX
34231
34232
34233cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34234/* confdefs.h. */
34235_ACEOF
34236cat confdefs.h >>conftest.$ac_ext
34237cat >>conftest.$ac_ext <<_ACEOF
34238/* end confdefs.h. */
ea04106b
AX
34239
34240
34241 #include <linux/fs.h>
34242
4d815aed
AX
34243 int mkdir(struct inode *inode, struct dentry *dentry,
34244 umode_t umode) { return 0; }
ea04106b 34245
4d815aed
AX
34246 static const struct inode_operations
34247 iops __attribute__ ((unused)) = {
34248 .mkdir = mkdir,
ea04106b
AX
34249 };
34250
34251int
34252main (void)
34253{
34254
34255
34256 ;
34257 return 0;
34258}
34259
34260_ACEOF
34261
34262
34263
34264cat - <<_ACEOF >conftest.h
34265
34266_ACEOF
34267
34268
34269 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34270 echo "obj-m := conftest.o" >build/Makefile
34271 modpost_flag=''
34272 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34273 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34275 (eval $ac_try) 2>&5
34276 ac_status=$?
3d248aec
AX
34277 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34278 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34279 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34280 (eval $ac_try) 2>&5
34281 ac_status=$?
3d248aec
AX
34282 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34283 (exit $ac_status); }; }; then
ea04106b 34284
3d248aec 34285 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 34286$as_echo "yes" >&6; }
ea04106b 34287
3d248aec
AX
34288cat >>confdefs.h <<\_ACEOF
34289#define HAVE_MKDIR_UMODE_T 1
34290_ACEOF
ea04106b
AX
34291
34292
34293else
34294 $as_echo "$as_me: failed program was:" >&5
34295sed 's/^/| /' conftest.$ac_ext >&5
34296
3d248aec 34297 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 34298$as_echo "no" >&6; }
ea04106b
AX
34299
34300
34301
34302fi
3d248aec 34303
ea04106b
AX
34304 rm -Rf build
34305
34306
34307
34308
3d248aec 34309 { $as_echo "$as_me:$LINENO: checking whether iops->lookup() passes nameidata" >&5
4d815aed 34310$as_echo_n "checking whether iops->lookup() passes nameidata... " >&6; }
ea04106b
AX
34311
34312
34313cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34314/* confdefs.h. */
34315_ACEOF
34316cat confdefs.h >>conftest.$ac_ext
34317cat >>conftest.$ac_ext <<_ACEOF
34318/* end confdefs.h. */
ea04106b
AX
34319
34320
34321 #include <linux/fs.h>
34322
4d815aed
AX
34323 struct dentry *inode_lookup(struct inode *inode,
34324 struct dentry *dentry, struct nameidata *nidata)
34325 { return NULL; }
ea04106b 34326
4d815aed
AX
34327 static const struct inode_operations iops
34328 __attribute__ ((unused)) = {
34329 .lookup = inode_lookup,
ea04106b
AX
34330 };
34331
34332int
34333main (void)
34334{
34335
34336
34337 ;
34338 return 0;
34339}
34340
34341_ACEOF
34342
34343
34344
34345cat - <<_ACEOF >conftest.h
34346
34347_ACEOF
34348
34349
34350 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34351 echo "obj-m := conftest.o" >build/Makefile
34352 modpost_flag=''
34353 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34354 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34356 (eval $ac_try) 2>&5
34357 ac_status=$?
3d248aec
AX
34358 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34359 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34361 (eval $ac_try) 2>&5
34362 ac_status=$?
3d248aec
AX
34363 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34364 (exit $ac_status); }; }; then
ea04106b 34365
3d248aec 34366 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 34367$as_echo "yes" >&6; }
ea04106b 34368
3d248aec
AX
34369cat >>confdefs.h <<\_ACEOF
34370#define HAVE_LOOKUP_NAMEIDATA 1
34371_ACEOF
ea04106b
AX
34372
34373
34374else
34375 $as_echo "$as_me: failed program was:" >&5
34376sed 's/^/| /' conftest.$ac_ext >&5
34377
3d248aec 34378 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 34379$as_echo "no" >&6; }
ea04106b
AX
34380
34381
34382
34383fi
3d248aec 34384
ea04106b
AX
34385 rm -Rf build
34386
34387
34388
34389
3d248aec 34390 { $as_echo "$as_me:$LINENO: checking whether iops->create() passes nameidata" >&5
4d815aed 34391$as_echo_n "checking whether iops->create() passes nameidata... " >&6; }
ea04106b
AX
34392
34393
34394cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34395/* confdefs.h. */
34396_ACEOF
34397cat confdefs.h >>conftest.$ac_ext
34398cat >>conftest.$ac_ext <<_ACEOF
34399/* end confdefs.h. */
ea04106b
AX
34400
34401
34402 #include <linux/fs.h>
34403
4d815aed
AX
34404 #ifdef HAVE_MKDIR_UMODE_T
34405 int inode_create(struct inode *inode ,struct dentry *dentry,
34406 umode_t umode, struct nameidata *nidata) { return 0; }
34407 #else
34408 int inode_create(struct inode *inode,struct dentry *dentry,
34409 int umode, struct nameidata * nidata) { return 0; }
34410 #endif
ea04106b 34411
4d815aed
AX
34412 static const struct inode_operations
34413 iops __attribute__ ((unused)) = {
34414 .create = inode_create,
ea04106b
AX
34415 };
34416
34417int
34418main (void)
34419{
34420
34421
34422 ;
34423 return 0;
34424}
34425
34426_ACEOF
34427
34428
34429
34430cat - <<_ACEOF >conftest.h
34431
34432_ACEOF
34433
34434
34435 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34436 echo "obj-m := conftest.o" >build/Makefile
34437 modpost_flag=''
34438 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34439 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34441 (eval $ac_try) 2>&5
34442 ac_status=$?
3d248aec
AX
34443 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34444 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34446 (eval $ac_try) 2>&5
34447 ac_status=$?
3d248aec
AX
34448 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34449 (exit $ac_status); }; }; then
ea04106b 34450
3d248aec 34451 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 34452$as_echo "yes" >&6; }
ea04106b 34453
3d248aec
AX
34454cat >>confdefs.h <<\_ACEOF
34455#define HAVE_CREATE_NAMEIDATA 1
34456_ACEOF
ea04106b
AX
34457
34458
34459else
34460 $as_echo "$as_me: failed program was:" >&5
34461sed 's/^/| /' conftest.$ac_ext >&5
34462
3d248aec 34463 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 34464$as_echo "no" >&6; }
ea04106b
AX
34465
34466
34467
34468fi
3d248aec 34469
ea04106b
AX
34470 rm -Rf build
34471
34472
34473
34474
3d248aec 34475 { $as_echo "$as_me:$LINENO: checking whether iops->get_link() passes delayed" >&5
4d815aed 34476$as_echo_n "checking whether iops->get_link() passes delayed... " >&6; }
ea04106b
AX
34477
34478
34479cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34480/* confdefs.h. */
34481_ACEOF
34482cat confdefs.h >>conftest.$ac_ext
34483cat >>conftest.$ac_ext <<_ACEOF
34484/* end confdefs.h. */
ea04106b
AX
34485
34486
34487 #include <linux/fs.h>
4d815aed
AX
34488 const char *get_link(struct dentry *de, struct inode *ip,
34489 struct delayed_call *done) { return "symlink"; }
34490 static struct inode_operations
34491 iops __attribute__ ((unused)) = {
34492 .get_link = get_link,
ea04106b
AX
34493 };
34494
34495int
34496main (void)
34497{
34498
34499
34500 ;
34501 return 0;
34502}
34503
34504_ACEOF
34505
34506
34507
34508cat - <<_ACEOF >conftest.h
34509
34510_ACEOF
34511
34512
34513 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34514 echo "obj-m := conftest.o" >build/Makefile
34515 modpost_flag=''
34516 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34517 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34519 (eval $ac_try) 2>&5
34520 ac_status=$?
3d248aec
AX
34521 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34522 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34524 (eval $ac_try) 2>&5
34525 ac_status=$?
3d248aec
AX
34526 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34527 (exit $ac_status); }; }; then
ea04106b 34528
3d248aec 34529 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
34530$as_echo "yes" >&6; }
34531
3d248aec
AX
34532cat >>confdefs.h <<\_ACEOF
34533#define HAVE_GET_LINK_DELAYED 1
34534_ACEOF
ea04106b
AX
34535
34536
34537else
34538 $as_echo "$as_me: failed program was:" >&5
34539sed 's/^/| /' conftest.$ac_ext >&5
34540
3d248aec 34541 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 34542$as_echo "no" >&6; }
3d248aec 34543 { $as_echo "$as_me:$LINENO: checking whether iops->get_link() passes cookie" >&5
4d815aed 34544$as_echo_n "checking whether iops->get_link() passes cookie... " >&6; }
e10b0808 34545
ea04106b
AX
34546
34547cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34548/* confdefs.h. */
34549_ACEOF
34550cat confdefs.h >>conftest.$ac_ext
34551cat >>conftest.$ac_ext <<_ACEOF
34552/* end confdefs.h. */
ea04106b
AX
34553
34554
4d815aed
AX
34555 #include <linux/fs.h>
34556 const char *get_link(struct dentry *de, struct
34557 inode *ip, void **cookie) { return "symlink"; }
34558 static struct inode_operations
34559 iops __attribute__ ((unused)) = {
34560 .get_link = get_link,
34561 };
ea04106b
AX
34562
34563int
34564main (void)
34565{
34566
34567
34568 ;
34569 return 0;
34570}
34571
34572_ACEOF
34573
34574
34575
34576cat - <<_ACEOF >conftest.h
34577
34578_ACEOF
34579
34580
34581 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34582 echo "obj-m := conftest.o" >build/Makefile
34583 modpost_flag=''
34584 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34585 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34587 (eval $ac_try) 2>&5
34588 ac_status=$?
3d248aec
AX
34589 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34590 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34592 (eval $ac_try) 2>&5
34593 ac_status=$?
3d248aec
AX
34594 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34595 (exit $ac_status); }; }; then
ea04106b 34596
3d248aec 34597 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
34598$as_echo "yes" >&6; }
34599
3d248aec
AX
34600cat >>confdefs.h <<\_ACEOF
34601#define HAVE_GET_LINK_COOKIE 1
34602_ACEOF
ea04106b
AX
34603
34604
34605else
34606 $as_echo "$as_me: failed program was:" >&5
34607sed 's/^/| /' conftest.$ac_ext >&5
34608
3d248aec 34609 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
34610$as_echo "no" >&6; }
34611
3d248aec 34612 { $as_echo "$as_me:$LINENO: checking whether iops->follow_link() passes cookie" >&5
4d815aed 34613$as_echo_n "checking whether iops->follow_link() passes cookie... " >&6; }
ea04106b
AX
34614
34615
34616cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34617/* confdefs.h. */
34618_ACEOF
34619cat confdefs.h >>conftest.$ac_ext
34620cat >>conftest.$ac_ext <<_ACEOF
34621/* end confdefs.h. */
ea04106b
AX
34622
34623
34624 #include <linux/fs.h>
4d815aed
AX
34625 const char *follow_link(struct dentry *de,
34626 void **cookie) { return "symlink"; }
34627 static struct inode_operations
e10b0808 34628 iops __attribute__ ((unused)) = {
4d815aed 34629 .follow_link = follow_link,
ea04106b
AX
34630 };
34631
34632int
34633main (void)
34634{
34635
34636
34637 ;
34638 return 0;
34639}
34640
34641_ACEOF
34642
34643
34644
34645cat - <<_ACEOF >conftest.h
34646
34647_ACEOF
34648
34649
34650 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34651 echo "obj-m := conftest.o" >build/Makefile
34652 modpost_flag=''
34653 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34654 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34656 (eval $ac_try) 2>&5
34657 ac_status=$?
3d248aec
AX
34658 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34659 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34661 (eval $ac_try) 2>&5
34662 ac_status=$?
3d248aec
AX
34663 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34664 (exit $ac_status); }; }; then
ea04106b 34665
3d248aec 34666 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
34667$as_echo "yes" >&6; }
34668
3d248aec
AX
34669cat >>confdefs.h <<\_ACEOF
34670#define HAVE_FOLLOW_LINK_COOKIE 1
34671_ACEOF
ea04106b
AX
34672
34673
34674else
34675 $as_echo "$as_me: failed program was:" >&5
34676sed 's/^/| /' conftest.$ac_ext >&5
34677
3d248aec 34678 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 34679$as_echo "no" >&6; }
3d248aec 34680 { $as_echo "$as_me:$LINENO: checking whether iops->follow_link() passes nameidata" >&5
4d815aed 34681$as_echo_n "checking whether iops->follow_link() passes nameidata... " >&6; }
ea04106b
AX
34682
34683
34684cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34685/* confdefs.h. */
34686_ACEOF
34687cat confdefs.h >>conftest.$ac_ext
34688cat >>conftest.$ac_ext <<_ACEOF
34689/* end confdefs.h. */
ea04106b
AX
34690
34691
34692 #include <linux/fs.h>
4d815aed
AX
34693 void *follow_link(struct dentry *de, struct
34694 nameidata *nd) { return (void *)NULL; }
34695 static struct inode_operations
34696 iops __attribute__ ((unused)) = {
34697 .follow_link = follow_link,
34698 };
ea04106b
AX
34699
34700int
34701main (void)
34702{
34703
34704
34705 ;
34706 return 0;
34707}
34708
34709_ACEOF
34710
34711
34712
34713cat - <<_ACEOF >conftest.h
34714
34715_ACEOF
34716
34717
34718 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34719 echo "obj-m := conftest.o" >build/Makefile
34720 modpost_flag=''
34721 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34722 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34724 (eval $ac_try) 2>&5
34725 ac_status=$?
3d248aec
AX
34726 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34727 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34729 (eval $ac_try) 2>&5
34730 ac_status=$?
3d248aec
AX
34731 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34732 (exit $ac_status); }; }; then
ea04106b 34733
3d248aec 34734 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
34735$as_echo "yes" >&6; }
34736
3d248aec
AX
34737cat >>confdefs.h <<\_ACEOF
34738#define HAVE_FOLLOW_LINK_NAMEIDATA 1
34739_ACEOF
ea04106b
AX
34740
34741
34742else
34743 $as_echo "$as_me: failed program was:" >&5
34744sed 's/^/| /' conftest.$ac_ext >&5
34745
3d248aec
AX
34746 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
34747$as_echo "$as_me: error: no; please file a bug report" >&2;}
34748 { (exit 1); exit 1; }; }
ea04106b
AX
34749
34750
34751
34752fi
3d248aec 34753
ea04106b
AX
34754 rm -Rf build
34755
34756
34757
34758
ea04106b 34759
4d815aed 34760fi
3d248aec 34761
4d815aed 34762 rm -Rf build
ea04106b 34763
ea04106b
AX
34764
34765
ea04106b 34766
ea04106b 34767
4d815aed
AX
34768
34769fi
3d248aec 34770
4d815aed
AX
34771 rm -Rf build
34772
34773
34774
34775
34776
34777fi
3d248aec 34778
4d815aed
AX
34779 rm -Rf build
34780
34781
34782
34783
34784
34785
34786cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34787/* confdefs.h. */
34788_ACEOF
34789cat confdefs.h >>conftest.$ac_ext
34790cat >>conftest.$ac_ext <<_ACEOF
34791/* end confdefs.h. */
4d815aed
AX
34792
34793
34794 #if !defined(HAVE_GET_LINK_DELAYED)
34795 #error "Expecting get_link() delayed done"
34796 #endif
ea04106b
AX
34797
34798int
34799main (void)
34800{
34801
34802
34803 ;
34804 return 0;
34805}
34806
34807_ACEOF
34808
34809
34810
34811cat - <<_ACEOF >conftest.h
34812
34813_ACEOF
34814
34815
34816 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34817 echo "obj-m := conftest.o" >build/Makefile
34818 modpost_flag=''
34819 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34820 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34822 (eval $ac_try) 2>&5
34823 ac_status=$?
3d248aec
AX
34824 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34825 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34827 (eval $ac_try) 2>&5
34828 ac_status=$?
3d248aec
AX
34829 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34830 (exit $ac_status); }; }; then
ea04106b 34831
ea04106b 34832
3d248aec
AX
34833cat >>confdefs.h <<\_ACEOF
34834#define HAVE_PUT_LINK_DELAYED 1
34835_ACEOF
ea04106b
AX
34836
34837
34838else
34839 $as_echo "$as_me: failed program was:" >&5
34840sed 's/^/| /' conftest.$ac_ext >&5
34841
3d248aec 34842 { $as_echo "$as_me:$LINENO: checking whether iops->put_link() passes cookie" >&5
4d815aed 34843$as_echo_n "checking whether iops->put_link() passes cookie... " >&6; }
ea04106b
AX
34844
34845
34846cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34847/* confdefs.h. */
34848_ACEOF
34849cat confdefs.h >>conftest.$ac_ext
34850cat >>conftest.$ac_ext <<_ACEOF
34851/* end confdefs.h. */
ea04106b
AX
34852
34853
4d815aed
AX
34854 #include <linux/fs.h>
34855 void put_link(struct inode *ip, void *cookie)
34856 { return; }
34857 static struct inode_operations
34858 iops __attribute__ ((unused)) = {
34859 .put_link = put_link,
34860 };
ea04106b
AX
34861
34862int
34863main (void)
34864{
34865
34866
34867 ;
34868 return 0;
34869}
34870
34871_ACEOF
34872
34873
34874
34875cat - <<_ACEOF >conftest.h
34876
34877_ACEOF
34878
34879
34880 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34881 echo "obj-m := conftest.o" >build/Makefile
34882 modpost_flag=''
34883 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34884 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34886 (eval $ac_try) 2>&5
34887 ac_status=$?
3d248aec
AX
34888 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34889 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
34891 (eval $ac_try) 2>&5
34892 ac_status=$?
3d248aec
AX
34893 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34894 (exit $ac_status); }; }; then
ea04106b 34895
3d248aec 34896 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
34897$as_echo "yes" >&6; }
34898
3d248aec
AX
34899cat >>confdefs.h <<\_ACEOF
34900#define HAVE_PUT_LINK_COOKIE 1
34901_ACEOF
68d83c55
AX
34902
34903
34904else
34905 $as_echo "$as_me: failed program was:" >&5
34906sed 's/^/| /' conftest.$ac_ext >&5
34907
3d248aec 34908 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 34909$as_echo "no" >&6; }
3d248aec 34910 { $as_echo "$as_me:$LINENO: checking whether iops->put_link() passes nameidata" >&5
68d83c55
AX
34911$as_echo_n "checking whether iops->put_link() passes nameidata... " >&6; }
34912
34913
34914cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
34915/* confdefs.h. */
34916_ACEOF
34917cat confdefs.h >>conftest.$ac_ext
34918cat >>conftest.$ac_ext <<_ACEOF
34919/* end confdefs.h. */
68d83c55
AX
34920
34921
34922 #include <linux/fs.h>
34923 void put_link(struct dentry *de, struct
34924 nameidata *nd, void *ptr) { return; }
34925 static struct inode_operations
34926 iops __attribute__ ((unused)) = {
34927 .put_link = put_link,
34928 };
34929
34930int
34931main (void)
34932{
34933
34934
34935 ;
34936 return 0;
34937}
34938
34939_ACEOF
34940
34941
34942
34943cat - <<_ACEOF >conftest.h
34944
34945_ACEOF
34946
34947
34948 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
34949 echo "obj-m := conftest.o" >build/Makefile
34950 modpost_flag=''
34951 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
34952 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 34953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
34954 (eval $ac_try) 2>&5
34955 ac_status=$?
3d248aec
AX
34956 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34957 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
34958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
34959 (eval $ac_try) 2>&5
34960 ac_status=$?
3d248aec
AX
34961 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
34962 (exit $ac_status); }; }; then
68d83c55 34963
3d248aec 34964 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
34965$as_echo "yes" >&6; }
34966
3d248aec
AX
34967cat >>confdefs.h <<\_ACEOF
34968#define HAVE_PUT_LINK_NAMEIDATA 1
34969_ACEOF
68d83c55
AX
34970
34971
34972else
34973 $as_echo "$as_me: failed program was:" >&5
34974sed 's/^/| /' conftest.$ac_ext >&5
34975
3d248aec
AX
34976 { { $as_echo "$as_me:$LINENO: error: no; please file a bug report" >&5
34977$as_echo "$as_me: error: no; please file a bug report" >&2;}
34978 { (exit 1); exit 1; }; }
68d83c55
AX
34979
34980
34981
34982fi
3d248aec 34983
68d83c55
AX
34984 rm -Rf build
34985
34986
34987
34988
34989
34990fi
3d248aec 34991
68d83c55
AX
34992 rm -Rf build
34993
34994
34995
34996
34997
34998fi
3d248aec 34999
68d83c55
AX
35000 rm -Rf build
35001
35002
35003
35004
3d248aec 35005 { $as_echo "$as_me:$LINENO: checking whether iops->truncate_range() exists" >&5
68d83c55
AX
35006$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
35007
35008
35009cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35010/* confdefs.h. */
35011_ACEOF
35012cat confdefs.h >>conftest.$ac_ext
35013cat >>conftest.$ac_ext <<_ACEOF
35014/* end confdefs.h. */
68d83c55
AX
35015
35016
35017 #include <linux/fs.h>
35018 void truncate_range(struct inode *inode, loff_t start,
35019 loff_t end) { return; }
35020 static struct inode_operations iops __attribute__ ((unused)) = {
35021 .truncate_range = truncate_range,
35022 };
35023
35024int
35025main (void)
35026{
35027
35028
35029 ;
35030 return 0;
35031}
35032
35033_ACEOF
35034
35035
35036
35037cat - <<_ACEOF >conftest.h
35038
35039_ACEOF
35040
35041
35042 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35043 echo "obj-m := conftest.o" >build/Makefile
35044 modpost_flag=''
35045 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35046 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
35048 (eval $ac_try) 2>&5
35049 ac_status=$?
3d248aec
AX
35050 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35051 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
35053 (eval $ac_try) 2>&5
35054 ac_status=$?
3d248aec
AX
35055 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35056 (exit $ac_status); }; }; then
68d83c55 35057
3d248aec 35058 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
35059$as_echo "yes" >&6; }
35060
3d248aec
AX
35061cat >>confdefs.h <<\_ACEOF
35062#define HAVE_INODE_TRUNCATE_RANGE 1
35063_ACEOF
ea04106b
AX
35064
35065
4d815aed
AX
35066else
35067 $as_echo "$as_me: failed program was:" >&5
35068sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 35069
3d248aec 35070 { $as_echo "$as_me:$LINENO: result: no" >&5
4d815aed 35071$as_echo "no" >&6; }
4d815aed
AX
35072
35073
35074
35075fi
3d248aec 35076
4d815aed
AX
35077 rm -Rf build
35078
35079
35080
35081
3d248aec 35082 { $as_echo "$as_me:$LINENO: checking whether dops->d_automount() exists" >&5
68d83c55 35083$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
ea04106b
AX
35084
35085
35086cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35087/* confdefs.h. */
35088_ACEOF
35089cat confdefs.h >>conftest.$ac_ext
35090cat >>conftest.$ac_ext <<_ACEOF
35091/* end confdefs.h. */
ea04106b
AX
35092
35093
68d83c55
AX
35094 #include <linux/dcache.h>
35095 struct vfsmount *d_automount(struct path *p) { return NULL; }
35096 struct dentry_operations dops __attribute__ ((unused)) = {
35097 .d_automount = d_automount,
ea04106b
AX
35098 };
35099
35100int
35101main (void)
35102{
35103
35104
35105 ;
35106 return 0;
35107}
35108
35109_ACEOF
35110
35111
35112
35113cat - <<_ACEOF >conftest.h
35114
35115_ACEOF
35116
35117
35118 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35119 echo "obj-m := conftest.o" >build/Makefile
35120 modpost_flag=''
35121 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35122 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35124 (eval $ac_try) 2>&5
35125 ac_status=$?
3d248aec
AX
35126 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35127 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35129 (eval $ac_try) 2>&5
35130 ac_status=$?
3d248aec
AX
35131 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35132 (exit $ac_status); }; }; then
ea04106b 35133
3d248aec 35134 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
35135$as_echo "yes" >&6; }
35136
3d248aec
AX
35137cat >>confdefs.h <<\_ACEOF
35138#define HAVE_AUTOMOUNT 1
35139_ACEOF
ea04106b
AX
35140
35141
35142else
35143 $as_echo "$as_me: failed program was:" >&5
35144sed 's/^/| /' conftest.$ac_ext >&5
35145
3d248aec 35146 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35147$as_echo "no" >&6; }
35148
35149
35150
35151fi
3d248aec 35152
ea04106b
AX
35153 rm -Rf build
35154
35155
35156
35157
3d248aec 35158 { $as_echo "$as_me:$LINENO: checking whether eops->encode_fh() wants inode" >&5
68d83c55 35159$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
ea04106b
AX
35160
35161
35162cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35163/* confdefs.h. */
35164_ACEOF
35165cat confdefs.h >>conftest.$ac_ext
35166cat >>conftest.$ac_ext <<_ACEOF
35167/* end confdefs.h. */
ea04106b
AX
35168
35169
68d83c55
AX
35170 #include <linux/exportfs.h>
35171 int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
35172 struct inode *parent) { return 0; }
35173 static struct export_operations eops __attribute__ ((unused))={
35174 .encode_fh = encode_fh,
ea04106b
AX
35175 };
35176
35177int
35178main (void)
35179{
35180
35181
35182 ;
35183 return 0;
35184}
35185
35186_ACEOF
35187
35188
35189
35190cat - <<_ACEOF >conftest.h
35191
35192_ACEOF
35193
35194
35195 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35196 echo "obj-m := conftest.o" >build/Makefile
35197 modpost_flag=''
35198 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35199 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35201 (eval $ac_try) 2>&5
35202 ac_status=$?
3d248aec
AX
35203 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35204 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35206 (eval $ac_try) 2>&5
35207 ac_status=$?
3d248aec
AX
35208 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35209 (exit $ac_status); }; }; then
ea04106b 35210
3d248aec 35211 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
35212$as_echo "yes" >&6; }
35213
3d248aec
AX
35214cat >>confdefs.h <<\_ACEOF
35215#define HAVE_ENCODE_FH_WITH_INODE 1
35216_ACEOF
ea04106b
AX
35217
35218
35219else
35220 $as_echo "$as_me: failed program was:" >&5
35221sed 's/^/| /' conftest.$ac_ext >&5
35222
3d248aec 35223 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35224$as_echo "no" >&6; }
35225
35226
35227
35228fi
3d248aec 35229
ea04106b
AX
35230 rm -Rf build
35231
35232
35233
35234
3d248aec 35235 { $as_echo "$as_me:$LINENO: checking whether eops->commit_metadata() exists" >&5
68d83c55 35236$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; }
ea04106b
AX
35237
35238
35239cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35240/* confdefs.h. */
35241_ACEOF
35242cat confdefs.h >>conftest.$ac_ext
35243cat >>conftest.$ac_ext <<_ACEOF
35244/* end confdefs.h. */
ea04106b
AX
35245
35246
e10b0808 35247 #include <linux/exportfs.h>
68d83c55 35248 int commit_metadata(struct inode *inode) { return 0; }
e10b0808 35249 static struct export_operations eops __attribute__ ((unused))={
68d83c55 35250 .commit_metadata = commit_metadata,
ea04106b
AX
35251 };
35252
35253int
35254main (void)
35255{
35256
35257
35258 ;
35259 return 0;
35260}
35261
35262_ACEOF
35263
35264
35265
35266cat - <<_ACEOF >conftest.h
35267
35268_ACEOF
35269
35270
35271 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35272 echo "obj-m := conftest.o" >build/Makefile
35273 modpost_flag=''
35274 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35275 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35277 (eval $ac_try) 2>&5
35278 ac_status=$?
3d248aec
AX
35279 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35280 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35282 (eval $ac_try) 2>&5
35283 ac_status=$?
3d248aec
AX
35284 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35285 (exit $ac_status); }; }; then
ea04106b 35286
3d248aec 35287 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
35288$as_echo "yes" >&6; }
35289
3d248aec
AX
35290cat >>confdefs.h <<\_ACEOF
35291#define HAVE_COMMIT_METADATA 1
35292_ACEOF
ea04106b
AX
35293
35294
35295else
35296 $as_echo "$as_me: failed program was:" >&5
35297sed 's/^/| /' conftest.$ac_ext >&5
35298
3d248aec 35299 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35300$as_echo "no" >&6; }
35301
35302
35303
35304fi
3d248aec 35305
ea04106b
AX
35306 rm -Rf build
35307
35308
35309
3d248aec 35310 { $as_echo "$as_me:$LINENO: checking whether clear_inode() is available" >&5
68d83c55 35311$as_echo_n "checking whether clear_inode() is available... " >&6; }
ea04106b 35312
ea04106b
AX
35313
35314
35315cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35316/* confdefs.h. */
35317_ACEOF
35318cat confdefs.h >>conftest.$ac_ext
35319cat >>conftest.$ac_ext <<_ACEOF
35320/* end confdefs.h. */
ea04106b
AX
35321
35322
68d83c55 35323 #include <linux/fs.h>
ea04106b
AX
35324
35325int
35326main (void)
35327{
35328
68d83c55 35329 clear_inode(NULL);
ea04106b
AX
35330
35331 ;
35332 return 0;
35333}
35334
35335_ACEOF
35336
35337
35338
35339cat - <<_ACEOF >conftest.h
35340
35341_ACEOF
35342
35343
35344 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35345 echo "obj-m := conftest.o" >build/Makefile
35346 modpost_flag=''
35347 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35348 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35350 (eval $ac_try) 2>&5
35351 ac_status=$?
3d248aec
AX
35352 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35353 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35355 (eval $ac_try) 2>&5
35356 ac_status=$?
3d248aec
AX
35357 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35358 (exit $ac_status); }; }; then
68d83c55
AX
35359 rc=0
35360else
35361 $as_echo "$as_me: failed program was:" >&5
35362sed 's/^/| /' conftest.$ac_ext >&5
35363 rc=1
ea04106b 35364
ea04106b 35365
68d83c55 35366fi
3d248aec 35367
68d83c55 35368 rm -Rf build
ea04106b
AX
35369
35370
68d83c55 35371 if test $rc -ne 0; then :
ea04106b 35372
3d248aec 35373 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35374$as_echo "no" >&6; }
35375
68d83c55
AX
35376 else
35377 if test "x$enable_linux_builtin" != xyes; then
ea04106b 35378
68d83c55
AX
35379 grep -q -E '[[:space:]]clear_inode[[:space:]]' \
35380 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
35381 rc=$?
35382 if test $rc -ne 0; then
35383 export=0
35384 for file in fs/inode.c; do
35385 grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
35386 "$LINUX/$file" 2>/dev/null
35387 rc=$?
35388 if test $rc -eq 0; then
35389 export=1
35390 break;
35391 fi
35392 done
35393 if test $export -eq 0; then :
35394 rc=1
35395 else :
35396 rc=0
35397 fi
35398 else :
35399 rc=0
35400 fi
ea04106b 35401
68d83c55
AX
35402 fi
35403 if test $rc -ne 0; then :
ea04106b 35404
3d248aec 35405 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 35406$as_echo "no" >&6; }
ea04106b 35407
68d83c55 35408 else :
ea04106b 35409
3d248aec 35410 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
35411$as_echo "yes" >&6; }
35412
3d248aec
AX
35413cat >>confdefs.h <<\_ACEOF
35414#define HAVE_CLEAR_INODE 1
35415_ACEOF
68d83c55
AX
35416
35417
35418 fi
35419 fi
35420
35421
3d248aec 35422 { $as_echo "$as_me:$LINENO: checking whether setattr_prepare() is available" >&5
68d83c55 35423$as_echo_n "checking whether setattr_prepare() is available... " >&6; }
ea04106b 35424
ea04106b
AX
35425
35426
35427cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35428/* confdefs.h. */
35429_ACEOF
35430cat confdefs.h >>conftest.$ac_ext
35431cat >>conftest.$ac_ext <<_ACEOF
35432/* end confdefs.h. */
ea04106b
AX
35433
35434
e10b0808 35435 #include <linux/fs.h>
ea04106b
AX
35436
35437int
35438main (void)
35439{
35440
68d83c55
AX
35441 struct dentry *dentry = NULL;
35442 struct iattr *attr = NULL;
35443 int error;
35444
35445 error = setattr_prepare(dentry, attr);
ea04106b
AX
35446
35447 ;
35448 return 0;
35449}
35450
35451_ACEOF
35452
35453
35454
35455cat - <<_ACEOF >conftest.h
35456
35457_ACEOF
35458
35459
35460 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35461 echo "obj-m := conftest.o" >build/Makefile
35462 modpost_flag=''
35463 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35464 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35466 (eval $ac_try) 2>&5
35467 ac_status=$?
3d248aec
AX
35468 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35469 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35471 (eval $ac_try) 2>&5
35472 ac_status=$?
3d248aec
AX
35473 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35474 (exit $ac_status); }; }; then
e10b0808
AX
35475 rc=0
35476else
35477 $as_echo "$as_me: failed program was:" >&5
35478sed 's/^/| /' conftest.$ac_ext >&5
35479 rc=1
ea04106b 35480
ea04106b 35481
e10b0808 35482fi
3d248aec 35483
e10b0808 35484 rm -Rf build
ea04106b
AX
35485
35486
e10b0808
AX
35487 if test $rc -ne 0; then :
35488
3d248aec 35489 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
35490$as_echo "no" >&6; }
35491
35492 else
35493 if test "x$enable_linux_builtin" != xyes; then
35494
68d83c55 35495 grep -q -E '[[:space:]]setattr_prepare[[:space:]]' \
e10b0808
AX
35496 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
35497 rc=$?
35498 if test $rc -ne 0; then
35499 export=0
68d83c55
AX
35500 for file in fs/attr.c; do
35501 grep -q -E "EXPORT_SYMBOL.*(setattr_prepare)" \
e10b0808
AX
35502 "$LINUX/$file" 2>/dev/null
35503 rc=$?
35504 if test $rc -eq 0; then
35505 export=1
35506 break;
35507 fi
35508 done
35509 if test $export -eq 0; then :
35510 rc=1
35511 else :
35512 rc=0
35513 fi
35514 else :
35515 rc=0
35516 fi
35517
35518 fi
35519 if test $rc -ne 0; then :
ea04106b 35520
3d248aec 35521 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35522$as_echo "no" >&6; }
35523
e10b0808
AX
35524 else :
35525
3d248aec 35526 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 35527$as_echo "yes" >&6; }
ea04106b 35528
3d248aec
AX
35529cat >>confdefs.h <<\_ACEOF
35530#define HAVE_SETATTR_PREPARE 1
35531_ACEOF
ea04106b 35532
ea04106b 35533
e10b0808
AX
35534 fi
35535 fi
ea04106b
AX
35536
35537
3d248aec 35538 { $as_echo "$as_me:$LINENO: checking whether insert_inode_locked() is available" >&5
e10b0808 35539$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
ea04106b 35540
ea04106b
AX
35541
35542
35543cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35544/* confdefs.h. */
35545_ACEOF
35546cat confdefs.h >>conftest.$ac_ext
35547cat >>conftest.$ac_ext <<_ACEOF
35548/* end confdefs.h. */
ea04106b
AX
35549
35550
e10b0808 35551 #include <linux/fs.h>
ea04106b
AX
35552
35553int
35554main (void)
35555{
35556
e10b0808 35557 insert_inode_locked(NULL);
ea04106b
AX
35558
35559 ;
35560 return 0;
35561}
35562
35563_ACEOF
35564
35565
35566
35567cat - <<_ACEOF >conftest.h
35568
35569_ACEOF
35570
35571
35572 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35573 echo "obj-m := conftest.o" >build/Makefile
35574 modpost_flag=''
35575 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35576 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35578 (eval $ac_try) 2>&5
35579 ac_status=$?
3d248aec
AX
35580 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35581 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35583 (eval $ac_try) 2>&5
35584 ac_status=$?
3d248aec
AX
35585 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35586 (exit $ac_status); }; }; then
e10b0808
AX
35587 rc=0
35588else
35589 $as_echo "$as_me: failed program was:" >&5
35590sed 's/^/| /' conftest.$ac_ext >&5
35591 rc=1
ea04106b 35592
ea04106b 35593
e10b0808 35594fi
3d248aec 35595
e10b0808 35596 rm -Rf build
ea04106b
AX
35597
35598
e10b0808
AX
35599 if test $rc -ne 0; then :
35600
3d248aec 35601 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
35602$as_echo "no" >&6; }
35603
35604 else
35605 if test "x$enable_linux_builtin" != xyes; then
35606
35607 grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
35608 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
35609 rc=$?
35610 if test $rc -ne 0; then
35611 export=0
35612 for file in fs/inode.c; do
35613 grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
35614 "$LINUX/$file" 2>/dev/null
35615 rc=$?
35616 if test $rc -eq 0; then
35617 export=1
35618 break;
35619 fi
35620 done
35621 if test $export -eq 0; then :
35622 rc=1
35623 else :
35624 rc=0
35625 fi
35626 else :
35627 rc=0
35628 fi
35629
35630 fi
35631 if test $rc -ne 0; then :
ea04106b 35632
3d248aec 35633 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35634$as_echo "no" >&6; }
35635
e10b0808
AX
35636 else :
35637
3d248aec 35638 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 35639$as_echo "yes" >&6; }
ea04106b 35640
3d248aec
AX
35641cat >>confdefs.h <<\_ACEOF
35642#define HAVE_INSERT_INODE_LOCKED 1
35643_ACEOF
ea04106b 35644
ea04106b 35645
e10b0808
AX
35646 fi
35647 fi
ea04106b
AX
35648
35649
3d248aec 35650 { $as_echo "$as_me:$LINENO: checking whether d_make_root() is available" >&5
e10b0808 35651$as_echo_n "checking whether d_make_root() is available... " >&6; }
ea04106b
AX
35652
35653
35654
35655cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35656/* confdefs.h. */
35657_ACEOF
35658cat confdefs.h >>conftest.$ac_ext
35659cat >>conftest.$ac_ext <<_ACEOF
35660/* end confdefs.h. */
ea04106b
AX
35661
35662
e10b0808 35663 #include <linux/dcache.h>
ea04106b
AX
35664
35665int
35666main (void)
35667{
35668
e10b0808 35669 d_make_root(NULL);
ea04106b
AX
35670
35671 ;
35672 return 0;
35673}
35674
35675_ACEOF
35676
35677
35678
35679cat - <<_ACEOF >conftest.h
35680
35681_ACEOF
35682
35683
35684 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35685 echo "obj-m := conftest.o" >build/Makefile
35686 modpost_flag=''
35687 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35688 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35690 (eval $ac_try) 2>&5
35691 ac_status=$?
3d248aec
AX
35692 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35693 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35694 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35695 (eval $ac_try) 2>&5
35696 ac_status=$?
3d248aec
AX
35697 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35698 (exit $ac_status); }; }; then
ea04106b
AX
35699 rc=0
35700else
35701 $as_echo "$as_me: failed program was:" >&5
35702sed 's/^/| /' conftest.$ac_ext >&5
35703 rc=1
35704
35705
35706fi
3d248aec 35707
ea04106b
AX
35708 rm -Rf build
35709
35710
35711 if test $rc -ne 0; then :
35712
3d248aec 35713 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35714$as_echo "no" >&6; }
35715
35716 else
35717 if test "x$enable_linux_builtin" != xyes; then
35718
e10b0808 35719 grep -q -E '[[:space:]]d_make_root[[:space:]]' \
ea04106b
AX
35720 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
35721 rc=$?
35722 if test $rc -ne 0; then
35723 export=0
e10b0808
AX
35724 for file in fs/dcache.c; do
35725 grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
ea04106b
AX
35726 "$LINUX/$file" 2>/dev/null
35727 rc=$?
35728 if test $rc -eq 0; then
35729 export=1
35730 break;
35731 fi
35732 done
35733 if test $export -eq 0; then :
35734 rc=1
35735 else :
35736 rc=0
35737 fi
35738 else :
35739 rc=0
35740 fi
35741
35742 fi
35743 if test $rc -ne 0; then :
35744
3d248aec 35745 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35746$as_echo "no" >&6; }
35747
35748 else :
35749
3d248aec 35750 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
35751$as_echo "yes" >&6; }
35752
3d248aec
AX
35753cat >>confdefs.h <<\_ACEOF
35754#define HAVE_D_MAKE_ROOT 1
35755_ACEOF
ea04106b
AX
35756
35757
35758 fi
35759 fi
35760
35761
3d248aec 35762 { $as_echo "$as_me:$LINENO: checking whether d_obtain_alias() is available" >&5
e10b0808 35763$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
ea04106b
AX
35764
35765
35766
35767cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35768/* confdefs.h. */
35769_ACEOF
35770cat confdefs.h >>conftest.$ac_ext
35771cat >>conftest.$ac_ext <<_ACEOF
35772/* end confdefs.h. */
ea04106b
AX
35773
35774
e10b0808 35775 #include <linux/dcache.h>
ea04106b
AX
35776
35777int
35778main (void)
35779{
35780
e10b0808 35781 d_obtain_alias(NULL);
ea04106b
AX
35782
35783 ;
35784 return 0;
35785}
35786
35787_ACEOF
35788
35789
35790
35791cat - <<_ACEOF >conftest.h
35792
35793_ACEOF
35794
35795
35796 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35797 echo "obj-m := conftest.o" >build/Makefile
35798 modpost_flag=''
35799 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35800 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35802 (eval $ac_try) 2>&5
35803 ac_status=$?
3d248aec
AX
35804 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35805 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35807 (eval $ac_try) 2>&5
35808 ac_status=$?
3d248aec
AX
35809 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35810 (exit $ac_status); }; }; then
ea04106b
AX
35811 rc=0
35812else
35813 $as_echo "$as_me: failed program was:" >&5
35814sed 's/^/| /' conftest.$ac_ext >&5
35815 rc=1
35816
35817
35818fi
3d248aec 35819
ea04106b
AX
35820 rm -Rf build
35821
35822
35823 if test $rc -ne 0; then :
35824
3d248aec 35825 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35826$as_echo "no" >&6; }
35827
35828 else
35829 if test "x$enable_linux_builtin" != xyes; then
35830
e10b0808 35831 grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
ea04106b
AX
35832 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
35833 rc=$?
35834 if test $rc -ne 0; then
35835 export=0
e10b0808
AX
35836 for file in fs/dcache.c; do
35837 grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
ea04106b
AX
35838 "$LINUX/$file" 2>/dev/null
35839 rc=$?
35840 if test $rc -eq 0; then
35841 export=1
35842 break;
35843 fi
35844 done
35845 if test $export -eq 0; then :
35846 rc=1
35847 else :
35848 rc=0
35849 fi
35850 else :
35851 rc=0
35852 fi
35853
35854 fi
35855 if test $rc -ne 0; then :
35856
3d248aec 35857 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35858$as_echo "no" >&6; }
35859
35860 else :
35861
3d248aec 35862 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
35863$as_echo "yes" >&6; }
35864
3d248aec
AX
35865cat >>confdefs.h <<\_ACEOF
35866#define HAVE_D_OBTAIN_ALIAS 1
35867_ACEOF
ea04106b
AX
35868
35869
35870 fi
35871 fi
35872
35873
3d248aec 35874 { $as_echo "$as_me:$LINENO: checking whether d_prune_aliases() is available" >&5
e10b0808 35875$as_echo_n "checking whether d_prune_aliases() is available... " >&6; }
ea04106b
AX
35876
35877
35878
35879cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35880/* confdefs.h. */
35881_ACEOF
35882cat confdefs.h >>conftest.$ac_ext
35883cat >>conftest.$ac_ext <<_ACEOF
35884/* end confdefs.h. */
ea04106b
AX
35885
35886
35887 #include <linux/dcache.h>
35888
35889int
35890main (void)
35891{
35892
e10b0808
AX
35893 struct inode *ip = NULL;
35894 d_prune_aliases(ip);
ea04106b
AX
35895
35896 ;
35897 return 0;
35898}
35899
35900_ACEOF
35901
35902
35903
35904cat - <<_ACEOF >conftest.h
35905
35906_ACEOF
35907
35908
35909 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
35910 echo "obj-m := conftest.o" >build/Makefile
35911 modpost_flag=''
35912 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
35913 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 35914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35915 (eval $ac_try) 2>&5
35916 ac_status=$?
3d248aec
AX
35917 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35918 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
35919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
35920 (eval $ac_try) 2>&5
35921 ac_status=$?
3d248aec
AX
35922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
35923 (exit $ac_status); }; }; then
ea04106b
AX
35924 rc=0
35925else
35926 $as_echo "$as_me: failed program was:" >&5
35927sed 's/^/| /' conftest.$ac_ext >&5
35928 rc=1
35929
35930
35931fi
3d248aec 35932
ea04106b
AX
35933 rm -Rf build
35934
35935
35936 if test $rc -ne 0; then :
35937
3d248aec 35938 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35939$as_echo "no" >&6; }
35940
35941 else
35942 if test "x$enable_linux_builtin" != xyes; then
35943
e10b0808 35944 grep -q -E '[[:space:]]d_prune_aliases[[:space:]]' \
ea04106b
AX
35945 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
35946 rc=$?
35947 if test $rc -ne 0; then
35948 export=0
35949 for file in fs/dcache.c; do
e10b0808 35950 grep -q -E "EXPORT_SYMBOL.*(d_prune_aliases)" \
ea04106b
AX
35951 "$LINUX/$file" 2>/dev/null
35952 rc=$?
35953 if test $rc -eq 0; then
35954 export=1
35955 break;
35956 fi
35957 done
35958 if test $export -eq 0; then :
35959 rc=1
35960 else :
35961 rc=0
35962 fi
35963 else :
35964 rc=0
35965 fi
35966
35967 fi
35968 if test $rc -ne 0; then :
35969
3d248aec 35970 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
35971$as_echo "no" >&6; }
35972
35973 else :
35974
3d248aec 35975 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
35976$as_echo "yes" >&6; }
35977
3d248aec
AX
35978cat >>confdefs.h <<\_ACEOF
35979#define HAVE_D_PRUNE_ALIASES 1
35980_ACEOF
ea04106b
AX
35981
35982
35983 fi
35984 fi
35985
35986
3d248aec 35987 { $as_echo "$as_me:$LINENO: checking whether d_set_d_op() is available" >&5
e10b0808 35988$as_echo_n "checking whether d_set_d_op() is available... " >&6; }
ea04106b
AX
35989
35990
35991
35992cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
35993/* confdefs.h. */
35994_ACEOF
35995cat confdefs.h >>conftest.$ac_ext
35996cat >>conftest.$ac_ext <<_ACEOF
35997/* end confdefs.h. */
ea04106b
AX
35998
35999
36000 #include <linux/dcache.h>
36001
36002int
36003main (void)
36004{
36005
e10b0808 36006 d_set_d_op(NULL, NULL);
ea04106b
AX
36007
36008 ;
36009 return 0;
36010}
36011
36012_ACEOF
36013
36014
36015
36016cat - <<_ACEOF >conftest.h
36017
36018_ACEOF
36019
36020
36021 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36022 echo "obj-m := conftest.o" >build/Makefile
36023 modpost_flag=''
36024 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36025 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36027 (eval $ac_try) 2>&5
36028 ac_status=$?
3d248aec
AX
36029 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36030 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36032 (eval $ac_try) 2>&5
36033 ac_status=$?
3d248aec
AX
36034 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36035 (exit $ac_status); }; }; then
ea04106b
AX
36036 rc=0
36037else
36038 $as_echo "$as_me: failed program was:" >&5
36039sed 's/^/| /' conftest.$ac_ext >&5
36040 rc=1
36041
36042
36043fi
3d248aec 36044
ea04106b
AX
36045 rm -Rf build
36046
36047
36048 if test $rc -ne 0; then :
36049
3d248aec 36050 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36051$as_echo "no" >&6; }
36052
36053 else
36054 if test "x$enable_linux_builtin" != xyes; then
36055
e10b0808 36056 grep -q -E '[[:space:]]d_set_d_op[[:space:]]' \
ea04106b
AX
36057 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
36058 rc=$?
36059 if test $rc -ne 0; then
36060 export=0
36061 for file in fs/dcache.c; do
e10b0808 36062 grep -q -E "EXPORT_SYMBOL.*(d_set_d_op)" \
ea04106b
AX
36063 "$LINUX/$file" 2>/dev/null
36064 rc=$?
36065 if test $rc -eq 0; then
36066 export=1
36067 break;
36068 fi
36069 done
36070 if test $export -eq 0; then :
36071 rc=1
36072 else :
36073 rc=0
36074 fi
36075 else :
36076 rc=0
36077 fi
36078
e10b0808
AX
36079 fi
36080 if test $rc -ne 0; then :
36081
3d248aec 36082 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
36083$as_echo "no" >&6; }
36084
36085 else :
36086
3d248aec 36087 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
36088$as_echo "yes" >&6; }
36089
3d248aec
AX
36090cat >>confdefs.h <<\_ACEOF
36091#define HAVE_D_SET_D_OP 1
36092_ACEOF
e10b0808
AX
36093
36094
36095 fi
36096 fi
36097
36098
36099
3d248aec 36100 { $as_echo "$as_me:$LINENO: checking whether dops->d_revalidate() takes struct nameidata" >&5
e10b0808
AX
36101$as_echo_n "checking whether dops->d_revalidate() takes struct nameidata... " >&6; }
36102
36103
36104cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36105/* confdefs.h. */
36106_ACEOF
36107cat confdefs.h >>conftest.$ac_ext
36108cat >>conftest.$ac_ext <<_ACEOF
36109/* end confdefs.h. */
e10b0808
AX
36110
36111
36112 #include <linux/dcache.h>
36113
36114 int revalidate (struct dentry *dentry,
36115 struct nameidata *nidata) { return 0; }
36116
36117 static const struct dentry_operations
36118 dops __attribute__ ((unused)) = {
36119 .d_revalidate = revalidate,
36120 };
36121
36122int
36123main (void)
36124{
36125
36126
36127 ;
36128 return 0;
36129}
36130
36131_ACEOF
36132
36133
36134
36135cat - <<_ACEOF >conftest.h
36136
36137_ACEOF
36138
36139
36140 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36141 echo "obj-m := conftest.o" >build/Makefile
36142 modpost_flag=''
36143 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36144 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
36146 (eval $ac_try) 2>&5
36147 ac_status=$?
3d248aec
AX
36148 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36149 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
36151 (eval $ac_try) 2>&5
36152 ac_status=$?
3d248aec
AX
36153 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36154 (exit $ac_status); }; }; then
e10b0808 36155
3d248aec 36156 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
36157$as_echo "yes" >&6; }
36158
3d248aec
AX
36159cat >>confdefs.h <<\_ACEOF
36160#define HAVE_D_REVALIDATE_NAMEIDATA 1
36161_ACEOF
e10b0808
AX
36162
36163
36164else
36165 $as_echo "$as_me: failed program was:" >&5
36166sed 's/^/| /' conftest.$ac_ext >&5
36167
3d248aec 36168 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
36169$as_echo "no" >&6; }
36170
36171
36172
36173fi
3d248aec 36174
e10b0808
AX
36175 rm -Rf build
36176
36177
36178
36179
3d248aec 36180 { $as_echo "$as_me:$LINENO: checking whether dentry uses const struct dentry_operations" >&5
e10b0808
AX
36181$as_echo_n "checking whether dentry uses const struct dentry_operations... " >&6; }
36182
36183
36184cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36185/* confdefs.h. */
36186_ACEOF
36187cat confdefs.h >>conftest.$ac_ext
36188cat >>conftest.$ac_ext <<_ACEOF
36189/* end confdefs.h. */
e10b0808
AX
36190
36191
36192 #include <linux/dcache.h>
36193
36194 const struct dentry_operations test_d_op = {
36195 .d_revalidate = NULL,
36196 };
36197
36198int
36199main (void)
36200{
36201
36202 struct dentry d __attribute__ ((unused));
36203
36204 d.d_op = &test_d_op;
36205
36206 ;
36207 return 0;
36208}
36209
36210_ACEOF
36211
36212
36213
36214cat - <<_ACEOF >conftest.h
36215
36216_ACEOF
36217
36218
36219 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36220 echo "obj-m := conftest.o" >build/Makefile
36221 modpost_flag=''
36222 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36223 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
36225 (eval $ac_try) 2>&5
36226 ac_status=$?
3d248aec
AX
36227 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36228 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
36230 (eval $ac_try) 2>&5
36231 ac_status=$?
3d248aec
AX
36232 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36233 (exit $ac_status); }; }; then
e10b0808 36234
3d248aec 36235 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
36236$as_echo "yes" >&6; }
36237
3d248aec
AX
36238cat >>confdefs.h <<\_ACEOF
36239#define HAVE_CONST_DENTRY_OPERATIONS 1
36240_ACEOF
e10b0808
AX
36241
36242
36243else
36244 $as_echo "$as_me: failed program was:" >&5
36245sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 36246
3d248aec 36247 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36248$as_echo "no" >&6; }
36249
ea04106b 36250
ea04106b 36251
e10b0808 36252fi
3d248aec 36253
e10b0808 36254 rm -Rf build
ea04106b 36255
ea04106b
AX
36256
36257
3d248aec 36258 { $as_echo "$as_me:$LINENO: checking whether check_disk_size_change() is available" >&5
e10b0808 36259$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
ea04106b
AX
36260
36261
36262
36263cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36264/* confdefs.h. */
36265_ACEOF
36266cat confdefs.h >>conftest.$ac_ext
36267cat >>conftest.$ac_ext <<_ACEOF
36268/* end confdefs.h. */
ea04106b
AX
36269
36270
e10b0808 36271 #include <linux/fs.h>
ea04106b
AX
36272
36273int
36274main (void)
36275{
36276
e10b0808 36277 check_disk_size_change(NULL, NULL);
ea04106b
AX
36278
36279 ;
36280 return 0;
36281}
36282
36283_ACEOF
36284
36285
36286
36287cat - <<_ACEOF >conftest.h
36288
36289_ACEOF
36290
36291
36292 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36293 echo "obj-m := conftest.o" >build/Makefile
36294 modpost_flag=''
36295 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36296 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36298 (eval $ac_try) 2>&5
36299 ac_status=$?
3d248aec
AX
36300 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36301 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36303 (eval $ac_try) 2>&5
36304 ac_status=$?
3d248aec
AX
36305 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36306 (exit $ac_status); }; }; then
ea04106b
AX
36307 rc=0
36308else
36309 $as_echo "$as_me: failed program was:" >&5
36310sed 's/^/| /' conftest.$ac_ext >&5
36311 rc=1
36312
36313
36314fi
3d248aec 36315
ea04106b
AX
36316 rm -Rf build
36317
36318
36319 if test $rc -ne 0; then :
36320
3d248aec 36321 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36322$as_echo "no" >&6; }
36323
36324 else
36325 if test "x$enable_linux_builtin" != xyes; then
36326
e10b0808 36327 grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
ea04106b
AX
36328 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
36329 rc=$?
36330 if test $rc -ne 0; then
36331 export=0
e10b0808
AX
36332 for file in fs/block_dev.c; do
36333 grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
ea04106b
AX
36334 "$LINUX/$file" 2>/dev/null
36335 rc=$?
36336 if test $rc -eq 0; then
36337 export=1
36338 break;
36339 fi
36340 done
36341 if test $export -eq 0; then :
36342 rc=1
36343 else :
36344 rc=0
36345 fi
36346 else :
36347 rc=0
36348 fi
36349
36350 fi
36351 if test $rc -ne 0; then :
36352
3d248aec 36353 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36354$as_echo "no" >&6; }
36355
36356 else :
36357
3d248aec 36358 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
36359$as_echo "yes" >&6; }
36360
3d248aec
AX
36361cat >>confdefs.h <<\_ACEOF
36362#define HAVE_CHECK_DISK_SIZE_CHANGE 1
36363_ACEOF
ea04106b
AX
36364
36365
36366 fi
36367 fi
36368
36369
3d248aec 36370 { $as_echo "$as_me:$LINENO: checking whether truncate_setsize() is available" >&5
e10b0808 36371$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
ea04106b
AX
36372
36373
36374
36375cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36376/* confdefs.h. */
36377_ACEOF
36378cat confdefs.h >>conftest.$ac_ext
36379cat >>conftest.$ac_ext <<_ACEOF
36380/* end confdefs.h. */
ea04106b
AX
36381
36382
e10b0808 36383 #include <linux/mm.h>
ea04106b
AX
36384
36385int
36386main (void)
36387{
36388
e10b0808 36389 truncate_setsize(NULL, 0);
ea04106b
AX
36390
36391 ;
36392 return 0;
36393}
36394
36395_ACEOF
36396
36397
36398
36399cat - <<_ACEOF >conftest.h
36400
36401_ACEOF
36402
36403
36404 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36405 echo "obj-m := conftest.o" >build/Makefile
36406 modpost_flag=''
36407 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36408 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36410 (eval $ac_try) 2>&5
36411 ac_status=$?
3d248aec
AX
36412 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36413 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36415 (eval $ac_try) 2>&5
36416 ac_status=$?
3d248aec
AX
36417 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36418 (exit $ac_status); }; }; then
ea04106b
AX
36419 rc=0
36420else
36421 $as_echo "$as_me: failed program was:" >&5
36422sed 's/^/| /' conftest.$ac_ext >&5
36423 rc=1
36424
36425
36426fi
3d248aec 36427
ea04106b
AX
36428 rm -Rf build
36429
36430
36431 if test $rc -ne 0; then :
36432
3d248aec 36433 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36434$as_echo "no" >&6; }
36435
36436 else
36437 if test "x$enable_linux_builtin" != xyes; then
36438
e10b0808 36439 grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
ea04106b
AX
36440 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
36441 rc=$?
36442 if test $rc -ne 0; then
36443 export=0
e10b0808
AX
36444 for file in mm/truncate.c; do
36445 grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
ea04106b
AX
36446 "$LINUX/$file" 2>/dev/null
36447 rc=$?
36448 if test $rc -eq 0; then
36449 export=1
36450 break;
36451 fi
36452 done
36453 if test $export -eq 0; then :
36454 rc=1
36455 else :
36456 rc=0
36457 fi
36458 else :
36459 rc=0
36460 fi
36461
36462 fi
36463 if test $rc -ne 0; then :
36464
3d248aec 36465 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36466$as_echo "no" >&6; }
36467
36468 else :
36469
3d248aec 36470 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
36471$as_echo "yes" >&6; }
36472
3d248aec
AX
36473cat >>confdefs.h <<\_ACEOF
36474#define HAVE_TRUNCATE_SETSIZE 1
36475_ACEOF
ea04106b
AX
36476
36477
36478 fi
36479 fi
36480
36481
36482
3d248aec 36483 { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5
e10b0808 36484$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
ea04106b
AX
36485
36486
36487cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36488/* confdefs.h. */
36489_ACEOF
36490cat confdefs.h >>conftest.$ac_ext
36491cat >>conftest.$ac_ext <<_ACEOF
36492/* end confdefs.h. */
ea04106b
AX
36493
36494
e10b0808 36495 #include <linux/security.h>
ea04106b
AX
36496
36497int
36498main (void)
36499{
36500
e10b0808
AX
36501 struct inode *ip __attribute__ ((unused)) = NULL;
36502 struct inode *dip __attribute__ ((unused)) = NULL;
36503 const struct qstr *str __attribute__ ((unused)) = NULL;
36504 char *name __attribute__ ((unused)) = NULL;
36505 void *value __attribute__ ((unused)) = NULL;
36506 size_t len __attribute__ ((unused)) = 0;
36507
36508 security_inode_init_security(ip, dip, str, &name, &value, &len);
ea04106b
AX
36509
36510 ;
36511 return 0;
36512}
36513
36514_ACEOF
36515
36516
36517
36518cat - <<_ACEOF >conftest.h
36519
36520_ACEOF
36521
36522
36523 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36524 echo "obj-m := conftest.o" >build/Makefile
36525 modpost_flag=''
36526 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36527 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36528 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36529 (eval $ac_try) 2>&5
36530 ac_status=$?
3d248aec
AX
36531 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36532 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36534 (eval $ac_try) 2>&5
36535 ac_status=$?
3d248aec
AX
36536 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36537 (exit $ac_status); }; }; then
ea04106b 36538
3d248aec 36539 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
36540$as_echo "yes" >&6; }
36541
3d248aec
AX
36542cat >>confdefs.h <<\_ACEOF
36543#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1
36544_ACEOF
ea04106b
AX
36545
36546
36547else
36548 $as_echo "$as_me: failed program was:" >&5
36549sed 's/^/| /' conftest.$ac_ext >&5
36550
3d248aec 36551 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36552$as_echo "no" >&6; }
36553
36554
36555
36556fi
3d248aec 36557
ea04106b
AX
36558 rm -Rf build
36559
36560
36561
36562
3d248aec 36563 { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5
e10b0808 36564$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
ea04106b
AX
36565
36566
36567cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36568/* confdefs.h. */
36569_ACEOF
36570cat confdefs.h >>conftest.$ac_ext
36571cat >>conftest.$ac_ext <<_ACEOF
36572/* end confdefs.h. */
ea04106b
AX
36573
36574
e10b0808 36575 #include <linux/security.h>
ea04106b
AX
36576
36577int
36578main (void)
36579{
36580
e10b0808
AX
36581 struct inode *ip __attribute__ ((unused)) = NULL;
36582 struct inode *dip __attribute__ ((unused)) = NULL;
36583 const struct qstr *str __attribute__ ((unused)) = NULL;
36584 initxattrs func __attribute__ ((unused)) = NULL;
ea04106b 36585
e10b0808 36586 security_inode_init_security(ip, dip, str, func, NULL);
ea04106b
AX
36587
36588 ;
36589 return 0;
36590}
36591
36592_ACEOF
36593
36594
36595
36596cat - <<_ACEOF >conftest.h
36597
36598_ACEOF
36599
36600
36601 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36602 echo "obj-m := conftest.o" >build/Makefile
36603 modpost_flag=''
36604 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36605 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36606 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36607 (eval $ac_try) 2>&5
36608 ac_status=$?
3d248aec
AX
36609 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36610 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36612 (eval $ac_try) 2>&5
36613 ac_status=$?
3d248aec
AX
36614 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36615 (exit $ac_status); }; }; then
ea04106b 36616
3d248aec 36617 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
36618$as_echo "yes" >&6; }
36619
3d248aec
AX
36620cat >>confdefs.h <<\_ACEOF
36621#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1
36622_ACEOF
ea04106b
AX
36623
36624
36625else
36626 $as_echo "$as_me: failed program was:" >&5
36627sed 's/^/| /' conftest.$ac_ext >&5
36628
3d248aec 36629 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36630$as_echo "no" >&6; }
36631
36632
36633
36634fi
3d248aec 36635
ea04106b
AX
36636 rm -Rf build
36637
36638
36639
3d248aec 36640 { $as_echo "$as_me:$LINENO: checking whether mount_nodev() is available" >&5
e10b0808 36641$as_echo_n "checking whether mount_nodev() is available... " >&6; }
ea04106b
AX
36642
36643
36644
36645cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36646/* confdefs.h. */
36647_ACEOF
36648cat confdefs.h >>conftest.$ac_ext
36649cat >>conftest.$ac_ext <<_ACEOF
36650/* end confdefs.h. */
ea04106b
AX
36651
36652
36653 #include <linux/fs.h>
36654
36655int
36656main (void)
36657{
36658
e10b0808 36659 mount_nodev(NULL, 0, NULL, NULL);
ea04106b
AX
36660
36661 ;
36662 return 0;
36663}
36664
36665_ACEOF
36666
36667
36668
36669cat - <<_ACEOF >conftest.h
36670
36671_ACEOF
36672
36673
36674 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36675 echo "obj-m := conftest.o" >build/Makefile
36676 modpost_flag=''
36677 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36678 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36680 (eval $ac_try) 2>&5
36681 ac_status=$?
3d248aec
AX
36682 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36683 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36685 (eval $ac_try) 2>&5
36686 ac_status=$?
3d248aec
AX
36687 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36688 (exit $ac_status); }; }; then
ea04106b
AX
36689 rc=0
36690else
36691 $as_echo "$as_me: failed program was:" >&5
36692sed 's/^/| /' conftest.$ac_ext >&5
36693 rc=1
36694
36695
36696fi
3d248aec 36697
ea04106b
AX
36698 rm -Rf build
36699
36700
36701 if test $rc -ne 0; then :
36702
3d248aec 36703 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36704$as_echo "no" >&6; }
36705
36706 else
36707 if test "x$enable_linux_builtin" != xyes; then
36708
e10b0808 36709 grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
ea04106b
AX
36710 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
36711 rc=$?
36712 if test $rc -ne 0; then
36713 export=0
e10b0808
AX
36714 for file in fs/super.c; do
36715 grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
ea04106b
AX
36716 "$LINUX/$file" 2>/dev/null
36717 rc=$?
36718 if test $rc -eq 0; then
36719 export=1
36720 break;
36721 fi
36722 done
36723 if test $export -eq 0; then :
36724 rc=1
36725 else :
36726 rc=0
36727 fi
36728 else :
36729 rc=0
36730 fi
36731
36732 fi
36733 if test $rc -ne 0; then :
36734
3d248aec 36735 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36736$as_echo "no" >&6; }
36737
36738 else :
36739
3d248aec 36740 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
36741$as_echo "yes" >&6; }
36742
3d248aec
AX
36743cat >>confdefs.h <<\_ACEOF
36744#define HAVE_MOUNT_NODEV 1
36745_ACEOF
ea04106b
AX
36746
36747
36748 fi
36749 fi
36750
36751
ea04106b 36752
3d248aec 36753 { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5
e10b0808 36754$as_echo_n "checking whether super_block has s_shrink... " >&6; }
ea04106b
AX
36755
36756
36757cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36758/* confdefs.h. */
36759_ACEOF
36760cat confdefs.h >>conftest.$ac_ext
36761cat >>conftest.$ac_ext <<_ACEOF
36762/* end confdefs.h. */
ea04106b
AX
36763
36764
e10b0808
AX
36765 #include <linux/fs.h>
36766
36767 int shrink(struct shrinker *s, struct shrink_control *sc)
36768 { return 0; }
36769
36770 static const struct super_block
36771 sb __attribute__ ((unused)) = {
36772 .s_shrink.shrink = shrink,
36773 .s_shrink.seeks = DEFAULT_SEEKS,
36774 .s_shrink.batch = 0,
36775 };
36776
36777int
36778main (void)
36779{
36780
36781
36782 ;
36783 return 0;
36784}
36785
36786_ACEOF
36787
36788
36789
36790cat - <<_ACEOF >conftest.h
36791
36792_ACEOF
36793
36794
36795 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36796 echo "obj-m := conftest.o" >build/Makefile
36797 modpost_flag=''
36798 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36799 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
36801 (eval $ac_try) 2>&5
36802 ac_status=$?
3d248aec
AX
36803 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36804 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
36806 (eval $ac_try) 2>&5
36807 ac_status=$?
3d248aec
AX
36808 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36809 (exit $ac_status); }; }; then
e10b0808 36810
3d248aec 36811 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
36812$as_echo "yes" >&6; }
36813
3d248aec
AX
36814cat >>confdefs.h <<\_ACEOF
36815#define HAVE_SHRINK 1
36816_ACEOF
e10b0808
AX
36817
36818
36819
36820else
36821 $as_echo "$as_me: failed program was:" >&5
36822sed 's/^/| /' conftest.$ac_ext >&5
36823
3d248aec 36824 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
36825$as_echo "no" >&6; }
36826
36827
36828
36829fi
3d248aec 36830
e10b0808
AX
36831 rm -Rf build
36832
36833
36834
36835
3d248aec 36836 { $as_echo "$as_me:$LINENO: checking whether shrink_control has nid" >&5
e10b0808
AX
36837$as_echo_n "checking whether shrink_control has nid... " >&6; }
36838
36839
36840cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36841/* confdefs.h. */
36842_ACEOF
36843cat confdefs.h >>conftest.$ac_ext
36844cat >>conftest.$ac_ext <<_ACEOF
36845/* end confdefs.h. */
e10b0808
AX
36846
36847
36848 #include <linux/fs.h>
36849
36850int
36851main (void)
36852{
36853
36854 struct shrink_control sc __attribute__ ((unused));
36855 unsigned long scnidsize __attribute__ ((unused)) =
36856 sizeof(sc.nid);
36857
36858 ;
36859 return 0;
36860}
36861
36862_ACEOF
36863
36864
36865
36866cat - <<_ACEOF >conftest.h
36867
36868_ACEOF
36869
36870
36871 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36872 echo "obj-m := conftest.o" >build/Makefile
36873 modpost_flag=''
36874 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36875 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
36877 (eval $ac_try) 2>&5
36878 ac_status=$?
3d248aec
AX
36879 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36880 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
36882 (eval $ac_try) 2>&5
36883 ac_status=$?
3d248aec
AX
36884 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36885 (exit $ac_status); }; }; then
e10b0808 36886
3d248aec 36887 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
36888$as_echo "yes" >&6; }
36889
3d248aec
AX
36890cat >>confdefs.h <<\_ACEOF
36891#define SHRINK_CONTROL_HAS_NID 1
36892_ACEOF
e10b0808
AX
36893
36894
36895else
36896 $as_echo "$as_me: failed program was:" >&5
36897sed 's/^/| /' conftest.$ac_ext >&5
36898
3d248aec 36899 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
36900$as_echo "no" >&6; }
36901
36902
36903
36904fi
3d248aec 36905
e10b0808
AX
36906 rm -Rf build
36907
36908
36909
36910
3d248aec 36911 { $as_echo "$as_me:$LINENO: checking whether super_block has s_instances list_head" >&5
e10b0808
AX
36912$as_echo_n "checking whether super_block has s_instances list_head... " >&6; }
36913
36914
36915cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36916/* confdefs.h. */
36917_ACEOF
36918cat confdefs.h >>conftest.$ac_ext
36919cat >>conftest.$ac_ext <<_ACEOF
36920/* end confdefs.h. */
e10b0808
AX
36921
36922
36923 #include <linux/fs.h>
ea04106b
AX
36924
36925int
36926main (void)
36927{
36928
e10b0808
AX
36929 struct super_block sb __attribute__ ((unused));
36930
36931 INIT_LIST_HEAD(&sb.s_instances);
ea04106b
AX
36932
36933 ;
36934 return 0;
36935}
36936
36937_ACEOF
36938
36939
36940
36941cat - <<_ACEOF >conftest.h
36942
36943_ACEOF
36944
36945
36946 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
36947 echo "obj-m := conftest.o" >build/Makefile
36948 modpost_flag=''
36949 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
36950 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 36951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36952 (eval $ac_try) 2>&5
36953 ac_status=$?
3d248aec
AX
36954 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36955 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
36956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
36957 (eval $ac_try) 2>&5
36958 ac_status=$?
3d248aec
AX
36959 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
36960 (exit $ac_status); }; }; then
ea04106b 36961
3d248aec 36962 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808 36963$as_echo "yes" >&6; }
ea04106b 36964
3d248aec
AX
36965cat >>confdefs.h <<\_ACEOF
36966#define HAVE_S_INSTANCES_LIST_HEAD 1
36967_ACEOF
ea04106b 36968
ea04106b 36969
e10b0808
AX
36970else
36971 $as_echo "$as_me: failed program was:" >&5
36972sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 36973
3d248aec 36974 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
36975$as_echo "no" >&6; }
36976
ea04106b
AX
36977
36978
e10b0808 36979fi
3d248aec 36980
e10b0808 36981 rm -Rf build
ea04106b
AX
36982
36983
36984
3d248aec 36985 { $as_echo "$as_me:$LINENO: checking whether super_block has s_d_op" >&5
e10b0808 36986$as_echo_n "checking whether super_block has s_d_op... " >&6; }
ea04106b
AX
36987
36988
36989cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
36990/* confdefs.h. */
36991_ACEOF
36992cat confdefs.h >>conftest.$ac_ext
36993cat >>conftest.$ac_ext <<_ACEOF
36994/* end confdefs.h. */
ea04106b
AX
36995
36996
e10b0808 36997 #include <linux/fs.h>
ea04106b
AX
36998
36999int
37000main (void)
37001{
37002
e10b0808
AX
37003 struct super_block sb __attribute__ ((unused));
37004 sb.s_d_op = NULL;
ea04106b
AX
37005
37006 ;
37007 return 0;
37008}
37009
37010_ACEOF
37011
37012
37013
37014cat - <<_ACEOF >conftest.h
37015
37016_ACEOF
37017
37018
37019 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37020 echo "obj-m := conftest.o" >build/Makefile
37021 modpost_flag=''
37022 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37023 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 37024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37025 (eval $ac_try) 2>&5
37026 ac_status=$?
3d248aec
AX
37027 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37028 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37030 (eval $ac_try) 2>&5
37031 ac_status=$?
3d248aec
AX
37032 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37033 (exit $ac_status); }; }; then
ea04106b 37034
3d248aec 37035 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
37036$as_echo "yes" >&6; }
37037
3d248aec
AX
37038cat >>confdefs.h <<\_ACEOF
37039#define HAVE_S_D_OP 1
37040_ACEOF
ea04106b
AX
37041
37042
37043else
37044 $as_echo "$as_me: failed program was:" >&5
37045sed 's/^/| /' conftest.$ac_ext >&5
37046
3d248aec 37047 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
37048$as_echo "no" >&6; }
37049
37050
37051
37052fi
3d248aec 37053
ea04106b
AX
37054 rm -Rf build
37055
37056
37057
37058
3d248aec
AX
37059 { $as_echo "$as_me:$LINENO: checking whether super_setup_bdi_name() exists" >&5
37060$as_echo_n "checking whether super_setup_bdi_name() exists... " >&6; }
e10b0808 37061
ea04106b
AX
37062
37063
37064cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
37065/* confdefs.h. */
37066_ACEOF
37067cat confdefs.h >>conftest.$ac_ext
37068cat >>conftest.$ac_ext <<_ACEOF
37069/* end confdefs.h. */
ea04106b
AX
37070
37071
3d248aec
AX
37072 #include <linux/fs.h>
37073 struct super_block sb;
ea04106b
AX
37074
37075int
37076main (void)
37077{
37078
e10b0808
AX
37079 char *name = "bdi";
37080 int error __attribute__((unused)) =
3d248aec 37081 super_setup_bdi_name(&sb, name);
ea04106b
AX
37082
37083 ;
37084 return 0;
37085}
37086
37087_ACEOF
37088
37089
37090
37091cat - <<_ACEOF >conftest.h
37092
37093_ACEOF
37094
37095
37096 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37097 echo "obj-m := conftest.o" >build/Makefile
37098 modpost_flag=''
37099 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37100 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 37101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37102 (eval $ac_try) 2>&5
37103 ac_status=$?
3d248aec
AX
37104 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37105 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37106 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37107 (eval $ac_try) 2>&5
37108 ac_status=$?
3d248aec
AX
37109 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37110 (exit $ac_status); }; }; then
e10b0808 37111 rc=0
ea04106b
AX
37112else
37113 $as_echo "$as_me: failed program was:" >&5
37114sed 's/^/| /' conftest.$ac_ext >&5
e10b0808 37115 rc=1
ea04106b
AX
37116
37117
37118fi
3d248aec 37119
ea04106b
AX
37120 rm -Rf build
37121
37122
e10b0808 37123 if test $rc -ne 0; then :
ea04106b 37124
3d248aec 37125 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 37126$as_echo "no" >&6; }
3d248aec
AX
37127 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 2 args" >&5
37128$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
ea04106b
AX
37129
37130
37131
37132cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
37133/* confdefs.h. */
37134_ACEOF
37135cat confdefs.h >>conftest.$ac_ext
37136cat >>conftest.$ac_ext <<_ACEOF
37137/* end confdefs.h. */
ea04106b
AX
37138
37139
e10b0808
AX
37140 #include <linux/backing-dev.h>
37141 struct backing_dev_info bdi;
ea04106b
AX
37142
37143int
37144main (void)
37145{
37146
e10b0808 37147 char *name = "bdi";
e10b0808 37148 int error __attribute__((unused)) =
3d248aec 37149 bdi_setup_and_register(&bdi, name);
ea04106b
AX
37150
37151 ;
37152 return 0;
37153}
37154
37155_ACEOF
37156
37157
37158
37159cat - <<_ACEOF >conftest.h
37160
37161_ACEOF
37162
37163
37164 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37165 echo "obj-m := conftest.o" >build/Makefile
37166 modpost_flag=''
37167 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37168 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 37169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37170 (eval $ac_try) 2>&5
37171 ac_status=$?
3d248aec
AX
37172 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37173 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37175 (eval $ac_try) 2>&5
37176 ac_status=$?
3d248aec
AX
37177 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37178 (exit $ac_status); }; }; then
ea04106b
AX
37179 rc=0
37180else
37181 $as_echo "$as_me: failed program was:" >&5
37182sed 's/^/| /' conftest.$ac_ext >&5
37183 rc=1
37184
37185
37186fi
3d248aec 37187
ea04106b
AX
37188 rm -Rf build
37189
37190
37191 if test $rc -ne 0; then :
37192
3d248aec 37193 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 37194$as_echo "no" >&6; }
3d248aec 37195 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
e10b0808 37196$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
ea04106b
AX
37197
37198
ea04106b 37199
e10b0808 37200cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
37201/* confdefs.h. */
37202_ACEOF
37203cat confdefs.h >>conftest.$ac_ext
37204cat >>conftest.$ac_ext <<_ACEOF
37205/* end confdefs.h. */
ea04106b 37206
e10b0808 37207
3d248aec
AX
37208 #include <linux/backing-dev.h>
37209 struct backing_dev_info bdi;
ea04106b
AX
37210
37211int
37212main (void)
37213{
37214
3d248aec
AX
37215 char *name = "bdi";
37216 unsigned int cap = BDI_CAP_MAP_COPY;
37217 int error __attribute__((unused)) =
37218 bdi_setup_and_register(&bdi, name, cap);
ea04106b
AX
37219
37220 ;
37221 return 0;
37222}
37223
37224_ACEOF
37225
37226
37227
37228cat - <<_ACEOF >conftest.h
37229
37230_ACEOF
37231
37232
37233 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37234 echo "obj-m := conftest.o" >build/Makefile
37235 modpost_flag=''
37236 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37237 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 37238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37239 (eval $ac_try) 2>&5
37240 ac_status=$?
3d248aec
AX
37241 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37242 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37244 (eval $ac_try) 2>&5
37245 ac_status=$?
3d248aec
AX
37246 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37247 (exit $ac_status); }; }; then
e10b0808 37248 rc=0
ea04106b
AX
37249else
37250 $as_echo "$as_me: failed program was:" >&5
37251sed 's/^/| /' conftest.$ac_ext >&5
e10b0808 37252 rc=1
ea04106b
AX
37253
37254
37255fi
3d248aec 37256
ea04106b
AX
37257 rm -Rf build
37258
37259
e10b0808 37260 if test $rc -ne 0; then :
ea04106b 37261
3d248aec 37262 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 37263$as_echo "no" >&6; }
ea04106b 37264
e10b0808
AX
37265 else
37266 if test "x$enable_linux_builtin" != xyes; then
ea04106b 37267
e10b0808
AX
37268 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
37269 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
37270 rc=$?
37271 if test $rc -ne 0; then
37272 export=0
37273 for file in mm/backing-dev.c; do
37274 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
37275 "$LINUX/$file" 2>/dev/null
37276 rc=$?
37277 if test $rc -eq 0; then
37278 export=1
37279 break;
37280 fi
37281 done
37282 if test $export -eq 0; then :
37283 rc=1
37284 else :
37285 rc=0
37286 fi
37287 else :
37288 rc=0
37289 fi
ea04106b 37290
e10b0808
AX
37291 fi
37292 if test $rc -ne 0; then :
ea04106b 37293
3d248aec 37294 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 37295$as_echo "no" >&6; }
ea04106b 37296
e10b0808 37297 else :
ea04106b 37298
3d248aec 37299 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
37300$as_echo "yes" >&6; }
37301
3d248aec
AX
37302cat >>confdefs.h <<\_ACEOF
37303#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
37304_ACEOF
ea04106b
AX
37305
37306
e10b0808
AX
37307 fi
37308 fi
ea04106b 37309
ea04106b 37310
3d248aec
AX
37311 else
37312 if test "x$enable_linux_builtin" != xyes; then
ea04106b 37313
3d248aec
AX
37314 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
37315 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
37316 rc=$?
37317 if test $rc -ne 0; then
37318 export=0
37319 for file in mm/backing-dev.c; do
37320 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
37321 "$LINUX/$file" 2>/dev/null
37322 rc=$?
37323 if test $rc -eq 0; then
37324 export=1
37325 break;
37326 fi
37327 done
37328 if test $export -eq 0; then :
37329 rc=1
37330 else :
37331 rc=0
e10b0808 37332 fi
3d248aec
AX
37333 else :
37334 rc=0
e10b0808 37335 fi
ea04106b 37336
3d248aec
AX
37337 fi
37338 if test $rc -ne 0; then :
ea04106b 37339
3d248aec 37340 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 37341$as_echo "no" >&6; }
3d248aec
AX
37342 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
37343$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
ea04106b
AX
37344
37345
37346
ea04106b 37347cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
37348/* confdefs.h. */
37349_ACEOF
37350cat confdefs.h >>conftest.$ac_ext
37351cat >>conftest.$ac_ext <<_ACEOF
37352/* end confdefs.h. */
ea04106b
AX
37353
37354
3d248aec
AX
37355 #include <linux/backing-dev.h>
37356 struct backing_dev_info bdi;
ea04106b
AX
37357
37358int
37359main (void)
37360{
37361
3d248aec
AX
37362 char *name = "bdi";
37363 unsigned int cap = BDI_CAP_MAP_COPY;
37364 int error __attribute__((unused)) =
37365 bdi_setup_and_register(&bdi, name, cap);
ea04106b
AX
37366
37367 ;
37368 return 0;
37369}
37370
37371_ACEOF
37372
37373
37374
37375cat - <<_ACEOF >conftest.h
37376
37377_ACEOF
37378
37379
37380 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37381 echo "obj-m := conftest.o" >build/Makefile
37382 modpost_flag=''
37383 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37384 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 37385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37386 (eval $ac_try) 2>&5
37387 ac_status=$?
3d248aec
AX
37388 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37389 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37390 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
37391 (eval $ac_try) 2>&5
37392 ac_status=$?
3d248aec
AX
37393 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37394 (exit $ac_status); }; }; then
37395 rc=0
37396else
37397 $as_echo "$as_me: failed program was:" >&5
37398sed 's/^/| /' conftest.$ac_ext >&5
37399 rc=1
37400
37401
37402fi
37403
37404 rm -Rf build
37405
37406
37407 if test $rc -ne 0; then :
37408
37409 { $as_echo "$as_me:$LINENO: result: no" >&5
37410$as_echo "no" >&6; }
37411
37412 else
37413 if test "x$enable_linux_builtin" != xyes; then
37414
37415 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
37416 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
37417 rc=$?
37418 if test $rc -ne 0; then
37419 export=0
37420 for file in mm/backing-dev.c; do
37421 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
37422 "$LINUX/$file" 2>/dev/null
37423 rc=$?
37424 if test $rc -eq 0; then
37425 export=1
37426 break;
37427 fi
37428 done
37429 if test $export -eq 0; then :
37430 rc=1
37431 else :
37432 rc=0
37433 fi
37434 else :
37435 rc=0
37436 fi
37437
37438 fi
37439 if test $rc -ne 0; then :
37440
37441 { $as_echo "$as_me:$LINENO: result: no" >&5
37442$as_echo "no" >&6; }
37443
37444 else :
37445
37446 { $as_echo "$as_me:$LINENO: result: yes" >&5
37447$as_echo "yes" >&6; }
37448
37449cat >>confdefs.h <<\_ACEOF
37450#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
37451_ACEOF
37452
37453
37454 fi
37455 fi
37456
37457
37458 else :
37459
37460 { $as_echo "$as_me:$LINENO: result: yes" >&5
37461$as_echo "yes" >&6; }
37462
37463cat >>confdefs.h <<\_ACEOF
37464#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1
37465_ACEOF
37466
37467
37468 fi
37469 fi
37470
37471
37472 else
37473 if test "x$enable_linux_builtin" != xyes; then
37474
37475 grep -q -E '[[:space:]]super_setup_bdi_name[[:space:]]' \
37476 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
37477 rc=$?
37478 if test $rc -ne 0; then
37479 export=0
37480 for file in fs/super.c; do
37481 grep -q -E "EXPORT_SYMBOL.*(super_setup_bdi_name)" \
37482 "$LINUX/$file" 2>/dev/null
37483 rc=$?
37484 if test $rc -eq 0; then
37485 export=1
37486 break;
37487 fi
37488 done
37489 if test $export -eq 0; then :
37490 rc=1
37491 else :
37492 rc=0
37493 fi
37494 else :
37495 rc=0
37496 fi
37497
37498 fi
37499 if test $rc -ne 0; then :
37500
37501 { $as_echo "$as_me:$LINENO: result: no" >&5
37502$as_echo "no" >&6; }
37503 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 2 args" >&5
37504$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
37505
37506
37507
37508cat confdefs.h - <<_ACEOF >conftest.c
37509/* confdefs.h. */
37510_ACEOF
37511cat confdefs.h >>conftest.$ac_ext
37512cat >>conftest.$ac_ext <<_ACEOF
37513/* end confdefs.h. */
37514
37515
37516 #include <linux/backing-dev.h>
37517 struct backing_dev_info bdi;
37518
37519int
37520main (void)
37521{
37522
37523 char *name = "bdi";
37524 int error __attribute__((unused)) =
37525 bdi_setup_and_register(&bdi, name);
37526
37527 ;
37528 return 0;
37529}
37530
37531_ACEOF
37532
37533
37534
37535cat - <<_ACEOF >conftest.h
37536
37537_ACEOF
37538
37539
37540 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37541 echo "obj-m := conftest.o" >build/Makefile
37542 modpost_flag=''
37543 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37544 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
37545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37546 (eval $ac_try) 2>&5
37547 ac_status=$?
37548 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37549 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37551 (eval $ac_try) 2>&5
37552 ac_status=$?
37553 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37554 (exit $ac_status); }; }; then
37555 rc=0
37556else
37557 $as_echo "$as_me: failed program was:" >&5
37558sed 's/^/| /' conftest.$ac_ext >&5
37559 rc=1
37560
37561
37562fi
37563
37564 rm -Rf build
37565
37566
37567 if test $rc -ne 0; then :
37568
37569 { $as_echo "$as_me:$LINENO: result: no" >&5
37570$as_echo "no" >&6; }
37571 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
37572$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
37573
37574
37575
37576cat confdefs.h - <<_ACEOF >conftest.c
37577/* confdefs.h. */
37578_ACEOF
37579cat confdefs.h >>conftest.$ac_ext
37580cat >>conftest.$ac_ext <<_ACEOF
37581/* end confdefs.h. */
37582
37583
37584 #include <linux/backing-dev.h>
37585 struct backing_dev_info bdi;
37586
37587int
37588main (void)
37589{
37590
37591 char *name = "bdi";
37592 unsigned int cap = BDI_CAP_MAP_COPY;
37593 int error __attribute__((unused)) =
37594 bdi_setup_and_register(&bdi, name, cap);
37595
37596 ;
37597 return 0;
37598}
37599
37600_ACEOF
37601
37602
37603
37604cat - <<_ACEOF >conftest.h
37605
37606_ACEOF
37607
37608
37609 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37610 echo "obj-m := conftest.o" >build/Makefile
37611 modpost_flag=''
37612 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37613 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
37614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37615 (eval $ac_try) 2>&5
37616 ac_status=$?
37617 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37618 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37620 (eval $ac_try) 2>&5
37621 ac_status=$?
37622 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37623 (exit $ac_status); }; }; then
37624 rc=0
37625else
37626 $as_echo "$as_me: failed program was:" >&5
37627sed 's/^/| /' conftest.$ac_ext >&5
37628 rc=1
37629
37630
37631fi
37632
37633 rm -Rf build
37634
37635
37636 if test $rc -ne 0; then :
37637
37638 { $as_echo "$as_me:$LINENO: result: no" >&5
37639$as_echo "no" >&6; }
37640
37641 else
37642 if test "x$enable_linux_builtin" != xyes; then
37643
37644 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
37645 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
37646 rc=$?
37647 if test $rc -ne 0; then
37648 export=0
37649 for file in mm/backing-dev.c; do
37650 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
37651 "$LINUX/$file" 2>/dev/null
37652 rc=$?
37653 if test $rc -eq 0; then
37654 export=1
37655 break;
37656 fi
37657 done
37658 if test $export -eq 0; then :
37659 rc=1
37660 else :
37661 rc=0
37662 fi
37663 else :
37664 rc=0
37665 fi
37666
37667 fi
37668 if test $rc -ne 0; then :
37669
37670 { $as_echo "$as_me:$LINENO: result: no" >&5
37671$as_echo "no" >&6; }
37672
37673 else :
37674
37675 { $as_echo "$as_me:$LINENO: result: yes" >&5
37676$as_echo "yes" >&6; }
37677
37678cat >>confdefs.h <<\_ACEOF
37679#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
37680_ACEOF
37681
37682
37683 fi
37684 fi
37685
37686
37687 else
37688 if test "x$enable_linux_builtin" != xyes; then
37689
37690 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
37691 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
37692 rc=$?
37693 if test $rc -ne 0; then
37694 export=0
37695 for file in mm/backing-dev.c; do
37696 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
37697 "$LINUX/$file" 2>/dev/null
37698 rc=$?
37699 if test $rc -eq 0; then
37700 export=1
37701 break;
37702 fi
37703 done
37704 if test $export -eq 0; then :
37705 rc=1
37706 else :
37707 rc=0
37708 fi
37709 else :
37710 rc=0
37711 fi
37712
37713 fi
37714 if test $rc -ne 0; then :
37715
37716 { $as_echo "$as_me:$LINENO: result: no" >&5
37717$as_echo "no" >&6; }
37718 { $as_echo "$as_me:$LINENO: checking whether bdi_setup_and_register() wants 3 args" >&5
37719$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
37720
37721
37722
37723cat confdefs.h - <<_ACEOF >conftest.c
37724/* confdefs.h. */
37725_ACEOF
37726cat confdefs.h >>conftest.$ac_ext
37727cat >>conftest.$ac_ext <<_ACEOF
37728/* end confdefs.h. */
37729
37730
37731 #include <linux/backing-dev.h>
37732 struct backing_dev_info bdi;
37733
37734int
37735main (void)
37736{
37737
37738 char *name = "bdi";
37739 unsigned int cap = BDI_CAP_MAP_COPY;
37740 int error __attribute__((unused)) =
37741 bdi_setup_and_register(&bdi, name, cap);
37742
37743 ;
37744 return 0;
37745}
37746
37747_ACEOF
37748
37749
37750
37751cat - <<_ACEOF >conftest.h
37752
37753_ACEOF
37754
37755
37756 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37757 echo "obj-m := conftest.o" >build/Makefile
37758 modpost_flag=''
37759 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37760 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
37761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37762 (eval $ac_try) 2>&5
37763 ac_status=$?
37764 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37765 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37767 (eval $ac_try) 2>&5
37768 ac_status=$?
37769 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37770 (exit $ac_status); }; }; then
37771 rc=0
37772else
37773 $as_echo "$as_me: failed program was:" >&5
37774sed 's/^/| /' conftest.$ac_ext >&5
37775 rc=1
37776
37777
37778fi
37779
37780 rm -Rf build
37781
37782
37783 if test $rc -ne 0; then :
37784
37785 { $as_echo "$as_me:$LINENO: result: no" >&5
37786$as_echo "no" >&6; }
37787
37788 else
37789 if test "x$enable_linux_builtin" != xyes; then
37790
37791 grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
37792 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
37793 rc=$?
37794 if test $rc -ne 0; then
37795 export=0
37796 for file in mm/backing-dev.c; do
37797 grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
37798 "$LINUX/$file" 2>/dev/null
37799 rc=$?
37800 if test $rc -eq 0; then
37801 export=1
37802 break;
37803 fi
37804 done
37805 if test $export -eq 0; then :
37806 rc=1
37807 else :
37808 rc=0
37809 fi
37810 else :
37811 rc=0
37812 fi
37813
37814 fi
37815 if test $rc -ne 0; then :
ea04106b 37816
3d248aec
AX
37817 { $as_echo "$as_me:$LINENO: result: no" >&5
37818$as_echo "no" >&6; }
37819
37820 else :
37821
37822 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
37823$as_echo "yes" >&6; }
37824
3d248aec
AX
37825cat >>confdefs.h <<\_ACEOF
37826#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1
37827_ACEOF
37828
37829
37830 fi
37831 fi
37832
37833
37834 else :
37835
37836 { $as_echo "$as_me:$LINENO: result: yes" >&5
37837$as_echo "yes" >&6; }
37838
37839cat >>confdefs.h <<\_ACEOF
37840#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1
37841_ACEOF
37842
37843
37844 fi
37845 fi
37846
37847
37848 else :
37849
37850 { $as_echo "$as_me:$LINENO: result: yes" >&5
37851$as_echo "yes" >&6; }
37852
37853cat >>confdefs.h <<\_ACEOF
37854#define HAVE_SUPER_SETUP_BDI_NAME 1
37855_ACEOF
37856
37857
37858 fi
37859 fi
37860
37861
37862
37863 { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5
37864$as_echo_n "checking whether set_nlink() is available... " >&6; }
37865
37866
37867cat confdefs.h - <<_ACEOF >conftest.c
37868/* confdefs.h. */
37869_ACEOF
37870cat confdefs.h >>conftest.$ac_ext
37871cat >>conftest.$ac_ext <<_ACEOF
37872/* end confdefs.h. */
37873
37874
37875 #include <linux/fs.h>
37876
37877int
37878main (void)
37879{
37880
37881 struct inode node;
37882 unsigned int link = 0;
37883 (void) set_nlink(&node, link);
37884
37885 ;
37886 return 0;
37887}
37888
37889_ACEOF
37890
37891
37892
37893cat - <<_ACEOF >conftest.h
37894
37895_ACEOF
37896
37897
37898 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37899 echo "obj-m := conftest.o" >build/Makefile
37900 modpost_flag=''
37901 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37902 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
37903 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37904 (eval $ac_try) 2>&5
37905 ac_status=$?
37906 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37907 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37909 (eval $ac_try) 2>&5
37910 ac_status=$?
37911 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37912 (exit $ac_status); }; }; then
37913
37914 { $as_echo "$as_me:$LINENO: result: yes" >&5
37915$as_echo "yes" >&6; }
37916
37917cat >>confdefs.h <<\_ACEOF
37918#define HAVE_SET_NLINK 1
37919_ACEOF
ea04106b
AX
37920
37921
37922else
37923 $as_echo "$as_me: failed program was:" >&5
37924sed 's/^/| /' conftest.$ac_ext >&5
37925
3d248aec 37926 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
37927$as_echo "no" >&6; }
37928
37929
37930
37931fi
3d248aec
AX
37932
37933 rm -Rf build
37934
37935
37936
37937
37938 { $as_echo "$as_me:$LINENO: checking whether elevator_change() is available" >&5
37939$as_echo_n "checking whether elevator_change() is available... " >&6; }
37940 tmp_flags="$EXTRA_KCFLAGS"
37941 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
37942
37943
37944cat confdefs.h - <<_ACEOF >conftest.c
37945/* confdefs.h. */
37946_ACEOF
37947cat confdefs.h >>conftest.$ac_ext
37948cat >>conftest.$ac_ext <<_ACEOF
37949/* end confdefs.h. */
37950
37951
37952 #include <linux/blkdev.h>
37953 #include <linux/elevator.h>
37954
37955int
37956main (void)
37957{
37958
37959 int ret;
37960 struct request_queue *q = NULL;
37961 char *elevator = NULL;
37962 ret = elevator_change(q, elevator);
37963
37964 ;
37965 return 0;
37966}
37967
37968_ACEOF
37969
37970
37971
37972cat - <<_ACEOF >conftest.h
37973
37974_ACEOF
37975
37976
37977 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
37978 echo "obj-m := conftest.o" >build/Makefile
37979 modpost_flag=''
37980 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
37981 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
37982 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37983 (eval $ac_try) 2>&5
37984 ac_status=$?
37985 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37986 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
37987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
37988 (eval $ac_try) 2>&5
37989 ac_status=$?
37990 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
37991 (exit $ac_status); }; }; then
37992
37993 { $as_echo "$as_me:$LINENO: result: yes" >&5
37994$as_echo "yes" >&6; }
37995
37996cat >>confdefs.h <<\_ACEOF
37997#define HAVE_ELEVATOR_CHANGE 1
37998_ACEOF
37999
38000
38001else
38002 $as_echo "$as_me: failed program was:" >&5
38003sed 's/^/| /' conftest.$ac_ext >&5
38004
38005 { $as_echo "$as_me:$LINENO: result: no" >&5
38006$as_echo "no" >&6; }
38007
38008
38009
38010fi
38011
ea04106b
AX
38012 rm -Rf build
38013
38014
e10b0808 38015 EXTRA_KCFLAGS="$tmp_flags"
ea04106b 38016
3d248aec 38017 { $as_echo "$as_me:$LINENO: checking whether sget() wants 5 args" >&5
e10b0808 38018$as_echo_n "checking whether sget() wants 5 args... " >&6; }
ea04106b
AX
38019
38020
38021cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38022/* confdefs.h. */
38023_ACEOF
38024cat confdefs.h >>conftest.$ac_ext
38025cat >>conftest.$ac_ext <<_ACEOF
38026/* end confdefs.h. */
ea04106b
AX
38027
38028
e10b0808 38029 #include <linux/fs.h>
ea04106b
AX
38030
38031int
38032main (void)
38033{
38034
e10b0808
AX
38035 struct file_system_type *type = NULL;
38036 int (*test)(struct super_block *,void *) = NULL;
38037 int (*set)(struct super_block *,void *) = NULL;
38038 int flags = 0;
38039 void *data = NULL;
38040 (void) sget(type, test, set, flags, data);
ea04106b
AX
38041
38042 ;
38043 return 0;
38044}
38045
38046_ACEOF
38047
38048
38049
38050cat - <<_ACEOF >conftest.h
38051
38052_ACEOF
38053
38054
38055 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38056 echo "obj-m := conftest.o" >build/Makefile
38057 modpost_flag=''
38058 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38059 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 38060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38061 (eval $ac_try) 2>&5
38062 ac_status=$?
3d248aec
AX
38063 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38064 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38066 (eval $ac_try) 2>&5
38067 ac_status=$?
3d248aec
AX
38068 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38069 (exit $ac_status); }; }; then
e10b0808 38070
3d248aec 38071 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
38072$as_echo "yes" >&6; }
38073
3d248aec
AX
38074cat >>confdefs.h <<\_ACEOF
38075#define HAVE_5ARG_SGET 1
38076_ACEOF
e10b0808
AX
38077
38078
ea04106b
AX
38079else
38080 $as_echo "$as_me: failed program was:" >&5
38081sed 's/^/| /' conftest.$ac_ext >&5
e10b0808 38082
3d248aec 38083 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
38084$as_echo "no" >&6; }
38085
ea04106b
AX
38086
38087
38088fi
3d248aec 38089
ea04106b
AX
38090 rm -Rf build
38091
38092
ea04106b 38093
3d248aec 38094 { $as_echo "$as_me:$LINENO: checking whether lseek_execute() is available" >&5
e10b0808 38095$as_echo_n "checking whether lseek_execute() is available... " >&6; }
ea04106b
AX
38096
38097
38098
38099cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38100/* confdefs.h. */
38101_ACEOF
38102cat confdefs.h >>conftest.$ac_ext
38103cat >>conftest.$ac_ext <<_ACEOF
38104/* end confdefs.h. */
ea04106b
AX
38105
38106
e10b0808 38107 #include <linux/fs.h>
ea04106b
AX
38108
38109int
38110main (void)
38111{
38112
e10b0808
AX
38113 struct file *fp __attribute__ ((unused)) = NULL;
38114 struct inode *ip __attribute__ ((unused)) = NULL;
38115 loff_t offset __attribute__ ((unused)) = 0;
38116 loff_t maxsize __attribute__ ((unused)) = 0;
38117
38118 lseek_execute(fp, ip, offset, maxsize);
ea04106b
AX
38119
38120 ;
38121 return 0;
38122}
38123
38124_ACEOF
38125
38126
38127
38128cat - <<_ACEOF >conftest.h
38129
38130_ACEOF
38131
38132
38133 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38134 echo "obj-m := conftest.o" >build/Makefile
38135 modpost_flag=''
38136 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38137 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 38138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38139 (eval $ac_try) 2>&5
38140 ac_status=$?
3d248aec
AX
38141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38142 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38144 (eval $ac_try) 2>&5
38145 ac_status=$?
3d248aec
AX
38146 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38147 (exit $ac_status); }; }; then
ea04106b
AX
38148 rc=0
38149else
38150 $as_echo "$as_me: failed program was:" >&5
38151sed 's/^/| /' conftest.$ac_ext >&5
38152 rc=1
38153
38154
38155fi
3d248aec 38156
ea04106b
AX
38157 rm -Rf build
38158
38159
38160 if test $rc -ne 0; then :
38161
3d248aec 38162 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
38163$as_echo "no" >&6; }
38164
38165 else
38166 if test "x$enable_linux_builtin" != xyes; then
38167
e10b0808 38168 grep -q -E '[[:space:]]lseek_exclusive[[:space:]]' \
ea04106b
AX
38169 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
38170 rc=$?
38171 if test $rc -ne 0; then
38172 export=0
e10b0808
AX
38173 for file in fs/read_write.c; do
38174 grep -q -E "EXPORT_SYMBOL.*(lseek_exclusive)" \
ea04106b
AX
38175 "$LINUX/$file" 2>/dev/null
38176 rc=$?
38177 if test $rc -eq 0; then
38178 export=1
38179 break;
38180 fi
38181 done
38182 if test $export -eq 0; then :
38183 rc=1
38184 else :
38185 rc=0
38186 fi
38187 else :
38188 rc=0
38189 fi
38190
38191 fi
38192 if test $rc -ne 0; then :
38193
3d248aec 38194 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
38195$as_echo "no" >&6; }
38196
38197 else :
38198
3d248aec 38199 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
38200$as_echo "yes" >&6; }
38201
3d248aec
AX
38202cat >>confdefs.h <<\_ACEOF
38203#define HAVE_LSEEK_EXECUTE 1
38204_ACEOF
ea04106b 38205
ea04106b 38206
ea04106b 38207 fi
ea04106b
AX
38208 fi
38209
ea04106b 38210
ea04106b 38211
3d248aec 38212 { $as_echo "$as_me:$LINENO: checking whether fops->iterate_shared() is available" >&5
87dac73d 38213$as_echo_n "checking whether fops->iterate_shared() is available... " >&6; }
ea04106b
AX
38214
38215
38216cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38217/* confdefs.h. */
38218_ACEOF
38219cat confdefs.h >>conftest.$ac_ext
38220cat >>conftest.$ac_ext <<_ACEOF
38221/* end confdefs.h. */
ea04106b
AX
38222
38223
e10b0808
AX
38224 #include <linux/fs.h>
38225 int iterate(struct file *filp, struct dir_context * context)
38226 { return 0; }
38227
38228 static const struct file_operations fops
38229 __attribute__ ((unused)) = {
87dac73d 38230 .iterate_shared = iterate,
e10b0808 38231 };
ea04106b
AX
38232
38233int
38234main (void)
38235{
38236
ea04106b
AX
38237
38238 ;
38239 return 0;
38240}
38241
38242_ACEOF
38243
38244
38245
e10b0808 38246cat - <<_ACEOF >conftest.h
ea04106b 38247
e10b0808 38248_ACEOF
ea04106b
AX
38249
38250
e10b0808
AX
38251 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38252 echo "obj-m := conftest.o" >build/Makefile
38253 modpost_flag=''
38254 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38255 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 38256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
38257 (eval $ac_try) 2>&5
38258 ac_status=$?
3d248aec
AX
38259 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38260 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
e10b0808
AX
38262 (eval $ac_try) 2>&5
38263 ac_status=$?
3d248aec
AX
38264 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38265 (exit $ac_status); }; }; then
ea04106b 38266
3d248aec 38267 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
38268$as_echo "yes" >&6; }
38269
3d248aec
AX
38270cat >>confdefs.h <<\_ACEOF
38271#define HAVE_VFS_ITERATE_SHARED 1
38272_ACEOF
ea04106b 38273
ea04106b 38274
e10b0808
AX
38275else
38276 $as_echo "$as_me: failed program was:" >&5
38277sed 's/^/| /' conftest.$ac_ext >&5
ea04106b 38278
3d248aec 38279 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808 38280$as_echo "no" >&6; }
ea04106b 38281
3d248aec 38282 { $as_echo "$as_me:$LINENO: checking whether fops->iterate() is available" >&5
87dac73d 38283$as_echo_n "checking whether fops->iterate() is available... " >&6; }
ea04106b
AX
38284
38285
38286cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38287/* confdefs.h. */
38288_ACEOF
38289cat confdefs.h >>conftest.$ac_ext
38290cat >>conftest.$ac_ext <<_ACEOF
38291/* end confdefs.h. */
ea04106b
AX
38292
38293
e10b0808 38294 #include <linux/fs.h>
87dac73d 38295 int iterate(struct file *filp, struct dir_context * context)
e10b0808
AX
38296 { return 0; }
38297
38298 static const struct file_operations fops
38299 __attribute__ ((unused)) = {
87dac73d 38300 .iterate = iterate,
e10b0808 38301 };
ea04106b
AX
38302
38303int
38304main (void)
38305{
38306
ea04106b
AX
38307
38308 ;
38309 return 0;
38310}
38311
38312_ACEOF
38313
38314
38315
38316cat - <<_ACEOF >conftest.h
38317
38318_ACEOF
38319
38320
38321 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38322 echo "obj-m := conftest.o" >build/Makefile
38323 modpost_flag=''
38324 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38325 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 38326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38327 (eval $ac_try) 2>&5
38328 ac_status=$?
3d248aec
AX
38329 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38330 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38331 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38332 (eval $ac_try) 2>&5
38333 ac_status=$?
3d248aec
AX
38334 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38335 (exit $ac_status); }; }; then
ea04106b 38336
3d248aec 38337 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
38338$as_echo "yes" >&6; }
38339
3d248aec
AX
38340cat >>confdefs.h <<\_ACEOF
38341#define HAVE_VFS_ITERATE 1
38342_ACEOF
68d83c55
AX
38343
38344
38345else
38346 $as_echo "$as_me: failed program was:" >&5
38347sed 's/^/| /' conftest.$ac_ext >&5
38348
3d248aec 38349 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
38350$as_echo "no" >&6; }
38351
3d248aec 38352 { $as_echo "$as_me:$LINENO: checking whether fops->readdir() is available" >&5
68d83c55
AX
38353$as_echo_n "checking whether fops->readdir() is available... " >&6; }
38354
38355
38356cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38357/* confdefs.h. */
38358_ACEOF
38359cat confdefs.h >>conftest.$ac_ext
38360cat >>conftest.$ac_ext <<_ACEOF
38361/* end confdefs.h. */
68d83c55
AX
38362
38363
38364 #include <linux/fs.h>
38365 int readdir(struct file *filp, void *entry, filldir_t func)
38366 { return 0; }
38367
38368 static const struct file_operations fops
38369 __attribute__ ((unused)) = {
38370 .readdir = readdir,
38371 };
38372
38373int
38374main (void)
38375{
38376
38377
38378 ;
38379 return 0;
38380}
38381
38382_ACEOF
38383
38384
38385
38386cat - <<_ACEOF >conftest.h
38387
38388_ACEOF
38389
38390
38391 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38392 echo "obj-m := conftest.o" >build/Makefile
38393 modpost_flag=''
38394 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38395 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 38396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
38397 (eval $ac_try) 2>&5
38398 ac_status=$?
3d248aec
AX
38399 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38400 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
38402 (eval $ac_try) 2>&5
38403 ac_status=$?
3d248aec
AX
38404 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38405 (exit $ac_status); }; }; then
68d83c55 38406
3d248aec 38407 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
38408$as_echo "yes" >&6; }
38409
3d248aec
AX
38410cat >>confdefs.h <<\_ACEOF
38411#define HAVE_VFS_READDIR 1
38412_ACEOF
87dac73d
AX
38413
38414
38415else
38416 $as_echo "$as_me: failed program was:" >&5
38417sed 's/^/| /' conftest.$ac_ext >&5
38418
3d248aec
AX
38419 { { $as_echo "$as_me:$LINENO: error: no; file a bug report with ZFSOnLinux" >&5
38420$as_echo "$as_me: error: no; file a bug report with ZFSOnLinux" >&2;}
38421 { (exit 1); exit 1; }; }
87dac73d 38422
68d83c55
AX
38423
38424
38425fi
3d248aec 38426
68d83c55
AX
38427 rm -Rf build
38428
38429
38430
38431
38432
38433fi
3d248aec 38434
68d83c55
AX
38435 rm -Rf build
38436
38437
38438
38439
38440
38441fi
3d248aec 38442
68d83c55
AX
38443 rm -Rf build
38444
38445
38446
3d248aec 38447 { $as_echo "$as_me:$LINENO: checking whether fops->read/write_iter() are available" >&5
68d83c55 38448$as_echo_n "checking whether fops->read/write_iter() are available... " >&6; }
87dac73d
AX
38449
38450
38451cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38452/* confdefs.h. */
38453_ACEOF
38454cat confdefs.h >>conftest.$ac_ext
38455cat >>conftest.$ac_ext <<_ACEOF
38456/* end confdefs.h. */
87dac73d
AX
38457
38458
68d83c55 38459 #include <linux/fs.h>
87dac73d 38460
68d83c55
AX
38461 ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
38462 { return 0; }
38463 ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
38464 { return 0; }
38465
38466 static const struct file_operations
38467 fops __attribute__ ((unused)) = {
38468 .read_iter = test_read,
38469 .write_iter = test_write,
38470 };
87dac73d
AX
38471
38472int
38473main (void)
38474{
38475
38476
38477 ;
38478 return 0;
38479}
38480
38481_ACEOF
38482
38483
38484
38485cat - <<_ACEOF >conftest.h
38486
38487_ACEOF
38488
38489
38490 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38491 echo "obj-m := conftest.o" >build/Makefile
38492 modpost_flag=''
38493 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38494 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 38495 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
38496 (eval $ac_try) 2>&5
38497 ac_status=$?
3d248aec
AX
38498 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38499 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
87dac73d
AX
38501 (eval $ac_try) 2>&5
38502 ac_status=$?
3d248aec
AX
38503 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38504 (exit $ac_status); }; }; then
87dac73d 38505
3d248aec 38506 { $as_echo "$as_me:$LINENO: result: yes" >&5
87dac73d
AX
38507$as_echo "yes" >&6; }
38508
3d248aec
AX
38509cat >>confdefs.h <<\_ACEOF
38510#define HAVE_VFS_RW_ITERATE 1
38511_ACEOF
38512
38513
38514 { $as_echo "$as_me:$LINENO: checking whether new_sync_read() is available" >&5
38515$as_echo_n "checking whether new_sync_read() is available... " >&6; }
38516
38517
38518cat confdefs.h - <<_ACEOF >conftest.c
38519/* confdefs.h. */
38520_ACEOF
38521cat confdefs.h >>conftest.$ac_ext
38522cat >>conftest.$ac_ext <<_ACEOF
38523/* end confdefs.h. */
38524
38525
38526 #include <linux/fs.h>
38527
38528int
38529main (void)
38530{
38531
38532 new_sync_read(NULL, NULL, 0, NULL);
38533
38534 ;
38535 return 0;
38536}
38537
38538_ACEOF
38539
38540
38541
38542cat - <<_ACEOF >conftest.h
38543
38544_ACEOF
38545
38546
38547 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38548 echo "obj-m := conftest.o" >build/Makefile
38549 modpost_flag=''
38550 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38551 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
38552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38553 (eval $ac_try) 2>&5
38554 ac_status=$?
38555 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38556 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38558 (eval $ac_try) 2>&5
38559 ac_status=$?
38560 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38561 (exit $ac_status); }; }; then
38562
38563 { $as_echo "$as_me:$LINENO: result: yes" >&5
38564$as_echo "yes" >&6; }
38565
38566cat >>confdefs.h <<\_ACEOF
38567#define HAVE_NEW_SYNC_READ 1
38568_ACEOF
38569
38570
38571else
38572 $as_echo "$as_me: failed program was:" >&5
38573sed 's/^/| /' conftest.$ac_ext >&5
38574
38575 { $as_echo "$as_me:$LINENO: result: no" >&5
38576$as_echo "no" >&6; }
38577
38578
38579
38580fi
38581
38582 rm -Rf build
38583
38584
ea04106b
AX
38585
38586
38587else
38588 $as_echo "$as_me: failed program was:" >&5
38589sed 's/^/| /' conftest.$ac_ext >&5
38590
3d248aec 38591 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55 38592$as_echo "no" >&6; }
87dac73d
AX
38593
38594
e10b0808
AX
38595
38596fi
3d248aec 38597
e10b0808
AX
38598 rm -Rf build
38599
38600
38601
3d248aec 38602 { $as_echo "$as_me:$LINENO: checking whether generic_write_checks() takes kiocb" >&5
68d83c55 38603$as_echo_n "checking whether generic_write_checks() takes kiocb... " >&6; }
ea04106b
AX
38604
38605
38606cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38607/* confdefs.h. */
38608_ACEOF
38609cat confdefs.h >>conftest.$ac_ext
38610cat >>conftest.$ac_ext <<_ACEOF
38611/* end confdefs.h. */
ea04106b
AX
38612
38613
e10b0808
AX
38614 #include <linux/fs.h>
38615
ea04106b
AX
38616
38617int
38618main (void)
38619{
38620
68d83c55
AX
38621 struct kiocb *iocb = NULL;
38622 struct iov_iter *iov = NULL;
38623 generic_write_checks(iocb, iov);
ea04106b
AX
38624
38625 ;
38626 return 0;
38627}
38628
38629_ACEOF
38630
38631
38632
38633cat - <<_ACEOF >conftest.h
38634
38635_ACEOF
38636
38637
38638 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38639 echo "obj-m := conftest.o" >build/Makefile
38640 modpost_flag=''
38641 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38642 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec
AX
38643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38644 (eval $ac_try) 2>&5
38645 ac_status=$?
38646 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38647 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38649 (eval $ac_try) 2>&5
38650 ac_status=$?
38651 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38652 (exit $ac_status); }; }; then
38653
38654 { $as_echo "$as_me:$LINENO: result: yes" >&5
38655$as_echo "yes" >&6; }
38656
38657cat >>confdefs.h <<\_ACEOF
38658#define HAVE_GENERIC_WRITE_CHECKS_KIOCB 1
38659_ACEOF
38660
38661
38662else
38663 $as_echo "$as_me: failed program was:" >&5
38664sed 's/^/| /' conftest.$ac_ext >&5
38665
38666 { $as_echo "$as_me:$LINENO: result: no" >&5
38667$as_echo "no" >&6; }
38668
38669
38670
38671fi
38672
38673 rm -Rf build
38674
38675
38676
38677
38678 { $as_echo "$as_me:$LINENO: checking whether kmap_atomic wants 1 args" >&5
38679$as_echo_n "checking whether kmap_atomic wants 1 args... " >&6; }
38680
38681
38682cat confdefs.h - <<_ACEOF >conftest.c
38683/* confdefs.h. */
38684_ACEOF
38685cat confdefs.h >>conftest.$ac_ext
38686cat >>conftest.$ac_ext <<_ACEOF
38687/* end confdefs.h. */
38688
38689
38690 #include <linux/pagemap.h>
38691
38692int
38693main (void)
38694{
38695
38696 struct page page;
38697 kmap_atomic(&page);
38698
38699 ;
38700 return 0;
38701}
38702
38703_ACEOF
38704
38705
38706
38707cat - <<_ACEOF >conftest.h
38708
38709_ACEOF
38710
38711
38712 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38713 echo "obj-m := conftest.o" >build/Makefile
38714 modpost_flag=''
38715 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38716 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
38717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38718 (eval $ac_try) 2>&5
38719 ac_status=$?
38720 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38721 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
38723 (eval $ac_try) 2>&5
38724 ac_status=$?
38725 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38726 (exit $ac_status); }; }; then
38727
38728 { $as_echo "$as_me:$LINENO: result: yes" >&5
38729$as_echo "yes" >&6; }
38730
38731cat >>confdefs.h <<\_ACEOF
38732#define HAVE_1ARG_KMAP_ATOMIC 1
38733_ACEOF
38734
38735
38736else
38737 $as_echo "$as_me: failed program was:" >&5
38738sed 's/^/| /' conftest.$ac_ext >&5
38739
38740 { $as_echo "$as_me:$LINENO: result: no" >&5
38741$as_echo "no" >&6; }
38742
38743
38744
38745fi
38746
38747 rm -Rf build
38748
38749
38750
38751
38752 { $as_echo "$as_me:$LINENO: checking whether follow_down_one() is available" >&5
38753$as_echo_n "checking whether follow_down_one() is available... " >&6; }
38754
38755
38756cat confdefs.h - <<_ACEOF >conftest.c
38757/* confdefs.h. */
38758_ACEOF
38759cat confdefs.h >>conftest.$ac_ext
38760cat >>conftest.$ac_ext <<_ACEOF
38761/* end confdefs.h. */
38762
38763
38764 #include <linux/namei.h>
38765
38766int
38767main (void)
38768{
38769
38770 struct path *p = NULL;
38771 follow_down_one(p);
38772
38773 ;
38774 return 0;
38775}
38776
38777_ACEOF
38778
38779
38780
38781cat - <<_ACEOF >conftest.h
38782
38783_ACEOF
38784
38785
38786 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38787 echo "obj-m := conftest.o" >build/Makefile
38788 modpost_flag=''
38789 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38790 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
38791 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38792 (eval $ac_try) 2>&5
38793 ac_status=$?
3d248aec
AX
38794 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38795 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38797 (eval $ac_try) 2>&5
38798 ac_status=$?
3d248aec
AX
38799 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38800 (exit $ac_status); }; }; then
ea04106b 38801
3d248aec 38802 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
38803$as_echo "yes" >&6; }
38804
3d248aec
AX
38805cat >>confdefs.h <<\_ACEOF
38806#define HAVE_FOLLOW_DOWN_ONE 1
ea04106b
AX
38807_ACEOF
38808
38809
ea04106b
AX
38810else
38811 $as_echo "$as_me: failed program was:" >&5
38812sed 's/^/| /' conftest.$ac_ext >&5
38813
3d248aec 38814 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
38815$as_echo "no" >&6; }
38816
38817
38818
38819fi
ea04106b 38820
e10b0808 38821 rm -Rf build
ea04106b 38822
ea04106b
AX
38823
38824
38825
3d248aec 38826 { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns int" >&5
e10b0808 38827$as_echo_n "checking whether make_request_fn() returns int... " >&6; }
ea04106b
AX
38828
38829
38830cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38831/* confdefs.h. */
38832_ACEOF
38833cat confdefs.h >>conftest.$ac_ext
38834cat >>conftest.$ac_ext <<_ACEOF
38835/* end confdefs.h. */
ea04106b
AX
38836
38837
e10b0808 38838 #include <linux/blkdev.h>
ea04106b 38839
e10b0808
AX
38840 int make_request(struct request_queue *q, struct bio *bio)
38841 {
38842 return (0);
38843 }
ea04106b
AX
38844
38845int
38846main (void)
38847{
38848
e10b0808 38849 blk_queue_make_request(NULL, &make_request);
ea04106b
AX
38850
38851 ;
38852 return 0;
38853}
38854
38855_ACEOF
38856
38857
38858
38859cat - <<_ACEOF >conftest.h
38860
38861_ACEOF
38862
38863
38864 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38865 echo "obj-m := conftest.o" >build/Makefile
38866 modpost_flag=''
38867 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38868 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 38869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38870 (eval $ac_try) 2>&5
38871 ac_status=$?
3d248aec
AX
38872 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38873 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38875 (eval $ac_try) 2>&5
38876 ac_status=$?
3d248aec
AX
38877 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38878 (exit $ac_status); }; }; then
ea04106b 38879
3d248aec 38880 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
38881$as_echo "yes" >&6; }
38882
3d248aec
AX
38883cat >>confdefs.h <<\_ACEOF
38884#define MAKE_REQUEST_FN_RET int
38885_ACEOF
e10b0808
AX
38886
38887
3d248aec
AX
38888cat >>confdefs.h <<\_ACEOF
38889#define HAVE_MAKE_REQUEST_FN_RET_INT 1
38890_ACEOF
ea04106b
AX
38891
38892
38893else
38894 $as_echo "$as_me: failed program was:" >&5
38895sed 's/^/| /' conftest.$ac_ext >&5
38896
3d248aec 38897 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 38898$as_echo "no" >&6; }
3d248aec 38899 { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns void" >&5
e10b0808 38900$as_echo_n "checking whether make_request_fn() returns void... " >&6; }
ea04106b
AX
38901
38902
38903cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38904/* confdefs.h. */
38905_ACEOF
38906cat confdefs.h >>conftest.$ac_ext
38907cat >>conftest.$ac_ext <<_ACEOF
38908/* end confdefs.h. */
ea04106b
AX
38909
38910
e10b0808 38911 #include <linux/blkdev.h>
ea04106b 38912
e10b0808
AX
38913 void make_request(struct request_queue *q, struct bio *bio)
38914 {
38915 return;
38916 }
ea04106b
AX
38917
38918int
38919main (void)
38920{
38921
e10b0808 38922 blk_queue_make_request(NULL, &make_request);
ea04106b
AX
38923
38924 ;
38925 return 0;
38926}
38927
38928_ACEOF
38929
38930
38931
38932cat - <<_ACEOF >conftest.h
38933
38934_ACEOF
38935
38936
38937 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
38938 echo "obj-m := conftest.o" >build/Makefile
38939 modpost_flag=''
38940 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
38941 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 38942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38943 (eval $ac_try) 2>&5
38944 ac_status=$?
3d248aec
AX
38945 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38946 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
38947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
38948 (eval $ac_try) 2>&5
38949 ac_status=$?
3d248aec
AX
38950 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
38951 (exit $ac_status); }; }; then
ea04106b 38952
3d248aec 38953 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
38954$as_echo "yes" >&6; }
38955
3d248aec
AX
38956cat >>confdefs.h <<\_ACEOF
38957#define MAKE_REQUEST_FN_RET void
38958_ACEOF
ea04106b
AX
38959
38960
38961else
38962 $as_echo "$as_me: failed program was:" >&5
38963sed 's/^/| /' conftest.$ac_ext >&5
38964
3d248aec 38965 { $as_echo "$as_me:$LINENO: result: no" >&5
94a40997 38966$as_echo "no" >&6; }
3d248aec 38967 { $as_echo "$as_me:$LINENO: checking whether make_request_fn() returns blk_qc_t" >&5
94a40997
AX
38968$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; }
38969
38970
38971cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
38972/* confdefs.h. */
38973_ACEOF
38974cat confdefs.h >>conftest.$ac_ext
38975cat >>conftest.$ac_ext <<_ACEOF
38976/* end confdefs.h. */
94a40997
AX
38977
38978
38979 #include <linux/blkdev.h>
38980
38981 blk_qc_t make_request(struct request_queue *q, struct bio *bio)
38982 {
38983 return (BLK_QC_T_NONE);
38984 }
38985
38986int
38987main (void)
38988{
38989
38990 blk_queue_make_request(NULL, &make_request);
38991
38992 ;
38993 return 0;
38994}
38995
38996_ACEOF
38997
38998
38999
39000cat - <<_ACEOF >conftest.h
39001
39002_ACEOF
39003
39004
39005 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
39006 echo "obj-m := conftest.o" >build/Makefile
39007 modpost_flag=''
39008 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
39009 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 39010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
39011 (eval $ac_try) 2>&5
39012 ac_status=$?
3d248aec
AX
39013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39014 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
39015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
94a40997
AX
39016 (eval $ac_try) 2>&5
39017 ac_status=$?
3d248aec
AX
39018 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39019 (exit $ac_status); }; }; then
94a40997 39020
3d248aec 39021 { $as_echo "$as_me:$LINENO: result: yes" >&5
94a40997
AX
39022$as_echo "yes" >&6; }
39023
3d248aec
AX
39024cat >>confdefs.h <<\_ACEOF
39025#define MAKE_REQUEST_FN_RET blk_qc_t
39026_ACEOF
94a40997
AX
39027
39028
3d248aec
AX
39029cat >>confdefs.h <<\_ACEOF
39030#define HAVE_MAKE_REQUEST_FN_RET_QC 1
39031_ACEOF
94a40997
AX
39032
39033
39034else
39035 $as_echo "$as_me: failed program was:" >&5
39036sed 's/^/| /' conftest.$ac_ext >&5
39037
3d248aec
AX
39038 { { $as_echo "$as_me:$LINENO: error: no - Please file a bug report at
39039 https://github.com/zfsonlinux/zfs/issues/new" >&5
39040$as_echo "$as_me: error: no - Please file a bug report at
39041 https://github.com/zfsonlinux/zfs/issues/new" >&2;}
39042 { (exit 1); exit 1; }; }
94a40997
AX
39043
39044
39045
39046fi
3d248aec 39047
94a40997
AX
39048 rm -Rf build
39049
39050
ea04106b
AX
39051
39052
39053
39054fi
3d248aec 39055
ea04106b
AX
39056 rm -Rf build
39057
39058
39059
39060
39061
ea04106b 39062fi
3d248aec 39063
ea04106b
AX
39064 rm -Rf build
39065
39066
39067
ea04106b 39068
3d248aec 39069 { $as_echo "$as_me:$LINENO: checking whether generic IO accounting symbols are avaliable" >&5
e10b0808 39070$as_echo_n "checking whether generic IO accounting symbols are avaliable... " >&6; }
ea04106b 39071
ea04106b
AX
39072
39073
e10b0808 39074cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
39075/* confdefs.h. */
39076_ACEOF
39077cat confdefs.h >>conftest.$ac_ext
39078cat >>conftest.$ac_ext <<_ACEOF
39079/* end confdefs.h. */
ea04106b 39080
ea04106b 39081
e10b0808
AX
39082 #include <linux/bio.h>
39083
39084 void (*generic_start_io_acct_f)(int, unsigned long,
39085 struct hd_struct *) = &generic_start_io_acct;
39086 void (*generic_end_io_acct_f)(int, struct hd_struct *,
39087 unsigned long) = &generic_end_io_acct;
ea04106b
AX
39088
39089int
39090main (void)
39091{
39092
e10b0808
AX
39093 generic_start_io_acct(0, 0, NULL);
39094 generic_end_io_acct(0, NULL, 0);
ea04106b
AX
39095
39096 ;
39097 return 0;
39098}
39099
39100_ACEOF
39101
39102
39103
39104cat - <<_ACEOF >conftest.h
39105
39106_ACEOF
39107
39108
39109 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
39110 echo "obj-m := conftest.o" >build/Makefile
39111 modpost_flag=''
39112 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
39113 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 39114 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
39115 (eval $ac_try) 2>&5
39116 ac_status=$?
3d248aec
AX
39117 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39118 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
39119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
ea04106b
AX
39120 (eval $ac_try) 2>&5
39121 ac_status=$?
3d248aec
AX
39122 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39123 (exit $ac_status); }; }; then
e10b0808
AX
39124 rc=0
39125else
39126 $as_echo "$as_me: failed program was:" >&5
39127sed 's/^/| /' conftest.$ac_ext >&5
39128 rc=1
ea04106b 39129
ea04106b 39130
e10b0808 39131fi
3d248aec 39132
e10b0808 39133 rm -Rf build
ea04106b
AX
39134
39135
e10b0808
AX
39136 if test $rc -ne 0; then :
39137
3d248aec 39138 { $as_echo "$as_me:$LINENO: result: no" >&5
e10b0808
AX
39139$as_echo "no" >&6; }
39140
39141 else
39142 if test "x$enable_linux_builtin" != xyes; then
39143
39144 grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \
39145 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
39146 rc=$?
39147 if test $rc -ne 0; then
39148 export=0
39149 for file in block/bio.c; do
39150 grep -q -E "EXPORT_SYMBOL.*(generic_start_io_acct)" \
39151 "$LINUX/$file" 2>/dev/null
39152 rc=$?
39153 if test $rc -eq 0; then
39154 export=1
39155 break;
39156 fi
39157 done
39158 if test $export -eq 0; then :
39159 rc=1
39160 else :
39161 rc=0
39162 fi
39163 else :
39164 rc=0
39165 fi
39166
39167 fi
39168 if test $rc -ne 0; then :
ea04106b 39169
3d248aec 39170 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
39171$as_echo "no" >&6; }
39172
e10b0808 39173 else :
ea04106b 39174
3d248aec 39175 { $as_echo "$as_me:$LINENO: result: yes" >&5
e10b0808
AX
39176$as_echo "yes" >&6; }
39177
3d248aec
AX
39178cat >>confdefs.h <<\_ACEOF
39179#define HAVE_GENERIC_IO_ACCT 1
39180_ACEOF
ea04106b 39181
ea04106b 39182
e10b0808
AX
39183 fi
39184 fi
ea04106b
AX
39185
39186
39187
3d248aec 39188 { $as_echo "$as_me:$LINENO: checking whether iops->rename() wants flags" >&5
68d83c55
AX
39189$as_echo_n "checking whether iops->rename() wants flags... " >&6; }
39190
39191
39192cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
39193/* confdefs.h. */
39194_ACEOF
39195cat confdefs.h >>conftest.$ac_ext
39196cat >>conftest.$ac_ext <<_ACEOF
39197/* end confdefs.h. */
68d83c55
AX
39198
39199
39200 #include <linux/fs.h>
39201 int rename_fn(struct inode *sip, struct dentry *sdp,
39202 struct inode *tip, struct dentry *tdp,
39203 unsigned int flags) { return 0; }
39204
39205 static const struct inode_operations
39206 iops __attribute__ ((unused)) = {
39207 .rename = rename_fn,
39208 };
39209
39210int
39211main (void)
39212{
39213
39214
39215 ;
39216 return 0;
39217}
39218
39219_ACEOF
39220
39221
39222
39223cat - <<_ACEOF >conftest.h
39224
39225_ACEOF
39226
39227
39228 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
39229 echo "obj-m := conftest.o" >build/Makefile
39230 modpost_flag=''
39231 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
39232 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 39233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
39234 (eval $ac_try) 2>&5
39235 ac_status=$?
3d248aec
AX
39236 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39237 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
39238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
39239 (eval $ac_try) 2>&5
39240 ac_status=$?
3d248aec
AX
39241 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39242 (exit $ac_status); }; }; then
68d83c55 39243
3d248aec 39244 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
39245$as_echo "yes" >&6; }
39246
3d248aec
AX
39247cat >>confdefs.h <<\_ACEOF
39248#define HAVE_RENAME_WANTS_FLAGS 1
39249_ACEOF
68d83c55
AX
39250
39251
39252else
39253 $as_echo "$as_me: failed program was:" >&5
39254sed 's/^/| /' conftest.$ac_ext >&5
39255
3d248aec 39256 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
39257$as_echo "no" >&6; }
39258
39259
39260
39261fi
3d248aec 39262
68d83c55
AX
39263 rm -Rf build
39264
39265
39266
39267
3d248aec 39268 { $as_echo "$as_me:$LINENO: checking whether generic_setxattr() exists" >&5
68d83c55
AX
39269$as_echo_n "checking whether generic_setxattr() exists... " >&6; }
39270
39271
39272cat confdefs.h - <<_ACEOF >conftest.c
3d248aec
AX
39273/* confdefs.h. */
39274_ACEOF
39275cat confdefs.h >>conftest.$ac_ext
39276cat >>conftest.$ac_ext <<_ACEOF
39277/* end confdefs.h. */
68d83c55
AX
39278
39279
39280 #include <linux/fs.h>
39281 #include <linux/xattr.h>
39282
39283 static const struct inode_operations
39284 iops __attribute__ ((unused)) = {
39285 .setxattr = generic_setxattr
39286 };
39287
39288int
39289main (void)
39290{
39291
39292
39293 ;
39294 return 0;
39295}
39296
39297_ACEOF
39298
39299
39300
39301cat - <<_ACEOF >conftest.h
39302
39303_ACEOF
39304
39305
39306 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
39307 echo "obj-m := conftest.o" >build/Makefile
39308 modpost_flag=''
39309 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
39310 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
3d248aec 39311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
39312 (eval $ac_try) 2>&5
39313 ac_status=$?
3d248aec
AX
39314 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39315 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
39316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
68d83c55
AX
39317 (eval $ac_try) 2>&5
39318 ac_status=$?
3d248aec
AX
39319 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39320 (exit $ac_status); }; }; then
68d83c55 39321
3d248aec 39322 { $as_echo "$as_me:$LINENO: result: yes" >&5
68d83c55
AX
39323$as_echo "yes" >&6; }
39324
3d248aec
AX
39325cat >>confdefs.h <<\_ACEOF
39326#define HAVE_GENERIC_SETXATTR 1
39327_ACEOF
68d83c55
AX
39328
39329
39330else
39331 $as_echo "$as_me: failed program was:" >&5
39332sed 's/^/| /' conftest.$ac_ext >&5
39333
3d248aec 39334 { $as_echo "$as_me:$LINENO: result: no" >&5
68d83c55
AX
39335$as_echo "no" >&6; }
39336
39337
39338
39339fi
3d248aec 39340
68d83c55
AX
39341 rm -Rf build
39342
39343
39344
3d248aec
AX
39345 { $as_echo "$as_me:$LINENO: checking whether current_time() exists" >&5
39346$as_echo_n "checking whether current_time() exists... " >&6; }
39347
39348
39349
39350cat confdefs.h - <<_ACEOF >conftest.c
39351/* confdefs.h. */
39352_ACEOF
39353cat confdefs.h >>conftest.$ac_ext
39354cat >>conftest.$ac_ext <<_ACEOF
39355/* end confdefs.h. */
39356
39357
39358 #include <linux/fs.h>
39359
39360int
39361main (void)
39362{
39363
39364 struct inode ip;
39365 struct timespec now __attribute__ ((unused));
39366
39367 now = current_time(&ip);
39368
39369 ;
39370 return 0;
39371}
68d83c55 39372
3d248aec
AX
39373_ACEOF
39374
39375
39376
39377cat - <<_ACEOF >conftest.h
39378
39379_ACEOF
39380
39381
39382 rm -Rf build && mkdir -p build && touch build/conftest.mod.c
39383 echo "obj-m := conftest.o" >build/Makefile
39384 modpost_flag=''
39385 test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
39386 if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
39387 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39388 (eval $ac_try) 2>&5
39389 ac_status=$?
39390 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39391 (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
39392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
39393 (eval $ac_try) 2>&5
39394 ac_status=$?
39395 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39396 (exit $ac_status); }; }; then
39397 rc=0
39398else
39399 $as_echo "$as_me: failed program was:" >&5
39400sed 's/^/| /' conftest.$ac_ext >&5
39401 rc=1
39402
39403
39404fi
39405
39406 rm -Rf build
39407
39408
39409 if test $rc -ne 0; then :
39410
39411 { $as_echo "$as_me:$LINENO: result: no" >&5
39412$as_echo "no" >&6; }
39413
39414 else
39415 if test "x$enable_linux_builtin" != xyes; then
39416
39417 grep -q -E '[[:space:]]current_time[[:space:]]' \
39418 $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
39419 rc=$?
39420 if test $rc -ne 0; then
39421 export=0
39422 for file in fs/inode.c; do
39423 grep -q -E "EXPORT_SYMBOL.*(current_time)" \
39424 "$LINUX/$file" 2>/dev/null
39425 rc=$?
39426 if test $rc -eq 0; then
39427 export=1
39428 break;
39429 fi
39430 done
39431 if test $export -eq 0; then :
39432 rc=1
39433 else :
39434 rc=0
39435 fi
39436 else :
39437 rc=0
39438 fi
39439
39440 fi
39441 if test $rc -ne 0; then :
39442
39443 { $as_echo "$as_me:$LINENO: result: no" >&5
39444$as_echo "no" >&6; }
39445
39446 else :
39447
39448 { $as_echo "$as_me:$LINENO: result: yes" >&5
39449$as_echo "yes" >&6; }
39450
39451cat >>confdefs.h <<\_ACEOF
39452#define HAVE_CURRENT_TIME 1
39453_ACEOF
39454
39455
39456 fi
39457 fi
39458
39459
39460
39461 if test "$LINUX_OBJ" != "$LINUX"; then
ea04106b
AX
39462
39463 KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
39464
39465fi
39466
39467
39468
3d248aec 39469
ea04106b 39470 KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
e10b0808 39471 KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_BOOL_COMPARE"
ea04106b
AX
39472 KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
39473 KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
39474
39475
39476
39477
39478
39479
39480# Check whether --with-mounthelperdir was given.
3d248aec 39481if test "${with_mounthelperdir+set}" = set; then
ea04106b
AX
39482 withval=$with_mounthelperdir; mounthelperdir=$withval
39483else
e10b0808 39484 mounthelperdir=/sbin
ea04106b
AX
39485fi
39486
39487
39488
39489
39490
3d248aec 39491 { $as_echo "$as_me:$LINENO: checking for udev directories" >&5
ea04106b
AX
39492$as_echo_n "checking for udev directories... " >&6; }
39493
39494# Check whether --with-udevdir was given.
3d248aec 39495if test "${with_udevdir+set}" = set; then
ea04106b
AX
39496 withval=$with_udevdir; udevdir=$withval
39497else
39498 udevdir=check
39499fi
39500
39501
3d248aec 39502 if test "x$udevdir" = xcheck; then
ea04106b
AX
39503
39504 path1=/lib/udev
39505 path2=/usr/lib/udev
39506 default=$path2
39507
3d248aec 39508 if test -d "$path1"; then
ea04106b
AX
39509 udevdir="$path1"
39510else
39511
3d248aec 39512 if test -d "$path2"; then
ea04106b
AX
39513 udevdir="$path2"
39514else
39515 udevdir="$default"
39516fi
39517
3d248aec 39518
ea04106b
AX
39519fi
39520
3d248aec 39521
ea04106b
AX
39522fi
39523
39524
3d248aec 39525
ea04106b 39526# Check whether --with-udevruledir was given.
3d248aec 39527if test "${with_udevruledir+set}" = set; then
ea04106b
AX
39528 withval=$with_udevruledir; udevruledir=$withval
39529else
39530 udevruledir="${udevdir}/rules.d"
39531fi
39532
39533
39534
39535
3d248aec 39536 { $as_echo "$as_me:$LINENO: result: $udevdir;$udevruledir" >&5
ea04106b
AX
39537$as_echo "$udevdir;$udevruledir" >&6; }
39538
39539
39540 # Check whether --enable-systemd was given.
3d248aec 39541if test "${enable_systemd+set}" = set; then
ea04106b
AX
39542 enableval=$enable_systemd;
39543else
39544 enable_systemd=yes
39545fi
39546
39547
39548
39549# Check whether --with-systemdunitdir was given.
3d248aec 39550if test "${with_systemdunitdir+set}" = set; then
ea04106b
AX
39551 withval=$with_systemdunitdir; systemdunitdir=$withval
39552else
39553 systemdunitdir=/usr/lib/systemd/system
39554fi
39555
39556
39557
39558# Check whether --with-systemdpresetdir was given.
3d248aec 39559if test "${with_systemdpresetdir+set}" = set; then
ea04106b
AX
39560 withval=$with_systemdpresetdir; systemdpresetdir=$withval
39561else
39562 systemdpresetdir=/usr/lib/systemd/system-preset
39563fi
39564
39565
39566
39567# Check whether --with-systemdmodulesloaddir was given.
3d248aec 39568if test "${with_systemdmodulesloaddir+set}" = set; then
ea04106b
AX
39569 withval=$with_systemdmodulesloaddir; systemdmoduleloaddir=$withval
39570else
39571 systemdmodulesloaddir=/usr/lib/modules-load.d
39572fi
39573
39574
39575
3d248aec 39576 if test "x$enable_systemd" = xyes; then
ea04106b
AX
39577
39578 ZFS_INIT_SYSTEMD=systemd
39579 ZFS_MODULE_LOAD=modules-load.d
39580 modulesloaddir=$systemdmodulesloaddir
39581
39582fi
39583
39584
39585
39586
39587
39588
39589
39590
3d248aec 39591
ea04106b 39592 # Check whether --enable-sysvinit was given.
3d248aec 39593if test "${enable_sysvinit+set}" = set; then
ea04106b
AX
39594 enableval=$enable_sysvinit;
39595else
39596 enable_sysvinit=yes
39597fi
39598
39599
3d248aec 39600 if test "x$enable_sysvinit" = xyes; then
ea04106b
AX
39601 ZFS_INIT_SYSV=init.d
39602fi
39603
39604
39605
39606
3d248aec
AX
39607
39608 { $as_echo "$as_me:$LINENO: checking for dracut directory" >&5
ea04106b
AX
39609$as_echo_n "checking for dracut directory... " >&6; }
39610
39611# Check whether --with-dracutdir was given.
3d248aec 39612if test "${with_dracutdir+set}" = set; then
ea04106b
AX
39613 withval=$with_dracutdir; dracutdir=$withval
39614else
39615 dracutdir=check
39616fi
39617
39618
3d248aec 39619 if test "x$dracutdir" = xcheck; then
ea04106b
AX
39620
39621 path1=/usr/share/dracut
39622 path2=/usr/lib/dracut
39623 default=$path2
39624
3d248aec 39625 if test -d "$path1"; then
ea04106b
AX
39626 dracutdir="$path1"
39627else
39628
3d248aec 39629 if test -d "$path2"; then
ea04106b
AX
39630 dracutdir="$path2"
39631else
39632 dracutdir="$default"
39633fi
39634
3d248aec 39635
ea04106b
AX
39636fi
39637
3d248aec 39638
ea04106b
AX
39639fi
39640
39641
3d248aec
AX
39642
39643 { $as_echo "$as_me:$LINENO: result: $dracutdir" >&5
ea04106b
AX
39644$as_echo "$dracutdir" >&6; }
39645
39646
3d248aec 39647 { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5
ea04106b
AX
39648$as_echo_n "checking for target asm dir... " >&6; }
39649 TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/`
39650
39651 case $TARGET_ARCH in
39652 i386|x86_64)
39653 TARGET_ASM_DIR=asm-${TARGET_ARCH}
39654 ;;
39655 *)
39656 TARGET_ASM_DIR=asm-generic
39657 ;;
39658 esac
39659
39660
3d248aec
AX
39661 { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5
39662$as_echo "$TARGET_ASM_DIR" >&6; }
39663
39664
39665 ZLIB=
39666
39667 if test "${ac_cv_header_zlib_h+set}" = set; then
39668 { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
39669$as_echo_n "checking for zlib.h... " >&6; }
39670if test "${ac_cv_header_zlib_h+set}" = set; then
39671 $as_echo_n "(cached) " >&6
39672fi
39673{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
39674$as_echo "$ac_cv_header_zlib_h" >&6; }
39675else
39676 # Is the header compilable?
39677{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
39678$as_echo_n "checking zlib.h usability... " >&6; }
39679cat >conftest.$ac_ext <<_ACEOF
39680/* confdefs.h. */
39681_ACEOF
39682cat confdefs.h >>conftest.$ac_ext
39683cat >>conftest.$ac_ext <<_ACEOF
39684/* end confdefs.h. */
39685$ac_includes_default
39686#include <zlib.h>
39687_ACEOF
39688rm -f conftest.$ac_objext
39689if { (ac_try="$ac_compile"
39690case "(($ac_try" in
39691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
39692 *) ac_try_echo=$ac_try;;
39693esac
39694eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
39695$as_echo "$ac_try_echo") >&5
39696 (eval "$ac_compile") 2>conftest.er1
39697 ac_status=$?
39698 grep -v '^ *+' conftest.er1 >conftest.err
39699 rm -f conftest.er1
39700 cat conftest.err >&5
39701 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39702 (exit $ac_status); } && {
39703 test -z "$ac_c_werror_flag" ||
39704 test ! -s conftest.err
39705 } && test -s conftest.$ac_objext; then
39706 ac_header_compiler=yes
39707else
39708 $as_echo "$as_me: failed program was:" >&5
39709sed 's/^/| /' conftest.$ac_ext >&5
39710
39711 ac_header_compiler=no
39712fi
39713
39714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39715{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
39716$as_echo "$ac_header_compiler" >&6; }
39717
39718# Is the header present?
39719{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
39720$as_echo_n "checking zlib.h presence... " >&6; }
39721cat >conftest.$ac_ext <<_ACEOF
39722/* confdefs.h. */
39723_ACEOF
39724cat confdefs.h >>conftest.$ac_ext
39725cat >>conftest.$ac_ext <<_ACEOF
39726/* end confdefs.h. */
39727#include <zlib.h>
39728_ACEOF
39729if { (ac_try="$ac_cpp conftest.$ac_ext"
39730case "(($ac_try" in
39731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
39732 *) ac_try_echo=$ac_try;;
39733esac
39734eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
39735$as_echo "$ac_try_echo") >&5
39736 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
39737 ac_status=$?
39738 grep -v '^ *+' conftest.er1 >conftest.err
39739 rm -f conftest.er1
39740 cat conftest.err >&5
39741 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39742 (exit $ac_status); } >/dev/null && {
39743 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
39744 test ! -s conftest.err
39745 }; then
39746 ac_header_preproc=yes
39747else
39748 $as_echo "$as_me: failed program was:" >&5
39749sed 's/^/| /' conftest.$ac_ext >&5
39750
39751 ac_header_preproc=no
39752fi
ea04106b 39753
3d248aec
AX
39754rm -f conftest.err conftest.$ac_ext
39755{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
39756$as_echo "$ac_header_preproc" >&6; }
ea04106b 39757
3d248aec
AX
39758# So? What about this header?
39759case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
39760 yes:no: )
39761 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
39762$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
39763 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
39764$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
39765 ac_header_preproc=yes
39766 ;;
39767 no:yes:* )
39768 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
39769$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
39770 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
39771$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
39772 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
39773$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
39774 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
39775$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
39776 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
39777$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
39778 { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
39779$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
ea04106b 39780
3d248aec
AX
39781 ;;
39782esac
39783{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
39784$as_echo_n "checking for zlib.h... " >&6; }
39785if test "${ac_cv_header_zlib_h+set}" = set; then
39786 $as_echo_n "(cached) " >&6
39787else
39788 ac_cv_header_zlib_h=$ac_header_preproc
39789fi
39790{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
39791$as_echo "$ac_cv_header_zlib_h" >&6; }
ea04106b 39792
3d248aec
AX
39793fi
39794if test "x$ac_cv_header_zlib_h" = x""yes; then
39795 :
ea04106b 39796else
3d248aec 39797 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 39798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
39799{ { $as_echo "$as_me:$LINENO: error:
39800 *** zlib.h missing, zlib-devel package required
39801See \`config.log' for more details." >&5
39802$as_echo "$as_me: error:
ea04106b 39803 *** zlib.h missing, zlib-devel package required
3d248aec
AX
39804See \`config.log' for more details." >&2;}
39805 { (exit 1); exit 1; }; }; }
ea04106b
AX
39806fi
39807
39808
39809
3d248aec
AX
39810
39811{ $as_echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
ea04106b 39812$as_echo_n "checking for compress2 in -lz... " >&6; }
3d248aec 39813if test "${ac_cv_lib_z_compress2+set}" = set; then
ea04106b
AX
39814 $as_echo_n "(cached) " >&6
39815else
39816 ac_check_lib_save_LIBS=$LIBS
39817LIBS="-lz $LIBS"
3d248aec
AX
39818cat >conftest.$ac_ext <<_ACEOF
39819/* confdefs.h. */
39820_ACEOF
39821cat confdefs.h >>conftest.$ac_ext
39822cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
39823/* end confdefs.h. */
39824
39825/* Override any GCC internal prototype to avoid an error.
39826 Use char because int might match the return type of a GCC
39827 builtin and then its argument prototype would still apply. */
39828#ifdef __cplusplus
39829extern "C"
39830#endif
39831char compress2 ();
39832int
39833main ()
39834{
39835return compress2 ();
39836 ;
39837 return 0;
39838}
39839_ACEOF
3d248aec
AX
39840rm -f conftest.$ac_objext conftest$ac_exeext
39841if { (ac_try="$ac_link"
39842case "(($ac_try" in
39843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
39844 *) ac_try_echo=$ac_try;;
39845esac
39846eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
39847$as_echo "$ac_try_echo") >&5
39848 (eval "$ac_link") 2>conftest.er1
39849 ac_status=$?
39850 grep -v '^ *+' conftest.er1 >conftest.err
39851 rm -f conftest.er1
39852 cat conftest.err >&5
39853 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39854 (exit $ac_status); } && {
39855 test -z "$ac_c_werror_flag" ||
39856 test ! -s conftest.err
39857 } && test -s conftest$ac_exeext && {
39858 test "$cross_compiling" = yes ||
39859 $as_test_x conftest$ac_exeext
39860 }; then
ea04106b
AX
39861 ac_cv_lib_z_compress2=yes
39862else
3d248aec
AX
39863 $as_echo "$as_me: failed program was:" >&5
39864sed 's/^/| /' conftest.$ac_ext >&5
39865
39866 ac_cv_lib_z_compress2=no
ea04106b 39867fi
3d248aec
AX
39868
39869rm -rf conftest.dSYM
39870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
39871 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
39872LIBS=$ac_check_lib_save_LIBS
39873fi
3d248aec 39874{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
ea04106b 39875$as_echo "$ac_cv_lib_z_compress2" >&6; }
3d248aec 39876if test "x$ac_cv_lib_z_compress2" = x""yes; then
ea04106b
AX
39877 cat >>confdefs.h <<_ACEOF
39878#define HAVE_LIBZ 1
39879_ACEOF
39880
39881 LIBS="-lz $LIBS"
39882
39883else
3d248aec 39884 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 39885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec 39886{ { $as_echo "$as_me:$LINENO: error:
ea04106b 39887 *** compress2() missing, zlib-devel package required
3d248aec
AX
39888See \`config.log' for more details." >&5
39889$as_echo "$as_me: error:
39890 *** compress2() missing, zlib-devel package required
39891See \`config.log' for more details." >&2;}
39892 { (exit 1); exit 1; }; }; }
ea04106b
AX
39893fi
39894
39895
3d248aec
AX
39896
39897{ $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
ea04106b 39898$as_echo_n "checking for uncompress in -lz... " >&6; }
3d248aec 39899if test "${ac_cv_lib_z_uncompress+set}" = set; then
ea04106b
AX
39900 $as_echo_n "(cached) " >&6
39901else
39902 ac_check_lib_save_LIBS=$LIBS
39903LIBS="-lz $LIBS"
3d248aec
AX
39904cat >conftest.$ac_ext <<_ACEOF
39905/* confdefs.h. */
39906_ACEOF
39907cat confdefs.h >>conftest.$ac_ext
39908cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
39909/* end confdefs.h. */
39910
39911/* Override any GCC internal prototype to avoid an error.
39912 Use char because int might match the return type of a GCC
39913 builtin and then its argument prototype would still apply. */
39914#ifdef __cplusplus
39915extern "C"
39916#endif
39917char uncompress ();
39918int
39919main ()
39920{
39921return uncompress ();
39922 ;
39923 return 0;
39924}
39925_ACEOF
3d248aec
AX
39926rm -f conftest.$ac_objext conftest$ac_exeext
39927if { (ac_try="$ac_link"
39928case "(($ac_try" in
39929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
39930 *) ac_try_echo=$ac_try;;
39931esac
39932eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
39933$as_echo "$ac_try_echo") >&5
39934 (eval "$ac_link") 2>conftest.er1
39935 ac_status=$?
39936 grep -v '^ *+' conftest.er1 >conftest.err
39937 rm -f conftest.er1
39938 cat conftest.err >&5
39939 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
39940 (exit $ac_status); } && {
39941 test -z "$ac_c_werror_flag" ||
39942 test ! -s conftest.err
39943 } && test -s conftest$ac_exeext && {
39944 test "$cross_compiling" = yes ||
39945 $as_test_x conftest$ac_exeext
39946 }; then
ea04106b
AX
39947 ac_cv_lib_z_uncompress=yes
39948else
3d248aec
AX
39949 $as_echo "$as_me: failed program was:" >&5
39950sed 's/^/| /' conftest.$ac_ext >&5
39951
39952 ac_cv_lib_z_uncompress=no
ea04106b 39953fi
3d248aec
AX
39954
39955rm -rf conftest.dSYM
39956rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
39957 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
39958LIBS=$ac_check_lib_save_LIBS
39959fi
3d248aec 39960{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&5
ea04106b 39961$as_echo "$ac_cv_lib_z_uncompress" >&6; }
3d248aec 39962if test "x$ac_cv_lib_z_uncompress" = x""yes; then
ea04106b
AX
39963 cat >>confdefs.h <<_ACEOF
39964#define HAVE_LIBZ 1
39965_ACEOF
39966
39967 LIBS="-lz $LIBS"
39968
39969else
3d248aec 39970 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 39971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
39972{ { $as_echo "$as_me:$LINENO: error:
39973 *** uncompress() missing, zlib-devel package required
39974See \`config.log' for more details." >&5
39975$as_echo "$as_me: error:
ea04106b 39976 *** uncompress() missing, zlib-devel package required
3d248aec
AX
39977See \`config.log' for more details." >&2;}
39978 { (exit 1); exit 1; }; }; }
ea04106b
AX
39979fi
39980
39981
3d248aec
AX
39982
39983{ $as_echo "$as_me:$LINENO: checking for crc32 in -lz" >&5
ea04106b 39984$as_echo_n "checking for crc32 in -lz... " >&6; }
3d248aec 39985if test "${ac_cv_lib_z_crc32+set}" = set; then
ea04106b
AX
39986 $as_echo_n "(cached) " >&6
39987else
39988 ac_check_lib_save_LIBS=$LIBS
39989LIBS="-lz $LIBS"
3d248aec
AX
39990cat >conftest.$ac_ext <<_ACEOF
39991/* confdefs.h. */
39992_ACEOF
39993cat confdefs.h >>conftest.$ac_ext
39994cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
39995/* end confdefs.h. */
39996
39997/* Override any GCC internal prototype to avoid an error.
39998 Use char because int might match the return type of a GCC
39999 builtin and then its argument prototype would still apply. */
40000#ifdef __cplusplus
40001extern "C"
40002#endif
40003char crc32 ();
40004int
40005main ()
40006{
40007return crc32 ();
40008 ;
40009 return 0;
40010}
40011_ACEOF
3d248aec
AX
40012rm -f conftest.$ac_objext conftest$ac_exeext
40013if { (ac_try="$ac_link"
40014case "(($ac_try" in
40015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40016 *) ac_try_echo=$ac_try;;
40017esac
40018eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40019$as_echo "$ac_try_echo") >&5
40020 (eval "$ac_link") 2>conftest.er1
40021 ac_status=$?
40022 grep -v '^ *+' conftest.er1 >conftest.err
40023 rm -f conftest.er1
40024 cat conftest.err >&5
40025 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40026 (exit $ac_status); } && {
40027 test -z "$ac_c_werror_flag" ||
40028 test ! -s conftest.err
40029 } && test -s conftest$ac_exeext && {
40030 test "$cross_compiling" = yes ||
40031 $as_test_x conftest$ac_exeext
40032 }; then
ea04106b
AX
40033 ac_cv_lib_z_crc32=yes
40034else
3d248aec
AX
40035 $as_echo "$as_me: failed program was:" >&5
40036sed 's/^/| /' conftest.$ac_ext >&5
40037
40038 ac_cv_lib_z_crc32=no
ea04106b 40039fi
3d248aec
AX
40040
40041rm -rf conftest.dSYM
40042rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
40043 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
40044LIBS=$ac_check_lib_save_LIBS
40045fi
3d248aec 40046{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5
ea04106b 40047$as_echo "$ac_cv_lib_z_crc32" >&6; }
3d248aec 40048if test "x$ac_cv_lib_z_crc32" = x""yes; then
ea04106b
AX
40049 cat >>confdefs.h <<_ACEOF
40050#define HAVE_LIBZ 1
40051_ACEOF
40052
40053 LIBS="-lz $LIBS"
40054
40055else
3d248aec 40056 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 40057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec 40058{ { $as_echo "$as_me:$LINENO: error:
ea04106b 40059 *** crc32() missing, zlib-devel package required
3d248aec
AX
40060See \`config.log' for more details." >&5
40061$as_echo "$as_me: error:
40062 *** crc32() missing, zlib-devel package required
40063See \`config.log' for more details." >&2;}
40064 { (exit 1); exit 1; }; }; }
ea04106b
AX
40065fi
40066
40067
40068 ZLIB="-lz"
40069
40070
3d248aec
AX
40071cat >>confdefs.h <<\_ACEOF
40072#define HAVE_ZLIB 1
40073_ACEOF
ea04106b
AX
40074
40075
40076
40077 LIBUUID=
40078
3d248aec
AX
40079 if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
40080 { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
40081$as_echo_n "checking for uuid/uuid.h... " >&6; }
40082if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
40083 $as_echo_n "(cached) " >&6
40084fi
40085{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
40086$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
40087else
40088 # Is the header compilable?
40089{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5
40090$as_echo_n "checking uuid/uuid.h usability... " >&6; }
40091cat >conftest.$ac_ext <<_ACEOF
40092/* confdefs.h. */
40093_ACEOF
40094cat confdefs.h >>conftest.$ac_ext
40095cat >>conftest.$ac_ext <<_ACEOF
40096/* end confdefs.h. */
40097$ac_includes_default
40098#include <uuid/uuid.h>
40099_ACEOF
40100rm -f conftest.$ac_objext
40101if { (ac_try="$ac_compile"
40102case "(($ac_try" in
40103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40104 *) ac_try_echo=$ac_try;;
40105esac
40106eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40107$as_echo "$ac_try_echo") >&5
40108 (eval "$ac_compile") 2>conftest.er1
40109 ac_status=$?
40110 grep -v '^ *+' conftest.er1 >conftest.err
40111 rm -f conftest.er1
40112 cat conftest.err >&5
40113 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40114 (exit $ac_status); } && {
40115 test -z "$ac_c_werror_flag" ||
40116 test ! -s conftest.err
40117 } && test -s conftest.$ac_objext; then
40118 ac_header_compiler=yes
40119else
40120 $as_echo "$as_me: failed program was:" >&5
40121sed 's/^/| /' conftest.$ac_ext >&5
40122
40123 ac_header_compiler=no
40124fi
40125
40126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40127{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
40128$as_echo "$ac_header_compiler" >&6; }
40129
40130# Is the header present?
40131{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5
40132$as_echo_n "checking uuid/uuid.h presence... " >&6; }
40133cat >conftest.$ac_ext <<_ACEOF
40134/* confdefs.h. */
40135_ACEOF
40136cat confdefs.h >>conftest.$ac_ext
40137cat >>conftest.$ac_ext <<_ACEOF
40138/* end confdefs.h. */
40139#include <uuid/uuid.h>
40140_ACEOF
40141if { (ac_try="$ac_cpp conftest.$ac_ext"
40142case "(($ac_try" in
40143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40144 *) ac_try_echo=$ac_try;;
40145esac
40146eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40147$as_echo "$ac_try_echo") >&5
40148 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
40149 ac_status=$?
40150 grep -v '^ *+' conftest.er1 >conftest.err
40151 rm -f conftest.er1
40152 cat conftest.err >&5
40153 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40154 (exit $ac_status); } >/dev/null && {
40155 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
40156 test ! -s conftest.err
40157 }; then
40158 ac_header_preproc=yes
40159else
40160 $as_echo "$as_me: failed program was:" >&5
40161sed 's/^/| /' conftest.$ac_ext >&5
40162
40163 ac_header_preproc=no
40164fi
40165
40166rm -f conftest.err conftest.$ac_ext
40167{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
40168$as_echo "$ac_header_preproc" >&6; }
40169
40170# So? What about this header?
40171case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
40172 yes:no: )
40173 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
40174$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
40175 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5
40176$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;}
40177 ac_header_preproc=yes
40178 ;;
40179 no:yes:* )
40180 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5
40181$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;}
40182 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&5
40183$as_echo "$as_me: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&2;}
40184 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5
40185$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;}
40186 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&5
40187$as_echo "$as_me: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&2;}
40188 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5
40189$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;}
40190 { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5
40191$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;}
40192
40193 ;;
40194esac
40195{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
40196$as_echo_n "checking for uuid/uuid.h... " >&6; }
40197if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
40198 $as_echo_n "(cached) " >&6
40199else
40200 ac_cv_header_uuid_uuid_h=$ac_header_preproc
40201fi
40202{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
40203$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
ea04106b 40204
3d248aec
AX
40205fi
40206if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then
40207 :
ea04106b 40208else
3d248aec 40209 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 40210$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
40211{ { $as_echo "$as_me:$LINENO: error:
40212 *** uuid/uuid.h missing, libuuid-devel package required
40213See \`config.log' for more details." >&5
40214$as_echo "$as_me: error:
ea04106b 40215 *** uuid/uuid.h missing, libuuid-devel package required
3d248aec
AX
40216See \`config.log' for more details." >&2;}
40217 { (exit 1); exit 1; }; }; }
ea04106b
AX
40218fi
40219
40220
40221
3d248aec
AX
40222
40223{ $as_echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5
ea04106b 40224$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
3d248aec 40225if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then
ea04106b
AX
40226 $as_echo_n "(cached) " >&6
40227else
40228 ac_check_lib_save_LIBS=$LIBS
40229LIBS="-luuid $LIBS"
3d248aec
AX
40230cat >conftest.$ac_ext <<_ACEOF
40231/* confdefs.h. */
40232_ACEOF
40233cat confdefs.h >>conftest.$ac_ext
40234cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
40235/* end confdefs.h. */
40236
40237/* Override any GCC internal prototype to avoid an error.
40238 Use char because int might match the return type of a GCC
40239 builtin and then its argument prototype would still apply. */
40240#ifdef __cplusplus
40241extern "C"
40242#endif
40243char uuid_generate ();
40244int
40245main ()
40246{
40247return uuid_generate ();
40248 ;
40249 return 0;
40250}
40251_ACEOF
3d248aec
AX
40252rm -f conftest.$ac_objext conftest$ac_exeext
40253if { (ac_try="$ac_link"
40254case "(($ac_try" in
40255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40256 *) ac_try_echo=$ac_try;;
40257esac
40258eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40259$as_echo "$ac_try_echo") >&5
40260 (eval "$ac_link") 2>conftest.er1
40261 ac_status=$?
40262 grep -v '^ *+' conftest.er1 >conftest.err
40263 rm -f conftest.er1
40264 cat conftest.err >&5
40265 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40266 (exit $ac_status); } && {
40267 test -z "$ac_c_werror_flag" ||
40268 test ! -s conftest.err
40269 } && test -s conftest$ac_exeext && {
40270 test "$cross_compiling" = yes ||
40271 $as_test_x conftest$ac_exeext
40272 }; then
ea04106b
AX
40273 ac_cv_lib_uuid_uuid_generate=yes
40274else
3d248aec
AX
40275 $as_echo "$as_me: failed program was:" >&5
40276sed 's/^/| /' conftest.$ac_ext >&5
40277
40278 ac_cv_lib_uuid_uuid_generate=no
ea04106b 40279fi
3d248aec
AX
40280
40281rm -rf conftest.dSYM
40282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
40283 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
40284LIBS=$ac_check_lib_save_LIBS
40285fi
3d248aec 40286{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5
ea04106b 40287$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
3d248aec 40288if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then
ea04106b
AX
40289 cat >>confdefs.h <<_ACEOF
40290#define HAVE_LIBUUID 1
40291_ACEOF
40292
40293 LIBS="-luuid $LIBS"
40294
40295else
3d248aec 40296 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 40297$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec 40298{ { $as_echo "$as_me:$LINENO: error:
ea04106b 40299 *** uuid_generate() missing, libuuid-devel package required
3d248aec
AX
40300See \`config.log' for more details." >&5
40301$as_echo "$as_me: error:
40302 *** uuid_generate() missing, libuuid-devel package required
40303See \`config.log' for more details." >&2;}
40304 { (exit 1); exit 1; }; }; }
ea04106b
AX
40305fi
40306
40307
3d248aec
AX
40308
40309{ $as_echo "$as_me:$LINENO: checking for uuid_is_null in -luuid" >&5
ea04106b 40310$as_echo_n "checking for uuid_is_null in -luuid... " >&6; }
3d248aec 40311if test "${ac_cv_lib_uuid_uuid_is_null+set}" = set; then
ea04106b
AX
40312 $as_echo_n "(cached) " >&6
40313else
40314 ac_check_lib_save_LIBS=$LIBS
40315LIBS="-luuid $LIBS"
3d248aec
AX
40316cat >conftest.$ac_ext <<_ACEOF
40317/* confdefs.h. */
40318_ACEOF
40319cat confdefs.h >>conftest.$ac_ext
40320cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
40321/* end confdefs.h. */
40322
40323/* Override any GCC internal prototype to avoid an error.
40324 Use char because int might match the return type of a GCC
40325 builtin and then its argument prototype would still apply. */
40326#ifdef __cplusplus
40327extern "C"
40328#endif
40329char uuid_is_null ();
40330int
40331main ()
40332{
40333return uuid_is_null ();
40334 ;
40335 return 0;
40336}
40337_ACEOF
3d248aec
AX
40338rm -f conftest.$ac_objext conftest$ac_exeext
40339if { (ac_try="$ac_link"
40340case "(($ac_try" in
40341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40342 *) ac_try_echo=$ac_try;;
40343esac
40344eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40345$as_echo "$ac_try_echo") >&5
40346 (eval "$ac_link") 2>conftest.er1
40347 ac_status=$?
40348 grep -v '^ *+' conftest.er1 >conftest.err
40349 rm -f conftest.er1
40350 cat conftest.err >&5
40351 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40352 (exit $ac_status); } && {
40353 test -z "$ac_c_werror_flag" ||
40354 test ! -s conftest.err
40355 } && test -s conftest$ac_exeext && {
40356 test "$cross_compiling" = yes ||
40357 $as_test_x conftest$ac_exeext
40358 }; then
ea04106b
AX
40359 ac_cv_lib_uuid_uuid_is_null=yes
40360else
3d248aec
AX
40361 $as_echo "$as_me: failed program was:" >&5
40362sed 's/^/| /' conftest.$ac_ext >&5
40363
40364 ac_cv_lib_uuid_uuid_is_null=no
ea04106b 40365fi
3d248aec
AX
40366
40367rm -rf conftest.dSYM
40368rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
40369 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
40370LIBS=$ac_check_lib_save_LIBS
40371fi
3d248aec 40372{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_is_null" >&5
ea04106b 40373$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; }
3d248aec 40374if test "x$ac_cv_lib_uuid_uuid_is_null" = x""yes; then
ea04106b
AX
40375 cat >>confdefs.h <<_ACEOF
40376#define HAVE_LIBUUID 1
40377_ACEOF
40378
40379 LIBS="-luuid $LIBS"
40380
40381else
3d248aec 40382 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 40383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
40384{ { $as_echo "$as_me:$LINENO: error:
40385 *** uuid_is_null() missing, libuuid-devel package required
40386See \`config.log' for more details." >&5
40387$as_echo "$as_me: error:
ea04106b 40388 *** uuid_is_null() missing, libuuid-devel package required
3d248aec
AX
40389See \`config.log' for more details." >&2;}
40390 { (exit 1); exit 1; }; }; }
ea04106b
AX
40391fi
40392
40393
40394 LIBUUID="-luuid"
40395
40396
3d248aec
AX
40397cat >>confdefs.h <<\_ACEOF
40398#define HAVE_LIBUUID 1
40399_ACEOF
ea04106b
AX
40400
40401
40402
40403
40404# Check whether --with-blkid was given.
3d248aec 40405if test "${with_blkid+set}" = set; then
ea04106b
AX
40406 withval=$with_blkid;
40407else
40408 with_blkid=check
40409fi
40410
40411
40412 LIBBLKID=
3d248aec 40413 if test "x$with_blkid" = xyes; then
ea04106b
AX
40414
40415 LIBBLKID="-lblkid"
40416
40417
3d248aec
AX
40418cat >>confdefs.h <<\_ACEOF
40419#define HAVE_LIBBLKID 1
40420_ACEOF
ea04106b
AX
40421
40422
40423fi
40424
ea04106b 40425
3d248aec
AX
40426 if test "x$with_blkid" = xcheck; then
40427
40428 { $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5
ea04106b 40429$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
3d248aec 40430if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then
ea04106b
AX
40431 $as_echo_n "(cached) " >&6
40432else
40433 ac_check_lib_save_LIBS=$LIBS
40434LIBS="-lblkid $LIBS"
3d248aec
AX
40435cat >conftest.$ac_ext <<_ACEOF
40436/* confdefs.h. */
40437_ACEOF
40438cat confdefs.h >>conftest.$ac_ext
40439cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
40440/* end confdefs.h. */
40441
40442/* Override any GCC internal prototype to avoid an error.
40443 Use char because int might match the return type of a GCC
40444 builtin and then its argument prototype would still apply. */
40445#ifdef __cplusplus
40446extern "C"
40447#endif
40448char blkid_get_cache ();
40449int
40450main ()
40451{
40452return blkid_get_cache ();
40453 ;
40454 return 0;
40455}
40456_ACEOF
3d248aec
AX
40457rm -f conftest.$ac_objext conftest$ac_exeext
40458if { (ac_try="$ac_link"
40459case "(($ac_try" in
40460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40461 *) ac_try_echo=$ac_try;;
40462esac
40463eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40464$as_echo "$ac_try_echo") >&5
40465 (eval "$ac_link") 2>conftest.er1
40466 ac_status=$?
40467 grep -v '^ *+' conftest.er1 >conftest.err
40468 rm -f conftest.er1
40469 cat conftest.err >&5
40470 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40471 (exit $ac_status); } && {
40472 test -z "$ac_c_werror_flag" ||
40473 test ! -s conftest.err
40474 } && test -s conftest$ac_exeext && {
40475 test "$cross_compiling" = yes ||
40476 $as_test_x conftest$ac_exeext
40477 }; then
ea04106b
AX
40478 ac_cv_lib_blkid_blkid_get_cache=yes
40479else
3d248aec
AX
40480 $as_echo "$as_me: failed program was:" >&5
40481sed 's/^/| /' conftest.$ac_ext >&5
40482
40483 ac_cv_lib_blkid_blkid_get_cache=no
ea04106b 40484fi
3d248aec
AX
40485
40486rm -rf conftest.dSYM
40487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
40488 conftest$ac_exeext conftest.$ac_ext
ea04106b
AX
40489LIBS=$ac_check_lib_save_LIBS
40490fi
3d248aec 40491{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
ea04106b 40492$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
3d248aec 40493if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then
ea04106b 40494
3d248aec 40495 { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5
ea04106b
AX
40496$as_echo_n "checking for blkid zfs support... " >&6; }
40497
40498 ZFS_DEV=`mktemp`
40499 truncate -s 64M $ZFS_DEV
40500 echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
40501 dd of=$ZFS_DEV bs=1k count=8 \
40502 seek=128 conv=notrunc &>/dev/null \
40503 >/dev/null 2>/dev/null
40504 echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
40505 dd of=$ZFS_DEV bs=1k count=8 \
40506 seek=132 conv=notrunc &>/dev/null \
40507 >/dev/null 2>/dev/null
40508 echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
40509 dd of=$ZFS_DEV bs=1k count=8 \
40510 seek=136 conv=notrunc &>/dev/null \
40511 >/dev/null 2>/dev/null
40512 echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
40513 dd of=$ZFS_DEV bs=1k count=8 \
40514 seek=140 conv=notrunc &>/dev/null \
40515 >/dev/null 2>/dev/null
40516
40517 saved_LIBS="$LIBS"
40518 LIBS="-lblkid"
40519
3d248aec
AX
40520 if test "$cross_compiling" = yes; then
40521 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 40522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
40523{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
40524See \`config.log' for more details." >&5
40525$as_echo "$as_me: error: cannot run test program while cross compiling
40526See \`config.log' for more details." >&2;}
40527 { (exit 1); exit 1; }; }; }
ea04106b 40528else
3d248aec
AX
40529 cat >conftest.$ac_ext <<_ACEOF
40530/* confdefs.h. */
40531_ACEOF
40532cat confdefs.h >>conftest.$ac_ext
40533cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
40534/* end confdefs.h. */
40535
40536 #include <stdio.h>
40537 #include <stdlib.h>
40538 #include <blkid/blkid.h>
40539
40540int
40541main ()
40542{
40543
40544 blkid_cache cache;
40545 char *value;
40546
40547 if (blkid_get_cache(&cache, NULL) < 0)
40548 return 1;
40549
40550 value = blkid_get_tag_value(cache, "TYPE",
40551 "$ZFS_DEV");
40552 if (!value) {
40553 blkid_put_cache(cache);
40554 return 2;
40555 }
40556
40557 if (strcmp(value, "zfs_member")) {
40558 free(value);
40559 blkid_put_cache(cache);
40560 return 0;
40561 }
40562
40563 free(value);
40564 blkid_put_cache(cache);
40565
40566 ;
40567 return 0;
40568}
40569_ACEOF
3d248aec
AX
40570rm -f conftest$ac_exeext
40571if { (ac_try="$ac_link"
40572case "(($ac_try" in
40573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40574 *) ac_try_echo=$ac_try;;
40575esac
40576eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40577$as_echo "$ac_try_echo") >&5
40578 (eval "$ac_link") 2>&5
40579 ac_status=$?
40580 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
40582 { (case "(($ac_try" in
40583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40584 *) ac_try_echo=$ac_try;;
40585esac
40586eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40587$as_echo "$ac_try_echo") >&5
40588 (eval "$ac_try") 2>&5
40589 ac_status=$?
40590 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40591 (exit $ac_status); }; }; then
ea04106b
AX
40592
40593 rm -f $ZFS_DEV
3d248aec 40594 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
40595$as_echo "yes" >&6; }
40596 LIBBLKID="-lblkid"
40597
40598
3d248aec
AX
40599cat >>confdefs.h <<\_ACEOF
40600#define HAVE_LIBBLKID 1
40601_ACEOF
ea04106b
AX
40602
40603
40604else
3d248aec
AX
40605 $as_echo "$as_me: program exited with status $ac_status" >&5
40606$as_echo "$as_me: failed program was:" >&5
40607sed 's/^/| /' conftest.$ac_ext >&5
40608
40609( exit $ac_status )
ea04106b
AX
40610
40611 rm -f $ZFS_DEV
3d248aec 40612 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b 40613$as_echo "no" >&6; }
3d248aec
AX
40614 if test "x$with_blkid" != xcheck; then
40615 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 40616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
40617{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
40618See \`config.log' for more details." >&5
40619$as_echo "$as_me: error: --with-blkid given but unavailable
40620See \`config.log' for more details." >&2;}
40621 { (exit 1); exit 1; }; }; }
ea04106b
AX
40622fi
40623
3d248aec 40624
ea04106b 40625fi
3d248aec
AX
40626rm -rf conftest.dSYM
40627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ea04106b
AX
40628fi
40629
40630
3d248aec 40631
ea04106b
AX
40632 LIBS="$saved_LIBS"
40633
40634else
40635
3d248aec
AX
40636 if test "x$with_blkid" != xcheck; then
40637 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
ea04106b 40638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3d248aec
AX
40639{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
40640See \`config.log' for more details." >&5
40641$as_echo "$as_me: error: --with-blkid given but unavailable
40642See \`config.log' for more details." >&2;}
40643 { (exit 1); exit 1; }; }; }
ea04106b
AX
40644fi
40645
40646
3d248aec 40647
ea04106b
AX
40648fi
40649
40650
40651fi
40652
40653
3d248aec
AX
40654
40655 { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than=<size> support" >&5
ea04106b
AX
40656$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
40657
40658 saved_flags="$CFLAGS"
40659 CFLAGS="$CFLAGS -Wframe-larger-than=1024"
40660
3d248aec
AX
40661 cat >conftest.$ac_ext <<_ACEOF
40662/* confdefs.h. */
40663_ACEOF
40664cat confdefs.h >>conftest.$ac_ext
40665cat >>conftest.$ac_ext <<_ACEOF
ea04106b
AX
40666/* end confdefs.h. */
40667
40668int
40669main ()
40670{
40671
40672 ;
40673 return 0;
40674}
40675_ACEOF
3d248aec
AX
40676rm -f conftest.$ac_objext
40677if { (ac_try="$ac_compile"
40678case "(($ac_try" in
40679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40680 *) ac_try_echo=$ac_try;;
40681esac
40682eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40683$as_echo "$ac_try_echo") >&5
40684 (eval "$ac_compile") 2>conftest.er1
40685 ac_status=$?
40686 grep -v '^ *+' conftest.er1 >conftest.err
40687 rm -f conftest.er1
40688 cat conftest.err >&5
40689 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40690 (exit $ac_status); } && {
40691 test -z "$ac_c_werror_flag" ||
40692 test ! -s conftest.err
40693 } && test -s conftest.$ac_objext; then
ea04106b
AX
40694
40695 FRAME_LARGER_THAN=-Wframe-larger-than=1024
3d248aec 40696 { $as_echo "$as_me:$LINENO: result: yes" >&5
ea04106b
AX
40697$as_echo "yes" >&6; }
40698
40699else
3d248aec
AX
40700 $as_echo "$as_me: failed program was:" >&5
40701sed 's/^/| /' conftest.$ac_ext >&5
40702
ea04106b
AX
40703
40704 FRAME_LARGER_THAN=
3d248aec 40705 { $as_echo "$as_me:$LINENO: result: no" >&5
ea04106b
AX
40706$as_echo "no" >&6; }
40707
40708fi
3d248aec 40709
ea04106b
AX
40710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40711
40712 CFLAGS="$saved_flags"
40713
40714
40715
40716 if test "x$runstatedir" = x; then
40717 runstatedir='${localstatedir}/run'
40718
40719 fi
40720
3d248aec
AX
40721
40722 { $as_echo "$as_me:$LINENO: checking makedev() is declared in sys/sysmacros.h" >&5
40723$as_echo_n "checking makedev() is declared in sys/sysmacros.h... " >&6; }
40724 cat >conftest.$ac_ext <<_ACEOF
40725/* confdefs.h. */
40726_ACEOF
40727cat confdefs.h >>conftest.$ac_ext
40728cat >>conftest.$ac_ext <<_ACEOF
40729/* end confdefs.h. */
40730
40731 #include <sys/sysmacros.h>
40732
40733int
40734main ()
40735{
40736
40737 int k;
40738 k = makedev(0,0);
40739
40740 ;
40741 return 0;
40742}
40743_ACEOF
40744rm -f conftest.$ac_objext
40745if { (ac_try="$ac_compile"
40746case "(($ac_try" in
40747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40748 *) ac_try_echo=$ac_try;;
40749esac
40750eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40751$as_echo "$ac_try_echo") >&5
40752 (eval "$ac_compile") 2>conftest.er1
40753 ac_status=$?
40754 grep -v '^ *+' conftest.er1 >conftest.err
40755 rm -f conftest.er1
40756 cat conftest.err >&5
40757 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40758 (exit $ac_status); } && {
40759 test -z "$ac_c_werror_flag" ||
40760 test ! -s conftest.err
40761 } && test -s conftest.$ac_objext; then
40762
40763 { $as_echo "$as_me:$LINENO: result: yes" >&5
40764$as_echo "yes" >&6; }
40765
40766cat >>confdefs.h <<\_ACEOF
40767#define HAVE_MAKEDEV_IN_SYSMACROS 1
40768_ACEOF
40769
40770
40771else
40772 $as_echo "$as_me: failed program was:" >&5
40773sed 's/^/| /' conftest.$ac_ext >&5
40774
40775
40776 { $as_echo "$as_me:$LINENO: result: no" >&5
40777$as_echo "no" >&6; }
40778
40779fi
40780
40781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40782
40783
40784 { $as_echo "$as_me:$LINENO: checking makedev() is declared in sys/mkdev.h" >&5
40785$as_echo_n "checking makedev() is declared in sys/mkdev.h... " >&6; }
40786 cat >conftest.$ac_ext <<_ACEOF
40787/* confdefs.h. */
40788_ACEOF
40789cat confdefs.h >>conftest.$ac_ext
40790cat >>conftest.$ac_ext <<_ACEOF
40791/* end confdefs.h. */
40792
40793 #include <sys/mkdev.h>
40794
40795int
40796main ()
40797{
40798
40799 int k;
40800 k = makedev(0,0);
40801
40802 ;
40803 return 0;
40804}
40805_ACEOF
40806rm -f conftest.$ac_objext
40807if { (ac_try="$ac_compile"
40808case "(($ac_try" in
40809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40810 *) ac_try_echo=$ac_try;;
40811esac
40812eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40813$as_echo "$ac_try_echo") >&5
40814 (eval "$ac_compile") 2>conftest.er1
40815 ac_status=$?
40816 grep -v '^ *+' conftest.er1 >conftest.err
40817 rm -f conftest.er1
40818 cat conftest.err >&5
40819 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40820 (exit $ac_status); } && {
40821 test -z "$ac_c_werror_flag" ||
40822 test ! -s conftest.err
40823 } && test -s conftest.$ac_objext; then
40824
40825 { $as_echo "$as_me:$LINENO: result: yes" >&5
40826$as_echo "yes" >&6; }
40827
40828cat >>confdefs.h <<\_ACEOF
40829#define HAVE_MAKEDEV_IN_MKDEV 1
40830_ACEOF
40831
40832
40833else
40834 $as_echo "$as_me: failed program was:" >&5
40835sed 's/^/| /' conftest.$ac_ext >&5
40836
40837
40838 { $as_echo "$as_me:$LINENO: result: no" >&5
40839$as_echo "no" >&6; }
40840
40841fi
40842
40843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40844
40845
40846 { $as_echo "$as_me:$LINENO: checking for -Wno-format-truncation support" >&5
40847$as_echo_n "checking for -Wno-format-truncation support... " >&6; }
40848
40849 saved_flags="$CFLAGS"
40850 CFLAGS="$CFLAGS -Wno-format-truncation"
40851
40852 cat >conftest.$ac_ext <<_ACEOF
40853/* confdefs.h. */
40854_ACEOF
40855cat confdefs.h >>conftest.$ac_ext
40856cat >>conftest.$ac_ext <<_ACEOF
40857/* end confdefs.h. */
40858
40859int
40860main ()
40861{
40862
40863 ;
40864 return 0;
40865}
40866_ACEOF
40867rm -f conftest.$ac_objext
40868if { (ac_try="$ac_compile"
40869case "(($ac_try" in
40870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40871 *) ac_try_echo=$ac_try;;
40872esac
40873eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40874$as_echo "$ac_try_echo") >&5
40875 (eval "$ac_compile") 2>conftest.er1
40876 ac_status=$?
40877 grep -v '^ *+' conftest.er1 >conftest.err
40878 rm -f conftest.er1
40879 cat conftest.err >&5
40880 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40881 (exit $ac_status); } && {
40882 test -z "$ac_c_werror_flag" ||
40883 test ! -s conftest.err
40884 } && test -s conftest.$ac_objext; then
40885
40886 NO_FORMAT_TRUNCATION=-Wno-format-truncation
40887 { $as_echo "$as_me:$LINENO: result: yes" >&5
40888$as_echo "yes" >&6; }
40889
40890else
40891 $as_echo "$as_me: failed program was:" >&5
40892sed 's/^/| /' conftest.$ac_ext >&5
40893
40894
40895 NO_FORMAT_TRUNCATION=
40896 { $as_echo "$as_me:$LINENO: result: no" >&5
40897$as_echo "no" >&6; }
40898
40899fi
40900
40901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40902
40903 CFLAGS="$saved_flags"
40904
40905
40906
40907for ac_func in mlockall
40908do
40909as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
40910{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
40911$as_echo_n "checking for $ac_func... " >&6; }
40912if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
40913 $as_echo_n "(cached) " >&6
40914else
40915 cat >conftest.$ac_ext <<_ACEOF
40916/* confdefs.h. */
40917_ACEOF
40918cat confdefs.h >>conftest.$ac_ext
40919cat >>conftest.$ac_ext <<_ACEOF
40920/* end confdefs.h. */
40921/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
40922 For example, HP-UX 11i <limits.h> declares gettimeofday. */
40923#define $ac_func innocuous_$ac_func
40924
40925/* System header to define __stub macros and hopefully few prototypes,
40926 which can conflict with char $ac_func (); below.
40927 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
40928 <limits.h> exists even on freestanding compilers. */
40929
40930#ifdef __STDC__
40931# include <limits.h>
40932#else
40933# include <assert.h>
40934#endif
40935
40936#undef $ac_func
40937
40938/* Override any GCC internal prototype to avoid an error.
40939 Use char because int might match the return type of a GCC
40940 builtin and then its argument prototype would still apply. */
40941#ifdef __cplusplus
40942extern "C"
40943#endif
40944char $ac_func ();
40945/* The GNU C library defines this for functions which it implements
40946 to always fail with ENOSYS. Some functions are actually named
40947 something starting with __ and the normal name is an alias. */
40948#if defined __stub_$ac_func || defined __stub___$ac_func
40949choke me
40950#endif
40951
40952int
40953main ()
40954{
40955return $ac_func ();
40956 ;
40957 return 0;
40958}
40959_ACEOF
40960rm -f conftest.$ac_objext conftest$ac_exeext
40961if { (ac_try="$ac_link"
40962case "(($ac_try" in
40963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
40964 *) ac_try_echo=$ac_try;;
40965esac
40966eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
40967$as_echo "$ac_try_echo") >&5
40968 (eval "$ac_link") 2>conftest.er1
40969 ac_status=$?
40970 grep -v '^ *+' conftest.er1 >conftest.err
40971 rm -f conftest.er1
40972 cat conftest.err >&5
40973 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
40974 (exit $ac_status); } && {
40975 test -z "$ac_c_werror_flag" ||
40976 test ! -s conftest.err
40977 } && test -s conftest$ac_exeext && {
40978 test "$cross_compiling" = yes ||
40979 $as_test_x conftest$ac_exeext
40980 }; then
40981 eval "$as_ac_var=yes"
40982else
40983 $as_echo "$as_me: failed program was:" >&5
40984sed 's/^/| /' conftest.$ac_ext >&5
40985
40986 eval "$as_ac_var=no"
40987fi
40988
40989rm -rf conftest.dSYM
40990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
40991 conftest$ac_exeext conftest.$ac_ext
40992fi
40993ac_res=`eval 'as_val=${'$as_ac_var'}
40994 $as_echo "$as_val"'`
40995 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
40996$as_echo "$ac_res" >&6; }
40997as_val=`eval 'as_val=${'$as_ac_var'}
40998 $as_echo "$as_val"'`
40999 if test "x$as_val" = x""yes; then
ea04106b 41000 cat >>confdefs.h <<_ACEOF
3d248aec 41001#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
ea04106b
AX
41002_ACEOF
41003
41004fi
41005done
41006
41007 ;;
41008 srpm) ;;
41009 *)
3d248aec 41010 { $as_echo "$as_me:$LINENO: result: Error!" >&5
ea04106b 41011$as_echo "Error!" >&6; }
3d248aec
AX
41012 { { $as_echo "$as_me:$LINENO: error: Bad value \"$ZFS_CONFIG\" for --with-config,
41013 user kernel|user|all|srpm" >&5
41014$as_echo "$as_me: error: Bad value \"$ZFS_CONFIG\" for --with-config,
41015 user kernel|user|all|srpm" >&2;}
41016 { (exit 1); exit 1; }; } ;;
ea04106b
AX
41017 esac
41018
41019 if test "$ZFS_CONFIG" = user -o "$ZFS_CONFIG" = all; then
41020 CONFIG_USER_TRUE=
41021 CONFIG_USER_FALSE='#'
41022else
41023 CONFIG_USER_TRUE='#'
41024 CONFIG_USER_FALSE=
41025fi
41026
41027 if test "$ZFS_CONFIG" = kernel -o "$ZFS_CONFIG" = all &&
41028 test "x$enable_linux_builtin" != xyes ; then
41029 CONFIG_KERNEL_TRUE=
41030 CONFIG_KERNEL_FALSE='#'
41031else
41032 CONFIG_KERNEL_TRUE='#'
41033 CONFIG_KERNEL_FALSE=
41034fi
41035
41036
41037
3d248aec 41038 { $as_echo "$as_me:$LINENO: checking whether debugging is enabled" >&5
ea04106b
AX
41039$as_echo_n "checking whether debugging is enabled... " >&6; }
41040 # Check whether --enable-debug was given.
3d248aec 41041if test "${enable_debug+set}" = set; then
ea04106b
AX
41042 enableval=$enable_debug;
41043else
41044 enable_debug=no
41045fi
41046
41047
3d248aec 41048 if test "x$enable_debug" = xyes; then
ea04106b
AX
41049
41050 KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG -Werror"
41051 HOSTCFLAGS="${HOSTCFLAGS} -DDEBUG -Werror"
41052 DEBUG_CFLAGS="-DDEBUG -Werror"
41053 DEBUG_STACKFLAGS="-fstack-check"
41054 DEBUG_ZFS="_with_debug"
41055
3d248aec
AX
41056cat >>confdefs.h <<\_ACEOF
41057#define ZFS_DEBUG 1
41058_ACEOF
ea04106b
AX
41059
41060
41061else
41062
41063 KERNELCPPFLAGS="${KERNELCPPFLAGS} -DNDEBUG "
41064 HOSTCFLAGS="${HOSTCFLAGS} -DNDEBUG "
41065 DEBUG_CFLAGS="-DNDEBUG"
41066 DEBUG_STACKFLAGS=""
41067 DEBUG_ZFS="_without_debug"
41068
41069fi
41070
41071
41072
41073
3d248aec
AX
41074
41075 { $as_echo "$as_me:$LINENO: result: $enable_debug" >&5
ea04106b
AX
41076$as_echo "$enable_debug" >&6; }
41077
41078
41079 # Check whether --enable-debug-dmu-tx was given.
3d248aec 41080if test "${enable_debug_dmu_tx+set}" = set; then
ea04106b
AX
41081 enableval=$enable_debug_dmu_tx;
41082else
41083 enable_debug_dmu_tx=no
41084fi
41085
41086
3d248aec 41087 if test "x$enable_debug_dmu_tx" = xyes; then
ea04106b
AX
41088
41089 KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_DMU_TX"
41090 DEBUG_DMU_TX="_with_debug_dmu_tx"
41091
3d248aec
AX
41092cat >>confdefs.h <<\_ACEOF
41093#define DEBUG_DMU_TX 1
41094_ACEOF
ea04106b
AX
41095
41096
41097else
41098
41099 DEBUG_DMU_TX="_without_debug_dmu_tx"
41100
41101fi
41102
41103
3d248aec
AX
41104
41105 { $as_echo "$as_me:$LINENO: checking whether dmu tx validation is enabled" >&5
ea04106b 41106$as_echo_n "checking whether dmu tx validation is enabled... " >&6; }
3d248aec 41107 { $as_echo "$as_me:$LINENO: result: $enable_debug_dmu_tx" >&5
ea04106b
AX
41108$as_echo "$enable_debug_dmu_tx" >&6; }
41109
41110
e10b0808 41111ac_config_files="$ac_config_files Makefile udev/Makefile udev/rules.d/Makefile etc/Makefile etc/init.d/Makefile etc/zfs/Makefile etc/systemd/Makefile etc/systemd/system/Makefile etc/modules-load.d/Makefile man/Makefile man/man1/Makefile man/man5/Makefile man/man8/Makefile lib/Makefile lib/libspl/Makefile lib/libspl/asm-generic/Makefile lib/libspl/asm-i386/Makefile lib/libspl/asm-x86_64/Makefile lib/libspl/include/Makefile lib/libspl/include/ia32/Makefile lib/libspl/include/ia32/sys/Makefile lib/libspl/include/rpc/Makefile lib/libspl/include/sys/Makefile lib/libspl/include/sys/sysevent/Makefile lib/libspl/include/sys/dktp/Makefile lib/libspl/include/util/Makefile lib/libavl/Makefile lib/libefi/Makefile lib/libnvpair/Makefile lib/libunicode/Makefile lib/libuutil/Makefile lib/libzpool/Makefile lib/libzfs/libzfs.pc lib/libzfs/libzfs_core.pc lib/libzfs/Makefile lib/libzfs_core/Makefile lib/libshare/Makefile cmd/Makefile cmd/zdb/Makefile cmd/zhack/Makefile cmd/zfs/Makefile cmd/zinject/Makefile cmd/zpool/Makefile cmd/zstreamdump/Makefile cmd/ztest/Makefile cmd/zpios/Makefile cmd/mount_zfs/Makefile cmd/fsck_zfs/Makefile cmd/zvol_id/Makefile cmd/vdev_id/Makefile cmd/arcstat/Makefile cmd/dbufstat/Makefile cmd/arc_summary/Makefile cmd/zed/Makefile contrib/Makefile contrib/bash_completion.d/Makefile contrib/dracut/Makefile contrib/dracut/90zfs/Makefile contrib/initramfs/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile include/Makefile include/linux/Makefile include/sys/Makefile include/sys/fs/Makefile include/sys/fm/Makefile include/sys/fm/fs/Makefile scripts/Makefile scripts/zpios-profile/Makefile scripts/zpios-test/Makefile scripts/zpool-config/Makefile scripts/common.sh rpm/Makefile rpm/redhat/Makefile rpm/redhat/zfs.spec rpm/redhat/zfs-kmod.spec rpm/redhat/zfs-dkms.spec rpm/generic/Makefile rpm/generic/zfs.spec rpm/generic/zfs-kmod.spec rpm/generic/zfs-dkms.spec zfs-script-config.sh zfs.release"
ea04106b
AX
41112
41113
41114cat >confcache <<\_ACEOF
41115# This file is a shell script that caches the results of configure
41116# tests run on this system so they can be shared between configure
41117# scripts and configure runs, see configure's option --config-cache.
41118# It is not useful on other systems. If it contains results you don't
41119# want to keep, you may remove or edit it.
41120#
41121# config.status only pays attention to the cache file if you give it
41122# the --recheck option to rerun configure.
41123#
41124# `ac_cv_env_foo' variables (set or unset) will be overridden when
41125# loading this file, other *unset* `ac_cv_foo' will be assigned the
41126# following values.
41127
41128_ACEOF
41129
41130# The following way of writing the cache mishandles newlines in values,
41131# but we know of no workaround that is simple, portable, and efficient.
41132# So, we kill variables containing newlines.
41133# Ultrix sh set writes to stderr and can't be redirected directly,
41134# and sets the high bit in the cache file unless we assign to the vars.
41135(
41136 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
41137 eval ac_val=\$$ac_var
41138 case $ac_val in #(
41139 *${as_nl}*)
41140 case $ac_var in #(
3d248aec 41141 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
ea04106b
AX
41142$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
41143 esac
41144 case $ac_var in #(
41145 _ | IFS | as_nl) ;; #(
41146 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3d248aec 41147 *) $as_unset $ac_var ;;
ea04106b
AX
41148 esac ;;
41149 esac
41150 done
41151
41152 (set) 2>&1 |
41153 case $as_nl`(ac_space=' '; set) 2>&1` in #(
41154 *${as_nl}ac_space=\ *)
3d248aec
AX
41155 # `set' does not quote correctly, so add quotes (double-quote
41156 # substitution turns \\\\ into \\, and sed turns \\ into \).
ea04106b
AX
41157 sed -n \
41158 "s/'/'\\\\''/g;
41159 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
41160 ;; #(
41161 *)
41162 # `set' quotes correctly as required by POSIX, so do not add quotes.
41163 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
41164 ;;
41165 esac |
41166 sort
41167) |
41168 sed '
41169 /^ac_cv_env_/b end
41170 t clear
41171 :clear
41172 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
41173 t end
41174 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
41175 :end' >>confcache
41176if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
41177 if test -w "$cache_file"; then
3d248aec
AX
41178 test "x$cache_file" != "x/dev/null" &&
41179 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
ea04106b 41180$as_echo "$as_me: updating cache $cache_file" >&6;}
3d248aec 41181 cat confcache >$cache_file
ea04106b 41182 else
3d248aec 41183 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
ea04106b
AX
41184$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
41185 fi
41186fi
41187rm -f confcache
41188
41189test "x$prefix" = xNONE && prefix=$ac_default_prefix
41190# Let make expand exec_prefix.
41191test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
41192
41193DEFS=-DHAVE_CONFIG_H
41194
41195ac_libobjs=
41196ac_ltlibobjs=
ea04106b
AX
41197for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
41198 # 1. Remove the extension, and $U if already installed.
41199 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
41200 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
41201 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
41202 # will be set to the directory where LIBOBJS objects are built.
3d248aec
AX
41203 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
41204 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
ea04106b
AX
41205done
41206LIBOBJS=$ac_libobjs
41207
41208LTLIBOBJS=$ac_ltlibobjs
41209
41210
41211if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
3d248aec
AX
41212 { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
41213Usually this means the macro was only invoked conditionally." >&5
41214$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
41215Usually this means the macro was only invoked conditionally." >&2;}
41216 { (exit 1); exit 1; }; }
41217fi
ea04106b
AX
41218 if test -n "$EXEEXT"; then
41219 am__EXEEXT_TRUE=
41220 am__EXEEXT_FALSE='#'
41221else
41222 am__EXEEXT_TRUE='#'
41223 am__EXEEXT_FALSE=
41224fi
41225
41226if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
3d248aec
AX
41227 { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
41228Usually this means the macro was only invoked conditionally." >&5
41229$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
41230Usually this means the macro was only invoked conditionally." >&2;}
41231 { (exit 1); exit 1; }; }
ea04106b
AX
41232fi
41233if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
3d248aec
AX
41234 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
41235Usually this means the macro was only invoked conditionally." >&5
41236$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
41237Usually this means the macro was only invoked conditionally." >&2;}
41238 { (exit 1); exit 1; }; }
ea04106b
AX
41239fi
41240if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then
3d248aec
AX
41241 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCCAS\" was never defined.
41242Usually this means the macro was only invoked conditionally." >&5
41243$as_echo "$as_me: error: conditional \"am__fastdepCCAS\" was never defined.
41244Usually this means the macro was only invoked conditionally." >&2;}
41245 { (exit 1); exit 1; }; }
ea04106b
AX
41246fi
41247if test -z "${CONFIG_USER_TRUE}" && test -z "${CONFIG_USER_FALSE}"; then
3d248aec
AX
41248 { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_USER\" was never defined.
41249Usually this means the macro was only invoked conditionally." >&5
41250$as_echo "$as_me: error: conditional \"CONFIG_USER\" was never defined.
41251Usually this means the macro was only invoked conditionally." >&2;}
41252 { (exit 1); exit 1; }; }
ea04106b
AX
41253fi
41254if test -z "${CONFIG_KERNEL_TRUE}" && test -z "${CONFIG_KERNEL_FALSE}"; then
3d248aec
AX
41255 { { $as_echo "$as_me:$LINENO: error: conditional \"CONFIG_KERNEL\" was never defined.
41256Usually this means the macro was only invoked conditionally." >&5
41257$as_echo "$as_me: error: conditional \"CONFIG_KERNEL\" was never defined.
41258Usually this means the macro was only invoked conditionally." >&2;}
41259 { (exit 1); exit 1; }; }
ea04106b
AX
41260fi
41261
3d248aec 41262: ${CONFIG_STATUS=./config.status}
ea04106b
AX
41263ac_write_fail=0
41264ac_clean_files_save=$ac_clean_files
41265ac_clean_files="$ac_clean_files $CONFIG_STATUS"
3d248aec 41266{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
ea04106b 41267$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
3d248aec 41268cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ea04106b
AX
41269#! $SHELL
41270# Generated by $as_me.
41271# Run this file to recreate the current configuration.
41272# Compiler output produced by configure, useful for debugging
41273# configure, is in config.log if it exists.
41274
41275debug=false
41276ac_cs_recheck=false
41277ac_cs_silent=false
ea04106b 41278SHELL=\${CONFIG_SHELL-$SHELL}
3d248aec
AX
41279_ACEOF
41280
41281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41282## --------------------- ##
41283## M4sh Initialization. ##
41284## --------------------- ##
ea04106b
AX
41285
41286# Be more Bourne compatible
41287DUALCASE=1; export DUALCASE # for MKS sh
3d248aec 41288if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
ea04106b
AX
41289 emulate sh
41290 NULLCMD=:
41291 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
41292 # is contrary to our usage. Disable this feature.
41293 alias -g '${1+"$@"}'='"$@"'
41294 setopt NO_GLOB_SUBST
41295else
3d248aec
AX
41296 case `(set -o) 2>/dev/null` in
41297 *posix*) set -o posix ;;
ea04106b 41298esac
3d248aec 41299
ea04106b
AX
41300fi
41301
41302
3d248aec
AX
41303
41304
41305# PATH needs CR
41306# Avoid depending upon Character Ranges.
41307as_cr_letters='abcdefghijklmnopqrstuvwxyz'
41308as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
41309as_cr_Letters=$as_cr_letters$as_cr_LETTERS
41310as_cr_digits='0123456789'
41311as_cr_alnum=$as_cr_Letters$as_cr_digits
41312
ea04106b
AX
41313as_nl='
41314'
41315export as_nl
41316# Printing a long string crashes Solaris 7 /usr/bin/printf.
41317as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41318as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
41319as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
3d248aec 41320if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
ea04106b
AX
41321 as_echo='printf %s\n'
41322 as_echo_n='printf %s'
41323else
41324 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
41325 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
41326 as_echo_n='/usr/ucb/echo -n'
41327 else
41328 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
41329 as_echo_n_body='eval
41330 arg=$1;
3d248aec 41331 case $arg in
ea04106b
AX
41332 *"$as_nl"*)
41333 expr "X$arg" : "X\\(.*\\)$as_nl";
41334 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
41335 esac;
41336 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
41337 '
41338 export as_echo_n_body
41339 as_echo_n='sh -c $as_echo_n_body as_echo'
41340 fi
41341 export as_echo_body
41342 as_echo='sh -c $as_echo_body as_echo'
41343fi
41344
41345# The user is always right.
41346if test "${PATH_SEPARATOR+set}" != set; then
41347 PATH_SEPARATOR=:
41348 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
41349 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
41350 PATH_SEPARATOR=';'
41351 }
41352fi
41353
3d248aec
AX
41354# Support unset when possible.
41355if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
41356 as_unset=unset
41357else
41358 as_unset=false
41359fi
41360
ea04106b
AX
41361
41362# IFS
41363# We need space, tab and new line, in precisely that order. Quoting is
41364# there to prevent editors from complaining about space-tab.
41365# (If _AS_PATH_WALK were called with IFS unset, it would disable word
41366# splitting by setting IFS to empty value.)
41367IFS=" "" $as_nl"
41368
41369# Find who we are. Look in the path if we contain no directory separator.
3d248aec 41370case $0 in
ea04106b
AX
41371 *[\\/]* ) as_myself=$0 ;;
41372 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41373for as_dir in $PATH
41374do
41375 IFS=$as_save_IFS
41376 test -z "$as_dir" && as_dir=.
3d248aec
AX
41377 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
41378done
ea04106b
AX
41379IFS=$as_save_IFS
41380
41381 ;;
41382esac
41383# We did not find ourselves, most probably we were run as `sh COMMAND'
41384# in which case we are not to be found in the path.
41385if test "x$as_myself" = x; then
41386 as_myself=$0
41387fi
41388if test ! -f "$as_myself"; then
41389 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
3d248aec 41390 { (exit 1); exit 1; }
ea04106b
AX
41391fi
41392
3d248aec
AX
41393# Work around bugs in pre-3.0 UWIN ksh.
41394for as_var in ENV MAIL MAILPATH
41395do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
ea04106b
AX
41396done
41397PS1='$ '
41398PS2='> '
41399PS4='+ '
41400
41401# NLS nuisances.
41402LC_ALL=C
41403export LC_ALL
41404LANGUAGE=C
41405export LANGUAGE
41406
3d248aec 41407# Required to use basename.
ea04106b
AX
41408if expr a : '\(a\)' >/dev/null 2>&1 &&
41409 test "X`expr 00001 : '.*\(...\)'`" = X001; then
41410 as_expr=expr
41411else
41412 as_expr=false
41413fi
41414
41415if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
41416 as_basename=basename
41417else
41418 as_basename=false
41419fi
41420
ea04106b 41421
3d248aec 41422# Name of the executable.
ea04106b
AX
41423as_me=`$as_basename -- "$0" ||
41424$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
41425 X"$0" : 'X\(//\)$' \| \
41426 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
41427$as_echo X/"$0" |
41428 sed '/^.*\/\([^/][^/]*\)\/*$/{
41429 s//\1/
41430 q
41431 }
41432 /^X\/\(\/\/\)$/{
41433 s//\1/
41434 q
41435 }
41436 /^X\/\(\/\).*/{
41437 s//\1/
41438 q
41439 }
41440 s/.*/./; q'`
41441
3d248aec
AX
41442# CDPATH.
41443$as_unset CDPATH
41444
41445
41446
41447 as_lineno_1=$LINENO
41448 as_lineno_2=$LINENO
41449 test "x$as_lineno_1" != "x$as_lineno_2" &&
41450 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
41451
41452 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
41453 # uniformly replaced by the line number. The first 'sed' inserts a
41454 # line-number line after each line using $LINENO; the second 'sed'
41455 # does the real work. The second script uses 'N' to pair each
41456 # line-number line with the line containing $LINENO, and appends
41457 # trailing '-' during substitution so that $LINENO is not a special
41458 # case at line end.
41459 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
41460 # scripts with optimization help from Paolo Bonzini. Blame Lee
41461 # E. McMahon (1931-1989) for sed's syntax. :-)
41462 sed -n '
41463 p
41464 /[$]LINENO/=
41465 ' <$as_myself |
41466 sed '
41467 s/[$]LINENO.*/&-/
41468 t lineno
41469 b
41470 :lineno
41471 N
41472 :loop
41473 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
41474 t loop
41475 s/-\n.*//
41476 ' >$as_me.lineno &&
41477 chmod +x "$as_me.lineno" ||
41478 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
41479 { (exit 1); exit 1; }; }
41480
41481 # Don't try to exec as it changes $[0], causing all sort of problems
41482 # (the dirname of $[0] is not the place where we might find the
41483 # original and so on. Autoconf is especially sensitive to this).
41484 . "./$as_me.lineno"
41485 # Exit status is that of the last command.
41486 exit
41487}
41488
41489
41490if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
41491 as_dirname=dirname
41492else
41493 as_dirname=false
41494fi
ea04106b
AX
41495
41496ECHO_C= ECHO_N= ECHO_T=
3d248aec 41497case `echo -n x` in
ea04106b 41498-n*)
3d248aec 41499 case `echo 'x\c'` in
ea04106b 41500 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
3d248aec 41501 *) ECHO_C='\c';;
ea04106b
AX
41502 esac;;
41503*)
41504 ECHO_N='-n';;
41505esac
3d248aec
AX
41506if expr a : '\(a\)' >/dev/null 2>&1 &&
41507 test "X`expr 00001 : '.*\(...\)'`" = X001; then
41508 as_expr=expr
41509else
41510 as_expr=false
41511fi
ea04106b
AX
41512
41513rm -f conf$$ conf$$.exe conf$$.file
41514if test -d conf$$.dir; then
41515 rm -f conf$$.dir/conf$$.file
41516else
41517 rm -f conf$$.dir
41518 mkdir conf$$.dir 2>/dev/null
41519fi
41520if (echo >conf$$.file) 2>/dev/null; then
41521 if ln -s conf$$.file conf$$ 2>/dev/null; then
41522 as_ln_s='ln -s'
41523 # ... but there are two gotchas:
41524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
41525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
3d248aec 41526 # In both cases, we have to default to `cp -p'.
ea04106b 41527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
3d248aec 41528 as_ln_s='cp -p'
ea04106b
AX
41529 elif ln conf$$.file conf$$ 2>/dev/null; then
41530 as_ln_s=ln
41531 else
3d248aec 41532 as_ln_s='cp -p'
ea04106b
AX
41533 fi
41534else
3d248aec 41535 as_ln_s='cp -p'
ea04106b
AX
41536fi
41537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
41538rmdir conf$$.dir 2>/dev/null
41539
ea04106b 41540if mkdir -p . 2>/dev/null; then
3d248aec 41541 as_mkdir_p=:
ea04106b
AX
41542else
41543 test -d ./-p && rmdir ./-p
41544 as_mkdir_p=false
41545fi
41546
3d248aec
AX
41547if test -x / >/dev/null 2>&1; then
41548 as_test_x='test -x'
41549else
41550 if ls -dL / >/dev/null 2>&1; then
41551 as_ls_L_option=L
41552 else
41553 as_ls_L_option=
41554 fi
41555 as_test_x='
41556 eval sh -c '\''
41557 if test -d "$1"; then
41558 test -d "$1/.";
41559 else
41560 case $1 in
41561 -*)set "./$1";;
41562 esac;
41563 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
41564 ???[sx]*):;;*)false;;esac;fi
41565 '\'' sh
41566 '
41567fi
41568as_executable_p=$as_test_x
ea04106b
AX
41569
41570# Sed expression to map a string onto a valid CPP name.
41571as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
41572
41573# Sed expression to map a string onto a valid variable name.
41574as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
41575
41576
41577exec 6>&1
ea04106b 41578
3d248aec 41579# Save the log message, to keep $[0] and so on meaningful, and to
ea04106b
AX
41580# report actual input values of CONFIG_FILES etc. instead of their
41581# values after options handling.
41582ac_log="
3d248aec
AX
41583This file was extended by zfs $as_me 0.6.5.11, which was
41584generated by GNU Autoconf 2.63. Invocation command line was
ea04106b
AX
41585
41586 CONFIG_FILES = $CONFIG_FILES
41587 CONFIG_HEADERS = $CONFIG_HEADERS
41588 CONFIG_LINKS = $CONFIG_LINKS
41589 CONFIG_COMMANDS = $CONFIG_COMMANDS
41590 $ $0 $@
41591
41592on `(hostname || uname -n) 2>/dev/null | sed 1q`
41593"
41594
41595_ACEOF
41596
41597case $ac_config_files in *"
41598"*) set x $ac_config_files; shift; ac_config_files=$*;;
41599esac
41600
41601case $ac_config_headers in *"
41602"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
41603esac
41604
41605
41606cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41607# Files that config.status was made for.
41608config_files="$ac_config_files"
41609config_headers="$ac_config_headers"
41610config_commands="$ac_config_commands"
41611
41612_ACEOF
41613
41614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41615ac_cs_usage="\
3d248aec
AX
41616\`$as_me' instantiates files from templates according to the
41617current configuration.
ea04106b 41618
3d248aec 41619Usage: $0 [OPTION]... [FILE]...
ea04106b
AX
41620
41621 -h, --help print this help, then exit
41622 -V, --version print version number and configuration settings, then exit
ea04106b
AX
41623 -q, --quiet, --silent
41624 do not print progress messages
41625 -d, --debug don't remove temporary files
41626 --recheck update $as_me by reconfiguring in the same conditions
41627 --file=FILE[:TEMPLATE]
41628 instantiate the configuration file FILE
41629 --header=FILE[:TEMPLATE]
41630 instantiate the configuration header FILE
41631
41632Configuration files:
41633$config_files
41634
41635Configuration headers:
41636$config_headers
41637
41638Configuration commands:
41639$config_commands
41640
3d248aec 41641Report bugs to <bug-autoconf@gnu.org>."
ea04106b
AX
41642
41643_ACEOF
41644cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ea04106b 41645ac_cs_version="\\
3d248aec
AX
41646zfs config.status 0.6.5.11
41647configured by $0, generated by GNU Autoconf 2.63,
41648 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
ea04106b 41649
3d248aec 41650Copyright (C) 2008 Free Software Foundation, Inc.
ea04106b
AX
41651This config.status script is free software; the Free Software Foundation
41652gives unlimited permission to copy, distribute and modify it."
41653
41654ac_pwd='$ac_pwd'
41655srcdir='$srcdir'
41656INSTALL='$INSTALL'
41657MKDIR_P='$MKDIR_P'
41658AWK='$AWK'
41659test -n "\$AWK" || AWK=awk
41660_ACEOF
41661
41662cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41663# The default lists apply if the user does not specify any file.
41664ac_need_defaults=:
41665while test $# != 0
41666do
41667 case $1 in
3d248aec 41668 --*=*)
ea04106b
AX
41669 ac_option=`expr "X$1" : 'X\([^=]*\)='`
41670 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
41671 ac_shift=:
41672 ;;
ea04106b
AX
41673 *)
41674 ac_option=$1
41675 ac_optarg=$2
41676 ac_shift=shift
41677 ;;
41678 esac
41679
41680 case $ac_option in
41681 # Handling of the options.
41682 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
41683 ac_cs_recheck=: ;;
41684 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
41685 $as_echo "$ac_cs_version"; exit ;;
ea04106b
AX
41686 --debug | --debu | --deb | --de | --d | -d )
41687 debug=: ;;
41688 --file | --fil | --fi | --f )
41689 $ac_shift
41690 case $ac_optarg in
41691 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
ea04106b 41692 esac
3d248aec 41693 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
ea04106b
AX
41694 ac_need_defaults=false;;
41695 --header | --heade | --head | --hea )
41696 $ac_shift
41697 case $ac_optarg in
41698 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
41699 esac
3d248aec 41700 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
ea04106b
AX
41701 ac_need_defaults=false;;
41702 --he | --h)
41703 # Conflict between --help and --header
3d248aec
AX
41704 { $as_echo "$as_me: error: ambiguous option: $1
41705Try \`$0 --help' for more information." >&2
41706 { (exit 1); exit 1; }; };;
ea04106b
AX
41707 --help | --hel | -h )
41708 $as_echo "$ac_cs_usage"; exit ;;
41709 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
41710 | -silent | --silent | --silen | --sile | --sil | --si | --s)
41711 ac_cs_silent=: ;;
41712
41713 # This is an error.
3d248aec
AX
41714 -*) { $as_echo "$as_me: error: unrecognized option: $1
41715Try \`$0 --help' for more information." >&2
41716 { (exit 1); exit 1; }; } ;;
ea04106b 41717
3d248aec 41718 *) ac_config_targets="$ac_config_targets $1"
ea04106b
AX
41719 ac_need_defaults=false ;;
41720
41721 esac
41722 shift
41723done
41724
41725ac_configure_extra_args=
41726
41727if $ac_cs_silent; then
41728 exec 6>/dev/null
41729 ac_configure_extra_args="$ac_configure_extra_args --silent"
41730fi
41731
41732_ACEOF
41733cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41734if \$ac_cs_recheck; then
3d248aec 41735 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
ea04106b
AX
41736 shift
41737 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
41738 CONFIG_SHELL='$SHELL'
41739 export CONFIG_SHELL
41740 exec "\$@"
41741fi
41742
41743_ACEOF
41744cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41745exec 5>>config.log
41746{
41747 echo
41748 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
41749## Running $as_me. ##
41750_ASBOX
41751 $as_echo "$ac_log"
41752} >&5
41753
41754_ACEOF
41755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41756#
41757# INIT-COMMANDS
41758#
41759AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
41760
41761
41762# The HP-UX ksh and POSIX shell print the target directory to stdout
41763# if CDPATH is set.
41764(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
41765
41766sed_quote_subst='$sed_quote_subst'
41767double_quote_subst='$double_quote_subst'
41768delay_variable_subst='$delay_variable_subst'
3d248aec
AX
41769macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
41770macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
41771enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
41772enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
41773pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
41774enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
41775host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
41776host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
41777host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
41778build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
41779build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
41780build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
41781SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
41782Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
41783GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
41784EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
41785FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
41786LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
41787NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
41788LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
41789max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
41790ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
41791exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
41792lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
41793lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
41794lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
41795reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
41796reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41797OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
41798deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
41799file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
41800AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
41801AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
41802STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
41803RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
41804old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41805old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41806old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41807CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
41808CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
41809compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
41810GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
41811lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
41812lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
41813lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
41814lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
41815objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
41816SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
41817ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
41818MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
41819lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
41820lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
41821lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
41822lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
41823lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
41824need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
41825DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
41826NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
41827LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
41828OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
41829OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
41830libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
41831shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41832extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41833archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
41834enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
41835export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
41836whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
41837compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
41838old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41839old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41840archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41841archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41842module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41843module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41844with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
41845allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
41846no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
41847hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
41848hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
41849hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
41850hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
41851hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
41852hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
41853hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
41854hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
41855inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
41856link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
41857fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
41858always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
41859export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41860exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
41861include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
41862prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41863file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
41864variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
41865need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
41866need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
41867version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
41868runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
41869shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
41870shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
41871libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
41872library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
41873soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
41874postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41875postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41876finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
41877finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
41878hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
41879sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
41880sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
41881hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
41882enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
41883enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
41884enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
41885old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
41886striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
ea04106b
AX
41887
41888LTCC='$LTCC'
41889LTCFLAGS='$LTCFLAGS'
41890compiler='$compiler_DEFAULT'
41891
ea04106b 41892# Quote evaled strings.
3d248aec 41893for var in SED \
ea04106b
AX
41894GREP \
41895EGREP \
41896FGREP \
41897LD \
41898NM \
41899LN_S \
41900lt_SP2NL \
41901lt_NL2SP \
41902reload_flag \
41903OBJDUMP \
41904deplibs_check_method \
41905file_magic_cmd \
ea04106b
AX
41906AR \
41907AR_FLAGS \
ea04106b
AX
41908STRIP \
41909RANLIB \
41910CC \
41911CFLAGS \
41912compiler \
41913lt_cv_sys_global_symbol_pipe \
41914lt_cv_sys_global_symbol_to_cdecl \
41915lt_cv_sys_global_symbol_to_c_name_address \
41916lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
3d248aec
AX
41917SHELL \
41918ECHO \
ea04106b 41919lt_prog_compiler_no_builtin_flag \
ea04106b 41920lt_prog_compiler_wl \
3d248aec 41921lt_prog_compiler_pic \
ea04106b
AX
41922lt_prog_compiler_static \
41923lt_cv_prog_compiler_c_o \
41924need_locks \
ea04106b
AX
41925DSYMUTIL \
41926NMEDIT \
41927LIPO \
41928OTOOL \
41929OTOOL64 \
41930shrext_cmds \
41931export_dynamic_flag_spec \
41932whole_archive_flag_spec \
41933compiler_needs_object \
41934with_gnu_ld \
41935allow_undefined_flag \
41936no_undefined_flag \
41937hardcode_libdir_flag_spec \
3d248aec 41938hardcode_libdir_flag_spec_ld \
ea04106b 41939hardcode_libdir_separator \
3d248aec 41940fix_srcfile_path \
ea04106b
AX
41941exclude_expsyms \
41942include_expsyms \
41943file_list_spec \
41944variables_saved_for_relink \
41945libname_spec \
41946library_names_spec \
41947soname_spec \
ea04106b
AX
41948finish_eval \
41949old_striplib \
41950striplib; do
3d248aec 41951 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
ea04106b 41952 *[\\\\\\\`\\"\\\$]*)
3d248aec 41953 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
ea04106b
AX
41954 ;;
41955 *)
41956 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
41957 ;;
41958 esac
41959done
41960
41961# Double-quote double-evaled strings.
41962for var in reload_cmds \
41963old_postinstall_cmds \
41964old_postuninstall_cmds \
41965old_archive_cmds \
41966extract_expsyms_cmds \
41967old_archive_from_new_cmds \
41968old_archive_from_expsyms_cmds \
41969archive_cmds \
41970archive_expsym_cmds \
41971module_cmds \
41972module_expsym_cmds \
41973export_symbols_cmds \
41974prelink_cmds \
ea04106b
AX
41975postinstall_cmds \
41976postuninstall_cmds \
41977finish_cmds \
41978sys_lib_search_path_spec \
3d248aec
AX
41979sys_lib_dlsearch_path_spec; do
41980 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
ea04106b 41981 *[\\\\\\\`\\"\\\$]*)
3d248aec 41982 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
ea04106b
AX
41983 ;;
41984 *)
41985 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
41986 ;;
41987 esac
41988done
41989
3d248aec
AX
41990# Fix-up fallback echo if it was mangled by the above quoting rules.
41991case \$lt_ECHO in
41992*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
41993 ;;
41994esac
41995
ea04106b 41996ac_aux_dir='$ac_aux_dir'
3d248aec
AX
41997xsi_shell='$xsi_shell'
41998lt_shell_append='$lt_shell_append'
ea04106b 41999
3d248aec 42000# See if we are running on zsh, and set the options which allow our
ea04106b 42001# commands through without removal of \ escapes INIT.
3d248aec 42002if test -n "\${ZSH_VERSION+set}" ; then
ea04106b
AX
42003 setopt NO_GLOB_SUBST
42004fi
42005
42006
42007 PACKAGE='$PACKAGE'
42008 VERSION='$VERSION'
3d248aec 42009 TIMESTAMP='$TIMESTAMP'
ea04106b
AX
42010 RM='$RM'
42011 ofile='$ofile'
42012
42013
42014
42015
42016_ACEOF
42017
42018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
42019
42020# Handling of arguments.
42021for ac_config_target in $ac_config_targets
42022do
42023 case $ac_config_target in
42024 "zfs_config.h") CONFIG_HEADERS="$CONFIG_HEADERS zfs_config.h" ;;
42025 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
42026 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
42027 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
ea04106b
AX
42028 "udev/Makefile") CONFIG_FILES="$CONFIG_FILES udev/Makefile" ;;
42029 "udev/rules.d/Makefile") CONFIG_FILES="$CONFIG_FILES udev/rules.d/Makefile" ;;
42030 "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
42031 "etc/init.d/Makefile") CONFIG_FILES="$CONFIG_FILES etc/init.d/Makefile" ;;
42032 "etc/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES etc/zfs/Makefile" ;;
42033 "etc/systemd/Makefile") CONFIG_FILES="$CONFIG_FILES etc/systemd/Makefile" ;;
42034 "etc/systemd/system/Makefile") CONFIG_FILES="$CONFIG_FILES etc/systemd/system/Makefile" ;;
42035 "etc/modules-load.d/Makefile") CONFIG_FILES="$CONFIG_FILES etc/modules-load.d/Makefile" ;;
42036 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
42037 "man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES man/man1/Makefile" ;;
42038 "man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES man/man5/Makefile" ;;
42039 "man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES man/man8/Makefile" ;;
42040 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
42041 "lib/libspl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/Makefile" ;;
42042 "lib/libspl/asm-generic/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/asm-generic/Makefile" ;;
42043 "lib/libspl/asm-i386/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/asm-i386/Makefile" ;;
42044 "lib/libspl/asm-x86_64/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/asm-x86_64/Makefile" ;;
42045 "lib/libspl/include/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/Makefile" ;;
42046 "lib/libspl/include/ia32/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/ia32/Makefile" ;;
42047 "lib/libspl/include/ia32/sys/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/ia32/sys/Makefile" ;;
42048 "lib/libspl/include/rpc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/rpc/Makefile" ;;
42049 "lib/libspl/include/sys/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/sys/Makefile" ;;
42050 "lib/libspl/include/sys/sysevent/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/sys/sysevent/Makefile" ;;
42051 "lib/libspl/include/sys/dktp/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/sys/dktp/Makefile" ;;
42052 "lib/libspl/include/util/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libspl/include/util/Makefile" ;;
42053 "lib/libavl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libavl/Makefile" ;;
42054 "lib/libefi/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libefi/Makefile" ;;
42055 "lib/libnvpair/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libnvpair/Makefile" ;;
42056 "lib/libunicode/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libunicode/Makefile" ;;
42057 "lib/libuutil/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libuutil/Makefile" ;;
42058 "lib/libzpool/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libzpool/Makefile" ;;
42059 "lib/libzfs/libzfs.pc") CONFIG_FILES="$CONFIG_FILES lib/libzfs/libzfs.pc" ;;
42060 "lib/libzfs/libzfs_core.pc") CONFIG_FILES="$CONFIG_FILES lib/libzfs/libzfs_core.pc" ;;
42061 "lib/libzfs/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libzfs/Makefile" ;;
42062 "lib/libzfs_core/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libzfs_core/Makefile" ;;
42063 "lib/libshare/Makefile") CONFIG_FILES="$CONFIG_FILES lib/libshare/Makefile" ;;
42064 "cmd/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/Makefile" ;;
42065 "cmd/zdb/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zdb/Makefile" ;;
42066 "cmd/zhack/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zhack/Makefile" ;;
42067 "cmd/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zfs/Makefile" ;;
42068 "cmd/zinject/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zinject/Makefile" ;;
42069 "cmd/zpool/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpool/Makefile" ;;
42070 "cmd/zstreamdump/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zstreamdump/Makefile" ;;
42071 "cmd/ztest/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/ztest/Makefile" ;;
42072 "cmd/zpios/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zpios/Makefile" ;;
42073 "cmd/mount_zfs/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/mount_zfs/Makefile" ;;
42074 "cmd/fsck_zfs/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/fsck_zfs/Makefile" ;;
42075 "cmd/zvol_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zvol_id/Makefile" ;;
42076 "cmd/vdev_id/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/vdev_id/Makefile" ;;
42077 "cmd/arcstat/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/arcstat/Makefile" ;;
42078 "cmd/dbufstat/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/dbufstat/Makefile" ;;
42079 "cmd/arc_summary/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/arc_summary/Makefile" ;;
42080 "cmd/zed/Makefile") CONFIG_FILES="$CONFIG_FILES cmd/zed/Makefile" ;;
42081 "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
42082 "contrib/bash_completion.d/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/bash_completion.d/Makefile" ;;
e10b0808
AX
42083 "contrib/dracut/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dracut/Makefile" ;;
42084 "contrib/dracut/90zfs/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/dracut/90zfs/Makefile" ;;
42085 "contrib/initramfs/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/initramfs/Makefile" ;;
ea04106b
AX
42086 "module/Makefile") CONFIG_FILES="$CONFIG_FILES module/Makefile" ;;
42087 "module/avl/Makefile") CONFIG_FILES="$CONFIG_FILES module/avl/Makefile" ;;
42088 "module/nvpair/Makefile") CONFIG_FILES="$CONFIG_FILES module/nvpair/Makefile" ;;
42089 "module/unicode/Makefile") CONFIG_FILES="$CONFIG_FILES module/unicode/Makefile" ;;
42090 "module/zcommon/Makefile") CONFIG_FILES="$CONFIG_FILES module/zcommon/Makefile" ;;
42091 "module/zfs/Makefile") CONFIG_FILES="$CONFIG_FILES module/zfs/Makefile" ;;
42092 "module/zpios/Makefile") CONFIG_FILES="$CONFIG_FILES module/zpios/Makefile" ;;
42093 "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
42094 "include/linux/Makefile") CONFIG_FILES="$CONFIG_FILES include/linux/Makefile" ;;
42095 "include/sys/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/Makefile" ;;
42096 "include/sys/fs/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fs/Makefile" ;;
42097 "include/sys/fm/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fm/Makefile" ;;
42098 "include/sys/fm/fs/Makefile") CONFIG_FILES="$CONFIG_FILES include/sys/fm/fs/Makefile" ;;
42099 "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
42100 "scripts/zpios-profile/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/zpios-profile/Makefile" ;;
42101 "scripts/zpios-test/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/zpios-test/Makefile" ;;
42102 "scripts/zpool-config/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/zpool-config/Makefile" ;;
42103 "scripts/common.sh") CONFIG_FILES="$CONFIG_FILES scripts/common.sh" ;;
42104 "rpm/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/Makefile" ;;
42105 "rpm/redhat/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/redhat/Makefile" ;;
42106 "rpm/redhat/zfs.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/zfs.spec" ;;
42107 "rpm/redhat/zfs-kmod.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/zfs-kmod.spec" ;;
42108 "rpm/redhat/zfs-dkms.spec") CONFIG_FILES="$CONFIG_FILES rpm/redhat/zfs-dkms.spec" ;;
42109 "rpm/generic/Makefile") CONFIG_FILES="$CONFIG_FILES rpm/generic/Makefile" ;;
42110 "rpm/generic/zfs.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/zfs.spec" ;;
42111 "rpm/generic/zfs-kmod.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/zfs-kmod.spec" ;;
42112 "rpm/generic/zfs-dkms.spec") CONFIG_FILES="$CONFIG_FILES rpm/generic/zfs-dkms.spec" ;;
42113 "zfs-script-config.sh") CONFIG_FILES="$CONFIG_FILES zfs-script-config.sh" ;;
42114 "zfs.release") CONFIG_FILES="$CONFIG_FILES zfs.release" ;;
42115
3d248aec
AX
42116 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
42117$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
42118 { (exit 1); exit 1; }; };;
ea04106b
AX
42119 esac
42120done
42121
42122
42123# If the user did not use the arguments to specify the items to instantiate,
42124# then the envvar interface is used. Set only those that are not.
42125# We use the long form for the default assignment because of an extremely
42126# bizarre bug on SunOS 4.1.3.
42127if $ac_need_defaults; then
42128 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
42129 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
42130 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
42131fi
42132
42133# Have a temporary directory for convenience. Make it in the build tree
42134# simply because there is no reason against having it here, and in addition,
42135# creating and moving files from /tmp can sometimes cause problems.
42136# Hook for its removal unless debugging.
42137# Note that there is a small window in which the directory will not be cleaned:
42138# after its creation but before its name has been assigned to `$tmp'.
42139$debug ||
42140{
3d248aec 42141 tmp=
ea04106b 42142 trap 'exit_status=$?
3d248aec 42143 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
ea04106b 42144' 0
3d248aec 42145 trap '{ (exit 1); exit 1; }' 1 2 13 15
ea04106b
AX
42146}
42147# Create a (secure) tmp directory for tmp files.
42148
42149{
42150 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
3d248aec 42151 test -n "$tmp" && test -d "$tmp"
ea04106b
AX
42152} ||
42153{
42154 tmp=./conf$$-$RANDOM
42155 (umask 077 && mkdir "$tmp")
3d248aec
AX
42156} ||
42157{
42158 $as_echo "$as_me: cannot create a temporary directory in ." >&2
42159 { (exit 1); exit 1; }
42160}
ea04106b
AX
42161
42162# Set up the scripts for CONFIG_FILES section.
42163# No need to generate them if there are no CONFIG_FILES.
42164# This happens for instance with `./config.status config.h'.
42165if test -n "$CONFIG_FILES"; then
42166
42167
3d248aec 42168ac_cr='\r'
ea04106b
AX
42169ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
42170if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
42171 ac_cs_awk_cr='\\r'
42172else
42173 ac_cs_awk_cr=$ac_cr
42174fi
42175
3d248aec 42176echo 'BEGIN {' >"$tmp/subs1.awk" &&
ea04106b
AX
42177_ACEOF
42178
42179
42180{
42181 echo "cat >conf$$subs.awk <<_ACEOF" &&
42182 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
42183 echo "_ACEOF"
42184} >conf$$subs.sh ||
3d248aec
AX
42185 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
42186$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
42187 { (exit 1); exit 1; }; }
42188ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
ea04106b
AX
42189ac_delim='%!_!# '
42190for ac_last_try in false false false false false :; do
42191 . ./conf$$subs.sh ||
3d248aec
AX
42192 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
42193$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
42194 { (exit 1); exit 1; }; }
ea04106b
AX
42195
42196 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
42197 if test $ac_delim_n = $ac_delim_num; then
42198 break
42199 elif $ac_last_try; then
3d248aec
AX
42200 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
42201$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
42202 { (exit 1); exit 1; }; }
ea04106b
AX
42203 else
42204 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
42205 fi
42206done
42207rm -f conf$$subs.sh
42208
42209cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
3d248aec 42210cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
ea04106b
AX
42211_ACEOF
42212sed -n '
42213h
42214s/^/S["/; s/!.*/"]=/
42215p
42216g
42217s/^[^!]*!//
42218:repl
42219t repl
42220s/'"$ac_delim"'$//
42221t delim
42222:nl
42223h
3d248aec 42224s/\(.\{148\}\).*/\1/
ea04106b
AX
42225t more1
42226s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
42227p
42228n
42229b repl
42230:more1
42231s/["\\]/\\&/g; s/^/"/; s/$/"\\/
42232p
42233g
42234s/.\{148\}//
42235t nl
42236:delim
42237h
3d248aec 42238s/\(.\{148\}\).*/\1/
ea04106b
AX
42239t more2
42240s/["\\]/\\&/g; s/^/"/; s/$/"/
42241p
42242b
42243:more2
42244s/["\\]/\\&/g; s/^/"/; s/$/"\\/
42245p
42246g
42247s/.\{148\}//
42248t delim
42249' <conf$$subs.awk | sed '
42250/^[^""]/{
42251 N
42252 s/\n//
42253}
42254' >>$CONFIG_STATUS || ac_write_fail=1
42255rm -f conf$$subs.awk
42256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
42257_ACAWK
3d248aec 42258cat >>"\$tmp/subs1.awk" <<_ACAWK &&
ea04106b
AX
42259 for (key in S) S_is_set[key] = 1
42260 FS = "\a"
42261
42262}
42263{
42264 line = $ 0
42265 nfields = split(line, field, "@")
42266 substed = 0
42267 len = length(field[1])
42268 for (i = 2; i < nfields; i++) {
42269 key = field[i]
42270 keylen = length(key)
42271 if (S_is_set[key]) {
42272 value = S[key]
42273 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
42274 len += length(value) + length(field[++i])
42275 substed = 1
42276 } else
42277 len += 1 + keylen
42278 }
42279
42280 print line
42281}
42282
42283_ACAWK
42284_ACEOF
42285cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
42286if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
42287 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
42288else
42289 cat
3d248aec
AX
42290fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
42291 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
42292$as_echo "$as_me: error: could not setup config files machinery" >&2;}
42293 { (exit 1); exit 1; }; }
ea04106b
AX
42294_ACEOF
42295
3d248aec
AX
42296# VPATH may cause trouble with some makes, so we remove $(srcdir),
42297# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
ea04106b
AX
42298# trailing colons and then remove the whole line if VPATH becomes empty
42299# (actually we leave an empty line to preserve line numbers).
42300if test "x$srcdir" = x.; then
3d248aec
AX
42301 ac_vpsub='/^[ ]*VPATH[ ]*=/{
42302s/:*\$(srcdir):*/:/
42303s/:*\${srcdir}:*/:/
42304s/:*@srcdir@:*/:/
42305s/^\([^=]*=[ ]*\):*/\1/
ea04106b 42306s/:*$//
ea04106b
AX
42307s/^[^=]*=[ ]*$//
42308}'
42309fi
42310
42311cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
42312fi # test -n "$CONFIG_FILES"
42313
42314# Set up the scripts for CONFIG_HEADERS section.
42315# No need to generate them if there are no CONFIG_HEADERS.
42316# This happens for instance with `./config.status Makefile'.
42317if test -n "$CONFIG_HEADERS"; then
3d248aec 42318cat >"$tmp/defines.awk" <<\_ACAWK ||
ea04106b
AX
42319BEGIN {
42320_ACEOF
42321
42322# Transform confdefs.h into an awk script `defines.awk', embedded as
42323# here-document in config.status, that substitutes the proper values into
42324# config.h.in to produce config.h.
42325
42326# Create a delimiter string that does not exist in confdefs.h, to ease
42327# handling of long lines.
42328ac_delim='%!_!# '
42329for ac_last_try in false false :; do
3d248aec
AX
42330 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
42331 if test -z "$ac_t"; then
ea04106b
AX
42332 break
42333 elif $ac_last_try; then
3d248aec
AX
42334 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
42335$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
42336 { (exit 1); exit 1; }; }
ea04106b
AX
42337 else
42338 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
42339 fi
42340done
42341
42342# For the awk script, D is an array of macro values keyed by name,
42343# likewise P contains macro parameters if any. Preserve backslash
42344# newline sequences.
42345
42346ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
42347sed -n '
42348s/.\{148\}/&'"$ac_delim"'/g
42349t rset
42350:rset
42351s/^[ ]*#[ ]*define[ ][ ]*/ /
42352t def
42353d
42354:def
42355s/\\$//
42356t bsnl
42357s/["\\]/\\&/g
42358s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
42359D["\1"]=" \3"/p
42360s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
42361d
42362:bsnl
42363s/["\\]/\\&/g
42364s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
42365D["\1"]=" \3\\\\\\n"\\/p
42366t cont
42367s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
42368t cont
42369d
42370:cont
42371n
42372s/.\{148\}/&'"$ac_delim"'/g
42373t clear
42374:clear
42375s/\\$//
42376t bsnlc
42377s/["\\]/\\&/g; s/^/"/; s/$/"/p
42378d
42379:bsnlc
42380s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
42381b cont
42382' <confdefs.h | sed '
42383s/'"$ac_delim"'/"\\\
42384"/g' >>$CONFIG_STATUS || ac_write_fail=1
42385
42386cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
42387 for (key in D) D_is_set[key] = 1
42388 FS = "\a"
42389}
42390/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
42391 line = \$ 0
42392 split(line, arg, " ")
42393 if (arg[1] == "#") {
42394 defundef = arg[2]
42395 mac1 = arg[3]
42396 } else {
42397 defundef = substr(arg[1], 2)
42398 mac1 = arg[2]
42399 }
42400 split(mac1, mac2, "(") #)
42401 macro = mac2[1]
42402 prefix = substr(line, 1, index(line, defundef) - 1)
42403 if (D_is_set[macro]) {
42404 # Preserve the white space surrounding the "#".
42405 print prefix "define", macro P[macro] D[macro]
42406 next
42407 } else {
42408 # Replace #undef with comments. This is necessary, for example,
42409 # in the case of _POSIX_SOURCE, which is predefined and required
42410 # on some systems where configure will not decide to define it.
42411 if (defundef == "undef") {
42412 print "/*", prefix defundef, macro, "*/"
42413 next
42414 }
42415 }
42416}
42417{ print }
42418_ACAWK
42419_ACEOF
42420cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
3d248aec
AX
42421 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
42422$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
42423 { (exit 1); exit 1; }; }
ea04106b
AX
42424fi # test -n "$CONFIG_HEADERS"
42425
42426
42427eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
42428shift
42429for ac_tag
42430do
42431 case $ac_tag in
42432 :[FHLC]) ac_mode=$ac_tag; continue;;
42433 esac
42434 case $ac_mode$ac_tag in
42435 :[FHL]*:*);;
3d248aec
AX
42436 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
42437$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
42438 { (exit 1); exit 1; }; };;
ea04106b
AX
42439 :[FH]-) ac_tag=-:-;;
42440 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
42441 esac
42442 ac_save_IFS=$IFS
42443 IFS=:
42444 set x $ac_tag
42445 IFS=$ac_save_IFS
42446 shift
42447 ac_file=$1
42448 shift
42449
42450 case $ac_mode in
42451 :L) ac_source=$1;;
42452 :[FH])
42453 ac_file_inputs=
42454 for ac_f
42455 do
42456 case $ac_f in
3d248aec 42457 -) ac_f="$tmp/stdin";;
ea04106b
AX
42458 *) # Look for the file first in the build tree, then in the source tree
42459 # (if the path is not absolute). The absolute path cannot be DOS-style,
42460 # because $ac_f cannot contain `:'.
42461 test -f "$ac_f" ||
42462 case $ac_f in
42463 [\\/$]*) false;;
42464 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
42465 esac ||
3d248aec
AX
42466 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
42467$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
42468 { (exit 1); exit 1; }; };;
ea04106b
AX
42469 esac
42470 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
3d248aec 42471 ac_file_inputs="$ac_file_inputs '$ac_f'"
ea04106b
AX
42472 done
42473
42474 # Let's still pretend it is `configure' which instantiates (i.e., don't
42475 # use $as_me), people would be surprised to read:
42476 # /* config.h. Generated by config.status. */
42477 configure_input='Generated from '`
42478 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
42479 `' by configure.'
42480 if test x"$ac_file" != x-; then
42481 configure_input="$ac_file. $configure_input"
3d248aec 42482 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
ea04106b
AX
42483$as_echo "$as_me: creating $ac_file" >&6;}
42484 fi
42485 # Neutralize special characters interpreted by sed in replacement strings.
42486 case $configure_input in #(
42487 *\&* | *\|* | *\\* )
42488 ac_sed_conf_input=`$as_echo "$configure_input" |
42489 sed 's/[\\\\&|]/\\\\&/g'`;; #(
42490 *) ac_sed_conf_input=$configure_input;;
42491 esac
42492
42493 case $ac_tag in
3d248aec
AX
42494 *:-:* | *:-) cat >"$tmp/stdin" \
42495 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
42496$as_echo "$as_me: error: could not create $ac_file" >&2;}
42497 { (exit 1); exit 1; }; } ;;
ea04106b
AX
42498 esac
42499 ;;
42500 esac
42501
42502 ac_dir=`$as_dirname -- "$ac_file" ||
42503$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42504 X"$ac_file" : 'X\(//\)[^/]' \| \
42505 X"$ac_file" : 'X\(//\)$' \| \
42506 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
42507$as_echo X"$ac_file" |
42508 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42509 s//\1/
42510 q
42511 }
42512 /^X\(\/\/\)[^/].*/{
42513 s//\1/
42514 q
42515 }
42516 /^X\(\/\/\)$/{
42517 s//\1/
42518 q
42519 }
42520 /^X\(\/\).*/{
42521 s//\1/
42522 q
42523 }
42524 s/.*/./; q'`
3d248aec
AX
42525 { as_dir="$ac_dir"
42526 case $as_dir in #(
42527 -*) as_dir=./$as_dir;;
42528 esac
42529 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
42530 as_dirs=
42531 while :; do
42532 case $as_dir in #(
42533 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
42534 *) as_qdir=$as_dir;;
42535 esac
42536 as_dirs="'$as_qdir' $as_dirs"
42537 as_dir=`$as_dirname -- "$as_dir" ||
42538$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42539 X"$as_dir" : 'X\(//\)[^/]' \| \
42540 X"$as_dir" : 'X\(//\)$' \| \
42541 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
42542$as_echo X"$as_dir" |
42543 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42544 s//\1/
42545 q
42546 }
42547 /^X\(\/\/\)[^/].*/{
42548 s//\1/
42549 q
42550 }
42551 /^X\(\/\/\)$/{
42552 s//\1/
42553 q
42554 }
42555 /^X\(\/\).*/{
42556 s//\1/
42557 q
42558 }
42559 s/.*/./; q'`
42560 test -d "$as_dir" && break
42561 done
42562 test -z "$as_dirs" || eval "mkdir $as_dirs"
42563 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
42564$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
42565 { (exit 1); exit 1; }; }; }
ea04106b
AX
42566 ac_builddir=.
42567
42568case "$ac_dir" in
42569.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
42570*)
42571 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
42572 # A ".." for each directory in $ac_dir_suffix.
42573 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
42574 case $ac_top_builddir_sub in
42575 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
42576 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
42577 esac ;;
42578esac
42579ac_abs_top_builddir=$ac_pwd
42580ac_abs_builddir=$ac_pwd$ac_dir_suffix
42581# for backward compatibility:
42582ac_top_builddir=$ac_top_build_prefix
42583
42584case $srcdir in
42585 .) # We are building in place.
42586 ac_srcdir=.
42587 ac_top_srcdir=$ac_top_builddir_sub
42588 ac_abs_top_srcdir=$ac_pwd ;;
42589 [\\/]* | ?:[\\/]* ) # Absolute name.
42590 ac_srcdir=$srcdir$ac_dir_suffix;
42591 ac_top_srcdir=$srcdir
42592 ac_abs_top_srcdir=$srcdir ;;
42593 *) # Relative name.
42594 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
42595 ac_top_srcdir=$ac_top_build_prefix$srcdir
42596 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
42597esac
42598ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
42599
42600
42601 case $ac_mode in
42602 :F)
42603 #
42604 # CONFIG_FILE
42605 #
42606
42607 case $INSTALL in
42608 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
42609 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
42610 esac
42611 ac_MKDIR_P=$MKDIR_P
42612 case $MKDIR_P in
42613 [\\/$]* | ?:[\\/]* ) ;;
42614 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
42615 esac
42616_ACEOF
42617
42618cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
42619# If the template does not know about datarootdir, expand it.
42620# FIXME: This hack should be removed a few years after 2.60.
42621ac_datarootdir_hack=; ac_datarootdir_seen=
3d248aec 42622
ea04106b
AX
42623ac_sed_dataroot='
42624/datarootdir/ {
42625 p
42626 q
42627}
42628/@datadir@/p
42629/@docdir@/p
42630/@infodir@/p
42631/@localedir@/p
3d248aec
AX
42632/@mandir@/p
42633'
ea04106b
AX
42634case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
42635*datarootdir*) ac_datarootdir_seen=yes;;
42636*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
3d248aec 42637 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
ea04106b
AX
42638$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
42639_ACEOF
42640cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
42641 ac_datarootdir_hack='
42642 s&@datadir@&$datadir&g
42643 s&@docdir@&$docdir&g
42644 s&@infodir@&$infodir&g
42645 s&@localedir@&$localedir&g
42646 s&@mandir@&$mandir&g
3d248aec 42647 s&\\\${datarootdir}&$datarootdir&g' ;;
ea04106b
AX
42648esac
42649_ACEOF
42650
42651# Neutralize VPATH when `$srcdir' = `.'.
42652# Shell code in configure.ac might set extrasub.
42653# FIXME: do we really want to maintain this feature?
42654cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
42655ac_sed_extra="$ac_vpsub
42656$extrasub
42657_ACEOF
42658cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
42659:t
42660/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
42661s|@configure_input@|$ac_sed_conf_input|;t t
42662s&@top_builddir@&$ac_top_builddir_sub&;t t
42663s&@top_build_prefix@&$ac_top_build_prefix&;t t
42664s&@srcdir@&$ac_srcdir&;t t
42665s&@abs_srcdir@&$ac_abs_srcdir&;t t
42666s&@top_srcdir@&$ac_top_srcdir&;t t
42667s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
42668s&@builddir@&$ac_builddir&;t t
42669s&@abs_builddir@&$ac_abs_builddir&;t t
42670s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
42671s&@INSTALL@&$ac_INSTALL&;t t
42672s&@MKDIR_P@&$ac_MKDIR_P&;t t
42673$ac_datarootdir_hack
42674"
3d248aec
AX
42675eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
42676 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
42677$as_echo "$as_me: error: could not create $ac_file" >&2;}
42678 { (exit 1); exit 1; }; }
ea04106b
AX
42679
42680test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
3d248aec
AX
42681 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
42682 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
42683 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
42684which seems to be undefined. Please make sure it is defined." >&5
ea04106b 42685$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
3d248aec 42686which seems to be undefined. Please make sure it is defined." >&2;}
ea04106b 42687
3d248aec 42688 rm -f "$tmp/stdin"
ea04106b 42689 case $ac_file in
3d248aec
AX
42690 -) cat "$tmp/out" && rm -f "$tmp/out";;
42691 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
ea04106b 42692 esac \
3d248aec
AX
42693 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
42694$as_echo "$as_me: error: could not create $ac_file" >&2;}
42695 { (exit 1); exit 1; }; }
ea04106b
AX
42696 ;;
42697 :H)
42698 #
42699 # CONFIG_HEADER
42700 #
42701 if test x"$ac_file" != x-; then
42702 {
42703 $as_echo "/* $configure_input */" \
3d248aec
AX
42704 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
42705 } >"$tmp/config.h" \
42706 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
42707$as_echo "$as_me: error: could not create $ac_file" >&2;}
42708 { (exit 1); exit 1; }; }
42709 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
42710 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
ea04106b
AX
42711$as_echo "$as_me: $ac_file is unchanged" >&6;}
42712 else
42713 rm -f "$ac_file"
3d248aec
AX
42714 mv "$tmp/config.h" "$ac_file" \
42715 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
42716$as_echo "$as_me: error: could not create $ac_file" >&2;}
42717 { (exit 1); exit 1; }; }
ea04106b
AX
42718 fi
42719 else
42720 $as_echo "/* $configure_input */" \
3d248aec
AX
42721 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
42722 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
42723$as_echo "$as_me: error: could not create -" >&2;}
42724 { (exit 1); exit 1; }; }
ea04106b
AX
42725 fi
42726# Compute "$ac_file"'s index in $config_headers.
42727_am_arg="$ac_file"
42728_am_stamp_count=1
42729for _am_header in $config_headers :; do
42730 case $_am_header in
42731 $_am_arg | $_am_arg:* )
42732 break ;;
42733 * )
42734 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
42735 esac
42736done
42737echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
42738$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42739 X"$_am_arg" : 'X\(//\)[^/]' \| \
42740 X"$_am_arg" : 'X\(//\)$' \| \
42741 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
42742$as_echo X"$_am_arg" |
42743 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42744 s//\1/
42745 q
42746 }
42747 /^X\(\/\/\)[^/].*/{
42748 s//\1/
42749 q
42750 }
42751 /^X\(\/\/\)$/{
42752 s//\1/
42753 q
42754 }
42755 /^X\(\/\).*/{
42756 s//\1/
42757 q
42758 }
42759 s/.*/./; q'`/stamp-h$_am_stamp_count
42760 ;;
42761
3d248aec 42762 :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
ea04106b
AX
42763$as_echo "$as_me: executing $ac_file commands" >&6;}
42764 ;;
42765 esac
42766
42767
42768 case $ac_file$ac_mode in
42769 "zfs_config.h":H)
42770 (mv zfs_config.h zfs_config.h.tmp &&
42771 awk -f ${ac_srcdir}/config/config.awk zfs_config.h.tmp >zfs_config.h &&
42772 rm zfs_config.h.tmp) || exit 1 ;;
42773 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
3d248aec 42774 # Autoconf 2.62 quotes --file arguments for eval, but not when files
ea04106b
AX
42775 # are listed without --file. Let's play safe and only enable the eval
42776 # if we detect the quoting.
42777 case $CONFIG_FILES in
42778 *\'*) eval set x "$CONFIG_FILES" ;;
42779 *) set x $CONFIG_FILES ;;
42780 esac
42781 shift
42782 for mf
42783 do
42784 # Strip MF so we end up with the name of the file.
42785 mf=`echo "$mf" | sed -e 's/:.*$//'`
42786 # Check whether this is an Automake generated Makefile or not.
3d248aec 42787 # We used to match only the files named `Makefile.in', but
ea04106b
AX
42788 # some people rename them; so instead we look at the file content.
42789 # Grep'ing the first line is not enough: some people post-process
42790 # each Makefile.in and add a new line on top of each file to say so.
42791 # Grep'ing the whole file is not good either: AIX grep has a line
42792 # limit of 2048, but all sed's we know have understand at least 4000.
42793 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
42794 dirpart=`$as_dirname -- "$mf" ||
42795$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42796 X"$mf" : 'X\(//\)[^/]' \| \
42797 X"$mf" : 'X\(//\)$' \| \
42798 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
42799$as_echo X"$mf" |
42800 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42801 s//\1/
42802 q
42803 }
42804 /^X\(\/\/\)[^/].*/{
42805 s//\1/
42806 q
42807 }
42808 /^X\(\/\/\)$/{
42809 s//\1/
42810 q
42811 }
42812 /^X\(\/\).*/{
42813 s//\1/
42814 q
42815 }
42816 s/.*/./; q'`
42817 else
42818 continue
42819 fi
42820 # Extract the definition of DEPDIR, am__include, and am__quote
3d248aec 42821 # from the Makefile without running `make'.
ea04106b
AX
42822 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
42823 test -z "$DEPDIR" && continue
42824 am__include=`sed -n 's/^am__include = //p' < "$mf"`
3d248aec 42825 test -z "am__include" && continue
ea04106b 42826 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3d248aec
AX
42827 # When using ansi2knr, U may be empty or an underscore; expand it
42828 U=`sed -n 's/^U = //p' < "$mf"`
ea04106b
AX
42829 # Find all dependency output files, they are included files with
42830 # $(DEPDIR) in their names. We invoke sed twice because it is the
42831 # simplest approach to changing $(DEPDIR) to its actual value in the
42832 # expansion.
42833 for file in `sed -n "
42834 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3d248aec 42835 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
ea04106b
AX
42836 # Make sure the directory exists.
42837 test -f "$dirpart/$file" && continue
42838 fdir=`$as_dirname -- "$file" ||
42839$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42840 X"$file" : 'X\(//\)[^/]' \| \
42841 X"$file" : 'X\(//\)$' \| \
42842 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
42843$as_echo X"$file" |
42844 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42845 s//\1/
42846 q
42847 }
42848 /^X\(\/\/\)[^/].*/{
42849 s//\1/
42850 q
42851 }
42852 /^X\(\/\/\)$/{
42853 s//\1/
42854 q
42855 }
42856 /^X\(\/\).*/{
42857 s//\1/
42858 q
42859 }
42860 s/.*/./; q'`
3d248aec
AX
42861 { as_dir=$dirpart/$fdir
42862 case $as_dir in #(
42863 -*) as_dir=./$as_dir;;
42864 esac
42865 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
42866 as_dirs=
42867 while :; do
42868 case $as_dir in #(
42869 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
42870 *) as_qdir=$as_dir;;
42871 esac
42872 as_dirs="'$as_qdir' $as_dirs"
42873 as_dir=`$as_dirname -- "$as_dir" ||
42874$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42875 X"$as_dir" : 'X\(//\)[^/]' \| \
42876 X"$as_dir" : 'X\(//\)$' \| \
42877 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
42878$as_echo X"$as_dir" |
42879 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42880 s//\1/
42881 q
42882 }
42883 /^X\(\/\/\)[^/].*/{
42884 s//\1/
42885 q
42886 }
42887 /^X\(\/\/\)$/{
42888 s//\1/
42889 q
42890 }
42891 /^X\(\/\).*/{
42892 s//\1/
42893 q
42894 }
42895 s/.*/./; q'`
42896 test -d "$as_dir" && break
42897 done
42898 test -z "$as_dirs" || eval "mkdir $as_dirs"
42899 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
42900$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
42901 { (exit 1); exit 1; }; }; }
ea04106b
AX
42902 # echo "creating $dirpart/$file"
42903 echo '# dummy' > "$dirpart/$file"
42904 done
42905 done
42906}
42907 ;;
42908 "libtool":C)
42909
3d248aec 42910 # See if we are running on zsh, and set the options which allow our
ea04106b 42911 # commands through without removal of \ escapes.
3d248aec 42912 if test -n "${ZSH_VERSION+set}" ; then
ea04106b
AX
42913 setopt NO_GLOB_SUBST
42914 fi
42915
3d248aec 42916 cfgfile="${ofile}T"
ea04106b
AX
42917 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
42918 $RM "$cfgfile"
42919
42920 cat <<_LT_EOF >> "$cfgfile"
42921#! $SHELL
3d248aec
AX
42922
42923# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
42924# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
ea04106b
AX
42925# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
42926# NOTE: Changes made to this file will be lost: look at ltmain.sh.
42927#
3d248aec
AX
42928# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
42929# 2006, 2007, 2008 Free Software Foundation, Inc.
42930# Written by Gordon Matzigkeit, 1996
42931#
42932# This file is part of GNU Libtool.
ea04106b 42933#
3d248aec
AX
42934# GNU Libtool is free software; you can redistribute it and/or
42935# modify it under the terms of the GNU General Public License as
42936# published by the Free Software Foundation; either version 2 of
42937# the License, or (at your option) any later version.
42938#
42939# As a special exception to the GNU General Public License,
42940# if you distribute this file as part of a program or library that
42941# is built using GNU Libtool, you may include this file under the
42942# same distribution terms that you use for the rest of that program.
42943#
42944# GNU Libtool is distributed in the hope that it will be useful,
42945# but WITHOUT ANY WARRANTY; without even the implied warranty of
ea04106b
AX
42946# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42947# GNU General Public License for more details.
42948#
42949# You should have received a copy of the GNU General Public License
3d248aec
AX
42950# along with GNU Libtool; see the file COPYING. If not, a copy
42951# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
42952# obtained by writing to the Free Software Foundation, Inc.,
42953# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
ea04106b
AX
42954
42955
42956# The names of the tagged configurations supported by this script.
3d248aec 42957available_tags=""
ea04106b
AX
42958
42959# ### BEGIN LIBTOOL CONFIG
42960
42961# Which release of libtool.m4 was used?
42962macro_version=$macro_version
42963macro_revision=$macro_revision
42964
42965# Whether or not to build shared libraries.
42966build_libtool_libs=$enable_shared
42967
42968# Whether or not to build static libraries.
42969build_old_libs=$enable_static
42970
42971# What type of objects to build.
42972pic_mode=$pic_mode
42973
42974# Whether or not to optimize for fast installation.
42975fast_install=$enable_fast_install
42976
ea04106b
AX
42977# The host system.
42978host_alias=$host_alias
42979host=$host
42980host_os=$host_os
42981
42982# The build system.
42983build_alias=$build_alias
42984build=$build
42985build_os=$build_os
42986
42987# A sed program that does not truncate output.
42988SED=$lt_SED
42989
42990# Sed that helps us avoid accidentally triggering echo(1) options like -n.
42991Xsed="\$SED -e 1s/^X//"
42992
42993# A grep program that handles long lines.
42994GREP=$lt_GREP
42995
42996# An ERE matcher.
42997EGREP=$lt_EGREP
42998
42999# A literal string matcher.
43000FGREP=$lt_FGREP
43001
43002# A BSD- or MS-compatible name lister.
43003NM=$lt_NM
43004
43005# Whether we need soft or hard links.
43006LN_S=$lt_LN_S
43007
43008# What is the maximum length of a command?
43009max_cmd_len=$max_cmd_len
43010
43011# Object file suffix (normally "o").
43012objext=$ac_objext
43013
43014# Executable file suffix (normally "").
43015exeext=$exeext
43016
43017# whether the shell understands "unset".
43018lt_unset=$lt_unset
43019
43020# turn spaces into newlines.
43021SP2NL=$lt_lt_SP2NL
43022
43023# turn newlines into spaces.
43024NL2SP=$lt_lt_NL2SP
43025
3d248aec
AX
43026# How to create reloadable object files.
43027reload_flag=$lt_reload_flag
43028reload_cmds=$lt_reload_cmds
ea04106b
AX
43029
43030# An object symbol dumper.
43031OBJDUMP=$lt_OBJDUMP
43032
43033# Method to check whether dependent libraries are shared objects.
43034deplibs_check_method=$lt_deplibs_check_method
43035
3d248aec 43036# Command to use when deplibs_check_method == "file_magic".
ea04106b
AX
43037file_magic_cmd=$lt_file_magic_cmd
43038
ea04106b
AX
43039# The archiver.
43040AR=$lt_AR
ea04106b
AX
43041AR_FLAGS=$lt_AR_FLAGS
43042
ea04106b
AX
43043# A symbol stripping program.
43044STRIP=$lt_STRIP
43045
43046# Commands used to install an old-style archive.
43047RANLIB=$lt_RANLIB
43048old_postinstall_cmds=$lt_old_postinstall_cmds
43049old_postuninstall_cmds=$lt_old_postuninstall_cmds
43050
ea04106b
AX
43051# A C compiler.
43052LTCC=$lt_CC
43053
43054# LTCC compiler flags.
43055LTCFLAGS=$lt_CFLAGS
43056
43057# Take the output of nm and produce a listing of raw symbols and C names.
43058global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
43059
43060# Transform the output of nm in a proper C declaration.
43061global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
43062
43063# Transform the output of nm in a C name address pair.
43064global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
43065
43066# Transform the output of nm in a C name address pair when lib prefix is needed.
43067global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
43068
ea04106b
AX
43069# The name of the directory that contains temporary libtool files.
43070objdir=$objdir
43071
3d248aec
AX
43072# Shell to use when invoking shell scripts.
43073SHELL=$lt_SHELL
43074
43075# An echo program that does not interpret backslashes.
43076ECHO=$lt_ECHO
43077
ea04106b
AX
43078# Used to examine libraries when file_magic_cmd begins with "file".
43079MAGIC_CMD=$MAGIC_CMD
43080
43081# Must we lock files when doing compilation?
43082need_locks=$lt_need_locks
43083
ea04106b
AX
43084# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
43085DSYMUTIL=$lt_DSYMUTIL
43086
43087# Tool to change global to local symbols on Mac OS X.
43088NMEDIT=$lt_NMEDIT
43089
43090# Tool to manipulate fat objects and archives on Mac OS X.
43091LIPO=$lt_LIPO
43092
43093# ldd/readelf like tool for Mach-O binaries on Mac OS X.
43094OTOOL=$lt_OTOOL
43095
43096# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
43097OTOOL64=$lt_OTOOL64
43098
43099# Old archive suffix (normally "a").
43100libext=$libext
43101
43102# Shared library suffix (normally ".so").
43103shrext_cmds=$lt_shrext_cmds
43104
43105# The commands to extract the exported symbol list from a shared archive.
43106extract_expsyms_cmds=$lt_extract_expsyms_cmds
43107
43108# Variables whose values should be saved in libtool wrapper scripts and
43109# restored at link time.
43110variables_saved_for_relink=$lt_variables_saved_for_relink
43111
43112# Do we need the "lib" prefix for modules?
43113need_lib_prefix=$need_lib_prefix
43114
43115# Do we need a version for libraries?
43116need_version=$need_version
43117
43118# Library versioning type.
43119version_type=$version_type
43120
43121# Shared library runtime path variable.
43122runpath_var=$runpath_var
43123
43124# Shared library path variable.
43125shlibpath_var=$shlibpath_var
43126
43127# Is shlibpath searched before the hard-coded library search path?
43128shlibpath_overrides_runpath=$shlibpath_overrides_runpath
43129
43130# Format of library name prefix.
43131libname_spec=$lt_libname_spec
43132
43133# List of archive names. First name is the real one, the rest are links.
43134# The last name is the one that the linker finds with -lNAME
43135library_names_spec=$lt_library_names_spec
43136
43137# The coded name of the library, if different from the real name.
43138soname_spec=$lt_soname_spec
43139
ea04106b
AX
43140# Command to use after installation of a shared archive.
43141postinstall_cmds=$lt_postinstall_cmds
43142
43143# Command to use after uninstallation of a shared archive.
43144postuninstall_cmds=$lt_postuninstall_cmds
43145
43146# Commands used to finish a libtool library installation in a directory.
43147finish_cmds=$lt_finish_cmds
43148
43149# As "finish_cmds", except a single script fragment to be evaled but
43150# not shown.
43151finish_eval=$lt_finish_eval
43152
43153# Whether we should hardcode library paths into libraries.
43154hardcode_into_libs=$hardcode_into_libs
43155
43156# Compile-time system search path for libraries.
43157sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
43158
3d248aec
AX
43159# Run-time system search path for libraries.
43160sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
ea04106b
AX
43161
43162# Whether dlopen is supported.
43163dlopen_support=$enable_dlopen
43164
43165# Whether dlopen of programs is supported.
43166dlopen_self=$enable_dlopen_self
43167
43168# Whether dlopen of statically linked programs is supported.
43169dlopen_self_static=$enable_dlopen_self_static
43170
43171# Commands to strip libraries.
43172old_striplib=$lt_old_striplib
43173striplib=$lt_striplib
43174
43175
43176# The linker used to build libraries.
43177LD=$lt_LD
43178
ea04106b
AX
43179# Commands used to build an old-style archive.
43180old_archive_cmds=$lt_old_archive_cmds
43181
43182# A language specific compiler.
43183CC=$lt_compiler
43184
43185# Is the compiler the GNU compiler?
43186with_gcc=$GCC
43187
43188# Compiler flag to turn off builtin functions.
43189no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
43190
ea04106b
AX
43191# How to pass a linker flag through the compiler.
43192wl=$lt_lt_prog_compiler_wl
43193
3d248aec
AX
43194# Additional compiler flags for building library objects.
43195pic_flag=$lt_lt_prog_compiler_pic
43196
ea04106b
AX
43197# Compiler flag to prevent dynamic linking.
43198link_static_flag=$lt_lt_prog_compiler_static
43199
43200# Does compiler simultaneously support -c and -o options?
43201compiler_c_o=$lt_lt_cv_prog_compiler_c_o
43202
43203# Whether or not to add -lc for building shared libraries.
43204build_libtool_need_lc=$archive_cmds_need_lc
43205
43206# Whether or not to disallow shared libs when runtime libs are static.
43207allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
43208
43209# Compiler flag to allow reflexive dlopens.
43210export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
43211
43212# Compiler flag to generate shared objects directly from archives.
43213whole_archive_flag_spec=$lt_whole_archive_flag_spec
43214
43215# Whether the compiler copes with passing no objects directly.
43216compiler_needs_object=$lt_compiler_needs_object
43217
43218# Create an old-style archive from a shared archive.
43219old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
43220
43221# Create a temporary old-style archive to link instead of a shared archive.
43222old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
43223
43224# Commands used to build a shared archive.
43225archive_cmds=$lt_archive_cmds
43226archive_expsym_cmds=$lt_archive_expsym_cmds
43227
43228# Commands used to build a loadable module if different from building
43229# a shared archive.
43230module_cmds=$lt_module_cmds
43231module_expsym_cmds=$lt_module_expsym_cmds
43232
43233# Whether we are building with GNU ld or not.
43234with_gnu_ld=$lt_with_gnu_ld
43235
43236# Flag that allows shared libraries with undefined symbols to be built.
43237allow_undefined_flag=$lt_allow_undefined_flag
43238
43239# Flag that enforces no undefined symbols.
43240no_undefined_flag=$lt_no_undefined_flag
43241
43242# Flag to hardcode \$libdir into a binary during linking.
43243# This must work even if \$libdir does not exist
43244hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
43245
3d248aec
AX
43246# If ld is used when linking, flag to hardcode \$libdir into a binary
43247# during linking. This must work even if \$libdir does not exist.
43248hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
43249
ea04106b
AX
43250# Whether we need a single "-rpath" flag with a separated argument.
43251hardcode_libdir_separator=$lt_hardcode_libdir_separator
43252
3d248aec 43253# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
ea04106b
AX
43254# DIR into the resulting binary.
43255hardcode_direct=$hardcode_direct
43256
3d248aec 43257# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
ea04106b 43258# DIR into the resulting binary and the resulting library dependency is
3d248aec 43259# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
ea04106b
AX
43260# library is relocated.
43261hardcode_direct_absolute=$hardcode_direct_absolute
43262
43263# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
43264# into the resulting binary.
43265hardcode_minus_L=$hardcode_minus_L
43266
43267# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
43268# into the resulting binary.
43269hardcode_shlibpath_var=$hardcode_shlibpath_var
43270
43271# Set to "yes" if building a shared library automatically hardcodes DIR
43272# into the library and all subsequent libraries and executables linked
43273# against it.
43274hardcode_automatic=$hardcode_automatic
43275
43276# Set to yes if linker adds runtime paths of dependent libraries
43277# to runtime path list.
43278inherit_rpath=$inherit_rpath
43279
43280# Whether libtool must link a program against all its dependency libraries.
43281link_all_deplibs=$link_all_deplibs
43282
3d248aec
AX
43283# Fix the shell variable \$srcfile for the compiler.
43284fix_srcfile_path=$lt_fix_srcfile_path
43285
ea04106b
AX
43286# Set to "yes" if exported symbols are required.
43287always_export_symbols=$always_export_symbols
43288
43289# The commands to list exported symbols.
43290export_symbols_cmds=$lt_export_symbols_cmds
43291
43292# Symbols that should not be listed in the preloaded symbols.
43293exclude_expsyms=$lt_exclude_expsyms
43294
43295# Symbols that must always be exported.
43296include_expsyms=$lt_include_expsyms
43297
43298# Commands necessary for linking programs (against libraries) with templates.
43299prelink_cmds=$lt_prelink_cmds
43300
ea04106b
AX
43301# Specify filename containing input files.
43302file_list_spec=$lt_file_list_spec
43303
43304# How to hardcode a shared library path into an executable.
43305hardcode_action=$hardcode_action
43306
43307# ### END LIBTOOL CONFIG
43308
43309_LT_EOF
43310
43311 case $host_os in
43312 aix3*)
43313 cat <<\_LT_EOF >> "$cfgfile"
43314# AIX sometimes has problems with the GCC collect2 program. For some
43315# reason, if we set the COLLECT_NAMES environment variable, the problems
43316# vanish in a puff of smoke.
3d248aec 43317if test "X${COLLECT_NAMES+set}" != Xset; then
ea04106b
AX
43318 COLLECT_NAMES=
43319 export COLLECT_NAMES
43320fi
43321_LT_EOF
43322 ;;
43323 esac
43324
43325
3d248aec 43326ltmain="$ac_aux_dir/ltmain.sh"
ea04106b
AX
43327
43328
43329 # We use sed instead of cat because bash on DJGPP gets confused if
43330 # if finds mixed CR/LF and LF-only lines. Since sed operates in
43331 # text mode, it properly converts lines to CR/LF. This bash problem
43332 # is reportedly fixed, but why not run on old versions too?
3d248aec
AX
43333 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
43334 || (rm -f "$cfgfile"; exit 1)
43335
43336 case $xsi_shell in
43337 yes)
43338 cat << \_LT_EOF >> "$cfgfile"
43339
43340# func_dirname file append nondir_replacement
43341# Compute the dirname of FILE. If nonempty, add APPEND to the result,
43342# otherwise set result to NONDIR_REPLACEMENT.
43343func_dirname ()
43344{
43345 case ${1} in
43346 */*) func_dirname_result="${1%/*}${2}" ;;
43347 * ) func_dirname_result="${3}" ;;
43348 esac
43349}
43350
43351# func_basename file
43352func_basename ()
43353{
43354 func_basename_result="${1##*/}"
43355}
43356
43357# func_dirname_and_basename file append nondir_replacement
43358# perform func_basename and func_dirname in a single function
43359# call:
43360# dirname: Compute the dirname of FILE. If nonempty,
43361# add APPEND to the result, otherwise set result
43362# to NONDIR_REPLACEMENT.
43363# value returned in "$func_dirname_result"
43364# basename: Compute filename of FILE.
43365# value retuned in "$func_basename_result"
43366# Implementation must be kept synchronized with func_dirname
43367# and func_basename. For efficiency, we do not delegate to
43368# those functions but instead duplicate the functionality here.
43369func_dirname_and_basename ()
43370{
43371 case ${1} in
43372 */*) func_dirname_result="${1%/*}${2}" ;;
43373 * ) func_dirname_result="${3}" ;;
43374 esac
43375 func_basename_result="${1##*/}"
43376}
43377
43378# func_stripname prefix suffix name
43379# strip PREFIX and SUFFIX off of NAME.
43380# PREFIX and SUFFIX must not contain globbing or regex special
43381# characters, hashes, percent signs, but SUFFIX may contain a leading
43382# dot (in which case that matches only a dot).
43383func_stripname ()
43384{
43385 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
43386 # positional parameters, so assign one to ordinary parameter first.
43387 func_stripname_result=${3}
43388 func_stripname_result=${func_stripname_result#"${1}"}
43389 func_stripname_result=${func_stripname_result%"${2}"}
43390}
43391
43392# func_opt_split
43393func_opt_split ()
43394{
43395 func_opt_split_opt=${1%%=*}
43396 func_opt_split_arg=${1#*=}
43397}
43398
43399# func_lo2o object
43400func_lo2o ()
43401{
43402 case ${1} in
43403 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
43404 *) func_lo2o_result=${1} ;;
43405 esac
43406}
43407
43408# func_xform libobj-or-source
43409func_xform ()
43410{
43411 func_xform_result=${1%.*}.lo
43412}
43413
43414# func_arith arithmetic-term...
43415func_arith ()
43416{
43417 func_arith_result=$(( $* ))
43418}
43419
43420# func_len string
43421# STRING may not start with a hyphen.
43422func_len ()
43423{
43424 func_len_result=${#1}
43425}
43426
43427_LT_EOF
43428 ;;
43429 *) # Bourne compatible functions.
43430 cat << \_LT_EOF >> "$cfgfile"
43431
43432# func_dirname file append nondir_replacement
43433# Compute the dirname of FILE. If nonempty, add APPEND to the result,
43434# otherwise set result to NONDIR_REPLACEMENT.
43435func_dirname ()
43436{
43437 # Extract subdirectory from the argument.
43438 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
43439 if test "X$func_dirname_result" = "X${1}"; then
43440 func_dirname_result="${3}"
43441 else
43442 func_dirname_result="$func_dirname_result${2}"
43443 fi
43444}
43445
43446# func_basename file
43447func_basename ()
43448{
43449 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
43450}
43451
43452
43453# func_stripname prefix suffix name
43454# strip PREFIX and SUFFIX off of NAME.
43455# PREFIX and SUFFIX must not contain globbing or regex special
43456# characters, hashes, percent signs, but SUFFIX may contain a leading
43457# dot (in which case that matches only a dot).
43458# func_strip_suffix prefix name
43459func_stripname ()
43460{
43461 case ${2} in
43462 .*) func_stripname_result=`$ECHO "X${3}" \
43463 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
43464 *) func_stripname_result=`$ECHO "X${3}" \
43465 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
43466 esac
43467}
43468
43469# sed scripts:
43470my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
43471my_sed_long_arg='1s/^-[^=]*=//'
43472
43473# func_opt_split
43474func_opt_split ()
43475{
43476 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
43477 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
43478}
43479
43480# func_lo2o object
43481func_lo2o ()
43482{
43483 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
43484}
43485
43486# func_xform libobj-or-source
43487func_xform ()
43488{
43489 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
43490}
43491
43492# func_arith arithmetic-term...
43493func_arith ()
43494{
43495 func_arith_result=`expr "$@"`
43496}
43497
43498# func_len string
43499# STRING may not start with a hyphen.
43500func_len ()
43501{
43502 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
43503}
43504
43505_LT_EOF
43506esac
43507
43508case $lt_shell_append in
43509 yes)
43510 cat << \_LT_EOF >> "$cfgfile"
43511
43512# func_append var value
43513# Append VALUE to the end of shell variable VAR.
43514func_append ()
43515{
43516 eval "$1+=\$2"
43517}
43518_LT_EOF
43519 ;;
43520 *)
43521 cat << \_LT_EOF >> "$cfgfile"
43522
43523# func_append var value
43524# Append VALUE to the end of shell variable VAR.
43525func_append ()
43526{
43527 eval "$1=\$$1\$2"
43528}
43529
43530_LT_EOF
43531 ;;
43532 esac
43533
43534
43535 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
43536 || (rm -f "$cfgfile"; exit 1)
ea04106b 43537
3d248aec 43538 mv -f "$cfgfile" "$ofile" ||
ea04106b
AX
43539 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
43540 chmod +x "$ofile"
43541
43542 ;;
43543
43544 esac
43545done # for ac_tag
43546
43547
3d248aec 43548{ (exit 0); exit 0; }
ea04106b 43549_ACEOF
3d248aec 43550chmod +x $CONFIG_STATUS
ea04106b
AX
43551ac_clean_files=$ac_clean_files_save
43552
43553test $ac_write_fail = 0 ||
3d248aec
AX
43554 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
43555$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
43556 { (exit 1); exit 1; }; }
ea04106b
AX
43557
43558
43559# configure is writing to config.log, and then calls config.status.
43560# config.status does its own redirection, appending to config.log.
43561# Unfortunately, on DOS this fails, as config.log is still kept open
43562# by configure, so config.status won't be able to write to it; its
43563# output is simply discarded. So we exec the FD to /dev/null,
43564# effectively closing config.log, so it can be properly (re)opened and
43565# appended to by config.status. When coming back to configure, we
43566# need to make the FD available again.
43567if test "$no_create" != yes; then
43568 ac_cs_success=:
43569 ac_config_status_args=
43570 test "$silent" = yes &&
43571 ac_config_status_args="$ac_config_status_args --quiet"
43572 exec 5>/dev/null
43573 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
43574 exec 5>>config.log
43575 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
43576 # would make configure fail if this is the last instruction.
3d248aec 43577 $ac_cs_success || { (exit 1); exit 1; }
ea04106b
AX
43578fi
43579if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
3d248aec 43580 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
ea04106b
AX
43581$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
43582fi
43583