Hi, I'm attaching an updated patch, that fixes build errors on !ppc by using the MACROS outside the conditional.
Applies to sfst 1.4.6g-1 Roland
Description: Fix build on powerpcspe This patch detects AltiVec and adds -maltivec to the compiler flags accordingly Author: Roland Stigge <sti...@antcom.de> --- sfst-1.4.6g.orig/configure.ac +++ sfst-1.4.6g/configure.ac @@ -50,11 +50,27 @@ then ARCH=$($(which uname) -m) else ARCH=$($(which arch)) fi +AC_COMPILE_IFELSE([ +#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)) +#error "Need GCC >= 3.4 for sane altivec support" +#endif +#include <altivec.h> +int main () { + vector unsigned int v = vec_splat_u32 (1); + v = vec_sub (v, v); + return 0; +}], [HAVE_ALTIVEC=yes], [HAVE_ALTIVEC=no]) + if test x$ARCH = xppc then AC_MSG_RESULT([PowerPC]) - CFLAGS="-Wall -ansi -mpowerpc -maltivec -fno-pic -fomit-frame-pointer $CFLAGS" - CXXFLAGS="-Wall -ansi -mpowerpc -maltivec -fno-pic -fomit-frame-pointer $CXXFLAGS" + CFLAGS="-Wall -ansi -mpowerpc -fno-pic -fomit-frame-pointer $CFLAGS" + CXXFLAGS="-Wall -ansi -mpowerpc -fno-pic -fomit-frame-pointer $CXXFLAGS" + if test x$HAVE_ALTIVEC = xyes + then + CFLAGS="-maltivec $CFLAGS" + CXXFLAGS="-maltivec $CXXFLAGS" + fi else if test x$ARCH = xi686 then