1 |
On 12/23/20 4:09 AM, Marek Szuba wrote: |
2 |
> |
3 |
> I think what you are looking for is lua_get_shared_lib() from |
4 |
> lua-utils.eclass. We have already got ebuilds in the tree which use |
5 |
> it. |
6 |
> |
7 |
|
8 |
Knowing the library name only helps if I patch the build system; that's |
9 |
what I'm getting at. The few packages where this works use CMake, and |
10 |
CMake already tries to guess[0] the name of the lua library (thanks |
11 |
Debian) and so it has a pre-defined variable to store the result. |
12 |
|
13 |
Not all build systems are going to work like that. Suppose I know that |
14 |
the name of the lua library is "lua5.2". An autotools build system is |
15 |
going to run something like, |
16 |
|
17 |
AC_SEARCH_LIBS([whatever], [lua], [lua_found="yes"]) |
18 |
|
19 |
How do I pass the name "lua5.2" to that, without hacking configure.ac |
20 |
and running autoreconf? The only option that comes to mind is to build |
21 |
the entire project with LIBS="-llua5.2", but that's not right if only |
22 |
some of the executables are supposed to be linked with lua. |
23 |
|
24 |
For contrast, if the lua library was stored in /usr/lib64/lua5.2, then I |
25 |
could just set LIBS="-L/usr/lib64/lua5.2" and let ./configure do its thing. |
26 |
|
27 |
|
28 |
[0] https://github.com/Kitware/CMake/blob/master/Modules/FindLua.cmake |