summaryrefslogtreecommitdiff
path: root/graphics/xv/patches/patch-ad
blob: 4bbe23c05a1a8b8f4e8c4e571630b062437fa6c6 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
$NetBSD: patch-ad,v 1.10 2007/07/08 10:50:26 wiz Exp $

diff -u Imakefile Imakefile
--- Imakefile.orig
+++ Imakefile
@@ -6,13 +6,15 @@
 /* if, for whatever reason, you're unable to get the JPEG library to compile
  * on your machine, *COMMENT OUT* the following line
  */
-#define HaveJpeg
+/* #define HaveJpeg */
+#define UseInstalledJpeg
 
 
 /* if, for whatever reason, you're unable to get the TIFF library to compile
  * on your machine, *COMMENT OUT* the following line
  */
-#define HaveTiff
+/* #define HaveTiff */
+#define UseInstalledTiff
 
 
 /* if, for whatever reason, you're unable to get the PDS/VICAR support
@@ -21,6 +23,9 @@
 #define HavePDS
 
 
+#define UseInstalledPng
+#define UseInstalledZlib
+
 /*
  * if you are running on a SysV-based machine, such as HP, Silicon Graphics,
  * etc, uncomment one of the following lines to get you *most* of the way
@@ -124,20 +129,62 @@
 JPEG = -DDOJPEG
 JPEGDIR = jpeg
 LIBJPEG = $(JPEGDIR)/libjpeg.a
+DEPLIBJPEG = $(LIBJPEG)
 JPEGINCLUDE = -I$(JPEGDIR)
 #endif
 
+#ifdef UseInstalledJpeg
+JPEG = -DDOJPEG
+LIBJPEG = $(LDFLAGS) -L$(LOCALBASE)/lib -Wl,-R$(LOCALBASE)/lib -ljpeg
+JPEGINCLUDE = -I$(LOCALBASE)/include
+#endif
+
 #ifdef HaveTiff
 TIFF = -DDOTIFF
 TIFFDIR = tiff
 LIBTIFF = $(TIFFDIR)/libtiff.a
+DEPLIBTIFF = $(LIBTIFF)
 TIFFINCLUDE = -I$(TIFFDIR)
 #endif
 
+#ifdef UseInstalledTiff
+TIFF = -DDOTIFF
+LIBTIFF = -L$(LOCALBASE)/lib -Wl,-R$(LOCALBASE)/lib -ltiff -ljpeg -lz
+TIFFINCLUDE = -I$(LOCALBASE)/include
+#endif
+
 #ifdef HavePDS
 PDS = -DDOPDS
 #endif
 
+/*
+###
+### if, for whatever reason, you're unable to get the PNG library to compile
+### on your machine, *COMMENT OUT* the following lines
+###
+*/
+#ifdef UseInstalledPng
+PNG    = -DDOPNG
+PNGDIR = ${LOCALBASE}
+PNGINC = -I$(PNGDIR)/include
+PNGLIB = -L$(PNGDIR)/lib -lpng -lz
+LIBPNG = ${PNGLIB}
+PNGINCLUDE = ${PNGINC}
+#endif
+
+/*
+###
+### if, for whatever reason, you're unable to get the PNG library to compile
+### on your machine, *COMMENT OUT* the following lines
+###
+*/
+#ifdef UseInstalledZlib
+ZLIBDIR = $(LOCALBASE)
+ZLIBINC = -I$(ZLIBDIR)/include
+ZLIBLIB = -L$(ZLIBDIR)/lib -lz
+LIBZLIB = ${ZLIB}
+ZLIBINCLUDE = ${ZLIBINC}
+#endif
 
 #if defined(SCOArchitecture)
 SCO= -Dsco -DPOSIX -DNO_RANDOM 
@@ -149,14 +196,14 @@
 #endif
 
 
-DEPLIBS = $(LIBJPEG) $(LIBTIFF)
-LOCAL_LIBRARIES = $(XLIB) $(DEPLIBS)
+DEPLIBS = $(DEPLIBJPEG) $(DEPLIBTIFF) $(DEPLIBPNG) $(DEPLIBZLIB)
+LOCAL_LIBRARIES = $(XLIB) $(LIBJPEG) $(LIBTIFF) $(LIBPNG) $(LIBZLIB)
 
 DEFINES= $(SCO) $(UNIX) $(NODIRENT) $(VPRINTF) $(TIMERS) \
-	$(HPUX7) $(JPEG) $(TIFF) $(PDS) $(DXWM) $(RAND) \
+	$(HPUX7) $(JPEG) $(TIFF) $(PNG) $(PDS) $(DXWM) $(RAND) \
 	$(BACKING_STORE) $(BSDTYPES) $(SGI) $(MGCSFX)
 
-INCLUDES = $(JPEGINCLUDE) $(TIFFINCLUDE)
+INCLUDES = $(JPEGINCLUDE) $(TIFFINCLUDE) $(PNGINCLUDE) $(ZLIBINCLUDE)
 
 SRCS1 =	xv.c xvevent.c xvroot.c xvmisc.c xvimage.c xvcolor.c xvsmooth.c \
 	xv24to8.c xvgif.c xvpm.c xvinfo.c xvctrl.c xvscrl.c xvalg.c \