From 0bf5e528bef93ab20ab0c05ca62f5fc0032eaab4 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 1 Jul 2010 15:32:36 +0800 Subject: [PATCH] add lua extension compile flags. --- configure.ac | 16 ++++++++++++++++ lua/Makefile.am | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index eec2c3d..bea3a0f 100644 --- a/configure.ac +++ b/configure.ac @@ -157,6 +157,21 @@ AC_ARG_ENABLE(db-open-phrase, ) AM_CONDITIONAL(IBUS_BUILD_DB_OPEN_PHRASE, [test x"$enable_db_open_phrase" = x"yes" ]) +# --disable-lua-extension +AC_ARG_ENABLE(lua-extension, + AS_HELP_STRING([--disable-lua-extension], + [build lua extension]), + [ if test "$enableval" = yes; then + enable_lua_extension = no + else + enable_lua_extension = yes + fi + ], + [enable_lua_extension=yes] +) + +AM_CONDITIONAL(IBUS_BUILD_LUA_EXTENSION, [test x"$enable_lua_extension" = x"yes"]) + # OUTPUT files AC_CONFIG_FILES([ po/Makefile.in Makefile @@ -184,5 +199,6 @@ Build options: Use opencc $enable_opencc Build database android $enable_db_android Build database open-phrase $enable_db_open_phrase + Build lua extension $enable_lua_extension ]) diff --git a/lua/Makefile.am b/lua/Makefile.am index 914f4c5..c1ef9c4 100644 --- a/lua/Makefile.am +++ b/lua/Makefile.am @@ -18,14 +18,18 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +if IBUS_BUILD_LUA_EXTENSION lua_script_DATA = base.lua \ $(NULL) +endif lua_scriptdir = $(pkgdatadir) +if IBUS_BUILD_LUA_EXTENSION noinst_LTLIBRARIES = \ libpylua.la \ $(NULL) +endif libpylua_la_SOURCES = \ lua-plugin.h \ @@ -44,12 +48,14 @@ libpylua_la_LIBADD = \ @LUA_LIBS@ \ $(NULL) +if IBUS_BUILD_LUA_EXTENSION TESTS = \ + lua-ext-console \ test-lua-plugin \ $(NULL) +endif noinst_PROGRAMS = \ - lua-ext-console \ $(TESTS) \ $(NULL) -- 2.7.4