From 798b72b39c16855a2259152e41248ac38496bdde Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 17 Mar 2021 01:18:53 +0100 Subject: configure: Make sure to check endianness When using macros from endianness.h we want to be sure that the target platform endianness is correctly set. This makes sure that we define the endianness, in case the compiler doesn't provide that information. --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 06bb4ed..7df4c15 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,10 @@ PKG_CHECK_MODULES(zlib, zlib) # optional PKG_CHECK_MODULES(openssl, openssl >= $OPENSSL_VERSION, have_openssl=yes, have_openssl=no) +# Checking endianness +AC_C_BIGENDIAN([AC_DEFINE([__BIG_ENDIAN__], [1], [big endian])], + [AC_DEFINE([__LITTLE_ENDIAN__], [1], [little endian])]) + GLOBAL_CFLAGS="-Wno-multichar -O2" AC_LDADD="" AC_LDFLAGS="" -- cgit v1.1-32-gdbae