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

Diego Biurrun diego
Mon Feb 23 02:56:45 CET 2009


On Tue, Feb 17, 2009 at 04:12:29PM +0000, M?ns Rullg?rd wrote:
> Benoit Fouet <benoit.fouet at free.fr> writes:
> 
> > 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
> 
> No, but
> 
>  check_func nanosleep || { check_func nanosleep -lrt && add_extralibs -lrt; }
> 
> should work.
> 
> Shell || and && do not work like the C operators.

I applied this.

Diego




More information about the ffmpeg-devel mailing list