AC_PATH_X and friends explicitly look into /usr/lib

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

AC_PATH_X and friends are unusual in autoconf in that they
*explicitly* look into /usr/ for files (see _AC_PATH_X_DIRECT).
Notable this is the *only* macro in autoconf that explicitly looks
into /usr.

To write the logic out in English: iterate through a long list of
paths in /usr for a X11/Xlib.h file, and if that exists try a compile
test.  Then iterate through the same set of paths after s/include/lib/
looking for anything with a library extension (.a .so .sl .dynlib .dll
.la) and if one is found try a link test.

The big failure case is in cross compilation situations 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.

My preferred solution would be to delete AC_PATH_X and friends and get
everyone to use PKG_CHECK_MODULES(x11), but I can see that isn't a
realistic solution.  Because the failure case above is a real problem
for us, we just delete all of that code.  Does anyone have a better
solution that would continue to work but not be so dramatically
dependent on host assumptions?

Cheers,
Ross




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux