configure
branchSDL-1.2
changeset 13068 4a2c30be1127
parent 13011 edf8cb7ce974
equal deleted inserted replaced
13067:654469bd1d06 13068:4a2c30be1127
 23109 
 23109 
 23110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 23110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 23111             { $as_echo "$as_me:$LINENO: result: $have_gcc_altivec" >&5
 23111             { $as_echo "$as_me:$LINENO: result: $have_gcc_altivec" >&5
 23112 $as_echo "$have_gcc_altivec" >&6; }
 23112 $as_echo "$have_gcc_altivec" >&6; }
 23113         fi
 23113         fi
 23114 
 23114         CFLAGS="$save_CFLAGS"
 23115         if test x$have_gcc_altivec = xno; then
 23115 
 23116             { $as_echo "$as_me:$LINENO: checking for Altivec with GCC altivec.h and -faltivec option" >&5
 23116         if test x$have_gcc_altivec = xyes; then
 23117 $as_echo_n "checking for Altivec with GCC altivec.h and -faltivec option... " >&6; }
 23117             cat >>confdefs.h <<\_ACEOF
 23118             altivec_CFLAGS="-faltivec"
 23118 #define SDL_ALTIVEC_BLITTERS 1
 23119             CFLAGS="$save_CFLAGS $altivec_CFLAGS"
 23119 _ACEOF
 23120             cat >conftest.$ac_ext <<_ACEOF
 23120 
       
 23121             if test x$have_altivec_h_hdr = xyes; then
       
 23122               cat >>confdefs.h <<\_ACEOF
       
 23123 #define HAVE_ALTIVEC_H 1
       
 23124 _ACEOF
       
 23125 
       
 23126             fi
       
 23127             EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
       
 23128         fi
       
 23129     fi
       
 23130 }
       
 23131 
       
 23132 CheckAltivecApple()
       
 23133 {
       
 23134     # Check whether --enable-altivec was given.
       
 23135 if test "${enable_altivec+set}" = set; then
       
 23136   enableval=$enable_altivec;
       
 23137 else
       
 23138   enable_altivec=yes
       
 23139 fi
       
 23140 
       
 23141     if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_altivec = xyes; then
       
 23142         save_CFLAGS="$CFLAGS"
       
 23143         have_gcc_altivec=no
       
 23144         altivec_CFLAGS="-faltivec"
       
 23145         CFLAGS="$save_CFLAGS $altivec_CFLAGS"
       
 23146 
       
 23147                         { $as_echo "$as_me:$LINENO: checking for Altivec with GCC -faltivec option" >&5
       
 23148 $as_echo_n "checking for Altivec with GCC -faltivec option... " >&6; }
       
 23149         cat >conftest.$ac_ext <<_ACEOF
 23121 /* confdefs.h.  */
 23150 /* confdefs.h.  */
 23122 _ACEOF
 23151 _ACEOF
 23123 cat confdefs.h >>conftest.$ac_ext
 23152 cat confdefs.h >>conftest.$ac_ext
 23124 cat >>conftest.$ac_ext <<_ACEOF
 23153 cat >>conftest.$ac_ext <<_ACEOF
 23125 /* end confdefs.h.  */
 23154 /* end confdefs.h.  */
 23126 
 23155 
 23127             #include <altivec.h>
 23156         vector unsigned int vzero() {
 23128             vector unsigned int vzero() {
 23157             return vec_splat_u32(0);
 23129                 return vec_splat_u32(0);
 23158         }
 23130             }
       
 23131 
 23159 
 23132 int
 23160 int
 23133 main ()
 23161 main ()
 23134 {
 23162 {
 23135 
 23163 
 23155   (exit $ac_status); } && {
 23183   (exit $ac_status); } && {
 23156 	 test -z "$ac_c_werror_flag" ||
 23184 	 test -z "$ac_c_werror_flag" ||
 23157 	 test ! -s conftest.err
 23185 	 test ! -s conftest.err
 23158        } && test -s conftest.$ac_objext; then
 23186        } && test -s conftest.$ac_objext; then
 23159 
 23187 
 23160             have_gcc_altivec=yes
 23188         have_gcc_altivec=yes
 23161             have_altivec_h_hdr=yes
       
 23162 
 23189 
 23163 else
 23190 else
 23164   $as_echo "$as_me: failed program was:" >&5
 23191   $as_echo "$as_me: failed program was:" >&5
 23165 sed 's/^/| /' conftest.$ac_ext >&5
 23192 sed 's/^/| /' conftest.$ac_ext >&5
 23166 
 23193 
 23167 
 23194 
 23168 fi
 23195 fi
 23169 
 23196 
 23170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 23197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 23171             { $as_echo "$as_me:$LINENO: result: $have_gcc_altivec" >&5
 23198         { $as_echo "$as_me:$LINENO: result: $have_gcc_altivec" >&5
 23172 $as_echo "$have_gcc_altivec" >&6; }
 23199 $as_echo "$have_gcc_altivec" >&6; }
 23173         fi
 23200 
 23174 
       
 23175         if test x$have_gcc_altivec = xno; then
       
 23176             { $as_echo "$as_me:$LINENO: checking for Altivec with GCC -faltivec option" >&5
       
 23177 $as_echo_n "checking for Altivec with GCC -faltivec option... " >&6; }
       
 23178             cat >conftest.$ac_ext <<_ACEOF
       
 23179 /* confdefs.h.  */
       
 23180 _ACEOF
       
 23181 cat confdefs.h >>conftest.$ac_ext
       
 23182 cat >>conftest.$ac_ext <<_ACEOF
       
 23183 /* end confdefs.h.  */
       
 23184 
       
 23185             vector unsigned int vzero() {
       
 23186                 return vec_splat_u32(0);
       
 23187             }
       
 23188 
       
 23189 int
       
 23190 main ()
       
 23191 {
       
 23192 
       
 23193 
       
 23194   ;
       
 23195   return 0;
       
 23196 }
       
 23197 _ACEOF
       
 23198 rm -f conftest.$ac_objext
       
 23199 if { (ac_try="$ac_compile"
       
 23200 case "(($ac_try" in
       
 23201   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
       
 23202   *) ac_try_echo=$ac_try;;
       
 23203 esac
       
 23204 eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
       
 23205 $as_echo "$ac_try_echo") >&5
       
 23206   (eval "$ac_compile") 2>conftest.er1
       
 23207   ac_status=$?
       
 23208   grep -v '^ *+' conftest.er1 >conftest.err
       
 23209   rm -f conftest.er1
       
 23210   cat conftest.err >&5
       
 23211   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
       
 23212   (exit $ac_status); } && {
       
 23213 	 test -z "$ac_c_werror_flag" ||
       
 23214 	 test ! -s conftest.err
       
 23215        } && test -s conftest.$ac_objext; then
       
 23216 
       
 23217             have_gcc_altivec=yes
       
 23218 
       
 23219 else
       
 23220   $as_echo "$as_me: failed program was:" >&5
       
 23221 sed 's/^/| /' conftest.$ac_ext >&5
       
 23222 
       
 23223 
       
 23224 fi
       
 23225 
       
 23226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
       
 23227             { $as_echo "$as_me:$LINENO: result: $have_gcc_altivec" >&5
       
 23228 $as_echo "$have_gcc_altivec" >&6; }
       
 23229         fi
       
 23230         CFLAGS="$save_CFLAGS"
 23201         CFLAGS="$save_CFLAGS"
 23231 
 23202 
 23232         if test x$have_gcc_altivec = xyes; then
 23203         if test x$have_gcc_altivec = xyes; then
 23233             cat >>confdefs.h <<\_ACEOF
 23204             cat >>confdefs.h <<\_ACEOF
 23234 #define SDL_ALTIVEC_BLITTERS 1
 23205 #define SDL_ALTIVEC_BLITTERS 1
 23235 _ACEOF
 23206 _ACEOF
 23236 
 23207 
 23237             if test x$have_altivec_h_hdr = xyes; then
       
 23238               cat >>confdefs.h <<\_ACEOF
       
 23239 #define HAVE_ALTIVEC_H 1
       
 23240 _ACEOF
       
 23241 
       
 23242             fi
       
 23243             EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
 23208             EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
       
 23209         else
       
 23210                     CheckAltivec
 23244         fi
 23211         fi
 23245     fi
 23212     fi
 23246 }
 23213 }
 23247 
 23214 
 23248 CheckVisibilityHidden()
 23215 CheckVisibilityHidden()
 31122         CheckCARBON
 31089         CheckCARBON
 31123         CheckX11
 31090         CheckX11
 31124         CheckMacGL
 31091         CheckMacGL
 31125         CheckOpenGLX11
 31092         CheckOpenGLX11
 31126         CheckPTHREAD
 31093         CheckPTHREAD
 31127         CheckAltivec
 31094         CheckAltivecApple
 31128 
 31095 
 31129         # Need this or things might misbuild on a G3.
 31096         # Need this or things might misbuild on a G3.
 31130         EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL"
 31097         EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL"
 31131 
 31098 
 31132         # Set up files for the audio library
 31099         # Set up files for the audio library