Mercurial > sdl-ios-xcode
comparison configure.in @ 795:275708f2e838
Check for altivec assembly support before trying to use it. :)
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 29 Jan 2004 16:15:12 +0000 |
parents | 7da6da0cb7cf |
children | 3c609d54f100 |
comparison
equal
deleted
inserted
replaced
794:a5defa3b93e1 | 795:275708f2e838 |
---|---|
1721 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la" | 1721 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la" |
1722 fi | 1722 fi |
1723 fi | 1723 fi |
1724 } | 1724 } |
1725 | 1725 |
1726 dnl Check for altivec instruction support using gas syntax | |
1727 CheckAltivec() | |
1728 { | |
1729 AC_MSG_CHECKING(for GCC Altivec instruction support) | |
1730 have_gcc_altivec=no | |
1731 AC_TRY_COMPILE([ | |
1732 ],[ | |
1733 asm volatile ("mtspr 256, %0\n\t" | |
1734 "vand %%v0, %%v0, %%v0" | |
1735 : | |
1736 : "r" (-1)); | |
1737 ],[ | |
1738 have_gcc_altivec=yes | |
1739 ]) | |
1740 if test x$have_gcc_altivec = xyes; then | |
1741 CFLAGS="$CFLAGS -DGCC_ALTIVEC" | |
1742 fi | |
1743 AC_MSG_RESULT($have_gcc_altivec) | |
1744 } | |
1745 | |
1726 case "$target" in | 1746 case "$target" in |
1727 *-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu) | 1747 *-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu) |
1728 case "$target" in | 1748 case "$target" in |
1729 *-*-linux*) ARCH=linux ;; | 1749 *-*-linux*) ARCH=linux ;; |
1730 *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;; | 1750 *-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;; |
1731 *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;; | 1751 *-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;; |
1732 *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;; | 1752 *-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;; |
1733 *-*-gnu*) ARCH=gnu ;; # must be last | 1753 *-*-gnu*) ARCH=gnu ;; # must be last |
1734 esac | 1754 esac |
1735 CheckDummyVideo | 1755 CheckDummyVideo |
1736 CheckDiskAudio | 1756 CheckDiskAudio |
1737 CheckDLOPEN | 1757 CheckDLOPEN |
1738 CheckNASM | 1758 CheckNASM |
1739 CheckOSS | 1759 CheckOSS |
1753 CheckQtopia | 1773 CheckQtopia |
1754 CheckPicoGUI | 1774 CheckPicoGUI |
1755 CheckOpenGL | 1775 CheckOpenGL |
1756 CheckInputEvents | 1776 CheckInputEvents |
1757 CheckPTHREAD | 1777 CheckPTHREAD |
1778 CheckAltivec | |
1758 # Set up files for the main() stub | 1779 # Set up files for the main() stub |
1759 if test "x$video_qtopia" = "xyes"; then | 1780 if test "x$video_qtopia" = "xyes"; then |
1760 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" | 1781 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" |
1761 SDL_LIBS="-lSDLmain $SDL_LIBS" | 1782 SDL_LIBS="-lSDLmain $SDL_LIBS" |
1762 fi | 1783 fi |