[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Building Lua 5.3 from Lua.org on FreeBSD
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 26 Jul 2017 08:24:51 -0300
> 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.