This helps ensure we don't ship a library with undefined symbols, which
can easily happen with multiple inter-dependent DSOs.
Signed-off-by: Ran Benita <ran234@gmail.com>
AM_CFLAGS = $(BASE_CFLAGS)
AM_LDFLAGS = -no-undefined
+if HAVE_NO_UNDEFINED
+AM_LDFLAGS += -Wl,--no-undefined
+endif
AM_YFLAGS = -d -p _xkbcommon_
XORG_TESTSET_CFLAG([BASE_CFLAGS], [-fvisibility=hidden])
+XORG_CHECK_LINKER_FLAGS([-Wl,--no-undefined], [have_no_undefined=yes])
+AM_CONDITIONAL([HAVE_NO_UNDEFINED], [test "x$have_no_undefined" = xyes])
+
# Define a configuration option for the XKB config root
xkb_base=`$PKG_CONFIG --variable=xkb_base xkeyboard-config`
if test "x$xkb_base" = x; then