[lxc-devel] [PATCH] lua: respect configure's --prefix
Dwight Engen
dwight.engen at oracle.com
Tue Mar 4 15:49:57 UTC 2014
On Tue, 4 Mar 2014 09:50:27 +0000
Natanael Copa <ncopa at alpinelinux.org> 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: Dwight Engen <dwight.engen at oracle.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
>
More information about the lxc-devel
mailing list