lua-users home
lua-l archive

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


On Wed, Jul 26, 2017 at 4:24 AM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> My make skills are weak and there may be a sexier way to do this, but
>> the link below is the minimum change required to build Lua on FreeBSD.
>> I threw in LUA_USE_POSIX and it didn't visibly change the build (tee
>> hee, that's funny).
>>
>> http://termbin.com/geo9
>
> I'd just use SYSCFLAGS and SYSCFLAGS. And you need to use LUA_USE_LINUX
> if you want dynamic libraries and LUA_USE_READLINE if you want readline
> support:
>
> freebsd:
>         $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -I/usr/local/include" SYSLIBS="-L/usr/local/lib -Wl,-E -lreadline" CC=cc
>
> The question remains whether you need to add "-ldl" to SYSLIBS. The bsd
> target does not include "-ldl" and so I guess the same applies to freebsd.
>
> Note that LUA_USE_LINUX only does this in luaconf.h:
>
> #if defined(LUA_USE_LINUX)
> #define LUA_USE_POSIX
> #define LUA_USE_DLOPEN          /* needs an extra library: -ldl */
> #define LUA_USE_READLINE        /* needs some extra libraries */
> #endif
>
> There is nothing really specific about Linux here.
>

I know this is nit picking but I have to say it: Both LUA_USE_LINUX
and LUA_USE_MACOSX use the same defines but get named separately. Is
there a reason there is no LUA_USE_FREEBSD? Or, more logically in my
mind: Should these be collapsed and redefined as
LUA_USE_DLOPEN_READLINE?

Russ