From f44beffdf26a688f1d3a86309367a2ae84e021ff Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 1 Sep 2003 06:31:21 +0000 Subject: [PATCH] Corretly set threading options when using stlport-io library. [SVN r19891] --- gcc-stlport-tools.jam | 40 ++++++++++++++++++++++++++++++++++++++-- v1/gcc-stlport-tools.jam | 40 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 76 insertions(+), 4 deletions(-) diff --git a/gcc-stlport-tools.jam b/gcc-stlport-tools.jam index 745ee90b4..512525e78 100644 --- a/gcc-stlport-tools.jam +++ b/gcc-stlport-tools.jam @@ -19,5 +19,41 @@ else SEARCH on stlport.jam = $(BOOST_BUILD_PATH) ; include stlport.jam ; -# pthread is always needed when using the library (i.e. iostreams). -flags gcc-stlport FINDLIBS on : pthread ; +# threading libraries always needed when using the library (i.e. iostreams). +if $(UNIX) +{ + switch $(JAMUNAME) + { + case SunOS* : + { + flags gcc LINKFLAGS on : -pthreads ; + flags gcc FINDLIBS on : rt ; + } + case BeOS : + { + # BeOS has no threading options, don't set anything here. + } + case Darwin : + { + # MacOS X, doesn't need any threading options set + # -lpthread is linked to by default. + } + case *BSD : + { + flags gcc LINKFLAGS on : -pthread ; + } + case IRIX : + { + # gcc on IRIX does not support multi-threading, don't set anything here. + } + case HP_UX : + { + # gcc on HP-UX does not support multi-threading, don't set anything here + } + case * : + { + flags gcc LINKFLAGS on : -pthread ; + flags gcc FINDLIBS on : rt ; + } + } +} diff --git a/v1/gcc-stlport-tools.jam b/v1/gcc-stlport-tools.jam index 745ee90b4..512525e78 100644 --- a/v1/gcc-stlport-tools.jam +++ b/v1/gcc-stlport-tools.jam @@ -19,5 +19,41 @@ else SEARCH on stlport.jam = $(BOOST_BUILD_PATH) ; include stlport.jam ; -# pthread is always needed when using the library (i.e. iostreams). -flags gcc-stlport FINDLIBS on : pthread ; +# threading libraries always needed when using the library (i.e. iostreams). +if $(UNIX) +{ + switch $(JAMUNAME) + { + case SunOS* : + { + flags gcc LINKFLAGS on : -pthreads ; + flags gcc FINDLIBS on : rt ; + } + case BeOS : + { + # BeOS has no threading options, don't set anything here. + } + case Darwin : + { + # MacOS X, doesn't need any threading options set + # -lpthread is linked to by default. + } + case *BSD : + { + flags gcc LINKFLAGS on : -pthread ; + } + case IRIX : + { + # gcc on IRIX does not support multi-threading, don't set anything here. + } + case HP_UX : + { + # gcc on HP-UX does not support multi-threading, don't set anything here + } + case * : + { + flags gcc LINKFLAGS on : -pthread ; + flags gcc FINDLIBS on : rt ; + } + } +}