From 2f96ff12d4f09450a09849de52f0a733154cf6d0 Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Mon, 22 Nov 2010 10:53:45 +0100 Subject: [PATCH] Added pthreads detection. --- config.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/config.sh b/config.sh index ea9b729..7546f1d 100755 --- a/config.sh +++ b/config.sh @@ -427,6 +427,22 @@ if [ "$WITH_WIN32" != 1 ] ; then fi fi +if [ "$WITH_WIN32" != 1 ] ; then + echo -n "Testing for POSIX threads... " + echo "#include " > .tmp.c + echo "int main(void) { pthread_t t; return 0; }" >> .tmp.c + + $CC .tmp.c -o .tmp.o 2>> .config.log + + if [ $? = 0 ] ; then + echo "#define CONFOPT_PTHREADS 1" >> config.h + echo "-pthread" >> config.ldflags + echo "OK" + else + echo "No" + fi +fi + # test for Grutatxt echo -n "Testing if Grutatxt is installed... " -- 2.11.4.GIT