mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-01 16:22:25 +00:00
d8e8e92176
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
73 lines
1.7 KiB
Meson
73 lines
1.7 KiB
Meson
libcheck_files = [
|
|
'check.c',
|
|
'check_error.c',
|
|
'check_list.c',
|
|
'check_log.c',
|
|
'check_msg.c',
|
|
'check_pack.c',
|
|
'check_print.c',
|
|
'check_run.c',
|
|
'check_str.c',
|
|
'libcompat/libcompat.c'
|
|
]
|
|
|
|
if not cdata.has('HAVE_ALARM')
|
|
libcheck_files += ['libcompat/alarm.c']
|
|
endif
|
|
|
|
if not cdata.has('HAVE_GETTIMEOFDAY')
|
|
libcheck_files += ['libcompat/gettimeofday.c']
|
|
endif
|
|
|
|
if not cdata.has('HAVE_CLOCK_GETTIME')
|
|
libcheck_files += ['libcompat/clock_gettime.c']
|
|
endif
|
|
|
|
if not cdata.has('HAVE_DECL_LOCALTIME_R')
|
|
libcheck_files += ['libcompat/localtime_r.c']
|
|
endif
|
|
|
|
if not cdata.has('HAVE_MALLOC')
|
|
libcheck_files += ['libcompat/malloc.c']
|
|
endif
|
|
|
|
if not cdata.has('HAVE_REALLOC')
|
|
libcheck_files += ['libcompat/realloc.c']
|
|
endif
|
|
|
|
if not cdata.has('HAVE_DECL_STRSIGNAL')
|
|
libcheck_files += ['libcompat/strsignal.c']
|
|
endif
|
|
|
|
if not cdata.has('HAVE_DECL_STRDUP') and not cdata.has('HAVE__STRDUP')
|
|
libcheck_files += ['libcompat/strdup.c']
|
|
endif
|
|
|
|
if not cdata.has('HAVE_GETLINE')
|
|
libcheck_files += ['libcompat/getline.c']
|
|
endif
|
|
|
|
# FIXME: check that timer_create, timer_settime, timer_delete are in rt_lib
|
|
if not rt_lib.found()
|
|
libcheck_files += [
|
|
'libcompat/timer_create.c',
|
|
'libcompat/timer_settime.c',
|
|
'libcompat/timer_delete.c'
|
|
]
|
|
endif
|
|
|
|
configure_file(input : 'check.h.in',
|
|
output : 'check.h',
|
|
configuration : check_cdata)
|
|
|
|
internal_check_h_inc = include_directories('..')
|
|
|
|
libcheck = static_library('check',
|
|
libcheck_files,
|
|
include_directories : [configinc, internal_check_h_inc],
|
|
dependencies : [rt_lib, mathlib],
|
|
c_args: gst_c_args +
|
|
# Don't want libcompat to think we don't have these and substitute
|
|
# replacements since we don't check for or define these.
|
|
['-DHAVE_VSNPRINTF', '-DHAVE_SNPRINTF'],
|
|
pic: true)
|