Installing

Lua Units is available from a Git repository:

git clone https://git.colberg.org/peter/lua-units

Before using the module, generate matching FFI C bindings for the udunits2 library using the Lua plugin for GCC and the C declaration composer:

make

To override the default C compiler gcc, set CC:

make CC=gcc-4.7

If the udunits2 header files are not installed in a system path, set CPATH:

CPATH=/opt/udunits2/include make

To override the name of the udunits2 library, set LIBNAME:

make LIBNAME=libudunits2.so.0

The module is accompanied by a test suite:

make test

To install the module to the default Lua path:

make install