Merged NSPRPUB_CLIENT_BRANCH onto the trunk.
authorwtc%netscape.com
Sat, 12 May 2001 06:40:35 +0000
changeset 1873 45052dbd1703d9b32f68f6a803c8ef112a0d2884
parent 1872 8f915b2fa700f007f2fc18e835112b313bf0176e
child 1874 358928c56a41f2594dd5929d2df8f6eb1355e67a
push idunknown
push userunknown
push dateunknown
Merged NSPRPUB_CLIENT_BRANCH onto the trunk.
lib/prstreams/.cvsignore
lib/prstreams/Makefile.in
lib/prstreams/tests/testprstrm/.cvsignore
lib/prstreams/tests/testprstrm/Makefile.in
new file mode 100644
--- /dev/null
+++ b/lib/prstreams/.cvsignore
@@ -0,0 +1,1 @@
+Makefile
--- a/lib/prstreams/Makefile.in
+++ b/lib/prstreams/Makefile.in
@@ -37,17 +37,16 @@ MOD_DEPTH	= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(MOD_DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/config.mk
 
-ifndef USE_AUTOCONF
 # Disable optimization of the nspr on SunOS4.1.3
 ifeq ($(OS_ARCH),SunOS)
     ifeq ($(OS_RELEASE),4.1.3_U1)
         OPTIMIZER =
     else
         # The C++ compiler in Workshop 5.0 uses standard
         # iostreams as default.  -library=iostream will
         # allow Workshop 5.0 to work with classic iostreams.
@@ -64,55 +63,45 @@ ifeq ($(OS_ARCH), IRIX)
     ifneq ($(OS_RELEASE),5.3)
         CCC_ONLY_FLAGS += -exceptions
     endif
 endif
 
 ifeq ($(OS_ARCH), BeOS)
     CFLAGS += -frtti -fexceptions
 endif
-endif # !USE_AUTOCONF
 
-INCLUDES = -I$(includedir)
+INCLUDES = -I$(dist_includedir)
 
 HEADERS = $(wildcard $(srcdir)/*.h)
 
 CSRCS = \
 	plvrsion.c \
 	$(NULL)
 
 CXXSRCS = \
 	prstrms.cpp \
 	$(NULL)
 
 OBJS = $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX)) $(CXXSRCS:.cpp=.$(OBJ_SUFFIX)))
 
-ifndef USE_AUTOCONF
+LIBRARY_NAME    = prstrms
+LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
+
+RELEASE_HEADERS = $(HEADERS)
+RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
+RELEASE_LIBS    = $(TARGETS)
+
+include $(topsrcdir)/config/rules.mk
+
 ifeq ($(OS_ARCH), WINNT)
-    ifeq ($(OS_TARGET), WIN16)
-        EXTRA_LIBS = $(libdir)/nspr$(MOD_VERSION).lib
-    else
         DLLBASE=/BASE:0x30000000
         RES=$(OBJDIR)/prstrms.res
         RESNAME=prstrms.rc
-        OS_LIBS = user32.lib
-        ifeq ($(OS_TARGET), WIN95)
-            EXTRA_LIBS = $(libdir)/nspr$(MOD_VERSION).lib
-        else
-            EXTRA_LIBS = $(libdir)/libnspr$(MOD_VERSION).lib
-        endif
-    endif
 else
-    ifeq ($(OS_ARCH),OS2)
-      ifeq ($(MOZ_OS2_TOOLS),VACPP)
-         EXTRA_LIBS = $(libdir)/nspr$(MOD_VERSION).$(LIB_SUFFIX)
-      else
-         EXTRA_LIBS = -L$(libdir) -lnspr$(MOD_VERSION) -lstdcpp
-      endif
-    else
     ifeq ($(OS_ARCH), AIX)
       ifeq ($(OS_RELEASE), 4.1)
         ifeq ($(CLASSIC_NSPR),1)
             OS_LIBS += -lC -lc
         else
             OS_LIBS += -lC_r -lc_r
         endif
       else
@@ -121,55 +110,46 @@ else
         ifeq ($(CLASSIC_NSPR),1)
             MKSHLIB = makeC++SharedLib -p 0
         else
             MKSHLIB = makeC++SharedLib_r -p 0
         endif
         OS_LIBS += -ldl
       endif
     endif
-    ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
-        EXTRA_LIBS = -L$(libdir) -lnspr$(MOD_VERSION)_shr
-    else
-        EXTRA_LIBS = -L$(libdir) -lnspr$(MOD_VERSION)
-    endif
-endif
 endif
 
 # On NCR and SCOOS, we can't link with extra libraries when
 # we build a shared library.  If we do so, the linker doesn't
 # complain, but we would run into weird problems at run-time.
 # Therefore on these platforms, we link just the object files.
 ifeq ($(OS_ARCH),NCR)
     EXTRA_LIBS =
 endif
 ifeq ($(OS_ARCH),SCOOS)
     EXTRA_LIBS =
 endif
 ifeq ($(OS_ARCH),BeOS)
-    EXTRA_LIBS = -lstdc++.r4 -L$(libdir) -lnspr$(MOD_VERSION)
+    EXTRA_LIBS = -lstdc++.r4 -L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)
 endif
 
 ifeq ($(OS_ARCH), UNIXWARE)
     OS_LIBS += -lC
 endif
-endif # !USE_AUTOCONF
 
-ifdef RESOLVE_LINK_SYMBOLS
-EXTRA_LIBS := -L$(libdir) -lnspr$(MOD_VERSION)
+ifeq ($(OS_ARCH),WINNT)
+OS_LIBS	+= user32.lib
 endif
 
-LIBRARY_NAME    = prstrms
-LIBRARY_VERSION = $(MOD_VERSION)
+EXTRA_LIBS = $(LIBNSPR)
 
-RELEASE_HEADERS = $(HEADERS)
-RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
-RELEASE_LIBS    = $(TARGETS)
+ifdef RESOLVE_LINK_SYMBOLS
+EXTRA_LIBS += $(OS_LIBS)
+endif
 
-include $(topsrcdir)/config/rules.mk
 
 #
 # Version information generation (begin)
 #
 ECHO = echo
 TINC = $(OBJDIR)/_pl_bld.h
 PROD = $(notdir $(SHARED_LIBRARY))
 NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
@@ -193,36 +173,36 @@ endif
 	@$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
 
 
 $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
 ifeq ($(OS_ARCH), WINNT)
 	$(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
 else
 ifeq ($(MOZ_OS2_TOOLS), VACPP)
-	$(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c
+	$(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
 else
-	$(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) plvrsion.c
+	$(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
 endif
 endif
 #
 # Version information generation (end)
 #
 
 export:: $(TARGETS) $(HEADERS)
-	$(INSTALL) -m 444 $(HEADERS) $(includedir)
-	$(INSTALL) -m 444 $(TARGETS) $(libdir)
+	$(INSTALL) -m 444 $(HEADERS) $(dist_includedir)
+	$(INSTALL) -m 444 $(TARGETS) $(dist_libdir)
 ifeq ($(OS_ARCH),OS2)
-	$(INSTALL) -m 444 $(TARGETS) $(bindir)
+	$(INSTALL) -m 444 $(TARGETS) $(dist_bindir)
 endif
 ifeq ($(OS_ARCH),HP-UX)
 ifdef SHARED_LIBRARY
-	$(INSTALL) -m 755 $(SHARED_LIBRARY) $(libdir)
+	$(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir)
 endif
 endif
 ifeq ($(OS_ARCH),OpenVMS)
-	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(libdir)
+	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_libdir)
 ifdef SHARED_LIBRARY
-	$(INSTALL) -m 444 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(libdir)
-	$(INSTALL) -m 444 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(bindir)
+	$(INSTALL) -m 444 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(dist_libdir)
+	$(INSTALL) -m 444 $(SHARED_LIBRARY:.$(DLL_SUFFIX)=.vms) $(dist_bindir)
 endif
 endif
 
new file mode 100644
--- /dev/null
+++ b/lib/prstreams/tests/testprstrm/.cvsignore
@@ -0,0 +1,1 @@
+Makefile
--- a/lib/prstreams/tests/testprstrm/Makefile.in
+++ b/lib/prstreams/tests/testprstrm/Makefile.in
@@ -57,127 +57,127 @@ PROG_SUFFIX = .exe
 else
 PROG_SUFFIX =
 endif
 
 PROGS = $(addprefix $(OBJDIR)/, $(CXXSRCS:.cpp=$(PROG_SUFFIX)))
 
 TARGETS = $(PROGS) $(OBJS)
 
-INCLUDES = -I$(includedir)
+INCLUDES = -I$(dist_includedir)
 
 # Setting the variables LDOPTS and LIBPR.  We first initialize
 # them to the default values, then adjust them for some platforms.
-LDOPTS = -L$(libdir)
-LIBPR = -lnspr$(MOD_VERSION)
-LIBPRSTRMS = -lprstrms$(MOD_VERSION)
+LDOPTS = -L$(dist_libdir)
+LIBPR = -lnspr$(MOD_MAJOR_VERSION)
+LIBPRSTRMS = -lprstrms$(MOD_MAJOR_VERSION)
 
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET), WIN16)
-  LIBPR = $(libdir)/nspr$(MOD_VERSION).lib
-  LIBPRSTRMS = $(libdir)/prstrms$(MOD_VERSION).lib
+  LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).lib
+  LIBPRSTRMS = $(dist_libdir)/prstrms$(MOD_MAJOR_VERSION).lib
 else
   LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
   ifeq ($(OS_TARGET), WIN95)
-    LIBPR = $(libdir)/nspr$(MOD_VERSION).$(LIB_SUFFIX)
-    LIBPRSTRMS = $(libdir)/prstrms$(MOD_VERSION).$(LIB_SUFFIX)
+    LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
+    LIBPRSTRMS = $(dist_libdir)/prstrms$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
   else
-    LIBPR = $(libdir)/libnspr$(MOD_VERSION).$(LIB_SUFFIX)
-    LIBPRSTRMS = $(libdir)/libprstrms$(MOD_VERSION).$(LIB_SUFFIX)
+    LIBPR = $(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
+    LIBPRSTRMS = $(dist_libdir)/libprstrms$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
   endif
 endif
 endif
 
 ifeq ($(OS_ARCH),OS2)
   ifeq ($(MOZ_OS2_TOOLS),VACPP)
     LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO /S:32768
-    LIBPR = $(libdir)/nspr$(MOD_VERSION).lib
-    LIBPRSTRMS = $(libdir)/prstrms$(MOD_VERSION).$(LIB_SUFFIX)
+    LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).lib
+    LIBPRSTRMS = $(dist_libdir)/prstrms$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
   else
     LDOPTS += -Zomf -Zlinker /PM:VIO -lstdcpp
   endif
 endif
 
 ifneq ($(OS_ARCH), WINNT)
 PWD = $(shell pwd)
 endif
 
 ifeq ($(OS_ARCH), IRIX)
-LDOPTS += -rpath $(PWD)/$(libdir)
+LDOPTS += -rpath $(PWD)/$(dist_libdir)
 endif
 
 ifeq ($(OS_ARCH), OSF1)
-LDOPTS += -rpath $(PWD)/$(libdir)
+LDOPTS += -rpath $(PWD)/$(dist_libdir)
 endif
 
 ifeq ($(OS_ARCH), HP-UX)
-LDOPTS += -Wl,+s,+b,$(PWD)/$(libdir)
+LDOPTS += -Wl,+s,+b,$(PWD)/$(dist_libdir)
 endif
 
 # AIX
 ifeq ($(OS_ARCH),AIX)
-LDOPTS += -blibpath:$(PWD)/$(libdir):/usr/lib:/lib
+LDOPTS += -blibpath:$(PWD)/$(dist_libdir):/usr/lib:/lib
 ifeq ($(OS_ARCH)$(OS_RELEASE),AIX4.1)
-LIBPR = -lnspr$(MOD_VERSION)_shr
-LIBPRSTRMS = -lprstrms$(MOD_VERSION)_shr
+LIBPR = -lnspr$(MOD_MAJOR_VERSION)_shr
+LIBPRSTRMS = -lprstrms$(MOD_MAJOR_VERSION)_shr
 else
 LDOPTS += -brtl
 EXTRA_LIBS = -ldl
 endif
 endif
 
 # Solaris
 ifeq ($(OS_ARCH), SunOS)
 ifneq ($(OS_RELEASE), 4.1.3_U1)
 ifdef NS_USE_GCC
-LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(libdir)
+LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(dist_libdir)
 else
-LDOPTS += -R $(PWD)/$(libdir)
+LDOPTS += -R $(PWD)/$(dist_libdir)
 # CC on SunOS 5.4 and 5.5.x need to link with -lthread or -lpthread
 # (or use the -mt switch) even though we already linked with these
 # system libraries when we built libnspr.so.
 ifdef USE_PTHREADS
 EXTRA_LIBS = -lpthread
 else
 EXTRA_LIBS = -lthread
 endif # USE_PTHREADS
 endif # NS_USE_GCC
 endif # 4.1.3_U1
 endif # SunOS
 
 ifeq ($(OS_ARCH), NCR)
 # XXX: We see some strange problems when we link with libnspr.so.
 # So for now we use static libraries on NCR.  The shared library
 # stuff below is commented out.
-LIBPR = $(libdir)/libnspr$(MOD_VERSION).a
-LIBPRSTRMS = $(libdir)/libprstrms$(MOD_VERSION).a
+LIBPR = $(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).a
+LIBPRSTRMS = $(dist_libdir)/libprstrms$(MOD_MAJOR_VERSION).a
 EXTRA_LIBS = -lsocket -lnsl -ldl
 
 # NCR needs to link against -lsocket -lnsl (and -lc, which is linked
 # implicitly by $(CC)) again even though we already linked with these
 # system libraries when we built libnspr.so.
 #EXTRA_LIBS = -lsocket -lnsl
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath 
 # option for ld on other platforms.
-#export LD_RUN_PATH = $(PWD)/$(libdir)
+#export LD_RUN_PATH = $(PWD)/$(dist_libdir)
 endif
 
 ifeq ($(OS_ARCH), SCOOS)
 # SCO Unix needs to link against -lsocket again even though we
 # already linked with these system libraries when we built libnspr.so.
 EXTRA_LIBS = -lsocket
 # This hardcodes in the executable programs the directory to find
 # libnspr.so etc. at program startup.  Equivalent to the -R or -rpath
 # option for ld on other platforms.
-export LD_RUN_PATH = $(PWD)/$(libdir)
+export LD_RUN_PATH = $(PWD)/$(dist_libdir)
 endif
 
 ifeq ($(OS_ARCH), UNIXWARE)
-export LD_RUN_PATH = $(PWD)/$(libdir)
+export LD_RUN_PATH = $(PWD)/$(dist_libdir)
 endif
 
 #####################################################
 #
 # The rules
 #
 #####################################################
 
@@ -200,17 +200,17 @@ ifeq ($(AIX_PRE_4_2),1)
 #
 # We use a pattern rule in ns/nspr20/config/rules.mk to generate
 # the .$(OBJ_SUFFIX) file from the .c source file, then do the
 # two-step linking hack below.
 
 $(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
 	@$(MAKE_OBJDIR)
 	rm -f $@ $(AIX_TMP)
-	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(libdir)/libnspr$(MOD_VERSION).a
+	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).a
 	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
 	rm -f $(AIX_TMP)
 
 else
 
 # All platforms that are not AIX pre-4.2.
 
 $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)