From 2d9f5f4b2079c1f167a9b9636f5c4b3525815750 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 14 Sep 2001 04:34:15 +0000 Subject: [PATCH] Added support for the GNU Pth thread lib (thanks Mandin!) --- configure.in | 27 ++++++++ docs.html | 2 + src/thread/Makefile.am | 13 ++-- src/thread/pth/SDL_systhread.c | 102 +++++++++++++++++++++++++++++++ src/thread/pth/SDL_systhread_c.h | 25 ++++++++ 5 files changed, 163 insertions(+), 6 deletions(-) create mode 100644 src/thread/pth/SDL_systhread.c create mode 100644 src/thread/pth/SDL_systhread_c.h diff --git a/configure.in b/configure.in index 6b6c023dd..b8ef66b62 100644 --- a/configure.in +++ b/configure.in @@ -1131,6 +1131,33 @@ CheckPTHREAD() AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes) } +dnl See if we can use GNU pth library for threads +CheckPTH() +{ + dnl Check for pth support + AC_ARG_ENABLE(pth, +[ --enable-pth use GNU pth library for multi-threading [default=yes]], + , enable_pth=yes) + if test x$enable_threads = xyes -a x$enable_pth = xyes; then + AC_PATH_PROG(PTH_CONFIG, pth-config, no) + if test "$PTH_CONFIG" = "no"; then + use_pth=no + else + PTH_CFLAGS=`$PTH_CONFIG --cflags` + PTH_LIBS=`$PTH_CONFIG --libs` + SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS" + SDL_LIBS="$SDL_LIBS $PTH_LIBS" + use_pth=yes + fi + AC_MSG_CHECKING(pth) + if test "x$use_pth" = xyes; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + fi +} + dnl Determine whether the compiler can produce Win32 executables CheckWIN32() { diff --git a/docs.html b/docs.html index 4a8176bc0..1539f5096 100644 --- a/docs.html +++ b/docs.html @@ -16,6 +16,8 @@

Major changes since SDL 1.0.0: