Overview
Comment:Added canvas-draw build to makefile and tweaked canvas-draw.setup to allow building on Windows
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8ca036fa3c4f9c2de22186228136d43ec6eb34f9
User & Date: matt on 2011-01-30 19:14:41
Other Links: manifest | tags
Context
2011-01-31
03:17
Added a couple examples check-in: bc89e96dce user: matt tags: trunk
2011-01-30
19:14
Added canvas-draw build to makefile and tweaked canvas-draw.setup to allow building on Windows check-in: 8ca036fa3c user: matt tags: trunk
17:39
Re-ran configure in ffcall and imported canvas-draw source check-in: ed10f826ff user: matt tags: trunk
Changes

Added Makefile version [b62e6788ee].















>
>
>
>
>
>
>
1
2
3
4
5
6
7
# This is more to help me remember all the steps than for building :)

iup-module :
	cd iup;CSC_OPTIONS='-IC:/mylibs/iup/include -LC:/mylibs/iup/' chicken-install -D no-library-checks

canvas-draw-module :
	cd canvas-draw/chicken;CSC_OPTIONS='-IC:/mylibs/iup/include -LC:/mylibs/iup/' chicken-install -D no-library-checks

Modified canvas-draw/chicken/canvas-draw.setup from [901a63a1f8] to [91a54c44e2].















1
2
3
4
5
6
7
8














