Bug#982462: qtractor FTCBFS: uses AC_TRY_RUN to check for sse
Source: qtractor
Version: 0.9.19-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
check for availabilit of SSE. It does so to see what the CPU is capable
of and we absolutely cannot do this during cross compilation. I suggest
checking for the relevant xmmintrin.h header first. When it is missing,
the offending check can be skipped entirely. When present, I suggest
guessing that SSE is supported (but only for cross builds). Please
consider applying the attached patch. It fixes one out of three
remaining AC_TRY_RUN.
Helmut
--- qtractor-0.9.19.orig/configure.ac
+++ qtractor-0.9.19/configure.ac
@@ -669,6 +669,7 @@
# Check for SSE optimization.
if test "x$ac_sse" = "xyes"; then
+ AC_CHECK_HEADER([xmmintrin.h],[
ac_sse_cflags="-msse -mfpmath=sse -ffast-math"
ac_old_cflags=$CFLAGS
ac_old_cppflags=$CPPFLAGS
@@ -690,15 +691,20 @@
: "=a" (a), "=S" (b), "=c" (c), "=d" (d) : "0" (1));
return ((d & (1 << 25)) ? 0 : 1);
}
- ], ac_cv_sse="yes", ac_cv_sse="no")
+ ], ac_cv_sse="yes", ac_cv_sse="no", ac_cv_sse=cross)
])
- ac_sse=$ac_cv_sse
+ if test "x$ac_cv_sse" = xcross; then
+ ac_sse=yes
+ else
+ ac_sse=$ac_cv_sse
+ fi
if test "x$ac_sse" = "xyes"; then
ac_cflags="$ac_sse_cflags $ac_cflags"
else
CPPFLAGS=$ac_old_cppflags
CFLAGS=$ac_old_cflags
fi
+ ],[ac_sse=no])
fi
Reply to: