mirror of
https://github.com/pulseaudio/pulseaudio.git
synced 2024-11-23 18:03:32 +08:00
build-sys: meson: Check if cpuid.h header is usable
With clang compiler including cpuid.h will produce error if architecture is not x86-based, and cheching if cpuid.h exists via Meson has_header() is not enough. Fix this by creating a list of headers checked to be usable via Meson check_header() function, and move cpuid.h to that list. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/614>
This commit is contained in:
parent
42af3ee083
commit
1b96b49f65
14
meson.build
14
meson.build
@ -216,7 +216,6 @@ endif
|
||||
check_headers = [
|
||||
'arpa/inet.h',
|
||||
'byteswap.h',
|
||||
'cpuid.h',
|
||||
'dlfcn.h',
|
||||
'execinfo.h',
|
||||
'grp.h',
|
||||
@ -276,6 +275,19 @@ if cc.has_header_symbol('pthread.h', 'PTHREAD_PRIO_INHERIT')
|
||||
cdata.set('HAVE_PTHREAD_PRIO_INHERIT', 1)
|
||||
endif
|
||||
|
||||
# Headers which are usable
|
||||
|
||||
check_usable_headers = [
|
||||
'cpuid.h',
|
||||
]
|
||||
|
||||
foreach h : check_usable_headers
|
||||
if cc.check_header(h)
|
||||
define = 'HAVE_' + h.underscorify().to_upper()
|
||||
cdata.set(define, 1)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
# Functions
|
||||
|
||||
check_functions = [
|
||||
|
Loading…
Reference in New Issue
Block a user