summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-07-08 16:33:32 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-08-08 12:45:12 +0200
commit02addb3618f026acd72ece76fc726b9473cc5940 (patch)
treed504a9c4f88f902ae5d75113fe48c2ed1935d095 /configure.ac
parent2c00f5c896bee61033b93ddb9f32d959b0b01e94 (diff)
tdf#112343 Change dependency from dbus-glib to dbus
Add check for GLib support for modules which depends on dbus and glib separately. Also fix copy-paste typo. Change-Id: Ibd33573b2f8dff9e0a7f2e0fc983d93878bb5357 Reviewed-on: https://gerrit.libreoffice.org/57157 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 9a0c2c3083e3..abbd9b8975b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10041,6 +10041,9 @@ dnl ===================================================================
ENABLE_DBUS=""
DBUS_CFLAGS=""
DBUS_LIBS=""
+DBUS_GLIB_CFLAGS=""
+DBUS_GLIB_LIBS=""
+DBUS_HAVE_GLIB=""
if test "$enable_dbus" = "no"; then
test_dbus=no
@@ -10050,11 +10053,21 @@ AC_MSG_CHECKING([whether to enable DBUS support])
if test "$test_dbus" = "yes"; then
ENABLE_DBUS="TRUE"
AC_MSG_RESULT([yes])
- PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.70)
+ PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.60)
AC_DEFINE(ENABLE_DBUS)
DBUS_CFLAGS=$(printf '%s' "$DBUS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
FilterLibs "${DBUS_LIBS}"
DBUS_LIBS="${filteredlibs}"
+
+ # Glib is needed for BluetoothServer
+ # Sets also DBUS_GLIB_CFLAGS/DBUS_GLIB_LIBS if successful.
+ PKG_CHECK_MODULES(DBUS_GLIB,[glib-2.0 >= 2.4],
+ [
+ DBUS_HAVE_GLIB="TRUE"
+ AC_DEFINE(DBUS_HAVE_GLIB,1)
+ ],
+ AC_MSG_WARN([[No Glib found, Bluetooth support will be disabled]])
+ )
else
AC_MSG_RESULT([no])
fi
@@ -10062,6 +10075,9 @@ fi
AC_SUBST(ENABLE_DBUS)
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
+AC_SUBST(DBUS_GLIB_CFLAGS)
+AC_SUBST(DBUS_GLIB_LIBS)
+AC_SUBST(DBUS_HAVE_GLIB)
AC_MSG_CHECKING([whether to enable Impress remote control])
if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
@@ -10086,7 +10102,7 @@ if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
if test "$enable_sdremote_bluetooth" != "no"; then
if test "$OS" = "LINUX"; then
- if test "$ENABLE_DBUS" = "TRUE"; then
+ if test "$ENABLE_DBUS" = "TRUE" -a "$DBUS_HAVE_GLIB" = "TRUE"; then
AC_MSG_RESULT([yes])
ENABLE_SDREMOTE_BLUETOOTH=TRUE
dnl ===================================================================