~ubuntu-branches/debian/sid/ibus/sid

« back to all changes in this revision

Viewing changes to .pc/ibus-541492-xkb.patch/configure.ac

  • Committer: Package Import Robot
  • Author(s): Osamu Aoki, Aron Xu, Osamu Aoki
  • Date: 2014-08-04 22:42:19 UTC
  • mfrom: (1.5.7)
  • Revision ID: package-import@ubuntu.com-20140804224219-mjprlql1jdwi5sxm
Tags: 1.5.8-1
[ Aron Xu ]
* Allow parallel building

[ Osamu Aoki ]
* Update ibus document with Qt5 support

[ Aron Xu ]
* Imported Upstream version 1.5.8
* Remove patch for chasing HEAD, imported new upstream release
* Remove the patch for updating IBusKeymap jp, applied upstream
* Drop gtk2 version of the password patch because it's never executed
* Drop ibus-541492-xkb.patch
* Drop ibus-530711-preload-sys.patch
* Drop ibus-810211-no-switch-by-no-trigger.patch
* Drop 999-update-po.patch

[ Osamu Aoki ]
* linux-any for ibus-wayland
* Remove some symbols matching ibus-541492-xkb.patch
* Remove old patch for GTK+ 3.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# vim:set et ts=4:
2
 
#
3
 
# ibus - The Input Bus
4
 
#
5
 
# Copyright (c) 2007-2014 Peng Huang <shawn.p.huang@gmail.com>
6
 
# Copyright (c) 2007-2014 Red Hat, Inc.
7
 
#
8
 
# This library is free software; you can redistribute it and/or
9
 
# modify it under the terms of the GNU Lesser General Public
10
 
# License as published by the Free Software Foundation; either
11
 
# version 2.1 of the License, or (at your option) any later version.
12
 
#
13
 
# This library is distributed in the hope that it will be useful,
14
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
 
# Lesser General Public License for more details.
17
 
#
18
 
# You should have received a copy of the GNU Lesser General Public
19
 
# License along with this library; if not, write to the Free Software
20
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
21
 
# USA
22
 
 
23
 
 
24
 
# If ibus_released is 0, append datestamp to the version number.
25
 
m4_define([ibus_released], [1])
26
 
 
27
 
m4_define([ibus_major_version], [1])
28
 
m4_define([ibus_minor_version], [5])
29
 
m4_define([ibus_micro_version], [7])
30
 
m4_define([ibus_abi_current], [5])
31
 
m4_define([ibus_abi_revision],
32
 
          [m4_eval(100 * ibus_minor_version + ibus_micro_version)])
33
 
m4_define([ibus_abi_age], [0])
34
 
m4_define([ibus_maybe_datestamp],
35
 
    m4_esyscmd([test x]ibus_released[ != x1 && date +.%Y%m%d | tr -d '\n\r']))
36
 
m4_define([ibus_version],
37
 
    ibus_major_version.ibus_minor_version.ibus_micro_version[]ibus_maybe_datestamp)
38
 
m4_define([ibus_api_version], [ibus_major_version.0])
39
 
 
40
 
AC_PREFEQ([2.62])
41
 
