[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#945905: qtractor FTCBFS: uses AC_TRY_RUN to compute sizeof(float)



Source: qtractor
Version: 0.9.11-1
Tags: patch upstream
User: debian-cross@lists.debian.org
Usertags: ftcbfs

qtractor fails to cross build from source, because it uses AC_TRY_RUN to
figure out sizeof(float). AC_TRY_RUN does not work at all during cross
compilation. For sizeof, autoconf has a better alternative
AC_CHECK_SIZEOF though. Replacing this AC_TRY_RUN actually makes the
code simpler and more portable. Please consider applying the attached
patch.

It still fails to cross build, because qtractor has more AC_TRY_RUN.
Please close this bug anyhow when fixing the float check.

Helmut
--- qtractor-0.9.11.orig/configure.ac
+++ qtractor-0.9.11/configure.ac
@@ -599,13 +599,8 @@
 
 
 # Check for IEEE 32bit float optimizations.
-AC_CACHE_CHECK([for IEEE 32bit float optimizations],
-   ac_cv_float32, [
-   AC_TRY_RUN([
-      int main() { return (sizeof(float) == 4 ? 0 : 1); }
-   ], ac_cv_float32="yes", ac_cv_float32="no")
-])
-ac_float32=$ac_cv_float32
+AC_CHECK_SIZEOF(float)
+AS_IF([test "$ac_cv_sizeof_float" = 4],[ac_float32=yes],[ac_float32=no])
 if test "x$ac_float32" = "xyes"; then
    AC_DEFINE(CONFIG_FLOAT32, 1, [Define if IEEE 32bit float optimizations are enabled.])
 fi

Reply to: