v4l2src: link against -lrt for clock_gettime()

Need to explicitly link against -lrt for clock_gettime(), which
we don't get in the libs any more, because core moved the
gmodule-no-export-2.0 bit into Requires.Private.

Not required for newer glibc, but for older ones, so check for that.
This commit is contained in:
Tim-Philipp Müller 2012-11-30 20:37:47 +00:00 committed by Tim-Philipp Müller
parent 81b9e197df
commit 527c218533
2 changed files with 10 additions and 1 deletions

View file

@ -134,6 +134,14 @@ dnl check for libm, for sin()
LT_LIB_M
AC_SUBST(LIBM)
AC_CHECK_FUNCS(clock_gettime, [], [
AC_CHECK_LIB(rt, clock_gettime, [
AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
LIBRT="-lrt"
AC_SUBST([LIBRT])
])
])
dnl *** checks for header files ***
dnl check if we have ANSI C header files

View file

@ -64,7 +64,8 @@ libgstvideo4linux2_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
$(GST_LIBS) \
$(xv_libs) \
$(LIBV4L2_LIBS) \
$(GUDEV_LIBS)
$(GUDEV_LIBS) \
$(LIBRT)
noinst_HEADERS = \
gstv4l2bufferpool.h \