AC_INIT([ibus], [ibus_version],
42
 
        [http://code.google.com/p/ibus/issues/entry],
43
 
        [ibus])
44
 
 
45
 
AC_CONFIG_HEADERS([config.h])
46
 
AC_CONFIG_MACRO_DIR([m4])
47
 
 
48
 
m4_define([ibus_abi_current_minus_age],
49
 
          [m4_eval(ibus_abi_current - ibus_abi_age)])
50
 
m4_define([ibus_binary_version],
51
 
          [ibus_major_version.ibus_abi_current_minus_age.ibus_abi_age.ibus_abi_revision])
52
 
 
53
 
# Required versions of other packages.
54
 
m4_define([glib_required_version], [2.32.0])
55
 
 
56
 
# VALA_TARGET_GLIB_VERSION is used by valac --ccode --target-glib .
57
 
# VALA_TARGET_GLIB_VERSION and glib_required_version will be different
58
 
# in the future.
59
 
VALA_TARGET_GLIB_VERSION=2.32
60
 
AC_SUBST(VALA_TARGET_GLIB_VERSION)
61
 
 
62
 
# Init automake.
63
 
AM_INIT_AUTOMAKE([1.11.1 parallel-tests])
64
 
AM_MAINTAINER_MODE([enable])
65
 
AC_GNU_SOURCE
66
 
 
67
 
# Support silent build rules. Disable
68
 
# by either passing --disable-silent-rules to configure or passing V=1
69
 
# to make
70
 
AM_SILENT_RULES([yes])
71
 
 
72
 
# Define sustituted variables:
73
 
IBUS_MAJOR_VERSION=ibus_major_version
74
 
IBUS_MINOR_VERSION=ibus_minor_version
75
 
IBUS_MICRO_VERSION=ibus_micro_version
76
 
IBUS_ABI_CURRENT=ibus_abi_current
77
 
IBUS_ABI_REVISION=ibus_abi_revision
78
 
IBUS_ABI_AGE=ibus_abi_age
79
 
IBUS_VERSION=ibus_version
80
 
IBUS_API_VERSION=ibus_api_version
81
 
IBUS_BINARY_VERSION=ibus_binary_version
82
 
AC_SUBST(IBUS_MAJOR_VERSION)
83
 
AC_SUBST(IBUS_MINOR_VERSION)
84
 
AC_SUBST(IBUS_MICRO_VERSION)
85
 
AC_SUBST(IBUS_ABI_CURRENT)
86
 
AC_SUBST(IBUS_ABI_REVISION)
87
 
AC_SUBST(IBUS_ABI_AGE)
88
 
AC_SUBST(IBUS_API_VERSION)
89
 
AC_SUBST(IBUS_VERSION)
90
 
AC_SUBST(IBUS_BINARY_VERSION)
91
 
 
92
 
# libtool versioning
93
 
#
94
 
# If LT_VERSION_INFO="lt_current:lt_revision:lt_age", libibus is
95
 
# libibus-ibus_api_version.so.(lt_current - lt_age).lt_age.lt_revision
96
 
# If the abi is changed, but it is compatible with last version,
97
 
# ibus_abi_current++, ibus_abi_age++;
98
 
# If the abi is not compatible with last version,
99
 
# ibus_abi_current++, ibus_abi_age = 0;
100
 
m4_define([lt_current], [ibus_abi_current])
101
 
m4_define([lt_revision], [ibus_abi_revision])
102
 
m4_define([lt_age], [ibus_abi_age])
103
 
LT_VERSION_INFO="lt_current:lt_revision:lt_age"
104
 
LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
105
 
AC_SUBST(LT_VERSION_INFO)
106
 
AC_SUBST(LT_CURRENT_MINUS_AGE)
107
 
 
108
 
# Define GETTEXT_* variables.
109
 
GETTEXT_PACKAGE=ibus10
110
 
AC_SUBST(GETTEXT_PACKAGE)
111
 
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
112
 
                   [The prefix for out gettext translation domains.])
113
 
GLIB_DEFINE_LOCALEDIR(GLIB_LOCALE_DIR)
114
 
GLIB_LOCALE_DIR=$localedir
115
 
AC_SUBST(GLIB_LOCALE_DIR)
116
 
 
117
 
# For dislpay date.
118
 
m4_define(ibus_datedisplay,
119
 
    m4_esyscmd(date '+%a %b %d %Y' | tr -d '\n\r'))
120
 
DATE_DISPLAY="ibus_datedisplay"
121
 
AC_SUBST(DATE_DISPLAY)
122
 
 
123
 
 
124
 
# Check for programs.
125
 
AC_PROG_CC
126
 
AM_PROG_CC_C_O
127
 
AC_PROG_CC_STDC
128
 
AM_PROG_VALAC([0.20])
129
 
AC_PROG_INSTALL
130
 
AC_PROG_MAKE_SET
131
 
 
132
 
# i18n stuff
133
 
AM_GLIB_GNU_GETTEXT
134
 
 
135
 
# Define PACKAGE_VERSION_* variables.
136
 
AM_DISABLE_STATIC
137
 
AC_ISC_POSIX
138
 
