mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
config: make BlueZ 5 default and replace --enable-bluez5 with --enable-bluez4
Build now BlueZ 5 by default and rename the configure flag --enable-bluez5 to --enable-bluez4. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
cfd4d5209c
commit
b246788bc4
4 changed files with 30 additions and 30 deletions
16
configure.ac
16
configure.ac
|
|
@ -268,15 +268,15 @@ fi
|
||||||
AC_SUBST(UDEV_BASE_DIR)
|
AC_SUBST(UDEV_BASE_DIR)
|
||||||
|
|
||||||
# BlueZ
|
# BlueZ
|
||||||
AC_ARG_ENABLE(bluez5, AS_HELP_STRING([--enable-bluez5],
|
AC_ARG_ENABLE(bluez4, AS_HELP_STRING([--enable-bluez4],
|
||||||
[build with BlueZ 5 support instead of BlueZ 4]),
|
[build with BlueZ 4 support instead of BlueZ 5]),
|
||||||
[enable_bluez5=${enableval}])
|
[enable_bluez4=${enableval}])
|
||||||
if (test "${enable_bluez5}" = "yes"); then
|
if (test "${enable_bluez4}" = "yes"); then
|
||||||
AC_DEFINE(WITH_BLUEZ5, 1, [Define if you have BlueZ 5 support])
|
AC_DEFINE(WITH_BLUEZ4, 1, [Define if you have BlueZ 4 support])
|
||||||
else
|
else
|
||||||
AC_DEFINE(WITH_BLUEZ5, 0, [Define if you have BlueZ 5 support])
|
AC_DEFINE(WITH_BLUEZ4, 0, [Define if you have BlueZ 4 support])
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(WITH_BLUEZ5, test "${enable_bluez5}" = "yes")
|
AM_CONDITIONAL(WITH_BLUEZ4, test "${enable_bluez4}" = "yes")
|
||||||
|
|
||||||
# systemd unit support
|
# systemd unit support
|
||||||
AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
|
AC_ARG_WITH([systemdsystemunitdir], AS_HELP_STRING([--with-systemdsystemunitdir=DIR],
|
||||||
|
|
@ -825,7 +825,7 @@ echo " modemmanager-1: $with_modem_manager_1"
|
||||||
echo " concheck: $enable_concheck"
|
echo " concheck: $enable_concheck"
|
||||||
echo " libndp: $libndp_location"
|
echo " libndp: $libndp_location"
|
||||||
echo " libteamdctl: $enable_teamdctl"
|
echo " libteamdctl: $enable_teamdctl"
|
||||||
echo " bluez 5: $enable_bluez5"
|
echo " bluez 4: $enable_bluez4"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
echo "Configuration plugins"
|
echo "Configuration plugins"
|
||||||
|
|
|
||||||
|
|
@ -264,14 +264,14 @@ nm_sources += \
|
||||||
bluez-manager/nm-bluez-device.h \
|
bluez-manager/nm-bluez-device.h \
|
||||||
bluez-manager/nm-bluez-manager.h
|
bluez-manager/nm-bluez-manager.h
|
||||||
|
|
||||||
if WITH_BLUEZ5
|
if WITH_BLUEZ4
|
||||||
nm_sources += \
|
|
||||||
bluez-manager/nm-bluez5-manager.c
|
|
||||||
else
|
|
||||||
nm_sources += \
|
nm_sources += \
|
||||||
bluez-manager/nm-bluez-adapter.h \
|
bluez-manager/nm-bluez-adapter.h \
|
||||||
bluez-manager/nm-bluez-adapter.c \
|
bluez-manager/nm-bluez-adapter.c \
|
||||||
bluez-manager/nm-bluez-manager.c
|
bluez-manager/nm-bluez-manager.c
|
||||||
|
else
|
||||||
|
nm_sources += \
|
||||||
|
bluez-manager/nm-bluez5-manager.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if WITH_MODEM_MANAGER_1
|
if WITH_MODEM_MANAGER_1
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
#define BLUEZ_MANAGER_PATH "/"
|
#define BLUEZ_MANAGER_PATH "/"
|
||||||
#define OBJECT_MANAGER_INTERFACE "org.freedesktop.DBus.ObjectManager"
|
#define OBJECT_MANAGER_INTERFACE "org.freedesktop.DBus.ObjectManager"
|
||||||
|
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
|
|
||||||
#define BLUEZ_ADAPTER_INTERFACE "org.bluez.Adapter1"
|
#define BLUEZ_ADAPTER_INTERFACE "org.bluez.Adapter1"
|
||||||
#define BLUEZ_DEVICE_INTERFACE "org.bluez.Device1"
|
#define BLUEZ_DEVICE_INTERFACE "org.bluez.Device1"
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
#include "nm-setting-bluetooth.h"
|
#include "nm-setting-bluetooth.h"
|
||||||
|
|
||||||
#include "nm-bluez-common.h"
|
#include "nm-bluez-common.h"
|
||||||
#if ! WITH_BLUEZ5
|
#if WITH_BLUEZ4
|
||||||
#include "nm-dbus-manager.h"
|
#include "nm-dbus-manager.h"
|
||||||
#include "nm-dbus-glib-types.h"
|
#include "nm-dbus-glib-types.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -45,7 +45,7 @@ G_DEFINE_TYPE (NMBluezDevice, nm_bluez_device, G_TYPE_OBJECT)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *path;
|
char *path;
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
GDBusProxy *proxy5;
|
GDBusProxy *proxy5;
|
||||||
GDBusProxy *adapter;
|
GDBusProxy *adapter;
|
||||||
GDBusConnection *dbus_connection;
|
GDBusConnection *dbus_connection;
|
||||||
|
|
@ -270,13 +270,13 @@ check_emit_usable (NMBluezDevice *self)
|
||||||
|
|
||||||
/* only expect the supported capabilities set. */
|
/* only expect the supported capabilities set. */
|
||||||
g_assert ((priv->capabilities & ~( NM_BT_CAPABILITY_NAP
|
g_assert ((priv->capabilities & ~( NM_BT_CAPABILITY_NAP
|
||||||
#if ! WITH_BLUEZ5
|
#if WITH_BLUEZ4
|
||||||
| NM_BT_CAPABILITY_DUN
|
| NM_BT_CAPABILITY_DUN
|
||||||
#endif
|
#endif
|
||||||
)) == NM_BT_CAPABILITY_NONE);
|
)) == NM_BT_CAPABILITY_NONE);
|
||||||
|
|
||||||
new_usable = (priv->initialized && priv->capabilities && priv->name &&
|
new_usable = (priv->initialized && priv->capabilities && priv->name &&
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
priv->adapter && priv->dbus_connection &&
|
priv->adapter && priv->dbus_connection &&
|
||||||
#endif
|
#endif
|
||||||
priv->address);
|
priv->address);
|
||||||
|
|
@ -403,7 +403,7 @@ nm_bluez_device_disconnect (NMBluezDevice *self)
|
||||||
{
|
{
|
||||||
NMBluezDevicePrivate *priv = NM_BLUEZ_DEVICE_GET_PRIVATE (self);
|
NMBluezDevicePrivate *priv = NM_BLUEZ_DEVICE_GET_PRIVATE (self);
|
||||||
|
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
g_return_if_fail (priv->dbus_connection);
|
g_return_if_fail (priv->dbus_connection);
|
||||||
g_return_if_fail (priv->connection_bt_type == NM_BT_CAPABILITY_NAP);
|
g_return_if_fail (priv->connection_bt_type == NM_BT_CAPABILITY_NAP);
|
||||||
|
|
||||||
|
|
@ -442,7 +442,7 @@ nm_bluez_device_disconnect (NMBluezDevice *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
bluez_connect_pan_cb (GDBusConnection *dbus_connection,
|
bluez_connect_pan_cb (GDBusConnection *dbus_connection,
|
||||||
GAsyncResult *res,
|
GAsyncResult *res,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
|
|
@ -458,7 +458,7 @@ bluez_connect_cb (DBusGProxy *proxy4,
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
char *device;
|
char *device;
|
||||||
|
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
GVariant *variant;
|
GVariant *variant;
|
||||||
|
|
||||||
variant = g_dbus_connection_call_finish (dbus_connection, res, &error);
|
variant = g_dbus_connection_call_finish (dbus_connection, res, &error);
|
||||||
|
|
@ -503,13 +503,13 @@ nm_bluez_device_connect_async (NMBluezDevice *self,
|
||||||
{
|
{
|
||||||
GSimpleAsyncResult *simple;
|
GSimpleAsyncResult *simple;
|
||||||
NMBluezDevicePrivate *priv = NM_BLUEZ_DEVICE_GET_PRIVATE (self);
|
NMBluezDevicePrivate *priv = NM_BLUEZ_DEVICE_GET_PRIVATE (self);
|
||||||
#if ! WITH_BLUEZ5
|
#if WITH_BLUEZ4
|
||||||
DBusGConnection *connection;
|
DBusGConnection *connection;
|
||||||
|
|
||||||
connection = nm_dbus_manager_get_connection (nm_dbus_manager_get ());
|
connection = nm_dbus_manager_get_connection (nm_dbus_manager_get ());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
g_return_if_fail (connection_bt_type == NM_BT_CAPABILITY_NAP);
|
g_return_if_fail (connection_bt_type == NM_BT_CAPABILITY_NAP);
|
||||||
|
|
||||||
simple = g_simple_async_result_new (G_OBJECT (self),
|
simple = g_simple_async_result_new (G_OBJECT (self),
|
||||||
|
|
@ -609,7 +609,7 @@ convert_uuids_to_capabilities (const char **strings)
|
||||||
parts = g_strsplit (*iter, "-", -1);
|
parts = g_strsplit (*iter, "-", -1);
|
||||||
if (parts && parts[0]) {
|
if (parts && parts[0]) {
|
||||||
switch (g_ascii_strtoull (parts[0], NULL, 16)) {
|
switch (g_ascii_strtoull (parts[0], NULL, 16)) {
|
||||||
#if ! WITH_BLUEZ5
|
#if WITH_BLUEZ4
|
||||||
case 0x1103:
|
case 0x1103:
|
||||||
capabilities |= NM_BT_CAPABILITY_DUN;
|
capabilities |= NM_BT_CAPABILITY_DUN;
|
||||||
break;
|
break;
|
||||||
|
|
@ -651,7 +651,7 @@ _set_property_capabilities (NMBluezDevice *self, const char **uuids, gboolean no
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
static void
|
static void
|
||||||
on_adapter_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
|
on_adapter_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
|
||||||
{
|
{
|
||||||
|
|
@ -762,7 +762,7 @@ property_changed (DBusGProxy *proxy4,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
static void
|
static void
|
||||||
query_properties (NMBluezDevice *self)
|
query_properties (NMBluezDevice *self)
|
||||||
{
|
{
|
||||||
|
|
@ -892,7 +892,7 @@ query_properties (NMBluezDevice *self)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
static void
|
static void
|
||||||
on_proxy_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
|
on_proxy_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
|
||||||
{
|
{
|
||||||
|
|
@ -940,7 +940,7 @@ nm_bluez_device_new (const char *path, NMConnectionProvider *provider)
|
||||||
{
|
{
|
||||||
NMBluezDevice *self;
|
NMBluezDevice *self;
|
||||||
NMBluezDevicePrivate *priv;
|
NMBluezDevicePrivate *priv;
|
||||||
#if ! WITH_BLUEZ5
|
#if WITH_BLUEZ4
|
||||||
DBusGConnection *connection;
|
DBusGConnection *connection;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -977,7 +977,7 @@ nm_bluez_device_new (const char *path, NMConnectionProvider *provider)
|
||||||
G_CALLBACK (cp_connections_loaded),
|
G_CALLBACK (cp_connections_loaded),
|
||||||
self);
|
self);
|
||||||
|
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
g_bus_get (G_BUS_TYPE_SYSTEM,
|
g_bus_get (G_BUS_TYPE_SYSTEM,
|
||||||
NULL,
|
NULL,
|
||||||
(GAsyncReadyCallback) on_bus_acquired,
|
(GAsyncReadyCallback) on_bus_acquired,
|
||||||
|
|
@ -1035,7 +1035,7 @@ dispose (GObject *object)
|
||||||
g_signal_handlers_disconnect_by_func (priv->provider, cp_connection_updated, self);
|
g_signal_handlers_disconnect_by_func (priv->provider, cp_connection_updated, self);
|
||||||
g_signal_handlers_disconnect_by_func (priv->provider, cp_connections_loaded, self);
|
g_signal_handlers_disconnect_by_func (priv->provider, cp_connections_loaded, self);
|
||||||
|
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
g_clear_object (&priv->adapter);
|
g_clear_object (&priv->adapter);
|
||||||
g_clear_object (&priv->dbus_connection);
|
g_clear_object (&priv->dbus_connection);
|
||||||
#else
|
#else
|
||||||
|
|
@ -1054,7 +1054,7 @@ finalize (GObject *object)
|
||||||
g_free (priv->address);
|
g_free (priv->address);
|
||||||
g_free (priv->name);
|
g_free (priv->name);
|
||||||
g_free (priv->bt_iface);
|
g_free (priv->bt_iface);
|
||||||
#if WITH_BLUEZ5
|
#if ! WITH_BLUEZ4
|
||||||
g_object_unref (priv->proxy5);
|
g_object_unref (priv->proxy5);
|
||||||
#else
|
#else
|
||||||
g_object_unref (priv->proxy4);
|
g_object_unref (priv->proxy4);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue