comparison configure.in @ 399:cfcf6bf1640c

Unified the thread detection code for UNIX platforms
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jun 2002 21:39:49 +0000
parents d219b0e02f5f
children 3dde0301f5f9
comparison
equal deleted inserted replaced
398:d219b0e02f5f 399:cfcf6bf1640c
1097 CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS" 1097 CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
1098 fi 1098 fi
1099 fi 1099 fi
1100 } 1100 }
1101 1101
1102 dnl See if we can use GNU pth library for threads
1103 CheckPTH()
1104 {
1105 dnl Check for pth support
1106 AC_ARG_ENABLE(pth,
1107 [ --enable-pth use GNU pth library for multi-threading [default=yes]],
1108 , enable_pth=yes)
1109 if test x$enable_threads = xyes -a x$enable_pth = xyes; then
1110 AC_PATH_PROG(PTH_CONFIG, pth-config, no)
1111 if test "$PTH_CONFIG" = "no"; then
1112 use_pth=no
1113 else
1114 PTH_CFLAGS=`$PTH_CONFIG --cflags`
1115 PTH_LIBS=`$PTH_CONFIG --libs --all`
1116 SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
1117 SDL_LIBS="$SDL_LIBS $PTH_LIBS"
1118 CFLAGS="$CFLAGS -DENABLE_PTH"
1119 use_pth=yes
1120 fi
1121 AC_MSG_CHECKING(pth)
1122 if test "x$use_pth" = xyes; then
1123 AC_MSG_RESULT(yes)
1124 else
1125 AC_MSG_RESULT(no)
1126 fi
1127 fi
1128 }
1129
1102 dnl See what type of thread model to use on Linux and Solaris 1130 dnl See what type of thread model to use on Linux and Solaris
1103 CheckPTHREAD() 1131 CheckPTHREAD()
1104 { 1132 {
1105 dnl Check for pthread support 1133 dnl Check for pthread support
1106 AC_ARG_ENABLE(pthreads, 1134 AC_ARG_ENABLE(pthreads,
1191 ],[ 1219 ],[
1192 has_recursive_mutexes=yes 1220 has_recursive_mutexes=yes
1193 ]) 1221 ])
1194 # Some systems have broken recursive mutex implementations 1222 # Some systems have broken recursive mutex implementations
1195 case "$target" in 1223 case "$target" in
1224 *-*-darwin*)
1225 has_recursive_mutexes=no
1226 ;;
1196 *-*-solaris*) 1227 *-*-solaris*)
1197 has_recursive_mutexes=no 1228 has_recursive_mutexes=no
1198 ;; 1229 ;;
1199 esac 1230 esac
1200 AC_MSG_RESULT($has_recursive_mutexes) 1231 AC_MSG_RESULT($has_recursive_mutexes)
1251 AC_MSG_RESULT($have_semun) 1282 AC_MSG_RESULT($have_semun)
1252 if test x$have_semun = xyes; then 1283 if test x$have_semun = xyes; then
1253 CFLAGS="$CFLAGS -DHAVE_SEMUN" 1284 CFLAGS="$CFLAGS -DHAVE_SEMUN"
1254 fi 1285 fi
1255 1286
1256 # See if we can use clone() on Linux directly 1287 # See if we can use GNU Pth or clone() on Linux directly
1257 use_clone=no
1258 if test x$enable_threads = xyes -a x$use_pthreads != xyes; then 1288 if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
1289 CheckPTH
1290 if test x$use_pth != xyes; then
1291 case "$target" in
1292 *-*-linux*)
1293 use_clone=yes
1294 ;;
1295 esac
1296 fi
1297 fi
1298 }
1299
1300 # Note that we need to have either semaphores or to have mutexes and
1301 # condition variables to implement all thread synchronization primitives
1302 CopyUnixThreadSource()
1303 {
1304 if test x$use_pthreads = xyes -o x$use_clone = xyes; then
1305 # Basic thread creation functions
1306 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1307 if test x$use_pthreads != xyes; then
1308 COPY_ARCH_SRC(src/thread, linux, clone.S)
1309 fi
1310 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1311
1312 # Semaphores
1313 # We can fake these with mutexes and condition variables if necessary
1314 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1315 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1316 else
1317 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1318 fi
1319 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1320
1321 # Mutexes
1322 # We can fake these with semaphores if necessary
1259 case "$target" in 1323 case "$target" in
1260 *-*-linux*) 1324 *-*-bsdi*)
1261 use_clone=yes 1325 COPY_ARCH_SRC(src/thread, bsdi, SDL_syssem.c)
1326 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1262 ;; 1327 ;;
1263 *) 1328 *)
1264 CFLAGS="$CFLAGS -DFORK_HACK" 1329 if test x$glibc20_pthreads = xyes; then
1330 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1331 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1332 else
1333 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1334 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1335 fi
1265 ;; 1336 ;;
1266 esac 1337 esac
1267 fi 1338
1268 } 1339 # Condition variables
1269 1340 # We can fake these with semaphores and mutexes if necessary
1270 dnl See if we can use GNU pth library for threads 1341 if test x$glibc20_pthreads = xyes -o x$has_recursive_mutexes != xyes; then
1271 CheckPTH() 1342 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1272 {
1273 dnl Check for pth support
1274 AC_ARG_ENABLE(pth,
1275 [ --enable-pth use GNU pth library for multi-threading [default=yes]],
1276 , enable_pth=yes)
1277 if test x$enable_threads = xyes -a x$enable_pth = xyes; then
1278 AC_PATH_PROG(PTH_CONFIG, pth-config, no)
1279 if test "$PTH_CONFIG" = "no"; then
1280 use_pth=no
1281 else 1343 else
1282 PTH_CFLAGS=`$PTH_CONFIG --cflags` 1344 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1283 PTH_LIBS=`$PTH_CONFIG --libs --all` 1345 fi
1284 SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS" 1346 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1285 SDL_LIBS="$SDL_LIBS $PTH_LIBS" 1347
1286 CFLAGS="$CFLAGS -DENABLE_PTH" 1348 elif text x$use_pth = xyes; then
1287 use_pth=yes 1349 COPY_ARCH_SRC(src/thread, pth, SDL_systhread.c)
1288 fi 1350 COPY_ARCH_SRC(src/thread, pth, SDL_systhread_c.h)
1289 AC_MSG_CHECKING(pth) 1351 COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex.c)
1290 if test "x$use_pth" = xyes; then 1352 COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex_c.h)
1291 AC_MSG_RESULT(yes) 1353 COPY_ARCH_SRC(src/thread, pth, SDL_syscond.c)
1292 else 1354 COPY_ARCH_SRC(src/thread, pth, SDL_syscond_c.h)
1293 AC_MSG_RESULT(no) 1355 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1294 fi 1356 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1357 else
1358 AC_MSG_ERROR([
1359 *** No thread support detected
1360 ])
1295 fi 1361 fi
1296 } 1362 }
1297 1363
1298 dnl Determine whether the compiler can produce Win32 executables 1364 dnl Determine whether the compiler can produce Win32 executables
1299 CheckWIN32() 1365 CheckWIN32()
1591 CDROM_SUBDIRS="$CDROM_SUBDIRS linux" 1657 CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
1592 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la" 1658 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
1593 fi 1659 fi
1594 # Set up files for the thread library 1660 # Set up files for the thread library
1595 if test x$enable_threads = xyes; then 1661 if test x$enable_threads = xyes; then
1596 if test x$use_pthreads != xyes; then 1662 CopyUnixThreadSource
1597 COPY_ARCH_SRC(src/thread, linux, clone.S)
1598 fi
1599 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
1600 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1601 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1602 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1603 else
1604 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1605 fi
1606 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1607 if test x$glibc20_pthreads = xyes; then
1608 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1609 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1610 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1611 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1612 else
1613 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1614 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1615 if test x$has_recursive_mutexes != xyes; then
1616 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1617 else
1618 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1619 fi
1620 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1621 fi
1622 fi 1663 fi
1623 # Set up files for the timer library 1664 # Set up files for the timer library
1624 if test x$enable_timers = xyes; then 1665 if test x$enable_timers = xyes; then
1625 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 1666 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1626 fi 1667 fi
1661 CDROM_SUBDIRS="$CDROM_SUBDIRS bsdi" 1702 CDROM_SUBDIRS="$CDROM_SUBDIRS bsdi"
1662 CDROM_DRIVERS="$CDROM_DRIVERS bsdi/libcdrom_bsdi.la" 1703 CDROM_DRIVERS="$CDROM_DRIVERS bsdi/libcdrom_bsdi.la"
1663 fi 1704 fi
1664 # Set up files for the thread library 1705 # Set up files for the thread library
1665 if test x$enable_threads = xyes; then 1706 if test x$enable_threads = xyes; then
1666 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 1707 CopyUnixThreadSource
1667 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1668 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1669 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1670 COPY_ARCH_SRC(src/thread, bsdi, SDL_syssem.c)
1671 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1672 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1673 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1674 fi 1708 fi
1675 # Set up files for the timer library 1709 # Set up files for the timer library
1676 if test x$enable_timers = xyes; then 1710 if test x$enable_timers = xyes; then
1677 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 1711 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1678 fi 1712 fi
1709 CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd" 1743 CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
1710 CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la" 1744 CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
1711 fi 1745 fi
1712 # Set up files for the thread library 1746 # Set up files for the thread library
1713 if test x$enable_threads = xyes; then 1747 if test x$enable_threads = xyes; then
1714 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 1748 CopyUnixThreadSource
1715 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1716 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1717 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1718 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1719 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1720 else
1721 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1722 fi
1723 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1724 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1725 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1726 fi 1749 fi
1727 # Set up files for the timer library 1750 # Set up files for the timer library
1728 if test x$enable_timers = xyes; then 1751 if test x$enable_timers = xyes; then
1729 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 1752 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1730 fi 1753 fi
1757 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd" 1780 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
1758 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la" 1781 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
1759 fi 1782 fi
1760 # Set up files for the thread library 1783 # Set up files for the thread library
1761 if test x$enable_threads = xyes; then 1784 if test x$enable_threads = xyes; then
1762 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 1785 CopyUnixThreadSource
1763 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1764 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1765 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1766 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1767 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1768 else
1769 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1770 fi
1771 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1772 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1773 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1774 fi 1786 fi
1775 # Set up files for the timer library 1787 # Set up files for the timer library
1776 if test x$enable_timers = xyes; then 1788 if test x$enable_timers = xyes; then
1777 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 1789 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1778 fi 1790 fi
1811 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd" 1823 CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
1812 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la" 1824 CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
1813 fi 1825 fi
1814 # Set up files for the thread library 1826 # Set up files for the thread library
1815 if test x$enable_threads = xyes; then 1827 if test x$enable_threads = xyes; then
1816 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 1828 CopyUnixThreadSource
1817 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1818 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1819 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1820 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
1821 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1822 else
1823 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1824 fi
1825 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1826 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1827 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1828 fi 1829 fi
1829 # Set up files for the timer library 1830 # Set up files for the timer library
1830 if test x$enable_timers = xyes; then 1831 if test x$enable_timers = xyes; then
1831 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 1832 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1832 fi 1833 fi
1866 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy" 1867 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1867 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la" 1868 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1868 fi 1869 fi
1869 # Set up files for the thread library 1870 # Set up files for the thread library
1870 if test x$enable_threads = xyes; then 1871 if test x$enable_threads = xyes; then
1871 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c) 1872 CopyUnixThreadSource
1872 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
1873 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
1874 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
1875 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1876 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1877 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1878 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1879 fi 1873 fi
1880 # Set up files for the timer library 1874 # Set up files for the timer library
1881 if test x$enable_timers = xyes; then 1875 if test x$enable_timers = xyes; then
1882 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 1876 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1883 fi 1877 fi
1916 CDROM_SUBDIRS="$CDROM_SUBDIRS linux" 1910 CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
1917 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la" 1911 CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
1918 fi 1912 fi
1919 # Set up files for the thread library 1913 # Set up files for the thread library
1920 if test x$enable_threads = xyes; then 1914 if test x$enable_threads = xyes; then
1921 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 1915 CopyUnixThreadSource
1922 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1923 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1924 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1925 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1926 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1927 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
1928 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1929 fi 1916 fi
1930 # Set up files for the timer library 1917 # Set up files for the timer library
1931 if test x$enable_timers = xyes; then 1918 if test x$enable_timers = xyes; then
1932 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 1919 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
1933 fi 1920 fi
1964 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy" 1951 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
1965 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la" 1952 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
1966 fi 1953 fi
1967 # Set up files for the thread library 1954 # Set up files for the thread library
1968 if test x$enable_threads = xyes; then 1955 if test x$enable_threads = xyes; then
1969 if test x$use_pthreads = xyes; then 1956 if test x$use_pthreads = xyes -o x$use_pth = xyes; then
1970 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 1957 CopyUnixThreadSource
1971 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
1972 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1973 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
1974 if test x$have_pthread_sem != xyes; then
1975 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
1976 else
1977 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
1978 fi
1979 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
1980 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
1981 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
1982 else 1958 else
1983 COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c) 1959 COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c)
1984 COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h) 1960 COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h)
1985 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) 1961 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
1986 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) 1962 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2027 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy" 2003 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2028 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la" 2004 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2029 fi 2005 fi
2030 # Set up files for the thread library 2006 # Set up files for the thread library
2031 if test x$enable_threads = xyes; then 2007 if test x$enable_threads = xyes; then
2032 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 2008 CopyUnixThreadSource
2033 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
2034 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
2035 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2036 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
2037 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2038 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
2039 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2040 fi 2009 fi
2041 # Set up files for the timer library 2010 # Set up files for the timer library
2042 if test x$enable_timers = xyes; then 2011 if test x$enable_timers = xyes; then
2043 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 2012 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2044 fi 2013 fi
2073 CDROM_SUBDIRS="$CDROM_SUBDIRS aix" 2042 CDROM_SUBDIRS="$CDROM_SUBDIRS aix"
2074 CDROM_DRIVERS="$CDROM_DRIVERS aix/libcdrom_aix.la" 2043 CDROM_DRIVERS="$CDROM_DRIVERS aix/libcdrom_aix.la"
2075 fi 2044 fi
2076 # Set up files for the thread library 2045 # Set up files for the thread library
2077 if test x$enable_threads = xyes; then 2046 if test x$enable_threads = xyes; then
2078 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 2047 CopyUnixThreadSource
2079 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
2080 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
2081 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2082 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
2083 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2084 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
2085 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2086 fi 2048 fi
2087 # Set up files for the timer library 2049 # Set up files for the timer library
2088 if test x$enable_timers = xyes; then 2050 if test x$enable_timers = xyes; then
2089 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 2051 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2090 fi 2052 fi
2120 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy" 2082 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2121 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la" 2083 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2122 fi 2084 fi
2123 # Set up files for the thread library 2085 # Set up files for the thread library
2124 if test x$enable_threads = xyes; then 2086 if test x$enable_threads = xyes; then
2125 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 2087 CopyUnixThreadSource
2126 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
2127 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
2128 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2129 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
2130 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2131 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
2132 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2133 fi 2088 fi
2134 # Set up files for the timer library 2089 # Set up files for the timer library
2135 if test x$enable_timers = xyes; then 2090 if test x$enable_timers = xyes; then
2136 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 2091 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2137 fi 2092 fi
2166 CDROM_SUBDIRS="$CDROM_SUBDIRS qnx" 2121 CDROM_SUBDIRS="$CDROM_SUBDIRS qnx"
2167 CDROM_DRIVERS="$CDROM_DRIVERS qnx/libcdrom_qnx.la" 2122 CDROM_DRIVERS="$CDROM_DRIVERS qnx/libcdrom_qnx.la"
2168 fi 2123 fi
2169 # Set up files for the thread library 2124 # Set up files for the thread library
2170 if test x$enable_threads = xyes; then 2125 if test x$enable_threads = xyes; then
2171 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 2126 CopyUnixThreadSource
2172 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
2173 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
2174 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2175 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
2176 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2177 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
2178 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2179 fi 2127 fi
2180 # Set up files for the timer library 2128 # Set up files for the timer library
2181 if test x$enable_timers = xyes; then 2129 if test x$enable_timers = xyes; then
2182 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 2130 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2183 fi 2131 fi
2367 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy" 2315 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2368 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la" 2316 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2369 fi 2317 fi
2370 # Set up files for the thread library 2318 # Set up files for the thread library
2371 if test x$enable_threads = xyes; then 2319 if test x$enable_threads = xyes; then
2372 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) 2320 CopyUnixThreadSource
2373 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
2374 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
2375 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
2376 if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
2377 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
2378 else
2379 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
2380 fi
2381 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2382 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
2383 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2384 fi 2321 fi
2385 # Set up files for the timer library 2322 # Set up files for the timer library
2386 if test x$enable_timers = xyes; then 2323 if test x$enable_timers = xyes; then
2387 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) 2324 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
2388 fi 2325 fi
2420 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy" 2357 CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
2421 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la" 2358 CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
2422 fi 2359 fi
2423 # Set up files for the thread library 2360 # Set up files for the thread library
2424 if test x$enable_threads = xyes; then 2361 if test x$enable_threads = xyes; then
2425 if test x$enable_pth = xyes; then 2362 CopyUnixThreadSource
2426 COPY_ARCH_SRC(src/thread, pth, SDL_systhread.c)
2427 COPY_ARCH_SRC(src/thread, pth, SDL_systhread_c.h)
2428 COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex.c)
2429 COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex_c.h)
2430 COPY_ARCH_SRC(src/thread, pth, SDL_syscond.c)
2431 COPY_ARCH_SRC(src/thread, pth, SDL_syscond_c.h)
2432 else
2433 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
2434 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
2435 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
2436 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
2437 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
2438 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
2439 fi
2440 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
2441 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
2442 fi 2363 fi
2443 # Set up files for the timer library 2364 # Set up files for the timer library
2444 if test x$enable_timers = xyes; then 2365 if test x$enable_timers = xyes; then
2445 COPY_ARCH_SRC(src/timer, mint, SDL_systimer.c) 2366 COPY_ARCH_SRC(src/timer, mint, SDL_systimer.c)
2446 COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer.S) 2367 COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer.S)