On Tue, Jan 19, 2010 at 10:19:45AM +0100, Adrian Knoth wrote:

Hi!

> It's probably a bug in configure(.ac), however, you can work around if
> you conditionally set --disable-sse on non-amd64. (i386 doesn't have
> SSE, i686 could, but that's not an ordinary Debian target)

It's really a bug in configure.ac. The test extends CFLAGS to enable
SSE, but it doesn't restore the old value in case the test fails.

The attached patch corrects this problem. Tested on sparc (no SSE) and
i686 (with SSE).

Rui: See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565860 for the
whole story. I guess you want to include the patch in your repository.

Note that I'm not really common with autoconf, so there might be a more
elegant way of restoring CFLAGS upon negative test. At least it works.
;)


HTH

-- 
mail: a...@thur.de      http://adi.thur.de      PGP/GPG: key via keyserver
diff --git a/configure.ac b/configure.ac
index 5d07403..c66c421 100644
--- a/configure.ac
+++ b/configure.ac
@@ -274,6 +274,8 @@ fi
 # Check for SSE optimization.
 if test "x$ac_sse" = "xyes"; then
    ac_sse_cflags="-msse -mfpmath=sse -ffast-math"
+   CFLAGS_OLD="$CFLAGS"
+   CPPFLAGS_OLD="$CPPFLAGS"
    CFLAGS="$ac_sse_cflags $CFLAGS"
    CPPFLAGS="$ac_sse_cflags $CPPFLAGS"
    AC_CACHE_CHECK([for SSE optimization],
@@ -294,6 +296,9 @@ if test "x$ac_sse" = "xyes"; then
    ac_sse=$ac_cv_sse
    if test "x$ac_sse" = "xyes"; then
       ac_cflags="$ac_sse_cflags $ac_cflags"
+  else
+      CFLAGS="$CFLAGS_OLD"
+      CPPFLAGS="$CPPFLAGS_OLD"
    fi
 fi
 
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to