Skip to content

Commit

Permalink
Updated for ibus 1.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwarat committed May 16, 2012
1 parent 4952260 commit 05d426b
Show file tree
Hide file tree
Showing 69 changed files with 8,118 additions and 797 deletions.
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# #
# ibus-xkb - IBus XKB # ibus-xkb - IBus XKB
# #
# Copyright (C) 2011 Takao Fujiwara <takao.fujiwara1@gmail.com> # Copyright (C) 2011-2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2011 Red Hat, Inc. # Copyright (c) 2011-2012 Red Hat, Inc.
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public
Expand All @@ -20,7 +20,7 @@
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA # Boston, MA 02111-1307 USA


SUBDIRS = data ibus setup src xkb po SUBDIRS = src engine ui setup po


pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = ibus-xkb.pc pkgconfig_DATA = ibus-xkb.pc
Expand Down
174 changes: 109 additions & 65 deletions configure.ac
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# #
# ibus-xkb - IBus XKB # ibus-xkb - IBus XKB
# #
# Copyright (c) 2011 Takao Fujiwara <takao.fujiwara1@gmail.com> # Copyright (c) 2011-2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2011 Red Hat, Inc. # Copyright (c) 2011-2012 Red Hat, Inc.
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public
Expand All @@ -26,22 +26,29 @@ AC_CONFIG_HEADERS([config.h])
# if not 1, append datestamp to the version number. # if not 1, append datestamp to the version number.
m4_define([ibus_released], [0]) m4_define([ibus_released], [0])
m4_define([ibus_major_version], [1]) m4_define([ibus_major_version], [1])
m4_define([ibus_minor_version], [3]) m4_define([ibus_minor_version], [4])
m4_define([ibus_micro_version], [99]) m4_define([ibus_micro_version], [99])
m4_define([ibus_abi_current], [5])
m4_define([ibus_abi_revision],
[m4_eval(100 * ibus_minor_version + ibus_micro_version)])
m4_define([ibus_abi_age], [0])
m4_define(ibus_maybe_datestamp, m4_define(ibus_maybe_datestamp,
m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi])) m4_esyscmd([if test x]ibus_released[ != x1; then date +.%Y%m%d | tr -d '\n\r'; fi]))
m4_define([ibus_version], m4_define([ibus_xkb_version],
ibus_major_version.ibus_minor_version.ibus_micro_version[]ibus_maybe_datestamp) ibus_major_version.ibus_minor_version.ibus_micro_version[]ibus_maybe_datestamp)
# This is the X.Y used in -libus-X.Y # This is the X.Y used in -libus-X.Y
m4_define([ibus_xkb_api_version], [1.0]) m4_define([ibus_xkb_api_version], [ibus_major_version.0])

m4_define([ibus_abi_current_minus_age],
[m4_eval(ibus_abi_current - ibus_abi_age)])
m4_define([ibus_xkb_binary_version],
[ibus_major_version.ibus_abi_current_minus_age.ibus_abi_age.ibus_abi_revision])


# Required versions of other packages # Required versions of other packages
m4_define([ibus_required_version], [1.3.0]) m4_define([ibus_required_version], [1.4.99])
m4_define([glib_required_version], [2.26.0]) m4_define([glib_required_version], [2.26.0])




