[Mesa-dev] [PATCH:mesa-demos] Allow builders to specify GLEW_CFLAGS & GLEW_LIBS

Alan Coopersmith alan.coopersmith at oracle.com
Thu Dec 30 09:49:51 PST 2010


On 12/30/10 09:27 AM, tom fogal wrote:
> Alan Coopersmith <alan.coopersmith at oracle.com> writes:
>> configure --help says that builders can set those variables to override
>> pkgconfig settings, but configure.ac was overwriting those before calling
>> PKG_CHECK_MODULES
>>
>> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
>> ---
>>  configure.ac |    8 +++-----
>>  1 files changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index d6753a9..36e42f8 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -81,17 +81,15 @@ AC_CHECK_LIB([glut],
>>  		[],
>>  		[glut_enabled=no])
>>  
>> -GLEW_CFLAGS=""
>> -GLEW_LIBS="-lGLEW"
>>  dnl Include a fallback path for GLEW for the moment while not all distros
>>  dnl have picked up the .pc file.
>>  PKG_CHECK_MODULES(GLEW, [glew], [], [
>>  		  AC_CHECK_HEADER([GL/glew.h],
>> -		  [],
>> -		  AC_MSG_ERROR([GLEW required]))
>> +				  [GLEW_CFLAGS=""],
>> +				  AC_MSG_ERROR([GLEW required]))
> 
> Isn't this going to mean that GLEW's w/o the .pc file cannot be used?
> The .pc is too new for that, IMHO; I think there's only been one
> release with it.

No - in fact it should make it easier to use GLEW's without the .pc as
builders can manually set GLEW_CFLAGS & GLEW_LIBS, to specify the right
settings and then PKG_CHECK_MODULES should just use them.

> Can we just remove the two lines that explicitly set these vars?

No, because then they're left unset for people without .pc files who
don't manually set them, so they don't get the GLEW_LIBS="-lGLEW" setting.
That's why I moved them down to be set in the case that they weren't
already set (in which case PKG_CHECK_MODULES uses them), the .pc file
wasn't found (in which case PKG_CHECK_MODULES uses it), and the
AC_CHECK_HEADER & AC_CHECK_LIB succeed - the places I added them are
the "action-if-found" options to those macros.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the mesa-dev mailing list