comparison configure.in @ 3696:47d923feedb0

Fixed bug #935 Patrice Mandin Hello, I originally added pth support for threads in SDL 1.2 because on the Atari platform we did not have any thread library. I think pth support could be removed from SDL 1.3 for two reasons: - Atari platform removed - pth does not provides real (preemptive) threads, because it is user space, and expect the application to call one of its function to give CPU to another thread. So it is not exactly useful for applications, that expect threads to run simultaneously.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 24 Jan 2010 20:47:20 +0000
parents be6fe5f0b1db
children 1bceff8f008f
comparison
equal deleted inserted replaced
3695:f6a8be3fefa0 3696:47d923feedb0
1692 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts" 1692 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
1693 fi 1693 fi
1694 fi 1694 fi
1695 } 1695 }
1696 1696
1697 dnl See if we can use GNU pth library for threads
1698 CheckPTH()
1699 {
1700 dnl Check for pth support
1701 AC_ARG_ENABLE(pth,
1702 AC_HELP_STRING([--enable-pth], [use GNU pth library for multi-threading [[default=yes]]]),
1703 , enable_pth=yes)
1704 if test x$enable_threads = xyes -a x$enable_pth = xyes; then
1705 AC_PATH_PROG(PTH_CONFIG, pth-config, no)
1706 if test "$PTH_CONFIG" = "no"; then
1707 use_pth=no
1708 else
1709 use_pth=yes
1710 fi
1711 AC_MSG_CHECKING(pth)
1712 AC_MSG_RESULT($use_pth)
1713 if test "x$use_pth" = xyes; then
1714 AC_DEFINE(SDL_THREAD_PTH)
1715 SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
1716 SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
1717 SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
1718 SDL_LIBS="$SDL_LIBS `$PTH_CONFIG --libs --all`"
1719 have_threads=yes
1720 fi
1721 fi
1722 }
1723
1724 dnl See what type of thread model to use on Linux and Solaris 1697 dnl See what type of thread model to use on Linux and Solaris
1725 CheckPTHREAD() 1698 CheckPTHREAD()
1726 { 1699 {
1727 dnl Check for pthread support 1700 dnl Check for pthread support
1728 AC_ARG_ENABLE(pthreads, 1701 AC_ARG_ENABLE(pthreads,
1890 # Condition variables 1863 # Condition variables
1891 # We can fake these with semaphores and mutexes if necessary 1864 # We can fake these with semaphores and mutexes if necessary
1892 SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c" 1865 SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
1893 1866
1894 have_threads=yes 1867 have_threads=yes
1895 else
1896 CheckPTH
1897 fi 1868 fi
1898 fi 1869 fi
1899 } 1870 }
1900 1871
1901 dnl Determine whether the compiler can produce Win32 executables 1872 dnl Determine whether the compiler can produce Win32 executables