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
|
AC_INIT(clayland, 0.1)
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AC_PROG_CC
LT_INIT
AC_CONFIG_HEADERS([clayland-config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_SILENT_RULES([yes])
PKG_PROG_PKG_CONFIG()
clayland_deps="wayland-server clutter-1.0"
x11_deps="clutter-x11-1.0 clutter-egl-1.0 x11-xcb xcb-dri2"
clutter_backend="auto"
AC_ARG_WITH([backend],
[AC_HELP_STRING([--with-backend=@<:@x11-egl,generic,auto@:>@],
[Select Clutter backend - determines whether DRM buffers are possible])],
[clutter_backend=$with_backend])
PKG_CHECK_EXISTS([$x11_deps],[
have_x11=yes
],[
have_x11=no
])
case "$clutter_backend" in
x11-egl)
if test "x$have_x11" != "xyes"; then
AC_MSG_ERROR([Can't build x11-egl backend: missing dependencies])
fi
;;
generic)
have_x11=no
;;
auto)
if test "x$have_x11" = "xyes"; then
clutter_backend="x11-egl"
else
clutter_backend="generic"
fi
;;
*)
AC_MSG_ERROR([Invalid backend selected])
;;
esac
have_drm=$have_x11
AM_CONDITIONAL(HAVE_X11, test "x$have_x11" = "xyes")
if test "x$have_x11" = "xyes"; then
clayland_deps="$clayland_deps $x11_deps"
AC_DEFINE([HAVE_DRI2_X11], [1],
[Define if DRI2 is useable through clutter-x11 and xcb])
# workaround a bug in xcb-dri2 generated by xcb-proto 1.6
AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [],
[AC_DEFINE([XCB_DRI2_CONNECT_DEVICE_NAME_BROKEN], [1],
[Define to 1 if xcb_dri2_connect_device_name is broken])])
fi
PKG_CHECK_MODULES(CLAYLAND, [$clayland_deps])
PKG_CHECK_MODULES(EXAMPLE, [clutter-1.0 gthread-2.0 wayland-server])
if test "x$GCC" = "xyes"; then
GCC_CFLAGS="-Wall -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
fi
AC_SUBST(GCC_CFLAGS)
AC_CONFIG_FILES([Makefile src/Makefile demos/Makefile])
AC_OUTPUT
echo ""
echo "Clayland"
echo ""
echo " Clutter backend: $clutter_backend"
echo " DRM buffer support: $have_drm"
|