Added autodetection of libpthread. Defaults to USE_PTHREADS if libpthread is detected. Can be overridden via --enable-user-pthread, --with-native-threads or --with-bthreads depending upon the platform. unlabeled-1.3.2
authorcls%seawood.org
Thu, 05 Aug 1999 01:09:53 +0000
branchunlabeled-1.3.2
changeset 742 926f53113c75507fc4920754cd3ca44c7e09a942
parent 739 29662be42ef1ba6496091ada95650026fbe0c610
push idunknown
push userunknown
push dateunknown
Added autodetection of libpthread. Defaults to USE_PTHREADS if libpthread is detected. Can be overridden via --enable-user-pthread, --with-native-threads or --with-bthreads depending upon the platform. Sets MOD_VERSION & MOD_NAME to get the nspr version suffix. Gcc under win32 uses standard gcc extensions for OBJ_SUFFIX, DLL_SUFFIX & LIB_SUFFIX. Requires pr/src/md/platform/objs.mk to set md object files. Added objs.mk for windows.
pr/src/Makefile.in
pr/src/md/windows/Makefile.in
--- a/pr/src/Makefile.in
+++ b/pr/src/Makefile.in
@@ -36,16 +36,17 @@ ifeq ($(USE_BTHREADS), 1)
 	DIRS += bthreads
 endif
 
 ifeq ($(USE_CPLUS), 1)
 	DIRS += cplus
 endif
 
 ifndef USE_AUTOCONF
+
 #
 # Define platform-dependent OS_LIBS
 #
 
 # Disable optimization of the nspr on SunOS4.1.3
 ifeq ($(OS_ARCH),SunOS)
 ifeq ($(OS_RELEASE),4.1.3_U1)
 OPTIMIZER =
@@ -152,17 +153,17 @@ ifeq ($(OS_TARGET),OS2)
 # We define this in os2.mk.
 else
 ifneq ($(OS_TARGET),WIN16)
 OS_LIBS		= wsock32.lib winmm.lib
 endif
 endif
 endif
 
-endif # !USE_AUTOCONF
+endif # USE_AUTOCONF
 #
 # Define platform-dependent OBJS
 #
 
 OBJS = \
     $(OBJDIR)/prvrsion.$(OBJ_SUFFIX) \
     io/$(OBJDIR)/prfdcach.$(OBJ_SUFFIX) \
     io/$(OBJDIR)/prmwait.$(OBJ_SUFFIX) \
@@ -245,17 +246,17 @@ OBJS += \
 	cplus/$(OBJDIR)/rcnetdb.$(OBJ_SUFFIX) \
 	cplus/$(OBJDIR)/rcnetio.$(OBJ_SUFFIX) \
 	cplus/$(OBJDIR)/rcthread.$(OBJ_SUFFIX) \
 	cplus/$(OBJDIR)/rctime.$(OBJ_SUFFIX)
 endif
 
 ifdef USE_AUTOCONF
 
-OBJS += $(addprefix md/$(PR_MD_ARCH_DIR)/$(OBJDIR)/, $(PR_MD_CSRCS:.c=.$(OBJ_SUFFIX)))
+include $(srcdir)/md/$(PR_MD_ARCH_DIR)/objs.mk
 
 else
 
 ifeq ($(OS_ARCH), WINNT)
 ifneq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
 DLLBASE=/BASE:0x30000000
 RES=$(OBJDIR)/nspr.res
 RESNAME=nspr.rc
@@ -417,8 +418,9 @@ ifeq ($(MOZ_BITS),16)
 endif
 
 ifeq ($(BUILD_AIX_RTL_LIBC),1)
 $(AIX_RTL_LIBC): /usr/ccs/lib/libc.a
 	rtl_enable -o $@ $<
 endif
 
 install:: export
+
--- a/pr/src/md/windows/Makefile.in
+++ b/pr/src/md/windows/Makefile.in
@@ -22,18 +22,19 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(MOD_DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/config.mk
 
 ifdef USE_AUTOCONF
-CSRCS = $(PR_MD_CSRCS)
-else
+OS_TARGET=$(MOZ_TARGET)
+endif
+
 ifeq ($(OS_TARGET), WIN16)
 CSRCS = \
 	w16null.c \
 	w16thred.c \
 	w16proc.c \
     w16fmem.c \
     w16sock.c \
     w16mem.c \
@@ -68,17 +69,16 @@ CSRCS =          \
     ntgc.c \
     ntthread.c \
     ntio.c    \
 	win32_errors.c \
     w32poll.c \
     $(NULL)
 endif
 endif
-endif # USE_AUTOCONF
 
 TARGETS	= $(OBJS)
 
 INCLUDES = -I$(DIST)/include -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
 
 include $(topsrcdir)/config/rules.mk
 
 export:: $(TARGETS)