libxklavier-3.8 (and all other recent previous versions) uses symbols from libX11, but does not pass -lX11 when linking. That breaks building libxklavier on systems that need -no-undefined, can prevent the lib from being dlopen()ed, and can cause weird breakage for other packages that try to use the lib (*they* might need to pass -lX11 even if they are't x11ish).
According to http://webcvs.freedesktop.org/xklavier/libxklavier/libxklavier/Makefile.am?revision=1.22&view=markup LIBADD include X_LIBS X_LIBS are populated by AC_PATH_XTRA in http://webcvs.freedesktop.org/xklavier/libxklavier/configure.in?revision=1.51&view=markup So libX11 should be linked, I guess. Could you please check?
My X_LIBS=-L/usr/X11R6/lib; looking at libs.m4 from autoconf-2.63, that is as expected: lots of tests and fallback-tests to *find* x11 (including looking for libX11 various ways) and propagate -L and -I path flags, and some platform-dependent other flags for x11 usage, but not setting any -l flags to link agaist libX11 itself.
You're right, -lX11 is not added to X_LIBS. But in libxklaiver.la I still see dependency_libs=' -lX11 /usr/lib/libxml2.la /usr/lib/libgobject-2.0.la /usr/lib/libglib-2.0.la -lXi -lxkbfile' and $ ldd .libs/libxklavier.so linux-vdso.so.1 => (0x00007fff1a5fe000) libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fdb12020000) ... So how does your libtool process that situation?
My libtool obviously *doesn't* link it against libX11 nor mention libX11 in .la or otool (my platform's equivalent of ldd). Given that you *do* get the link, the real question is where/how is your libtool getting it? Is it passed as part of the libtool command (via what Makefile variable, and how is autoconf figuring it out?) or is libtool picking it from a dependent-lib's .la (which one?)
Actually, I see it depends on the system. On some other system it is not autoincluded. So I am adding it to Makefile.am.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.