Re: [patch #8505] ac_cv_header_lua_h always set to yes

Reuben Thomas <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <CAOnWdog68a0SFdptUwZ7_=zJiE6jWNKW=1tc6f=UQ2xCrz87BA@mail.gmail.com>
On 14 December 2014 at 23:20, <[email protected]> wrote:

>
> Whatever it means, ax_lua.m4 in some cases is broken and my goal was to
> improve it.
>

Hi,

I have worked on ax_lua.m4 and on the build system of luaposix (I wrote a
lot of earlier versions of both).

If Lua distributions put their headers in subdirectory, this doesn't mean
> that
> all source packages around that use lua in their code will follow that
> convention.
>

Source packages that use Lua have to be told where to find Lua, unless they
bundle it. No problem here. (If they do not allow you to tell them where
Lua is installed, they are broken.)


> Some will even bundle lua and make things worse.
>

If you want to use ax_lua.m4 in a package which bundles Lua, you can set
LUA_INCLUDE and other documented environment variables.


> For portability, /usr/include, /usr/lib /usr/bin are to be always the
> default
> and are relevant if you don't care about revisions.
>

With Lua, one always cares about the revision.


> The issue can be illustrated with a real example: dev-lua/luaposix-5.1.28
>

That's a very out of date version (from March 2013). But maybe you're
referring to building the latest version?


> As expected, it will fail if you change AX_PROG_LUA(5.1, 5.3) to
> AX_PROG_LUA(5.2, 5.3).
>

Since you don't seem to have Lua 5.2 installed in your example, that looks
fine.


> The issue affects lua's library and interpreter as well.
>

I don't see what the issue is here, or what patching luaposix has to do
with issues in ax_lua.m4.

Having read the patch and bug report on savannah.org I am no wiser as to
why you can't simply set the documented environment variables if you have
Lua in a non-default location. I regularly build against Lua installed
under my home directory, and it works fine for me (just checked again with
git head) with a suitable LUA_INCLUDE setting. (If you're building lots of
packages, you can set these in your build environment, no need to patch the
source; Gentoo in particular has plenty of support for this sort of
setting, as I'm sure you know.)

Sorry if I'm missing something, but perhaps you could explain more simply
what is not working for you, starting with a bug report, i.e. "when trying
to build this package, using the current ax_lua.m4, on my system, I cannot
make it find my Lua libraries because…". If there is some setting that
should work but doesn't, please supply a trace of a configure run that
fails; if there is a path you need to set but cannot, please say what it is.

-- 
http://rrt.sc3d.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.