Index: libexec/flua/Makefile =================================================================== --- libexec/flua/Makefile +++ libexec/flua/Makefile @@ -24,12 +24,18 @@ CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" +.if !defined(BOOTSTRAPPING) # readline bits; these aren't needed if we're building a bootstrap flua, as we # don't expect that one to see any REPL usage. -.if !defined(BOOTSTRAPPING) CFLAGS+= -DLUA_USE_READLINE CFLAGS+= -I${SRCTOP}/lib/libedit -I${SRCTOP}/contrib/libedit LIBADD+= edit +# same for libucl +UCLSRC?= ${SRCTOP}/contrib/libucl +.PATH: ${UCLSRC}/lua +SRCS+= lua_ucl.c +CFLAGS+= -I${UCLSRC}/include -I${UCLSRC}/src -I${UCLSRC}/uthash +LIBADD+= ucl .endif .include Index: libexec/flua/linit_flua.c =================================================================== --- libexec/flua/linit_flua.c +++ libexec/flua/linit_flua.c @@ -36,6 +36,9 @@ #include "lauxlib.h" #include "lfs.h" #include "lposix.h" +#ifndef BOOTSTRAPPING +#include "lua_ucl.h" +#endif /* ** these libs are loaded by lua.c and are readily available to any Lua @@ -59,6 +62,9 @@ {"lfs", luaopen_lfs}, {"posix.sys.stat", luaopen_posix_sys_stat}, {"posix.unistd", luaopen_posix_unistd}, +#ifndef BOOTSTRAPPING + {"ucl", luaopen_ucl}, +#endif {NULL, NULL} };