]> git.ipfire.org Git - thirdparty/autoconf.git/commit
Don’t search for X11 when cross compiling (#110345)
authorZack Weinberg <zackw@panix.com>
Mon, 2 Nov 2020 00:23:12 +0000 (19:23 -0500)
committerZack Weinberg <zackw@panix.com>
Mon, 2 Nov 2020 00:51:47 +0000 (19:51 -0500)
commit33c3a47c04ab70a4dd54963fe433a171bc03747f
tree906b142092f4fcaeacf0d4ae05d0c9fe31809b85
parentbf19f95cf4766c8a22583dfdbbbbc67a97c4b6b0
Don’t search for X11 when cross compiling (#110345)

This is undesirable because X11 development headers and libraries
found by searching /usr are much more likely to belong to the build
operating system than the host operating system (being cross-compiled
for).  A particularly problematic case, from the original bug report,
is “using a sysroot where the target is binary compatible with the
host.  In this case AC_PATH_X will happily look at /usr and say that
yes, X is available, even if the sysroot doesn't have X.”

To cross-compile X client applications, the recommended procedure is
to put X11 headers and libraries for the host system in the cross
compiler’s default search path; alternatively, --x-includes and
--x-libraries can be used.

Fixes bug #110345.  Problem reported by Ross Burton.

 * lib/autoconf/libs.m4 (_AC_PATH_X): Before doing anything else,
   see whether a test compilation with no special options (just -lX11)
   will work.  If it doesn’t, only invoke _AC_PATH_X_XMKMF and
   _AC_PATH_X_DIRECT when not cross compiling.
NEWS
lib/autoconf/libs.m4