зеркало из https://github.com/mozilla/gecko-dev.git
Merged NSPRPUB_CLIENT_BRANCH onto the trunk.
This commit is contained in:
Родитель
57dd530ca0
Коммит
bef48de5a6
|
@ -56,8 +56,6 @@ ifndef srcdir
|
||||||
srcdir=.
|
srcdir=.
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef USE_AUTOCONF
|
|
||||||
|
|
||||||
NFSPWD = $(MOD_DEPTH)/config/nfspwd
|
NFSPWD = $(MOD_DEPTH)/config/nfspwd
|
||||||
|
|
||||||
CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
|
CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
|
||||||
|
@ -101,9 +99,7 @@ endif
|
||||||
|
|
||||||
GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
|
GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
|
||||||
|
|
||||||
ifdef USE_AUTOCONF
|
|
||||||
DIST_GARBAGE += Makefile
|
DIST_GARBAGE += Makefile
|
||||||
endif
|
|
||||||
|
|
||||||
DEFINES += -DFORCE_PR_LOG
|
DEFINES += -DFORCE_PR_LOG
|
||||||
|
|
||||||
|
@ -123,108 +119,6 @@ ifeq ($(USE_IPV6),1)
|
||||||
DEFINES += -D_PR_INET6
|
DEFINES += -D_PR_INET6
|
||||||
endif
|
endif
|
||||||
|
|
||||||
else # ! USE_AUTOCONF
|
|
||||||
|
|
||||||
ifndef NSPR_MY_CONFIG_MK
|
|
||||||
NSPR_MY_CONFIG_MK = $(MOD_DEPTH)/config/my_config.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
|
||||||
# The variable definitions in this file are used to
|
|
||||||
# override variable values set by NSPR's build system.
|
|
||||||
# This file, if present, is included at the end of config.mk.
|
|
||||||
#
|
|
||||||
# For example:
|
|
||||||
#
|
|
||||||
# DIST=/usr/local/nspr
|
|
||||||
#
|
|
||||||
ifndef NSPR_MY_OVERRIDES_MK
|
|
||||||
NSPR_MY_OVERRIDES_MK = $(MOD_DEPTH)/config/my_overrides.mk
|
|
||||||
endif
|
|
||||||
|
|
||||||
-include $(NSPR_MY_CONFIG_MK)
|
|
||||||
|
|
||||||
include $(MOD_DEPTH)/config/module.df
|
|
||||||
|
|
||||||
include $(MOD_DEPTH)/config/arch.mk
|
|
||||||
|
|
||||||
ifndef NSDEPTH
|
|
||||||
NSDEPTH = $(MOD_DEPTH)/..
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
|
||||||
# Default command macros; can be overridden in <arch>.mk.
|
|
||||||
#
|
|
||||||
# XXX FIXME: I removed CCF and LINKEXE.
|
|
||||||
AS = $(CC)
|
|
||||||
ASFLAGS = $(CFLAGS)
|
|
||||||
PURIFY = purify $(PURIFYOPTIONS)
|
|
||||||
LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
|
|
||||||
NFSPWD = $(MOD_DEPTH)/config/nfspwd
|
|
||||||
|
|
||||||
CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
|
|
||||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
|
||||||
CCCFLAGS = $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(OS_CFLAGS)\
|
|
||||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
|
||||||
# For purify
|
|
||||||
NOMD_CFLAGS = $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
|
|
||||||
$(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
|
|
||||||
|
|
||||||
include $(MOD_DEPTH)/config/$(OS_TARGET).mk
|
|
||||||
|
|
||||||
# Figure out where the binary code lives.
|
|
||||||
BUILD = $(OBJDIR_NAME)
|
|
||||||
OBJDIR = $(OBJDIR_NAME)
|
|
||||||
DIST = $(NSDEPTH)/dist/$(OBJDIR_NAME)
|
|
||||||
ifeq ($(MOZ_BITS),16)
|
|
||||||
MOZ_INCL = $(NSDEPTH)/dist/public/win16
|
|
||||||
MOZ_DIST = $(NSDEPTH)/dist/WIN16D_D.OBJ
|
|
||||||
endif
|
|
||||||
|
|
||||||
# if not using autoconf, set these values accordingly
|
|
||||||
prefix = $(DIST)
|
|
||||||
exec_prefix = $(prefix)
|
|
||||||
bindir = $(prefix)/bin
|
|
||||||
includedir = $(prefix)/include
|
|
||||||
libdir = $(prefix)/lib
|
|
||||||
|
|
||||||
VPATH = $(OBJDIR)
|
|
||||||
DEPENDENCIES = $(OBJDIR)/.md
|
|
||||||
|
|
||||||
ifdef BUILD_DEBUG_GC
|
|
||||||
DEFINES += -DDEBUG_GC
|
|
||||||
endif
|
|
||||||
|
|
||||||
GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
|
|
||||||
|
|
||||||
####################################################################
|
|
||||||
#
|
|
||||||
# The NSPR-specific configuration
|
|
||||||
#
|
|
||||||
####################################################################
|
|
||||||
|
|
||||||
OS_CFLAGS += -DFORCE_PR_LOG
|
|
||||||
|
|
||||||
ifeq ($(_PR_NO_CLOCK_TIMER),1)
|
|
||||||
OS_CFLAGS += -D_PR_NO_CLOCK_TIMER
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_PTHREADS), 1)
|
|
||||||
OS_CFLAGS += -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(PTHREADS_USER), 1)
|
|
||||||
OS_CFLAGS += -DPTHREADS_USER -UHAVE_CVAR_BUILT_ON_SEM
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(USE_IPV6),1)
|
|
||||||
OS_CFLAGS += -D_PR_INET6
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef GC_LEAK_DETECTOR
|
|
||||||
OS_CFLAGS += -DGC_LEAK_DETECTOR
|
|
||||||
endif
|
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
#
|
#
|
||||||
# Configuration for the release process
|
# Configuration for the release process
|
||||||
|
@ -244,7 +138,3 @@ RELEASE_DIR = $(NSDEPTH)/dist/release/$(MOD_NAME)
|
||||||
RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include
|
RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include
|
||||||
RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin
|
RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin
|
||||||
RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib
|
RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib
|
||||||
|
|
||||||
-include $(NSPR_MY_OVERRIDES_MK)
|
|
||||||
|
|
||||||
endif # USE_AUTOCONF
|
|
||||||
|
|
|
@ -0,0 +1,116 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
prefix=@prefix@
|
||||||
|
exec_prefix=@exec_prefix@
|
||||||
|
exec_prefix_set=no
|
||||||
|
|
||||||
|
major_version=@MOD_MAJOR_VERSION@
|
||||||
|
minor_version=@MOD_MINOR_VERSION@
|
||||||
|
revision_version=@MOD_REVISION_VERSION@
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
Usage: nspr-config [OPTIONS] [LIBRARIES]
|
||||||
|
Options:
|
||||||
|
[--prefix[=DIR]]
|
||||||
|
[--exec-prefix[=DIR]]
|
||||||
|
[--version]
|
||||||
|
[--libs]
|
||||||
|
[--cflags]
|
||||||
|
Libraries:
|
||||||
|
nspr
|
||||||
|
plc
|
||||||
|
plds
|
||||||
|
EOF
|
||||||
|
exit $1
|
||||||
|
}
|
||||||
|
|
||||||
|
if test $# -eq 0; then
|
||||||
|
usage 1 1>&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
lib_nspr=yes
|
||||||
|
lib_plc=yes
|
||||||
|
lib_plds=yes
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case "$1" in
|
||||||
|
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||||
|
*) optarg= ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
--prefix=*)
|
||||||
|
prefix=$optarg
|
||||||
|
if test $exec_prefix_set = no ; then
|
||||||
|
exec_prefix=$optarg
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
--prefix)
|
||||||
|
echo_prefix=yes
|
||||||
|
;;
|
||||||
|
--exec-prefix=*)
|
||||||
|
exec_prefix=$optarg
|
||||||
|
exec_prefix_set=yes
|
||||||
|
;;
|
||||||
|
--exec-prefix)
|
||||||
|
echo_exec_prefix=yes
|
||||||
|
;;
|
||||||
|
--version)
|
||||||
|
echo ${major_version}.${minor_version}.${revision_version}
|
||||||
|
;;
|
||||||
|
--cflags)
|
||||||
|
echo_cflags=yes
|
||||||
|
;;
|
||||||
|
--libs)
|
||||||
|
echo_libs=yes
|
||||||
|
;;
|
||||||
|
nspr)
|
||||||
|
lib_nspr=yes
|
||||||
|
;;
|
||||||
|
plc)
|
||||||
|
lib_plc=yes
|
||||||
|
;;
|
||||||
|
plds)
|
||||||
|
lib_plds=yes
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage 1 1>&2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test "$echo_prefix" = "yes"; then
|
||||||
|
echo $prefix
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$echo_exec_prefix" = "yes"; then
|
||||||
|
echo $exec_prefix
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$echo_cflags" = "yes"; then
|
||||||
|
echo -I${prefix}/include/nspr
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$echo_libs" = "yes"; then
|
||||||
|
libdirs=-L${exec_prefix}/lib
|
||||||
|
if test -n "$lib_plds"; then
|
||||||
|
libdirs="$libdirs -lplds${major_version}"
|
||||||
|
fi
|
||||||
|
if test -n "$lib_plc"; then
|
||||||
|
libdirs="$libdirs -lplc${major_version}"
|
||||||
|
fi
|
||||||
|
if test -n "$lib_nspr"; then
|
||||||
|
libdirs="$libdirs -lnspr${major_version}"
|
||||||
|
fi
|
||||||
|
os_ldflags="@LDFLAGS@"
|
||||||
|
for i in $os_ldflags ; do
|
||||||
|
if echo $i | grep ^-L >/dev/null; then
|
||||||
|
libdirs="$libdirs $i"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo $libdirs @OS_LIBS@
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,67 @@
|
||||||
|
# -*- tab-width: 4; -*-
|
||||||
|
# Configure paths for NSPR
|
||||||
|
# Public domain - Chris Seawood <cls@seawood.org> 2001-04-05
|
||||||
|
# Based upon gtk.m4 (also PD) by Owen Taylor
|
||||||
|
|
||||||
|
dnl AM_PATH_NSPR([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||||
|
dnl Test for NSPR, and define NSPR_CFLAGS and NSPR_LIBS
|
||||||
|
AC_DEFUN(AM_PATH_NSPR,
|
||||||
|
[dnl
|
||||||
|
|
||||||
|
AC_ARG_WITH(nspr-prefix,
|
||||||
|
[ --with-nspr-prefix=PFX Prefix where NSPR is installed],
|
||||||
|
nspr_config_prefix="$withval",
|
||||||
|
nspr_config_prefix="")
|
||||||
|
|
||||||
|
AC_ARG_WITH(nspr-exec-prefix,
|
||||||
|
[ --with-nspr-exec-prefix=PFX
|
||||||
|
Exec prefix where NSPR is installed],
|
||||||
|
nspr_config_exec_prefix="$withval",
|
||||||
|
nspr_config_exec_prefix="")
|
||||||
|
|
||||||
|
if test -n "$nspr_config_exec_prefix"; then
|
||||||
|
nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
|
||||||
|
if test -z "$NSPR_CONFIG"; then
|
||||||
|
NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test -n "$nspr_config_prefix"; then
|
||||||
|
nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
|
||||||
|
if test -z "$NSPR_CONFIG"; then
|
||||||
|
NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset ac_cv_path_NSPR_CONFIG
|
||||||
|
AC_PATH_PROG(NSPR_CONFIG, nspr-config, no)
|
||||||
|
min_nspr_version=ifelse([$1], ,4.0.0,$1)
|
||||||
|
AC_MSG_CHECKING(for NSPR - version >= $min_nspr_version (skipping))
|
||||||
|
|
||||||
|
no_nspr=""
|
||||||
|
if test "$NSPR_CONFIG" = "no"; then
|
||||||
|
no_nspr="yes"
|
||||||
|
else
|
||||||
|
NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
|
||||||
|
NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
|
||||||
|
|
||||||
|
dnl Skip version check for now
|
||||||
|
nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||||
|
nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||||
|
nspr_config_micro_version=`$NSPR_CONFIG $nspr_config_args --version | \
|
||||||
|
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$no_nspr"; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
ifelse([$2], , :, [$2])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
AC_SUBST(NSPR_CFLAGS)
|
||||||
|
AC_SUBST(NSPR_LIBS)
|
||||||
|
|
||||||
|
])
|
Загрузка…
Ссылка в новой задаче