mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
meson: Add headers and libm to has_function checks
The functions from math.h may be implemented in libm. https://bugzilla.gnome.org/show_bug.cgi?id=774876
This commit is contained in:
parent
7e24acc67f
commit
56c1b41c6a
1 changed files with 7 additions and 6 deletions
13
meson.build
13
meson.build
|
@ -75,14 +75,16 @@ foreach h : check_headers
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
check_functions = [
|
check_functions = [
|
||||||
['HAVE_DCGETTEXT', 'dcgettext'],
|
['HAVE_DCGETTEXT', 'dcgettext', '#include<libintl.h>'],
|
||||||
['HAVE_GMTIME_R', 'gmtime_r'],
|
['HAVE_GMTIME_R', 'gmtime_r', '#include<time.h>'],
|
||||||
['HAVE_LRINTF', 'lrintf'],
|
['HAVE_LRINTF', 'lrintf', '#include<math.h>'],
|
||||||
['HAVE_MMAP', 'mmap'],
|
['HAVE_MMAP', 'mmap', '#include<sys/mman.h>'],
|
||||||
|
['HAVE_LOG2', 'log2', '#include<math.h>'],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
libm = cc.find_library('m', required : false)
|
||||||
foreach f : check_functions
|
foreach f : check_functions
|
||||||
if cc.has_function(f.get(1))
|
if cc.has_function(f.get(1), prefix : f.get(2), dependencies : libm)
|
||||||
core_conf.set(f.get(0), 1)
|
core_conf.set(f.get(0), 1)
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
@ -115,7 +117,6 @@ if get_option('default_library') == 'static'
|
||||||
gst_plugins_base_args += ['-DGST_STATIC_COMPILATION']
|
gst_plugins_base_args += ['-DGST_STATIC_COMPILATION']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libm = cc.find_library('m', required : false)
|
|
||||||
# X11 checks are for sys/ and tests/
|
# X11 checks are for sys/ and tests/
|
||||||
x11_dep = dependency('x11', required : false)
|
x11_dep = dependency('x11', required : false)
|
||||||
# GLib checks are for the entire project
|
# GLib checks are for the entire project
|
||||||
|
|
Loading…
Reference in a new issue