[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Tim Perkins
Subject: Re: [patch #8505] ac_cv_header_lua_h always set to yes
Date: Sun, 14 Dec 2014 21:58:06 -0500

On Sun, Dec 14, 2014 at 6:20 PM, <address@hidden> wrote:
Also you were faster to reverse the patch than I was able to defend my
point of view.

I know, but I tend to work in bursts. I realize that is frustrating.

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

I have to admit, I didn't really understand the original issue. The title said ac_cv_header_lua_h is always true, but I couldn't reproduce that error. Maybe it had something to do with the project you were building? I'm curious if CPPFLAGS has some includes in it, or LUA_INCLUDE has something in it?

I wrote the ax_lua.m4 macros to, over everything else, respect the user's input when they explicitly set variables like LUA_INCLUDE. The automatic best-effort searching only kicks in when those variables aren't set, and there is nothing better to do. If the user sets LUA_INCLUDE for example, the macro will only use those flags, and fail if they don't work. It doesn't try to outsmart the user.

I'm just trying to provide some background. This is based on the Autoconf mentality that any variable the user sets is considered precious. One of the problems I saw with the patch is that it was potentially writing LUA_INCLUDE, even when set by the user.


I might be looking at the wrong thing, but I'm not sure this actually uses ax_lua.m4.

# ls -l /usr/include | grep lua
lrwxrwxrwx  1 root root      29 13 août  01:01 lauxlib.h -> /usr/include/lua5.1/lauxlib.h

Ok, now I get it. The macro first attempts to find the headers using CPPFLAGS and LUA_INCLUDE. Like I mentioned before, it does this to respect the user's settings. Because the header exist (symlinked) in /usr/include, they are always found by this first check. Because the macro already found the headers, it won't search through the list of include directories. But the headers it found are the wrong version. Yeah, this is a tough one, because I can't really ignore the user's CPPFLAGS, but in your case this is screwing things up.

I think I have to stand by what I said before on the ticket, setting LUA_INCLUDE should fix this. You can set it as an environment variable, or you can put it in the command:

    ./configure LUA_INCLUDE=-I/usr/include/5.2

CPPFLAGS would work too. I'm not too familiar with Gentoo, but I have to wonder why the symlinks are necessary, if they are just causing problems. I think it would be better to get rid of them.

-- Tim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]