[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/21] configure: Fix endianess test while cross-compiling
From: |
John Darrington |
Subject: |
[PATCH 06/21] configure: Fix endianess test while cross-compiling |
Date: |
Sun, 12 Jan 2014 12:00:19 +0100 |
* configure.ac: Replace ad hoc endianness test with the standard autoconf one
---
configure.ac | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/configure.ac b/configure.ac
index 150523e..fe7f6b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1862,25 +1862,16 @@ AC_CHECK_FUNCS([bzero dup2 floor gettimeofday memchr
memmove memset mkdir mkfifo
dnl --------------------------------------------------
dnl check for big/little endian for LCMS
dnl --------------------------------------------------
+AC_C_BIGENDIAN([BIGENDIAN=1],[BIGENDIAN=0],
+ [AC_MSG_ERROR([Cannot determine endianess])],
+ [AC_MSG_ERROR([Endianess is ambiguous])])
-AC_MSG_CHECKING([for big endian])
-
-AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([#include <stdio.h>], [
- static const int one = 1;
- return (*(char*)&one == 0 ? 0 : 1);
- ])],
- [LCMS_BIGENDIAN=1],
- [LCMS_BIGENDIAN=0])
-
-if test "x$LCMS_BIGENDIAN" != "x0"; then
- LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$LCMS_BIGENDIAN"
- LCMS2_ENDIAN="-DCMS_USE_BIG_ENDIAN=$LCMS_BIGENDIAN"
- AC_MSG_RESULT(yes)
+if test "x$BIGENDIAN" != "x0"; then
+ LCMS_ENDIAN="-DUSE_BIG_ENDIAN=$BIGENDIAN"
+ LCMS2_ENDIAN="-DCMS_USE_BIG_ENDIAN=$BIGENDIAN"
else
LCMS_ENDIAN=
LCMS2_ENDIAN=
- AC_MSG_RESULT(no)
fi
--
1.7.10.4
- Cross-compilation fails for Ghostscript 09.05, John Darrington, 2014/01/03
- Re: Cross-compilation fails for Ghostscript 09.05, Didier Link, 2014/01/05
- Re: Cross-compilation fails for Ghostscript 09.05, John Darrington, 2014/01/05
- Re: Cross-compilation fails for Ghostscript 09.05, John Darrington, 2014/01/12
- [no subject], John Darrington, 2014/01/12
- [PATCH 02/21] Makefile.in (top_srcdir): New variable, John Darrington, 2014/01/12
- [PATCH 06/21] configure: Fix endianess test while cross-compiling,
John Darrington <=
- [PATCH 07/21] Fix test for fontconfig when cross building, John Darrington, 2014/01/12
- [PATCH 09/21] Simplify the conditional inclusion of the contrib directory., John Darrington, 2014/01/12
- [PATCH 08/21] configure.ac, Makefile.in: Use CC_FOR_BUILD for native compilation., John Darrington, 2014/01/12
- [PATCH 04/21] Fix crash on startup if the configuration file is missing., John Darrington, 2014/01/12
- [PATCH 13/21] Improve reliability of freetype library (esp. wrt cross-building), John Darrington, 2014/01/12
- [PATCH 05/21] base/lib.mak: Fix broken build dependency, John Darrington, 2014/01/12
- [PATCH 10/21] Fix test for dbus when cross building, John Darrington, 2014/01/12
- [PATCH 11/21] Fix incorrect determination of host/build OS, John Darrington, 2014/01/12
- [PATCH 17/21] Avoid redundancy in package version number/string, John Darrington, 2014/01/12
- [PATCH 16/21] Remove the code running ./configure from autogen.sh - I am of the opinion, that the bootstrap process and the configuration should be kept seperate. It should be possible to bootstrap without configuring., John Darrington, 2014/01/12