[FFmpeg-devel] [PATCH] compilation fix Solaris nanosleep

Benoit Fouet benoit.fouet
Tue Feb 17 16:02:10 CET 2009


On 02/17/2009 03:38 PM, Fabian Groffen wrote:
> On 17-02-2009 10:38:46 +0000, M?ns Rullg?rd wrote:
>   
>>> as in the attached patch, however, that causes -lrt to be used on the
>>> final link line on OpenSolaris, while this is not necessary.
>>>
>>> Do I use the check_lib function in a wrong way?
>>>       
>> Check without -lrt first, and only add -lrt if the first check fails.
>>     
>
> I tried your suggestion, it seems to do the right thing for Solaris and
> OpenSolaris now.  See attach.
>
>
>   

> --- configure
> +++ configure
> @@ -1904,6 +1904,13 @@
>      fi
>  done
> 
> +# Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
> +if check_func nanosleep; then
> +    :
> +elif check_func nanosleep -lrt; then
> +    add_extralibs -lrt
> +fi
> +

is the following working ?
check_func nanosleep || check_func nanosleep -lrt && add_extralibs -lrt

Ben





More information about the ffmpeg-devel mailing list