configure.ac
changeset 13173 de3493dacdaf
parent 13130 502bb7d04f0a
child 13180 60b1290fe381
     1.1 --- a/configure.ac	Thu Oct 24 20:15:54 2019 -0300
     1.2 +++ b/configure.ac	Thu Oct 24 21:12:08 2019 -0400
     1.3 @@ -1303,6 +1303,42 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +dnl Check for ARM instruction support using gas syntax
     1.8 +CheckARM()
     1.9 +{
    1.10 +    AC_ARG_ENABLE(arm-simd,
    1.11 +AC_HELP_STRING([--enable-arm-simd], [use SIMD assembly blitters on ARM [[default=yes]]]),
    1.12 +                  enable_arm_simd=$enableval, enable_arm_simd=yes)
    1.13 +    if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_simd = xyes; then
    1.14 +        save_CFLAGS="$CFLAGS"
    1.15 +        have_arm_simd=no
    1.16 +        CFLAGS="-x assembler-with-cpp $CFLAGS"
    1.17 +        
    1.18 +        AC_MSG_CHECKING(for ARM SIMD)
    1.19 +        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
    1.20 +        .text
    1.21 +        .arch armv6
    1.22 +        .object_arch armv4
    1.23 +        .arm
    1.24 +        .altmacro
    1.25 +        #ifndef __ARM_EABI__
    1.26 +        #error EABI is required (to be sure that calling conventions are compatible)
    1.27 +        #endif
    1.28 +        pld [r0]
    1.29 +        uqadd8 r0, r0, r0
    1.30 +        ]])], have_arm_simd=yes)
    1.31 +        AC_MSG_RESULT($have_arm_simd)
    1.32 +        
    1.33 +        CFLAGS="$save_CFLAGS"
    1.34 +        
    1.35 +        if test x$have_arm_simd = xyes; then
    1.36 +            AC_DEFINE(SDL_ARM_SIMD_BLITTERS)
    1.37 +dnl            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.c"
    1.38 +            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S"
    1.39 +        fi
    1.40 +    fi
    1.41 +}
    1.42 +
    1.43  dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
    1.44  dnl  Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
    1.45  CheckVisibilityHidden()
    1.46 @@ -3396,6 +3432,7 @@
    1.47          CheckDiskAudio
    1.48          CheckDummyAudio
    1.49          CheckDLOPEN
    1.50 +        CheckARM
    1.51          CheckOSS
    1.52          CheckALSA
    1.53          CheckPulseAudio