summaryrefslogtreecommitdiff
path: root/Makethird
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-04-22 15:48:36 +0200
committerRobin Watts <robin.watts@artifex.com>2013-04-23 12:00:52 +0100
commitec3c3c846820c0be29f107e731dc2f7616d1fb6c (patch)
tree3440e0e7ed2d6612db304965cb93773e2983d6b2 /Makethird
parent2ea11eace69fe5a2d88f374a253a3deb05804f2d (diff)
downloadmupdf-ec3c3c846820c0be29f107e731dc2f7616d1fb6c.tar.xz
Fix pkg-config issues.
Only evaluate pkg-config variables if using system libraries, using a := assignment in Makethird. This silences warnings if the library is in thirdparty but not installed on the system.
Diffstat (limited to 'Makethird')
-rw-r--r--Makethird15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makethird b/Makethird
index 1646d965..832b0645 100644
--- a/Makethird
+++ b/Makethird
@@ -105,7 +105,8 @@ $(OUT)/ft_%.o: $(FREETYPE_DIR)/src/type1/%.c | $(OUT)
$(CC_CMD) $(FT_CFLAGS)
else
-CFLAGS += $(SYS_FREETYPE_INC)
+SYS_FREETYPE_CFLAGS := $(SYS_FREETYPE_CFLAGS)
+CFLAGS += $(SYS_FREETYPE_CFLAGS)
endif
# --- JBIG2DEC ---
@@ -218,7 +219,8 @@ $(OPENJPEG_LIB): $(addprefix $(OUT)/opj_, $(OPENJPEG_SRC:%.c=%.o))
$(OUT)/opj_%.o: $(OPENJPEG_DIR)/libopenjpeg/%.c | $(OUT)
$(CC_CMD) -DOPJ_STATIC
else
-CFLAGS += $(SYS_OPENJPEG_INC)
+SYS_OPENJPEG_CFLAGS := $(SYS_OPENJPEG_CFLAGS)
+CFLAGS += $(SYS_OPENJPEG_CFLAGS)
endif
# --- ZLIB ---
@@ -244,3 +246,12 @@ $(ZLIB_LIB): $(addprefix $(OUT)/zlib_, $(ZLIB_SRC:%.c=%.o))
$(OUT)/zlib_%.o: $(ZLIB_DIR)/%.c | $(OUT)
$(CC_CMD)
endif
+
+# --- X11 ---
+
+ifeq "$(NOX11)" ""
+SYS_X11_CFLAGS := $(SYS_X11_CFLAGS)
+SYS_X11_LIBS := $(SYS_X11_LIBS)
+CFLAGS += $(SYS_X11_CFLAGS)
+LIBS += $(SYS_X11_LIBS)
+endif