From b13bf675acbd384cffdcb0ecb6430a5d7b4a19e0 Mon Sep 17 00:00:00 2001
From: Mihai Moldovan <ionic@ionic.de>
Date: Tue, 26 Dec 2017 04:10:27 +0100
Subject: nxcompshad/src/Makefile.am: implement libX11 RPATH/RUNPATH override.

Same method as used in the previous commit, but easier done thanks to
autotools and libtool.

Fixes: ArcticaProject/nx-libs#610
---
 nxcompshad/src/Makefile.am | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'nxcompshad/src')

diff --git a/nxcompshad/src/Makefile.am b/nxcompshad/src/Makefile.am
index 33f3abdb9..670bc4d1e 100644
--- a/nxcompshad/src/Makefile.am
+++ b/nxcompshad/src/Makefile.am
@@ -13,6 +13,7 @@ libXcompshad_la_SOURCES =				\
     $(NULL)
 
 libXcompshad_la_LIBADD =				\
+    -lX11						\
     @Xext_LIBS@						\
     @Xdamage_LIBS@					\
     @Xrandr_LIBS@					\
@@ -36,7 +37,10 @@ AM_CPPFLAGS =						\
     -I$(top_srcdir)/../nx-X11/exports/include		\
     $(NULL)
 
-libXcompshad_la_LDFLAGS = -version-number @LT_COMPSHAD_VERSION@ -no-undefined
+libXcompshad_la_LDFLAGS =				\
+    -version-number @LT_COMPSHAD_VERSION@ -no-undefined	\
+    -R '$(libdir)/nx/X11'				\
+    $(NULL)
 
 libXcompshadincludedir = $(includedir)/nx
 libXcompshadinclude_HEADERS =				\
-- 
cgit v1.2.3


From 44f8c424e70311283b274c3e9fddbd7ca928f003 Mon Sep 17 00:00:00 2001
From: Mihai Moldovan <ionic@ionic.de>
Date: Thu, 28 Dec 2017 23:16:32 +0100
Subject: nxcompshad/src/Makefile.am: enable new ELF dtags to force RUNPATH
 creation for libXcompshad.

---
 nxcompshad/src/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

(limited to 'nxcompshad/src')

diff --git a/nxcompshad/src/Makefile.am b/nxcompshad/src/Makefile.am
index 670bc4d1e..f7beac86e 100644
--- a/nxcompshad/src/Makefile.am
+++ b/nxcompshad/src/Makefile.am
@@ -39,6 +39,7 @@ AM_CPPFLAGS =						\
 
 libXcompshad_la_LDFLAGS =				\
     -version-number @LT_COMPSHAD_VERSION@ -no-undefined	\
+    -Wl,--enable-new-dtags				\
     -R '$(libdir)/nx/X11'				\
     $(NULL)
 
-- 
cgit v1.2.3