From: Kaj-Michael Lang Date: Mon, 17 Sep 2007 10:48:10 +0000 (+0300) Subject: Add configure options to choose maemo D-Bus bluetooth or basic bluez code. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60f5d325e478406034d39f5a7932b6b3eebf777a;p=mapper Add configure options to choose maemo D-Bus bluetooth or basic bluez code. --- diff --git a/configure.ac b/configure.ac index 9ebba56..1d60243 100644 --- a/configure.ac +++ b/configure.ac @@ -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}" diff --git a/src/bt-bluez.c b/src/bt-bluez.c index 7c41d74..28c4565 100644 --- a/src/bt-bluez.c +++ b/src/bt-bluez.c @@ -2,9 +2,8 @@ #include -#define WITH_BT_LIBBLUEZ - -#ifdef WITH_BT_LIBBLUEZ +/* XXX: well, we not using dbus yet, but anyway.. */ +#ifdef WITH_BLUEZ_DBUS_BT #include #include