configure.in
changeset 1162 2651158f59b8
parent 1140 af8b0f9ac2f4
child 1168 045f186426e1
     1.1 --- a/configure.in	Thu Oct 20 06:53:56 2005 +0000
     1.2 +++ b/configure.in	Thu Oct 20 06:55:26 2005 +0000
     1.3 @@ -1910,11 +1910,16 @@
     1.4  dnl Check for altivec instruction support using gas syntax
     1.5  CheckAltivec()
     1.6  {
     1.7 -    AC_MSG_CHECKING(for GCC Altivec instruction support)
     1.8 +    dnl FIXME: Theoretically, you might not have altivec.h, we should check
     1.9 +    dnl FIXME:  that seperately, but I think all major platforms have it
    1.10 +    dnl FIXME:  at the moment...  --ryan.
    1.11 +
    1.12 +    save_CFLAGS="${CFLAGS}"
    1.13      have_gcc_altivec=no
    1.14 -    save_CFLAGS="${CFLAGS}"
    1.15 -    CFLAGS="${CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -faltivec"
    1.16 +    AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
    1.17 +    CFLAGS="${save_CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -maltivec"
    1.18      AC_TRY_COMPILE([
    1.19 +    #include <altivec.h>
    1.20      vector unsigned int vzero() {
    1.21          return vec_splat_u32(0);
    1.22      }
    1.23 @@ -1922,10 +1927,26 @@
    1.24      ],[
    1.25      have_gcc_altivec=yes
    1.26      ])
    1.27 +    AC_MSG_RESULT($have_gcc_altivec)
    1.28 +
    1.29 +    if test x$have_gcc_altivec = xno; then
    1.30 +        AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
    1.31 +        CFLAGS="${CFLAGS} -DGCC_ALTIVEC -DUSE_ALTIVEC_BLITTERS -faltivec"
    1.32 +        AC_TRY_COMPILE([
    1.33 +        #include <altivec.h>
    1.34 +        vector unsigned int vzero() {
    1.35 +            return vec_splat_u32(0);
    1.36 +        }
    1.37 +        ],[
    1.38 +        ],[
    1.39 +        have_gcc_altivec=yes
    1.40 +        ])
    1.41 +        AC_MSG_RESULT($have_gcc_altivec)
    1.42 +    fi
    1.43 +
    1.44      if test x$have_gcc_altivec = xno; then
    1.45          CFLAGS="${save_CFLAGS}"
    1.46      fi
    1.47 -    AC_MSG_RESULT($have_gcc_altivec)
    1.48  }
    1.49  
    1.50  dnl Check for a valid linux/version.h