configure
branchSDL-1.2
changeset 13068 4a2c30be1127
parent 13011 edf8cb7ce974
     1.1 --- a/configure	Fri Sep 06 20:00:40 2019 +0300
     1.2 +++ b/configure	Sat Sep 07 10:37:28 2019 +0300
     1.3 @@ -23111,122 +23111,6 @@
     1.4              { $as_echo "$as_me:$LINENO: result: $have_gcc_altivec" >&5
     1.5  $as_echo "$have_gcc_altivec" >&6; }
     1.6          fi
     1.7 -
     1.8 -        if test x$have_gcc_altivec = xno; then
     1.9 -            { $as_echo "$as_me:$LINENO: checking for Altivec with GCC altivec.h and -faltivec option" >&5
    1.10 -$as_echo_n "checking for Altivec with GCC altivec.h and -faltivec option... " >&6; }
    1.11 -            altivec_CFLAGS="-faltivec"
    1.12 -            CFLAGS="$save_CFLAGS $altivec_CFLAGS"
    1.13 -            cat >conftest.$ac_ext <<_ACEOF
    1.14 -/* confdefs.h.  */
    1.15 -_ACEOF
    1.16 -cat confdefs.h >>conftest.$ac_ext
    1.17 -cat >>conftest.$ac_ext <<_ACEOF
    1.18 -/* end confdefs.h.  */
    1.19 -
    1.20 -            #include <altivec.h>
    1.21 -            vector unsigned int vzero() {
    1.22 -                return vec_splat_u32(0);
    1.23 -            }
    1.24 -
    1.25 -int
    1.26 -main ()
    1.27 -{
    1.28 -
    1.29 -
    1.30 -  ;
    1.31 -  return 0;
    1.32 -}
    1.33 -_ACEOF
    1.34 -rm -f conftest.$ac_objext
    1.35 -if { (ac_try="$ac_compile"
    1.36 -case "(($ac_try" in
    1.37 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    1.38 -  *) ac_try_echo=$ac_try;;
    1.39 -esac
    1.40 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    1.41 -$as_echo "$ac_try_echo") >&5
    1.42 -  (eval "$ac_compile") 2>conftest.er1
    1.43 -  ac_status=$?
    1.44 -  grep -v '^ *+' conftest.er1 >conftest.err
    1.45 -  rm -f conftest.er1
    1.46 -  cat conftest.err >&5
    1.47 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
    1.48 -  (exit $ac_status); } && {
    1.49 -	 test -z "$ac_c_werror_flag" ||
    1.50 -	 test ! -s conftest.err
    1.51 -       } && test -s conftest.$ac_objext; then
    1.52 -
    1.53 -            have_gcc_altivec=yes
    1.54 -            have_altivec_h_hdr=yes
    1.55 -
    1.56 -else
    1.57 -  $as_echo "$as_me: failed program was:" >&5
    1.58 -sed 's/^/| /' conftest.$ac_ext >&5
    1.59 -
    1.60 -
    1.61 -fi
    1.62 -
    1.63 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.64 -            { $as_echo "$as_me:$LINENO: result: $have_gcc_altivec" >&5
    1.65 -$as_echo "$have_gcc_altivec" >&6; }
    1.66 -        fi
    1.67 -
    1.68 -        if test x$have_gcc_altivec = xno; then
    1.69 -            { $as_echo "$as_me:$LINENO: checking for Altivec with GCC -faltivec option" >&5
    1.70 -$as_echo_n "checking for Altivec with GCC -faltivec option... " >&6; }
    1.71 -            cat >conftest.$ac_ext <<_ACEOF
    1.72 -/* confdefs.h.  */
    1.73 -_ACEOF
    1.74 -cat confdefs.h >>conftest.$ac_ext
    1.75 -cat >>conftest.$ac_ext <<_ACEOF
    1.76 -/* end confdefs.h.  */
    1.77 -
    1.78 -            vector unsigned int vzero() {
    1.79 -                return vec_splat_u32(0);
    1.80 -            }
    1.81 -
    1.82 -int
    1.83 -main ()
    1.84 -{
    1.85 -
    1.86 -
    1.87 -  ;
    1.88 -  return 0;
    1.89 -}
    1.90 -_ACEOF
    1.91 -rm -f conftest.$ac_objext
    1.92 -if { (ac_try="$ac_compile"
    1.93 -case "(($ac_try" in
    1.94 -  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    1.95 -  *) ac_try_echo=$ac_try;;
    1.96 -esac
    1.97 -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
    1.98 -$as_echo "$ac_try_echo") >&5
    1.99 -  (eval "$ac_compile") 2>conftest.er1
   1.100 -  ac_status=$?
   1.101 -  grep -v '^ *+' conftest.er1 >conftest.err
   1.102 -  rm -f conftest.er1
   1.103 -  cat conftest.err >&5
   1.104 -  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.105 -  (exit $ac_status); } && {
   1.106 -	 test -z "$ac_c_werror_flag" ||
   1.107 -	 test ! -s conftest.err
   1.108 -       } && test -s conftest.$ac_objext; then
   1.109 -
   1.110 -            have_gcc_altivec=yes
   1.111 -
   1.112 -else
   1.113 -  $as_echo "$as_me: failed program was:" >&5
   1.114 -sed 's/^/| /' conftest.$ac_ext >&5
   1.115 -
   1.116 -
   1.117 -fi
   1.118 -
   1.119 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.120 -            { $as_echo "$as_me:$LINENO: result: $have_gcc_altivec" >&5
   1.121 -$as_echo "$have_gcc_altivec" >&6; }
   1.122 -        fi
   1.123          CFLAGS="$save_CFLAGS"
   1.124  
   1.125          if test x$have_gcc_altivec = xyes; then
   1.126 @@ -23245,6 +23129,89 @@
   1.127      fi
   1.128  }
   1.129  
   1.130 +CheckAltivecApple()
   1.131 +{
   1.132 +    # Check whether --enable-altivec was given.
   1.133 +if test "${enable_altivec+set}" = set; then
   1.134 +  enableval=$enable_altivec;
   1.135 +else
   1.136 +  enable_altivec=yes
   1.137 +fi
   1.138 +
   1.139 +    if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_altivec = xyes; then
   1.140 +        save_CFLAGS="$CFLAGS"
   1.141 +        have_gcc_altivec=no
   1.142 +        altivec_CFLAGS="-faltivec"
   1.143 +        CFLAGS="$save_CFLAGS $altivec_CFLAGS"
   1.144 +
   1.145 +                        { $as_echo "$as_me:$LINENO: checking for Altivec with GCC -faltivec option" >&5
   1.146 +$as_echo_n "checking for Altivec with GCC -faltivec option... " >&6; }
   1.147 +        cat >conftest.$ac_ext <<_ACEOF
   1.148 +/* confdefs.h.  */
   1.149 +_ACEOF
   1.150 +cat confdefs.h >>conftest.$ac_ext
   1.151 +cat >>conftest.$ac_ext <<_ACEOF
   1.152 +/* end confdefs.h.  */
   1.153 +
   1.154 +        vector unsigned int vzero() {
   1.155 +            return vec_splat_u32(0);
   1.156 +        }
   1.157 +
   1.158 +int
   1.159 +main ()
   1.160 +{
   1.161 +
   1.162 +
   1.163 +  ;
   1.164 +  return 0;
   1.165 +}
   1.166 +_ACEOF
   1.167 +rm -f conftest.$ac_objext
   1.168 +if { (ac_try="$ac_compile"
   1.169 +case "(($ac_try" in
   1.170 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
   1.171 +  *) ac_try_echo=$ac_try;;
   1.172 +esac
   1.173 +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
   1.174 +$as_echo "$ac_try_echo") >&5
   1.175 +  (eval "$ac_compile") 2>conftest.er1
   1.176 +  ac_status=$?
   1.177 +  grep -v '^ *+' conftest.er1 >conftest.err
   1.178 +  rm -f conftest.er1
   1.179 +  cat conftest.err >&5
   1.180 +  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   1.181 +  (exit $ac_status); } && {
   1.182 +	 test -z "$ac_c_werror_flag" ||
   1.183 +	 test ! -s conftest.err
   1.184 +       } && test -s conftest.$ac_objext; then
   1.185 +
   1.186 +        have_gcc_altivec=yes
   1.187 +
   1.188 +else
   1.189 +  $as_echo "$as_me: failed program was:" >&5
   1.190 +sed 's/^/| /' conftest.$ac_ext >&5
   1.191 +
   1.192 +
   1.193 +fi
   1.194 +
   1.195 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   1.196 +        { $as_echo "$as_me:$LINENO: result: $have_gcc_altivec" >&5
   1.197 +$as_echo "$have_gcc_altivec" >&6; }
   1.198 +
   1.199 +        CFLAGS="$save_CFLAGS"
   1.200 +
   1.201 +        if test x$have_gcc_altivec = xyes; then
   1.202 +            cat >>confdefs.h <<\_ACEOF
   1.203 +#define SDL_ALTIVEC_BLITTERS 1
   1.204 +_ACEOF
   1.205 +
   1.206 +            EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
   1.207 +        else
   1.208 +                    CheckAltivec
   1.209 +        fi
   1.210 +    fi
   1.211 +}
   1.212 +
   1.213  CheckVisibilityHidden()
   1.214  {
   1.215      { $as_echo "$as_me:$LINENO: checking for GCC -fvisibility=hidden option" >&5
   1.216 @@ -31124,7 +31091,7 @@
   1.217          CheckMacGL
   1.218          CheckOpenGLX11
   1.219          CheckPTHREAD
   1.220 -        CheckAltivec
   1.221 +        CheckAltivecApple
   1.222  
   1.223          # Need this or things might misbuild on a G3.
   1.224          EXTRA_CFLAGS="$EXTRA_CFLAGS -force_cpusubtype_ALL"