aboutsummaryrefslogtreecommitdiff
path: root/package/pkgconf/pkgconf.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/pkgconf/pkgconf.mk')
-rw-r--r--package/pkgconf/pkgconf.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk
index f3f6526c68..96413718a9 100644
--- a/package/pkgconf/pkgconf.mk
+++ b/package/pkgconf/pkgconf.mk
@@ -24,8 +24,22 @@ define HOST_PKGCONF_INSTALL_WRAPPER
$(HOST_DIR)/usr/bin/pkg-config
endef
+define HOST_PKGCONF_STATIC
+ $(SED) 's,@STATIC@,--static,' $(HOST_DIR)/usr/bin/pkg-config
+endef
+
+define HOST_PKGCONF_SHARED
+ $(SED) 's,@STATIC@,,' $(HOST_DIR)/usr/bin/pkg-config
+endef
+
PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG
HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+ HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC
+else
+ HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_SHARED
+endif
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))