[PATCH] xserver: xorg-server.m4: use PKG_CONFIG variable rather than executable name
Gaetan Nadon
memsize at videotron.ca
Wed Dec 30 13:32:58 PST 2009
Resending.
A real life example just poped-up today where the PKG_CONFIG variable is
used. I am also fixing the 76 other modules where "pkg-config" is
hard-coded.
# To test each version, you'll want to just build it over your MacPorts:
export CPPFLAGS=-I/opt/local/include -I/path/to/macports/dports/x11/xorg-server-devel/files/dri
export PKG_CONFIG=/opt/local/bin/pkg-config
Reviewed by:
http://lists.x.org/archives/xorg-devel/2009-December/004290.html
On Sun, 2009-12-20 at 14:41 -0500, Gaetan Nadon wrote:
> 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
>
>
>
>
>
>
> _______________________________________________
> xorg-devel mailing list
> xorg-devel at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.x.org/archives/xorg-devel/attachments/20091230/bedb3b46/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/20091230/bedb3b46/attachment.bin
More information about the xorg-devel
mailing list