diff configure.in @ 185:34d316d5e744

Added support for the GNU Pth thread lib (thanks Mandin!)
author Sam Lantinga <slouken@libsdl.org>
date Fri, 14 Sep 2001 04:34:15 +0000
parents 1fc1a101bf23
children c151cfc43c07
line wrap: on
line diff
--- a/configure.in	Fri Sep 14 04:33:01 2001 +0000
+++ b/configure.in	Fri Sep 14 04:34:15 2001 +0000
@@ -1131,6 +1131,33 @@
     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()
 {