Merge pull request #6 from maxiaojun/master
[platform/upstream/ibus.git] / configure.ac
index cc7d0e0..e48cc73 100644 (file)
 
 
 # If ibus_released is 0, append datestamp to the version number.
-m4_define([ibus_released], [0])
+m4_define([ibus_released], [1])
 
 m4_define([ibus_major_version], [1])
-m4_define([ibus_minor_version], [4])
-m4_define([ibus_micro_version], [99])
+m4_define([ibus_minor_version], [5])
+m4_define([ibus_micro_version], [1])
 m4_define([ibus_abi_current], [5])
 m4_define([ibus_abi_revision],
           [m4_eval(100 * ibus_minor_version + ibus_micro_version)])
@@ -192,21 +192,6 @@ AC_ARG_ENABLE(xim,
 )
 AM_CONDITIONAL([ENABLE_XIM], [test x"$enable_xim" = x"yes"])
 
-# --disable-vala option.
-AC_ARG_ENABLE(vala,
-    AS_HELP_STRING([--disable-vala],
-                   [Do not build ibus vala binding]),
-    [enable_vala=$enableval],
-    [enable_vala=yes]
-)
-if test x"$enable_vala" = x"yes"; then
-    AC_PATH_PROG([VAPIGEN], [vapigen], [false])
-fi
-AM_CONDITIONAL([ENABLE_VALA], [test x"$enable_vala" = x"yes"])
-if test x"$enable_vala" != x"yes"; then
-    enable_vala="no (disabled, use --enable-vala to enable)"
-fi
-
 if test x"$enable_gtk2" = x"yes" -o x"$enable_xim" = x"yes" ; then
     # check for gtk2
     PKG_CHECK_MODULES(GTK2, [
@@ -257,7 +242,7 @@ GOBJECT_INTROSPECTION_CHECK([0.6.8])
 
 IBUS_GIR_SCANNERFLAGS=
 if test x"$found_introspection" = x"yes" ; then
-    IBUS_GIR_SCANNERFLAGS="--identifier-prefix=IBus --symbol-prefix=ibus"
+    IBUS_GIR_SCANNERFLAGS="--warn-all --identifier-prefix=IBus --symbol-prefix=ibus"
     PKG_CHECK_EXISTS([gobject-introspection-1.0 >= 0.9.6],
                      [gir_symbol_prefix=yes],
                      [gir_symbol_prefix=no])
@@ -267,6 +252,9 @@ if test x"$found_introspection" = x"yes" ; then
 fi
 AC_SUBST(IBUS_GIR_SCANNERFLAGS)
 
+# Check vapigen.
+VAPIGEN_CHECK([0.16])
+
 # Check for gtk-doc.
 GTK_DOC_CHECK(1.9)
 if test x"$enable_gtk_doc" = x"no"; then
@@ -278,12 +266,12 @@ PKG_CHECK_MODULES(DBUS, [
     dbus-1
 ])
 
-# --disable-gconf option.
+# --enable-gconf option.
 AC_ARG_ENABLE(gconf,
-    AS_HELP_STRING([--disable-gconf],
-                   [Do not use GConf code]),
+    AS_HELP_STRING([--enable-gconf],
+                   [Use GConf code]),
     [enable_gconf=$enableval],
-    [enable_gconf=yes]
+    [enable_gconf=no]
 )
 AM_CONDITIONAL([ENABLE_GCONF], [test x"$enable_gconf" = x"yes"])
 
@@ -315,25 +303,25 @@ AC_ARG_ENABLE(memconf,
 AM_CONDITIONAL([ENABLE_MEMCONF], [test "x$enable_memconf" = "xyes"])
 
 AC_ARG_ENABLE(dconf,
-    AS_HELP_STRING([--enable-dconf],
-                   [Enable configure base on dconf]),
+    AS_HELP_STRING([--disable-dconf],
+                   [Disable configure base on dconf]),
     [enable_dconf=$enableval],
-    [enable_dconf=no]
+    [enable_dconf=yes]
 )
+AM_CONDITIONAL([ENABLE_DCONF], [test x"$enable_dconf" = x"yes"])
 
 if test x"$enable_dconf" = x"yes"; then
     # check dconf
     PKG_CHECK_MODULES(DCONF,
-        [dconf >= 0.7.5], ,
-        enable_dconf=no
+        [dconf >= 0.7.5],
     )
     PKG_CHECK_EXISTS([dconf >= 0.13.4],
         [AC_DEFINE(DCONF_0_13_4, TRUE, [dconf is 0.13.4 or later])],
         [])
     # check glib-compile-schemas
     GLIB_GSETTINGS
+    enable_dconf="yes (enabled, use --disable-dconf to disable)"
 fi
-AM_CONDITIONAL([ENABLE_DCONF], [test x"$enable_dconf" = x"yes"])
 
 # Check env.
 AC_PATH_PROG(ENV_IBUS_TEST, env)
@@ -359,6 +347,20 @@ AM_CONDITIONAL([ENABLE_DAEMON], [true])
 
 AM_PATH_PYTHON([2.5])
 
+PYGOBJECT_REQUIRED=3.0.0
+
+PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
+                 [enable_pygobject=yes],[enable_pygobject=no])
+
+if test "x$enable_pygobject" = "xyes"; then
+       PKG_CHECK_MODULES(PYTHON, [pygobject-3.0 >= $PYGOBJECT_REQUIRED])
+
+       pyoverridesdir=`$PYTHON -c "import gi; print(gi._overridesdir)"`
+       AC_SUBST(pyoverridesdir)
+fi
+
+AM_CONDITIONAL(ENABLE_PYGOBJECT, test x"$enable_pygobject" = "xyes")
+
 if test x"$enable_python_library" = x"yes"; then
     # Check python.
     AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
@@ -445,7 +447,7 @@ AC_DEFINE_UNQUOTED(NO_SNOOPER_APPS, "$NO_SNOOPER_APPS",
 # GNOME 3 uses the theme's icon.
 AC_ARG_WITH(panel-icon-keyboard,
     AS_HELP_STRING([--with-panel-icon-keyboard[=icon_name]],
-        [Set the default panel icon (default: "input-keyboard-symbolic")]),
+        [Set the default panel icon (default: "ibus-keyboard")]),
     [if test x"$with_panel_icon_keyboard" = x"yes" -o \
              x"$with_panel_icon_keyboard" = x; then
          with_panel_icon_keyboard="input-keyboard-symbolic"
@@ -455,7 +457,7 @@ AC_ARG_WITH(panel-icon-keyboard,
      fi
      IBUS_ICON_KEYBOARD=$with_panel_icon_keyboard
     ],
-    IBUS_ICON_KEYBOARD="input-keyboard-symbolic"
+    IBUS_ICON_KEYBOARD="ibus-keyboard"
 )
 AC_SUBST(IBUS_ICON_KEYBOARD)
 
@@ -517,7 +519,6 @@ src/ibusversion.h
 src/tests/Makefile
 bus/Makefile
 engine/Makefile
-engine/simple.xml.in
 util/Makefile
 util/IMdkit/Makefile
 data/Makefile
@@ -534,18 +535,15 @@ ibus/Makefile
 ibus/interface/Makefile
 ui/Makefile
 ui/gtk3/Makefile
-ui/gtk3/gtkpanel.xml.in
 setup/Makefile
 setup/ibus-setup
 bindings/Makefile
+bindings/pygobject/Makefile
 bindings/vala/Makefile
 conf/Makefile
 conf/gconf/Makefile
-conf/gconf/gconf.xml.in
 conf/dconf/Makefile
-conf/dconf/dconf.xml.in
 conf/memconf/Makefile
-conf/memconf/memconf.xml.in
 tools/Makefile
 ])