external/wpa_supplicant8: Use libdbus rather than dbus-1
The upstream wpa_supplicant uses the dbus-1 library when
it is compiled with D-Bus support. In Android, we imported
the D-Bus shared libraries under the name "libdbus", so
use this shared library instead of dbus-1 when compiling
WPA supplicant with D-Bus support.
CQ-DEPEND=CL:746796
BUG: 22957177
TEST: Compile brillo for dragon/emulator succeeds.
Change-Id: I1b30f0c2302e6c95815508e43a69bd78cf218e16
diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
index 4b45f8c..e3020ec 100644
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
@@ -1299,12 +1299,6 @@
DBUS_OBJS += dbus/dbus_old_handlers_wps.c
endif
DBUS_OBJS += dbus/dbus_dict_helpers.c
-ifndef DBUS_LIBS
-DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1)
-endif
-ifndef DBUS_INCLUDE
-DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
-endif
DBUS_CFLAGS += $(DBUS_INCLUDE)
endif
@@ -1320,12 +1314,6 @@
ifdef CONFIG_P2P
DBUS_OBJS += dbus/dbus_new_handlers_p2p.c
endif
-ifndef DBUS_LIBS
-DBUS_LIBS := $(shell $(PKG_CONFIG) --libs dbus-1)
-endif
-ifndef DBUS_INCLUDE
-DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1)
-endif
ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
DBUS_OBJS += dbus/dbus_new_introspect.c
DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
@@ -1340,7 +1328,6 @@
OBJS += $(DBUS_OBJS)
L_CFLAGS += $(DBUS_CFLAGS)
-LIBS += $(DBUS_LIBS)
ifdef CONFIG_READLINE
OBJS_c += src/utils/edit_readline.c
@@ -1582,6 +1569,9 @@
LOCAL_CFLAGS := $(L_CFLAGS)
LOCAL_SRC_FILES := $(OBJS)
LOCAL_C_INCLUDES := $(INCLUDES)
+ifeq ($(DBUS), y)
+LOCAL_SHARED_LIBRARIES += libdbus
+endif
include $(BUILD_EXECUTABLE)
########################