diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-22 16:33:10 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-22 16:33:10 +0200 |
commit | 0c3e2a0e3f7c617f230418ed3f100443251d7b4a (patch) | |
tree | 77bee560a6df2bc9d863a724db19954b3b1403fb /m4 | |
parent | bcea2d32db196b436e5e869bd4374cea3ce60ad5 (diff) | |
download | xine-lib-0c3e2a0e3f7c617f230418ed3f100443251d7b4a.tar.gz xine-lib-0c3e2a0e3f7c617f230418ed3f100443251d7b4a.tar.bz2 |
Add support for Sun Studio compiler even when building on Linux.
--HG--
extra : transplant_source : tu6%0Bb%F5I%A0V%B7%BF%5BM%8E_%86gt%06%1C
Diffstat (limited to 'm4')
-rw-r--r-- | m4/pthreads.m4 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/m4/pthreads.m4 b/m4/pthreads.m4 index ecc580e9a..fb1adaab8 100644 --- a/m4/pthreads.m4 +++ b/m4/pthreads.m4 @@ -20,9 +20,10 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [ case $host in *-hpux11*) PTHREAD_CFLAGS="" ;; *-darwin*) PTHREAD_CFLAGS="" ;; - *-solaris*) - # Handle Studio compiler + *-solaris*|*-linux-gnu) + dnl Handle Sun Studio compiler (also on Linux) CC_CHECK_CFLAGS([-mt], [PTHREAD_CFLAGS="-mt"]);; + *) PTHREAD_CFLAGS="-pthread" ;; esac fi @@ -31,10 +32,15 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [ *-hpux11*) PTHREAD_LIBS="-lpthread" ;; *-darwin*) PTHREAD_LIBS="" ;; *-solaris*) - # Use the same libraries for gcc and sun studio cc + dnl Use the same libraries for gcc and Sun Studio cc PTHREAD_LIBS="-lpthread -lposix4 -lrt";; *) PTHREAD_LIBS="-pthread" ;; esac + + dnl Again, handle Sun Studio compiler + if test "x${PTHREAD_CFLAGS}" = "x-mt"; then + PTHREAD_LIBS="-mt" + fi fi AC_CACHE_CHECK([if $CC supports Pthread], |