[lxc-devel] [PATCH] auto-detect linux kernel release

Daniel Lezcano daniel.lezcano at free.fr
Thu May 12 21:36:25 UTC 2011


On 05/12/2011 07:04 PM, Francois-Xavier Bourlet wrote:
> Hi,
>
> To be able to have setns (the syscall) support in lxc, you need to
> have the linux kernel headers (or source).
>
> Then the lxc build configuration system try to auto-detect the syscall
> number using the linux kernel headers/sources. For that you need to
> set an environ variable to help the build system to discover the linux
> release you want use.
>
> ex:
> LINUX_KERNEL_RELEASE = `uname -r`
> export LINUX_KERNEL_RELEASE
>
> I mostly build lxc for the kernel I am running on, and so it could be
> nice to have the ./configure setting up this variable for us. But let
> the choice to customize it if needed.
>
> Here's the patch I am using for it, I don't know as much autotools so
> it could make you cry.

Ok, IOW you want to default this variable to 'uname -r'.
That looks sane for me.

Clement is it ok for you ?

Thanks

   -- Daniel


> ---
>   config/linux.m4 |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/config/linux.m4 b/config/linux.m4
> index 338f393..5c5918c 100644
> --- a/config/linux.m4
> +++ b/config/linux.m4
> @@ -1,5 +1,9 @@
>   AC_DEFUN([AC_LINUX],
>   [
> +	if test -z "$LINUX_KERNEL_RELEASE" ; then
> +		LINUX_KERNEL_RELEASE=`uname -r`
> +	fi
> +	
>   	AC_LINUX_DIR()
>   	AC_LINUX_SRCARCH()
>   ])





More information about the lxc-devel mailing list