[PATCH] xserver: xorg-server.m4: use PKG_CONFIG variable rather than executable name
Gaetan Nadon
gaetan.nadon at videotron.ca
Sun Dec 20 11:41:12 PST 2009
Hi,
This is a preventive maintenance patch to fix a dormant bug. It is
intended for the git master branch.
The xorg-server macro XORG_DRIVER_CHECK_EXT() uses the hard-coded
executable name "pkg-config" (without a path) rather than the variable
PKG_CONFIG which is defined during configuration:
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
The user is invited to overwrite the value of PKG_CONFIG if need be.
This feature will only work if all invocation of this program is done
through PKG_CONFIG variable. All driver modules use this macro. Output
of ./configure --help:
Some influential environment variables:
...
PKG_CONFIG path to pkg-config utility
For reference:
========
This is the code that gets executed when the macro is expanded (example
using from driver/acecad):
# Checks for extensions
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include "xorg-server.h"
#if !defined RANDR
#error RANDR not defined
#endif
int
main ()
{
;
return 0;
}
_ACEOF
And the result of the test for RANDR is:
configure:12628: checking if RANDR is defined
configure:12630: result: yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.x.org/archives/xorg-devel/attachments/20091220/d0c82885/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-macros-use-PKG_CONFIG-variable-rather-than-executab.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://lists.x.org/archives/xorg-devel/attachments/20091220/d0c82885/attachment.bin
More information about the xorg-devel
mailing list