[Mesa-dev] [PATCH 1/3] Only require libdrm if direct rendering is actually enabled.

Jon TURNEY jon.turney at dronecode.org.uk
Wed Mar 23 11:51:20 PDT 2011


On 15/03/2011 00:35, Jakob Bornecrantz wrote:
> On Mon, Mar 14, 2011 at 11:08 PM, Jon TURNEY
>>  dnl
>>  dnl libGL configuration per driver
>>  dnl
>> @@ -762,12 +770,17 @@ dri|no) # these checks are still desired when there is no mesa_driver
>>         AC_MSG_ERROR([Can't use static libraries for DRI drivers])
>>     fi
>>
>> -    # Check for libdrm
>> -    PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
>> -    PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
>>     PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED])
>> -    GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED glproto >= $GLPROTO_REQUIRED"
>> -    DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
>> +    GL_PC_REQ_PRIV="glproto >= $GLPROTO_REQUIRED"
> 
> Isn't glproto checked above? And if not for some reason isn't it
> dropped below when driglx_direct==yes?

I'm not sure I understand this comment.

The PKG_CHECK_MODULES checks for the glproto package.  This always happens and
this line isn't changing.

GL_PC_REQ_PRIV is subsituted in the Requires.private: of gl.pc.in when gl.pc
is made, to give the library dependencies for the libGL we have built.  When
building with driglx_direct=yes, additional dependencies on libdrm and
dri2proto are added.

The intent of this change is that if --disable-driglx-direct is used, we don't
need to check for libdrm or dri2proto, and the libGL built doesn't depend on
them.  If --enable-driglx-direct is used (the default), we check for and
depend on libdrm and dri2proto as before.

Thanks for the review.

>> +    DRI_PC_REQ_PRIV=""
>> +
>> +    if test x"$driglx_direct" = xyes; then
>> +        # Check for libdrm
>> +        PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
>> +        PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
>> +        GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
>> +        DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
>> +    fi


More information about the mesa-dev mailing list