lua-users home
lua-l archive

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


On Thu, May 30, 2019 at 01:59:07PM -0300, Luiz Henrique de Figueiredo wrote:
>> Also, would it be possible for "guess" on a Linux system to check
>> whether the readline headers are present, and build the
>> "linux-readline" target if found? Or is that a bad idea?
> 
> That's a can of worms and not pretty to do in a Makefile.
> But it'd be nice, yes.

maybe a little "configure" (shell) script (not autotools generated)
would help with build configuration (save its results in "config.h" and
make related flags in "conf.mk" (later sourced from the main makefile)).
default values could be provided in - say - "defconfig.h" and
"defconf.mk" then.

although i would not use readline at all to be honest.
this eases building. similar functionality is also provided by
external utilities like "rlwrap" and libtecla's "enhance".
those could be used for line editing instead. this has the advantage
that users can use the line editing library of their choice
(eg readline, editline, tecla, linenoise).