summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>2001-10-02 22:19:12 +0000
committercls%seawood.org <devnull@localhost>2001-10-02 22:19:12 +0000
commitacf4c988de0d58f0bbd36ef13381dc44cc87f00d (patch)
treef4648db980f6c0817b0b3fb51e4c1cd93e2c3d7a
parent3d02ec916350489e795bda21c1d996e2940a652f (diff)
downloadnspr-hg-acf4c988de0d58f0bbd36ef13381dc44cc87f00d.tar.gz
Solaris 7 has deprecated the use of libposix4 in favor of librt. Check the OS_RELEASE 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