]> err.no Git - mapper/commitdiff
Add configure options to choose maemo D-Bus bluetooth or basic bluez code.
authorKaj-Michael Lang <milang@onion.tal.org>
Mon, 17 Sep 2007 10:48:10 +0000 (13:48 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Mon, 17 Sep 2007 10:48:10 +0000 (13:48 +0300)
configure.ac
src/bt-bluez.c

index 9ebba560c11cd0d622fc58a465ce3e206fb1722b..1d60243ffc15360e4d032646948b2ceba1cdbf60 100644 (file)
@@ -51,6 +51,12 @@ AC_ARG_ENABLE([770],AS_HELP_STRING([--enable-770],[Build for Nokia 770/N800]),
 AC_ARG_ENABLE([hildon],AS_HELP_STRING([--enable-hildon],[Build for Hildon]),
               [enable_hildon=$enableval], [enable_hildon=no])
 
+AC_ARG_ENABLE([itbtdbus],AS_HELP_STRING([--enable-itbtdbus],[Use IT D-Bus Bluetooth interface]),
+              [enable_itbtdbus=$enableval], [enable_itbtdbus=no])
+
+AC_ARG_ENABLE([btdbus],AS_HELP_STRING([--enable-btdbus],[Use D-Bus bluez interface]),
+              [enable_btdbus=$enableval], [enable_btdbus=no])
+
 if test "x$enable_770" = "xno" ; then
   WITH_DEVICE_770=no
 else
@@ -59,6 +65,21 @@ else
   AC_DEFINE([WITH_DEVICE_770], 1, [With 770/N800 specific code])
 fi
 
+if test "x$enable_itbtdbus" = "xno" ; then
+  WITH_HILDON_DBUS_BT=no
+  enable_btdbus=yes
+else
+  WITH_HILDON_DBUS_BT=yes
+  AC_DEFINE([WITH_HILDON_DBUS_BT], 1, [IT D-Bus bluetooth])
+fi
+
+if test "x$enable_btdbus" = "xno" ; then
+  WITH_BLUEZ_DBUS_BT=no
+else
+  WITH_BLUEZ_DBUS_BT=yes
+  AC_DEFINE([WITH_BLUEZ_DBUS_BT], 1, [bluez D-Bus bluetooth])
+fi
+
 if test "x$enable_hildon" = "xyes" ; then
  dnl Ckeck for hildon-libs
  PKG_CHECK_MODULES(HILDON, hildon-libs, HAVE_HILDON=yes, HAVE_HILDON=no)
@@ -256,6 +277,7 @@ AC_OUTPUT(
           po/Makefile
 )
 
-echo "Hildon:  ${enable_hildon}"
-echo "770/N800:        ${enable_770}"
-
+echo "Hildon:                     ${enable_hildon}"
+echo "IT specials (770/N800):     ${enable_770}"
+echo "IT D-Bus Bluetooth:         ${enable_itbtdbus}"
+echo "Bluez D-Bus:                ${enable_btdbus}"
index 7c41d74ef52d20e9eacd7926e9d40efdca835ee1..28c4565a71c01a42e19ac5210ad9a364276b83ab 100644 (file)
@@ -2,9 +2,8 @@
 
 #include <config.h>
 
-#define WITH_BT_LIBBLUEZ
-
-#ifdef WITH_BT_LIBBLUEZ
+/* XXX: well, we not using dbus yet, but anyway.. */
+#ifdef WITH_BLUEZ_DBUS_BT
 
 #include <unistd.h>
 #include <stdlib.h>