AC_HEADER_STDC
139
 
LT_INIT
140
 
IT_PROG_INTLTOOL([0.35.0])
141
 
 
142
 
# Check functions.
143
 
AC_CHECK_FUNCS(daemon)
144
 
 
145
 
# Check packages.
146
 
# Check glib2.
147
 
AM_PATH_GLIB_2_0
148
 
PKG_CHECK_MODULES(GLIB2, [
149
 
    glib-2.0 >= glib_required_version
150
 
])
151
 
PKG_CHECK_MODULES(GOBJECT2, [
152
 
    gobject-2.0 >= glib_required_version
153
 
])
154
 
PKG_CHECK_MODULES(GIO2, [
155
 
    gio-2.0 >= glib_required_version
156
 
])
157
 
PKG_CHECK_MODULES(GTHREAD2, [
158
 
    gthread-2.0 >= glib_required_version
159
 
])
160
 
 
161
 
# --disable-tests option.
162
 
AC_ARG_ENABLE(tests,
163
 
    AS_HELP_STRING([--disable-tests],
164
 
                   [Do not run tests]),
165
 
    [enable_tests=$enableval],
166
 
    [enable_tests=yes]
167
 
)
168
 
AM_CONDITIONAL([ENABLE_TESTS], [test x"$enable_tests" = x"yes"])
169
 
if test x"$enable_tests" != x"yes"; then
170
 
    enable_tests="no (disabled, use --enable-tests to enable)"
171
 
fi
172
 
 
173
 
# --disable-gtk2 option.
174
 
AC_ARG_ENABLE(gtk2,
175
 
    AS_HELP_STRING([--disable-gtk2],
176
 
                   [Do not build gtk2 im module]),
177
 
    [enable_gtk2=$enableval],
178
 
    [enable_gtk2=yes]
179
 
)
180
 
AM_CONDITIONAL([ENABLE_GTK2], [test x"$enable_gtk2" = x"yes"])
181
 
 
182
 
# --disable-gtk3 option.
183
 
AC_ARG_ENABLE(gtk3,
184
 
    AS_HELP_STRING([--disable-gtk3],
185
 
                   [Do not build gtk3 im module]),
186
 
    [enable_gtk3=$enableval],
187
 
    [enable_gtk3=yes]
188
 
)
189
 
AM_CONDITIONAL([ENABLE_GTK3], [test x"$enable_gtk3" = x"yes"])
190
 
 
191
 
# --disable-xim option.
192
 
AC_ARG_ENABLE(xim,
193
 
    AS_HELP_STRING([--disable-xim],
194
 
                   [Do not build xim server]),
195
 
    [enable_xim=$enableval],
196
 
    [enable_xim=yes]
197
 
)
198
 
AM_CONDITIONAL([ENABLE_XIM], [test x"$enable_xim" = x"yes"])
199
 
 
200
 
# --enable-wayland option.
201
 
AC_ARG_ENABLE(wayland,
202
 
    AS_HELP_STRING([--enable-wayland],
203
 
                   [Build wayland support]),
204
 
    [enable_wayland=$enableval],
205
 
    [enable_wayland=no]
206
 
)
207
 
AM_CONDITIONAL([ENABLE_WAYLAND], [test x"$enable_wayland" = x"yes"])
208
 
 
209
 
if test x"$enable_gtk2" = x"yes" -o x"$enable_xim" = x"yes" ; then
210
 
    # check for gtk2
211
 
    PKG_CHECK_MODULES(GTK2, [
212
 
        gtk+-2.0
213
 
    ])
214
 
fi
215
 
 
216
 
if test x"$enable_gtk2" = x"yes"; then
217
 
    # check for gdk2
218
 
    gtk2_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
219
 
    GTK2_IM_MODULEDIR="$libdir"/gtk-2.0/$gtk2_binary_version/immodules
220
 
 
221
 
    PKG_CHECK_MODULES(GDK2, [
222
 
        gdk-2.0
223
 
    ])
224
 
else
225
 
    enable_gtk2="no (disabled, use --enable-gtk2 to enable)"
226
 
fi
227
 
 
228
 
