[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-zile] Checking for Lua libraries
From: |
Reuben Thomas |
Subject: |
[Bug-zile] Checking for Lua libraries |
Date: |
Sun, 18 Sep 2011 22:16:33 +0100 |
Having just written, but not yet tested, an autoconf macro to check
for Lua libraries, I realised that this is silly: Lua programs should
be checking their libraries at load time. (It's not expensive, just a
string compare in an assert.) However, for convenience, it is not
unreasonable to put these checks in a separate file which can also be
called conveniently by the configure script. How about that? In Lua it
looks something like:
require "foo"
assert (some_predicate (foo.version))
...
which is also a lot easier than trying to code even some particular
test (e.g. "is a version in a particular range) in m4.
Having the separate file also makes it easy for distro packagers to
find the package's dependencies, but I think there's no harm in always
running the asserts, because they are (for any conceivably reasonable
check) so cheap.
OK?
--
http://rrt.sc3d.org
- [Bug-zile] Checking for Lua libraries,
Reuben Thomas <=