From a7930cdaa0de60559ab23281e8c2825a2d8ada7a Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Thu, 24 Oct 2002 19:05:49 +0000 Subject: [PATCH] Added SOLARIS_VERSION so uname executed not executed on each compile line. --- configure/os/CONFIG.Common.solaris-sparc | 26 ++++++++++++++---------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/configure/os/CONFIG.Common.solaris-sparc b/configure/os/CONFIG.Common.solaris-sparc index 0d5c6dd05..ed0e7f033 100644 --- a/configure/os/CONFIG.Common.solaris-sparc +++ b/configure/os/CONFIG.Common.solaris-sparc @@ -13,20 +13,21 @@ include $(CONFIG)/os/CONFIG.Common.UnixCommon OS_CLASS = solaris ARCH_CLASS = sparc -CODE_CPPFLAGS = -D__EXTENSIONS__ +CODE_CPPFLAGS = -D__EXTENSIONS__ -# This is the only combination of posix threads flags that works with solaris 6 -####POSIX_CPPFLAGS_YES = -D_REENTRANT -D_POSIX_C_SOURCE=199506L -####POSIX_LDLIBS_YES += -lposix4 -lpthread -lthread +SOLARIS_VERSION = $(subst 5.,,$(shell uname -r)) -# This set of flags is recommended by sun for posix threads and works with solaris 8 -POSIX_CPPFLAGS_YES = -D_POSIX_C_SOURCE=199506L -POSIX_LDLIBS_YES += -lposix4 -lpthread +# Flags for solaris 6 +POSIX_CPPFLAGS_YES_6 += -D_REENTRANT +POSIX_LDLIBS_YES_6 += -lthread -POSIX_CPPFLAGS_NO = +POSIX_CPPFLAGS_YES += -D_POSIX_C_SOURCE=199506L $(POSIX_CPPFLAGS_YES_$(SOLARIS_VERSION)) +POSIX_LDLIBS_YES += -lposix4 -lpthread $(POSIX_LDLIBS_YES_$(SOLARIS_VERSION)) + +POSIX_CPPFLAGS_NO += POSIX_LDLIBS_NO += -OP_SYS_CPPFLAGS = -DSOLARIS=$(subst 5.,,$(shell uname -r)) +OP_SYS_CPPFLAGS += -DSOLARIS=$(SOLARIS_VERSION) # socket and nsl needed by libca.a OP_SYS_LDLIBS += -lsocket -lnsl @@ -40,6 +41,9 @@ ifdef CROSS CMPLR_PREFIX=$(addsuffix -,$(GNU_TARGET)) endif -#Allow R3.13 built extensions to load R3.14 shared libs -SYS_SHRLIB_LIBS += posix4 pthread Crun +# Lib for solaris 8 +SYS_SHRLIB_LIBS_8 += Crun + +#Allow R3.13 built extensions to load R3.14 shared libs +SYS_SHRLIB_LIBS += posix4 pthread $(SYS_SHRLIB_LIBS_$(SOLARIS_VERSION))