From ffb85d90a3c6e90cd9afe1536c45ca3bae76d274 Mon Sep 17 00:00:00 2001 From: Abhinav Shukla Date: Wed, 3 Aug 2016 20:09:19 -0700 Subject: [PATCH] Update Makefile to check if libav present --- linux/Makefile | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/linux/Makefile b/linux/Makefile index 3cb83cdf..1c441126 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -57,10 +57,16 @@ CFLAGS+= $(shell pkg-config --cflags libavcodec) CFLAGS+= $(shell pkg-config --cflags libavformat) CFLAGS+= $(shell pkg-config --cflags libavutil) CFLAGS+= $(shell pkg-config --cflags libswscale) -LDFLAGS+= $(shell pkg-config --libs libavcodec ) -LDFLAGS+= $(shell pkg-config --libs libavformat ) -LDFLAGS+= $(shell pkg-config --libs libavutil ) -LDFLAGS+= $(shell pkg-config --libs libswscale ) +AV_LDFLAGS+= $(shell pkg-config --libs libavcodec ) +AV_LDFLAGS+= $(shell pkg-config --libs libavformat ) +AV_LDFLAGS+= $(shell pkg-config --libs libavutil ) +AV_LDFLAGS+= $(shell pkg-config --libs libswscale ) +ifeq ($(AV_LDFLAGS),$(EMPTY)) +$(error **ERROR** "libav not found") +else +$(info "libav found") +endif +LDFLAGS+= $(AV_LDFLAGS) endif ifeq ($(ENABLE_OCR),yes)