if test x"$enable_gtk3" = x"yes"; then
229
 
    # check for gtk3, gdk3
230
 
    PKG_CHECK_MODULES(GTK3, [
231
 
        gtk+-3.0
232
 
    ])
233
 
 
234
 
    gtk3_binary_version=`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`
235
 
    GTK3_IM_MODULEDIR="$libdir"/gtk-3.0/$gtk3_binary_version/immodules
236
 
 
237
 
    PKG_CHECK_MODULES(GDK3, [
238
 
        gdk-3.0
239
 
    ])
240
 
else
241
 
    enable_gtk3="no (disabled, use --enable-gtk3 to enable)"
242
 
fi
243
 
 
244
 
if test x"$enable_xim" = x"yes"; then
245
 
    # Check for x11
246
 
    PKG_CHECK_MODULES(X11, [
247
 
        x11
248
 
    ])
249
 
    AC_CHECK_HEADERS([X11/XKBlib.h])
250
 
else
251
 
    enable_xim="no (disabled, use --enable-xim to enable)"
252
 
fi
253
 
 
254
 
if test x"$enable_wayland" = x"yes"; then
255
 
    # Check for wayland
256
 
    PKG_CHECK_MODULES(WAYLAND, [
257
 
        wayland-client >= 1.2.0
258
 
        xkbcommon
259
 
    ])
260
 
else
261
 
    enable_wayland="no (disabled, use --enable-wayland to enable)"
262
 
fi
263
 
 
264
 
# GObject introspection
265
 
GOBJECT_INTROSPECTION_CHECK([0.6.8])
266
 
 
267
 
IBUS_GIR_SCANNERFLAGS=
268
 
if test x"$found_introspection" = x"yes" ; then
269
 
    IBUS_GIR_SCANNERFLAGS="--warn-all --identifier-prefix=IBus --symbol-prefix=ibus"
270
 
    PKG_CHECK_EXISTS([gobject-introspection-1.0 >= 0.9.6],
271
 
                     [gir_symbol_prefix=yes],
272
 
                     [gir_symbol_prefix=no])
273
 
    if test x"$gir_symbol_prefix" = x"no" ; then
274
 
        IBUS_GIR_SCANNERFLAGS="--strip-prefix=IBus"
275
 
    fi
276
 
fi
277
 
AC_SUBST(IBUS_GIR_SCANNERFLAGS)
278
 
 
279
 
# Check vapigen.
280
 
VAPIGEN_CHECK([0.16])
281
 
 
282
 
# Check for gtk-doc.
283
 
GTK_DOC_CHECK(1.9)
284
 
if test x"$enable_gtk_doc" = x"no"; then
285
 
    enable_gtk_doc="no (disabled, use --enable-gtk-doc to enable)"
286
 
fi
287
 
 
288
 
# Check for dbus.
289
 
PKG_CHECK_MODULES(DBUS, [
290
 
    dbus-1
291
 
])
292
 
 
293
 
# --enable-gconf option.
294
 
AC_ARG_ENABLE(gconf,
295
 
    AS_HELP_STRING([--enable-gconf],
296
 
                   [Use GConf code]),
297
 
    [enable_gconf=$enableval],
298
 
    [enable_gconf=no]
299
 
)
300
 
AM_CONDITIONAL([ENABLE_GCONF], [test x"$enable_gconf" = x"yes"])
301
 
 
302
 
if test x"$enable_gconf" = x"yes"; then
303
 
    # check gconf
304
 
    PKG_CHECK_MODULES(GCONF,
305
 
        [gconf-2.0 >= 2.12],
306
 
    )
307
 
 
308
 
    AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
309
 
    if test x"$GCONFTOOL" = xno; then
310
 
        AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
311
 
    fi
312
 
 
313
 
    AM_GCONF_SOURCE_2
314
 
    # GCONF_SCHEMAS_INSTALL should be set in macro AM_GCONF_SOURCE_2
315
 
else
316
 
    AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [false])
317
 
    enable_gconf="no (disabled, use --enable-gconf to enable)"
318
 
fi
319
 
 
320
 
# --enable-memconf option.
321
 
