[lxc-devel] [PATCH] lua: respect configure's --prefix
Stéphane Graber
stgraber at ubuntu.com
Tue Mar 4 15:57:33 UTC 2014
On Tue, Mar 04, 2014 at 09:50:27AM +0000, Natanael Copa wrote:
> Install lua files under the confiugred --prefix rather than use the
> pkg-config's variables LUA_INSTALL_[CL]MOD.
>
> Users will likely want user --prefix while packagers will use DESTDIR.
> Set the default to $datadir/lua/$LUA_VERSION for arch independent
> lua modules and $libdir/lua/$LUA_VERSION for arch dependant .so module.
>
> This should work for most distros. If it does not, then packagers
> can still do:
>
> make install lualibdir=$(pkg-config lua --variable=INSTALL_CMOD) ...
>
> This fixes #169
>
> Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>
> ---
> configure.ac | 6 ++----
> src/lua-lxc/Makefile.am | 6 ++++--
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 3e2db59..47e3869 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -379,10 +379,8 @@ AM_COND_IF([ENABLE_LUA],
> PKG_CHECK_VAR([LUA_VERSION], [$LUAPKGCONFIG], [V],,
> [PKG_CHECK_VAR([LUA_VERSION], [$LUAPKGCONFIG], [major_version])])
> AC_MSG_RESULT([$LUA_VERSION])
> - PKG_CHECK_VAR([LUA_INSTALL_CMOD], [$LUAPKGCONFIG], [INSTALL_CMOD],,
> - [LUA_INSTALL_CMOD=$libdir/lua/$LUA_VERSION])
> - PKG_CHECK_VAR([LUA_INSTALL_LMOD], [$LUAPKGCONFIG], [INSTALL_LMOD],,
> - [LUA_INSTALL_LMOD=$datadir/lua/$LUA_VERSION])
> + AC_SUBST([LUA_LIBDIR], [$libdir/lua/$LUA_VERSION])
> + AC_SUBST([LUA_SHAREDIR], [$datadir/lua/$LUA_VERSION])
> ])
>
> # Optional bash integration
> diff --git a/src/lua-lxc/Makefile.am b/src/lua-lxc/Makefile.am
> index 540238f..6201adc 100644
> --- a/src/lua-lxc/Makefile.am
> +++ b/src/lua-lxc/Makefile.am
> @@ -1,7 +1,9 @@
> if ENABLE_LUA
>
> -luadir=$(LUA_INSTALL_LMOD)
> -sodir=$(LUA_INSTALL_CMOD)/lxc
> +luasharedir=$(LUA_SHAREDIR)
> +lualibdir=$(LUA_LIBDIR)
> +luadir=$(luasharedir)
> +sodir=$(lualibdir)/lxc
>
> lua_DATA=lxc.lua
>
> --
> 1.9.0
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/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: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140304/81dc404a/attachment.pgp>
More information about the lxc-devel
mailing list