add --with-system-bluez and alöllow disabling of sdremote

Change-Id: I1b0dbc8e8efa7535bdc699e343e31594af00d553
This commit is contained in:
Rene Engelhard
2012-09-18 16:21:45 +02:00
parent 8c5cd96235
commit 85dbc81298
6 changed files with 63 additions and 16 deletions
+3 -1
View File
@@ -36,7 +36,9 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
basic \
bean \
binaryurp \
bluez_bluetooth \
$(if $(filter BLUEZ,$(BUILD_TYPE)),\
bluez_bluetooth \
) \
canvas \
chart2 \
configmgr \
+1
View File
@@ -152,6 +152,7 @@ export ENABLE_PRESENTER_SCREEN=@ENABLE_PRESENTER_SCREEN@
export ENABLE_QUICKSTART_LIBPNG=@ENABLE_QUICKSTART_LIBPNG@
export ENABLE_RANDR=@ENABLE_RANDR@
export ENABLE_RELEASE_BUILD=@ENABLE_RELEASE_BUILD@
export ENABLE_SDREMOTE=@ENABLE_SDREMOTE@
export ENABLE_REPORTBUILDER=@ENABLE_REPORTBUILDER@
export ENABLE_SCRIPTING_BEANSHELL=@ENABLE_SCRIPTING_BEANSHELL@
export ENABLE_SCRIPTING_JAVASCRIPT=@ENABLE_SCRIPTING_JAVASCRIPT@
+39
View File
@@ -863,6 +863,12 @@ AC_ARG_ENABLE(packagekit,
Right now that is auto font install])
,)
AC_ARG_ENABLE(sdremote,
AS_HELP_STRING([--disable-sdremote],
[Determines whether to enable Impress remote control.
Uses dbus and bluetooth (bluez(.])
,enable_sdremote=yes)
AC_ARG_ENABLE(gconf,
AS_HELP_STRING([--disable-gconf],
[Determines whether to use the GConf support.]),
@@ -1576,6 +1582,11 @@ AC_ARG_WITH(system-sane,
[Use sane.h already on system.]),,
[with_system_sane="$with_system_headers"])
AC_ARG_WITH(system-bluez,
AS_HELP_STRING([--with-system-bluez],
[Use bluetooth.h already on system.]),,
[with_system_bluez="$with_system_headers"])
AC_ARG_WITH(system-xextensions-headers,
AS_HELP_STRING([--with-system-xextensions-headers],
[To build without system X11 extensions headers, use
@@ -9317,6 +9328,34 @@ else
fi
AC_SUBST(ENABLE_PACKAGEKIT)
AC_MSG_CHECKING([whether to enable sd remotecontrol])
if test "$ENABLE_DBUS" = "TRUE"; then
if test -n "$enable_sdremote"; then
AC_MSG_RESULT([yes])
ENABLE_SDREMOTE=YES
if test "$OS" = "LINUX"; then
dnl ===================================================================
dnl Check for system bluez
dnl ===================================================================
AC_MSG_CHECKING([which bluetooth header to use])
if test "$with_system_bluez" = "yes"; then
AC_MSG_RESULT([external])
AC_CHECK_HEADER(bluetooth/bluetooth.h, [],
[AC_MSG_ERROR(bluetooth.h not found. install bluez)], [])
else
AC_MSG_RESULT([internal])
BUILD_TYPE="$BUILD_TYPE BLUEZ"
fi
fi
else
ENABLE_SDREMOTE=NO
AC_MSG_RESULT([no])
fi
else
AC_MSG_RESULT([no, dbus disabled.])
fi
AC_SUBST(ENABLE_SDREMOTE)
dnl ===================================================================
dnl Check whether the gtk 2.0 libraries are available.
dnl ===================================================================
+14 -9
View File
@@ -329,15 +329,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/presenter/PresenterPreviewCache \
sd/source/ui/presenter/PresenterTextView \
sd/source/ui/presenter/SlideRenderer \
sd/source/ui/remotecontrol/BluetoothServer \
sd/source/ui/remotecontrol/BufferedStreamSocket \
sd/source/ui/remotecontrol/Communicator \
sd/source/ui/remotecontrol/DiscoveryService \
sd/source/ui/remotecontrol/ImagePreparer \
sd/source/ui/remotecontrol/Server \
sd/source/ui/remotecontrol/Receiver \
sd/source/ui/remotecontrol/Listener \
sd/source/ui/remotecontrol/Transmitter \
sd/source/ui/slideshow/PaneHider \
sd/source/ui/slideshow/SlideShowRestarter \
sd/source/ui/slideshow/showwin \
@@ -522,6 +513,20 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/view/zoomlist \
))
ifeq ($(ENABLE_SDREMOTE),YES)
$(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/remotecontrol/BluetoothServer \
sd/source/ui/remotecontrol/BufferedStreamSocket \
sd/source/ui/remotecontrol/Communicator \
sd/source/ui/remotecontrol/DiscoveryService \
sd/source/ui/remotecontrol/ImagePreparer \
sd/source/ui/remotecontrol/Server \
sd/source/ui/remotecontrol/Receiver \
sd/source/ui/remotecontrol/Listener \
sd/source/ui/remotecontrol/Transmitter \
))
endif
ifeq ($(strip $(GUI)),WNT)
$(eval $(call gb_Library_add_cxxobjects,sd,\
sd/source/ui/app/optsitem \
+1 -1
View File
@@ -1,3 +1,3 @@
sd sd : filter TRANSLATIONS:translations animations configmgr svx sfx2 stoc canvas embeddedobj LIBXSLT:libxslt oox ure test xmloff fileaccess unoxml dbaccess NULL
sd sd : filter TRANSLATIONS:translations animations configmgr svx sfx2 stoc canvas embeddedobj LIBXSLT:libxslt oox ure test xmloff fileaccess unoxml dbaccess BLUEZ:bluez_bluetooth NULL
sd sd usr1 - all sd_mkout NULL
sd sd\prj nmake - all sd_prj NULL
@@ -9,13 +9,13 @@
#include "BluetoothServer.hxx"
#include <stdio.h>
#if defined(LINUX) && defined(ENABLE_DBUS)
#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS)
#include <glib.h>
#include <dbus/dbus-glib.h>
#include <sys/unistd.h>
#include <sys/socket.h>
#include "bluetooth/bluetooth.h"
#include "bluetooth/rfcomm.h"
#include <bluetooth/bluetooth.h>
#include <bluetooth/rfcomm.h>
#endif
#ifdef WIN32
@@ -51,7 +51,7 @@ bool BluetoothServer::isDiscoverable()
void BluetoothServer::execute()
{
#if defined(LINUX) && defined(ENABLE_DBUS)
#if (defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS)
g_type_init();
@@ -252,7 +252,7 @@ void BluetoothServer::execute()
}
// WIN32
#else // !(defined(LINUX) && defined(ENABLE_DBUS)) && !defined(WIN32)
#else // !((defined(LINUX) && !defined(__FreeBSD_kernel__)) && defined(ENABLE_DBUS)) && !defined(WIN32)
(void) mpCommunicators; // avoid warnings about unused member
#endif
}