summaryrefslogtreecommitdiff
blob: 90c1cef3ffac179a14c2b8ddd34a15c17dd67c34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From 481fe43b653b443ecfa8d4f3aa88d734d17cccd5 Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Tue, 2 Nov 2010 23:21:27 +0100
Subject: [PATCH 6/6] fix libxklavier automagic support

libxklavier support is optional, make that fact explicit.
---
 configure.ac |   28 +++++++++++++++++++---------
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 71d0247..10dbb72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,17 +129,26 @@ SIMPLE_GREETER_LIBS="$SIMPLE_GREETER_LIBS -lm"
 AC_SUBST(SIMPLE_GREETER_CFLAGS)
 AC_SUBST(SIMPLE_GREETER_LIBS)
 
-PKG_CHECK_MODULES(LIBXKLAVIER,
-        libxklavier >= $LIBXKLAVIER_REQUIRED_VERSION,
-        have_libxklavier=yes,
-        have_libxklavier=no)
-if test "x$have_libxklavier" = "xyes" ; then
-  AC_DEFINE(HAVE_LIBXKLAVIER, [], [Define if we have libxklavier])
+AC_ARG_ENABLE([libxklavier],
+	AS_HELP_STRING([--enable-libxklavier],
+		       [Enable libxklavier support @<:@default=yes@:>@]),
+	enable_libxklavier=$enableval,
+	enable_libxklavier=yes)
+have_libxklavier=no
+if test "x$enable_libxklavier" = "xyes"; then
+   PKG_CHECK_MODULES(LIBXKLAVIER,
+	  libxklavier >= $LIBXKLAVIER_REQUIRED_VERSION,
+          have_libxklavier=yes,
+          have_libxklavier=no)
+   if test "x$have_libxklavier" = "xyes" ; then
+      AC_DEFINE(HAVE_LIBXKLAVIER, [], [Define if we have libxklavier])
+   fi
+   AC_SUBST(HAVE_LIBXKLAVIER)
+   AC_SUBST(LIBXKLAVIER_CFLAGS)
+   AC_SUBST(LIBXKLAVIER_LIBS)
 fi
+
 AM_CONDITIONAL(HAVE_LIBXKLAVIER, test x$have_libxklavier = xyes)
-AC_SUBST(HAVE_LIBXKLAVIER)
-AC_SUBST(LIBXKLAVIER_CFLAGS)
-AC_SUBST(LIBXKLAVIER_LIBS)
 
 PKG_CHECK_MODULES(SIMPLE_CHOOSER,
         dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
@@ -1467,5 +1476,6 @@ echo \
         SELinux support:          ${with_selinux}
         ConsoleKit support:       ${use_console_kit}
         UPower support:           ${have_upower}
+        Libxklavier support:      ${have_libxklavier}
         Build with RBAC:          ${msg_rbac_shutdown}
 "
-- 
1.7.3.1