AC_INIT([ibus-xkb], [ibus_version], AC_INIT([ibus-xkb], [ibus_xkb_version],
[http://code.google.com/p/ibus/issues/entry], [http://code.google.com/p/ibus/issues/entry],
[ibus-xkb]) [ibus-xkb])


Expand All @@ -57,18 +64,30 @@ m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
IBUS_XKB_MAJOR_VERSION=ibus_major_version IBUS_XKB_MAJOR_VERSION=ibus_major_version
IBUS_XKB_MINOR_VERSION=ibus_minor_version IBUS_XKB_MINOR_VERSION=ibus_minor_version
IBUS_XKB_MICRO_VERSION=ibus_micro_version IBUS_XKB_MICRO_VERSION=ibus_micro_version
IBUS_XKB_ABI_CURRENT=ibus_abi_current
IBUS_XKB_ABI_REVISION=ibus_abi_revision
IBUS_XKB_ABI_AGE=ibus_abi_age
IBUS_XKB_VERSION=ibus_xkb_version
IBUS_XKB_API_VERSION=ibus_xkb_api_version IBUS_XKB_API_VERSION=ibus_xkb_api_version
IBUS_XKB_BINARY_VERSION=ibus_xkb_binary_version

AC_SUBST(IBUS_XKB_MAJOR_VERSION) AC_SUBST(IBUS_XKB_MAJOR_VERSION)
AC_SUBST(IBUS_XKB_MINOR_VERSION) AC_SUBST(IBUS_XKB_MINOR_VERSION)
AC_SUBST(IBUS_XKB_MICRO_VERSION) AC_SUBST(IBUS_XKB_MICRO_VERSION)
AC_SUBST(IBUS_XKB_ABI_CURRENT)
AC_SUBST(IBUS_XKB_ABI_REVISION)
AC_SUBST(IBUS_XKB_ABI_AGE)
AC_SUBST(IBUS_XKB_VERSION)
AC_SUBST(IBUS_XKB_API_VERSION) AC_SUBST(IBUS_XKB_API_VERSION)
AC_SUBST(IBUS_XKB_BINARY_VERSION)


# Check for programs # Check for programs
AC_PROG_CC AC_PROG_CC
AM_PROG_CC_C_O AM_PROG_CC_C_O
AC_PROG_CC_STDC AC_PROG_CC_STDC
AM_PROG_VALAC([0.14])
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_CXX AC_PROG_MAKE_SET


# define PACKAGE_VERSION_* variables # define PACKAGE_VERSION_* variables
AM_DISABLE_STATIC AM_DISABLE_STATIC
Expand All @@ -83,12 +102,17 @@ m4_define(ibus_datedisplay,
DATE_DISPLAY="ibus_datedisplay" DATE_DISPLAY="ibus_datedisplay"
AC_SUBST(DATE_DISPLAY) AC_SUBST(DATE_DISPLAY)


# If only source code changed, lt_revision + 1 # libtool versioning
# If any interface added, lt_age + 1 #
# If any interfaces changed or removed, lt_current + 1, lt_revision = 0, lt_age = 0 # If LT_VERSION_INFO="lt_current:lt_revision:lt_age", libibus is
m4_define([lt_current], [0]) # libibus-ibus_api_version.so.(lt_current - lt_age).lt_age.lt_revision
m4_define([lt_revision], [0]) # If the abi is changed, but it is compatible with last version,
m4_define([lt_age], [0]) # ibus_abi_current++, ibus_abi_age++;
# If the abi is not compatible with last version,
# ibus_abi_current++, ibus_abi_age = 0;
m4_define([lt_current], [ibus_abi_current])
m4_define([lt_revision], [ibus_abi_revision])
m4_define([lt_age], [ibus_abi_age])
LT_VERSION_INFO="lt_current:lt_revision:lt_age" LT_VERSION_INFO="lt_current:lt_revision:lt_age"
AC_SUBST(LT_VERSION_INFO) AC_SUBST(LT_VERSION_INFO)


Expand All @@ -97,14 +121,45 @@ PKG_CHECK_MODULES(IBUS, [
ibus-1.0 >= ibus_required_version ibus-1.0 >= ibus_required_version
]) ])


# check glib2 # Check glib2
AM_PATH_GLIB_2_0 AM_PATH_GLIB_2_0
PKG_CHECK_MODULES(GLIB2, [ PKG_CHECK_MODULES(GLIB2, [
glib-2.0 >= glib_required_version glib-2.0 >= glib_required_version
]) ])
PKG_CHECK_MODULES(GOBJECT2, [ PKG_CHECK_MODULES(GOBJECT2, [
gobject-2.0 >= glib_required_version gobject-2.0 >= glib_required_version
]) ])
PKG_CHECK_MODULES(GIO2, [
gio-2.0 >= glib_required_version
])
PKG_CHECK_MODULES(GTHREAD2, [
gthread-2.0 >= glib_required_version
])

# --disable-gtk3 option.
AC_ARG_ENABLE(gtk3,
AS_HELP_STRING([--disable-gtk3],
[Do not build gtk3 im module]),
[enable_gtk3=$enableval],
[enable_gtk3=yes]
)
AM_CONDITIONAL([ENABLE_GTK3], [test x"$enable_gtk3" = x"yes"])

if test x"$enable_gtk3" = x"yes"; then
# check for gtk3, gdk3
PKG_CHECK_MODULES(GTK3, [
gtk+-3.0
])

PKG_CHECK_MODULES(GDK3, [
gdk-3.0
])
else
enable_gtk3="no (disabled, use --enable-gtk3 to enable)"
fi

# For source compatibility with ibus patch.
AM_CONDITIONAL([ENABLE_XKB], [1])


