Commit 178da653 authored by Eamon Walsh's avatar Eamon Walsh Committed by Peter Hutterer

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: default avatarDan Nicholson <dbn.lists@gmail.com>
Signed-off-by: default avatarEamon Walsh <ewalsh@tycho.nsa.gov>
Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
parent a2ea8c2f
......@@ -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_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.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 = \
......
......@@ -1432,7 +1432,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
#
XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}"
XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS} ${SELINUX_LIBS}"
XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
AC_SUBST([XSERVER_LIBS])
AC_SUBST([XSERVER_SYS_LIBS])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment