[libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-16 Thread Alex Smith
While the current one works and it's unlikely it would cause any trouble
it's probably a good idea to use a slightly less generic string to grep
against.
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 7bcaac3..cbde7c0 100755
--- a/configure
+++ b/configure
@@ -2525,7 +2525,7 @@ probe_cc(){
 _cflags_size="-O2 -Munroll=c:1 $opt_common"
 _cflags_noopt="-O1"
 _flags_filter=pgi_flags
-elif $_cc 2>&1 | grep -q Microsoft; then
+elif $_cc 2>&1 | grep -q 'Microsoft (R) \(32-bit \)\?C/C++ Optimizing 
Compiler'; then
 _type=msvc
 _ident=$($cc 2>&1 | head -n1)
 _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk 
'\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) 
print "$@:", $$0 }'\'' > $(@:.o=.d)'
-- 
1.8.1.msysgit.1

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-16 Thread Luca Barbato
On 05/16/2013 11:08 PM, Alex Smith wrote:
> While the current one works and it's unlikely it would cause any trouble
> it's probably a good idea to use a slightly less generic string to grep
> against.
> ---
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 7bcaac3..cbde7c0 100755
> --- a/configure
> +++ b/configure
> @@ -2525,7 +2525,7 @@ probe_cc(){
>  _cflags_size="-O2 -Munroll=c:1 $opt_common"
>  _cflags_noopt="-O1"
>  _flags_filter=pgi_flags
> -elif $_cc 2>&1 | grep -q Microsoft; then
> +elif $_cc 2>&1 | grep -q 'Microsoft (R) \(32-bit \)\?C/C++ Optimizing 
> Compiler'; then

why 32bit there isn't a 64bit version ?

lu
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-16 Thread Martin Storsjö

On Thu, 16 May 2013, Alex Smith wrote:


While the current one works and it's unlikely it would cause any trouble
it's probably a good idea to use a slightly less generic string to grep
against.
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 7bcaac3..cbde7c0 100755
--- a/configure
+++ b/configure
@@ -2525,7 +2525,7 @@ probe_cc(){
_cflags_size="-O2 -Munroll=c:1 $opt_common"
_cflags_noopt="-O1"
_flags_filter=pgi_flags
-elif $_cc 2>&1 | grep -q Microsoft; then
+elif $_cc 2>&1 | grep -q 'Microsoft (R) \(32-bit \)\?C/C++ Optimizing 
Compiler'; then
_type=msvc
_ident=$($cc 2>&1 | head -n1)
_DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, 
""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
--
1.8.1.msysgit.1


While the current one obviously is pretty generic, the new one on the 
other hand might feel a bit narrow as well - chances are that it won't 
match upcoming versions directly. What about VS2013 which apparently is 
out for beta already? But if others like this, I don't mind.


// Martin
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-16 Thread Alex Smith
On Thu, May 16, 2013 at 5:10 PM, Luca Barbato  wrote:
> On 05/16/2013 11:08 PM, Alex Smith wrote:
>> While the current one works and it's unlikely it would cause any trouble
>> it's probably a good idea to use a slightly less generic string to grep
>> against.
>> ---
>>  configure | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index 7bcaac3..cbde7c0 100755
>> --- a/configure
>> +++ b/configure
>> @@ -2525,7 +2525,7 @@ probe_cc(){
>>  _cflags_size="-O2 -Munroll=c:1 $opt_common"
>>  _cflags_noopt="-O1"
>>  _flags_filter=pgi_flags
>> -elif $_cc 2>&1 | grep -q Microsoft; then
>> +elif $_cc 2>&1 | grep -q 'Microsoft (R) \(32-bit \)\?C/C++ Optimizing 
>> Compiler'; then
>
> why 32bit there isn't a 64bit version ?

The 64-bit version has nothing there.

There are two options:
Microsoft (R) 32-bit C/C++ Optimizing Compiler
or
Microsoft (R) C/C++ Optimizing Compiler
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-16 Thread Luca Barbato
On 05/16/2013 11:30 PM, Alex Smith wrote:
> On Thu, May 16, 2013 at 5:10 PM, Luca Barbato  wrote:
>> On 05/16/2013 11:08 PM, Alex Smith wrote:
>>> While the current one works and it's unlikely it would cause any trouble
>>> it's probably a good idea to use a slightly less generic string to grep
>>> against.
>>> ---
>>>  configure | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index 7bcaac3..cbde7c0 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -2525,7 +2525,7 @@ probe_cc(){
>>>  _cflags_size="-O2 -Munroll=c:1 $opt_common"
>>>  _cflags_noopt="-O1"
>>>  _flags_filter=pgi_flags
>>> -elif $_cc 2>&1 | grep -q Microsoft; then
>>> +elif $_cc 2>&1 | grep -q 'Microsoft (R) \(32-bit \)\?C/C++ Optimizing 
>>> Compiler'; then
>>
>> why 32bit there isn't a 64bit version ?
> 
> The 64-bit version has nothing there.
> 
> There are two options:
> Microsoft (R) 32-bit C/C++ Optimizing Compiler
> or
> Microsoft (R) C/C++ Optimizing Compiler

So we should match Microsoft (R) [^C]* C/C++ Optimizing Compiler or
something along those lines, right?

lu
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-16 Thread Alex Smith
On Thu, May 16, 2013 at 5:33 PM, Luca Barbato  wrote:
> So we should match Microsoft (R) [^C]* C/C++ Optimizing Compiler or
> something along those lines, right?

I'm sure there are multiple ways to write the regex.  I don't really
care what it looks like, I'm all for whatever someone thinks is a better
version.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-16 Thread Luca Barbato
On 05/16/2013 11:37 PM, Alex Smith wrote:
> On Thu, May 16, 2013 at 5:33 PM, Luca Barbato  wrote:
>> So we should match Microsoft (R) [^C]* C/C++ Optimizing Compiler or
>> something along those lines, right?
> 
> I'm sure there are multiple ways to write the regex.  I don't really
> care what it looks like, I'm all for whatever someone thinks is a better
> version.

If you have the compilers around and you could try the one I wrote and
tell me it works would be great =)

lu

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-16 Thread Derek Buitenhuis
On 2013-05-16 5:28 PM, Martin Storsjö wrote:
> While the current one obviously is pretty generic, the new one on the 
> other hand might feel a bit narrow as well - chances are that it won't 
> match upcoming versions directly. What about VS2013 which apparently is 
> out for beta already? But if others like this, I don't mind.

Every cl.exe in memory (back to 5.0) has sported this ID, if I'm remembering
correctly.

- Derek
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-16 Thread Alex Smith
On Thu, May 16, 2013 at 6:09 PM, Luca Barbato  wrote:
> On 05/16/2013 11:37 PM, Alex Smith wrote:
>
> If you have the compilers around and you could try the one I wrote and
> tell me it works would be great =)
>
> lu

Microsoft (R) [^C]*C/C++ Optimizing Compiler
That works.  I'll make the same change for the ICL one which should also work.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-17 Thread Diego Biurrun

On 05/16/2013 11:08 PM, Alex Smith wrote:

--- a/configure
+++ b/configure
@@ -2525,7 +2525,7 @@ probe_cc(){
  _flags_filter=pgi_flags
-elif $_cc 2>&1 | grep -q Microsoft; then
+elif $_cc 2>&1 | grep -q 'Microsoft (R) \(32-bit \)\?C/C++ Optimizing 
Compiler'; then


20:23 < TheRyuu> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 
16.00.40219.01 for 80x86

20:23 < TheRyuu> but 2012 is different
20:23 < TheRyuu> Microsoft (R) C/C++ Optimizing Compiler Version 
17.00.60315.1 for x86


If what you pasted on IRC is correct, then this would not even match the 
2012 version.


Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-25 Thread Alex Smith
I'm tempted to want to just drop this patch.  Nothing I've tried or that has
been suggested works for all versions involved.  This change or a more
complicated regex in the ICL patch isn't strictly nessasary as both work just
fine without them.

Feel free to make more suggestions if you've got them and I'll give it a shot.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-25 Thread Luca Barbato
On 05/17/2013 02:24 AM, Alex Smith wrote:
> On Thu, May 16, 2013 at 6:09 PM, Luca Barbato  wrote:
>> On 05/16/2013 11:37 PM, Alex Smith wrote:
>>
>> If you have the compilers around and you could try the one I wrote and
>> tell me it works would be great =)
>>
>> lu
> 
> Microsoft (R) [^C]*C/C++ Optimizing Compiler
> That works.  I'll make the same change for the ICL one which should also work.

Can we use that or there is something wrong with this setup?

lu

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-25 Thread Alex Smith
On Sat, May 25, 2013 at 6:03 AM, Luca Barbato  wrote:
>> Microsoft (R) [^C]*C/C++ Optimizing Compiler
>
> Can we use that or there is something wrong with this setup?

Yea, it doesn't work for all cases.  Just tested again and it didn't
work for this:
"Microsoft (R) C/C++ Optimizing Compiler"
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-28 Thread Diego Biurrun

On 2013-05-25 11:39, Alex Smith wrote:

I'm tempted to want to just drop this patch.  Nothing I've tried or that has
been suggested works for all versions involved.  This change or a more
complicated regex in the ICL patch isn't strictly nessasary as both work just
fine without them.

Feel free to make more suggestions if you've got them and I'll give it a shot.


grep -q 'Microsoft (R) .*C/C++ Optimizing Compiler'

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH 1/3] configure: Less generic msvc identification test

2013-05-28 Thread Luca Barbato

On 5/28/13 2:05 PM, Diego Biurrun wrote:

On 2013-05-25 11:39, Alex Smith wrote:

I'm tempted to want to just drop this patch.  Nothing I've tried or
that has
been suggested works for all versions involved.  This change or a more
complicated regex in the ICL patch isn't strictly nessasary as both
work just
fine without them.

Feel free to make more suggestions if you've got them and I'll give it
a shot.


grep -q 'Microsoft (R) .*C/C++ Optimizing Compiler'



.* is greedy thus the trailer is never matched.

[^C]* should work as intended.

lu

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel