Debian patch: 050_altivec_detection.diff SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Sat, 10 Oct 2009 09:03:08 +0000
branchSDL-1.2
changeset 4300602642738b83
parent 4299 0ca47eaff9c9
child 4301 5007e6a66814
Debian patch: 050_altivec_detection.diff
configure.in
     1.1 --- a/configure.in	Sat Oct 10 09:02:17 2009 +0000
     1.2 +++ b/configure.in	Sat Oct 10 09:03:08 2009 +0000
     1.3 @@ -810,64 +810,66 @@
     1.4  AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[default=yes]]]),
     1.5                    , enable_altivec=yes)
     1.6      if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_altivec = xyes; then
     1.7 -        have_altivec_h_hdr=no
     1.8 -        AC_CHECK_HEADER(altivec.h, have_altivec_h_hdr=yes)
     1.9 -
    1.10          save_CFLAGS="$CFLAGS"
    1.11          have_gcc_altivec=no
    1.12 -        AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
    1.13 +        have_altivec_h_hdr=no
    1.14          altivec_CFLAGS="-maltivec"
    1.15          CFLAGS="$save_CFLAGS $altivec_CFLAGS"
    1.16  
    1.17 -        if test x$have_altivec_h_hdr = xyes; then
    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 -          ],[
    1.24 -          ],[
    1.25 -          have_gcc_altivec=yes
    1.26 -          ])
    1.27 -          AC_MSG_RESULT($have_gcc_altivec)
    1.28 -        else
    1.29 -          AC_TRY_COMPILE([
    1.30 -          vector unsigned int vzero() {
    1.31 -              return vec_splat_u32(0);
    1.32 -          }
    1.33 -          ],[
    1.34 -          ],[
    1.35 -          have_gcc_altivec=yes
    1.36 -          ])
    1.37 -          AC_MSG_RESULT($have_gcc_altivec)
    1.38 +        AC_MSG_CHECKING(for Altivec with GCC altivec.h and -maltivec option)
    1.39 +        AC_TRY_COMPILE([
    1.40 +        #include <altivec.h>
    1.41 +        vector unsigned int vzero() {
    1.42 +            return vec_splat_u32(0);
    1.43 +        }
    1.44 +        ],[
    1.45 +        ],[
    1.46 +        have_gcc_altivec=yes
    1.47 +        have_altivec_h_hdr=yes
    1.48 +        ])
    1.49 +        AC_MSG_RESULT($have_gcc_altivec)
    1.50 +
    1.51 +        if test x$have_gcc_altivec = xno; then
    1.52 +            AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
    1.53 +            AC_TRY_COMPILE([
    1.54 +            vector unsigned int vzero() {
    1.55 +                return vec_splat_u32(0);
    1.56 +            }
    1.57 +            ],[
    1.58 +            ],[
    1.59 +            have_gcc_altivec=yes
    1.60 +            ])
    1.61 +            AC_MSG_RESULT($have_gcc_altivec)
    1.62          fi
    1.63  
    1.64          if test x$have_gcc_altivec = xno; then
    1.65 -            AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
    1.66 +            AC_MSG_CHECKING(for Altivec with GCC altivec.h and -faltivec option)
    1.67              altivec_CFLAGS="-faltivec"
    1.68              CFLAGS="$save_CFLAGS $altivec_CFLAGS"
    1.69 -            if test x$have_altivec_h_hdr = xyes; then
    1.70 -              AC_TRY_COMPILE([
    1.71 -              #include <altivec.h>
    1.72 -              vector unsigned int vzero() {
    1.73 -                  return vec_splat_u32(0);
    1.74 -              }
    1.75 -              ],[
    1.76 -              ],[
    1.77 -              have_gcc_altivec=yes
    1.78 -              ])
    1.79 -              AC_MSG_RESULT($have_gcc_altivec)
    1.80 -            else
    1.81 -              AC_TRY_COMPILE([
    1.82 -              vector unsigned int vzero() {
    1.83 -                  return vec_splat_u32(0);
    1.84 -              }
    1.85 -              ],[
    1.86 -              ],[
    1.87 -              have_gcc_altivec=yes
    1.88 -              ])
    1.89 -              AC_MSG_RESULT($have_gcc_altivec)
    1.90 -            fi
    1.91 +            AC_TRY_COMPILE([
    1.92 +            #include <altivec.h>
    1.93 +            vector unsigned int vzero() {
    1.94 +                return vec_splat_u32(0);
    1.95 +            }
    1.96 +            ],[
    1.97 +            ],[
    1.98 +            have_gcc_altivec=yes
    1.99 +            have_altivec_h_hdr=yes
   1.100 +            ])
   1.101 +            AC_MSG_RESULT($have_gcc_altivec)
   1.102 +	fi
   1.103 +
   1.104 +        if test x$have_gcc_altivec = xno; then
   1.105 +            AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
   1.106 +            AC_TRY_COMPILE([
   1.107 +            vector unsigned int vzero() {
   1.108 +                return vec_splat_u32(0);
   1.109 +            }
   1.110 +            ],[
   1.111 +            ],[
   1.112 +            have_gcc_altivec=yes
   1.113 +            ])
   1.114 +            AC_MSG_RESULT($have_gcc_altivec)
   1.115          fi
   1.116          CFLAGS="$save_CFLAGS"
   1.117