[lxc-devel] [PATCH] lua: fix logic to enable lua support in configure

Stéphane Graber stgraber at ubuntu.com
Fri Sep 6 13:15:04 UTC 2013


On Fri, Sep 06, 2013 at 09:08:45AM +0200, Natanael Copa wrote:
> When there is no --enable-lua or --with-lua-pc, Lua should not be
> enabled.
> 
> This fixes a bug introduced with 12e93188 (configure/makefile:
> Allow specify Lua pkg-config file with --with-lua-pc) that caused
> configure script to fail if lua headers was missing.
> 
> Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>

Acked-by: Stéphane Graber <stgraber at ubuntu.com>

> ---
> PS.
> 
> I wonder it it would be an idea to replace the 2 switches:
> 
>   --enable-lua
>   --with-lua-pc[=PKG]
> 
> with a single switch:
> 
>   --with-lua[=PKG]
> 
> As it works now, if you specify either --enable-lua or --with-lua-pc,
> lua will be enabled and configure will fail if Lua headers is missing.
> Even '--disable-lua --with-lua-pc' will actually enable Lua.
> 
> In any case, this patch fixes the current problem.
> 
>  configure.ac | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 0909da3..481bf06 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -182,13 +182,13 @@ AC_ARG_WITH([lua-pc],
>  		[Specify pkg-config package name for lua]
>  	)],
>  	[LUAPKGCONFIG=$with_lua_pc
> -	enable_lua=yes], [with_lua_pc=auto])
> +	enable_lua=yes])
>  
>  AM_CONDITIONAL([ENABLE_LUA],
> -	[test "x$enable_lua" = "xyes" -o "xwith_lua_pc != xno"])
> +	[test "x$enable_lua" = "xyes"])
>  
>  AM_COND_IF([ENABLE_LUA],
> -	[AS_IF([test "x$with_lua_pc" = "xauto"],
> +	[AS_IF([test "x$with_lua_pc" = "xyes"],
>  		[PKG_CHECK_MODULES([LUA], [lua],[LUAPKGCONFIG=lua],
>  			[PKG_CHECK_MODULES([LUA], [lua5.2],[LUAPKGCONFIG=lua5.2],
>  				[PKG_CHECK_MODULES([LUA], [lua5.1],
> -- 
> 1.8.4
> 
> 
> ------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel

-- 
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20130906/25ec0ff3/attachment.pgp>


More information about the lxc-devel mailing list