diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2021-07-25 11:59:40 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2021-07-31 06:34:30 +0930 |
commit | e2c002c570c42cb883e41f0dfabfdb0651edbe9b (patch) | |
tree | 3bf7f7c71cb96efe180b770202de04a9708aa9c8 /meson.build | |
parent | 47e6764de620f24a7b0c36f53c1fb8a3b5de8a6c (diff) | |
download | cairo-e2c002c570c42cb883e41f0dfabfdb0651edbe9b.tar.gz |
meson: add endian check
Fixes #464
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 5ddf7868b..67a751b25 100644 --- a/meson.build +++ b/meson.build @@ -140,6 +140,22 @@ extra_link_args = [] conf = configuration_data() +if host_machine.endian() == 'big' + conf.set('WORDS_BIGENDIAN', 1) +endif + +float_order = cc.get_define('__FLOAT_WORD_ORDER__') +if float_order != '' + if float_order == cc.get_define('__ORDER_BIG_ENDIAN__') + conf.set('FLOAT_WORDS_BIGENDIAN', 1) + endif +else + # Assume same as platform endian + if host_machine.endian() == 'big' + conf.set('FLOAT_WORDS_BIGENDIAN', 1) + endif +endif + lzo_dep = dependency('lzo2', required: false) if lzo_dep.found() deps += [lzo_dep] |