Source: tkgate
Version: 2.0~b10-6
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

tkgate fails to cross build from source. The ./configure script uses
AC_RUN_IFELSE to compute a sizeof. That's much better done using
AC_CHECK_SIZEOF as the latter is much easier to use and works with cross
compilation. The attached patch fixes that and makes tkgate cross
buildable. Please consider applying it.

Helmut
--- tkgate-2.0~b10.orig/acinclude.m4
+++ tkgate-2.0~b10/acinclude.m4
@@ -141,10 +141,8 @@
 #
 #--------------------------------------------------------------------
 AC_DEFUN([TKG_WORDSIZE],[
-  AC_CACHE_CHECK([word size], wordsize,
-    AC_RUN_IFELSE(AC_LANG_PROGRAM([#include <stdlib.h> #include <stdio.h>], [return sizeof(unsigned) == 8 ? 0 : 1;]),
-	[wordsize=64], [wordsize=32]))
-  if test $wordsize = 32; then
+  AC_CHECK_SIZEOF([unsigned])
+  if test $ac_cv_sizeof_unsigned = 4; then
     AC_DEFINE(TKGATE_WORDSIZE, 32, [Word size of machine.])
   else
     AC_DEFINE(TKGATE_WORDSIZE, 64, [Word size of machine.])

Reply via email to