From: Matthew Waters Date: Thu, 23 Apr 2020 05:46:48 +0000 (+1000) Subject: build: libcheck may require linking against rt X-Git-Tag: 1.19.3~925 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4caf7b254a03c13c85cb2aafcab3232ceb53734;p=platform%2Fupstream%2Fgstreamer.git build: libcheck may require linking against rt In static linking scenarios, this is required to avoid this error building tests: /work/prefix/lib/libgstcheck-1.0.a(check_run.c.o): In function `tcase_run_tfun_fork': /work/gstreamer/_builddir/../../../src/gstreamer/libs/gst/check/libcheck/check_run.c:476: undefined reference to `timer_create' /work/gstreamer/_builddir/../../../src/gstreamer/libs/gst/check/libcheck/check_run.c:483: undefined reference to `timer_settime' /work/gstreamer/_builddir/../../../src/gstreamer/libs/gst/check/libcheck/check_run.c:493: undefined reference to `timer_delete' /work/prefix/lib/libgstcheck-1.0.a(check.c.o): In function `check_get_clockid': /work/gstreamer/_builddir/../../../src/gstreamer/libs/gst/check/libcheck/check.c:628: undefined reference to `timer_create' /work/gstreamer/_builddir/../../../src/gstreamer/libs/gst/check/libcheck/check.c:629: undefined reference to `timer_delete' Part-of: --- diff --git a/pkgconfig/gstreamer-check-uninstalled.pc.in b/pkgconfig/gstreamer-check-uninstalled.pc.in index 85c2903644..a95daf2fbd 100644 --- a/pkgconfig/gstreamer-check-uninstalled.pc.in +++ b/pkgconfig/gstreamer-check-uninstalled.pc.in @@ -11,5 +11,5 @@ Description: Unit testing helper library for GStreamer modules, Not Installed Requires: gstreamer-@GST_API_VERSION@ = @VERSION@ Version: @VERSION@ -Libs: -L${libdir} -lgstcheck-@GST_API_VERSION@ @LIBM@ +Libs: -L${libdir} -lgstcheck-@GST_API_VERSION@ @LIBM@ @LIBRT@ Cflags: -I@abs_top_srcdir@/libs -I@abs_top_builddir@/libs diff --git a/pkgconfig/gstreamer-check.pc.in b/pkgconfig/gstreamer-check.pc.in index 8c3a129f6e..dc142986e4 100644 --- a/pkgconfig/gstreamer-check.pc.in +++ b/pkgconfig/gstreamer-check.pc.in @@ -11,5 +11,5 @@ Name: GStreamer check unit testing Description: Unit testing helper library for GStreamer modules Requires: gstreamer-@GST_API_VERSION@ Version: @VERSION@ -Libs: -L${libdir} -lgstcheck-@GST_API_VERSION@ @LIBM@ +Libs: -L${libdir} -lgstcheck-@GST_API_VERSION@ @LIBM@ @LIBRT@ Cflags: -I${includedir} diff --git a/pkgconfig/meson.build b/pkgconfig/meson.build index 09714bba4f..2ca4aaac46 100644 --- a/pkgconfig/meson.build +++ b/pkgconfig/meson.build @@ -8,6 +8,7 @@ pkgconf.set('includedir', '${prefix}/@0@'.format(get_option('includedir'))) pkgconf.set('GST_API_VERSION', apiversion) pkgconf.set('VERSION', gst_version) pkgconf.set('LIBM', mathlib.found() ? '-lm' : '') +pkgconf.set('LIBRT', rt_lib.found() ? '-lrt' : '') # Requires.private pkgconf.set('UNWIND_REQUIRE', cdata.has('HAVE_UNWIND') ? 'libunwind' : '')