[MPlayer-dev-eng] [PATCH] quick fix for configure warning on G3/OS X

Tim Wojtulewicz timwoj at ieee.org
Mon Jun 19 07:06:18 CEST 2006


On Jun 18, 2006, at 6:52 PM, Diego Biurrun wrote:

> On Sun, Jun 18, 2006 at 12:00:31PM -0700, Tim Wojtulewicz wrote:
>> Configure throws a minor warning when checking for altivec on a g3.
>> The hw.optional.altivec setting doesn't exist on the g3, so sysctl
>> returns nothing.
>
> What warning?

Checking for CPU type ... ./configure: line 1209: [: : integer  
expression expected
750

>
>> {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf380
>> {\fonttbl\f0\fswiss\fcharset77 Helvetica;}
>> {\colortbl;\red255\green255\blue255;}
>> \margl1440\margr1440\vieww9000\viewh8400\viewkind0
>> \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480 
>> \tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
>>
>> \f0\fs24 \cf0 Index: configure\
>> ===================================================================\
>> --- configure   (revision 18745)\
>> +++ configure   (working copy)\
>> @@ -1207,7 +1207,7 @@\
>>        Darwin)\
>>         proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' '  
>> | sed 's/ppc//'`\
>>         if [ `sysctl -n hw.vectorunit` -eq 1 -o \\\
>> -           "`sysctl -n hw.optional.altivec 2>/dev/null`" -eq 1 ];  
>> then\
>> +           "`sysctl -n hw.optional.altivec 2>/dev/null`" = "1" ];  
>> then\
>
> This changes an integer comparison to a string comparison..  Well,  
> if it
> helps..  But why only in one of the two places?
>
> You sent the patch as RTF, it needs to be plaintext.

`sysctl -n hw.vectorunit` returns a 0 on the G3.  `sysctl -n  
hw.optional.altivec` returns a blank.  It has to be a string  
comparison because of this.  Changing it back to just a straight  
numerical comparison (removing the quotes from the first part)  
produces the following:

Checking for CPU type ... ./configure: line 1209: [: too many arguments

Apologies for the RTF.  I forgot to turn it off in the editor I  
pasted the patch into.  Plaintext version attached.

Tim

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: configure-g3-altivec.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060618/c04b4df1/attachment.txt>
-------------- next part --------------




More information about the MPlayer-dev-eng mailing list