diff options
author | Matt Turner <[email protected]> | 2019-07-29 13:51:55 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2019-07-30 11:49:09 -0700 |
commit | c9b86cf52692f1d76314dce345080af8ce786792 (patch) | |
tree | b27babe1179c7dda558b6a36439b519038a0ab3d /meson.build | |
parent | 597bddad47e831474a33cde054c40bbd2cbc0600 (diff) |
meson: Test for program_invocation_name
program_invocation_name and program_invocation_short_name are both GNU
extensions. I don't believe one can exist without the other, so only
check for program_invocation_name.
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 8dc431cfc5b..c9f96e7135d 100644 --- a/meson.build +++ b/meson.build @@ -1035,6 +1035,13 @@ foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_crea endif endforeach +if cc.has_header_symbol('errno.h', 'program_invocation_name', + args : '-D_GNU_SOURCE') + pre_args += '-DHAVE_PROGRAM_INVOCATION_NAME' +elif with_tools.contains('intel') + error('Intel tools require the program_invocation_name variable') +endif + # strtod locale support if cc.links(''' #define _GNU_SOURCE |