require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&lualib_h)) {
    eval 'sub lualib_h () {1;}' unless defined(&lualib_h);
    require './lua.ph';
    eval 'sub LUA_VERSUFFIX () {"_"  &LUA_VERSION_MAJOR "_"  &LUA_VERSION_MINOR;}' unless defined(&LUA_VERSUFFIX);
    eval 'sub LUA_COLIBNAME () {"coroutine";}' unless defined(&LUA_COLIBNAME);
    eval 'sub LUA_TABLIBNAME () {"table";}' unless defined(&LUA_TABLIBNAME);
    eval 'sub LUA_IOLIBNAME () {"io";}' unless defined(&LUA_IOLIBNAME);
    eval 'sub LUA_OSLIBNAME () {"os";}' unless defined(&LUA_OSLIBNAME);
    eval 'sub LUA_STRLIBNAME () {"string";}' unless defined(&LUA_STRLIBNAME);
    eval 'sub LUA_UTF8LIBNAME () {"utf8";}' unless defined(&LUA_UTF8LIBNAME);
    eval 'sub LUA_MATHLIBNAME () {"math";}' unless defined(&LUA_MATHLIBNAME);
    eval 'sub LUA_DBLIBNAME () {"debug";}' unless defined(&LUA_DBLIBNAME);
    eval 'sub LUA_LOADLIBNAME () {"package";}' unless defined(&LUA_LOADLIBNAME);
}
1;