(if (find-library "cd" "cdCreateCanvas")
	(begin
		(compile -s -O2 -d1 "canvas-draw-base.scm" -j canvas-draw-base "-lcd")
		(compile -c -O2 -d1 "canvas-draw-base.scm" -j canvas-draw-base -unit canvas-draw-base)
		(compile -s -O2 -d0 "canvas-draw-base.import.scm")
		
		(install-extension
		 'canvas-draw-base
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
;; -*- mode: Scheme; tab-width: 2; -*- ;;

(cond-expand
 [no-library-checks
	(define-syntax check-libraries
		(syntax-rules ()
			[(check-libraries [lib fun] ...)
			 #t]))]
 [else
	(define-syntax check-libraries
		(syntax-rules ()
			[(check-libraries [lib fun] ...)
			 (and (find-library lib fun) ...)]))])

(if (check-libraries [ "cd" "cdCreateCanvas" ] )
	(begin
		(compile -s -O2 -d1 "canvas-draw-base.scm" -j canvas-draw-base "-lcd")
		(compile -c -O2 -d1 "canvas-draw-base.scm" -j canvas-draw-base -unit canvas-draw-base)
		(compile -s -O2 -d0 "canvas-draw-base.import.scm")
		
		(install-extension
		 'canvas-draw-base
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
		(install-extension
		 'canvas-draw-play
		 '("canvas-draw-play.so" "canvas-draw-play.o" "canvas-draw-play.import.so" "canvas-draw-types.scm")
		 '((version 1.0.0)
			 (static "canvas-draw-play.o")
			 (static-options "-lcd")))
		
		(if (find-library "iupcd" "cdContextIup")
			(begin
				(compile -s -O2 -d1 "canvas-draw-iup.scm" -j canvas-draw-iup "-liupcd")
				(compile -c -O2 -d1 "canvas-draw-iup.scm" -j canvas-draw-iup -unit canvas-draw-iup)
				(compile -s -O2 -d0 "canvas-draw-iup.import.scm")
				
				(install-extension
				 'canvas-draw-iup
				 '("canvas-draw-iup.so" "canvas-draw-iup.o" "canvas-draw-iup.import.so")
				 '((version 1.0.0)
					 (static "canvas-draw-iup.o")
					 (static-options "-liupcd"))))
			(warning "CD IUP driver not found, some bindings cannot be compiled"))
		
		(cond
			[(find-library "cdx11" "cdContextNativeWindow")
			 (compile -s -O2 -d1 "canvas-draw-native.scm" -j canvas-draw-native "-lcdx11 -lcdcontextplus")
			 (compile -c -O2 -d1 "canvas-draw-native.scm" -j canvas-draw-native -unit canvas-draw-native)
			 (compile -s -O2 -d0 "canvas-draw-native.import.scm")
			 
			 (install-extension
				'canvas-draw-native
				'("canvas-draw-native.so" "canvas-draw-native.o" "canvas-draw-native.import.so")
				'((version 1.0.0)
					(static "canvas-draw-native.o")
					(static-options "-lcdx11 -lcdcontextplus")))]
			[(find-library "cd" "cdContextNativeWindow")
			 (compile -s -O2 -d1 "canvas-draw-native.scm" -j canvas-draw-native "-lcd -lcdcontextplus")
			 (compile -c -O2 -d1 "canvas-draw-native.scm" -j canvas-draw-native -unit canvas-draw-native)
			 (compile -s -O2 -d0 "canvas-draw-native.import.scm")
			 
			 (install-extension
				'canvas-draw-native
				'("canvas-draw-native.so" "canvas-draw-native.o" "canvas-draw-native.import.so")
				'((version 1.0.0)
					(static "canvas-draw-native.o")
					(static-options "-lcd -lcdcontextplus")))]
			[else
			 (warning "CD native window driver not found, some bindings cannot be compiled")])
		
		(if (find-library "cdgl" "cdContextGL")
			(begin
				(compile -s -O2 -d1 "canvas-draw-gl.scm" -j canvas-draw-gl "-lcdgl")
				(compile -c -O2 -d1 "canvas-draw-gl.scm" -j canvas-draw-gl -unit canvas-draw-gl)
				(compile -s -O2 -d0 "canvas-draw-gl.import.scm")
				
				(install-extension
				 'canvas-draw-gl
				 '("canvas-draw-gl.so" "canvas-draw-gl.o" "canvas-draw-gl.import.so")
				 '((version 1.0.0)
					 (static "canvas-draw-gl.o")
					 (static-options "-lcdgl"))))
			(warning "CD OpenGL driver not found, some bindings cannot be compiled"))
		
		(cond
			[(find-library "cdx11" "cdContextClipboard")
			 (compile -s -O2 -d1 "canvas-draw-clipboard.scm" -j canvas-draw-clipboard "-lcdx11")
			 (compile -c -O2 -d1 "canvas-draw-clipboard.scm" -j canvas-draw-clipboard -unit canvas-draw-clipboard)
			 (compile -s -O2 -d0 "canvas-draw-clipboard.import.scm")
			 
			 (install-extension
				'canvas-draw-clipboard
				'("canvas-draw-clipboard.so" "canvas-draw-clipboard.o" "canvas-draw-clipboard.import.so")
				'((version 1.0.0)
					(static "canvas-draw-clipboard.o")
					(static-options "-lcdx11")))]
			[(find-library "cd" "cdContextClipboard")
			 (compile -s -O2 -d1 "canvas-draw-clipboard.scm" -j canvas-draw-clipboard "-lcd")
			 (compile -c -O2 -d1 "canvas-draw-clipboard.scm" -j canvas-draw-clipboard -unit canvas-draw-clipboard)
			 (compile -s -O2 -d0 "canvas-draw-clipboard.import.scm")
			 
			 (install-extension
				'canvas-draw-clipboard
				'("canvas-draw-clipboard.so" "canvas-draw-clipboard.o" "canvas-draw-clipboard.import.so")
				'((version 1.0.0)
					(static "canvas-draw-clipboard.o")
					(static-options "-lcd")))]
			[else
			 (warning "CD clipboard driver not found, some bindings cannot be compiled")])
		
		(cond
			[(find-library "cdx11" "cdContextPrinter")
			 (compile -s -O2 -d1 "canvas-draw-printer.scm" -j canvas-draw-printer "-lcdx11")
			 (compile -c -O2 -d1 "canvas-draw-printer.scm" -j canvas-draw-printer -unit canvas-draw-printer)
			 (compile -s -O2 -d0 "canvas-draw-printer.import.scm")
			 
			 (install-extension
				'canvas-draw-printer
				'("canvas-draw-printer.so" "canvas-draw-printer.o" "canvas-draw-printer.import.so")
				'((version 1.0.0)
					(static "canvas-draw-printer.o")
					(static-options "-lcdx11")))]
			[(find-library "cd" "cdContextPrinter")
			 (compile -s -O2 -d1 "canvas-draw-printer.scm" -j canvas-draw-printer "-lcd")
			 (compile -c -O2 -d1 "canvas-draw-printer.scm" -j canvas-draw-printer -unit canvas-draw-printer)
			 (compile -s -O2 -d0 "canvas-draw-printer.import.scm")
			 
			 (install-extension
				'canvas-draw-printer
				'("canvas-draw-printer.so" "canvas-draw-printer.o" "canvas-draw-printer.import.so")
				'((version 1.0.0)
					(static "canvas-draw-printer.o")
					(static-options "-lcd")))]
			[else
			 (warning "CD printer driver not found, some bindings cannot be compiled")])
		
		(if (find-library "cd" "cdContextPicture")
			(begin
				(compile -s -O2 -d1 "canvas-draw-picture.scm" -j canvas-draw-picture "-lcd")
				(compile -c -O2 -d1 "canvas-draw-picture.scm" -j canvas-draw-picture -unit canvas-draw-picture)
				(compile -s -O2 -d0 "canvas-draw-picture.import.scm")
				
				(install-extension
				 'canvas-draw-picture
				 '("canvas-draw-picture.so" "canvas-draw-picture.o" "canvas-draw-picture.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-picture.o")
				   (static-options "-lcd"))))
			(warning "CD picture driver not found, some bindings cannot be compiled"))
		
		(cond
			[(find-library "cdx11" "cdContextImage")
			 (compile -s -O2 -d1 "canvas-draw-server.scm" -j canvas-draw-server "-lcdx11")
			 (compile -c -O2 -d1 "canvas-draw-server.scm" -j canvas-draw-server -unit canvas-draw-server)
			 (compile -s -O2 -d0 "canvas-draw-server.import.scm")
			 
			 (install-extension
				'canvas-draw-server
				'("canvas-draw-server.so" "canvas-draw-server.o" "canvas-draw-server.import.so")
				'((version 1.0.0)
					(static "canvas-draw-server.o")
					(static-options "-lcdx11")))]
			[(find-library "cd" "cdContextImage")
			 (compile -s -O2 -d1 "canvas-draw-server.scm" -j canvas-draw-server "-lcd")
			 (compile -c -O2 -d1 "canvas-draw-server.scm" -j canvas-draw-server -unit canvas-draw-server)
			 (compile -s -O2 -d0 "canvas-draw-server.import.scm")
			 
			 (install-extension
				'canvas-draw-server
				'("canvas-draw-server.so" "canvas-draw-server.o" "canvas-draw-server.import.so")
				'((version 1.0.0)
					(static "canvas-draw-server.o")
					(static-options "-lcd")))]
			[else
			 (warning "CD server image driver not found, some bindings cannot be compiled")])
		
		(if (find-library "cd" "cdContextImageRGB")
			(begin
				(compile -s -O2 -d1 "canvas-draw-client.scm" -j canvas-draw-client "-lcd")
				(compile -c -O2 -d1 "canvas-draw-client.scm" -j canvas-draw-client -unit canvas-draw-client)
				(compile -s -O2 -d0 "canvas-draw-client.import.scm")
				
				(install-extension
				 'canvas-draw-client
				 '("canvas-draw-client.so" "canvas-draw-client.o" "canvas-draw-client.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-client.o")
				   (static-options "-lcd"))))
			(warning "CD client image driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cdpdf" "cdContextPDF")
			(begin
				(compile -s -O2 -d1 "canvas-draw-pdf.scm" -j canvas-draw-pdf "-lcdpdf")
				(compile -c -O2 -d1 "canvas-draw-pdf.scm" -j canvas-draw-pdf -unit canvas-draw-pdf)
				(compile -s -O2 -d0 "canvas-draw-pdf.import.scm")
				
				(install-extension
				 'canvas-draw-pdf
				 '("canvas-draw-pdf.so" "canvas-draw-pdf.o" "canvas-draw-pdf.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-pdf.o")
				   (static-options "-lcdpdf"))))
			(warning "CD PDF driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cd" "cdContextPS")
			(begin
				(compile -s -O2 -d1 "canvas-draw-ps.scm" -j canvas-draw-ps "-lcd")
				(compile -c -O2 -d1 "canvas-draw-ps.scm" -j canvas-draw-ps -unit canvas-draw-ps)
				(compile -s -O2 -d0 "canvas-draw-ps.import.scm")
				
				(install-extension
				 'canvas-draw-ps
				 '("canvas-draw-ps.so" "canvas-draw-ps.o" "canvas-draw-ps.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-ps.o")
				   (static-options "-lcd"))))
			(warning "CD PostScript driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cd" "cdContextSVG")
			(begin
				(compile -s -O2 -d1 "canvas-draw-svg.scm" -j canvas-draw-svg "-lcd")
				(compile -c -O2 -d1 "canvas-draw-svg.scm" -j canvas-draw-svg -unit canvas-draw-svg)
				(compile -s -O2 -d0 "canvas-draw-svg.import.scm")
				
				(install-extension
				 'canvas-draw-svg
				 '("canvas-draw-svg.so" "canvas-draw-svg.o" "canvas-draw-svg.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-svg.o")
				   (static-options "-lcd"))))
			(warning "CD SVG driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cd" "cdContextMetafile")
			(begin
				(compile -s -O2 -d1 "canvas-draw-metafile.scm" -j canvas-draw-metafile "-lcd")
				(compile -c -O2 -d1 "canvas-draw-metafile.scm" -j canvas-draw-metafile -unit canvas-draw-metafile)
				(compile -s -O2 -d0 "canvas-draw-metafile.import.scm")
				
				(install-extension
				 'canvas-draw-metafile
				 '("canvas-draw-metafile.so" "canvas-draw-metafile.o" "canvas-draw-metafile.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-metafile.o")
				   (static-options "-lcd"))))
			(warning "CD metafile driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cd" "cdContextDebug")
			(begin
				(compile -s -O2 -d1 "canvas-draw-debug.scm" -j canvas-draw-debug "-lcd")
				(compile -c -O2 -d1 "canvas-draw-debug.scm" -j canvas-draw-debug -unit canvas-draw-debug)
				(compile -s -O2 -d0 "canvas-draw-debug.import.scm")
				
				(install-extension
				 'canvas-draw-debug
				 '("canvas-draw-debug.so" "canvas-draw-debug.o" "canvas-draw-debug.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-debug.o")
				   (static-options "-lcd"))))
			(warning "CD debug driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cd" "cdContextCGM")
			(begin
				(compile -s -O2 -d1 "canvas-draw-cgm.scm" -j canvas-draw-cgm "-lcd")
				(compile -c -O2 -d1 "canvas-draw-cgm.scm" -j canvas-draw-cgm -unit canvas-draw-cgm)
				(compile -s -O2 -d0 "canvas-draw-cgm.import.scm")
				
				(install-extension
				 'canvas-draw-cgm
				 '("canvas-draw-cgm.so" "canvas-draw-cgm.o" "canvas-draw-cgm.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-cgm.o")
				   (static-options "-lcd"))))
			(warning "CD CGM driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cd" "cdContextDGN")
			(begin
				(compile -s -O2 -d1 "canvas-draw-dgn.scm" -j canvas-draw-dgn "-lcd")
				(compile -c -O2 -d1 "canvas-draw-dgn.scm" -j canvas-draw-dgn -unit canvas-draw-dgn)
				(compile -s -O2 -d0 "canvas-draw-dgn.import.scm")
				
				(install-extension
				 'canvas-draw-dgn
				 '("canvas-draw-dgn.so" "canvas-draw-dgn.o" "canvas-draw-dgn.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-dgn.o")
				   (static-options "-lcd"))))
			(warning "CD DGN driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cd" "cdContextDXF")
			(begin
				(compile -s -O2 -d1 "canvas-draw-dxf.scm" -j canvas-draw-dxf "-lcd")
				(compile -c -O2 -d1 "canvas-draw-dxf.scm" -j canvas-draw-dxf -unit canvas-draw-dxf)
				(compile -s -O2 -d0 "canvas-draw-dxf.import.scm")
				
				(install-extension
				 'canvas-draw-dxf
				 '("canvas-draw-dxf.so" "canvas-draw-dxf.o" "canvas-draw-dxf.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-dxf.o")
				   (static-options "-lcd"))))
			(warning "CD DXF driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cd" "cdContextEMF")
			(begin
				(compile -s -O2 -d1 "canvas-draw-emf.scm" -j canvas-draw-emf "-lcd")
				(compile -c -O2 -d1 "canvas-draw-emf.scm" -j canvas-draw-emf -unit canvas-draw-emf)
				(compile -s -O2 -d0 "canvas-draw-emf.import.scm")
				
				(install-extension
				 'canvas-draw-emf
				 '("canvas-draw-emf.so" "canvas-draw-emf.o" "canvas-draw-emf.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-emf.o")
				   (static-options "-lcd"))))
			(warning "CD EMF driver not found, some bindings cannot be compiled"))
		
		(if (find-library "cd" "cdContextWMF")
			(begin
				(compile -s -O2 -d1 "canvas-draw-wmf.scm" -j canvas-draw-wmf "-lcd")
				(compile -c -O2 -d1 "canvas-draw-wmf.scm" -j canvas-draw-wmf -unit canvas-draw-wmf)
				(compile -s -O2 -d0 "canvas-draw-wmf.import.scm")
				
				(install-extension
				 'canvas-draw-wmf







|














|










|













|














|










|














|










|













|














|










|













|













|













|













|













|













|













|













|













|













|













|







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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
		(install-extension
		 'canvas-draw-play
		 '("canvas-draw-play.so" "canvas-draw-play.o" "canvas-draw-play.import.so" "canvas-draw-types.scm")
		 '((version 1.0.0)
			 (static "canvas-draw-play.o")
			 (static-options "-lcd")))
		
		(if (check-libraries [ "iupcd" "cdContextIup" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-iup.scm" -j canvas-draw-iup "-liupcd")
				(compile -c -O2 -d1 "canvas-draw-iup.scm" -j canvas-draw-iup -unit canvas-draw-iup)
				(compile -s -O2 -d0 "canvas-draw-iup.import.scm")
				
				(install-extension
				 'canvas-draw-iup
				 '("canvas-draw-iup.so" "canvas-draw-iup.o" "canvas-draw-iup.import.so")
				 '((version 1.0.0)
					 (static "canvas-draw-iup.o")
					 (static-options "-liupcd"))))
			(warning "CD IUP driver not found, some bindings cannot be compiled"))
		
		(cond
			[#f ;; (check-libraries [ "cdx11" "cdContextNativeWindow" ] )
			 (compile -s -O2 -d1 "canvas-draw-native.scm" -j canvas-draw-native "-lcdx11 -lcdcontextplus")
			 (compile -c -O2 -d1 "canvas-draw-native.scm" -j canvas-draw-native -unit canvas-draw-native)
			 (compile -s -O2 -d0 "canvas-draw-native.import.scm")
			 
			 (install-extension
				'canvas-draw-native
				'("canvas-draw-native.so" "canvas-draw-native.o" "canvas-draw-native.import.so")
				'((version 1.0.0)
					(static "canvas-draw-native.o")
					(static-options "-lcdx11 -lcdcontextplus")))]
			[#f ;; (check-libraries [ "cd" "cdContextNativeWindow" ] )
			 (compile -s -O2 -d1 "canvas-draw-native.scm" -j canvas-draw-native "-lcd -lcdcontextplus")
			 (compile -c -O2 -d1 "canvas-draw-native.scm" -j canvas-draw-native -unit canvas-draw-native)
			 (compile -s -O2 -d0 "canvas-draw-native.import.scm")
			 
			 (install-extension
				'canvas-draw-native
				'("canvas-draw-native.so" "canvas-draw-native.o" "canvas-draw-native.import.so")
				'((version 1.0.0)
					(static "canvas-draw-native.o")
					(static-options "-lcd -lcdcontextplus")))]
			[else
			 (warning "CD native window driver not found, some bindings cannot be compiled")])
		
		(if (check-libraries [ "cdgl" "cdContextGL" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-gl.scm" -j canvas-draw-gl "-lcdgl")
				(compile -c -O2 -d1 "canvas-draw-gl.scm" -j canvas-draw-gl -unit canvas-draw-gl)
				(compile -s -O2 -d0 "canvas-draw-gl.import.scm")
				
				(install-extension
				 'canvas-draw-gl
				 '("canvas-draw-gl.so" "canvas-draw-gl.o" "canvas-draw-gl.import.so")
				 '((version 1.0.0)
					 (static "canvas-draw-gl.o")
					 (static-options "-lcdgl"))))
			(warning "CD OpenGL driver not found, some bindings cannot be compiled"))
		
		(cond
			[#f ;; (check-libraries [ "cdx11" "cdContextClipboard" ] )
			 (compile -s -O2 -d1 "canvas-draw-clipboard.scm" -j canvas-draw-clipboard "-lcdx11")
			 (compile -c -O2 -d1 "canvas-draw-clipboard.scm" -j canvas-draw-clipboard -unit canvas-draw-clipboard)
			 (compile -s -O2 -d0 "canvas-draw-clipboard.import.scm")
			 
			 (install-extension
				'canvas-draw-clipboard
				'("canvas-draw-clipboard.so" "canvas-draw-clipboard.o" "canvas-draw-clipboard.import.so")
				'((version 1.0.0)
					(static "canvas-draw-clipboard.o")
					(static-options "-lcdx11")))]
			[(check-libraries [ "cd" "cdContextClipboard" ] )
			 (compile -s -O2 -d1 "canvas-draw-clipboard.scm" -j canvas-draw-clipboard "-lcd")
			 (compile -c -O2 -d1 "canvas-draw-clipboard.scm" -j canvas-draw-clipboard -unit canvas-draw-clipboard)
			 (compile -s -O2 -d0 "canvas-draw-clipboard.import.scm")
			 
			 (install-extension
				'canvas-draw-clipboard
				'("canvas-draw-clipboard.so" "canvas-draw-clipboard.o" "canvas-draw-clipboard.import.so")
				'((version 1.0.0)
					(static "canvas-draw-clipboard.o")
					(static-options "-lcd")))]
			[else
			 (warning "CD clipboard driver not found, some bindings cannot be compiled")])
		
		(cond
			[#f ;; (check-libraries [ "cdx11" "cdContextPrinter" ] )
			 (compile -s -O2 -d1 "canvas-draw-printer.scm" -j canvas-draw-printer "-lcdx11")
			 (compile -c -O2 -d1 "canvas-draw-printer.scm" -j canvas-draw-printer -unit canvas-draw-printer)
			 (compile -s -O2 -d0 "canvas-draw-printer.import.scm")
			 
			 (install-extension
				'canvas-draw-printer
				'("canvas-draw-printer.so" "canvas-draw-printer.o" "canvas-draw-printer.import.so")
				'((version 1.0.0)
					(static "canvas-draw-printer.o")
					(static-options "-lcdx11")))]
			[(check-libraries [ "cd" "cdContextPrinter" ] )
			 (compile -s -O2 -d1 "canvas-draw-printer.scm" -j canvas-draw-printer "-lcd")
			 (compile -c -O2 -d1 "canvas-draw-printer.scm" -j canvas-draw-printer -unit canvas-draw-printer)
			 (compile -s -O2 -d0 "canvas-draw-printer.import.scm")
			 
			 (install-extension
				'canvas-draw-printer
				'("canvas-draw-printer.so" "canvas-draw-printer.o" "canvas-draw-printer.import.so")
				'((version 1.0.0)
					(static "canvas-draw-printer.o")
					(static-options "-lcd")))]
			[else
			 (warning "CD printer driver not found, some bindings cannot be compiled")])
		
		(if (check-libraries [ "cd" "cdContextPicture" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-picture.scm" -j canvas-draw-picture "-lcd")
				(compile -c -O2 -d1 "canvas-draw-picture.scm" -j canvas-draw-picture -unit canvas-draw-picture)
				(compile -s -O2 -d0 "canvas-draw-picture.import.scm")
				
				(install-extension
				 'canvas-draw-picture
				 '("canvas-draw-picture.so" "canvas-draw-picture.o" "canvas-draw-picture.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-picture.o")
				   (static-options "-lcd"))))
			(warning "CD picture driver not found, some bindings cannot be compiled"))
		
		(cond
			[#f ;; (check-libraries [ "cdx11" "cdContextImage" ] )
			 (compile -s -O2 -d1 "canvas-draw-server.scm" -j canvas-draw-server "-lcdx11")
			 (compile -c -O2 -d1 "canvas-draw-server.scm" -j canvas-draw-server -unit canvas-draw-server)
			 (compile -s -O2 -d0 "canvas-draw-server.import.scm")
			 
			 (install-extension
				'canvas-draw-server
				'("canvas-draw-server.so" "canvas-draw-server.o" "canvas-draw-server.import.so")
				'((version 1.0.0)
					(static "canvas-draw-server.o")
					(static-options "-lcdx11")))]
			[(check-libraries [ "cd" "cdContextImage" ] ) 
			 (compile -s -O2 -d1 "canvas-draw-server.scm" -j canvas-draw-server "-lcd")
			 (compile -c -O2 -d1 "canvas-draw-server.scm" -j canvas-draw-server -unit canvas-draw-server)
			 (compile -s -O2 -d0 "canvas-draw-server.import.scm")
			 
			 (install-extension
				'canvas-draw-server
				'("canvas-draw-server.so" "canvas-draw-server.o" "canvas-draw-server.import.so")
				'((version 1.0.0)
					(static "canvas-draw-server.o")
					(static-options "-lcd")))]
			[else
			 (warning "CD server image driver not found, some bindings cannot be compiled")])
		
		(if (check-libraries [ "cd" "cdContextImageRGB" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-client.scm" -j canvas-draw-client "-lcd")
				(compile -c -O2 -d1 "canvas-draw-client.scm" -j canvas-draw-client -unit canvas-draw-client)
				(compile -s -O2 -d0 "canvas-draw-client.import.scm")
				
				(install-extension
				 'canvas-draw-client
				 '("canvas-draw-client.so" "canvas-draw-client.o" "canvas-draw-client.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-client.o")
				   (static-options "-lcd"))))
			(warning "CD client image driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cdpdf" "cdContextPDF" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-pdf.scm" -j canvas-draw-pdf "-lcdpdf")
				(compile -c -O2 -d1 "canvas-draw-pdf.scm" -j canvas-draw-pdf -unit canvas-draw-pdf)
				(compile -s -O2 -d0 "canvas-draw-pdf.import.scm")
				
				(install-extension
				 'canvas-draw-pdf
				 '("canvas-draw-pdf.so" "canvas-draw-pdf.o" "canvas-draw-pdf.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-pdf.o")
				   (static-options "-lcdpdf"))))
			(warning "CD PDF driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cd" "cdContextPS" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-ps.scm" -j canvas-draw-ps "-lcd")
				(compile -c -O2 -d1 "canvas-draw-ps.scm" -j canvas-draw-ps -unit canvas-draw-ps)
				(compile -s -O2 -d0 "canvas-draw-ps.import.scm")
				
				(install-extension
				 'canvas-draw-ps
				 '("canvas-draw-ps.so" "canvas-draw-ps.o" "canvas-draw-ps.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-ps.o")
				   (static-options "-lcd"))))
			(warning "CD PostScript driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cd" "cdContextSVG" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-svg.scm" -j canvas-draw-svg "-lcd")
				(compile -c -O2 -d1 "canvas-draw-svg.scm" -j canvas-draw-svg -unit canvas-draw-svg)
				(compile -s -O2 -d0 "canvas-draw-svg.import.scm")
				
				(install-extension
				 'canvas-draw-svg
				 '("canvas-draw-svg.so" "canvas-draw-svg.o" "canvas-draw-svg.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-svg.o")
				   (static-options "-lcd"))))
			(warning "CD SVG driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cd" "cdContextMetafile" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-metafile.scm" -j canvas-draw-metafile "-lcd")
				(compile -c -O2 -d1 "canvas-draw-metafile.scm" -j canvas-draw-metafile -unit canvas-draw-metafile)
				(compile -s -O2 -d0 "canvas-draw-metafile.import.scm")
				
				(install-extension
				 'canvas-draw-metafile
				 '("canvas-draw-metafile.so" "canvas-draw-metafile.o" "canvas-draw-metafile.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-metafile.o")
				   (static-options "-lcd"))))
			(warning "CD metafile driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cd" "cdContextDebug" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-debug.scm" -j canvas-draw-debug "-lcd")
				(compile -c -O2 -d1 "canvas-draw-debug.scm" -j canvas-draw-debug -unit canvas-draw-debug)
				(compile -s -O2 -d0 "canvas-draw-debug.import.scm")
				
				(install-extension
				 'canvas-draw-debug
				 '("canvas-draw-debug.so" "canvas-draw-debug.o" "canvas-draw-debug.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-debug.o")
				   (static-options "-lcd"))))
			(warning "CD debug driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cd" "cdContextCGM" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-cgm.scm" -j canvas-draw-cgm "-lcd")
				(compile -c -O2 -d1 "canvas-draw-cgm.scm" -j canvas-draw-cgm -unit canvas-draw-cgm)
				(compile -s -O2 -d0 "canvas-draw-cgm.import.scm")
				
				(install-extension
				 'canvas-draw-cgm
				 '("canvas-draw-cgm.so" "canvas-draw-cgm.o" "canvas-draw-cgm.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-cgm.o")
				   (static-options "-lcd"))))
			(warning "CD CGM driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cd" "cdContextDGN" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-dgn.scm" -j canvas-draw-dgn "-lcd")
				(compile -c -O2 -d1 "canvas-draw-dgn.scm" -j canvas-draw-dgn -unit canvas-draw-dgn)
				(compile -s -O2 -d0 "canvas-draw-dgn.import.scm")
				
				(install-extension
				 'canvas-draw-dgn
				 '("canvas-draw-dgn.so" "canvas-draw-dgn.o" "canvas-draw-dgn.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-dgn.o")
				   (static-options "-lcd"))))
			(warning "CD DGN driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cd" "cdContextDXF" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-dxf.scm" -j canvas-draw-dxf "-lcd")
				(compile -c -O2 -d1 "canvas-draw-dxf.scm" -j canvas-draw-dxf -unit canvas-draw-dxf)
				(compile -s -O2 -d0 "canvas-draw-dxf.import.scm")
				
				(install-extension
				 'canvas-draw-dxf
				 '("canvas-draw-dxf.so" "canvas-draw-dxf.o" "canvas-draw-dxf.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-dxf.o")
				   (static-options "-lcd"))))
			(warning "CD DXF driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cd" "cdContextEMF" ] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-emf.scm" -j canvas-draw-emf "-lcd")
				(compile -c -O2 -d1 "canvas-draw-emf.scm" -j canvas-draw-emf -unit canvas-draw-emf)
				(compile -s -O2 -d0 "canvas-draw-emf.import.scm")
				
				(install-extension
				 'canvas-draw-emf
				 '("canvas-draw-emf.so" "canvas-draw-emf.o" "canvas-draw-emf.import.so")
				 '((version 1.0.0)
				   (static "canvas-draw-emf.o")
				   (static-options "-lcd"))))
			(warning "CD EMF driver not found, some bindings cannot be compiled"))
		
		(if (check-libraries [ "cd" "cdContextWMF"] )
			(begin
				(compile -s -O2 -d1 "canvas-draw-wmf.scm" -j canvas-draw-wmf "-lcd")
				(compile -c -O2 -d1 "canvas-draw-wmf.scm" -j canvas-draw-wmf -unit canvas-draw-wmf)
				(compile -s -O2 -d0 "canvas-draw-wmf.import.scm")
				
				(install-extension
				 'canvas-draw-wmf