Source: dieharder
Version: 3.31.1-8
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs
dieharder fails to cross build from source, because its configure script
uses AC_RUN_IFELSE to discover the endianess. The check included in
autoconf, AC_C_BIGENDIAN, can be performed without running host code.
Using it results in better portability and less code. Please consider
applying the attached patch.
Helmut
--- dieharder-3.31.1.orig/configure.ac
+++ dieharder-3.31.1/configure.ac
@@ -125,30 +125,7 @@ AC_CHECK_LIB([gsl],[gsl_sf_gamma])
# brg_endian.h in the build of rng_threefish. This is a very
# certain test, and therefore is checked FIRST in this header file.
#==
-AC_DEFUN([AC_C_ENDIAN],
-[AC_CACHE_CHECK(for endianness, ac_cv_c_endian,
-[
- AC_RUN_IFELSE(
-[AC_LANG_PROGRAM([], [dnl
-long val = 1;
-char *c = (char *)
-exit(*c == 1);
-])
- ],[
-ac_cv_c_endian=big
- ],[
-ac_cv_c_endian=little
- ])
-])
-if test $ac_cv_c_endian = big; then
- AC_SUBST(LITTLE_ENDIAN,0)
-fi
-if test $ac_cv_c_endian = little; then
- AC_SUBST(LITTLE_ENDIAN,1)
-fi
-])
-
-AC_C_ENDIAN
+AC_C_BIGENDIAN([AC_SUBST(LITTLE_ENDIAN,0)],[AC_SUBST(LITTLE_ENDIAN,1)])
#==