EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether blk_fetch_request() is available" >&5
-$as_echo_n "checking whether blk_fetch_request() is available... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5
+$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
{
struct request_queue *q = NULL;
- (void) blk_fetch_request(q);
+ (void) blk_queue_flush(q, REQ_FLUSH);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_FETCH_REQUEST 1
+#define HAVE_BLK_QUEUE_FLUSH 1
_ACEOF
rm -Rf build
- EXTRA_KCFLAGS="$tmp_flags"
-
- { $as_echo "$as_me:$LINENO: checking whether blk_requeue_request() is available" >&5
-$as_echo_n "checking whether blk_requeue_request() is available... " >&6; }
- tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
+ #include <linux/module.h>
#include <linux/blkdev.h>
+ MODULE_LICENSE("CDDL");
+
int
main (void)
{
struct request_queue *q = NULL;
- struct request *req = NULL;
- blk_requeue_request(q, req);
+ (void) blk_queue_flush(q, REQ_FLUSH);
;
return 0;
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_REQUEUE_REQUEST 1
+#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1
_ACEOF
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
fi
EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is available" >&5
-$as_echo_n "checking whether blk_rq_bytes() is available... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5
+$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
main (void)
{
- struct request *req = NULL;
- (void) blk_rq_bytes(req);
+ struct request_queue *q = NULL;
+ (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_BYTES 1
+#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1
_ACEOF
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is GPL-only" >&5
-$as_echo_n "checking whether blk_rq_bytes() is GPL-only... " >&6; }
+
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5
+$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/module.h>
#include <linux/blkdev.h>
- MODULE_LICENSE("CDDL");
-
int
main (void)
{
- struct request *req = NULL;
- (void) blk_rq_bytes(req);
+ struct request_queue *q = NULL;
+ (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
;
return 0;
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1
+#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1
_ACEOF
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
fi
EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether blk_rq_pos() is available" >&5
-$as_echo_n "checking whether blk_rq_pos() is available... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_physical_block_size() is available" >&5
+$as_echo_n "checking whether blk_queue_physical_block_size() is available... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
main (void)
{
- struct request *req = NULL;
- (void) blk_rq_pos(req);
+ struct request_queue *q = NULL;
+ unsigned short block_size = 1;
+ (void) blk_queue_physical_block_size(q, block_size);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_POS 1
+#define HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE 1
_ACEOF
EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether blk_rq_sectors() is available" >&5
-$as_echo_n "checking whether blk_rq_sectors() is available... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_io_opt() is available" >&5
+$as_echo_n "checking whether blk_queue_io_opt() is available... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
main (void)
{
- struct request *req = NULL;
- (void) blk_rq_sectors(req);
+ struct request_queue *q = NULL;
+ unsigned int opt = 1;
+ (void) blk_queue_io_opt(q, opt);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_RQ_SECTORS 1
+#define HAVE_BLK_QUEUE_IO_OPT 1
_ACEOF
EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5
-$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_nonrot() is available" >&5
+$as_echo_n "checking whether blk_queue_nonrot() is available... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
main (void)
{
- struct gendisk *disk = NULL;
- (void) get_disk_ro(disk);
+ struct request_queue *q = NULL;
+ (void) blk_queue_nonrot(q);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_GET_DISK_RO 1
+#define HAVE_BLK_QUEUE_NONROT 1
_ACEOF
EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5
-$as_echo_n "checking whether rq_is_sync() is available... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_fetch_request() is available" >&5
+$as_echo_n "checking whether blk_fetch_request() is available... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
main (void)
{
- struct request *req = NULL;
- (void) rq_is_sync(req);
+ struct request_queue *q = NULL;
+ (void) blk_fetch_request(q);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_RQ_IS_SYNC 1
+#define HAVE_BLK_FETCH_REQUEST 1
_ACEOF
EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether rq_for_each_segment() is available" >&5
-$as_echo_n "checking whether rq_for_each_segment() is available... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_requeue_request() is available" >&5
+$as_echo_n "checking whether blk_requeue_request() is available... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
main (void)
{
- struct bio_vec *bv;
- struct req_iterator iter;
+ struct request_queue *q = NULL;
struct request *req = NULL;
- rq_for_each_segment(bv, req, iter) { }
+ blk_requeue_request(q, req);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_RQ_FOR_EACH_SEGMENT 1
+#define HAVE_BLK_REQUEUE_REQUEST 1
_ACEOF
EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5
-$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; }
+
+ { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is available" >&5
+$as_echo_n "checking whether blk_rq_bytes() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/fs.h>
- #include <linux/xattr.h>
-
- const struct xattr_handler xattr_test_handler = {
- .prefix = "test",
- .get = NULL,
- .set = NULL,
- };
-
- const struct xattr_handler *xattr_handlers[] = {
- &xattr_test_handler,
- };
+ #include <linux/blkdev.h>
int
main (void)
{
- struct super_block sb __attribute__ ((unused));
-
- sb.s_xattr = xattr_handlers;
+ struct request *req = NULL;
+ (void) blk_rq_bytes(req);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_CONST_XATTR_HANDLER 1
+#define HAVE_BLK_RQ_BYTES 1
_ACEOF
-
- { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_rq_bytes() is GPL-only" >&5
+$as_echo_n "checking whether blk_rq_bytes() is GPL-only... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/xattr.h>
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+
+ MODULE_LICENSE("CDDL");
int
main (void)
{
- int (*get)(struct dentry *dentry, const char *name,
- void *buffer, size_t size, int handler_flags) = NULL;
- struct xattr_handler xops __attribute__ ((unused));
-
- xops.get = get;
+ struct request *req = NULL;
+ (void) blk_rq_bytes(req);
;
return 0;
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_DENTRY_XATTR_GET 1
+#define HAVE_BLK_RQ_BYTES_GPL_ONLY 1
_ACEOF
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
fi
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_rq_pos() is available" >&5
+$as_echo_n "checking whether blk_rq_pos() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/xattr.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- int (*set)(struct dentry *dentry, const char *name,
- const void *buffer, size_t size, int flags,
- int handler_flags) = NULL;
- struct xattr_handler xops __attribute__ ((unused));
-
- xops.set = set;
+ struct request *req = NULL;
+ (void) blk_rq_pos(req);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_DENTRY_XATTR_SET 1
+#define HAVE_BLK_RQ_POS 1
_ACEOF
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5
-$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
-
+ { $as_echo "$as_me:$LINENO: checking whether blk_rq_sectors() is available" >&5
+$as_echo_n "checking whether blk_rq_sectors() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/fs.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- int (*show_options) (struct seq_file *, struct dentry *) = NULL;
- struct super_operations sops __attribute__ ((unused));
-
- sops.show_options = show_options;
+ struct request *req = NULL;
+ (void) blk_rq_sectors(req);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1
+#define HAVE_BLK_RQ_SECTORS 1
_ACEOF
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5
-$as_echo_n "checking whether fops->fsync() wants... " >&6; }
-
+ { $as_echo "$as_me:$LINENO: checking whether get_disk_ro() is available" >&5
+$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/fs.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- int (*fsync) (struct file *, struct dentry *, int) = NULL;
- struct file_operations fops __attribute__ ((unused));
-
- fops.fsync = fsync;
+ struct gendisk *disk = NULL;
+ (void) get_disk_ro(disk);
;
return 0;
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: dentry" >&5
-$as_echo "dentry" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITH_DENTRY 1
+#define HAVE_GET_DISK_RO 1
_ACEOF
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
+ { $as_echo "$as_me:$LINENO: checking whether rq_is_sync() is available" >&5
+$as_echo_n "checking whether rq_is_sync() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/fs.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- int (*fsync) (struct file *, int) = NULL;
- struct file_operations fops __attribute__ ((unused));
-
- fops.fsync = fsync;
+ struct request *req = NULL;
+ (void) rq_is_sync(req);
;
return 0;
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: no dentry" >&5
-$as_echo "no dentry" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_WITHOUT_DENTRY 1
+#define HAVE_RQ_IS_SYNC 1
_ACEOF
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
+ { $as_echo "$as_me:$LINENO: checking whether rq_for_each_segment() is available" >&5
+$as_echo_n "checking whether rq_for_each_segment() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/fs.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- int (*fsync) (struct file *, loff_t, loff_t, int) = NULL;
- struct file_operations fops __attribute__ ((unused));
-
- fops.fsync = fsync;
-
+ struct bio_vec *bv;
+ struct req_iterator iter;
+ struct request *req = NULL;
+ rq_for_each_segment(bv, req, iter) { }
+
;
return 0;
}
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: range" >&5
-$as_echo "range" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSYNC_RANGE 1
+#define HAVE_RQ_FOR_EACH_SEGMENT 1
_ACEOF
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
-
-
- { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5
-$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether super_block uses const struct xattr_hander" >&5
+$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
#include <linux/fs.h>
+ #include <linux/xattr.h>
+
+ const struct xattr_handler xattr_test_handler = {
+ .prefix = "test",
+ .get = NULL,
+ .set = NULL,
+ };
+
+ const struct xattr_handler *xattr_handlers[] = {
+ &xattr_test_handler,
+ };
int
main (void)
{
- void (*evict_inode) (struct inode *) = NULL;
- struct super_operations sops __attribute__ ((unused)) = {
- .evict_inode = evict_inode,
- };
+ struct super_block sb __attribute__ ((unused));
+
+ sb.s_xattr = xattr_handlers;
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_EVICT_INODE 1
+#define HAVE_CONST_XATTR_HANDLER 1
_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5
-$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether xattr_handler->get() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/fs.h>
+ #include <linux/xattr.h>
int
main (void)
{
- int (*nr_cached_objects)(struct super_block *)
- __attribute__ ((unused)) = NULL;
- struct super_operations sops __attribute__ ((unused)) = {
- .nr_cached_objects = nr_cached_objects,
- };
+ int (*get)(struct dentry *dentry, const char *name,
+ void *buffer, size_t size, int handler_flags) = NULL;
+ struct xattr_handler xops __attribute__ ((unused));
+
+ xops.get = get;
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_NR_CACHED_OBJECTS 1
+#define HAVE_DENTRY_XATTR_GET 1
_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5
-$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether xattr_handler->set() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/fs.h>
+ #include <linux/xattr.h>
int
main (void)
{
- void (*free_cached_objects)(struct super_block *, int)
- __attribute__ ((unused)) = NULL;
- struct super_operations sops __attribute__ ((unused)) = {
- .free_cached_objects = free_cached_objects,
- };
+ int (*set)(struct dentry *dentry, const char *name,
+ const void *buffer, size_t size, int flags,
+ int handler_flags) = NULL;
+ struct xattr_handler xops __attribute__ ((unused));
+
+ xops.set = set;
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_FREE_CACHED_OBJECTS 1
+#define HAVE_DENTRY_XATTR_SET 1
_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether symbol insert_inode_locked is exported" >&5
-$as_echo_n "checking whether symbol insert_inode_locked is exported... " >&6; }
- grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
- $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
- rc=$?
- if test $rc -ne 0; then
-
- export=0
- for file in fs/inode.c; do
- grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" "$LINUX/$file" 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
+ { $as_echo "$as_me:$LINENO: checking whether sops->show_options() wants dentry" >&5
+$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
- export=1
- break;
-fi
- done
- if test $export -eq 0; then
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ #include <linux/fs.h>
-else
+int
+main (void)
+{
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+ int (*show_options) (struct seq_file *, struct dentry *) = NULL;
+ struct super_operations sops __attribute__ ((unused));
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INSERT_INODE_LOCKED 1
-_ACEOF
+ sops.show_options = show_options;
+ ;
+ return 0;
+}
-fi
+_ACEOF
-else
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_INSERT_INODE_LOCKED 1
+#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1
_ACEOF
-fi
-
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
- { $as_echo "$as_me:$LINENO: checking whether symbol d_obtain_alias is exported" >&5
-$as_echo_n "checking whether symbol d_obtain_alias is exported... " >&6; }
- grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
- $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
- rc=$?
- if test $rc -ne 0; then
- export=0
- for file in fs/dcache.c; do
- grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" "$LINUX/$file" 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
+fi
- export=1
- break;
+ rm -Rf build
-fi
- done
- if test $export -eq 0; then
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether fops->fsync() wants" >&5
+$as_echo_n "checking whether fops->fsync() wants... " >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_OBTAIN_ALIAS 1
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-fi
+ #include <linux/fs.h>
+int
+main (void)
+{
-else
+ int (*fsync) (struct file *, struct dentry *, int) = NULL;
+ struct file_operations fops __attribute__ ((unused));
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+ fops.fsync = fsync;
+
+ ;
+ return 0;
+}
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_D_OBTAIN_ALIAS 1
_ACEOF
-fi
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ { $as_echo "$as_me:$LINENO: result: dentry" >&5
+$as_echo "dentry" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSYNC_WITH_DENTRY 1
+_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5
-$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; }
- grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
- $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
- rc=$?
- if test $rc -ne 0; then
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
- export=0
- for file in fs/block_dev.c; do
- grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" "$LINUX/$file" 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
- export=1
- break;
fi
- done
- if test $export -eq 0; then
+ rm -Rf build
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CHECK_DISK_SIZE_CHANGE 1
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-fi
+ #include <linux/fs.h>
+int
+main (void)
+{
-else
+ int (*fsync) (struct file *, int) = NULL;
+ struct file_operations fops __attribute__ ((unused));
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CHECK_DISK_SIZE_CHANGE 1
-_ACEOF
-
-
-fi
-
-
-
-
- { $as_echo "$as_me:$LINENO: checking whether symbol truncate_setsize is exported" >&5
-$as_echo_n "checking whether symbol truncate_setsize is exported... " >&6; }
- grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
- $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
- rc=$?
- if test $rc -ne 0; then
-
- export=0
- for file in mm/truncate.c; do
- grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" "$LINUX/$file" 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
-
- export=1
- break;
-
-fi
+ fops.fsync = fsync;
- done
- if test $export -eq 0; then
+ ;
+ return 0;
+}
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+_ACEOF
-else
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no dentry" >&5
+$as_echo "no dentry" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_TRUNCATE_SETSIZE 1
+#define HAVE_FSYNC_WITHOUT_DENTRY 1
_ACEOF
-fi
-
-
else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_TRUNCATE_SETSIZE 1
-_ACEOF
fi
+ rm -Rf build
+
- { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5
-$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
- tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="-Werror"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/security.h>
+ #include <linux/fs.h>
int
main (void)
{
- struct inode *ip __attribute__ ((unused)) = NULL;
- struct inode *dip __attribute__ ((unused)) = NULL;
- const struct qstr *str __attribute__ ((unused)) = NULL;
- char *name __attribute__ ((unused)) = NULL;
- void *value __attribute__ ((unused)) = NULL;
- size_t len __attribute__ ((unused)) = 0;
+ int (*fsync) (struct file *, loff_t, loff_t, int) = NULL;
+ struct file_operations fops __attribute__ ((unused));
- security_inode_init_security(ip, dip, str, &name, &value, &len);
+ fops.fsync = fsync;
;
return 0;
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: range" >&5
+$as_echo "range" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1
+#define HAVE_FSYNC_RANGE 1
_ACEOF
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
rm -Rf build
- EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5
-$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
- tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="-Werror"
+
+ { $as_echo "$as_me:$LINENO: checking whether sops->evict_inode() exists" >&5
+$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/security.h>
+ #include <linux/fs.h>
int
main (void)
{
- struct inode *ip __attribute__ ((unused)) = NULL;
- struct inode *dip __attribute__ ((unused)) = NULL;
- const struct qstr *str __attribute__ ((unused)) = NULL;
- initxattrs func __attribute__ ((unused)) = NULL;
-
- security_inode_init_security(ip, dip, str, func, NULL);
+ void (*evict_inode) (struct inode *) = NULL;
+ struct super_operations sops __attribute__ ((unused)) = {
+ .evict_inode = evict_inode,
+ };
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1
+#define HAVE_EVICT_INODE 1
_ACEOF
rm -Rf build
- EXTRA_KCFLAGS="$tmp_flags"
-
-
- { $as_echo "$as_me:$LINENO: checking whether symbol mount_nodev is exported" >&5
-$as_echo_n "checking whether symbol mount_nodev is exported... " >&6; }
- grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
- $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
- rc=$?
- if test $rc -ne 0; then
-
- export=0
- for file in fs/super.c; do
- grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" "$LINUX/$file" 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
-
- export=1
- break;
-
-fi
-
- done
- if test $export -eq 0; then
-
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
-
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MOUNT_NODEV 1
-_ACEOF
-
-
-fi
-
-
-else
-
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MOUNT_NODEV 1
-_ACEOF
-
-
-fi
-
-
- { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5
-$as_echo_n "checking whether super_block has s_shrink... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether sops->nr_cached_objects() exists" >&5
+$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
main (void)
{
- int (*shrink)(struct shrinker *, struct shrink_control *sc)
+ int (*nr_cached_objects)(struct super_block *)
__attribute__ ((unused)) = NULL;
- struct super_block sb __attribute__ ((unused)) = {
- .s_shrink.shrink = shrink,
- .s_shrink.seeks = DEFAULT_SEEKS,
- .s_shrink.batch = 0,
+ struct super_operations sops __attribute__ ((unused)) = {
+ .nr_cached_objects = nr_cached_objects,
};
;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_SHRINK 1
+#define HAVE_NR_CACHED_OBJECTS 1
_ACEOF
-
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- { $as_echo "$as_me:$LINENO: checking whether super_block has s_bdi" >&5
-$as_echo_n "checking whether super_block has s_bdi... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether sops->free_cached_objects() exists" >&5
+$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
main (void)
{
- struct super_block sb __attribute__ ((unused));
- sb.s_bdi = NULL;
+ void (*free_cached_objects)(struct super_block *, int)
+ __attribute__ ((unused)) = NULL;
+ struct super_operations sops __attribute__ ((unused)) = {
+ .free_cached_objects = free_cached_objects,
+ };
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDI 1
+#define HAVE_FREE_CACHED_OBJECTS 1
_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether symbol bdi_setup_and_register is exported" >&5
-$as_echo_n "checking whether symbol bdi_setup_and_register is exported... " >&6; }
- grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+ { $as_echo "$as_me:$LINENO: checking whether symbol insert_inode_locked is exported" >&5
+$as_echo_n "checking whether symbol insert_inode_locked is exported... " >&6; }
+ grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
$LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
rc=$?
if test $rc -ne 0; then
export=0
- for file in mm/backing-dev.c; do
- grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" "$LINUX/$file" 2>/dev/null
+ for file in fs/inode.c; do
+ grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" "$LINUX/$file" 2>/dev/null
rc=$?
if test $rc -eq 0; then
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDI_SETUP_AND_REGISTER 1
+#define HAVE_INSERT_INODE_LOCKED 1
_ACEOF
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDI_SETUP_AND_REGISTER 1
+#define HAVE_INSERT_INODE_LOCKED 1
_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5
-$as_echo_n "checking whether set_nlink() is available... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether symbol d_obtain_alias is exported" >&5
+$as_echo_n "checking whether symbol d_obtain_alias is exported... " >&6; }
+ grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
+ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+ rc=$?
+ if test $rc -ne 0; then
+
+ export=0
+ for file in fs/dcache.c; do
+ grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" "$LINUX/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
-cat confdefs.h - <<_ACEOF >conftest.c
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
+fi
+ done
+ if test $export -eq 0; then
- #include <linux/fs.h>
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
-int
-main (void)
-{
- struct inode node;
- unsigned int link = 0;
- (void) set_nlink(&node, link);
+else
- ;
- return 0;
-}
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_D_OBTAIN_ALIAS 1
_ACEOF
- rm -Rf build && mkdir -p build
- echo "obj-m := conftest.o" >build/Makefile
- if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+fi
+
+
+else
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_SET_NLINK 1
+#define HAVE_D_OBTAIN_ALIAS 1
_ACEOF
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+fi
+
+
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether symbol check_disk_size_change is exported" >&5
+$as_echo_n "checking whether symbol check_disk_size_change is exported... " >&6; }
+ grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
+ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+ rc=$?
+ if test $rc -ne 0; then
+
+ export=0
+ for file in fs/block_dev.c; do
+ grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" "$LINUX/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
fi
- rm -Rf build
+ done
+ if test $export -eq 0; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+else
- if test "$LINUX_OBJ" != "$LINUX"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_DISK_SIZE_CHANGE 1
+_ACEOF
- KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
fi
+else
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
- KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
- KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
- KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CHECK_DISK_SIZE_CHANGE 1
+_ACEOF
- ;;
- user)
+fi
-# Check whether --with-udevdir was given.
-if test "${with_udevdir+set}" = set; then
- withval=$with_udevdir; udevdir=$withval
-else
- udevdir='${exec_prefix}/lib/udev'
-fi
+ { $as_echo "$as_me:$LINENO: checking whether symbol truncate_setsize is exported" >&5
+$as_echo_n "checking whether symbol truncate_setsize is exported... " >&6; }
+ grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
+ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+ rc=$?
+ if test $rc -ne 0; then
-# Check whether --with-udevruledir was given.
-if test "${with_udevruledir+set}" = set; then
- withval=$with_udevruledir; udevruledir=$withval
-else
- udevruledir='${udevdir}/rules.d'
-fi
+ export=0
+ for file in mm/truncate.c; do
+ grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" "$LINUX/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
+fi
+ done
+ if test $export -eq 0; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
- { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5
-$as_echo_n "checking for target asm dir... " >&6; }
- TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/`
+else
- case $TARGET_ARCH in
- i386|x86_64)
- TARGET_ASM_DIR=asm-${TARGET_ARCH}
- ;;
- *)
- TARGET_ASM_DIR=asm-generic
- ;;
- esac
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TRUNCATE_SETSIZE 1
+_ACEOF
- { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5
-$as_echo "$TARGET_ASM_DIR" >&6; }
+fi
- { $as_echo "$as_me:$LINENO: checking for ioctl()" >&5
-$as_echo_n "checking for ioctl()... " >&6; }
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <unistd.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "ioctl" >/dev/null 2>&1; then
- is_unistd=yes
else
- is_unistd=no
-fi
-rm -f conftest*
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/ioctl.h>
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TRUNCATE_SETSIZE 1
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "ioctl" >/dev/null 2>&1; then
- is_sys_ioctl=yes
-else
- is_sys_ioctl=no
+
+
fi
-rm -f conftest*
- cat >conftest.$ac_ext <<_ACEOF
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants 6 args" >&5
+$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Werror"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stropts.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "ioctl" >/dev/null 2>&1; then
- is_stropts=yes
-else
- is_stropts=no
-fi
-rm -f conftest*
+ #include <linux/security.h>
- if test $is_unistd = yes; then
- result=unistd.h
+int
+main (void)
+{
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IOCTL_IN_UNISTD_H 1
-_ACEOF
+ struct inode *ip __attribute__ ((unused)) = NULL;
+ struct inode *dip __attribute__ ((unused)) = NULL;
+ const struct qstr *str __attribute__ ((unused)) = NULL;
+ char *name __attribute__ ((unused)) = NULL;
+ void *value __attribute__ ((unused)) = NULL;
+ size_t len __attribute__ ((unused)) = 0;
- else
+ security_inode_init_security(ip, dip, str, &name, &value, &len);
- if test $is_sys_ioctl = yes; then
- result=sys/ioctl.h
+ ;
+ return 0;
+}
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IOCTL_IN_SYS_IOCTL_H 1
_ACEOF
- elif test $is_stropts = yes; then
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_IOCTL_IN_STROPTS_H 1
+#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1
_ACEOF
- else
- result=no
- fi
- fi
- if test $result = no; then
- { $as_echo "$as_me:$LINENO: result: no" >&5
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
- { { $as_echo "$as_me:$LINENO: error: *** Cannot locate ioctl() definition" >&5
-$as_echo "$as_me: error: *** Cannot locate ioctl() definition" >&2;}
- { (exit 1); exit 1; }; }
- else
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
- fi
- ZLIB=
- if test "${ac_cv_header_zlib_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
-$as_echo_n "checking for zlib.h... " >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
- $as_echo_n "(cached) " >&6
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-$as_echo "$ac_cv_header_zlib_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
-$as_echo_n "checking zlib.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <zlib.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_compiler=no
-fi
+ rm -Rf build
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
-$as_echo_n "checking zlib.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+ EXTRA_KCFLAGS="$tmp_flags"
+
+
+ { $as_echo "$as_me:$LINENO: checking whether security_inode_init_security wants callback" >&5
+$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Werror"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <zlib.h>
+
+
+ #include <linux/security.h>
+
+int
+main (void)
+{
+
+ struct inode *ip __attribute__ ((unused)) = NULL;
+ struct inode *dip __attribute__ ((unused)) = NULL;
+ const struct qstr *str __attribute__ ((unused)) = NULL;
+ initxattrs func __attribute__ ((unused)) = NULL;
+
+ security_inode_init_security(ip, dip, str, func, NULL);
+
+ ;
+ return 0;
+}
+
_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1
+_ACEOF
+
+
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
fi
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
+ rm -Rf build
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
-$as_echo_n "checking for zlib.h... " >&6; }
-if test "${ac_cv_header_zlib_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_zlib_h=$ac_header_preproc
+ EXTRA_KCFLAGS="$tmp_flags"
+
+
+ { $as_echo "$as_me:$LINENO: checking whether symbol mount_nodev is exported" >&5
+$as_echo_n "checking whether symbol mount_nodev is exported... " >&6; }
+ grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
+ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+ rc=$?
+ if test $rc -ne 0; then
+
+ export=0
+ for file in fs/super.c; do
+ grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" "$LINUX/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+
+ export=1
+ break;
+
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
-$as_echo "$ac_cv_header_zlib_h" >&6; }
+
+ done
+ if test $export -eq 0; then
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+else
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MOUNT_NODEV 1
+_ACEOF
+
fi
-if test "x$ac_cv_header_zlib_h" = x""yes; then
- :
+
+
else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
- *** zlib.h missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
- *** zlib.h missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MOUNT_NODEV 1
+_ACEOF
+
+
fi
-{ $as_echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
-$as_echo_n "checking for compress2 in -lz... " >&6; }
-if test "${ac_cv_lib_z_compress2+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+ { $as_echo "$as_me:$LINENO: checking whether super_block has s_shrink" >&5
+$as_echo_n "checking whether super_block has s_shrink... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char compress2 ();
+
+ #include <linux/fs.h>
+
int
-main ()
+main (void)
{
-return compress2 ();
+
+ int (*shrink)(struct shrinker *, struct shrink_control *sc)
+ __attribute__ ((unused)) = NULL;
+ struct super_block sb __attribute__ ((unused)) = {
+ .s_shrink.shrink = shrink,
+ .s_shrink.seeks = DEFAULT_SEEKS,
+ .s_shrink.batch = 0,
+ };
+
;
return 0;
}
+
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_lib_z_compress2=yes
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SHRINK 1
+_ACEOF
+
+
+
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_z_compress2=no
-fi
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
-$as_echo "$ac_cv_lib_z_compress2" >&6; }
-if test "x$ac_cv_lib_z_compress2" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
- LIBS="-lz $LIBS"
-else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
- *** compress2() missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
- *** compress2() missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
fi
+ rm -Rf build
-{ $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
-$as_echo_n "checking for uncompress in -lz... " >&6; }
-if test "${ac_cv_lib_z_uncompress+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+
+ { $as_echo "$as_me:$LINENO: checking whether super_block has s_bdi" >&5
+$as_echo_n "checking whether super_block has s_bdi... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uncompress ();
+
+ #include <linux/fs.h>
+
int
-main ()
+main (void)
{
-return uncompress ();
+
+ struct super_block sb __attribute__ ((unused));
+ sb.s_bdi = NULL;
+
;
return 0;
}
+
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_lib_z_uncompress=yes
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDI 1
+_ACEOF
+
+
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_z_uncompress=no
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ rm -Rf build
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether symbol bdi_setup_and_register is exported" >&5
+$as_echo_n "checking whether symbol bdi_setup_and_register is exported... " >&6; }
+ grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+ rc=$?
+ if test $rc -ne 0; then
+
+ export=0
+ for file in mm/backing-dev.c; do
+ grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" "$LINUX/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+
+ export=1
+ break;
+
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&5
-$as_echo "$ac_cv_lib_z_uncompress" >&6; }
-if test "x$ac_cv_lib_z_uncompress" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
+
+ done
+ if test $export -eq 0; then
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+else
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDI_SETUP_AND_REGISTER 1
_ACEOF
- LIBS="-lz $LIBS"
+
+fi
+
else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
- *** uncompress() missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
- *** uncompress() missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDI_SETUP_AND_REGISTER 1
+_ACEOF
+
+
fi
-{ $as_echo "$as_me:$LINENO: checking for crc32 in -lz" >&5
-$as_echo_n "checking for crc32 in -lz... " >&6; }
-if test "${ac_cv_lib_z_crc32+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+
+ { $as_echo "$as_me:$LINENO: checking whether set_nlink() is available" >&5
+$as_echo_n "checking whether set_nlink() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crc32 ();
+
+ #include <linux/fs.h>
+
int
-main ()
+main (void)
{
-return crc32 ();
+
+ struct inode node;
+ unsigned int link = 0;
+ (void) set_nlink(&node, link);
+
;
return 0;
}
+
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_lib_z_crc32=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_z_crc32=no
-fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SET_NLINK 1
+_ACEOF
+
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+
+
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5
-$as_echo "$ac_cv_lib_z_crc32" >&6; }
-if test "x$ac_cv_lib_z_crc32" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
+
+ rm -Rf build
+
+
+
+
+ if test "$LINUX_OBJ" != "$LINUX"; then
+
+ KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
+
+fi
+
+
+
+
+ KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
+ KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
+ KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
+
+
+ ;;
+ user)
+
+
+# Check whether --with-udevdir was given.
+if test "${with_udevdir+set}" = set; then
+ withval=$with_udevdir; udevdir=$withval
+else
+ udevdir='${exec_prefix}/lib/udev'
+fi
+
+
+
+# Check whether --with-udevruledir was given.
+if test "${with_udevruledir+set}" = set; then
+ withval=$with_udevruledir; udevruledir=$withval
+else
+ udevruledir='${udevdir}/rules.d'
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for target asm dir" >&5
+$as_echo_n "checking for target asm dir... " >&6; }
+ TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/`
+
+ case $TARGET_ARCH in
+ i386|x86_64)
+ TARGET_ASM_DIR=asm-${TARGET_ARCH}
+ ;;
+ *)
+ TARGET_ASM_DIR=asm-generic
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:$LINENO: result: $TARGET_ASM_DIR" >&5
+$as_echo "$TARGET_ASM_DIR" >&6; }
+
+
+ { $as_echo "$as_me:$LINENO: checking for ioctl()" >&5
+$as_echo_n "checking for ioctl()... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <unistd.h>
- LIBS="-lz $LIBS"
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "ioctl" >/dev/null 2>&1; then
+ is_unistd=yes
+else
+ is_unistd=no
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/ioctl.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "ioctl" >/dev/null 2>&1; then
+ is_sys_ioctl=yes
+else
+ is_sys_ioctl=no
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stropts.h>
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "ioctl" >/dev/null 2>&1; then
+ is_stropts=yes
else
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error:
- *** crc32() missing, zlib-devel package required
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error:
- *** crc32() missing, zlib-devel package required
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+ is_stropts=no
fi
+rm -f conftest*
- ZLIB="-lz"
+ if test $is_unistd = yes; then
+ result=unistd.h
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IOCTL_IN_UNISTD_H 1
+_ACEOF
+
+ else
+ if test $is_sys_ioctl = yes; then
+ result=sys/ioctl.h
cat >>confdefs.h <<\_ACEOF
-#define HAVE_ZLIB 1
+#define HAVE_IOCTL_IN_SYS_IOCTL_H 1
_ACEOF
+ elif test $is_stropts = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IOCTL_IN_STROPTS_H 1
+_ACEOF
- LIBUUID=
+ else
+ result=no
+ fi
+ fi
- if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
-$as_echo_n "checking for uuid/uuid.h... " >&6; }
-if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+ if test $result = no; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ { { $as_echo "$as_me:$LINENO: error: *** Cannot locate ioctl() definition" >&5
+$as_echo "$as_me: error: *** Cannot locate ioctl() definition" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ fi
+
+
+ ZLIB=
+
+ if test "${ac_cv_header_zlib_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
+$as_echo_n "checking for zlib.h... " >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
$as_echo_n "(cached) " >&6
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
-$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+$as_echo "$ac_cv_header_zlib_h" >&6; }
else
# Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5
-$as_echo_n "checking uuid/uuid.h usability... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5
+$as_echo_n "checking zlib.h usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <uuid/uuid.h>
+#include <zlib.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5
-$as_echo_n "checking uuid/uuid.h presence... " >&6; }
+{ $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5
+$as_echo_n "checking zlib.h presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <uuid/uuid.h>
+#include <zlib.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
;;
esac
-{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
-$as_echo_n "checking for uuid/uuid.h... " >&6; }
-if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for zlib.h" >&5
+$as_echo_n "checking for zlib.h... " >&6; }
+if test "${ac_cv_header_zlib_h+set}" = set; then
$as_echo_n "(cached) " >&6
else
- ac_cv_header_uuid_uuid_h=$ac_header_preproc
+ ac_cv_header_zlib_h=$ac_header_preproc
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
-$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
+$as_echo "$ac_cv_header_zlib_h" >&6; }
fi
-if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then
+if test "x$ac_cv_header_zlib_h" = x""yes; then
:
else
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error:
- *** uuid/uuid.h missing, libuuid-devel package required
+ *** zlib.h missing, zlib-devel package required
See \`config.log' for more details." >&5
$as_echo "$as_me: error:
- *** uuid/uuid.h missing, libuuid-devel package required
+ *** zlib.h missing, zlib-devel package required
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }; }
fi
-{ $as_echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5
-$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
+$as_echo_n "checking for compress2 in -lz... " >&6; }
+if test "${ac_cv_lib_z_compress2+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid $LIBS"
+LIBS="-lz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
#ifdef __cplusplus
extern "C"
#endif
-char uuid_generate ();
+char compress2 ();
int
main ()
{
-return uuid_generate ();
+return compress2 ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_lib_uuid_uuid_generate=yes
+ ac_cv_lib_z_compress2=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_uuid_uuid_generate=no
+ ac_cv_lib_z_compress2=no
fi
rm -rf conftest.dSYM
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5
-$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
+$as_echo "$ac_cv_lib_z_compress2" >&6; }
+if test "x$ac_cv_lib_z_compress2" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUUID 1
+#define HAVE_LIBZ 1
_ACEOF
- LIBS="-luuid $LIBS"
+ LIBS="-lz $LIBS"
else
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error:
- *** uuid_generate() missing, libuuid-devel package required
+ *** compress2() missing, zlib-devel package required
See \`config.log' for more details." >&5
$as_echo "$as_me: error:
- *** uuid_generate() missing, libuuid-devel package required
+ *** compress2() missing, zlib-devel package required
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }; }
fi
-{ $as_echo "$as_me:$LINENO: checking for uuid_is_null in -luuid" >&5
-$as_echo_n "checking for uuid_is_null in -luuid... " >&6; }
-if test "${ac_cv_lib_uuid_uuid_is_null+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for uncompress in -lz" >&5
+$as_echo_n "checking for uncompress in -lz... " >&6; }
+if test "${ac_cv_lib_z_uncompress+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid $LIBS"
+LIBS="-lz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
#ifdef __cplusplus
extern "C"
#endif
-char uuid_is_null ();
+char uncompress ();
int
main ()
{
-return uuid_is_null ();
+return uncompress ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_lib_uuid_uuid_is_null=yes
+ ac_cv_lib_z_uncompress=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_uuid_uuid_is_null=no
+ ac_cv_lib_z_uncompress=no
fi
rm -rf conftest.dSYM
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_is_null" >&5
-$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_is_null" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_uncompress" >&5
+$as_echo "$ac_cv_lib_z_uncompress" >&6; }
+if test "x$ac_cv_lib_z_uncompress" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUUID 1
+#define HAVE_LIBZ 1
_ACEOF
- LIBS="-luuid $LIBS"
+ LIBS="-lz $LIBS"
else
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ { $as_echo "$as_me:$LINENO: error:
- *** uuid_is_null() missing, libuuid-devel package required
+ *** uncompress() missing, zlib-devel package required
See \`config.log' for more details." >&5
$as_echo "$as_me: error:
- *** uuid_is_null() missing, libuuid-devel package required
+ *** uncompress() missing, zlib-devel package required
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }; }
fi
- LIBUUID="-luuid"
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBUUID 1
-_ACEOF
-
-
-
-
-# Check whether --with-blkid was given.
-if test "${with_blkid+set}" = set; then
- withval=$with_blkid;
-else
- with_blkid=check
-fi
-
-
- LIBBLKID=
- if test "x$with_blkid" != xno; then
- { $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5
-$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
-if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for crc32 in -lz" >&5
+$as_echo_n "checking for crc32 in -lz... " >&6; }
+if test "${ac_cv_lib_z_crc32+set}" = set; then
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lblkid $LIBS"
+LIBS="-lz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
#ifdef __cplusplus
extern "C"
#endif
-char blkid_get_cache ();
+char crc32 ();
int
main ()
{
-return blkid_get_cache ();
+return crc32 ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_lib_blkid_blkid_get_cache=yes
+ ac_cv_lib_z_crc32=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_blkid_blkid_get_cache=no
+ ac_cv_lib_z_crc32=no
fi
rm -rf conftest.dSYM
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
-$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
-if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then
-
- { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5
-$as_echo_n "checking for blkid zfs support... " >&6; }
-
- ZFS_DEV=`mktemp`
- dd if=/dev/zero of=$ZFS_DEV bs=1024k count=8 \
- >/dev/null 2>/dev/null
- echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
- dd of=$ZFS_DEV bs=1k count=8 \
- seek=132 conv=notrunc &>/dev/null \
- >/dev/null 2>/dev/null
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_crc32" >&5
+$as_echo "$ac_cv_lib_z_crc32" >&6; }
+if test "x$ac_cv_lib_z_crc32" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
- saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="-lblkid"
+ LIBS="-lz $LIBS"
- if test "$cross_compiling" = yes; then
+else
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+{ { $as_echo "$as_me:$LINENO: error:
+ *** crc32() missing, zlib-devel package required
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
+$as_echo "$as_me: error:
+ *** crc32() missing, zlib-devel package required
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }; }
+fi
+
+
+ ZLIB="-lz"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ZLIB 1
+_ACEOF
+
+
+
+ LIBUUID=
+
+ if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
+$as_echo_n "checking for uuid/uuid.h... " >&6; }
+if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
+$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
else
- cat >conftest.$ac_ext <<_ACEOF
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h usability" >&5
+$as_echo_n "checking uuid/uuid.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+$ac_includes_default
+#include <uuid/uuid.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- #include <stdio.h>
- #include <blkid/blkid.h>
+ ac_header_compiler=no
+fi
-int
-main ()
-{
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
- blkid_cache cache;
- char *value;
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking uuid/uuid.h presence" >&5
+$as_echo_n "checking uuid/uuid.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <uuid/uuid.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: uuid/uuid.h: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for uuid/uuid.h" >&5
+$as_echo_n "checking for uuid/uuid.h... " >&6; }
+if test "${ac_cv_header_uuid_uuid_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_uuid_uuid_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_uuid_uuid_h" >&5
+$as_echo "$ac_cv_header_uuid_uuid_h" >&6; }
+
+fi
+if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then
+ :
+else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+ *** uuid/uuid.h missing, libuuid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+ *** uuid/uuid.h missing, libuuid-devel package required
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for uuid_generate in -luuid" >&5
+$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
+if test "${ac_cv_lib_uuid_uuid_generate+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate ();
+int
+main ()
+{
+return uuid_generate ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_uuid_uuid_generate=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_uuid_uuid_generate=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_generate" >&5
+$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_generate" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBUUID 1
+_ACEOF
+
+ LIBS="-luuid $LIBS"
+
+else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+ *** uuid_generate() missing, libuuid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+ *** uuid_generate() missing, libuuid-devel package required
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for uuid_is_null in -luuid" >&5
+$as_echo_n "checking for uuid_is_null in -luuid... " >&6; }
+if test "${ac_cv_lib_uuid_uuid_is_null+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_is_null ();
+int
+main ()
+{
+return uuid_is_null ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_uuid_uuid_is_null=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_uuid_uuid_is_null=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_uuid_uuid_is_null" >&5
+$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_is_null" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBUUID 1
+_ACEOF
+
+ LIBS="-luuid $LIBS"
+
+else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error:
+ *** uuid_is_null() missing, libuuid-devel package required
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error:
+ *** uuid_is_null() missing, libuuid-devel package required
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+
+ LIBUUID="-luuid"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBUUID 1
+_ACEOF
+
+
+
+
+# Check whether --with-blkid was given.
+if test "${with_blkid+set}" = set; then
+ withval=$with_blkid;
+else
+ with_blkid=check
+fi
+
+
+ LIBBLKID=
+ if test "x$with_blkid" != xno; then
+
+ { $as_echo "$as_me:$LINENO: checking for blkid_get_cache in -lblkid" >&5
+$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
+if test "${ac_cv_lib_blkid_blkid_get_cache+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lblkid $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char blkid_get_cache ();
+int
+main ()
+{
+return blkid_get_cache ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_blkid_blkid_get_cache=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_blkid_blkid_get_cache=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
+$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
+if test "x$ac_cv_lib_blkid_blkid_get_cache" = x""yes; then
+
+ { $as_echo "$as_me:$LINENO: checking for blkid zfs support" >&5
+$as_echo_n "checking for blkid zfs support... " >&6; }
+
+ ZFS_DEV=`mktemp`
+ dd if=/dev/zero of=$ZFS_DEV bs=1024k count=8 \
+ >/dev/null 2>/dev/null
+ echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
+ dd of=$ZFS_DEV bs=1k count=8 \
+ seek=132 conv=notrunc &>/dev/null \
+ >/dev/null 2>/dev/null
+
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-lblkid"
+
+ if test "$cross_compiling" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <stdio.h>
+ #include <blkid/blkid.h>
+
+int
+main ()
+{
+
+ blkid_cache cache;
+ char *value;
+
+ if (blkid_get_cache(&cache, NULL) < 0)
+ return 1;
+
+ value = blkid_get_tag_value(cache, "TYPE",
+ "$ZFS_DEV");
+ if (!value) {
+ blkid_put_cache(cache);
+ return 2;
+ }
+
+ if (strcmp(value, "zfs")) {
+ free(value);
+ blkid_put_cache(cache);
+ return 3;
+ }
+
+ free(value);
+ blkid_put_cache(cache);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ rm -f $ZFS_DEV
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ LIBBLKID="-lblkid"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBBLKID 1
+_ACEOF
+
+
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+
+ rm -f $ZFS_DEV
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ if test "x$with_blkid" != xcheck; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-blkid given but unavailable
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+ LDFLAGS="$saved_LDFLAGS"
+
+else
+
+ if test "x$with_blkid" != xcheck; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-blkid given but unavailable
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+
+
+fi
+
+
+fi
+
+
+
+
+# Check whether --with-selinux was given.
+if test "${with_selinux+set}" = set; then
+ withval=$with_selinux;
+else
+ with_selinux=check
+fi
+
+
+ LIBSELINUX=
+ if test "x$with_selinux" != xno; then
+
+ if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
+$as_echo_n "checking for selinux/selinux.h... " >&6; }
+if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
+$as_echo "$ac_cv_header_selinux_selinux_h" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5
+$as_echo_n "checking selinux/selinux.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <selinux/selinux.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5
+$as_echo_n "checking selinux/selinux.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <selinux/selinux.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
+$as_echo_n "checking for selinux/selinux.h... " >&6; }
+if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_selinux_selinux_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
+$as_echo "$ac_cv_header_selinux_selinux_h" >&6; }
+
+fi
+if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then
+
+ { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5
+$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
+if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lselinux $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char is_selinux_enabled ();
+int
+main ()
+{
+return is_selinux_enabled ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_selinux_is_selinux_enabled=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_selinux_is_selinux_enabled=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
+$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
+if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then
+
+ LIBSELINUX="-lselinux"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBSELINUX 1
+_ACEOF
+
+
+else
+
+ if test "x$with_selinux" != xcheck; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-selinux given but unavailable
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+
+fi
+
+
+fi
+
+
+else
+
+ if test "x$with_selinux" != xcheck; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-selinux given but unavailable
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+
+fi
+
+
+fi
+
+
+
+else
+
+ { $as_echo "$as_me:$LINENO: checking for selinux support" >&5
+$as_echo_n "checking for selinux support... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than=<size> support" >&5
+$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
+
+ saved_flags="$CFLAGS"
+ CFLAGS="$CFLAGS -Wframe-larger-than=1024"
+
+ if test "$cross_compiling" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ FRAME_LARGER_THAN=-Wframe-larger-than=1024
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+
+ FRAME_LARGER_THAN=
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+ CFLAGS="$saved_flags"
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether pthread stack includes guard" >&5
+$as_echo_n "checking whether pthread stack includes guard... " >&6; }
+
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="-fstack-check"
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-lpthread"
+
+ if test "$cross_compiling" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <pthread.h>
+ #include <sys/resource.h>
+ #include <unistd.h>
+ #include <bits/local_lim.h>
+
+ #define PAGESIZE (sysconf(_SC_PAGESIZE))
+ #define STACK_SIZE 8192
+ #define BUFSIZE 4096
+
+ void * func(void *arg)
+ {
+ char buf[BUFSIZE];
+ }
+
+int
+main ()
+{
+
+ pthread_t tid;
+ pthread_attr_t attr;
+ struct rlimit l;
+
+ l.rlim_cur = 0;
+ l.rlim_max = 0;
+ setrlimit(RLIMIT_CORE, &l);
+ pthread_attr_init(&attr);
+ pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN + STACK_SIZE);
+ pthread_attr_setguardsize(&attr, PAGESIZE);
+ pthread_create(&tid, &attr, func, NULL);
+ pthread_join(tid, NULL);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+
+
+cat >>confdefs.h <<\_ACEOF
+#define NPTL_GUARD_WITHIN_STACK 1
+_ACEOF
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ CFLAGS="$saved_CFLAGS"
+ LDFLAGS="$saved_LDFLAGS"
+
+ ;;
+ all)
+
+
+# Check whether --with-linux was given.
+if test "${with_linux+set}" = set; then
+ withval=$with_linux; kernelsrc="$withval"
+fi
+
+
+
+# Check whether --with-linux-obj was given.
+if test "${with_linux_obj+set}" = set; then
+ withval=$with_linux_obj; kernelbuild="$withval"
+fi
+
+
+ { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
+$as_echo_n "checking kernel source directory... " >&6; }
+ if test -z "$kernelsrc"; then
+
+ if test -e "/lib/modules/$(uname -r)/source"; then
+
+ headersdir="/lib/modules/$(uname -r)/source"
+ sourcelink=$(readlink -f "$headersdir")
+
+elif test -e "/lib/modules/$(uname -r)/build"; then
+
+ headersdir="/lib/modules/$(uname -r)/build"
+ sourcelink=$(readlink -f "$headersdir")
+
+else
+
+ sourcelink=$(ls -1d /usr/src/kernels/* \
+ /usr/src/linux-* \
+ 2>/dev/null | grep -v obj | tail -1)
+
+fi
+
+
+ if test -n "$sourcelink" && test -e ${sourcelink}; then
+
+ kernelsrc=`readlink -f ${sourcelink}`
+
+else
+
+ { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+ { { $as_echo "$as_me:$LINENO: error:
+ *** Please make sure the kernel devel package for your distribution
+ *** is installed then try again. If that fails you can specify the
+ *** location of the kernel source with the '--with-linux=PATH' option." >&5
+$as_echo "$as_me: error:
+ *** Please make sure the kernel devel package for your distribution
+ *** is installed then try again. If that fails you can specify the
+ *** location of the kernel source with the '--with-linux=PATH' option." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+else
+
+ if test "$kernelsrc" = "NONE"; then
+
+ kernsrcver=NONE
+
+fi
+
+
+fi
+
+
+ { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5
+$as_echo "$kernelsrc" >&6; }
+ { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
+$as_echo_n "checking kernel build directory... " >&6; }
+ if test -z "$kernelbuild"; then
+
+ if test -e "/lib/modules/$(uname -r)/build"; then
+
+ kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
+
+elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
+
+ kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
+
+elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
+
+ kernelbuild=${kernelsrc}-obj/${target_cpu}/default
+
+elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
+
+ kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
+
+else
+
+ kernelbuild=${kernelsrc}
+
+fi
+
+
+fi
+
+ { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5
+$as_echo "$kernelbuild" >&6; }
+
+ { $as_echo "$as_me:$LINENO: checking kernel source version" >&5
+$as_echo_n "checking kernel source version... " >&6; }
+ utsrelease1=$kernelbuild/include/linux/version.h
+ utsrelease2=$kernelbuild/include/linux/utsrelease.h
+ utsrelease3=$kernelbuild/include/generated/utsrelease.h
+ if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then
+
+ utsrelease=linux/version.h
+
+elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then
+
+ utsrelease=linux/utsrelease.h
+
+elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then
+
+ utsrelease=generated/utsrelease.h
+
+fi
+
+
+ if test "$utsrelease"; then
+
+ kernsrcver=`(echo "#include <$utsrelease>";
+ echo "kernsrcver=UTS_RELEASE") |
+ cpp -I $kernelbuild/include |
+ grep "^kernsrcver=" | cut -d \" -f 2`
+
+ if test -z "$kernsrcver"; then
+
+ { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+ { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5
+$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+else
+
+ { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+ { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5
+$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+
+
+ { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5
+$as_echo "$kernsrcver" >&6; }
- if (blkid_get_cache(&cache, NULL) < 0)
- return 1;
+ LINUX=${kernelsrc}
+ LINUX_OBJ=${kernelbuild}
+ LINUX_VERSION=${kernsrcver}
- value = blkid_get_tag_value(cache, "TYPE",
- "$ZFS_DEV");
- if (!value) {
- blkid_put_cache(cache);
- return 2;
- }
- if (strcmp(value, "zfs")) {
- free(value);
- blkid_put_cache(cache);
- return 3;
- }
- free(value);
- blkid_put_cache(cache);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- rm -f $ZFS_DEV
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
- LIBBLKID="-lblkid"
+ modpost=$LINUX/scripts/Makefile.modpost
+ { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5
+$as_echo_n "checking kernel file name for module symbols... " >&6; }
+ if test -f "$modpost"; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBBLKID 1
-_ACEOF
+ if grep -q Modules.symvers $modpost; then
+ LINUX_SYMBOLS=Modules.symvers
else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
+ LINUX_SYMBOLS=Module.symvers
- rm -f $ZFS_DEV
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- if test "x$with_blkid" != xcheck; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-blkid given but unavailable
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
fi
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+ if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
+ { { $as_echo "$as_me:$LINENO: error:
+ *** Please make sure the kernel devel package for your distribution
+ *** is installed. If your building with a custom kernel make sure the
+ *** kernel is configured, built, and the '--with-linux=PATH' configure
+ *** option refers to the location of the kernel source." >&5
+$as_echo "$as_me: error:
+ *** Please make sure the kernel devel package for your distribution
+ *** is installed. If your building with a custom kernel make sure the
+ *** kernel is configured, built, and the '--with-linux=PATH' configure
+ *** option refers to the location of the kernel source." >&2;}
+ { (exit 1); exit 1; }; }
+fi
- LDFLAGS="$saved_LDFLAGS"
else
- if test "x$with_blkid" != xcheck; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-blkid given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-blkid given but unavailable
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+ LINUX_SYMBOLS=NONE
+
fi
+ { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
+$as_echo "$LINUX_SYMBOLS" >&6; }
-fi
-fi
+# Check whether --with-spl was given.
+if test "${with_spl+set}" = set; then
+ withval=$with_spl; splsrc="$withval"
+fi
-# Check whether --with-selinux was given.
-if test "${with_selinux+set}" = set; then
- withval=$with_selinux;
-else
- with_selinux=check
+# Check whether --with-spl-obj was given.
+if test "${with_spl_obj+set}" = set; then
+ withval=$with_spl_obj; splbuild="$withval"
fi
- LIBSELINUX=
- if test "x$with_selinux" != xno; then
- if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
-$as_echo_n "checking for selinux/selinux.h... " >&6; }
-if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
-$as_echo "$ac_cv_header_selinux_selinux_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5
-$as_echo_n "checking selinux/selinux.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <selinux/selinux.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:$LINENO: checking spl source directory" >&5
+$as_echo_n "checking spl source directory... " >&6; }
+ if test -z "$splsrc"; then
- ac_header_compiler=no
-fi
+ sourcelink=`ls -1d /usr/src/spl-*/${LINUX_VERSION} \
+ 2>/dev/null | tail -1`
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+ if test -z "$sourcelink" || test ! -e $sourcelink; then
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5
-$as_echo_n "checking selinux/selinux.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <selinux/selinux.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ sourcelink=../spl
- ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;}
+ if test -e $sourcelink; then
+
+ splsrc=`readlink -f ${sourcelink}`
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
-$as_echo_n "checking for selinux/selinux.h... " >&6; }
-if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
- $as_echo_n "(cached) " >&6
else
- ac_cv_header_selinux_selinux_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
-$as_echo "$ac_cv_header_selinux_selinux_h" >&6; }
+
+ { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+ { { $as_echo "$as_me:$LINENO: error:
+ *** Please make sure the spl devel package for your distribution
+ *** is installed then try again. If that fails you can specify the
+ *** location of the spl source with the '--with-spl=PATH' option." >&5
+$as_echo "$as_me: error:
+ *** Please make sure the spl devel package for your distribution
+ *** is installed then try again. If that fails you can specify the
+ *** location of the spl source with the '--with-spl=PATH' option." >&2;}
+ { (exit 1); exit 1; }; }
fi
-if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then
- { $as_echo "$as_me:$LINENO: checking for is_selinux_enabled in -lselinux" >&5
-$as_echo_n "checking for is_selinux_enabled in -lselinux... " >&6; }
-if test "${ac_cv_lib_selinux_is_selinux_enabled+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lselinux $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char is_selinux_enabled ();
-int
-main ()
-{
-return is_selinux_enabled ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_lib_selinux_is_selinux_enabled=yes
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_selinux_is_selinux_enabled=no
+ if test "$splsrc" = "NONE"; then
+
+ splbuild=NONE
+ splsrcver=NONE
+
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_is_selinux_enabled" >&5
-$as_echo "$ac_cv_lib_selinux_is_selinux_enabled" >&6; }
-if test "x$ac_cv_lib_selinux_is_selinux_enabled" = x""yes; then
- LIBSELINUX="-lselinux"
+ { $as_echo "$as_me:$LINENO: result: $splsrc" >&5
+$as_echo "$splsrc" >&6; }
+ { $as_echo "$as_me:$LINENO: checking spl build directory" >&5
+$as_echo_n "checking spl build directory... " >&6; }
+ if test -z "$splbuild"; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBSELINUX 1
-_ACEOF
+ splbuild=${splsrc}
+fi
-else
+ { $as_echo "$as_me:$LINENO: result: $splbuild" >&5
+$as_echo "$splbuild" >&6; }
- if test "x$with_selinux" != xcheck; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+ { $as_echo "$as_me:$LINENO: checking spl source version" >&5
+$as_echo_n "checking spl source version... " >&6; }
+ if test -r $splbuild/spl_config.h &&
+ fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then
-fi
+ splsrcver=`(echo "#include <spl_config.h>";
+ echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
+ cpp -I $splbuild |
+ grep "^splsrcver=" | tr -d \" | cut -d= -f2`
fi
-else
+ if test -z "$splsrcver"; then
- if test "x$with_selinux" != xcheck; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: --with-selinux given but unavailable
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+ { $as_echo "$as_me:$LINENO: result: Not found" >&5
+$as_echo "Not found" >&6; }
+ { { $as_echo "$as_me:$LINENO: error:
+ *** Cannot determine the version of the spl source.
+ *** Please prepare the spl source before running this script" >&5
+$as_echo "$as_me: error:
+ *** Cannot determine the version of the spl source.
+ *** Please prepare the spl source before running this script" >&2;}
+ { (exit 1); exit 1; }; }
fi
-fi
+ { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5
+$as_echo "$splsrcver" >&6; }
+ SPL=${splsrc}
+ SPL_OBJ=${splbuild}
+ SPL_VERSION=${splsrcver}
-else
- { $as_echo "$as_me:$LINENO: checking for selinux support" >&5
-$as_echo_n "checking for selinux support... " >&6; }
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
+ { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5
+$as_echo_n "checking spl file name for module symbols... " >&6; }
+ if test -r $SPL_OBJ/Module.symvers; then
- { $as_echo "$as_me:$LINENO: checking for -Wframe-larger-than=<size> support" >&5
-$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
+ SPL_SYMBOLS=Module.symvers
- saved_flags="$CFLAGS"
- CFLAGS="$CFLAGS -Wframe-larger-than=1024"
+elif test -r $SPL_OBJ/Modules.symvers; then
- if test "$cross_compiling" = yes; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
+ SPL_SYMBOLS=Modules.symvers
-int
-main ()
-{
+elif test -r $SPL_OBJ/module/Module.symvers; then
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ SPL_SYMBOLS=Module.symvers
- FRAME_LARGER_THAN=-Wframe-larger-than=1024
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+elif test -r $SPL_OBJ/module/Modules.symvers; then
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ SPL_SYMBOLS=Modules.symvers
-( exit $ac_status )
+else
- FRAME_LARGER_THAN=
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ SPL_SYMBOLS=$LINUX_SYMBOLS
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+ { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5
+$as_echo "$SPL_SYMBOLS" >&6; }
- CFLAGS="$saved_flags"
- { $as_echo "$as_me:$LINENO: checking whether pthread stack includes guard" >&5
-$as_echo_n "checking whether pthread stack includes guard... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5
+$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; }
- saved_CFLAGS="$CFLAGS"
- CFLAGS="-fstack-check"
- saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="-lpthread"
- if test "$cross_compiling" = yes; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.c
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- #include <pthread.h>
- #include <sys/resource.h>
- #include <unistd.h>
- #include <bits/local_lim.h>
-
- #define PAGESIZE (sysconf(_SC_PAGESIZE))
- #define STACK_SIZE 8192
- #define BUFSIZE 4096
-
- void * func(void *arg)
- {
- char buf[BUFSIZE];
- }
-
-int
-main ()
-{
-
- pthread_t tid;
- pthread_attr_t attr;
- struct rlimit l;
-
- l.rlim_cur = 0;
- l.rlim_max = 0;
- setrlimit(RLIMIT_CORE, &l);
- pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN + STACK_SIZE);
- pthread_attr_setguardsize(&attr, PAGESIZE);
- pthread_create(&tid, &attr, func, NULL);
- pthread_join(tid, NULL);
+
+ #include <linux/module.h>
+
+int
+main (void)
+{
+
+ #ifndef CONFIG_PREEMPT
+ #error CONFIG_PREEMPT not #defined
+ #endif
;
return 0;
}
+
_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
+
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-
-
-cat >>confdefs.h <<\_ACEOF
-#define NPTL_GUARD_WITHIN_STACK 1
-_ACEOF
-
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
+ { { $as_echo "$as_me:$LINENO: error:
+ *** Kernel built with CONFIG_PREEMPT which is not supported.
+ *** You must rebuild your kernel without this option." >&5
+$as_echo "$as_me: error:
+ *** Kernel built with CONFIG_PREEMPT which is not supported.
+ *** You must rebuild your kernel without this option." >&2;}
+ { (exit 1); exit 1; }; }
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
- CFLAGS="$saved_CFLAGS"
- LDFLAGS="$saved_LDFLAGS"
- ;;
- all)
-# Check whether --with-linux was given.
-if test "${with_linux+set}" = set; then
- withval=$with_linux; kernelsrc="$withval"
fi
+ rm -Rf build
-# Check whether --with-linux-obj was given.
-if test "${with_linux_obj+set}" = set; then
- withval=$with_linux_obj; kernelbuild="$withval"
-fi
- { $as_echo "$as_me:$LINENO: checking kernel source directory" >&5
-$as_echo_n "checking kernel source directory... " >&6; }
- if test -z "$kernelsrc"; then
+ if test "$ZFS_META_LICENSE" = CDDL; then
- if test -e "/lib/modules/$(uname -r)/source"; then
+ { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
+$as_echo_n "checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
- headersdir="/lib/modules/$(uname -r)/source"
- sourcelink=$(readlink -f "$headersdir")
-elif test -e "/lib/modules/$(uname -r)/build"; then
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- headersdir="/lib/modules/$(uname -r)/build"
- sourcelink=$(readlink -f "$headersdir")
-else
+ #include <linux/module.h>
- sourcelink=$(ls -1d /usr/src/kernels/* \
- /usr/src/linux-* \
- 2>/dev/null | grep -v obj | tail -1)
+int
+main (void)
+{
-fi
+ #ifndef CONFIG_DEBUG_LOCK_ALLOC
+ #error CONFIG_DEBUG_LOCK_ALLOC not #defined
+ #endif
+ ;
+ return 0;
+}
- if test -n "$sourcelink" && test -e ${sourcelink}; then
+_ACEOF
- kernelsrc=`readlink -f ${sourcelink}`
-else
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
- { { $as_echo "$as_me:$LINENO: error:
- *** Please make sure the kernel devel package for your distribution
- *** is installed then try again. If that fails you can specify the
- *** location of the kernel source with the '--with-linux=PATH' option." >&5
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ { { $as_echo "$as_me:$LINENO: error:
+ *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is
+ *** incompatible with the CDDL license. You must rebuild
+ *** your kernel without this option." >&5
$as_echo "$as_me: error:
- *** Please make sure the kernel devel package for your distribution
- *** is installed then try again. If that fails you can specify the
- *** location of the kernel source with the '--with-linux=PATH' option." >&2;}
+ *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is
+ *** incompatible with the CDDL license. You must rebuild
+ *** your kernel without this option." >&2;}
{ (exit 1); exit 1; }; }
-fi
-
-
else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- if test "$kernelsrc" = "NONE"; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
- kernsrcver=NONE
-fi
fi
+ rm -Rf build
- { $as_echo "$as_me:$LINENO: result: $kernelsrc" >&5
-$as_echo "$kernelsrc" >&6; }
- { $as_echo "$as_me:$LINENO: checking kernel build directory" >&5
-$as_echo_n "checking kernel build directory... " >&6; }
- if test -z "$kernelbuild"; then
-
- if test -e "/lib/modules/$(uname -r)/build"; then
-
- kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
-elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
- kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
-elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
+fi
- kernelbuild=${kernelsrc}-obj/${target_cpu}/default
-elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
+ if test "$ZFS_META_LICENSE" = GPL; then
- kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
-else
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GPL_ONLY_SYMBOLS 1
+_ACEOF
- kernelbuild=${kernelsrc}
fi
-fi
- { $as_echo "$as_me:$LINENO: result: $kernelbuild" >&5
-$as_echo "$kernelbuild" >&6; }
+ { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5
+$as_echo_n "checking block device operation prototypes... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
- { $as_echo "$as_me:$LINENO: checking kernel source version" >&5
-$as_echo_n "checking kernel source version... " >&6; }
- utsrelease1=$kernelbuild/include/linux/version.h
- utsrelease2=$kernelbuild/include/linux/utsrelease.h
- utsrelease3=$kernelbuild/include/generated/utsrelease.h
- if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then
- utsrelease=linux/version.h
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then
- utsrelease=linux/utsrelease.h
+ #include <linux/blkdev.h>
-elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then
+int
+main (void)
+{
- utsrelease=generated/utsrelease.h
+ int (*blk_open) (struct block_device *, fmode_t) = NULL;
+ int (*blk_release) (struct gendisk *, fmode_t) = NULL;
+ int (*blk_ioctl) (struct block_device *, fmode_t,
+ unsigned, unsigned long) = NULL;
+ int (*blk_compat_ioctl) (struct block_device *, fmode_t,
+ unsigned, unsigned long) = NULL;
+ struct block_device_operations blk_ops = {
+ .open = blk_open,
+ .release = blk_release,
+ .ioctl = blk_ioctl,
+ .compat_ioctl = blk_compat_ioctl,
+ };
-fi
+ blk_ops.open(NULL, 0);
+ blk_ops.release(NULL, 0);
+ blk_ops.ioctl(NULL, 0, 0, 0);
+ blk_ops.compat_ioctl(NULL, 0, 0, 0);
+ ;
+ return 0;
+}
- if test "$utsrelease"; then
+_ACEOF
- kernsrcver=`(echo "#include <$utsrelease>";
- echo "kernsrcver=UTS_RELEASE") |
- cpp -I $kernelbuild/include |
- grep "^kernsrcver=" | cut -d \" -f 2`
- if test -z "$kernsrcver"; then
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
- { { $as_echo "$as_me:$LINENO: error: *** Cannot determine kernel version." >&5
-$as_echo "$as_me: error: *** Cannot determine kernel version." >&2;}
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me:$LINENO: result: struct block_device" >&5
+$as_echo "struct block_device" >&6; }
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1
+_ACEOF
else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
- { { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5
-$as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;}
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me:$LINENO: result: struct inode" >&5
+$as_echo "struct inode" >&6; }
-fi
- { $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5
-$as_echo "$kernsrcver" >&6; }
+fi
- LINUX=${kernelsrc}
- LINUX_OBJ=${kernelbuild}
- LINUX_VERSION=${kernsrcver}
+ rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
+ { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5
+$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- modpost=$LINUX/scripts/Makefile.modpost
- { $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5
-$as_echo_n "checking kernel file name for module symbols... " >&6; }
- if test -f "$modpost"; then
- if grep -q Modules.symvers $modpost; then
+ #include <linux/types.h>
- LINUX_SYMBOLS=Modules.symvers
+int
+main (void)
+{
-else
+ fmode_t *ptr __attribute__ ((unused));
- LINUX_SYMBOLS=Module.symvers
+ ;
+ return 0;
+}
-fi
+_ACEOF
- if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
- { { $as_echo "$as_me:$LINENO: error:
- *** Please make sure the kernel devel package for your distribution
- *** is installed. If your building with a custom kernel make sure the
- *** kernel is configured, built, and the '--with-linux=PATH' configure
- *** option refers to the location of the kernel source." >&5
-$as_echo "$as_me: error:
- *** Please make sure the kernel devel package for your distribution
- *** is installed. If your building with a custom kernel make sure the
- *** kernel is configured, built, and the '--with-linux=PATH' configure
- *** option refers to the location of the kernel source." >&2;}
- { (exit 1); exit 1; }; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FMODE_T 1
+_ACEOF
else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- LINUX_SYMBOLS=NONE
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
-fi
- { $as_echo "$as_me:$LINENO: result: $LINUX_SYMBOLS" >&5
-$as_echo "$LINUX_SYMBOLS" >&6; }
+fi
+ rm -Rf build
-# Check whether --with-spl was given.
-if test "${with_spl+set}" = set; then
- withval=$with_spl; splsrc="$withval"
-fi
+
+ { $as_echo "$as_me:$LINENO: checking whether kernel defines KOBJ_NAME_LEN" >&5
+$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-# Check whether --with-spl-obj was given.
-if test "${with_spl_obj+set}" = set; then
- withval=$with_spl_obj; splbuild="$withval"
-fi
+ #include <linux/kobject.h>
+int
+main (void)
+{
- { $as_echo "$as_me:$LINENO: checking spl source directory" >&5
-$as_echo_n "checking spl source directory... " >&6; }
- if test -z "$splsrc"; then
+ int val __attribute__ ((unused));
+ val = KOBJ_NAME_LEN;
- sourcelink=`ls -1d /usr/src/spl-*/${LINUX_VERSION} \
- 2>/dev/null | tail -1`
+ ;
+ return 0;
+}
- if test -z "$sourcelink" || test ! -e $sourcelink; then
+_ACEOF
- sourcelink=../spl
-fi
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
- if test -e $sourcelink; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KOBJ_NAME_LEN 1
+_ACEOF
- splsrc=`readlink -f ${sourcelink}`
else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
- { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
- { { $as_echo "$as_me:$LINENO: error:
- *** Please make sure the spl devel package for your distribution
- *** is installed then try again. If that fails you can specify the
- *** location of the spl source with the '--with-spl=PATH' option." >&5
-$as_echo "$as_me: error:
- *** Please make sure the spl devel package for your distribution
- *** is installed then try again. If that fails you can specify the
- *** location of the spl source with the '--with-spl=PATH' option." >&2;}
- { (exit 1); exit 1; }; }
fi
+ rm -Rf build
-else
- if test "$splsrc" = "NONE"; then
- splbuild=NONE
- splsrcver=NONE
-fi
+ { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5
+$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; }
+ grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
+ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+ rc=$?
+ if test $rc -ne 0; then
+
+ export=0
+ for file in fs/block_dev.c; do
+ grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
fi
+ done
+ if test $export -eq 0; then
- { $as_echo "$as_me:$LINENO: result: $splsrc" >&5
-$as_echo "$splsrc" >&6; }
- { $as_echo "$as_me:$LINENO: checking spl build directory" >&5
-$as_echo_n "checking spl build directory... " >&6; }
- if test -z "$splbuild"; then
-
- splbuild=${splsrc}
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
-fi
- { $as_echo "$as_me:$LINENO: result: $splbuild" >&5
-$as_echo "$splbuild" >&6; }
+else
- { $as_echo "$as_me:$LINENO: checking spl source version" >&5
-$as_echo_n "checking spl source version... " >&6; }
- if test -r $splbuild/spl_config.h &&
- fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLKDEV_GET_BY_PATH 1
+_ACEOF
- splsrcver=`(echo "#include <spl_config.h>";
- echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
- cpp -I $splbuild |
- grep "^splsrcver=" | tr -d \" | cut -d= -f2`
fi
- if test -z "$splsrcver"; then
+else
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLKDEV_GET_BY_PATH 1
+_ACEOF
- { $as_echo "$as_me:$LINENO: result: Not found" >&5
-$as_echo "Not found" >&6; }
- { { $as_echo "$as_me:$LINENO: error:
- *** Cannot determine the version of the spl source.
- *** Please prepare the spl source before running this script" >&5
-$as_echo "$as_me: error:
- *** Cannot determine the version of the spl source.
- *** Please prepare the spl source before running this script" >&2;}
- { (exit 1); exit 1; }; }
fi
- { $as_echo "$as_me:$LINENO: result: $splsrcver" >&5
-$as_echo "$splsrcver" >&6; }
- SPL=${splsrc}
- SPL_OBJ=${splbuild}
- SPL_VERSION=${splsrcver}
+ { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5
+$as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; }
+ grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
+ $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+ rc=$?
+ if test $rc -ne 0; then
+ export=0
+ for file in fs/block_dev.c; do
+ grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" "$LINUX/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
+fi
+ done
+ if test $export -eq 0; then
- { $as_echo "$as_me:$LINENO: checking spl file name for module symbols" >&5
-$as_echo_n "checking spl file name for module symbols... " >&6; }
- if test -r $SPL_OBJ/Module.symvers; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
- SPL_SYMBOLS=Module.symvers
-elif test -r $SPL_OBJ/Modules.symvers; then
+else
- SPL_SYMBOLS=Modules.symvers
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
-elif test -r $SPL_OBJ/module/Module.symvers; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPEN_BDEV_EXCLUSIVE 1
+_ACEOF
- SPL_SYMBOLS=Module.symvers
-elif test -r $SPL_OBJ/module/Modules.symvers; then
+fi
- SPL_SYMBOLS=Modules.symvers
else
- SPL_SYMBOLS=$LINUX_SYMBOLS
-
-fi
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPEN_BDEV_EXCLUSIVE 1
+_ACEOF
- { $as_echo "$as_me:$LINENO: result: $SPL_SYMBOLS" >&5
-$as_echo "$SPL_SYMBOLS" >&6; }
+fi
- { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_PREEMPT" >&5
-$as_echo_n "checking whether Linux was built with CONFIG_PREEMPT... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5
+$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/module.h>
+ #include <linux/buffer_head.h>
int
main (void)
{
- #ifndef CONFIG_PREEMPT
- #error CONFIG_PREEMPT not #defined
- #endif
+ struct block_device *bdev = NULL;
+ invalidate_bdev(bdev);
;
return 0;
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
- { { $as_echo "$as_me:$LINENO: error:
- *** Kernel built with CONFIG_PREEMPT which is not supported.
- *** You must rebuild your kernel without this option." >&5
-$as_echo "$as_me: error:
- *** Kernel built with CONFIG_PREEMPT which is not supported.
- *** You must rebuild your kernel without this option." >&2;}
- { (exit 1); exit 1; }; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_1ARG_INVALIDATE_BDEV 1
+_ACEOF
+
else
$as_echo "$as_me: failed program was:" >&5
-
fi
rm -Rf build
- if test "$ZFS_META_LICENSE" = CDDL; then
-
- { $as_echo "$as_me:$LINENO: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
-$as_echo_n "checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5
+$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/module.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- #ifndef CONFIG_DEBUG_LOCK_ALLOC
- #error CONFIG_DEBUG_LOCK_ALLOC not #defined
- #endif
+ struct block_device *bdev = NULL;
+ bdev_logical_block_size(bdev);
;
return 0;
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
- { { $as_echo "$as_me:$LINENO: error:
- *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is
- *** incompatible with the CDDL license. You must rebuild
- *** your kernel without this option." >&5
-$as_echo "$as_me: error:
- *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is
- *** incompatible with the CDDL license. You must rebuild
- *** your kernel without this option." >&2;}
- { (exit 1); exit 1; }; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1
+_ACEOF
+
else
$as_echo "$as_me: failed program was:" >&5
-
fi
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
-fi
-
-
- if test "$ZFS_META_LICENSE" = GPL; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GPL_ONLY_SYMBOLS 1
-_ACEOF
-
-
-fi
-
-
-
- { $as_echo "$as_me:$LINENO: checking block device operation prototypes" >&5
-$as_echo_n "checking block device operation prototypes... " >&6; }
- tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+ { $as_echo "$as_me:$LINENO: checking whether bio_empty_barrier() is defined" >&5
+$as_echo_n "checking whether bio_empty_barrier() is defined... " >&6; }
+ EXTRA_KCFLAGS="-Werror"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/blkdev.h>
+ #include <linux/bio.h>
int
main (void)
{
- int (*blk_open) (struct block_device *, fmode_t) = NULL;
- int (*blk_release) (struct gendisk *, fmode_t) = NULL;
- int (*blk_ioctl) (struct block_device *, fmode_t,
- unsigned, unsigned long) = NULL;
- int (*blk_compat_ioctl) (struct block_device *, fmode_t,
- unsigned, unsigned long) = NULL;
- struct block_device_operations blk_ops = {
- .open = blk_open,
- .release = blk_release,
- .ioctl = blk_ioctl,
- .compat_ioctl = blk_compat_ioctl,
- };
-
- blk_ops.open(NULL, 0);
- blk_ops.release(NULL, 0);
- blk_ops.ioctl(NULL, 0, 0, 0);
- blk_ops.compat_ioctl(NULL, 0, 0, 0);
+ struct bio bio;
+ (void)bio_empty_barrier(&bio);
;
return 0;
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: struct block_device" >&5
-$as_echo "struct block_device" >&6; }
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1
+#define HAVE_BIO_EMPTY_BARRIER 1
_ACEOF
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- { $as_echo "$as_me:$LINENO: result: struct inode" >&5
-$as_echo "struct inode" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
rm -Rf build
- EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether kernel defines fmode_t" >&5
-$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
+
+ { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST is defined" >&5
+$as_echo_n "checking whether BIO_RW_FAILFAST is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/types.h>
+ #include <linux/bio.h>
int
main (void)
{
- fmode_t *ptr __attribute__ ((unused));
+ int flags __attribute__ ((unused));
+ flags = (1 << BIO_RW_FAILFAST);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_FMODE_T 1
+#define HAVE_BIO_RW_FAILFAST 1
_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether kernel defines KOBJ_NAME_LEN" >&5
-$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
+$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/kobject.h>
+ #include <linux/bio.h>
int
main (void)
{
- int val __attribute__ ((unused));
- val = KOBJ_NAME_LEN;
+ int flags __attribute__ ((unused));
+ flags = ((1 << BIO_RW_FAILFAST_DEV) |
+ (1 << BIO_RW_FAILFAST_TRANSPORT) |
+ (1 << BIO_RW_FAILFAST_DRIVER));
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_KOBJ_NAME_LEN 1
+#define HAVE_BIO_RW_FAILFAST_DTD 1
_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether symbol blkdev_get_by_path is exported" >&5
-$as_echo_n "checking whether symbol blkdev_get_by_path is exported... " >&6; }
- grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
- $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
- rc=$?
- if test $rc -ne 0; then
-
- export=0
- for file in fs/block_dev.c; do
- grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" "$LINUX/$file" 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
-
- export=1
- break;
-
-fi
-
- done
- if test $export -eq 0; then
-
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
+ { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5
+$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLKDEV_GET_BY_PATH 1
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-fi
+ #include <linux/bio.h>
+int
+main (void)
+{
-else
+ int flags __attribute__ ((unused));
+ flags = REQ_FAILFAST_MASK;
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+ ;
+ return 0;
+}
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLKDEV_GET_BY_PATH 1
_ACEOF
-fi
-
-
-
-
- { $as_echo "$as_me:$LINENO: checking whether symbol open_bdev_exclusive is exported" >&5
-$as_echo_n "checking whether symbol open_bdev_exclusive is exported... " >&6; }
- grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
- $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
- rc=$?
- if test $rc -ne 0; then
-
- export=0
- for file in fs/block_dev.c; do
- grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" "$LINUX/$file" 2>/dev/null
- rc=$?
- if test $rc -eq 0; then
-
- export=1
- break;
-
-fi
-
- done
- if test $export -eq 0; then
-
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-
-else
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPEN_BDEV_EXCLUSIVE 1
+#define HAVE_BIO_REQ_FAILFAST_MASK 1
_ACEOF
-fi
-
-
else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OPEN_BDEV_EXCLUSIVE 1
-_ACEOF
fi
+ rm -Rf build
- { $as_echo "$as_me:$LINENO: checking whether invalidate_bdev() wants 1 arg" >&5
-$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
+
+ { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5
+$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Werror"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/buffer_head.h>
+ #include <linux/bio.h>
int
main (void)
{
- struct block_device *bdev = NULL;
- invalidate_bdev(bdev);
+ void (*wanted_end_io)(struct bio *, int) = NULL;
+ bio_end_io_t *local_end_io __attribute__ ((unused));
+
+ local_end_io = wanted_end_io;
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_1ARG_INVALIDATE_BDEV 1
+#define HAVE_2ARGS_BIO_END_IO_T 1
_ACEOF
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether bdev_logical_block_size() is available" >&5
-$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
- tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
+ { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNC is defined" >&5
+$as_echo_n "checking whether BIO_RW_SYNC is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/blkdev.h>
+ #include <linux/bio.h>
int
main (void)
{
- struct block_device *bdev = NULL;
- bdev_logical_block_size(bdev);
+ int flags __attribute__ ((unused));
+ flags = BIO_RW_SYNC;
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1
+#define HAVE_BIO_RW_SYNC 1
_ACEOF
rm -Rf build
- EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether bio_empty_barrier() is defined" >&5
-$as_echo_n "checking whether bio_empty_barrier() is defined... " >&6; }
- EXTRA_KCFLAGS="-Werror"
+ { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNCIO is defined" >&5
+$as_echo_n "checking whether BIO_RW_SYNCIO is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
main (void)
{
- struct bio bio;
- (void)bio_empty_barrier(&bio);
+ int flags __attribute__ ((unused));
+ flags = BIO_RW_SYNCIO;
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_EMPTY_BARRIER 1
+#define HAVE_BIO_RW_SYNCIO 1
_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST is defined" >&5
-$as_echo_n "checking whether BIO_RW_FAILFAST is defined... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether REQ_SYNC is defined" >&5
+$as_echo_n "checking whether REQ_SYNC is defined... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
{
int flags __attribute__ ((unused));
- flags = (1 << BIO_RW_FAILFAST);
+ flags = REQ_SYNC;
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_FAILFAST 1
+#define HAVE_REQ_SYNC 1
_ACEOF
- { $as_echo "$as_me:$LINENO: checking whether BIO_RW_FAILFAST_* are defined" >&5
-$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is available" >&5
+$as_echo_n "checking whether blk_end_request() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/bio.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- int flags __attribute__ ((unused));
- flags = ((1 << BIO_RW_FAILFAST_DEV) |
- (1 << BIO_RW_FAILFAST_TRANSPORT) |
- (1 << BIO_RW_FAILFAST_DRIVER));
+ struct request *req = NULL;
+ (void) blk_end_request(req, 0, 0);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_FAILFAST_DTD 1
+#define HAVE_BLK_END_REQUEST 1
_ACEOF
-
- { $as_echo "$as_me:$LINENO: checking whether REQ_FAILFAST_MASK is defined" >&5
-$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is GPL-only" >&5
+$as_echo_n "checking whether blk_end_request() is GPL-only... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/bio.h>
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+
+ MODULE_LICENSE("CDDL");
int
main (void)
{
- int flags __attribute__ ((unused));
- flags = REQ_FAILFAST_MASK;
+ struct request *req = NULL;
+ (void) blk_end_request(req, 0, 0);
;
return 0;
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_REQ_FAILFAST_MASK 1
+#define HAVE_BLK_END_REQUEST_GPL_ONLY 1
_ACEOF
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
fi
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether bio_end_io_t wants 2 args" >&5
-$as_echo_n "checking whether bio_end_io_t wants 2 args... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is available" >&5
+$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
- EXTRA_KCFLAGS="-Werror"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/bio.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- void (*wanted_end_io)(struct bio *, int) = NULL;
- bio_end_io_t *local_end_io __attribute__ ((unused));
-
- local_end_io = wanted_end_io;
+ struct request_queue *q = NULL;
+ (void) blk_queue_flush(q, REQ_FLUSH);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_2ARGS_BIO_END_IO_T 1
+#define HAVE_BLK_QUEUE_FLUSH 1
_ACEOF
+fi
+
+ rm -Rf build
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_flush() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+
+ MODULE_LICENSE("CDDL");
+
+int
+main (void)
+{
+
+ struct request_queue *q = NULL;
+ (void) blk_queue_flush(q, REQ_FLUSH);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+
+
+ rm -Rf build && mkdir -p build
+ echo "obj-m := conftest.o" >build/Makefile
+ if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1
+_ACEOF
+
+
+
+
fi
rm -Rf build
EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNC is defined" >&5
-$as_echo_n "checking whether BIO_RW_SYNC is defined... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_hw_sectors() is available" >&5
+$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/bio.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- int flags __attribute__ ((unused));
- flags = BIO_RW_SYNC;
+ struct request_queue *q = NULL;
+ (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_SYNC 1
+#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1
_ACEOF
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether BIO_RW_SYNCIO is defined" >&5
-$as_echo_n "checking whether BIO_RW_SYNCIO is defined... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_max_segments() is available" >&5
+$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/bio.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- int flags __attribute__ ((unused));
- flags = BIO_RW_SYNCIO;
+ struct request_queue *q = NULL;
+ (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BIO_RW_SYNCIO 1
+#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1
_ACEOF
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether REQ_SYNC is defined" >&5
-$as_echo_n "checking whether REQ_SYNC is defined... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_physical_block_size() is available" >&5
+$as_echo_n "checking whether blk_queue_physical_block_size() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/bio.h>
+ #include <linux/blkdev.h>
int
main (void)
{
- int flags __attribute__ ((unused));
- flags = REQ_SYNC;
+ struct request_queue *q = NULL;
+ unsigned short block_size = 1;
+ (void) blk_queue_physical_block_size(q, block_size);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_REQ_SYNC 1
+#define HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE 1
_ACEOF
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is available" >&5
-$as_echo_n "checking whether blk_end_request() is available... " >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_io_opt() is available" >&5
+$as_echo_n "checking whether blk_queue_io_opt() is available... " >&6; }
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
main (void)
{
- struct request *req = NULL;
- (void) blk_end_request(req, 0, 0);
+ struct request_queue *q = NULL;
+ unsigned int opt = 1;
+ (void) blk_queue_io_opt(q, opt);
;
return 0;
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_END_REQUEST 1
+#define HAVE_BLK_QUEUE_IO_OPT 1
_ACEOF
rm -Rf build
+ EXTRA_KCFLAGS="$tmp_flags"
- { $as_echo "$as_me:$LINENO: checking whether blk_end_request() is GPL-only" >&5
-$as_echo_n "checking whether blk_end_request() is GPL-only... " >&6; }
+
+ { $as_echo "$as_me:$LINENO: checking whether blk_queue_nonrot() is available" >&5
+$as_echo_n "checking whether blk_queue_nonrot() is available... " >&6; }
+ tmp_flags="$EXTRA_KCFLAGS"
+ EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
cat confdefs.h - <<_ACEOF >conftest.c
/* end confdefs.h. */
- #include <linux/module.h>
#include <linux/blkdev.h>
- MODULE_LICENSE("CDDL");
-
int
main (void)
{
- struct request *req = NULL;
- (void) blk_end_request(req, 0, 0);
+ struct request_queue *q = NULL;
+ (void) blk_queue_nonrot(q);
;
return 0;
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
-#define HAVE_BLK_END_REQUEST_GPL_ONLY 1
+#define HAVE_BLK_QUEUE_NONROT 1
_ACEOF
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
fi