[FFmpeg-devel] [PATCH] Use __clang_version__ when available
Måns Rullgård
mans
Tue Jun 29 16:48:43 CEST 2010
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__ && ... || ...
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list