xinetd: use pkg-config for libtirpc flags
authorThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Sun, 26 Jul 2015 18:45:17 +0000 (20:45 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Jul 2015 19:49:48 +0000 (21:49 +0200)
Instead of hardcoding the flags needed for libtirpc, use pkg-config.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/xinetd/xinetd.mk

index 92d0d5398e01ff0de54516156a5207e37f14f48f..98185122ce06b47c5af5228e098256ce3bf73e50 100644 (file)
@@ -17,9 +17,9 @@ XINETD_CFLAGS = $(TARGET_CFLAGS)
 #     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
+XINETD_DEPENDENCIES += libtirpc host-pkgconf
+XINETD_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`"
+XINETD_LIBS += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`"
 else ifeq ($(BR2_TOOLCHAIN_HAS_NATIVE_RPC),)
 XINETD_CFLAGS += -DNO_RPC
 endif