cmake: setup variable WORDS_BIGENDIAN correctly

Since version 3.0 cmake provides the macro test_big_endian for
that purpose.

fixes #375

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
(cherry picked from commit d74fee2727)
Backported-from: dbus!266
This commit is contained in:
Ralf Habacker 2022-03-02 11:00:06 +01:00 committed by Simon McVittie
parent 052a2bead8
commit 29631357ac
2 changed files with 7 additions and 0 deletions

View file

@ -28,6 +28,10 @@ include(MacrosAutotools)
autoinit(configure.ac)
autoversion(dbus)
# replacement for AC_C_BIGENDIAN
include (TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
if(EXISTS ${CMAKE_SOURCE_DIR}/config.h.in)
autoheaderchecks(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_SOURCE_DIR}/cmake/ConfigureChecks.cmake ${CMAKE_SOURCE_DIR}/cmake/config.h.cmake)
else()

View file

@ -21,6 +21,9 @@
* should be placed in this file
*/
/* AC_C_BIGENDIAN */
#cmakedefine WORDS_BIGENDIAN
/* Opt-in to modern APIs and thread-safety for Solaris. In the Autotools
* build system we do the equivalent of this by appending to CFLAGS
* in configure.ac */