summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorArun Raghavan <arun@arunraghavan.net>2019-08-15 15:30:26 +0530
committerArun Raghavan <arun@arunraghavan.net>2019-08-15 18:57:13 +0530
commit2b0a33053ce1aac90949e90128e22bb3b036b468 (patch)
treea52170603e2e83b4a7e58c4e99a58c7ef8d94081 /meson.build
parentcd8dfee947bf98f99d42ab6f8b42c77b7b3bbc5e (diff)
build-sys: meson: Add some missing declaration checks
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 14 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 0025bf596..f51a6c3ed 100644
--- a/meson.build
+++ b/meson.build
@@ -299,6 +299,20 @@ if not cc.has_header_symbol('netinet/in.h', 'INADDR_NONE')
endif
endif
+check_decls = [
+ [ 'environ', 'unistd.h', '#define _GNU_SOURCE' ],
+ [ 'SOUND_PCM_READ_RATE', 'sys/soundcard.h', '' ],
+ [ 'SOUND_PCM_READ_CHANNELS', 'sys/soundcard.h', '' ],
+ [ 'SOUND_PCM_READ_BITS', 'sys/soundcard.h', '' ],
+]
+
+foreach s : check_decls
+ if cc.has_header_symbol(s[1], s[0], prefix : s[2])
+ define = 'HAVE_DECL_' + s[0].to_upper()
+ cdata.set(define, 1)
+ endif
+endforeach
+
# Types
# FIXME: do we ever care about gid_t not being defined / smaller than an int?