From 72c2bdebcff5610741d6e89cb6066ba2a88f59ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= <mans@mansr.com>
Date: Sun, 7 Mar 2010 22:18:33 +0000
Subject: [PATCH] Define HAVE_AV_CONFIG_H only when building libraries

Originally committed as revision 22294 to svn://svn.ffmpeg.org/ffmpeg/trunk
---
 common.mak | 2 +-
 subdir.mak | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common.mak b/common.mak
index d7b54d0427d..b55e921f54c 100644
--- a/common.mak
+++ b/common.mak
@@ -31,7 +31,7 @@ endif
 
 ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
 
-CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
+CPPFLAGS := -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
 CFLAGS   += $(ECFLAGS)
 
 %.o: %.c
diff --git a/subdir.mak b/subdir.mak
index b67288a4b79..db0d8763f7c 100644
--- a/subdir.mak
+++ b/subdir.mak
@@ -5,6 +5,8 @@ include $(SUBDIR)../common.mak
 LIBVERSION := $(lib$(NAME)_VERSION)
 LIBMAJOR   := $(lib$(NAME)_VERSION_MAJOR)
 
+$(OBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
+
 ifdef CONFIG_STATIC
 all: $(SUBDIR)$(LIBNAME)
 
-- 
GitLab