]> granicus.if.org Git - zfs/commitdiff
Don't use AC_LANG_SOURCE for conftest.h source
authorNed Bass <bass6@llnl.gov>
Mon, 15 Dec 2014 21:53:00 +0000 (13:53 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 7 Jan 2015 00:53:30 +0000 (16:53 -0800)
Using AC_LANG_SOURCE with some versions of autoconf is problematic if
the given source is to be written to a header file. Such versions assume
the contents are to be written to conftest.c and generate shell code to
that effect. The contents of the test program to detect support for
Linux tracepoints were consequently malformed (containing the source for
conftest.h) so the build system incorrectly disabled tracepoints
support. Fix this in ZFS_LINUX_TRY_COMPILE_HEADER by passing the header
source directly to ZFS_LINUX_COMPILE_IFELSE.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2953

config/kernel.m4

index d8784c9db9de010f931d55c51788e2d7bd46ac35..bdfb19c83bc9e374f6ac98f141a25bf82086bc72 100644 (file)
@@ -649,5 +649,5 @@ AC_DEFUN([ZFS_LINUX_TRY_COMPILE_HEADER],
        [AC_LANG_SOURCE([ZFS_LANG_PROGRAM([[$1]], [[$2]])])],
        [modules],
        [test -s build/conftest.o],
-       [$3], [$4], [AC_LANG_SOURCE([$5])])
+       [$3], [$4], [$5])
 ])