Add options to disable to build UI and engines.
authorfujiwarat <takao.fujiwara1@gmail.com>
Tue, 17 Apr 2012 01:25:58 +0000 (10:25 +0900)
committerfujiwarat <takao.fujiwara1@gmail.com>
Tue, 17 Apr 2012 01:25:58 +0000 (10:25 +0900)
TEST=Linux desktop

Review URL: https://codereview.appspot.com/6031059

Makefile.am
configure.ac

index 2b5aae2..6d6e551 100644 (file)
 
 NULL =
 
+if ENABLE_UI
 UI_DIR = ui
+endif
+
+if ENABLE_ENGINE
+ENGINE_DIR = engine
+endif
 
 if ENABLE_SETUP
 SETUP_DIR = setup
@@ -44,12 +50,12 @@ SUBDIRS = \
        util \
        conf \
        client \
-       engine \
        tools \
        data \
        m4 \
        po \
        docs \
+       $(ENGINE_DIR) \
        $(UI_DIR) \
        $(DAEMON_DIR) \
        $(PYTHON_LIB_DIRS) \
index 4c8b7f9..8498efe 100644 (file)
@@ -469,6 +469,30 @@ else
     enable_surrounding_text="no (disabled, use --enable-surrounding-text to enable)"
 fi
 
+# --disable-ui
+AC_ARG_ENABLE(ui,
+    AS_HELP_STRING([--disable-ui],
+                   [Disable ibus default user interface]),
+    [enable_ui=$enableval],
+    [enable_ui=yes]
+)
+AM_CONDITIONAL([ENABLE_UI], [test x"$enable_ui" = x"yes"])
+if test x"$enable_ui" = x"yes"; then
+    enable_ui="yes (enabled, use --disable-ui to disable)"
+fi
+
+# --disable-engine
+AC_ARG_ENABLE(engine,
+    AS_HELP_STRING([--disable-engine],
+                   [Disable ibus simple engine]),
+    [enable_engine=$enableval],
+    [enable_engine=yes]
+)
+AM_CONDITIONAL([ENABLE_ENGINE], [test x"$enable_engine" = x"yes"])
+if test x"$enable_engine" = x"yes"; then
+    enable_engine="yes (enabled, use --disable-engine to disable)"
+fi
+
 # Check iso-codes.
 PKG_CHECK_MODULES(ISOCODES, [
     iso-codes
@@ -543,6 +567,8 @@ Build options:
   IBus-1.0.gir scannerflags "$IBUS_GIR_SCANNERFLAGS"
   Build vala binding        $enable_vala
   Build document            $enable_gtk_doc
+  Build UI                  $enable_ui
+  Build engine              $enable_engine
   Enable key snooper        $enable_key_snooper
   No snooper regexes        "$NO_SNOOPER_APPS"
   Panel icon                "$IBUS_ICON_KEYBOARD"