From 5d9a5c1c5dcfea92c00c224d1d074ec1a56df00d Mon Sep 17 00:00:00 2001 From: QC Date: Sun, 20 Jan 2013 13:01:13 +0100 Subject: [PATCH] Check dependencies --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fdf6f12f..2b65dde0 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,20 @@ CFLAGS?=-Wall -Os -LDADD?=`pkg-config --cflags --libs x11 xinerama xft` PREFIX?=$(DESTDIR)/usr BINDIR?=$(PREFIX)/bin +# Check deps. + +PKG_CONFIG?=$(shell which pkg-config) +ifeq (${PKG_CONFIG},${EMPTY}) +$(error Failed to find pkg-config. Please install pkg-config) +endif + +LDADD?=$(shell ${PKG_CONFIG} --cflags --libs x11 xinerama xft) + +ifeq (${LDADD},${EMPTY}) +$(error Failed to find the required dependencies: x11, xinerama, xft) +endif + all: normal normal: