summaryrefslogtreecommitdiffstats
path: root/package/xstroke/xstroke-fix-link-issues.patch
blob: 9a6d71ed173ecbfa71e3d3c229821d62fd2c10e5 (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
Fix link issues by linking against all needed libraries

Since gcc 4.6, all libraries that are directly used must be explicitly
passed on the command line. In the case of xstroke, linking against
Xrender, Xext and dl was missing. For the first two, they are added
through addition PKG_CHECK_MODULES() checks, for the latter, it is
added next to -lm and -lpthread in Makefile.am.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Makefile.am
===================================================================
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,7 +40,7 @@
 BUILT_SOURCES = rec_parse.h rec_lex.h rec_lex.c
 AM_YFLAGS = -d
 
-xstroke_LDADD = @XSTROKE_LIBS@ -lm -lpthread $(X_LIBS) -lXpm -lXtst
+xstroke_LDADD = @XSTROKE_LIBS@ -ldl -lm -lpthread $(X_LIBS) -lXpm -lXtst
 AM_CFLAGS = @XSTROKE_CFLAGS@ -DXSTROKE_CONF_DIR='"$(sysconfdir)/xstroke"' $(X_CFLAGS)
 
 EXTRA_DIST = xstroke_active.xpm xstroke_inactive.xpm etc/alphabet
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@
 AC_CHECK_FUNCS([gettimeofday localtime_r])
 
 AC_PATH_XTRA
-PKG_CHECK_MODULES(XSTROKE, xft)
+PKG_CHECK_MODULES(XSTROKE, [xft xrender xext])
 
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT