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

Fabian Groffen grobian
Tue Feb 17 15:38:51 CET 2009

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.

Fabian Groffen
Gentoo on a different level
-------------- next part --------------
* grobian at gentoo.org: the use of nanosleep requires librealtime (-lrt)
                      on Solaris, OpenSolaris however doesn't need it

--- configure
+++ configure
@@ -1904,6 +1904,13 @@
+# Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
+if check_func nanosleep; then
+	:
+elif check_func nanosleep -lrt; then
+	add_extralibs -lrt
 check_lib math.h sin -lm
 # test for C99 functions in math.h

More information about the ffmpeg-devel mailing list