diff options
author | Rene Engelhard <rene@debian.org> | 2012-09-18 13:19:57 +0200 |
---|---|---|
committer | Rene Engelhard <rene@debian.org> | 2012-09-18 16:21:45 +0200 |
commit | 85dbc8129887fb94370afcb587e2a9264cb2ed10 (patch) | |
tree | bc61755fe67411929586c853a65cfe8588d3aff6 | |
parent | 8c5cd962353dd9ce8234211a66547eb057202eb5 (diff) |
add --with-system-bluez and alöllow disabling of sdremote
Change-Id: I1b0dbc8e8efa7535bdc699e343e31594af00d553
-rw-r--r-- | Module_tail_build.mk | 4 | ||||
-rw-r--r-- | config_host.mk.in | 1 | ||||
-rw-r--r-- | configure.in | 39 | ||||
-rw-r--r-- | sd/Library_sd.mk | 23 | ||||
-rw-r--r-- | sd/prj/build.lst | 2 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/BluetoothServer.cxx | 10 |
6 files changed, 63 insertions, 16 deletions
diff --git a/Module_tail_build.mk b/Module_tail_build.mk index ec9e006ecf82..c2d6c5dbacab 100644 --- a/Module_tail_build.mk +++ b/Module_tail_build.mk @@ -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 \ diff --git a/config_host.mk.in b/config_host.mk.in index 3c7d46f03741..913a24b379cb 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -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@ diff --git a/configure.in b/configure.in index 9aaa2eb7d195..f8a4a4524049 100644 --- a/configure.in +++ b/configure.in @@ -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 =================================================================== diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 876954eebeae..953507ab9b94 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -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 \ diff --git a/sd/prj/build.lst b/sd/prj/build.lst index b4dc93da6e47..b340431f8e2f 100644 --- a/sd/prj/build.lst +++ b/sd/prj/build.lst @@ -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 diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx index 10dee39fe36e..2e06322baf27 100644 --- a/sd/source/ui/remotecontrol/BluetoothServer.cxx +++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx @@ -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 } |