When checking for symbol exports, try compiling.
authorEtienne Dechamps <etienne.dechamps@ovh.net>
Wed, 25 Jul 2012 21:38:58 +0000 (14:38 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 26 Jul 2012 20:42:57 +0000 (13:42 -0700)
commit705741827ab55e7d92c3eb74f332a5ddd24971b5
tree1b8ca75c3355fb84cba4fddd0c7b4852be95d763
parentfc88a6dda92a4fc00491a8afa24d144cc94063e4
When checking for symbol exports, try compiling.

This patch adds a new autoconf function: ZFS_LINUX_TRY_COMPILE_SYMBOL.
This new function does the following:

 - Call LINUX_TRY_COMPILE with the specified parameters.
 - If unsuccessful, return false.
 - If successful and we're configuring with --enable-linux-builtin,
   return true.
 - Else, call CHECK_SYMBOL_EXPORT with the specified parameters and
   return the result.

All calls to CHECK_SYMBOL_EXPORT are converted to
LINUX_TRY_COMPILE_SYMBOL so that the tests work even when configuring
for builtin on a kernel which doesn't have loadable module support, or
hasn't been built yet.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #851
13 files changed:
config/kernel-bdi-setup-and-register.m4
config/kernel-blkdev-get-by-path.m4
config/kernel-check-disk-size-change.m4
config/kernel-clear-inode.m4
config/kernel-d-make-root.m4
config/kernel-d-obtain-alias.m4
config/kernel-get-gendisk.m4
config/kernel-insert-inode-locked.m4
config/kernel-mount-nodev.m4
config/kernel-open-bdev-exclusive.m4
config/kernel-truncate-setsize.m4
config/kernel.m4
configure