patchGNU Autoconf Archive - Patches: patch #8505, ac_cv_header_lua_h always set to...

 
 

patch #8505: ac_cv_header_lua_h always set to yes

Submitter:  None
Submitted:  Tue 05 Aug 2014 01:18:56 PM UTC
   
 
Priority:  5 - Normal Status:  Invalid
Assigned to:  tprk77 Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 12 Dec 2014 02:23:04 AM UTC, comment #4: 

Patch reverted by commit e26d2b82c.

Tim Perkins <tprk77>
Group Member
Tue 09 Dec 2014 08:52:46 PM UTC, comment #3: 

Jimmy Jazz,

First of all, my appologies for the 2 month delay. I've been slow.

I appricate your patch, but I think maybe you misunderstood the function of AX_LUA_HEADERS.

This macro was not written to search /usr/include. All Lua distributions (rightfully) put their headers in a subdirectory with a version number. Could you please tell me more about your system, specifically why it is putting lua.h in /usr/include?

Your change to the search is only neccessary because you added /usr/include to the search list, and there is no version number in the path. Really, I think you should have just set the appropriate environment variables, like LUA_INCLUDE, which are well documented.

I don't think this should have been a code change. The previous code was well tested, and sorry but I'm not convienced of the testing on this patch. In fact, it has some issues.

So I recommend a revert.

P.S. The "(cached)" is because you removed the unsets, and AC_CHECK_HEADERS is finding the cached results from the last loop iteration. I'm guessing that was a mistake.

Tim Perkins <tprk77>
Group Member
Wed 15 Oct 2014 08:33:10 AM UTC, comment #2: 

I pushed your patch in 8254277. Thank you very much for the update!

Peter Simons <simons>
Group administrator
Sat 09 Aug 2014 06:49:32 PM UTC, comment #1: 

Sorry for the late reply, I had to remember the syntax of autoconf first.

As I understand, AX_LUA_HEADERS() will search for lua.h in /usr/include
because of the <> brackets.
If lua{,lib,xlib}.h are found in /usr/include (default) AC_CHECK_HEADERS will return yes. If by any chance the version is not what we expect, the function will fail without going through the directory list.
I changed the script to make it work in my environment at least and it needs probably some improvements.

For the test,
/usr/include contains lua{,lib,xlib}.h version 5.1
/usr/include/lua5.1 contains lua{,lib,xlib}.h version 5.1
/usr/include/lua5.2 contains lua{,lib,xlib}.h version 5.2
I'm looking for version 5.2
./configure returns,

checking if LUA_VERSION is defined... yes
checking for library containing exp... -lm
checking for library containing dlopen... -ldl
checking for library containing lua_load... -llua5.2
checking whether sys/types.h defines makedev... yes
checking whether to enable assertions... yes
checking if LUA_VERSION is defined... yes
checking lua.h usability... yes
checking lua.h presence... yes
checking for lua.h... yes
checking lualib.h usability... yes
checking lualib.h presence... yes
checking for lualib.h... yes
checking lauxlib.h usability... yes
checking lauxlib.h presence... yes
checking for lauxlib.h... yes
checking luaconf.h usability... yes
checking luaconf.h presence... yes
checking for luaconf.h... yes
checking if Lua header version 5.1 matches 5.2... no
checking for lua.h... (cached) yes
checking for lualib.h... (cached) yes
checking for lauxlib.h... (cached) yes
checking for luaconf.h... (cached) yes
checking if Lua header version 5.2 matches 5.2... yes
[...]
   prefix:            /usr
   exec prefix:       ${prefix}

   localstatedir:     ${prefix}/var
   pkgconfigdir:      ${libdir}/pkgconfig
   rundir:            ${localstatedir}/run
   bindir:            ${exec_prefix}/bin
   sbindir:           ${exec_prefix}/sbin
   libdir:            ${exec_prefix}/lib
   includedir:        ${prefix}/include
   luaincludedir:     /usr/include/lua5.2
   luadir:            ${prefix}/share/lua/5.2
   luaexecdir:        ${exec_prefix}/lib/lua/5.2
   pkgluadir:         ${luadir}/mytest
   pkgluaexecdir:     ${luaexecdir}/mytest


Also the '(cached)' comment of configure still puzzles me.
Does it really read the right directory ?
Anyway CPPFLAGS has the right pathname for lua.h in confdefs.h.

What I can say, autoconf is not easy to debug ;)

Regards


(file #31882)

Anonymous
Tue 05 Aug 2014 01:18:56 PM UTC, original submission:  

ac_cv_header_lua_h has not be initialized correctly

autoconf (GNU Autoconf) 2.69

--- ax_lua.m4.ori 2014-08-05 15:04:48.034346425 +0200
+++ m4/ax_lua.m4 2014-08-05 15:07:44.089506350 +0200
@@ -425,6 +425,8 @@
   AC_CHECK_HEADERS([lua.h lualib.h lauxlib.h luaconf.h])
   CPPFLAGS=$_ax_lua_saved_cppflags
 
+  ac_cv_header_lua_h=""
+
   dnl Try some other directories if LUA_INCLUDE was not set.
   AS_IF([test "x$LUA_INCLUDE" = 'x' &&
          test "x$ac_cv_header_lua_h" != 'xyes'],

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #31882:  ax_lua.m4.diff added by None (4KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by tprk77 (Posted a comment)
  • -email is unavailable- added by simons (Posted a comment)
  • -email is unavailable- added by simons
  • -email is unavailable- added by simons
  • -email is unavailable- added by None (Submitted the item)
  •  

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-12-12 tprk77 StatusIn Progress Invalid
        Open/ClosedOpen Closed
    2014-12-09 tprk77 StatusDone In Progress
        Assigned tosimons tprk77
        Open/ClosedClosed Open
    2014-10-16 simons StatusReady For Test Done
        Open/ClosedOpen Closed
    2014-10-15 simons StatusNone Ready For Test
        Assigned toNone simons
        Carbon-Copy- Added reuben thomas <rrt@sc3d.org>
        Carbon-Copy- Added tim perkins <tprk77@gmail.com>
    2014-08-09 None Attached File- Added ax_lua.m4.diff, #31882

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code