summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseawood%netscape.com <devnull@localhost>2001-10-02 22:21:53 +0000
committerseawood%netscape.com <devnull@localhost>2001-10-02 22:21:53 +0000
commit2c880d4bfb0b36f41b015822e1a2dfccb49aa509 (patch)
treeb85e2d14e35aed2a5690e368e12181cd36a04ddb
parent452085d3e61d4385b6676bb85726ead304d556c2 (diff)
downloadnspr-hg-2c880d4bfb0b36f41b015822e1a2dfccb49aa509.tar.gz
Solaris 7 has deprecated the use of libposix4 in favor of librt. Check the OS_RE
LEASE and use the appropriate library. Bug #96986 r=wtc
-rw-r--r--pr/src/Makefile.in15
1 files changed, 13 insertions, 2 deletions
diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
index 64356527..d4af5676 100644
--- a/pr/src/Makefile.in
+++ b/pr/src/Makefile.in
@@ -69,13 +69,24 @@ ifeq ($(OS_ARCH),SunOS)
ifeq ($(OS_RELEASE),4.1.3_U1)
OS_LIBS = -lm
else # 4.1.3_U1
+
+#
+# In Solaris 2.6 or earlier, -lrt is called -lposix4.
+#
+LIBRT_TEST=$(firstword $(sort 5.7 $(OS_RELEASE)))
+ifeq (5.7, $(LIBRT_TEST))
+LIBRT=-lrt
+else
+LIBRT=-lposix4
+endif
+
ifdef USE_PTHREADS
-OS_LIBS = -lpthread -lthread -lposix4 -lsocket -lnsl -ldl
+OS_LIBS = -lpthread -lthread ${LIBRT} -lsocket -lnsl -ldl
else
ifdef LOCAL_THREADS_ONLY
OS_LIBS = -lsocket -lnsl -ldl
else
-OS_LIBS = -lthread -lposix4 -lsocket -lnsl -ldl
+OS_LIBS = -lthread ${LIBRT} -lsocket -lnsl -ldl
endif # LOCAL_THREADS_ONLY
endif # USE_PTHREADS
endif # 4.1.3_U1