[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] build-sys: meson: Check if cpuid.h header is usable
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Wed Aug 11 15:23:55 UTC 2021
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
1b96b49f by Igor V. Kovalenko at 2021-08-11T15:16:55+00: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>
- - - - -
1 changed file:
- meson.build
Changes:
=====================================
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 = [
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/1b96b49f65744930050b927a548a3d2e771c7310
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/1b96b49f65744930050b927a548a3d2e771c7310
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20210811/459effea/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list