From 8f78b33fec109fcd8bfda99add349bf7219c4dc5 Mon Sep 17 00:00:00 2001 From: Johns Date: Fri, 7 Sep 2012 16:07:47 +0200 Subject: Autodetect avfs, ffmpeg/swscale and png. --- ChangeLog | 1 + Makefile | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index f2b9331..610fb34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ User johns Date: + Add dia show image/picture viewer. Add player thread for events and pipe output. Support DVDNAV buttons. Colorkey becomes parameter (f.e. mplayer2). diff --git a/Makefile b/Makefile index a09ca3e..704ee76 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,12 @@ GIT_REV = $(shell git describe --always 2>/dev/null) ### Configuration (edit this for your needs) CONFIG := #-DDEBUG -CONFIG += -DUSE_AVFS # use a virtual file system + # autodetect: use a virtual file system +CONFIG += $(shell test -x /usr/bin/avfs-config && echo "-DUSE_AVFS") + # autodetect: use ffmpeg software scale +CONFIG += $(shell pkg-config --exists libswscale && echo "-DUSE_SWSCALE") + # autodetect: support png images +CONFIG += $(shell pkg-config --exists libpng && echo "-DUSE_PNG") ### The C++ compiler and options: @@ -59,22 +64,27 @@ INCLUDES += -I$(VDRDIR)/include DEFINES += $(CONFIG) -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' \ $(if $(GIT_REV), -DGIT_REV='"$(GIT_REV)"') -_CFLAGS = $(DEFINES) $(INCLUDES) \ +_CFLAGS := $(DEFINES) $(INCLUDES) \ $(shell pkg-config --cflags xcb xcb-event xcb-keysyms xcb-icccm \ xcb-image) \ $(if $(findstring USE_AVFS,$(CONFIG)), `avfs-config --cflags`) \ + $(if $(findstring USE_SWSCALE,$(CONFIG)), \ + `pkg-config --cflags libswscale`) \ $(if $(findstring USE_PNG,$(CONFIG)), `pkg-config --cflags libpng`) -#override _CFLAGS += -Werror -override CXXFLAGS += $(_CFLAGS) +#_CFLAGS += -Werror override CFLAGS += $(_CFLAGS) +override CXXFLAGS += $(_CFLAGS) -LIBS += \ - $(shell pkg-config --libs xcb xcb-keysyms xcb-event xcb-icccm \ +_LIBS := $(shell pkg-config --libs xcb xcb-keysyms xcb-event xcb-icccm \ xcb-image) \ $(if $(findstring USE_AVFS,$(CONFIG)), `avfs-config --libs`) \ + $(if $(findstring USE_SWSCALE,$(CONFIG)), \ + `pkg-config --libs libswscale`) \ $(if $(findstring USE_PNG,$(CONFIG)), `pkg-config --libs libpng`) +override LIBS += $(_LIBS) + ### The object files (add further files here): OBJS = $(PLUGIN).o dia.o video.o readdir.o -- cgit v1.2.3