Project:
Cairo Composite Manager
Code Location:
git://git.tuxfamily.org/gitroot/ccm/cairocompmgr.gitmaster
configure.ac
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
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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
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
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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
m4_define(ccm_version_major, 0) m4_define(ccm_version_minor, 3) m4_define(ccm_version_micro, 4) AC_INIT([cairo-compmgr], [ccm_version_major.ccm_version_minor.ccm_version_micro], [gandalfn@club-internet.fr], [cairo-compmgr]) AC_PREREQ(2.63) dnl **************************************************************************** dnl Define default build directory dnl **************************************************************************** AC_CONFIG_SRCDIR(src/cairo-compmgr.c) AC_CONFIG_AUX_DIR([build]) AC_CONFIG_MACRO_DIR([build]) AC_CONFIG_HEADERS(build/config.h) dnl **************************************************************************** dnl Init automake dnl **************************************************************************** AM_INIT_AUTOMAKE([1.11 dist-bzip2 silent-rules]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>]) AM_MAINTAINER_MODE dnl **************************************************************************** dnl define version dnl **************************************************************************** VERSION="ccm_version_major.ccm_version_minor.ccm_version_micro" AC_SUBST(VERSION) LIBS_VERSION="`expr ccm_version_major + ccm_version_micro`:ccm_version_minor:ccm_version_micro" AC_SUBST(LIBS_VERSION) dnl *************************************************************************** dnl Internationalization dnl *************************************************************************** GETTEXT_PACKAGE=cairo-compmgr AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The gettext translation domain]) IT_PROG_INTLTOOL([0.40.0]) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.17]) dnl **************************************************************************** dnl Packages version required dnl **************************************************************************** GTK_REQUIRED=2.16.0 CAIRO_REQUIRED=1.8.0 PIXMAN_REQUIRED=0.16.0 CAIRO_XLIB_REQUIRED=1.8.0 CAIRO_XLIB_XRENDER_REQUIRED=1.8.0 GOBJECT_INTROSPECTION_REQUIRED=0.6.2 GLADEUI_REQUIRED=3.6.7 VALA_REQUIRED=0.18.0 dnl **************************************************************************** dnl Check for build dnl **************************************************************************** AC_LANG([C]) AM_PROG_VALAC($VALA_REQUIRED) AC_SEARCH_LIBS([strerror],[cposix]) dnl **************************************************************************** dnl Check for profiler flags dnl **************************************************************************** AC_ARG_ENABLE(profile, [ --disable-profile Enable profile], [use_profile=$enableval], [use_profile=no]) if test "x$use_profile" = "xyes"; then CFLAGS="$CFLAGS -pg" fi dnl **************************************************************************** dnl Check for libtool dnl **************************************************************************** LT_PREREQ([2.2.6]) LT_INIT([disable-static]) dnl **************************************************************************** dnl Check for packages dnl **************************************************************************** PKG_CHECK_MODULES(CAIRO_COMPMGR, [xcomposite, xdamage, xext, xi, x11, ice, sm, xrandr, gl, cairo >= $CAIRO_REQUIRED, pixman-1 >= $PIXMAN_REQUIRED, gtk+-2.0 >= $GTK_REQUIRED libvala-0.18 >= $VALA_REQUIRED]) CAIRO_COMPMGR_CFLAGS="-O3 -flto -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS $CAIRO_COMPMGR_CFLAGS" CAIRO_COMPMGR_LIBS="-O3 -flto $CAIRO_COMPMGR_LIBS" AC_SUBST(CAIRO_COMPMGR_CFLAGS) AC_SUBST(CAIRO_COMPMGR_LIBS) dnl *************************************************************************** dnl check for debug dnl *************************************************************************** AC_SEARCH_LIBS(backtrace_symbols, [execinfo]) AC_CHECK_FUNCS(backtrace_symbols) AC_ARG_ENABLE(edebug, [ --disable-edebug Disable enhanced debug message], [edebug=$enableval], [edebug=yes]) if test x"$edebug" = xyes; then AC_CHECK_LIB(bfd, main, [BFD_LIBS="-lbfd"], []) AC_CHECK_LIB(iberty, main, [IBERTY_LIBS="-liberty"], []) EDEBUG_LIBS="$BFD_LIBS $IBERTY_LIBS" AC_SUBST(EDEBUG_LIBS) if test "$EDEBUG_LIBS" = "-lbfd -liberty"; then AC_DEFINE(HAVE_EDEBUG, 1, [Enhanced debug enabled]) fi fi dnl **************************************************************************** dnl Check for XInput2 dnl ***************************************************************************** LIBS="$CAIRO_COMPMGR_LIBS $LIBS" AC_CHECK_FUNC(XSetClientPointer,AC_DEFINE(HAVE_XI2,1,[XInput Version 2 Enabled])) AM_CONDITIONAL(HAVE_XI2, [test "x$ac_cv_func_XSetClientPointer" = "xyes"] ) AC_SUBST(HAVE_XI2) dnl **************************************************************************** dnl Check for gtk-doc and docbook dnl **************************************************************************** GTK_DOC_CHECK([1.6]) dnl **************************************************************************** dnl Check for gconf dnl **************************************************************************** AC_ARG_ENABLE(gconf, [ --enable-gconf Enable GConf backend], [gconf=$enableval], [gconf=no]) if test x"$gconf" = xyes; then PKG_CHECK_MODULES(CCM_GCONF, [gconf-2.0], [gconf="yes"], [gconf="no"]) AC_PATH_PROG(GCONFTOOL, gconftool-2, no) if test x"$GCONFTOOL" = xno; then AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf]) fi AM_GCONF_SOURCE_2 AC_SUBST(CCM_GCONF_CFLAGS) AC_SUBST(CCM_GCONF_LIBS) else AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, [test x$gconf = xyes]) fi AM_CONDITIONAL(ENABLE_GCONF, [test x$gconf = xyes]) dnl **************************************************************************** dnl Check for gobject introspection dnl **************************************************************************** AC_ARG_ENABLE(gobject-introspection, [ --enable-gobject-introspection Enable GObject introspection], [gir=$enableval], [gir=no]) if [ test x$gir = xyes ]; then PKG_CHECK_MODULES(CCM_GOBJECT_INTROSPECTION, [gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQUIRED], [gir="yes"], [gir="no"]) AC_SUBST(CCM_GOBJECT_INTROSPECTION_CFLAGS) AC_SUBST(CCM_GOBJECT_INTROSPECTION_LIBS) fi if [ test x$gir = xyes ]; then G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` AC_SUBST(G_IR_SCANNER) G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` AC_SUBST(G_IR_COMPILER) G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` AC_SUBST(G_IR_GENERATE) GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` AC_SUBST(GIRDIR) TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" AC_SUBST(TYPELIBDIR) if test "$prefix" = NONE then GIRINSTDIR=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=girdir gobject-introspection-1.0` AC_SUBST(GIRINSTDIR) TYPELIBINSTDIR="$($PKG_CONFIG --define-variable=prefix=$prefix --variable=typelibdir gobject-introspection-1.0)" AC_SUBST(TYPELIBINSTDIR) fi fi AM_CONDITIONAL(ENABLE_GOBJECT_INTROSPECTION, [test x$gir = xyes]) dnl **************************************************************************** dnl Check glade3 dnl **************************************************************************** PKG_CHECK_MODULES(CCM_GLADE, [gladeui-1.0 >= $GLADEUI_REQUIRED], [gladeui="yes"], [gladeui="no"]) if [ test x$gladeui = xyes ]; then if test "$prefix" = NONE then glademoduledir=`$PKG_CONFIG --variable=moduledir gladeui-1.0` gladecatalogdir=`$PKG_CONFIG --variable=catalogdir gladeui-1.0` else glademoduledir=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=moduledir gladeui-1.0` gladecatalogdir=`$PKG_CONFIG --define-variable=prefix=$prefix --variable=catalogdir gladeui-1.0` fi AC_SUBST(glademoduledir) AC_SUBST(gladecatalogdir) AC_SUBST(CCM_GLADE_CFLAGS) AC_SUBST(CCM_GLADE_LIBS) fi AM_CONDITIONAL(ENABLE_GLADE, [test x$gladeui = xyes]) dnl **************************************************************************** dnl Check for build perf plugin dnl **************************************************************************** AC_ARG_ENABLE(perf-plugin, [ --enable-perf-plugin Enable perf plugin], [perfplugin=$enableval], [perfplugin=no]) if [ test x$perfplugin = xyes ]; then PKG_CHECK_MODULES(CCM_PERF_PLUGIN, [libgtop-2.0, libwnck-1.0], [perfplugin="yes"], [perfplugin="no"]) AC_SUBST(CCM_PERF_PLUGIN_CFLAGS) AC_SUBST(CCM_PERF_PLUGIN_LIBS) AC_ARG_ENABLE(perf-cuda, [ --enable-perf-cuda Enable cuda checker in perf plugin], [cudaperf=$enableval], [cudaperf=no]) if [ test x$cudaperf = xyes ]; then AC_CHECK_LIB(cuda, main, [CUDA_LIBS="-lcuda"], [cudaperf=no]) CCM_PERF_PLUGIN_LIBS="$CCM_PERF_PLUGIN_LIBS $CUDA_LIBS" fi else cudaperf="no" fi AM_CONDITIONAL(ENABLE_CUDA_PERF, [test x$cudaperf = xyes]) AM_CONDITIONAL(ENABLE_PERF_PLUGIN, [test x$perfplugin = xyes]) dnl **************************************************************************** dnl Check for build stats plugin dnl **************************************************************************** AC_ARG_ENABLE(stats-plugin, [ --enable-stats-plugin Enable stats plugin], [statsplugin=$enableval], [statsplugin=no]) if [ test x$statsplugin = xyes ]; then PKG_CHECK_MODULES(CCM_STATS_PLUGIN, [libgtop-2.0], [statsplugin="yes"], [statsplugin="no"]) AC_SUBST(CCM_STATS_PLUGIN_CFLAGS) AC_SUBST(CCM_STATS_PLUGIN_LIBS) nvmlstats=yes AC_CHECK_LIB(nvidia-ml, nvmlInit, [NVIDIA_LIBS="-lnvidia-ml"], [nvmlstats=no]) if [ test x$nvmlstats = xyes ]; then CCM_STATS_PLUGIN_LIBS="$CCM_STATS_PLUGIN_LIBS $NVIDIA_LIBS" fi fi AM_CONDITIONAL(ENABLE_STATS_PLUGIN, [test x$statsplugin = xyes]) AM_CONDITIONAL(HAVE_NVML, [test x$nvmlstats = xyes]) dnl **************************************************************************** dnl Check for xrender backend dnl **************************************************************************** PKG_CHECK_MODULES(CCM_XRENDER_BACKEND, [xrender, cairo-xlib >= $CAIRO_XLIB_REQUIRED, cairo-xlib-xrender >= $CAIRO_XLIB_XRENDER_REQUIRED], [xrenderbackend="yes"], [xrenderbackend="no"]) AC_SUBST(CCM_XRENDER_BACKEND_CFLAGS) AC_SUBST(CCM_XRENDER_BACKEND_LIBS) AM_CONDITIONAL(HAVE_XRENDER_BACKEND, [test x$xrenderbackend = xyes]) AC_CONFIG_FILES([ Makefile lib/Makefile src/Makefile tools/Makefile gir/Makefile vapi/Makefile po/Makefile.in doc/Makefile doc/cairo-compmgr.1 doc/reference/Makefile doc/reference/version.xml plugins/Makefile plugins/shadow/Makefile plugins/shadow/ccm-shadow.plugin.desktop plugins/opacity/Makefile plugins/opacity/ccm-opacity.plugin.desktop plugins/fade/Makefile plugins/fade/ccm-fade.plugin.desktop plugins/freeze/Makefile plugins/freeze/ccm-freeze.plugin.desktop plugins/menu-animation/Makefile plugins/menu-animation/ccm-menu-animation.plugin.desktop plugins/window-animation/Makefile plugins/window-animation/ccm-window-animation.plugin.desktop plugins/magnifier/Makefile plugins/magnifier/ccm-magnifier.plugin.desktop plugins/mosaic/Makefile plugins/mosaic/ccm-mosaic.plugin.desktop plugins/perf/Makefile plugins/perf/ccm-perf.plugin.desktop plugins/decoration/Makefile plugins/decoration/ccm-decoration.plugin.desktop plugins/snapshot/Makefile plugins/snapshot/ccm-snapshot.plugin.desktop plugins/vala-test/Makefile plugins/vala-test/ccm-vala-window-plugin.plugin.desktop plugins/automate/Makefile plugins/automate/ccm-automate.plugin.desktop plugins/clone/Makefile plugins/clone/ccm-clone.plugin.desktop plugins/stats/Makefile plugins/stats/ccm-stats.plugin.desktop test/Makefile data/Makefile data/cairo-compmgr.desktop.in data/cairo-compmgr.pc ]) AC_OUTPUT echo " " echo "-------------------------------------------------------------------" echo "Conditionally built backends:" echo "-------------------------------------------------------------------" if [ test x$edebug = xyes ]; then echo "Enable enhanced debug messages: .............YES" else echo "Enable enhanced debug messages: .............NO" fi if [ test x$gir = xyes ]; then echo "Enable GObject introspection: ...............YES" else echo "Enable GObject introspection: ...............NO" fi if [ test x$gconf = xyes ]; then echo "Enable GConf backend : ......................YES" else echo "Enable GConf backend: .......................NO" fi if [ test x$perfplugin = xyes ]; then echo "Building perf plugin: .......................YES" else echo "Building perf plugin: .......................NO" fi if [ test x$cudaperf = xyes ]; then echo "Building CUDA perf: ....................... YES" else echo "Building CUDA perf: ....................... NO" fi if [ test x$statsplugin = xyes ]; then echo "Building stats plugin: ......................YES" else echo "Building stats plugin: ......................NO" fi if [ test x$nvmlstats = xyes ]; then echo "Building NVML stats: ...................... YES" else echo "Building NVML stats: ...................... NO" fi if [ test x$xrenderbackend = xyes ]; then echo "Building XRender backend: ...................YES" else echo "Building XRender backend: ...................NO" fi
