From 16db1fed27cd256ba482e325af3dbd8e3d8d7e0f Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sun, 2 Mar 2008 14:36:43 +0000 Subject: dnsmasq: Enable dbus support if available --- package/dnsmasq/dnsmasq.mk | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'package') diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk index c5dbefaec..c6fcb39aa 100644 --- a/package/dnsmasq/dnsmasq.mk +++ b/package/dnsmasq/dnsmasq.mk @@ -21,6 +21,12 @@ ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y) DNSMASQ_COPTS+=-DNO_TFTP endif +ifeq ($(strip $(BR2_PACKAGE_DBUS)),y) +DNSMASQ_DBUS:=$(TARGET_DIR)/usr/bin/dbus-daemon +else +DNSMASQ_DBUS:= +endif + $(DL_DIR)/$(DNSMASQ_SOURCE): $(WGET) -P $(DL_DIR) $(DNSMASQ_SITE)/$(DNSMASQ_SOURCE) @@ -29,7 +35,14 @@ $(DNSMASQ_DIR)/.source: $(DL_DIR)/$(DNSMASQ_SOURCE) toolchain/patch-kernel.sh $(DNSMASQ_DIR) package/dnsmasq/ \*.patch touch $@ -$(DNSMASQ_DIR)/src/$(DNSMASQ_BINARY): $(DNSMASQ_DIR)/.source +$(DNSMASQ_DIR)/src/$(DNSMASQ_BINARY): $(DNSMASQ_DIR)/.source $(DNSMASQ_DBUS) +ifeq ($(strip $(BR2_PACKAGE_DBUS)),y) + $(SED) 's^.*#define HAVE_DBUS.*^#define HAVE_DBUS^' \ + $(DNSMASQ_DIR)/src/config.h +else + $(SED) 's^.*#define HAVE_DBUS.*^/* #define HAVE_DBUS */^' \ + $(DNSMASQ_DIR)/src/config.h +endif $(MAKE) CC=$(TARGET_CC) CFLAGS="$(TARGET_CFLAGS)" \ COPTS='$(DNSMASQ_COPTS)' PREFIX=/usr -C $(DNSMASQ_DIR) -- cgit v1.2.3