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>
This commit is contained in:
committed by
Thorsten Behrens
parent
2c00f5c896
commit
02addb3618
@@ -2676,7 +2676,7 @@ define gb_LinkTarget__use_cups
|
||||
|
||||
endef
|
||||
|
||||
endif # ENABLE_DBUS
|
||||
endif # ENABLE_CUPS
|
||||
|
||||
ifeq ($(ENABLE_DBUS),TRUE)
|
||||
|
||||
|
@@ -92,6 +92,9 @@ export CXXFLAGS_CXX11=@CXXFLAGS_CXX11@
|
||||
export DATADIR=@DATADIR@
|
||||
export DBUS_CFLAGS=$(gb_SPACE)@DBUS_CFLAGS@
|
||||
export DBUS_LIBS=$(gb_SPACE)@DBUS_LIBS@
|
||||
export DBUS_GLIB_CFLAGS=$(gb_SPACE)@DBUS_GLIB_CFLAGS@
|
||||
export DBUS_GLIB_LIBS=$(gb_SPACE)@DBUS_GLIB_LIBS@
|
||||
export DBUS_HAVE_GLIB=@DBUS_HAVE_GLIB@
|
||||
export DCONF_CFLAGS=@DCONF_CFLAGS@
|
||||
export DCONF_LIBS=@DCONF_LIBS@
|
||||
export DEFAULT_BRAND_IMAGES=@DEFAULT_BRAND_IMAGES@
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#define INCLUDED_CONFIG_DBUS_H
|
||||
|
||||
#define ENABLE_DBUS 0
|
||||
#define DBUS_HAVE_GLIB 0
|
||||
|
||||
#endif
|
||||
|
||||
|
20
configure.ac
20
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 ===================================================================
|
||||
|
@@ -108,6 +108,15 @@ $(eval $(call gb_Library_use_externals,sd,\
|
||||
icu_headers \
|
||||
))
|
||||
|
||||
ifneq ($(DBUS_HAVE_GLIB),)
|
||||
$(eval $(call gb_Library_add_defs,sd,\
|
||||
$(DBUS_GLIB_CFLAGS) \
|
||||
))
|
||||
$(eval $(call gb_Library_add_libs,sd,\
|
||||
$(DBUS_GLIB_LIBS) \
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(OS),WNT)
|
||||
$(eval $(call gb_Library_use_system_win32_libs,sd,\
|
||||
uuid \
|
||||
@@ -172,7 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
|
||||
sd/source/ui/accessibility/AccessibleSlideSorterView \
|
||||
sd/source/ui/accessibility/AccessibleViewForwarder \
|
||||
sd/source/ui/accessibility/SdShapeTypes \
|
||||
sd/source/ui/animations/CategoryListBox \
|
||||
sd/source/ui/animations/CategoryListBox \
|
||||
sd/source/ui/animations/CustomAnimationBox \
|
||||
sd/source/ui/animations/CustomAnimationDialog \
|
||||
sd/source/ui/animations/CustomAnimationList \
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
||||
#include <config_dbus.h>
|
||||
|
||||
#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && ENABLE_DBUS
|
||||
#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && ENABLE_DBUS && DBUS_HAVE_GLIB
|
||||
# define LINUX_BLUETOOTH
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user