[Ocfs2-test-devel] [PATCH 1/4] Ocfs2-test: Add kfeature.m4 for ocfs2 to define macro OCFS2_CHECK_KERNEL.
Sunil Mushran
sunil.mushran at oracle.com
Tue Apr 14 14:23:39 PDT 2009
This is userspace. So rename it accordingly. As in, drop the K in KAPI.
Also OCFS2_CHECK_KERNEL can become OCFS2_CHECK_HEADERS.
Similarly. You could use /usr/include as the default top dir.
Also, merge patches 2,3,4 into one.
ccing Joel.
Tristan Ye wrote:
> It was ported from ocfs2-1.4.1 git src.
>
> Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
> ---
> aclocal.m4 | 1 +
> kfeature.m4 | 17 +++++++++++++++++
> 2 files changed, 18 insertions(+), 0 deletions(-)
> create mode 100644 kfeature.m4
>
> diff --git a/aclocal.m4 b/aclocal.m4
> index 4c1b940..fb56765 100644
> --- a/aclocal.m4
> +++ b/aclocal.m4
> @@ -1,3 +1,4 @@
> m4_include([pkg.m4])
> m4_include([runlog.m4])
> m4_include([python.m4])
> +m4_include([kfeature.m4])
> diff --git a/kfeature.m4 b/kfeature.m4
> new file mode 100644
> index 0000000..ebd230b
> --- /dev/null
> +++ b/kfeature.m4
> @@ -0,0 +1,17 @@
> +AC_DEFUN([OCFS2_CHECK_KERNEL],
> + [AC_MSG_CHECKING([for $1])
> + kernel_check_regexp="m4_default([$5], [\<$1(])"
> +
> + kernel_check_headers=
> + for kfile in $2; do
> + kernel_check_headers="$kernel_check_headers $6/$kfile"
> + done
> +
> + if grep "$kernel_check_regexp" $kernel_check_headers >/dev/null 2>&1 ; then
> + m4_default([$3], :)
> + AC_MSG_RESULT(yes)
> + else
> + m4_default([$4], :)
> + AC_MSG_RESULT(no)
> + fi
> +])# OCFS2_CHECK_KERNEL
>
More information about the Ocfs2-test-devel
mailing list