summaryrefslogtreecommitdiffstats
path: root/package/xinetd
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-11-04 07:34:18 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2012-11-06 08:20:18 +0100
commite2b8a97603687add5dd7a39b0dac75400769af50 (patch)
treecab083417a0e2a9f168df403adbabd75826f7796 /package/xinetd
parentf2b3a19896b83da34e5ee8a30572dc846141f0cb (diff)
downloadbuildroot-novena-e2b8a97603687add5dd7a39b0dac75400769af50.tar.gz
buildroot-novena-e2b8a97603687add5dd7a39b0dac75400769af50.zip
xinetd: add support to use RPC support from libtirpc
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/xinetd')
-rw-r--r--package/xinetd/xinetd.mk19
1 files changed, 17 insertions, 2 deletions
diff --git a/package/xinetd/xinetd.mk b/package/xinetd/xinetd.mk
index a420425d4..cb48145cf 100644
--- a/package/xinetd/xinetd.mk
+++ b/package/xinetd/xinetd.mk
@@ -9,10 +9,25 @@ XINETD_SITE = http://www.xinetd.org
XINETD_LICENSE = xinetd license
XINETD_LICENSE_FILES = COPYRIGHT
-ifneq ($(BR2_TOOLCHAIN_HAS_NATIVE_RPC),y)
-XINETD_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DNO_RPC"
+XINETD_CFLAGS = $(TARGET_CFLAGS)
+
+# Three cases here:
+# 1. We have libtirpc, use it by passing special flags
+# 2. We have native RPC support, use it, no need to pass special
+# flags (so this case 2 is implicit and not visible below)
+# 3. We don't have RPC support, pass -DNO_RPC to disable it
+ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
+XINETD_DEPENDENCIES += libtirpc
+XINETD_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc/
+XINETD_LIBS += -ltirpc
+else ifeq ($(BR2_TOOLCHAIN_HAS_NATIVE_RPC),)
+XINETD_CFLAGS += -DNO_RPC
endif
+XINETD_CONF_ENV += \
+ CFLAGS="$(XINETD_CFLAGS)" \
+ LIBS="$(XINETD_LIBS)"
+
XINETD_MAKE_OPT = AR="$(TARGET_AR)"
$(eval $(autotools-package))