Verified that the autoconf build system is equivalent to the classic

build system on AIX, HP-UX, Linux, and Solaris.  The 'release' makefile
target still doesn't quite work.
Modified Files:
	configure configure.in config/Makefile.in
	config/autoconf.mk.in config/config.mk config/nsinstall.c
	config/rules.mk lib/ds/Makefile.in lib/libc/src/Makefile.in
	pr/include/md/Makefile.in pr/src/misc/Makefile.in
This commit is contained in:
wtc%netscape.com 2001-05-15 22:57:39 +00:00
Родитель 822c76926e
Коммит 0fe64510da
10 изменённых файлов: 592 добавлений и 293 удалений

Просмотреть файл

@ -129,7 +129,7 @@ if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); else true; fi
endef
export:: $(TARGETS)
$(RM) -f $(dist_bindir)/nspr-config
rm -f $(dist_bindir)/nspr-config
$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
@$(MAKE_OBJDIR)

Просмотреть файл

@ -101,3 +101,8 @@ AIX_LINK_OPTS = @AIX_LINK_OPTS@
MOZ_OBJFORMAT = @MOZ_OBJFORMAT@
ULTRASPARC_LIBRARY = @ULTRASPARC_LIBRARY@
ULTRASPARC_FILTER_LIBRARY = @ULTRASPARC_FILTER_LIBRARY@
OBJECT_MODE = @OBJECT_MODE@
ifdef OBJECT_MODE
export OBJECT_MODE
endif

Просмотреть файл

@ -139,7 +139,7 @@ endif
# RELEASE_DIR is ns/dist/<module name>
RELEASE_DIR = $(NSDEPTH)/dist/release/$(MOD_NAME)
RELEASE_DIR = $(MOD_DEPTH)/dist/release/$(MOD_NAME)
RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include
RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin

Просмотреть файл

@ -57,17 +57,6 @@
#include "pathsub.h"
#ifndef HAVE_LCHOWN
#define HAVE_LCHOWN
#endif
#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) \
|| defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) \
|| defined(RHAPSODY) || defined(NEXTSTEP) || defined(QNX) \
|| defined(BEOS) || defined(VMS)
#undef HAVE_LCHOWN
#endif
#define HAVE_FCHMOD
#if defined(BEOS)

