[FFmpeg-devel] [PATCH] Use __clang_version__ when available

David Conrad lessen42
Tue Jun 29 17:42:43 CEST 2010


On Jun 29, 2010, at 10:48 AM, M?ns Rullg?rd wrote:

> David Conrad <lessen42 at gmail.com> writes:
> 
>> On Jun 29, 2010, at 7:29 AM, M?ns Rullg?rd wrote:
>> 
>>> David Conrad <lessen42 at gmail.com> writes:
>>> 
>>>> ---
>>>> configure |    2 +-
>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>> 
>>>> diff --git a/configure b/configure
>>>> index 60775b5..8aebe5a 100755
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -1752,7 +1752,7 @@ elif $cc -version 2>/dev/null | grep -q TMS470; then
>>>>    }
>>>> elif $cc -v 2>&1 | grep -q clang; then
>>>>    cc_type=clang
>>>> -    cc_version=__VERSION__
>>>> +    check_cpp_condition stdlib.h "defined(__clang_version__)" && cc_version=__clang_version__ || cc_version=__VERSION__
>>> 
>>> Is __clang_version__ ever undefined?
>> 
>> Yes, in any clang older than ~2 months, including all official releases.
> 
> You're not allowed to run the compiler at that point since some things
> haven't been set up properly yet.  Does the following work?
> 
> $cc -dM -E $TMPC | grep -q __clang_version__ && ... || ...

Indeed it does

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: textmate stdin IfvBgO.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100629/1ec3a1e1/attachment.txt>



More information about the ffmpeg-devel mailing list