Commit graph

9 commits

Author SHA1 Message Date
Nirbheek Chauhan e60bd6c662 check: Don't check for malloc/realloc and try to fallback
When malloc is not available, this will set #define malloc rpl_malloc
which is implemented only inside libcheck, and not everything will link
to libcheck.

We don't really need to care too much about how malloc is implemented
and we don't care about platforms that don't implement malloc.
2016-12-09 17:59:53 +05:30
Nirbheek Chauhan d8e8e92176 libcheck: Update the compatibility code and checks
This brings us up-to-speed with the latest compatibility code from upstream
check git. For completeness, we do all the checks that upstream check does, but
we skip the snprintf/vsnprintf code because it's not straightforward (involves
running code and that is bad for cross-compilation) and not necessary for the
platforms we support anyway.

If someone really wants this, they can uncomment this and copy the relevant
checks from the check git repository.

https://bugzilla.gnome.org/show_bug.cgi?id=775870
2016-12-09 15:31:01 +05:30
Nirbheek Chauhan 2797376f7a build: Fix AM_CONDITIONAL check for clock_gettime
It was always evaluating to false, so clock_gettime.c was always being
included into libcheck. This breaks building on Hurd and causes us to
always override clock_gettime() even when it is available.

https://bugzilla.gnome.org/show_bug.cgi?id=773813
2016-11-02 14:01:38 +05:30
Nirbheek Chauhan 6c1bc80d27 build: Fix clock_gettime check with XCode 8
With XCode 8, clock_gettime will be incorrectly detected as being
available regardless of what OS X version we're targetting because the
symbol is available in the .tbd library as a weak symbol.
See: https://github.com/Homebrew/homebrew-core/issues/3727#issue-170086273

It's only starting from macOS 10.12 that clock_gettime is actually
available, so we can unconditionally disable it when targetting older
versions. We cannot simply do AC_CHECK_FUNCS with -Wl,-no_weak_imports
because the autoconf check does its own prototype declaration that
doesn't trigger that compiler flag.

https://bugzilla.gnome.org/show_bug.cgi?id=772451
2016-10-13 03:40:04 +05:30
Michał Dębski a7797d30a8 check: Use mkstemp instead of tempnam if possible
Using tempnam() is deprecated, this gives warning and fails the build
with -Werror.

https://bugzilla.gnome.org/show_bug.cgi?id=745858
2015-03-11 16:14:24 +00:00
Sebastian Rasmussen 755a66b6a2 check: Update version number of included libcheck
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741550
2014-12-15 15:14:31 +01:00
Sebastian Rasmussen 85c8b5d2c4 check: Apply GStreamer-specific patches
Reintroduced patches:

 * Make sure that fail_if(1) actually fails
   from commit 9f99d056a2

New patches due to updated libcheck (based on 0.9.14):

 * Checks in m4/check-checks.m4 to cater for new dependencies
 * Conditional compile-time compat POSIX fallbacks for libcheck
 * Avoid relative paths for libcheck header files
 * Make timer_create() usage depend on posix timers, not librt
 * Rely on default AX_PTHREAD behavior to allow HAVE_PTHREAD to be used
   when checking for types and functions (like clock_gettime())
 * Avoid double declaration of clock_gettime() when availabe outside of
   librt by making compat clock_gettime() declaration conditional
 * check 0.9.9 renamed _fail_unless() and 0.9.12 later renamed it again
   to _ck_assert_failed(), so ASSERT_{CRITICAL,WARNING}() now calls this
   function
 * Remove libcheck fallback infrastructure for malloc(), realloc(),
   gettimeofday() and snprintf() since either they appear to be
   available or they introduce even more dependencies.

The result is an embedded check in gstreamer that has been tested by
running check tests in core, -base, -good, -bad, -ugly and rtsp-server
on Linux, OSX and Windows.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727826
2014-12-06 17:48:25 +01:00
Idar Tollefsen 7b80441f9d build: Make sure AC_INCLUDES_DEFAULT is used
Without using AC_INCLUDES_DEFAULT explicitly,
certain platforms will complain that the header
was found, but not usable by the compiler.
This happens for instance on Solaris where certain
headers are needed to pull in proper defines.

Also upgrade to newer autoconf syntax and use proper quoting.

https://bugzilla.gnome.org/show_bug.cgi?id=667293
2012-06-27 21:08:28 +01:00
Tim-Philipp Müller b40320d483 build: make autotools put its m4 files into m4/ instead of common/m4/
This is how we do it in the other modules, and gets rid of the annoying
dirty status for common when doing git status (at least once you clean
out the old files from there).
2010-03-30 15:20:07 +01:00
Renamed from check-checks.m4 (Browse further)