AC_ARG_ENABLE(memconf,
322
 
    AS_HELP_STRING([--enable-memconf],
323
 
                   [Enable configure base on memory]),
324
 
    [enable_memconf=$enableval],
325
 
    [enable_memconf=no]
326
 
)
327
 
AM_CONDITIONAL([ENABLE_MEMCONF], [test "x$enable_memconf" = "xyes"])
328
 
 
329
 
AC_ARG_ENABLE(dconf,
330
 
    AS_HELP_STRING([--disable-dconf],
331
 
                   [Disable configure base on dconf]),
332
 
    [enable_dconf=$enableval],
333
 
    [enable_dconf=yes]
334
 
)
335
 
AM_CONDITIONAL([ENABLE_DCONF], [test x"$enable_dconf" = x"yes"])
336
 
 
337
 
if test x"$enable_dconf" = x"yes"; then
338
 
    # check dconf
339
 
    PKG_CHECK_MODULES(DCONF,
340
 
        [dconf >= 0.7.5],
341
 
    )
342
 
    PKG_CHECK_EXISTS([dconf >= 0.13.4],
343
 
        [AC_DEFINE(DCONF_0_13_4, TRUE, [dconf is 0.13.4 or later])],
344
 
        [])
345
 
    # check glib-compile-schemas
346
 
    GLIB_GSETTINGS
347
 
    enable_dconf="yes (enabled, use --disable-dconf to disable)"
348
 
fi
349
 
 
350
 
# Check env.
351
 
AC_PATH_PROG(ENV_IBUS_TEST, env)
352
 
AC_SUBST(ENV_IBUS_TEST)
353
 
 
354
 
AC_ARG_ENABLE(python-library,
355
 
    AS_HELP_STRING([--enable-python-library],
356
 
                   [Use ibus python library]),
357
 
    [enable_python_library=$enableval],
358
 
    [enable_python_library=no]
359
 
)
360
 
 
361
 
AC_ARG_ENABLE(setup,
362
 
    AS_HELP_STRING([--disable-setup],
363
 
                   [Do not use setup ui.]),
364
 
    [enable_setup=$enableval],
365
 
    [enable_setup=yes]
366
 
)
367
 
 
368
 
AM_CONDITIONAL([ENABLE_PYTHON_LIBRARY], [test x"$enable_python_library" = x"yes"])
369
 
AM_CONDITIONAL([ENABLE_SETUP], [test x"$enable_setup" = x"yes"])
370
 
AM_CONDITIONAL([ENABLE_DAEMON], [true])
371
 
 
372
 
# Define python version
373
 
AC_ARG_WITH(python,
374
 
    AS_HELP_STRING([--with-python[=PATH]],
375
 
        [Select python2 or python3]),
376
 
    [PYTHON=$with_python], []
377
 
)
378
 
 
379
 
AM_PATH_PYTHON([2.5])
380
 
AC_PATH_PROG(PYTHON2, python2)
381
 
 
382
 
if test x"$PYTHON2" = x""; then
383
 
    PYTHON2=$PYTHON
384
 
fi
385
 
 
386
 
PYGOBJECT_REQUIRED=3.0.0
387
 
 
388
 
PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
389
 
                 [enable_pygobject=yes], [enable_pygobject=no])
390
 
 
391
 
if test "x$enable_pygobject" = "xyes"; then
392
 
    PKG_CHECK_MODULES(PYTHON, [pygobject-3.0 >= $PYGOBJECT_REQUIRED])
393
 
 
394
 
    pyoverridesdir=`$PYTHON -c "import gi; print(gi._overridesdir)"`
395
 
    AC_SUBST(pyoverridesdir)
396
 
 
397
 
    py2overridesdir=`$PYTHON2 -c "import gi; print(gi._overridesdir)"`
398
 
    AC_SUBST(py2overridesdir)
399
 
fi
400
 
 
401
 
AM_CONDITIONAL(ENABLE_PYGOBJECT, test x"$enable_pygobject" = "xyes")
402
 
 
403
 
if test x"$enable_python_library" = x"yes"; then
404
 
    # Check python.
405
 
    AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config)
406
 
    if test x"$PYTHON_CONFIG" = x""; then
