summarylogtreecommitdiffstats
path: root/glamor.patch
blob: b20f8a55337683ead146550f584cb331cb49016b (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
--- a/configure.ac
+++ b/configure.ac
@@ -25,9 +25,11 @@ PKG_CHECK_MODULES([XORG_SERVER], [xorg-server >= 0], [],
   [AC_MSG_ERROR([please install xserver-xorg-dev, xorg-x11-server-sdk or xorg-x11-server-devel])])
 if test "x${enable_glamor}" = "xyes"; then
   PKG_CHECK_MODULES([XORG_SERVER_GLAMOR], [xorg-server >= 1.19.0])
+  PKG_CHECK_MODULES([LIBDRM], [libdrm >= 0], [], [AC_MSG_ERROR([please install libdrm-dev or libdrm-devel])])
   PKG_CHECK_MODULES([XORG_SERVER_GBM], [gbm >= 0], [], [AC_MSG_ERROR([please install libgbm-dev or mesa-libgbm-devel])])
   PKG_CHECK_MODULES([XORG_SERVER_EPOXY], [epoxy >= 0], [], [AC_MSG_ERROR([please install libepoxy-dev or libepoxy-devel])])
   PKG_CHECK_MODULES([XORG_SERVER_EGL], [egl >= 0], [], [AC_MSG_ERROR([please install libegl1-mesa-dev or mesa-libEGL-devel])])
+  PKG_CHECK_VAR([XORG_SERVER_MODULES], [xorg-server], [moduledir])
 fi

 if test "x$XRDP_CFLAGS" = "x"; then



--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -22,12 +22,13 @@ if WITH_GLAMOR
 EXTRA_FLAGS += -DXORGXRDP_GLAMOR -DGLAMOR_FOR_XORG
 EXTRA_SOURCES += rdpEgl.c
 EXTRA_HEADERS += rdpEgl.h
-EGLLIB += -lepoxy
 endif

 AM_CFLAGS = \
   $(XORG_SERVER_CFLAGS) \
   $(XRDP_CFLAGS) \
+  $(LIBDRM_CFLAGS) \
+  $(EPOXY_CFLAGS) \
   -DPACKAGE_VERSION_MAJOR=@package_version_major@ \
   -DPACKAGE_VERSION_MINOR=@package_version_minor@ \
   -DPACKAGE_VERSION_PATCHLEVEL=@package_version_patchlevel@ \
@@ -82,6 +83,9 @@ noinst_HEADERS = \
 libxorgxrdp_la_LTLIBRARIES = libxorgxrdp.la

 libxorgxrdp_la_LDFLAGS = -module -avoid-version
+if WITH_GLAMOR
+libxorgxrdp_la_LDFLAGS += $(EPOXY_LDFLAGS) -L$(XORG_SERVER_MODULES) -lglamoregl -Wl,-rpath,$(XORG_SERVER_MODULES)
+endif

 libxorgxrdp_ladir = $(moduledir)



--- a/xrdpdev/Makefile.am
+++ b/xrdpdev/Makefile.am
@@ -13,6 +13,7 @@ endif
 AM_CFLAGS = \
   $(XORG_SERVER_CFLAGS) \
   $(XRDP_CFLAGS) \
+  $(LIBDRM_CFLAGS) \
   -DPACKAGE_VERSION_MAJOR=@package_version_major@ \
   -DPACKAGE_VERSION_MINOR=@package_version_minor@ \
   -DPACKAGE_VERSION_PATCHLEVEL=@package_version_patchlevel@ \



--- a/xrdpkeyb/Makefile.am
+++ b/xrdpkeyb/Makefile.am
@@ -11,6 +11,9 @@ AM_CFLAGS = \
 xrdpkeyb_drv_la_LTLIBRARIES = xrdpkeyb_drv.la

 xrdpkeyb_drv_la_LDFLAGS = -module -avoid-version
+if WITH_GLAMOR
+xrdpkeyb_drv_la_LDFLAGS += -L$(XORG_SERVER_MODULES) -lglamoregl -Wl,-rpath,$(XORG_SERVER_MODULES)
+endif

 xrdpkeyb_drv_ladir = $(moduledir)/input