summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/pthreads.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/m4/pthreads.m4 b/m4/pthreads.m4
index 363a8b4b2..c35d697e9 100644
--- a/m4/pthreads.m4
+++ b/m4/pthreads.m4
@@ -20,6 +20,9 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [
case $host in
*-hpux11*) PTHREAD_CFLAGS="" ;;
*-darwin*) PTHREAD_CFLAGS="" ;;
+ *-solaris*)
+ # Handle Studio compiler
+ CC_CHECK_CFLAGS([-mt], [PTHREAD_CFLAGS="-mt -D_REENTRANT"], [PTHREAD_CFLAGS="-D_REENTRANT"]);;
*) PTHREAD_CFLAGS="-pthread" ;;
esac
fi
@@ -27,6 +30,9 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [
case $host in
*-hpux11*) PTHREAD_LIBS="-lpthread" ;;
*-darwin*) PTHREAD_LIBS="" ;;
+ *-solaris*)
+ # Handle Studio compiler
+ CC_CHECK_CFLAGS([-mt], [PTHREAD_LIBS="-lpthread -lposix4 -lrt"], [PTHREAD_LIBS="-lpthread -lposix4 -lrt"]);;
*) PTHREAD_LIBS="-pthread" ;;
esac
fi