configure.in
branchSDL-1.2
changeset 13068 4a2c30be1127
parent 13011 edf8cb7ce974
equal deleted inserted replaced
13067:654469bd1d06 13068:4a2c30be1127
   842             ],[
   842             ],[
   843             have_gcc_altivec=yes
   843             have_gcc_altivec=yes
   844             ])
   844             ])
   845             AC_MSG_RESULT($have_gcc_altivec)
   845             AC_MSG_RESULT($have_gcc_altivec)
   846         fi
   846         fi
   847 
       
   848         if test x$have_gcc_altivec = xno; then
       
   849             AC_MSG_CHECKING(for Altivec with GCC altivec.h and -faltivec option)
       
   850             altivec_CFLAGS="-faltivec"
       
   851             CFLAGS="$save_CFLAGS $altivec_CFLAGS"
       
   852             AC_TRY_COMPILE([
       
   853             #include <altivec.h>
       
   854             vector unsigned int vzero() {
       
   855                 return vec_splat_u32(0);
       
   856             }
       
   857             ],[
       
   858             ],[
       
   859             have_gcc_altivec=yes
       
   860             have_altivec_h_hdr=yes
       
   861             ])
       
   862             AC_MSG_RESULT($have_gcc_altivec)
       
   863         fi
       
   864 
       
   865         if test x$have_gcc_altivec = xno; then
       
   866             AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
       
   867             AC_TRY_COMPILE([
       
   868             vector unsigned int vzero() {
       
   869                 return vec_splat_u32(0);
       
   870             }
       
   871             ],[
       
   872             ],[
       
   873             have_gcc_altivec=yes
       
   874             ])
       
   875             AC_MSG_RESULT($have_gcc_altivec)
       
   876         fi
       
   877         CFLAGS="$save_CFLAGS"
   847         CFLAGS="$save_CFLAGS"
   878 
   848 
   879         if test x$have_gcc_altivec = xyes; then
   849         if test x$have_gcc_altivec = xyes; then
   880             AC_DEFINE(SDL_ALTIVEC_BLITTERS)
   850             AC_DEFINE(SDL_ALTIVEC_BLITTERS)
   881             if test x$have_altivec_h_hdr = xyes; then
   851             if test x$have_altivec_h_hdr = xyes; then
   882               AC_DEFINE(HAVE_ALTIVEC_H)
   852               AC_DEFINE(HAVE_ALTIVEC_H)
   883             fi
   853             fi
   884             EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
   854             EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
       
   855         fi
       
   856     fi
       
   857 }
       
   858 
       
   859 dnl Check for altivec instruction support - APPLE extensions
       
   860 CheckAltivecApple()
       
   861 {
       
   862     AC_ARG_ENABLE(altivec,
       
   863 AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [[default=yes]]]),
       
   864                   , enable_altivec=yes)
       
   865     if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_altivec = xyes; then
       
   866         save_CFLAGS="$CFLAGS"
       
   867         have_gcc_altivec=no
       
   868         altivec_CFLAGS="-faltivec"
       
   869         CFLAGS="$save_CFLAGS $altivec_CFLAGS"
       
   870 
       
   871         dnl -faltivec doesn't need altivec.h and actually
       
   872         dnl  emits a warning if included..
       
   873         AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
       
   874         AC_TRY_COMPILE([
       
   875         vector unsigned int vzero() {
       
   876             return vec_splat_u32(0);
       
   877         }
       
   878         ],[
       
   879         ],[
       
   880         have_gcc_altivec=yes
       
   881         ])
       
   882         AC_MSG_RESULT($have_gcc_altivec)
       
   883 
       
   884         CFLAGS="$save_CFLAGS"
       
   885 
       
   886         if test x$have_gcc_altivec = xyes; then
       
   887             AC_DEFINE(SDL_ALTIVEC_BLITTERS)
       
   888             EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
       
   889         else
       
   890         dnl Check standart gcc altivec options
       
   891             CheckAltivec
   885         fi
   892         fi
   886     fi
   893     fi
   887 }
   894 }
   888 
   895 
   889 dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
   896 dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
  2783         CheckCARBON
  2790         CheckCARBON
  2784         CheckX11
  2791         CheckX11
  2785         CheckMacGL
  2792         CheckMacGL
  2786         CheckOpenGLX11
  2793         CheckOpenGLX11
  2787         CheckPTHREAD
  2794         CheckPTHREAD
  2788         CheckAltivec
  2795         CheckAltivecApple
  2789 
  2796 
  2790         # Need this or things might misbuild on a G3.
  2797         # Need this or things might misbuild on a G3.
  2791         EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL"
  2798         EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL"
  2792 
  2799 
  2793         # Set up files for the audio library
  2800         # Set up files for the audio library