./configure for Lua clients?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

./configure for Lua clients?

Norman Ramsey-2
I'm preparing to distribute some code that is written primarily
in Lua but with some parts in C.  For the setup, I would
like to have a shell script that will find the correct -I, -L, and
-l options to give to cc to compile and link against the proper
version of Lua (in my case, 5.0).  Does anyone have any suggestions
about how to do this, or even possibly, any code?


Norman
Reply | Threaded
Open this post in threaded view
|

Re: ./configure for Lua clients?

Luiz Henrique de Figueiredo
> I'm preparing to distribute some code that is written primarily
> in Lua but with some parts in C.  For the setup, I would
> like to have a shell script that will find the correct -I, -L, and
> -l options to give to cc to compile and link against the proper
> version of Lua (in my case, 5.0).  Does anyone have any suggestions
> about how to do this, or even possibly, any code?

There's the pkg-config approach. Lua 5.1 includes data for pkg-config in
etc/lua.pc. It's probably simple to adapt it for Lua 5.0, if needed.
--lhf
Reply | Threaded
Open this post in threaded view
|

Re: ./configure for Lua clients?

Norman Ramsey-2
 > > I'm preparing to distribute some code that is written primarily
 > > in Lua but with some parts in C.  For the setup, I would
 > > like to have a shell script that will find the correct -I, -L, and
 > > -l options to give to cc to compile and link against the proper
 > > version of Lua (in my case, 5.0).  Does anyone have any suggestions
 > > about how to do this, or even possibly, any code?
 >
 > There's the pkg-config approach. Lua 5.1 includes data for pkg-config in
 > etc/lua.pc. It's probably simple to adapt it for Lua 5.0, if needed.

I love pkg-config, and it's definitely a partial solution.  But I will
also need something to fall back on if pkg-config happens not to be
installed on a user's machine.


Norman