lua-users home
lua-l archive

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


On Sat, Aug 03, 2013 at 03:54:53PM +0900, Miles Bader wrote:
> Great idea, but ... fails to find the installed Lua on Debian, where
> Lua keeps its include files in places like /usr/include/lua5.1 (it
> also supports pkg-config, so you can do "pkg-config --cflags
> lua5.1")... :]
> 
> [also, doing "luapath lua" hangs  because it invokes
> "lualatex"... even hitting ^C doesn't kill it.  >< ]
> 

Based on your feedback I've made some changes.

I've redirected stdin from /dev/null when probing a utility. This solves the
luatex hang.

I've also added a feature to chdir to a read-only directory to try to
prevent the creation of temporary files when probing, as luatex was creating
luatex.out in the working directory. By default a directory with a long
random suffix is created in TMPDIR and deleted on exit. All of these
directory features can be selectively disabled.

If the environment variable CPPFLAGS is empty, and no directories are
specified with the -I switch, then /usr/include and /usr/local/include are
added as-if specified with -I. I don't check CPPFLAGS for -I switches at
this stage because it may contain system-specific options _excluding_
/usr/include.

I may also remove the default lua* glob in favor of something more
conservative, like "lua lua5* lua-5* luajit*". Project maintainers can
choose to cast a wider net if they desire.