summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-03-12 14:39:19 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-03-12 14:39:19 +1000
commitff5fb43a4b38c707a1a9948ace621a62b5b2457a (patch)
tree8b275f0b6dc661806029d4e4d18b556554a526d3
parenta69c7a4c539f933df3f6aa5444cdde95e4d5698a (diff)
Xext: Link to external libraries when necessary.
Although the DDX should be linked to the necessary libraries, we may also need to pull them in directly to the module to ensure the symbols are resolved at runtime. Should fix this bug with XSELINUX: /usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/extensions/libextmod.so: undefined symbol: is_selinux_enabled -v2: use _LIBADD instead of _LIBS; remove SELINUX_LIBS from XSERVER_SYS_LIBS as it should only be needed in extmod. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 178da6534fe7ab4b99fb87925c04e6f963c88583) Conflicts: configure.ac
-rw-r--r--Xext/Makefile.am4
-rw-r--r--configure.ac2
2 files changed, 5 insertions, 1 deletions
diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index ac45f955a..4f05ce9f1 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -32,6 +32,7 @@ BUILTIN_SRCS = \
# Sources always included in libXextmodule.la & libXext.la. That's right, zero.
MODULE_SRCS =
+MODULE_LIBS =
# Optional sources included if extension enabled by configure.ac rules
@@ -83,6 +84,7 @@ endif
XSELINUX_SRCS = xselinux.c xselinux.h
if XSELINUX
MODULE_SRCS += $(XSELINUX_SRCS)
+MODULE_LIBS += $(SELINUX_LIBS)
endif
# Security extension: multi-level security to protect clients from each other
@@ -119,11 +121,13 @@ endif
# Now take all of the above, mix well, bake for 10 minutes and get libXext*.la
libXext_la_SOURCES = $(BUILTIN_SRCS) $(MODULE_SRCS)
+libXext_la_LIBADD = $(MODULE_LIBS)
if XORG
libXextbuiltin_la_SOURCES = $(BUILTIN_SRCS)
libXextmodule_la_SOURCES = $(MODULE_SRCS)
+libXextmodule_la_LIBADD = $(MODULE_LIBS)
endif
EXTRA_DIST = \
diff --git a/configure.ac b/configure.ac
index 08e444ec5..9dca9871f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1326,7 +1326,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
#
XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS} ${SHA1_CFLAGS}"
XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
-XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SHA1_LIB} ${SELINUX_LIBS}"
+XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
AC_SUBST([XSERVER_LIBS])
AC_SUBST([XSERVER_SYS_LIBS])