620
nsprpub/configure поставляемый

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -39,15 +39,12 @@ AC_INIT(config/libc_r.h)
AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
AC_CANONICAL_SYSTEM
dnl Set this define to make fixes w/o breaking anything else.
AC_DEFINE(USE_AUTOCONF)
dnl ========================================================
dnl = Defaults
dnl ========================================================
MOD_MAJOR_VERSION=4
MOD_MINOR_VERSION=0
MOD_REVISION_VERSION=1
MOD_MINOR_VERSION=2
MOD_REVISION_VERSION=0
NSPR_MODNAME=nspr20
_HAVE_PTHREADS=
USE_PTHREADS=
@ -207,6 +204,90 @@ AC_ARG_ENABLE(mdupdate,
USE_MDUPDATE=1
fi ])
dnl ========================================================
dnl =
dnl = Set the threading model
dnl =
dnl ========================================================
case "$target" in
*-aix*)
case "${target_os}" in
aix3.2*)
USE_NSPR_THREADS=1
;;
*)
USE_PTHREADS=1
;;
esac
;;
esac
dnl ========================================================
dnl =
dnl = Set the default C compiler
dnl =
dnl ========================================================
if test -z "$CC"; then
case "$target" in
*-aix*)
if test -z "$USE_NSPR_THREADS"; then
CC=xlC_r
else
CC=xlC
fi
;;
*-hpux*)
CC=cc
;;
*-solaris*)
CC=cc
;;
esac
fi
dnl ========================================================
dnl =
dnl = Set the default C++ compiler
dnl =
dnl ========================================================
if test -z "$CXX"; then
case "$target" in
*-aix*)
if test -z "$USE_NSPR_THREADS"; then
CXX=xlC_r
else
CXX=xlC
fi
;;
*-hpux*)
case "${target_os}" in
hpux10.30)
CXX=aCC
;;
hpux11.*)
CXX=aCC
;;
*)
CXX=CC
;;
esac
;;
*-solaris*)
CXX=CC
;;
esac
fi
if test -z "$SKIP_PATH_CHECKS"; then
AC_PATH_PROG(WHOAMI, $WHOAMI whoami, echo not_whoami)
elif test -z "$WHOAMI"; then
@ -219,7 +300,7 @@ if test -n "$MOZ_DEBUG"; then
DEFINES="$DEFINES -UNDEBUG"
else
AC_DEFINE(NDEBUG)
DEFINES="$DEFINES -U_DEBUG -UDEBUG"
DEFINES="$DEFINES -UDEBUG"
fi
if test -z "$SKIP_COMPILER_CHECKS"; then
@ -353,6 +434,7 @@ PR_MD_CSRCS=
PR_MD_ARCH_DIR=unix
AR_FLAGS='cr $@'
AS='$(CC)'
ASFLAGS='$(CFLAGS)'
OS_ARCH=`uname -s | sed -e 's|/|_|g'`
OS_RELEASE=`uname -r`
@ -522,41 +604,43 @@ case "$target" in
AC_DEFINE(AIX)
AC_DEFINE(SYSV)
DSO_LDOPTS='-brtl -bM:SRE -bnoentry -bexpall'
AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
case "${target_os}" in
aix3.2*)
USE_NSPR_THREADS=1
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
AC_DEFINE(AIX_RENAME_SELECT)
AC_DEFINE(_PR_NO_LARGE_FILES)
AIX_LINK_OPTS='-bnso -berok'
PR_MD_ASFILES=os_AIX.s
;;
aix4.1*)
AC_DEFINE(AIX_RENAME_SELECT)
AC_DEFINE(AIX_HAVE_ATOMIC_OP_H)
AC_DEFINE(AIX_TIMERS)
AC_DEFINE(_PR_NO_LARGE_FILES)
AC_DEFINE(AIX4_1)
MKSHLIB=
DSO_LDOPTS=
USE_PTHREADS=1
AIX_LINK_OPTS='-bnso -berok'
LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)_shr'
;;
aix4.2*)
AC_DEFINE(AIX_TIMERS)
AC_DEFINE(_PR_HAVE_OFF64_T)
AIX_LINK_OPTS='-brtl -bnso -berok'
;;
aix4.3*)
AC_DEFINE(AIX_HAVE_ATOMIC_OP_H)
AC_DEFINE(AIX_TIMERS)
AC_DEFINE(_PR_HAVE_OFF64_T)
AC_DEFINE(AIX4_3)
AC_DEFINE(HAVE_SOCKLEN_T)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
USE_IPV6=1
USE_PTHREADS=1
AIX_LINK_OPTS='-brtl -bnso -berok'
;;
*)
AC_DEFINE(AIX_HAVE_ATOMIC_OP_H)
AC_DEFINE(AIX_TIMERS)
AC_DEFINE(_PR_HAVE_OFF64_T)
AC_DEFINE(HAVE_SOCKLEN_T)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
USE_IPV6=1
AIX_LINK_OPTS='-brtl -bnso -berok'
;;
esac
@ -568,6 +652,7 @@ case "$target" in
AIX_TMP='./_aix_tmp.o'
if test -n "$USE_64"; then
MDCPUCFG_H=_aix64.cfg
OBJECT_MODE=64
else
if test -n "$USE_IPV6"; then
MDCPUCFG_H=_aix32in6.cfg
@ -769,18 +854,17 @@ case "$target" in
if test "$OS_RELEASE" = "B.10.20"; then
AC_DEFINE(HPUX10)
AC_DEFINE(HPUX10_20)
if test -z "$GNU_CC" && test 0 = 1; then
if test -z "$GNU_CC"; then
CFLAGS="$CFLAGS +DAportable +DS1.1"
CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
fi
DEFAULT_IMPL_STRATEGY=_EMU
DEFAULT_IMPL_STRATEGY=_PTH
fi
if test "$OS_RELEASE" = "B.10.30"; then
AC_DEFINE(HPUX10)
AC_DEFINE(HPUX10_30)
#CXX="/opt/aCC/bin/aCC -ext"
if test -z "$GNU_CC" && test 0 = 1; then
if test -z "$GNU_CC"; then
CFLAGS="$CFLAGS +DAportable +DS1.1"
CXXFLAGS="$CXXFLAGS +DAportable +DS1.1"
fi
@ -792,9 +876,8 @@ case "$target" in
AC_DEFINE(HPUX11)
AC_DEFINE(_LARGEFILE64_SOURCE)
AC_DEFINE(_PR_HAVE_OFF64_T)
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
if test -z "$GNU_CC"; then
if test 0 = 1; then
if test -z "$USE_64"; then
CFLAGS="$CFLAGS +DAportable +DS2.0"
CXXFLAGS="$CXXFLAGS +DAportable +DS2.0"
@ -802,7 +885,6 @@ case "$target" in
CFLAGS="$CFLAGS +DA2.0W +DS2.0"
CXXFLAGS="$CXXFLAGS +DA2.0W +DS2.0"
fi
fi
fi
DEFAULT_IMPL_STRATEGY=_PTH
fi
@ -813,7 +895,7 @@ case "$target" in
USE_USER_THREADS=
elif test "$DEFAULT_IMPL_STRATEGY" = "_PTH"; then
USE_PTHREADS=1
if test "$MOZILLA_CLIENT"; then
if test "$USE_NSPR_THREADS"; then
USE_PTHREADS=
fi
if test "$USE_USER_PTHREADS"; then
@ -921,42 +1003,48 @@ case "$target" in
;;
*-linux*)
if test -z "$USE_USER_PTHREADS"; then
USE_PTHREADS=1
fi
AC_DEFINE(XP_UNIX)
AC_DEFINE(_POSIX_SOURCE)
AC_DEFINE(_BSD_SOURCE)
AC_DEFINE(_SVID_SOURCE)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
AC_DEFINE(LINUX)
CFLAGS="$CFLAGS -pipe -ansi"
CXXFLAGS="$CXXFLAGS -pipe -ansi"
AC_DEFINE(linux)
CFLAGS="$CFLAGS -ansi -Wall -pipe"
CXXFLAGS="$CXXFLAGS -ansi -Wall -pipe"
MDCPUCFG_H=_linux.cfg
PR_MD_CSRCS=linux.c
MKSHLIB='$(LD) $(DSO_LDOPTS) -soname $(notdir $@) -o $@'
DSO_CFLAGS=-fPIC
DSO_LDOPTS=-shared
OS_LIBS="$OS_LIBS -lc"
_OPTIMIZE_FLAGS=-O2
case "${target_cpu}" in
alpha)
AC_DEFINE(_ALPHA_)
AC_DEFINE(__alpha)
CFLAGS="$CFLAGS -mieee"
CXXFLAGS="$CXXFLAGS -mieee"
_OPTIMIZE_FLAGS=-O2
;;
i?86)
AC_DEFINE(i386)
PR_MD_ASFILES=os_Linux_x86.s
_OPTIMIZE_FLAGS=-O2
;;
ia64)
PR_MD_ASFILES=os_Linux_ia64.s
_OPTIMIZE_FLAGS=-O2
;;
m68k)
_OPTIMIZE_FLAGS=-O
CFLAGS="$CFLAGS -m68020-40"
CXXFLAGS="$CXXFLAGS -m68020-40"
;;
*)
_OPTIMIZE_FLAGS=-O2
#
# gcc on Linux/m68k either has a bug or triggers a code-sequence
# bug in the 68060 which causes gcc to crash. The simplest way to
# avoid this is to enable a minimum level of optimization.
#
_DEBUG_FLAGS="$_DEBUG_FLAGS -O"
;;
esac
;;
@ -988,6 +1076,12 @@ case "$target" in
CFLAGS="$CFLAGS -W3 -nologo -GF -Gy"
_DEBUG_FLAGS=
if test -n "$MOZ_DEBUG"; then
AC_DEFINE(_DEBUG)
else
DEFINES="$DEFINES -U_DEBUG"
fi
if test -n "$MOZ_OPTIMIZE"; then
CFLAGS="$CFLAGS -MD"
OPTIMIZER=-O2
@ -1385,12 +1479,16 @@ mips-sony-newsos*)
;;
*-solaris*)
if test -z "$USE_USER_THREADS" && test -z "$USE_NATIVE_THREADS"; then
USE_PTHREADS=1
fi
AC_DEFINE(XP_UNIX)
AC_DEFINE(SVR4)
AC_DEFINE(SYSV)
AC_DEFINE(__svr4)
AC_DEFINE(__svr4__)
AC_DEFINE(SOLARIS)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
if test -n "$USE_64"; then
MDCPUCFG_H=_solaris64.cfg
else
@ -1403,11 +1501,12 @@ mips-sony-newsos*)
else
DSO_CFLAGS=-KPIC
fi
AS='$(CC)'
if test -z "$GNU_AS"; then
ASFLAGS="$ASFLAGS -Wa,-P"
fi
if test -n "$GNU_CC"; then
CFLAGS="$CFLAGS -Wall"
CXXFLAGS="$CXXFLAGS -Wall"
if test -n "$USE_MDUPDATE"; then
CFLAGS="$CFLAGS -MDupdate \$(DEPENDENCIES)"
CXXFLAGS="$CXXFLAGS -MDupdate \$(DEPENDENCIES)"
@ -1415,10 +1514,10 @@ mips-sony-newsos*)
else
CC="$CC -xstrconst"
CXX="$CXX -Qoption cg -xstrconst"
fi
if test -n "$BUILD_NUMBER" && test -z "$MOZ_OPTIMIZE"; then
CFLAGS="$CFLAGS -xs"
CXXFLAGS="$CXXFLAGS -xs"
if test -n "$BUILD_NUMBER" && test -z "$MOZ_OPTIMIZE"; then
CFLAGS="$CFLAGS -xs"
CXXFLAGS="$CXXFLAGS -xs"
fi
fi
if test -n "$USE_64" && test -z "$GNU_CC"; then
CC="$CC -xarch=v9"
@ -1426,8 +1525,12 @@ mips-sony-newsos*)
fi
if test "$OS_TEST" = "i86pc"; then
AC_DEFINE(i386)
# The default debug format, DWARF (-g), is not supported by gcc
# on i386-ANY-sysv4/solaris, but the stabs format is. It is
# assumed that the Solaris assembler /usr/ccs/bin/as is used.
# If your gcc uses GNU as, you do not need the -Wa,-s option.
if test -n "$MOZ_DEBUG" && test -n "$GNU_CC"; then
_DEBUG_FLAGS="$_DEBUG_FLAGS -gstabs"
_DEBUG_FLAGS=-gstabs
if test -z "$GNU_AS"; then
_DEBUG_FLAGS="$_DEBUG_FLAGS -Wa,-s"
fi
@ -1445,6 +1548,13 @@ mips-sony-newsos*)
;;
*)
AC_DEFINE(_PR_HAVE_OFF64_T)
# The lfcompile64(5) man page on Solaris 2.6 says:
# For applications that do not wish to conform to the POSIX or
# X/Open specifications, the 64-bit transitional interfaces
# are available by default. No compile-time flags need to be
# set.
# But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
# The native compiler, gcc 2.8.x, and egcs don't have this problem.
if test -n "$GNU_CC"; then
AC_DEFINE(_LARGEFILE64_SOURCE)
fi
@ -1806,8 +1916,6 @@ if test -n "$USE_PTHREADS"; then
fi
case "$target" in
*-mingw*|*-cygwin*|*-uwin*|*-msvc*)
;;
*-solaris*)
AC_DEFINE(_REENTRANT)
if test "$ac_cv_have_dash_pthreads" = "yes"; then
@ -1822,9 +1930,9 @@ if test -n "$USE_PTHREADS"; then
_PTHREAD_LDFLAGS=
fi
;;
*)
AC_DEFINE(_REENTRANT)
;;
*-linux*)
AC_DEFINE(_REENTRANT)
;;
esac
else
@ -1833,9 +1941,6 @@ else
USE_NSPR_THREADS=
else
_PTHREAD_LDFLAGS=
if test -n "$USE_NSPR_THREADS"; then
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi
fi
fi
dnl Special thread exceptions
@ -1843,9 +1948,7 @@ dnl Special thread exceptions
case "$target" in
*-aix*)
if test -n "$USE_NSPR_THREADS"; then
OS_LIBS="$OS_LIBS -lc"
else
OS_LIBS="$OS_LIBS -lc_r"
AC_DEFINE(-D_PR_LOCAL_THREADS_ONLY)
fi
case "$target_os" in
aix4.1*)
@ -1853,11 +1956,19 @@ case "$target" in
AC_DEFINE(AIX_RENAME_SELECT)
fi
;;
aix4.[23]*)
aix4.2*)
if test -z "$USE_NSPR_THREADS"; then
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
fi
;;
aix4.3*)
if test -z "$USE_NSPR_THREADS"; then
AC_DEFINE(HAVE_POINTER_LOCALTIME_R)
fi
if test -n "$USE_PTHREADS"; then
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
fi
;;
esac
;;
*-bsdi*)
@ -1866,18 +1977,27 @@ case "$target" in
fi
;;
*-hpux*)
if test -n "$USE_NSPR_THREADS"; then
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi
if test "$USE_PTHREADS"; then
if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
AC_DEFINE(REENTRANT)
AC_DEFINE(_REENTRANT)
AC_DEFINE(_PR_DCETHREADS)
else
AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
fi
fi
if test "$USE_USER_PTHREADS"; then
AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
fi
;;
*-linux*)
if test -n "$USE_NSPR_THREADS"; then
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi
;;
*-mingw*|*-cygwin*|*-uwin*|*-msvc*)
dnl win32 does not use pthreads
USE_PTHREADS=
@ -1951,6 +2071,7 @@ AC_SUBST(USE_CPLUS)
AC_SUBST(USE_IPV6)
AC_SUBST(USE_N32)
AC_SUBST(USE_64)
AC_SUBST(OBJECT_MODE)
AC_SUBST(GC_LEAK_DETECTOR)
AC_SUBST(USE_PTHREADS)

