zfs/config
Etienne Dechamps 723aa3b0c2 When checking for symbol exports, try compiling.
This patch adds a new autoconf function: SPL_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.

The only exception are:

 - AC_GET_VMALLOC_INFO, because we don't even have a public header to
include in the test case, but that's okay considering this symbol can
be ignored just fine.

- SPL_AC_DEVICE_CREATE, which is legacy API for 2.6.18 kernels.  Since
kernels this old are no longer supported it should arguably just be
removed entirely from the build system.

Note that we're also checking for the correct prototype with an actual
call, which was not the case with CHECK_SYMBOL_EXPORT. However, for
"complicated" test cases like with multiple symbol versions (e.g.
vfs_fsync), we stick with the original behavior and only check for the
function's existence.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue zfsonlinux/zfs#851
2012-07-26 15:12:35 -07:00
..
Rules.am Support custom build directories 2010-09-05 21:49:05 -07:00
arch.am Don't build packages that haven't been selected. 2012-07-26 14:54:32 -07:00
config.awk Allow spl_config.h to be included by dependant packages (updated) 2010-03-22 14:45:33 -07:00
config.guess Move vendor check to spl-build.m4 2010-09-02 16:12:02 -07:00
config.sub Move vendor check to spl-build.m4 2010-09-02 16:12:02 -07:00
deb.am Don't build packages that haven't been selected. 2012-07-26 14:54:32 -07:00
depcomp Move vendor check to spl-build.m4 2010-09-02 16:12:02 -07:00
install-sh Move vendor check to spl-build.m4 2010-09-02 16:12:02 -07:00
ltmain.sh Refresh autogen.sh products 2010-11-30 10:36:58 -08:00
missing Move vendor check to spl-build.m4 2010-09-02 16:12:02 -07:00
rpm.am Don't build packages that haven't been selected. 2012-07-26 14:54:32 -07:00
spl-build.m4 When checking for symbol exports, try compiling. 2012-07-26 15:12:35 -07:00
spl-meta.m4 Public Release Prep 2010-05-17 15:18:00 -07:00
tgz.am Don't build packages that haven't been selected. 2012-07-26 14:54:32 -07:00