summaryrefslogtreecommitdiff
blob: 6520c7608a603409dce478c1270dee4df6e83a5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From 7abd1c708d894a67617e60c2f85d6db355a713bb Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@aura-online.co.uk>
Date: Sat, 18 Aug 2012 16:10:23 +0100
Subject: [PATCH] Conditionally include image headers to allow building
 without some dependencies.

---
 image/image.c |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/image/image.c b/image/image.c
index becf221..70b981b 100644
--- a/image/image.c
+++ b/image/image.c
@@ -27,16 +27,42 @@
 #include "desktop/plotters.h"
 #include "image/bitmap.h"
 
+#ifdef WITH_BMP
 #include "image/bmp.h"
-#include "image/gif.h"
 #include "image/ico.h"
+#endif
+
+#ifdef WITH_GIF
+#include "image/gif.h"
+#endif
+
+#ifdef WITH_JPEG
 #include "image/jpeg.h"
+#endif
+
+#ifdef WITH_MNG
 #include "image/mng.h"
-#include "image/nssprite.h"
+#endif
+
+#ifdef WITH_PNG
 #include "image/png.h"
-#include "image/rsvg.h"
+#endif
+
+#ifdef WITH_NSSPRITE
+#include "image/nssprite.h"
+#endif
+
+#ifdef WITH_NS_SVG
 #include "image/svg.h"
+#endif
+
+#ifdef WITH_RSVG
+#include "image/rsvg.h"
+#endif
+
+#ifdef WITH_WEBP
 #include "image/webp.h"
+#endif
 
 #include "image/image.h"
 
-- 
1.7.8.6