Source: puf
Version: 1.0.0-7
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs
puf fails to cross build from source, because it uses AC_TRY_RUN without
a cross argument. In this case, it only uses it do compare various
sizeof values, so we can just use AC_CHECK_SIZEOF instead, which happens
to work just fine for cross compilation. I'm attaching a patch for your
convenience.
Helmut
--- puf-1.0.0.orig/configure.in
+++ puf-1.0.0/configure.in
@@ -53,18 +53,17 @@
dnl Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_SIZEOF([long])
+AC_CHECK_SIZEOF([long long])
+AC_CHECK_SIZEOF([off_t])
+
AC_CACHE_CHECK([whether off_t can be long long], ob_cv_type_off_t_ll, [
- AC_TRY_RUN([#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
-#include <stdlib.h>
-int main()
-{
- if (sizeof(long long) == sizeof(long))
- exit(1);
- if (sizeof(off_t) != sizeof(long long))
- exit(1);
- exit(0);
-}], ob_cv_type_off_t_ll=yes, ob_cv_type_off_t_ll=no)])
+ if test "$ac_cv_sizeof_long" != "$ac_cv_sizeof_long_long" && test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then
+ ob_cv_type_off_t_ll=yes
+ else
+ ob_cv_type_off_t_ll=no
+ fi
+])
if test $ob_cv_type_off_t_ll = yes; then
AC_CACHE_CHECK([whether \"%lli\" works], ob_cv_func_printf_ok, [
AC_TRY_RUN([#include <stdio.h>