407
 
        AC_PATH_PROG(PYTHON_CONFIG, python-config)
408
 
    fi
409
 
    if test x"$PYTHON_CONFIG" != x""; then
410
 
        PYTHON_CFLAGS=`$PYTHON_CONFIG --includes`
411
 
        PYTHON_LIBS=`$PYTHON_CONFIG --libs`
412
 
    else
413
 
        PYTHON_CFLAGS=`$PYTHON $srcdir/python-config.py --includes`
414
 
        PYTHON_LIBS=`$PYTHON $srcdir/python-config.py --libs`
415
 
    fi
416
 
    PYTHON_INCLUDES="$PYTHON_CFLAGS"
417
 
    AC_SUBST(PYTHON_CFLAGS)
418
 
    AC_SUBST(PYTHON_INCLUDES)
419
 
    AC_SUBST(PYTHON_LIBS)
420
 
 
421
 
    PYTHON2_PREFIX=`$PYTHON2 -c "import sys; sys.stdout.write(sys.prefix)"`
422
 
    PYTHON2_VERSION=`$PYTHON2 -c "import sys; sys.stdout.write(sys.version[[:3]])"`
423
 
    PYTHON2_LIBDIR="$PYTHON2_PREFIX/lib/python$PYTHON2_VERSION"
424
 
    python2dir="$PYTHON2_LIBDIR/site-packages"
425
 
    pkgpython2dir="$python2dir/ibus"
426
 
    AC_SUBST(pkgpython2dir)
427
 
else
428
 
    enable_python_library="no (disabled, use --enable-python-library to enable)"
429
 
fi
430
 
 
431
 
# Define gtk2 immodule dir.
432
 
AC_ARG_WITH(gtk2-im-module-dir,
433
 
    AS_HELP_STRING([--with-gtk2-im-module-dir[=DIR]],
434
 
        [Select gtk2 immodule dir]),
435
 
    GTK2_IM_MODULEDIR=$with_gtk2_im_module_dir
436
 
)
437
 
AC_SUBST(GTK2_IM_MODULEDIR)
438
 
 
439
 
# Define gtk3 immodule dir.
440
 
AC_ARG_WITH(gtk3-im-module-dir,
441
 
    AS_HELP_STRING([--with-gtk3-im-module-dir[=DIR]],
442
 
        [Select gtk3 immodule dir]),
443
 
    GTK3_IM_MODULEDIR=$with_gtk3_im_module_dir
444
 
)
445
 
AC_SUBST(GTK3_IM_MODULEDIR)
446
 
 
447
 
if test x"$enable_python" = x"yes"; then
448
 
    # Check for dbus-python.
449
 
    AC_ARG_ENABLE(dbus-python-check,
450
 
        AS_HELP_STRING([--disable-dbus-python-check],
451
 
            [Do not check dbus-python]),
452
 
        [enable_dbus_python_check=$enableval],
453
 
        [enable_dbus_python_check=yes]
454
 
    )
455
 
    PKG_CHECK_MODULES(DBUS_PYTHON,
456
 
        [dbus-python >= 0.83.0],
457
 
        [IBUS_HAS_DBUS_PYTHON=yes],
458
 
        [IBUS_HAS_DBUS_PYTHON=no]
459
 
    )
460
 
    if test x"$IBUS_HAS_DBUS_PYTHON" != x"yes"; then
461
 
        if test x"$enable_dbus_python_check" != x"no"; then
462
 
            AC_MSG_ERROR([can not find dbus-python >= 0.83.0. Please install or update dbus-python.])
463
 
        else
464
 
            AC_MSG_WARN([can not find dbus-python >= 0.83.0. It is required.])
465
 
        fi
466
 
    fi
467
 
fi
468
 
 
469
 
# Option for always disable snooper applications.
470
 
AC_ARG_ENABLE(key-snooper,
471
 
    AS_HELP_STRING([--disable-key-snooper],
472
 
        [Always disable key snooper in gtk im module]),
473
 
    [enable_key_snooper=$enableval],
474
 
    [enable_key_snooper=yes]
475
 
)
476
 
if test x"$enable_key_snooper" = x"yes"; then
477
 
    AC_DEFINE(ENABLE_SNOOPER, TRUE, [Enable key snooper])
