lua-users home
lua-l archive

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


Paul Beckingham <paul@beckingham.net> [2010-01-10 01:01:06]:

Hi,

> configure.ac contains this:
> 	AC_CHECK_LIB(lua,lua_open)

This macro only checks for Lua library, it doesn't mean, that it will modify
CFLAGS or LDFLAGS. Definition of this macro is:

AC_CHECK_LIB (library, function, [action-if-found], [action-if-not-found],
[other-libraries])

so you don't even use [action- * -found] actions, so you don't even know if it
fails to find Lua lib.

> None of these work: $ ./configure --with-lua=/usr/local $ ./configure
> --with-lua-lib=/usr/local/lib --with-lua-include=/usr/localinclude

Yes, it doesn't work out of the box. To get this working you would need to use
AC_ARG_WITH macros.

> Can anyone suggest what I might be doing wrong or missing?  I'm not up to
> writing my own m4 macros.

You should've read docs :) You can take a look for example at my
configure.in[1] I got it working.

-- ynezz

1. http://github.com/ynezz/librs232/blob/master/configure.in