build-sys: meson: restore big endian detection
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Thu, 3 Jun 2021 06:43:10 +0000 (09:43 +0300)
committerPulseAudio Marge Bot <pulseaudio-maintainers@lists.freedesktop.org>
Thu, 3 Jun 2021 18:38:06 +0000 (18:38 +0000)
Autotools used AC_C_BIGENDIAN to set WORDS_BIGENDIAN, add Meson implementation.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/572>

meson.build

index 255c73a..fdd8bf6 100644 (file)
@@ -169,6 +169,10 @@ cdata.set('OS_IS_FREEBSD', 0)
 platform_socket_dep = []
 platform_dep = []
 
+if host_machine.endian() == 'big'
+  cdata.set('WORDS_BIGENDIAN', 1)
+endif
+
 # FIXME: This was not tested. Maybe some flags should better be CFLAGS,
 # rather than ending up in the config.h file?
 if host_machine.system() == 'darwin'