From 94863addaec3fabeafda9ac7df091a00416af013 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 4 Mar 2014 09:50:27 +0000 Subject: [PATCH] lua: respect configure's --prefix MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Acked-by: Dwight Engen Acked-by: Stéphane Graber --- 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 3e2db5936..47e3869c4 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 540238f92..6201adcaf 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 -- 2.47.2