# Check for x11 # Check for x11
PKG_CHECK_MODULES(X11, [ PKG_CHECK_MODULES(X11, [
Expand All @@ -117,7 +172,35 @@ PKG_CHECK_MODULES(XKB,
[XKB_LIBS="-lxkbfile"] [XKB_LIBS="-lxkbfile"]
) )


# define XKB rules file # For source compatibility with ibus patch.
AC_DEFINE(HAVE_XKB, 1, [define to 1 if you have xkbfile])
HAVE_IBUS_XKB=true
AC_SUBST(HAVE_IBUS_XKB)

# --enable-libgnomekbd option.
AC_ARG_ENABLE(libgnomekbd,
AS_HELP_STRING([--enable-libgnomekbd],
[Use libgnomekbd to handle the keymaps]),
[enable_libgnomekbd=$enableval],
[enable_libgnomekbd=no]
)
AM_CONDITIONAL([ENABLE_LIBGNOMEKBD], [test x"$enable_libgnomekbd" = x"yes"])
if test x"$enable_libgnomekbd" = x"yes"; then
# check for libgnomekbd
PKG_CHECK_MODULES(LIBGNOMEKBDUI, [
libgnomekbdui
])
PKG_CHECK_MODULES(ATK, [
atk
])
HAVE_IBUS_GKBD=true
else
enable_libgnomekbd="no (disabled, use --enable-libgnomekbd to enable)"
HAVE_IBUS_GKBD=false
fi
AC_SUBST(HAVE_IBUS_GKBD)

# Define XKB rules file
AC_ARG_WITH(xkb-rules-xml, AC_ARG_WITH(xkb-rules-xml,
AS_HELP_STRING([--with-xkb-rules-xml[=$DIR/evdev.xml]], AS_HELP_STRING([--with-xkb-rules-xml[=$DIR/evdev.xml]],
[Set evdev.xml file path (default: /usr/share/X11/xkb/rules/evdev.xml)]), [Set evdev.xml file path (default: /usr/share/X11/xkb/rules/evdev.xml)]),
Expand Down Expand Up @@ -228,45 +311,6 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT AM_GLIB_GNU_GETTEXT




# option for setup gui
AC_ARG_ENABLE(setup-gui,
AS_HELP_STRING([--enable-setup-gui],
[Enable Setup GUI]),
[enable_setup_gui=$enableval],
[enable_setup_gui=yes]
)

if test x"$enable_setup_gui" = x"yes"; then
AC_DEFINE(ENABLE_SETUP_GUI, 1, [Define to 1 if you enable Setup GUI.])
else
enable_setup_gui="no (disabled, use --enable-setup-gui to enable)"
fi

# option for bridge hotkey
AC_ARG_ENABLE(bridge-hotkey,
AS_HELP_STRING([--enable-bridge-hotkey],
[Enable bridge hotkey instead of ON/OFF hotkey]),
[enable_bridge_hotkey=$enableval],
[enable_bridge_hotkey=no]
)

if test x"$enable_bridge_hotkey" = x"yes"; then
USE_BRIDGE_HOTKEY=1
else
USE_BRIDGE_HOTKEY=0
enable_bridge_hotkey="no (disabled, use --enable-bridge-hotkey to enable)"
fi
AC_SUBST(USE_BRIDGE_HOTKEY)

# define default bridge engine name
AC_ARG_WITH(bridge-engine,
AS_HELP_STRING([--with-bridge-engine[=bridge_engine_name]],
[Set bridge engine name in IM bridge hotkey. (default: xkb:layout:default:)]),
[DEFAULT_BRIDGE_ENGINE_NAME=$with_bridge_engine],
[DEFAULT_BRIDGE_ENGINE_NAME="xkb:layout:default:"]
)
AC_SUBST(DEFAULT_BRIDGE_ENGINE_NAME)

# check iso-codes # check iso-codes
PKG_CHECK_MODULES(ISOCODES, [ PKG_CHECK_MODULES(ISOCODES, [
iso-codes iso-codes
Expand All @@ -279,25 +323,25 @@ AC_CONFIG_FILES([ po/Makefile.in
Makefile Makefile
ibus-xkb.pc ibus-xkb.pc
ibus-xkb.spec ibus-xkb.spec
data/Makefile engine/Makefile
ibus/Makefile engine/xkb.xml.in
ibus/_config.py
src/Makefile
setup/Makefile setup/Makefile
setup/ibus-setup-xkb setup/ibus-setup-xkb
xkb/Makefile src/Makefile
ui/Makefile
ui/gtk3/Makefile
ui/gtk3/gtkxkbpanel.xml.in
]) ])


AC_OUTPUT AC_OUTPUT
AC_MSG_RESULT([ AC_MSG_RESULT([
Build options: Build options:
Version $VERSION Version $IBUS_XKB_VERSION
Install prefix $prefix Install prefix $prefix
Build ui gtk3 $enable_gtk3
Build gconf modules $enable_gconf Build gconf modules $enable_gconf
Build python modules $enable_python Build python modules $enable_python
Build introspection $found_introspection Build introspection $found_introspection
IBus-1.0.gir scannerflags "$IBUS_GIR_SCANNERFLAGS" IBus-1.0.gir scannerflags "$IBUS_GIR_SCANNERFLAGS"
Enable Setup GUI $enable_setup_gui Build libgnomebkd $enable_libgnomekbd
Enable bridge hotkey $enable_bridge_hotkey
Default bridge engine $DEFAULT_BRIDGE_ENGINE_NAME
]) ])
4 changes: 2 additions & 2 deletions data/Makefile.am
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# #
# ibus-xkb - IBus XKB # ibus-xkb - IBus XKB
# #
# Copyright (c) 2011 Takao Fujiwara <takao.fujiwara1@gmail.com> # Copyright (c) 2011-2012 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2011 Peng Huang <shawn.p.huang@gmail.com> # Copyright (c) 2011 Peng Huang <shawn.p.huang@gmail.com>
# Copyright (c) 2011 Red Hat, Inc. # Copyright (c) 2011-2012 Red Hat, Inc.
# #
# This library is free software; you can redistribute it and/or # This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public # modify it under the terms of the GNU Lesser General Public
Expand Down
Loading

0 comments on commit 05d426b

Please sign in to comment.