[Mesa-dev] [PATCH 2/7] automake: src/mesa/drivers/dri/i915

Ian Romanick idr at freedesktop.org
Tue Jan 17 17:34:37 PST 2012


On 01/17/2012 03:09 PM, Matt Turner wrote:
> On Tue, Jan 17, 2012 at 5:51 PM, Ian Romanick<idr at freedesktop.org>  wrote:
>> On 01/17/2012 12:58 PM, Matt Turner wrote:
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -1292,6 +1292,11 @@ case $DRI_DIRS in
>>>       PKG_CHECK_MODULES([INTEL], [libdrm_intel>= $LIBDRM_INTEL_REQUIRED])
>>>
>>>       case $DRI_DIRS in
>>> +    *i915*)
>>> +       HAVE_I915_DRI=yes;
>>> +       ;;
>>> +    esac
>>> +    case $DRI_DIRS in
>>
>>
>> Why are these in separate case statements?
>
> Because otherwise --with-dri-drivers=i915,i965 would only enable i915.
> If there's another way to do this, I'm okay with it.

Oh, right.  How about some variation of

for d in $(echo $DRI_DIRS | sed 's/,/ /g'); do
     case $d in
     i915) ...;;
     i965) ...;;
     esac
done

It may be a bit more fidgety to get working initially, but it's more 
obvious and easier to extend with other drivers.  It also makes it 
possible to support driver names that are substrings of other driver names.

>>> +# Copyright © 2011 Matt Turner<mattst88 at gmail.com>
>>
>>                  2012?
>
> Heh, yes.


More information about the mesa-dev mailing list