summaryrefslogtreecommitdiffstats
path: root/Makefile.include
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.include')
-rw-r--r--Makefile.include4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.include b/Makefile.include
index a55f6f552..5f81ccc9d 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -52,6 +52,10 @@ define dependency_version
$(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --modversion $1 2>/dev/null)
endef
+define has_dependency # $1: dependency, $2: action/target
+$(if $(findstring $(strip $1),yes), $(strip $2))
+endef
+
define dependency_cflags
$(call debug_shell, $(if $(PKG_CONFIG_LIBDIR),PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR),) $(PKG_CONFIG) --cflags $1 2>/dev/null)
endef