Просмотреть файл

@ -65,6 +65,14 @@ RESNAME=plds.rc
OS_LIBS = user32.lib
endif # WINNT
ifeq ($(OS_ARCH), AIX)
ifeq ($(CLASSIC_NSPR),1)
OS_LIBS = -lc
else
OS_LIBS = -lc_r
endif
endif
EXTRA_LIBS = $(LIBNSPR)
# On NCR and SCOOS, we can't link with extra libraries when

Просмотреть файл

@ -73,6 +73,14 @@ RES=$(OBJDIR)/plc.res
RESNAME=plc.rc
endif # WINNT
ifeq ($(OS_ARCH), AIX)
ifeq ($(CLASSIC_NSPR),1)
OS_LIBS = -lc
else
OS_LIBS = -lc_r
endif
endif
EXTRA_LIBS = $(LIBNSPR)
# On NCR and SCOOS, we can't link with extra libraries when

Просмотреть файл

@ -41,12 +41,10 @@ VPATH = @srcdir@
include $(MOD_DEPTH)/config/autoconf.mk
HEADERS = $(wildcard $(srcdir)/*.h)
CONFIGS = $(wildcard $(srcdir)/*.cfg)
include $(topsrcdir)/config/rules.mk
export:: $(MDCPUCFG_H)
$(INSTALL) -m 444 $(CONFIGS) $(dist_includedir)/md
$(INSTALL) -m 444 $(srcdir)/$(MDCPUCFG_H) $(dist_includedir)
ifneq ($(OS_ARCH),OpenVMS)
mv -f $(dist_includedir)/$(MDCPUCFG_H) $(dist_includedir)/prcpucfg.h
@ -60,7 +58,7 @@ endif
real_install::
$(NSINSTALL) -D $(DESTDIR)$(includedir)/md
cp $(srcdir)/$(MDCPUCFG_H) $(DESTDIR)$(includedir)/prcpucfg.h
$(NSINSTALL) -t -m 644 $(CONFIGS) $(HEADERS) $(DESTDIR)$(includedir)/md
$(NSINSTALL) -t -m 644 $(HEADERS) $(DESTDIR)$(includedir)/md
release:: export
@echo "Copying machine-dependent prcpucfg.h"
@ -72,4 +70,4 @@ release:: export
rm -rf $(RELEASE_INCLUDE_DIR); \
$(NSINSTALL) -D $(RELEASE_INCLUDE_DIR);\
fi
cp $(MDCPUCFG_H) $(RELEASE_INCLUDE_DIR)/prcpucfg.h
cp $(srcdir)/$(MDCPUCFG_H) $(RELEASE_INCLUDE_DIR)/prcpucfg.h

Просмотреть файл

@ -78,7 +78,7 @@ INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/incl
DEFINES += -D_NSPR_BUILD_
RELEASE_BINS = compile-et.pl prerr.properties
RELEASE_BINS = $(srcdir)/compile-et.pl $(srcdir)/prerr.properties
include $(topsrcdir)/config/rules.mk