diff --git a/Makefile.am b/Makefile.am index 9c7fa09ec..89366e8bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -53,6 +53,10 @@ EXTRA_DIST += awful.lua EXTRA_DIST += tabulous.lua dist_awesomelib_DATA += awful.lua dist_awesomelib_DATA += tabulous.lua +dist_awesomelib_DATA += awful.luac +dist_awesomelib_DATA += tabulous.luac +CLEANFILES += awful.luac +CLEANFILES += tabulous.luac EXTRA_DIST += awesomerc.lua.in CLEANFILES += awesomerc.lua @@ -60,6 +64,10 @@ BUILT_SOURCES += awesomerc.lua doc_DATA += awesomerc.lua etc_DATA += awesomerc.lua +SUFFIXES += .lua .luac +.lua.luac: + $(LUAC) -s -o $@ $< + awesomerc.lua: $(srcdir)/awesomerc.lua.in $(SED) -e "s|[@]iconslayoutsdir@|$(iconslayoutsdir)|;s|[@]iconsdir@|$(iconsdir)|" \ < $(srcdir)/awesomerc.lua.in > awesomerc.lua diff --git a/configure.ac b/configure.ac index e3c2c9236..cbf804db2 100644 --- a/configure.ac +++ b/configure.ac @@ -109,7 +109,11 @@ AC_DEFINE_UNQUOTED([AWESOME_COMPILE_BY], ["$aw_whoami"], [build user]) AC_ARG_VAR([LUA], [Lua interpreter]) AC_PATH_PROG([LUA], [lua], [:]) -test "x$LUA" = "x" && AC_MSG_WARN([awesome compilation requires Lua]) +test "x$LUA" = "x" && AC_MSG_WARN([awesome compilation requires lua]) + +AC_ARG_VAR([LUAC], [Lua compiler]) +AC_PATH_PROG([LUAC], [luac], [:]) +test "x$LUAC" = "x" && AC_MSG_WARN([awesome compilation requires luac]) AS_AC_EXPAND(awesomelibdir, "$datarootdir/awesome/lib") AC_DEFINE_UNQUOTED([AWESOME_LUA_LIB_PATH], "${awesomelibdir}", [awesome lib path])