<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.26.0">
</HEAD>
<BODY>
Resending. <BR>
<BR>
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.
<BLOCKQUOTE>
<PRE>
<TT># To test each version, you'll want to just build it over your MacPorts:</TT>
<TT>export CPPFLAGS=-I/opt/local/include -I/path/to/macports/dports/x11/xorg-server-devel/files/dri</TT>
<TT>export PKG_CONFIG=/opt/local/bin/pkg-config</TT>
</PRE>
</BLOCKQUOTE>
<BR>
Reviewed by:<BR>
<A HREF="http://lists.x.org/archives/xorg-devel/2009-December/004290.html">http://lists.x.org/archives/xorg-devel/2009-December/004290.html</A><BR>
<BR>
<BR>
On Sun, 2009-12-20 at 14:41 -0500, Gaetan Nadon wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
Hi,<BR>
<BR>
This is a preventive maintenance patch to fix a dormant bug. It is intended for the git master branch.<BR>
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:<BR>
<BR>
<BLOCKQUOTE>
<TT>checking for pkg-config... /usr/bin/pkg-config</TT><BR>
<TT>checking pkg-config is at least version 0.9.0... yes</TT><BR>
<BR>
</BLOCKQUOTE>
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:<BR>
<BR>
<BLOCKQUOTE>
<TT>Some influential environment variables:</TT><BR>
<TT>...</TT><BR>
<TT>PKG_CONFIG path to pkg-config utility</TT><BR>
</BLOCKQUOTE>
<BR>
For reference:<BR>
========<BR>
<BR>
This is the code that gets executed when the macro is expanded (example using from driver/acecad):<BR>
<BR>
<BLOCKQUOTE>
<PRE>
# Checks for extensions
        SAVE_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS -I`<B><FONT COLOR="#ff0000">$PKG_CONFIG</FONT></B> --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
</PRE>
</BLOCKQUOTE>
<BR>
And the result of the test for RANDR is:<BR>
<BR>
<BLOCKQUOTE>
<PRE>
configure:12628: checking if RANDR is defined
configure:12630: result: yes
</PRE>
</BLOCKQUOTE>
<BR>
<BR>
<BR>
<BR>
<PRE>
_______________________________________________
xorg-devel mailing list
<A HREF="mailto:xorg-devel@lists.x.org">xorg-devel@lists.x.org</A>
<A HREF="http://lists.x.org/mailman/listinfo/xorg-devel">http://lists.x.org/mailman/listinfo/xorg-devel</A>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>