478
 
else
479
 
    AC_DEFINE(ENABLE_SNOOPER, FALSE, [Enable key snooper])
480
 
    enable_key_snooper="no (disabled, use --enable-key-snooper to enable)"
481
 
fi
482
 
 
483
 
# Option for no snooper applications.
484
 
AC_ARG_WITH(no-snooper-apps,
485
 
    AS_HELP_STRING([--with-no-snooper-apps[=regex1,regex2]],
486
 
        [Does not enable keyboard snooper in those applications (like: .*chrome.*,firefox.*)]),
487
 
    NO_SNOOPER_APPS=$with_no_snooper_apps,
488
 
    NO_SNOOPER_APPS=[.*chrome.*,.*chromium.*,firefox.*,Do.*]
489
 
)
490
 
AC_DEFINE_UNQUOTED(NO_SNOOPER_APPS, "$NO_SNOOPER_APPS",
491
 
    [Does not enbale keyboard snooper in those applications])
492
 
 
493
 
# GNOME 3 uses the theme's icon.
494
 
AC_ARG_WITH(panel-icon-keyboard,
495
 
    AS_HELP_STRING([--with-panel-icon-keyboard[=icon_name]],
496
 
        [Set the default panel icon (default: "ibus-keyboard")]),
497
 
    [if test x"$with_panel_icon_keyboard" = x"yes" -o \
498
 
             x"$with_panel_icon_keyboard" = x; then
499
 
         with_panel_icon_keyboard="input-keyboard-symbolic"
500
 
     fi
501
 
     if test x"$with_panel_icon_keyboard" = x"legacy"; then
502
 
         with_panel_icon_keyboard="ibus-keyboard"
503
 
     fi
504
 
     IBUS_ICON_KEYBOARD=$with_panel_icon_keyboard
505
 
    ],
506
 
    IBUS_ICON_KEYBOARD="ibus-keyboard"
507
 
)
508
 
AC_SUBST(IBUS_ICON_KEYBOARD)
509
 
 
510
 
# --disable-surrounding-text option.
511
 
AC_ARG_ENABLE(surrounding-text,
512
 
    AS_HELP_STRING([--disable-surrounding-text],
513
 
        [Enable surrounding-text support]),
514
 
    [enable_surrounding_text=$enableval],
515
 
    [enable_surrounding_text=yes]
516
 
)
517
 
if test x"$enable_surrounding_text" = x"yes"; then
518
 
    AC_DEFINE(ENABLE_SURROUNDING, TRUE, [Enable surrounding-text support])
519
 
else
520
 
    enable_surrounding_text="no (disabled, use --enable-surrounding-text to enable)"
521
 
fi
522
 
 
523
 
# --disable-ui
524
 
AC_ARG_ENABLE(ui,
525
 
    AS_HELP_STRING([--disable-ui],
526
 
                   [Disable ibus default user interface]),
527
 
    [enable_ui=$enableval],
528
 
    [enable_ui=yes]
529
 
)
530
 
AM_CONDITIONAL([ENABLE_UI], [test x"$enable_ui" = x"yes"])
531
 
if test x"$enable_ui" = x"yes"; then
532
 
    enable_ui="yes (enabled, use --disable-ui to disable)"
533
 
fi
534
 
 
535
 
# --disable-engine
536
 
AC_ARG_ENABLE(engine,
537
 
    AS_HELP_STRING([--disable-engine],
538
 
                   [Disable ibus simple engine]),
539
 
    [enable_engine=$enableval],
540
 
    [enable_engine=yes]
541
 
)
542
 
AM_CONDITIONAL([ENABLE_ENGINE], [test x"$enable_engine" = x"yes"])
543
 
if test x"$enable_engine" = x"yes"; then
544
 
    enable_engine="yes (enabled, use --disable-engine to disable)"
545
 
fi
546
 
 
547
 
# --disable-libnotify
548
 
AC_ARG_ENABLE(libnotify,
549
 
    AS_HELP_STRING([--disable-libnotify],
550
 
                   [Disable to link libnotify]),
551
 
    [enable_libnotify=$enableval],
552
 
    [enable_libnotify=yes]
553
 
)
554
 
