On Solaris, the prpoll test needs to link with -lsocket because
authorwtc%netscape.com
Mon, 05 Apr 1999 23:23:05 +0000
changeset 530 d140f666f0ab91a5fbcbea86f9408ba91f92b658
parent 529 58a985b72241908ed886af03b80016ab84f0af44
child 531 cc2481cf7ca0f6778e48ee3c9a800426451242b0
push idunknown
push userunknown
push dateunknown
On Solaris, the prpoll test needs to link with -lsocket because it calls BSD socket functions. Moved the rule for the attach test to be together with other tests that need to link with -lpthread.
pr/tests/Makefile
--- a/pr/tests/Makefile
+++ b/pr/tests/Makefile
@@ -426,24 +426,16 @@ ifeq ($(AIX_PRE_4_2),1)
 	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(DIST)/lib/libnspr$(MOD_VERSION).a
 	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
 	rm -f $(AIX_TMP)
 
 else
 
 # All platforms that are not AIX pre-4.2.
 
-
-ifeq ($(USE_PTHREADS), 1)
-$(OBJDIR)/attach: $(OBJDIR)/attach.$(OBJ_SUFFIX)
-	@$(MAKE_OBJDIR)
-	$(CC) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@
-endif
-
-
 $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET),WIN16)
 	echo system windows >w16link
 	echo name $@  >>w16link
 	echo option map >>w16link
 #	echo option CASEEXACT >>w16link
@@ -470,17 +462,28 @@ endif
 
 endif
 
 export:: $(TARGETS)
 install:: export
 clean::
 	rm -f $(TARGETS)
 
+# The prpoll test calls BSD socket functions, so it needs to link
+# with -lsocket on some platforms.
+ifeq ($(OS_ARCH),SunOS)
+ifneq ($(OS_RELEASE),4.1.3_U1)
+$(OBJDIR)/prpoll: $(OBJDIR)/prpoll.o
+	$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) -lsocket $(EXTRA_LIBS) -o $@
+endif
+endif
+
 ifeq ($(USE_PTHREADS), 1)
+$(OBJDIR)/attach: $(OBJDIR)/attach.o
+	$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@
 $(OBJDIR)/foreign: $(OBJDIR)/foreign.o
 	$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@
 $(OBJDIR)/provider: $(OBJDIR)/provider.o
 	$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@
 $(OBJDIR)/socket: $(OBJDIR)/socket.o
 	$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@
 $(OBJDIR)/testfile: $(OBJDIR)/testfile.o
 	$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPR) $(LIBPTHREAD) $(EXTRA_LIBS) -o $@