AM_CONDITIONAL([ENABLE_LIBNOTIFY], [test x"$enable_libnotify" = x"yes"])
555
 
if test x"$enable_libnotify" = x"yes"; then
556
 
    PKG_CHECK_MODULES(LIBNOTIFY, [
557
 
        libnotify >= 0.7
558
 
    ])
559
 
    enable_libnotify="yes (enabled, use --disable-libnotify to disable)"
560
 
fi
561
 
 
562
 
# Check iso-codes.
563
 
PKG_CHECK_MODULES(ISOCODES, [
564
 
    iso-codes
565
 
])
566
 
ISOCODES_PREFIX=`pkg-config iso-codes --variable=prefix`
567
 
AC_SUBST(ISOCODES_PREFIX)
568
 
 
569
 
# OUTPUT files
570
 
AC_CONFIG_FILES([ po/Makefile.in
571
 
Makefile
572
 
ibus-1.0.pc
573
 
ibus.spec
574
 
client/Makefile
575
 
client/gtk2/Makefile
576
 
client/gtk3/Makefile
577
 
client/x11/Makefile
578
 
client/wayland/Makefile
579
 
src/Makefile
580
 
src/ibusversion.h
581
 
src/tests/Makefile
582
 
bus/Makefile
583
 
engine/Makefile
584
 
util/Makefile
585
 
util/IMdkit/Makefile
586
 
data/Makefile
587
 
data/icons/Makefile
588
 
data/keymaps/Makefile
589
 
data/dconf/Makefile
590
 
docs/Makefile
591
 
docs/reference/Makefile
592
 
docs/reference/ibus/ibus-docs.sgml
593
 
docs/reference/ibus/Makefile
594
 
m4/Makefile
595
 
ibus/_config.py
596
 
ibus/Makefile
597
 
ibus/interface/Makefile
598
 
ui/Makefile
599
 
ui/gtk3/Makefile
600
 
setup/Makefile
601
 
setup/ibus-setup
602
 
bindings/Makefile
603
 
bindings/pygobject/Makefile
604
 
bindings/vala/Makefile
605
 
conf/Makefile
606
 
conf/gconf/Makefile
607
 
conf/dconf/Makefile
608
 
conf/memconf/Makefile
609
 
tools/Makefile
610
 
])
611
 
 
612
 
AC_OUTPUT
613
 
AC_MSG_RESULT([
614
 
Build options:
615
 
  Version                   $IBUS_VERSION
616
 
  Install prefix            $prefix
617
 
  Build shared libs         $enable_shared
618
 
  Build static libs         $enable_static
619
 
  CFLAGS                    $CFLAGS
620
 
  PYTHON                    $PYTHON
621
 
  PYTHON2                   $PYTHON2
622
 
  Gtk2 immodule dir         $GTK2_IM_MODULEDIR
623
 
  Gtk3 immodule dir         $GTK3_IM_MODULEDIR
624
 
  Build gtk2 immodule       $enable_gtk2
625
 
  Build gtk3 immodule       $enable_gtk3
626
 
  Build XIM agent server    $enable_xim
627
 
  Build wayland support     $enable_wayland
628
 
  Build python library      $enable_python_library
629
 
  Build gconf modules       $enable_gconf
630
 
  Build memconf modules     $enable_memconf
631
 
  Build dconf modules       $enable_dconf
632
 
  Build introspection       $found_introspection
633
 
  IBus-1.0.gir scannerflags "$IBUS_GIR_SCANNERFLAGS"
634
 
  Build vala binding        $enable_vala
635
 
  Build document            $enable_gtk_doc
636
 
  Build UI                  $enable_ui
637
 
  Build engine              $enable_engine
638
 
  Enable key snooper        $enable_key_snooper
639
 
  No snooper regexes        "$NO_SNOOPER_APPS"
640
 
  Panel icon                "$IBUS_ICON_KEYBOARD"
641
 
  Enable surrounding-text   $enable_surrounding_text
642
 
  Enable libnotify          $enable_libnotify
643
 
  Run test cases            $enable_tests
644
 
])
645