fixup commit for branch 'FOLDER_OUTLINER_20010417_BRANCH' FOLDER_OUTLINER_20010417_BRANCH FOLDER_OUTLINER_20010417_BASE
authorcvs2hg
Mon, 16 Apr 2001 18:27:59 +0000
branchFOLDER_OUTLINER_20010417_BRANCH
changeset 1431 663f2e9dee6c796a4343f8f3ea9aa565418a13a3
parent 1295 3d801fed2cb230e767080582e69674f94ca6f4e2
child 1556 92d982ae73d10b31b796c9d92c92140d7e5e7984
child 14027 0fb7228facbb006e67d3510a1cd7f8af8a96dc3a
push idunknown
push userunknown
push dateunknown
fixup commit for branch 'FOLDER_OUTLINER_20010417_BRANCH'
security/coreconf/.cvsignore
security/coreconf/AIX.mk
security/coreconf/AIX3.2.mk
security/coreconf/AIX4.1.mk
security/coreconf/AIX4.2.mk
security/coreconf/AIX4.3.mk
security/coreconf/BSD_OS.mk
security/coreconf/FreeBSD.mk
security/coreconf/FreeBSD2.mk
security/coreconf/HP-UX.mk
security/coreconf/HP-UXA.09.03.mk
security/coreconf/HP-UXA.09.07.mk
security/coreconf/HP-UXA.09.mk
security/coreconf/HP-UXB.10.01.mk
security/coreconf/HP-UXB.10.10.mk
security/coreconf/HP-UXB.10.20.mk
security/coreconf/HP-UXB.10.30.mk
security/coreconf/HP-UXB.10.mk
security/coreconf/HP-UXB.11.00.mk
security/coreconf/HP-UXB.11.mk
security/coreconf/IRIX.mk
security/coreconf/IRIX5.2.mk
security/coreconf/IRIX5.3.mk
security/coreconf/IRIX5.mk
security/coreconf/IRIX6.2.mk
security/coreconf/IRIX6.3.mk
security/coreconf/IRIX6.5.mk
security/coreconf/IRIX6.mk
security/coreconf/Linux.mk
security/coreconf/Linux2.1.mk
security/coreconf/Linux2.2.mk
security/coreconf/Linux2.4.mk
security/coreconf/LinuxELF1.2.mk
security/coreconf/LinuxELF2.0.mk
security/coreconf/Makefile
security/coreconf/Makefile.in
security/coreconf/NCR3.0.mk
security/coreconf/NEC4.2.mk
security/coreconf/NetBSD.mk
security/coreconf/OS2.mk
security/coreconf/OSF1.mk
security/coreconf/OSF1V2.0.mk
security/coreconf/OSF1V3.0.mk
security/coreconf/OSF1V3.2.mk
security/coreconf/OSF1V4.0.mk
security/coreconf/OSF1V4.0B.mk
security/coreconf/OSF1V4.0D.mk
security/coreconf/OSF1V5.0.mk
security/coreconf/OpenVMS.mk
security/coreconf/OpenVMSV7.1-2.mk
security/coreconf/ReliantUNIX.mk
security/coreconf/ReliantUNIX5.4.mk
security/coreconf/SCOOS5.0.mk
security/coreconf/SCO_SV3.2.mk
security/coreconf/SunOS4.1.3_U1.mk
security/coreconf/SunOS5.3.mk
security/coreconf/SunOS5.4.mk
security/coreconf/SunOS5.4_i86pc.mk
security/coreconf/SunOS5.5.1.mk
security/coreconf/SunOS5.5.1_i86pc.mk
security/coreconf/SunOS5.5.mk
security/coreconf/SunOS5.6.mk
security/coreconf/SunOS5.6_i86pc.mk
security/coreconf/SunOS5.7.mk
security/coreconf/SunOS5.7_i86pc.mk
security/coreconf/SunOS5.8.mk
security/coreconf/SunOS5.8_i86pc.mk
security/coreconf/SunOS5.9.mk
security/coreconf/SunOS5.9_i86pc.mk
security/coreconf/SunOS5.mk
security/coreconf/UNIX.mk
security/coreconf/UNIXWARE2.1.mk
security/coreconf/WIN16.mk
security/coreconf/WIN32.mk
security/coreconf/WIN954.0.mk
security/coreconf/WINNT3.51.mk
security/coreconf/WINNT4.0.mk
security/coreconf/WINNT5.0.mk
security/coreconf/autoconf.mk.in
security/coreconf/command.mk
security/coreconf/config.mk
security/coreconf/location.mk
security/coreconf/mkdepend/.cvsignore
security/coreconf/mkdepend/Makefile.in
security/coreconf/mkdepend/cppsetup.c
security/coreconf/mkdepend/def.h
security/coreconf/mkdepend/ifparser.c
security/coreconf/mkdepend/ifparser.h
security/coreconf/mkdepend/imakemdep.h
security/coreconf/mkdepend/include.c
security/coreconf/mkdepend/main.c
security/coreconf/mkdepend/mkdepend.man
security/coreconf/mkdepend/parse.c
security/coreconf/mkdepend/pr.c
security/coreconf/nsinstall/.cvsignore
security/coreconf/nsinstall/Makefile
security/coreconf/nsinstall/Makefile.in
security/coreconf/rules.mk
security/coreconf/ruleset.mk
security/coreconf/source.mk
security/coreconf/tree.mk
security/dbm/Makefile
security/dbm/include/Makefile
security/dbm/include/manifest.mn
security/dbm/manifest.mn
security/dbm/src/Makefile
security/dbm/src/config.mk
security/dbm/src/manifest.mn
security/dbm/tests/Makefile
security/nss/.cvsignore
security/nss/Makefile
security/nss/Makefile.in
security/nss/aclocal.m4
security/nss/build/autoconf/acoutput-fast.pl
security/nss/build/autoconf/config.guess
security/nss/build/autoconf/config.sub
security/nss/build/autoconf/install-sh
security/nss/build/autoconf/make-makefile
security/nss/build/autoconf/nspr.m4
security/nss/build/unix/mddepend.pl
security/nss/cmd/.cvsignore
security/nss/cmd/Makefile
security/nss/cmd/Makefile.in
security/nss/cmd/SSLsample/.cvsignore
security/nss/cmd/SSLsample/Makefile
security/nss/cmd/SSLsample/Makefile.in
security/nss/cmd/SSLsample/client.mn
security/nss/cmd/SSLsample/make.client
security/nss/cmd/SSLsample/make.server
security/nss/cmd/SSLsample/server.mn
security/nss/cmd/addbuiltin/Makefile
security/nss/cmd/addbuiltin/manifest.mn
security/nss/cmd/atob/.cvsignore
security/nss/cmd/atob/Makefile
security/nss/cmd/atob/Makefile.in
security/nss/cmd/atob/manifest.mn
security/nss/cmd/bltest/.cvsignore
security/nss/cmd/bltest/Makefile
security/nss/cmd/bltest/Makefile.in
security/nss/cmd/bltest/manifest.mn
security/nss/cmd/btoa/.cvsignore
security/nss/cmd/btoa/Makefile
security/nss/cmd/btoa/Makefile.in
security/nss/cmd/btoa/manifest.mn
security/nss/cmd/certcgi/.cvsignore
security/nss/cmd/certcgi/Makefile
security/nss/cmd/certcgi/Makefile.in
security/nss/cmd/certcgi/manifest.mn
security/nss/cmd/certutil/.cvsignore
security/nss/cmd/certutil/Makefile
security/nss/cmd/certutil/Makefile.in
security/nss/cmd/certutil/manifest.mn
security/nss/cmd/checkcert/.cvsignore
security/nss/cmd/checkcert/Makefile
security/nss/cmd/checkcert/Makefile.in
security/nss/cmd/checkcert/manifest.mn
security/nss/cmd/crlutil/.cvsignore
security/nss/cmd/crlutil/Makefile
security/nss/cmd/crlutil/Makefile.in
security/nss/cmd/crlutil/manifest.mn
security/nss/cmd/crmf-cgi/.cvsignore
security/nss/cmd/crmf-cgi/Makefile
security/nss/cmd/crmf-cgi/Makefile.in
security/nss/cmd/crmf-cgi/manifest.mn
security/nss/cmd/crmftest/.cvsignore
security/nss/cmd/crmftest/Makefile
security/nss/cmd/crmftest/Makefile.in
security/nss/cmd/crmftest/manifest.mn
security/nss/cmd/dbck/.cvsignore
security/nss/cmd/dbck/Makefile
security/nss/cmd/dbck/Makefile.in
security/nss/cmd/dbck/manifest.mn
security/nss/cmd/derdump/.cvsignore
security/nss/cmd/derdump/Makefile
security/nss/cmd/derdump/Makefile.in
security/nss/cmd/derdump/manifest.mn
security/nss/cmd/digest/.cvsignore
security/nss/cmd/digest/Makefile
security/nss/cmd/digest/Makefile.in
security/nss/cmd/digest/manifest.mn
security/nss/cmd/ilock/Makefile
security/nss/cmd/ilock/manifest.mn
security/nss/cmd/keyutil/.cvsignore
security/nss/cmd/keyutil/Makefile
security/nss/cmd/keyutil/Makefile.in
security/nss/cmd/keyutil/manifest.mn
security/nss/cmd/lib/.cvsignore
security/nss/cmd/lib/Makefile
security/nss/cmd/lib/Makefile.in
security/nss/cmd/lib/manifest.mn
security/nss/cmd/makepqg/.cvsignore
security/nss/cmd/makepqg/Makefile
security/nss/cmd/makepqg/Makefile.in
security/nss/cmd/makepqg/manifest.mn
security/nss/cmd/manifest.mn
security/nss/cmd/modutil/.cvsignore
security/nss/cmd/modutil/Makefile
security/nss/cmd/modutil/Makefile.in
security/nss/cmd/modutil/manifest.mn
security/nss/cmd/ocspclnt/.cvsignore
security/nss/cmd/ocspclnt/Makefile
security/nss/cmd/ocspclnt/Makefile.in
security/nss/cmd/ocspclnt/manifest.mn
security/nss/cmd/oidcalc/.cvsignore
security/nss/cmd/oidcalc/Makefile
security/nss/cmd/oidcalc/Makefile.in
security/nss/cmd/oidcalc/manifest.mn
security/nss/cmd/p7content/.cvsignore
security/nss/cmd/p7content/Makefile
security/nss/cmd/p7content/Makefile.in
security/nss/cmd/p7content/manifest.mn
security/nss/cmd/p7env/.cvsignore
security/nss/cmd/p7env/Makefile
security/nss/cmd/p7env/Makefile.in
security/nss/cmd/p7env/manifest.mn
security/nss/cmd/p7sign/.cvsignore
security/nss/cmd/p7sign/Makefile
security/nss/cmd/p7sign/Makefile.in
security/nss/cmd/p7sign/manifest.mn
security/nss/cmd/p7verify/.cvsignore
security/nss/cmd/p7verify/Makefile
security/nss/cmd/p7verify/Makefile.in
security/nss/cmd/p7verify/manifest.mn
security/nss/cmd/pk12util/.cvsignore
security/nss/cmd/pk12util/Makefile
security/nss/cmd/pk12util/Makefile.in
security/nss/cmd/pk12util/manifest.mn
security/nss/cmd/pk12util/pk12util.c
security/nss/cmd/platlibs.mk
security/nss/cmd/pp/.cvsignore
security/nss/cmd/pp/Makefile
security/nss/cmd/pp/Makefile.in
security/nss/cmd/pp/manifest.mn
security/nss/cmd/rsaperf/Makefile
security/nss/cmd/rsaperf/manifest.mn
security/nss/cmd/sdrtest/.cvsignore
security/nss/cmd/sdrtest/Makefile
security/nss/cmd/sdrtest/Makefile.in
security/nss/cmd/sdrtest/manifest.mn
security/nss/cmd/selfserv/.cvsignore
security/nss/cmd/selfserv/Makefile
security/nss/cmd/selfserv/Makefile.in
security/nss/cmd/selfserv/manifest.mn
security/nss/cmd/signtool/.cvsignore
security/nss/cmd/signtool/Makefile
security/nss/cmd/signtool/Makefile.in
security/nss/cmd/signtool/manifest.mn
security/nss/cmd/signver/.cvsignore
security/nss/cmd/signver/Makefile
security/nss/cmd/signver/Makefile.in
security/nss/cmd/signver/manifest.mn
security/nss/cmd/smimetools/.cvsignore
security/nss/cmd/smimetools/Makefile
security/nss/cmd/smimetools/Makefile.in
security/nss/cmd/smimetools/manifest.mn
security/nss/cmd/smimetools/rules.mk
security/nss/cmd/sslstrength/.cvsignore
security/nss/cmd/sslstrength/Makefile
security/nss/cmd/sslstrength/Makefile.in
security/nss/cmd/sslstrength/manifest.mn
security/nss/cmd/ssltap/.cvsignore
security/nss/cmd/ssltap/Makefile
security/nss/cmd/ssltap/Makefile.in
security/nss/cmd/ssltap/manifest.mn
security/nss/cmd/strsclnt/.cvsignore
security/nss/cmd/strsclnt/Makefile
security/nss/cmd/strsclnt/Makefile.in
security/nss/cmd/strsclnt/manifest.mn
security/nss/cmd/swfort/.cvsignore
security/nss/cmd/swfort/Makefile
security/nss/cmd/swfort/Makefile.in
security/nss/cmd/swfort/instinit/.cvsignore
security/nss/cmd/swfort/instinit/Makefile
security/nss/cmd/swfort/instinit/Makefile.in
security/nss/cmd/swfort/instinit/manifest.mn
security/nss/cmd/swfort/manifest.mn
security/nss/cmd/swfort/newuser/.cvsignore
security/nss/cmd/swfort/newuser/Makefile
security/nss/cmd/swfort/newuser/Makefile.in
security/nss/cmd/swfort/newuser/manifest.mn
security/nss/cmd/tstclnt/.cvsignore
security/nss/cmd/tstclnt/Makefile
security/nss/cmd/tstclnt/Makefile.in
security/nss/cmd/tstclnt/manifest.mn
security/nss/cmd/ttformat/Makefile
security/nss/cmd/ttformat/manifest.mn
security/nss/cmd/zlib/.cvsignore
security/nss/cmd/zlib/Makefile
security/nss/cmd/zlib/Makefile.in
security/nss/cmd/zlib/manifest.mn
security/nss/configure
security/nss/configure.in
security/nss/gmakefile.win
security/nss/lib/.cvsignore
security/nss/lib/Makefile
security/nss/lib/Makefile.in
security/nss/lib/asn1/Makefile
security/nss/lib/asn1/manifest.mn
security/nss/lib/base/.cvsignore
security/nss/lib/base/Makefile
security/nss/lib/base/Makefile.in
security/nss/lib/base/manifest.mn
security/nss/lib/certdb/.cvsignore
security/nss/lib/certdb/Makefile
security/nss/lib/certdb/Makefile.in
security/nss/lib/certdb/cert.h
security/nss/lib/certdb/certdb.c
security/nss/lib/certdb/manifest.mn
security/nss/lib/certdb/pcertdb.c
security/nss/lib/certhigh/.cvsignore
security/nss/lib/certhigh/Makefile
security/nss/lib/certhigh/Makefile.in
security/nss/lib/certhigh/manifest.mn
security/nss/lib/ckfw/.cvsignore
security/nss/lib/ckfw/Makefile
security/nss/lib/ckfw/Makefile.in
security/nss/lib/ckfw/builtins/.cvsignore
security/nss/lib/ckfw/builtins/Makefile
security/nss/lib/ckfw/builtins/Makefile.in
security/nss/lib/ckfw/builtins/manifest.mn
security/nss/lib/ckfw/dbm/Makefile
security/nss/lib/ckfw/dbm/manifest.mn
security/nss/lib/ckfw/manifest.mn
security/nss/lib/crmf/.cvsignore
security/nss/lib/crmf/Makefile
security/nss/lib/crmf/Makefile.in
security/nss/lib/crmf/manifest.mn
security/nss/lib/cryptohi/.cvsignore
security/nss/lib/cryptohi/Makefile
security/nss/lib/cryptohi/Makefile.in
security/nss/lib/cryptohi/manifest.mn
security/nss/lib/fortcrypt/.cvsignore
security/nss/lib/fortcrypt/Makefile
security/nss/lib/fortcrypt/Makefile.in
security/nss/lib/fortcrypt/manifest.mn
security/nss/lib/fortcrypt/swfort/.cvsignore
security/nss/lib/fortcrypt/swfort/Makefile
security/nss/lib/fortcrypt/swfort/Makefile.in
security/nss/lib/fortcrypt/swfort/manifest.mn
security/nss/lib/fortcrypt/swfort/pkcs11/.cvsignore
security/nss/lib/fortcrypt/swfort/pkcs11/Makefile
security/nss/lib/fortcrypt/swfort/pkcs11/Makefile.in
security/nss/lib/fortcrypt/swfort/pkcs11/manifest.mn
security/nss/lib/freebl/.cvsignore
security/nss/lib/freebl/Makefile
security/nss/lib/freebl/Makefile.in
security/nss/lib/freebl/manifest.mn
security/nss/lib/jar/.cvsignore
security/nss/lib/jar/Makefile
security/nss/lib/jar/Makefile.in
security/nss/lib/jar/manifest.mn
security/nss/lib/manifest.mn
security/nss/lib/nss/.cvsignore
security/nss/lib/nss/Makefile
security/nss/lib/nss/Makefile.in
security/nss/lib/nss/config.mk
security/nss/lib/nss/manifest.mn
security/nss/lib/nss/nss.def
security/nss/lib/nss/nss.h
security/nss/lib/pk11wrap/.cvsignore
security/nss/lib/pk11wrap/Makefile
security/nss/lib/pk11wrap/Makefile.in
security/nss/lib/pk11wrap/manifest.mn
security/nss/lib/pk11wrap/pk11cert.c
security/nss/lib/pk11wrap/pk11slot.c
security/nss/lib/pk11wrap/secmodt.h
security/nss/lib/pkcs12/.cvsignore
security/nss/lib/pkcs12/Makefile
security/nss/lib/pkcs12/Makefile.in
security/nss/lib/pkcs12/manifest.mn
security/nss/lib/pkcs12/p12d.c
security/nss/lib/pkcs7/.cvsignore
security/nss/lib/pkcs7/Makefile
security/nss/lib/pkcs7/Makefile.in
security/nss/lib/pkcs7/manifest.mn
security/nss/lib/pki1/Makefile
security/nss/lib/pki1/manifest.mn
security/nss/lib/smime/.cvsignore
security/nss/lib/smime/Makefile
security/nss/lib/smime/Makefile.in
security/nss/lib/smime/config.mk
security/nss/lib/smime/manifest.mn
security/nss/lib/smime/smime.def
security/nss/lib/smime/smimeutil.c
security/nss/lib/softoken/.cvsignore
security/nss/lib/softoken/Makefile
security/nss/lib/softoken/Makefile.in
security/nss/lib/softoken/manifest.mn
security/nss/lib/ssl/.cvsignore
security/nss/lib/ssl/Makefile
security/nss/lib/ssl/Makefile.in
security/nss/lib/ssl/config.mk
security/nss/lib/ssl/manifest.mn
security/nss/lib/ssl/ssl.def
security/nss/lib/ssl/sslcon.c
security/nss/lib/util/.cvsignore
security/nss/lib/util/Makefile
security/nss/lib/util/Makefile.in
security/nss/lib/util/manifest.mn
security/nss/lib/util/secport.c
security/nss/macbuild/NSS.mcp
security/nss/makefile.win
security/nss/makefiles
security/nss/manifest.mn
security/nss/secmakefiles.sh
security/nss/tests/cert/cert.sh
security/nss/tests/common/init.sh
security/nss/tests/header
security/nss/tests/nssqa
security/nss/tests/qa_stat
security/nss/tests/set_environment
security/nss/tests/ssl/ssl.sh
security/nss/tests/ssl/ssl_dist_stress.sh
security/nss/tests/tools/tools.sh
new file mode 100644
--- /dev/null
+++ b/security/coreconf/.cvsignore
@@ -0,0 +1,1 @@
+Makefile
--- a/security/coreconf/AIX.mk
+++ b/security/coreconf/AIX.mk
@@ -27,17 +27,17 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for AIX.
 #
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 #
 # There are two implementation strategies available on AIX:
 # pthreads, and pthreads-user.  The default is pthreads.
 # In both strategies, we need to use pthread_user.c, instead of
 # aix.c.  The fact that aix.c is never used is somewhat strange.
 # 
 # So we need to do the following:
--- a/security/coreconf/AIX3.2.mk
+++ b/security/coreconf/AIX3.2.mk
@@ -27,9 +27,9 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for AIX3.2.5
 #
-include $(CORE_DEPTH)/coreconf/AIX.mk
+include $(CORECONF_SOURCE)/AIX.mk
--- a/security/coreconf/AIX4.1.mk
+++ b/security/coreconf/AIX4.1.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for AIX4.1
 #
 
-include $(CORE_DEPTH)/coreconf/AIX.mk
+include $(CORECONF_SOURCE)/AIX.mk
 
 
 AIX_LINK_OPTS  += -bnso -berok
 #AIX_LINK_OPTS += -bnso -berok -brename:.select,.wrap_select -brename:.poll,.wrap_poll -bI:/usr/lib/syscalls.exp
 
 # The AIX4.1 linker had a bug which always looked for a dynamic library
 # with an extension of .a.  AIX4.2 fixed this problem
 DLL_SUFFIX = a
--- a/security/coreconf/AIX4.2.mk
+++ b/security/coreconf/AIX4.2.mk
@@ -29,17 +29,17 @@
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 
 #
 # Config stuff for AIX4.2
 #
 
-include $(CORE_DEPTH)/coreconf/AIX.mk
+include $(CORECONF_SOURCE)/AIX.mk
 
 OS_CFLAGS	+= -DAIX4_2
 DSO_LDOPTS	= -brtl -bM:SRE -bnoentry $(EXPORT_RULES)
 MKSHLIB		= $(LD) $(DSO_LDOPTS) -lsvld -L/usr/lpp/xlC/lib -lc -lm
 
 OS_LIBS		+= -L/usr/lpp/xlC/lib -lc -lm
 EXPORT_RULES = -bexpall
 
--- a/security/coreconf/AIX4.3.mk
+++ b/security/coreconf/AIX4.3.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for AIX4.3
 #
 
-include $(CORE_DEPTH)/coreconf/AIX.mk
+include $(CORECONF_SOURCE)/AIX.mk
 
 
 ifeq ($(USE_64), 1)
 # Next line replaced by generic name handling in arch.mk
 #	COMPILER_TAG    = _64
 	OS_CFLAGS	+= -DAIX_64BIT
 	OBJECT_MODE=64
 	export OBJECT_MODE
--- a/security/coreconf/BSD_OS.mk
+++ b/security/coreconf/BSD_OS.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for BSD/OS
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER	= gcc
 CC			= gcc
 CCC			= g++
 RANLIB			= ranlib
 
 ifeq ($(OS_TEST),i386)
 	OS_REL_CFLAGS	= -D__i386__
--- a/security/coreconf/FreeBSD.mk
+++ b/security/coreconf/FreeBSD.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for FreeBSD
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER	= gcc
 CC			= gcc
 CCC			= g++
 RANLIB			= ranlib
 
 ifeq ($(OS_TEST),alpha)
 CPU_ARCH		= alpha
--- a/security/coreconf/FreeBSD2.mk
+++ b/security/coreconf/FreeBSD2.mk
@@ -28,9 +28,9 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for FreeBSD2
 #
 
-include $(CORE_DEPTH)/coreconf/FreeBSD.mk
+include $(CORECONF_SOURCE)/FreeBSD.mk
--- a/security/coreconf/HP-UX.mk
+++ b/security/coreconf/HP-UX.mk
@@ -29,17 +29,17 @@
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 
 #
 # Config stuff for HP-UX
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER = cc
 
 CPU_ARCH   = hppa
 DLL_SUFFIX = sl
 CC         = cc
 CCC        = CC
 OS_CFLAGS  += -Ae $(DSO_CFLAGS) -DHPUX -D$(CPU_ARCH) -D_HPUX_SOURCE
--- a/security/coreconf/HP-UXA.09.03.mk
+++ b/security/coreconf/HP-UXA.09.03.mk
@@ -36,9 +36,9 @@
 #
 ifeq ($(OS_RELEASE),A.09.03)
 	DEFAULT_IMPL_STRATEGY	 = _CLASSIC
 endif
 
 #
 # Config stuff for HP-UXA.09.03
 #
-include $(CORE_DEPTH)/coreconf/HP-UXA.09.mk
+include $(CORECONF_SOURCE)/HP-UXA.09.mk
--- a/security/coreconf/HP-UXA.09.07.mk
+++ b/security/coreconf/HP-UXA.09.07.mk
@@ -35,9 +35,9 @@
 #
 ifeq ($(OS_RELEASE),A.09.07)
 	DEFAULT_IMPL_STRATEGY	 = _CLASSIC
 endif
 
 #
 # Config stuff for HP-UXA.09.07
 #
-include $(CORE_DEPTH)/coreconf/HP-UXA.09.mk
+include $(CORECONF_SOURCE)/HP-UXA.09.mk
--- a/security/coreconf/HP-UXA.09.mk
+++ b/security/coreconf/HP-UXA.09.mk
@@ -28,11 +28,11 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 
 #
 # Config stuff for HP-UXA.09
 #
-include $(CORE_DEPTH)/coreconf/HP-UX.mk
+include $(CORECONF_SOURCE)/HP-UX.mk
 
 OS_CFLAGS += -DHPUX9
--- a/security/coreconf/HP-UXB.10.01.mk
+++ b/security/coreconf/HP-UXB.10.01.mk
@@ -32,9 +32,9 @@
 #
 ifeq ($(OS_RELEASE),B.10.01)
 	DEFAULT_IMPL_STRATEGY	 = _CLASSIC
 endif
 
 #
 # Config stuff for HP-UXB.10.01
 #
-include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
+include $(CORECONF_SOURCE)/HP-UXB.10.mk
--- a/security/coreconf/HP-UXB.10.10.mk
+++ b/security/coreconf/HP-UXB.10.10.mk
@@ -36,15 +36,15 @@
 
 ifeq ($(OS_RELEASE),B.10.10)
 	DEFAULT_IMPL_STRATEGY 	 = _PTH
 endif
 
 #
 # Config stuff for HP-UXB.10.10
 #
-include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
+include $(CORECONF_SOURCE)/HP-UXB.10.mk
 
 OS_CFLAGS += -DHPUX10_10
 
 ifeq ($(USE_PTHREADS),1)
 	OS_CFLAGS	+= -D_REENTRANT
 endif
--- a/security/coreconf/HP-UXB.10.20.mk
+++ b/security/coreconf/HP-UXB.10.20.mk
@@ -36,15 +36,15 @@
 
 ifeq ($(OS_RELEASE),B.10.20)
 	DEFAULT_IMPL_STRATEGY = _PTH
 endif
 
 #
 # Config stuff for HP-UXB.10.20
 #
-include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
+include $(CORECONF_SOURCE)/HP-UXB.10.mk
 
 OS_CFLAGS		+= -DHPUX10_20
 
 ifeq ($(USE_PTHREADS),1)
 	OS_CFLAGS	+= -D_REENTRANT
 endif
--- a/security/coreconf/HP-UXB.10.30.mk
+++ b/security/coreconf/HP-UXB.10.30.mk
@@ -36,17 +36,17 @@
 
 ifeq ($(OS_RELEASE),B.10.30)
 	DEFAULT_IMPL_STRATEGY	 = _PTH
 endif
 
 #
 # Config stuff for HP-UXB.10.30.
 #
-include $(CORE_DEPTH)/coreconf/HP-UXB.10.mk
+include $(CORECONF_SOURCE)/HP-UXB.10.mk
 
 OS_CFLAGS		+= -DHPUX10_30
 
 #
 # To use the true pthread (kernel thread) library on 10.30 and
 # 11.00, we should define _POSIX_C_SOURCE to be 199506L.
 # The _REENTRANT macro is deprecated.
 #
--- a/security/coreconf/HP-UXB.10.mk
+++ b/security/coreconf/HP-UXB.10.mk
@@ -27,12 +27,12 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for HP-UXB.10
 #
-include $(CORE_DEPTH)/coreconf/HP-UX.mk
+include $(CORECONF_SOURCE)/HP-UX.mk
 
 OS_CFLAGS += -DHPUX10
 OS_LIBS   += -lpthread -lm
--- a/security/coreconf/HP-UXB.11.00.mk
+++ b/security/coreconf/HP-UXB.11.00.mk
@@ -47,9 +47,9 @@ endif
 
 ifdef USE_PTHREADS
 	OS_CFLAGS	+= -D_POSIX_C_SOURCE=199506L
 endif
 
 #
 # Config stuff for HP-UXB.11.00.
 #
-include $(CORE_DEPTH)/coreconf/HP-UXB.11.mk
+include $(CORECONF_SOURCE)/HP-UXB.11.mk
--- a/security/coreconf/HP-UXB.11.mk
+++ b/security/coreconf/HP-UXB.11.mk
@@ -27,17 +27,17 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for HP-UXB.11
 #
-include $(CORE_DEPTH)/coreconf/HP-UX.mk
+include $(CORECONF_SOURCE)/HP-UX.mk
 
 ifdef USE_LONG_LONGS
 USE_HYBRID = 1
 endif
 
 ifndef NS_USE_GCC
     CCC                 = /opt/aCC/bin/aCC -ext
     ifeq ($(USE_64), 1)
--- a/security/coreconf/IRIX.mk
+++ b/security/coreconf/IRIX.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for IRIX
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 #
 # The default implementation strategy for Irix is classic nspr.
 #
 ifeq ($(USE_PTHREADS),1)
 	ifeq ($(USE_N32),1)
 		IMPL_STRATEGY = _n32_PTH
 	else
--- a/security/coreconf/IRIX5.2.mk
+++ b/security/coreconf/IRIX5.2.mk
@@ -27,9 +27,9 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for IRIX 5.2
 #
-include $(CORE_DEPTH)/coreconf/IRIX5.mk
+include $(CORECONF_SOURCE)/IRIX5.mk
--- a/security/coreconf/IRIX5.3.mk
+++ b/security/coreconf/IRIX5.3.mk
@@ -27,11 +27,11 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for IRIX 5.3
 #
-include $(CORE_DEPTH)/coreconf/IRIX5.mk
+include $(CORECONF_SOURCE)/IRIX5.mk
 
 OS_CFLAGS += -DIRIX5_3
--- a/security/coreconf/IRIX5.mk
+++ b/security/coreconf/IRIX5.mk
@@ -28,13 +28,13 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for IRIX 5
 #
 
-include $(CORE_DEPTH)/coreconf/IRIX.mk
+include $(CORECONF_SOURCE)/IRIX.mk
 
 ifndef NS_USE_GCC
 	ODD_CFLAGS += -xgot
 endif
--- a/security/coreconf/IRIX6.2.mk
+++ b/security/coreconf/IRIX6.2.mk
@@ -33,11 +33,11 @@
 # Config stuff for IRIX 6.2
 #
 
 
 # catch unresolved symbols
 
 SHLIB_LD_OPTS += -no_unresolved
 
-include $(CORE_DEPTH)/coreconf/IRIX6.mk
+include $(CORECONF_SOURCE)/IRIX6.mk
 
 OS_CFLAGS += -DIRIX6_2
--- a/security/coreconf/IRIX6.3.mk
+++ b/security/coreconf/IRIX6.3.mk
@@ -32,11 +32,11 @@
 #
 # Config stuff for IRIX 6.3
 #
 
 # catch unresolved symbols
 
 SHLIB_LD_OPTS += -no_unresolved
 
-include $(CORE_DEPTH)/coreconf/IRIX6.mk
+include $(CORECONF_SOURCE)/IRIX6.mk
 
 OS_CFLAGS += -DIRIX6_3
--- a/security/coreconf/IRIX6.5.mk
+++ b/security/coreconf/IRIX6.5.mk
@@ -32,11 +32,11 @@
 #
 # Config stuff for IRIX 6.5
 #
 
 # catch unresolved symbols
 
 SHLIB_LD_OPTS += -no_unresolved
 
-include $(CORE_DEPTH)/coreconf/IRIX6.mk
+include $(CORECONF_SOURCE)/IRIX6.mk
 
 OS_CFLAGS += -DIRIX6_5 -mips3
--- a/security/coreconf/IRIX6.mk
+++ b/security/coreconf/IRIX6.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for IRIX 6
 #
 
-include $(CORE_DEPTH)/coreconf/IRIX.mk
+include $(CORECONF_SOURCE)/IRIX.mk
 
 ifndef NS_USE_GCC
 	ifneq ($(USE_N32),1)
 	OS_CFLAGS  += -32
 	endif
 	ODD_CFLAGS += -multigot
 endif
 
--- a/security/coreconf/Linux.mk
+++ b/security/coreconf/Linux.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Linux
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 #
 # The default implementation strategy for Linux is now pthreads
 #
 USE_PTHREADS = 1
 
 ifeq ($(USE_PTHREADS),1)
 	IMPL_STRATEGY = _PTH
--- a/security/coreconf/Linux2.1.mk
+++ b/security/coreconf/Linux2.1.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Linux 2.1 (ELF)
 #
 
-include $(CORE_DEPTH)/coreconf/Linux.mk
+include $(CORECONF_SOURCE)/Linux.mk
 ifeq ($(OS_RELEASE),2.1)
         OS_REL_CFLAGS   += -DLINUX2_1
         MKSHLIB         = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
         ifdef BUILD_OPT
                 OPTIMIZER       = -O2
         endif
 endif
 
--- a/security/coreconf/Linux2.2.mk
+++ b/security/coreconf/Linux2.2.mk
@@ -28,16 +28,16 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Linux 2.2 (ELF)
 #
 
-include $(CORE_DEPTH)/coreconf/Linux.mk
+include $(CORECONF_SOURCE)/Linux.mk
 
 OS_REL_CFLAGS   += -DLINUX2_1
 MKSHLIB         = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
 ifdef BUILD_OPT
             OPTIMIZER       = -O2
 endif
 
--- a/security/coreconf/Linux2.4.mk
+++ b/security/coreconf/Linux2.4.mk
@@ -28,16 +28,16 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Linux 2.4 (ELF)
 #
 
-include $(CORE_DEPTH)/coreconf/Linux.mk
+include $(CORECONF_SOURCE)/Linux.mk
 
 OS_REL_CFLAGS   += -DLINUX2_1
 MKSHLIB         = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
 ifdef BUILD_OPT
             OPTIMIZER       = -O2
 endif
 
--- a/security/coreconf/LinuxELF1.2.mk
+++ b/security/coreconf/LinuxELF1.2.mk
@@ -28,9 +28,9 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Linux 1.2 (ELF)
 #
 
-include $(CORE_DEPTH)/coreconf/Linux.mk
+include $(CORECONF_SOURCE)/Linux.mk
--- a/security/coreconf/LinuxELF2.0.mk
+++ b/security/coreconf/LinuxELF2.0.mk
@@ -28,9 +28,9 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Linux 2.0 (ELF)
 #
 
-include $(CORE_DEPTH)/coreconf/Linux.mk
+include $(CORECONF_SOURCE)/Linux.mk
deleted file mode 100644
--- a/security/coreconf/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-DEPTH		= ..
-CORE_DEPTH	= ..
-
-MODULE		= coreconf
-
-DIRS		= nsinstall mkdepend md
-
-include $(DEPTH)/coreconf/config.mk
-include $(DEPTH)/coreconf/rules.mk
-
-export:: libs
new file mode 100644
--- /dev/null
+++ b/security/coreconf/Makefile.in
@@ -0,0 +1,45 @@
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+# 
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+# 
+# The Original Code is the Netscape security libraries.
+# 
+# The Initial Developer of the Original Code is Netscape
+# Communications Corporation.  Portions created by Netscape are 
+# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
+# Rights Reserved.
+# 
+# Contributor(s):
+# 
+# Alternatively, the contents of this file may be used under the
+# terms of the GNU General Public License Version 2 or later (the
+# "GPL"), in which case the provisions of the GPL are applicable 
+# instead of those above.  If you wish to allow use of your 
+# version of this file only under the terms of the GPL and not to
+# allow others to use your version of this file under the MPL,
+# indicate your decision by deleting the provisions above and
+# replace them with the notice and other provisions required by
+# the GPL.  If you do not delete the provisions above, a recipient
+# may use your version of this file under either the MPL or the
+# GPL.
+#
+
+CORE_DEPTH	= ..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@:$(CORECONF_SOURCE)
+
+DIRS		= nsinstall
+
+include autoconf.mk
+
+include $(CORECONF_SOURCE)/config.mk
+
+include $(CORECONF_SOURCE)/rules.mk
--- a/security/coreconf/NCR3.0.mk
+++ b/security/coreconf/NCR3.0.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for NCR SysVr4 v 3.0
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER = cc
 
 ###
 NS_USE_NATIVE = 1
 
 # NS_USE_GCC = 1
 
--- a/security/coreconf/NEC4.2.mk
+++ b/security/coreconf/NEC4.2.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for NEC Mips SYSV
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER = $(CORE_DEPTH)/build/hcc
 
 CPU_ARCH		= mips
 
 ifdef NS_USE_GCC
 CC			= gcc
 CCC			= g++
--- a/security/coreconf/NetBSD.mk
+++ b/security/coreconf/NetBSD.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for NetBSD
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER	= gcc
 CC			= gcc
 CCC			= g++
 RANLIB			= ranlib
 
 OS_REL_CFLAGS		= -Di386
 CPU_ARCH		= x86
--- a/security/coreconf/OS2.mk
+++ b/security/coreconf/OS2.mk
@@ -138,17 +138,17 @@ MKSHLIB_FORCE_ALL       =
 MKSHLIB_UNFORCE_ALL     = 
 DSO_LDOPTS              = 
 # DLL_SUFFIX              = .dll
 SHLIB_LDSTARTFILE	= 
 SHLIB_LDENDFILE		= 
 endif   #NO_SHARED_LIB
 
 OS_CFLAGS          = /Q /qlibansi /Gd /Gm /Su4 /Mp /Tl-
-INCLUDES        += -I$(CORE_DEPTH)/../dist/include
+INCLUDES        += -I$(MOD_DEPTH)/../../dist/include
 DEFINES         += -DXP_OS2_VACPP -DTCPV40HDRS
 
 # Where the libraries are
 NSPR_LIBS	= $(DIST)/lib/nspr4.lib $(DIST)/lib/plc4.lib $(DIST)/lib/plds4.lib
 MOZ_COMPONENT_NSPR_LIBS=-L$(DIST)/lib $(NSPR_LIBS)
 NSPR_INCLUDE_DIR =   
 
 
@@ -168,22 +168,22 @@ OBJDIR_TAG 		= _DBG
 LDFLAGS 		= /FREE /DE /NOE /LINENUMBERS /nologo 
 endif   # BUILD_OPT
 
 endif   # XP_OS2_VACPP
 
 # OS/2 use nsinstall that is included in the toolkit.
 # since we do not wish to support and maintain 3 version of nsinstall in mozilla, nspr and nss
 
-NSINSTALL_DIR  = $(CORE_DEPTH)/coreconf/nsinstall
+NSINSTALL_DIR  = $(CORECONF_SOURCE)/nsinstall
 # NSINSTALL      = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
 NSINSTALL 	= nsinstall             # HCT4OS2
 INSTALL		= $(NSINSTALL)
 
-MKDEPEND_DIR    = $(CORE_DEPTH)/coreconf/mkdepend
+MKDEPEND_DIR    = $(CORECONF_SOURCE)/mkdepend
 MKDEPEND        = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
 MKDEPENDENCIES  = $(OBJDIR_NAME)/depend.mk
 
 ####################################################################
 #
 # One can define the makefile variable NSDISTMODE to control
 # how files are published to the 'dist' directory.  If not
 # defined, the default is "install using relative symbolic
--- a/security/coreconf/OSF1.mk
+++ b/security/coreconf/OSF1.mk
@@ -35,17 +35,17 @@
 
 #
 # The Bourne shell (sh) on OSF1 doesn't handle "set -e" correctly,
 # which we use to stop LOOP_OVER_DIRS submakes as soon as any
 # submake fails.  So we use the Korn shell instead.
 #
 SHELL = /usr/bin/ksh
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER = cc
 
 CC         = cc
 OS_CFLAGS += $(NON_LD_FLAGS) -std1
 CCC        = cxx
 RANLIB     = /bin/true
 CPU_ARCH   = alpha
--- a/security/coreconf/OSF1V2.0.mk
+++ b/security/coreconf/OSF1V2.0.mk
@@ -27,9 +27,9 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for DEC OSF/1 V2.0
 #
-include $(CORE_DEPTH)/coreconf/OSF1.mk
+include $(CORECONF_SOURCE)/OSF1.mk
--- a/security/coreconf/OSF1V3.0.mk
+++ b/security/coreconf/OSF1V3.0.mk
@@ -27,9 +27,9 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for DEC OSF/1 V3.0
 #
-include $(CORE_DEPTH)/coreconf/OSF1.mk
+include $(CORECONF_SOURCE)/OSF1.mk
--- a/security/coreconf/OSF1V3.2.mk
+++ b/security/coreconf/OSF1V3.2.mk
@@ -32,13 +32,13 @@
 #
 # On OSF1 V3.2, classic nspr is the default (and only) implementation
 # strategy.
 #
 
 #
 # Config stuff for DEC OSF/1 V3.2
 #
-include $(CORE_DEPTH)/coreconf/OSF1.mk
+include $(CORECONF_SOURCE)/OSF1.mk
 
 ifeq ($(OS_RELEASE),V3.2)
 	OS_CFLAGS += -DOSF1V3
 endif
--- a/security/coreconf/OSF1V4.0.mk
+++ b/security/coreconf/OSF1V4.0.mk
@@ -39,13 +39,13 @@ ifneq ($(OS_RELEASE),V3.2)
 		USE_PTHREADS =
 		IMPL_STRATEGY := _CLASSIC
 	endif
 endif
 
 #
 # Config stuff for DEC OSF/1 V4.0
 #
-include $(CORE_DEPTH)/coreconf/OSF1.mk
+include $(CORECONF_SOURCE)/OSF1.mk
 
 ifeq ($(OS_RELEASE),V4.0)
 	OS_CFLAGS += -DOSF1V4
 endif
--- a/security/coreconf/OSF1V4.0B.mk
+++ b/security/coreconf/OSF1V4.0B.mk
@@ -27,9 +27,9 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for DEC OSF/1 V4.0B
 #
-include $(CORE_DEPTH)/coreconf/OSF1V4.0.mk
+include $(CORECONF_SOURCE)/OSF1V4.0.mk
--- a/security/coreconf/OSF1V4.0D.mk
+++ b/security/coreconf/OSF1V4.0D.mk
@@ -27,13 +27,13 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for DEC OSF/1 V4.0D
 #
-include $(CORE_DEPTH)/coreconf/OSF1V4.0.mk
+include $(CORECONF_SOURCE)/OSF1V4.0.mk
 DEFINES	+= -DOSF1V4D
 
 OS_LIBS += -lpthread -lrt
 
--- a/security/coreconf/OSF1V5.0.mk
+++ b/security/coreconf/OSF1V5.0.mk
@@ -39,9 +39,9 @@ ifneq ($(OS_RELEASE),V3.2)
 		USE_PTHREADS =
 		IMPL_STRATEGY := _CLASSIC
 	endif
 endif
 
 #
 # Config stuff for DEC OSF/1 V5.0
 #
-include $(CORE_DEPTH)/coreconf/OSF1.mk
+include $(CORECONF_SOURCE)/OSF1.mk
--- a/security/coreconf/OpenVMS.mk
+++ b/security/coreconf/OpenVMS.mk
@@ -14,17 +14,17 @@
 # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
 # Reserved.
 #
 
 #
 # Config stuff for Compaq OpenVMS
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 ifdef INTERNAL_TOOLS
 CC			= c89
 CCC			= cxx
 OPTIMIZER		= -O
 else
 CC			= ccc
 CCC			= ccc
--- a/security/coreconf/OpenVMSV7.1-2.mk
+++ b/security/coreconf/OpenVMSV7.1-2.mk
@@ -14,9 +14,9 @@
 # Copyright (C) 1998 Netscape Communications Corporation.  All Rights
 # Reserved.
 #
 
 #
 # Config stuff for Compaq OpenVMS
 #
 
-include $(CORE_DEPTH)/coreconf/OpenVMS.mk
+include $(CORECONF_SOURCE)/OpenVMS.mk
--- a/security/coreconf/ReliantUNIX.mk
+++ b/security/coreconf/ReliantUNIX.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for ReliantUNIX
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER = cc
 
 ifdef NS_USE_GCC
 	## gcc-2.7.2 homebrewn
 	CC          = gcc
 	CCC         = g++
 	AS          = $(CC)
--- a/security/coreconf/ReliantUNIX5.4.mk
+++ b/security/coreconf/ReliantUNIX5.4.mk
@@ -27,9 +27,9 @@
 # indicate your decision by deleting the provisions above and
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for ReliantUNIX5.4
 #
-include $(CORE_DEPTH)/coreconf/ReliantUNIX.mk
+include $(CORECONF_SOURCE)/ReliantUNIX.mk
--- a/security/coreconf/SCOOS5.0.mk
+++ b/security/coreconf/SCOOS5.0.mk
@@ -28,9 +28,9 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SCO OpenServer 5.0 for x86.
 #
 
-include $(CORE_DEPTH)/coreconf/SCO_SV3.2.mk
+include $(CORECONF_SOURCE)/SCO_SV3.2.mk
--- a/security/coreconf/SCO_SV3.2.mk
+++ b/security/coreconf/SCO_SV3.2.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SCO Unix for x86.
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER = cc
 
 CC         = cc
 OS_CFLAGS += -b elf -KPIC
 CCC        = g++
 CCC       += -b elf -DPRFSTREAMS_BROKEN -I/usr/local/lib/g++-include
 # CCC      = $(CORE_DEPTH)/build/hcpp
--- a/security/coreconf/SunOS4.1.3_U1.mk
+++ b/security/coreconf/SunOS4.1.3_U1.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SunOS4.1
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER = cc
 
 INCLUDES += -I/usr/dt/include -I/usr/openwin/include -I/home/motif/usr/include
 
 # SunOS 4 _requires_ that shared libs have a version number.
 # XXX FIXME: Version number should use NSPR_VERSION_NUMBER?
 DLL_SUFFIX = so.1.0
--- a/security/coreconf/SunOS5.3.mk
+++ b/security/coreconf/SunOS5.3.mk
@@ -30,9 +30,9 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SunOS5.3
 #
 
 SOL_CFLAGS =
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
--- a/security/coreconf/SunOS5.4.mk
+++ b/security/coreconf/SunOS5.4.mk
@@ -30,9 +30,9 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SunOS5.4
 #
 
 SOL_CFLAGS =
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
--- a/security/coreconf/SunOS5.4_i86pc.mk
+++ b/security/coreconf/SunOS5.4_i86pc.mk
@@ -28,17 +28,17 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Solaris 2.4 on x86
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER = cc
 
 ifdef NS_USE_GCC
 	CC		= gcc
 	OS_CFLAGS	+= -Wall -Wno-format
 	CCC		= g++
 	CCC		+= -Wall -Wno-format
--- a/security/coreconf/SunOS5.5.1.mk
+++ b/security/coreconf/SunOS5.5.1.mk
@@ -30,15 +30,15 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SunOS5.5.1
 #
 
 SOL_CFLAGS += -D_SVID_GETTOD
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
 
 ifeq ($(OS_RELEASE),5.5.1)
 	OS_DEFINES += -DSOLARIS2_5
 endif
 
 OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc 
--- a/security/coreconf/SunOS5.5.1_i86pc.mk
+++ b/security/coreconf/SunOS5.5.1_i86pc.mk
@@ -30,16 +30,16 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Solaris 2.5.1 on x86
 # 
 
 SOL_CFLAGS	= -D_SVID_GETTOD
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
 
 CPU_ARCH		= x86
 OS_DEFINES		+= -Di386
 
 ifeq ($(OS_RELEASE),5.5.1_i86pc)
 	OS_DEFINES += -DSOLARIS2_5
 endif
--- a/security/coreconf/SunOS5.5.mk
+++ b/security/coreconf/SunOS5.5.mk
@@ -30,13 +30,13 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SunOS5.5
 #
 
 SOL_CFLAGS += -D_SVID_GETTOD
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
 
 ifeq ($(OS_RELEASE),5.5)
 	OS_DEFINES += -DSOLARIS2_5
 endif
--- a/security/coreconf/SunOS5.6.mk
+++ b/security/coreconf/SunOS5.6.mk
@@ -30,15 +30,15 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SunOS5.6
 #
 
 SOL_CFLAGS += -D_SVID_GETTOD
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
 
 ifeq ($(OS_RELEASE),5.6)
 	OS_DEFINES += -DSOLARIS2_6
 endif
 
 OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc 
--- a/security/coreconf/SunOS5.6_i86pc.mk
+++ b/security/coreconf/SunOS5.6_i86pc.mk
@@ -30,16 +30,16 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Solaris 2.6 on x86
 # 
 
 SOL_CFLAGS	= -D_SVID_GETTOD
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
 
 CPU_ARCH		= x86
 OS_DEFINES		+= -Di386
 
 ifeq ($(OS_RELEASE),5.6_i86pc)
 	OS_DEFINES += -DSOLARIS2_6
 endif
--- a/security/coreconf/SunOS5.7.mk
+++ b/security/coreconf/SunOS5.7.mk
@@ -30,15 +30,15 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SunOS5.7
 #
 
 SOL_CFLAGS += -D_SVID_GETTOD
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
 
 ifeq ($(OS_RELEASE),5.7)
 	OS_DEFINES += -DSOLARIS2_7
 endif
 
 OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc 
--- a/security/coreconf/SunOS5.7_i86pc.mk
+++ b/security/coreconf/SunOS5.7_i86pc.mk
@@ -30,17 +30,17 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Solaris 7 on x86
 # 
 
 SOL_CFLAGS	= -D_SVID_GETTOD
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
 
 CPU_ARCH		= x86
 OS_DEFINES		+= -Di386
 
 ifeq ($(OS_RELEASE),5.7_i86pc)
 	OS_DEFINES += -DSOLARIS2_7
 endif
 
--- a/security/coreconf/SunOS5.8.mk
+++ b/security/coreconf/SunOS5.8.mk
@@ -30,15 +30,15 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SunOS5.8
 #
 
 SOL_CFLAGS += -D_SVID_GETTOD
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
 
 ifeq ($(OS_RELEASE),5.8)
 	OS_DEFINES += -DSOLARIS2_8
 endif
 
 OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc 
--- a/security/coreconf/SunOS5.8_i86pc.mk
+++ b/security/coreconf/SunOS5.8_i86pc.mk
@@ -30,17 +30,17 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for Solaris 8 on x86
 # 
 
 SOL_CFLAGS	= -D_SVID_GETTOD
 
-include $(CORE_DEPTH)/coreconf/SunOS5.mk
+include $(CORECONF_SOURCE)/SunOS5.mk
 
 CPU_ARCH		= x86
 OS_DEFINES		+= -Di386
 
 ifeq ($(OS_RELEASE),5.8_i86pc)
 	OS_DEFINES += -DSOLARIS2_8
 endif
 
new file mode 100755
--- /dev/null
+++ b/security/coreconf/SunOS5.9.mk
@@ -0,0 +1,44 @@
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+# 
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+# 
+# The Original Code is the Netscape security libraries.
+# 
+# The Initial Developer of the Original Code is Netscape
+# Communications Corporation.  Portions created by Netscape are 
+# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
+# Rights Reserved.
+# 
+# Contributor(s):
+# 
+# Alternatively, the contents of this file may be used under the
+# terms of the GNU General Public License Version 2 or later (the
+# "GPL"), in which case the provisions of the GPL are applicable 
+# instead of those above.  If you wish to allow use of your 
+# version of this file only under the terms of the GPL and not to
+# allow others to use your version of this file under the MPL,
+# indicate your decision by deleting the provisions above and
+# replace them with the notice and other provisions required by
+# the GPL.  If you do not delete the provisions above, a recipient
+# may use your version of this file under either the MPL or the
+# GPL.
+#
+# Config stuff for SunOS5.9
+#
+
+SOL_CFLAGS += -D_SVID_GETTOD
+
+include $(CORECONF_SOURCE)/SunOS5.mk
+
+ifeq ($(OS_RELEASE),5.9)
+	OS_DEFINES += -DSOLARIS2_9
+endif
+
+OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc 
new file mode 100755
--- /dev/null
+++ b/security/coreconf/SunOS5.9_i86pc.mk
@@ -0,0 +1,47 @@
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+# 
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+# 
+# The Original Code is the Netscape security libraries.
+# 
+# The Initial Developer of the Original Code is Netscape
+# Communications Corporation.  Portions created by Netscape are 
+# Copyright (C) 2000 Netscape Communications Corporation.  All
+# Rights Reserved.
+# 
+# Contributor(s):
+# 
+# Alternatively, the contents of this file may be used under the
+# terms of the GNU General Public License Version 2 or later (the
+# "GPL"), in which case the provisions of the GPL are applicable 
+# instead of those above.  If you wish to allow use of your 
+# version of this file only under the terms of the GPL and not to
+# allow others to use your version of this file under the MPL,
+# indicate your decision by deleting the provisions above and
+# replace them with the notice and other provisions required by
+# the GPL.  If you do not delete the provisions above, a recipient
+# may use your version of this file under either the MPL or the
+# GPL.
+#
+# Config stuff for Solaris 9 on x86
+# 
+
+SOL_CFLAGS	= -D_SVID_GETTOD
+
+include $(CORECONF_SOURCE)/SunOS5.mk
+
+CPU_ARCH		= x86
+OS_DEFINES		+= -Di386
+
+ifeq ($(OS_RELEASE),5.9_i86pc)
+	OS_DEFINES += -DSOLARIS2_9
+endif
+
+OS_LIBS += -lthread -lnsl -lsocket -lposix4 -ldl -lc
--- a/security/coreconf/SunOS5.mk
+++ b/security/coreconf/SunOS5.mk
@@ -28,39 +28,57 @@
 # replace them with the notice and other provisions required by
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Config stuff for SunOS5.x
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-ifeq ($(USE_64), 1)
-	ARCHFLAG=-xarch=v9
-	LD=/usr/ccs/bin/ld
-else
-  ifdef USE_HYBRID
-	ARCHFLAG=-xarch=v8plus
-  else
-	ARCHFLAG=-xarch=v8
-  endif
-endif
+include $(CORECONF_SOURCE)/UNIX.mk
 
 #
 # Temporary define for the Client; to be removed when binary release is used
 #
 ifdef MOZILLA_CLIENT
 	LOCAL_THREADS_ONLY = 1
 	ifndef NS_USE_NATIVE
 		NS_USE_GCC = 1
 	endif
 endif
 
+# Sun's WorkShop defines v8, v8plus and v9 architectures.
+# gcc on Solaris defines v8 and v9 "cpus".  
+# gcc's v9 is equivalent to Workshop's v8plus.
+# gcc apparently has no equivalent to Workshop's v9
+# We always use Sun's assembler and linker, which use Sun's naming convention.
+
+ifeq ($(USE_64), 1)
+  ifdef NS_USE_GCC
+      ARCHFLAG= UNKNOWN 
+  else
+      ARCHFLAG=-xarch=v9
+  endif
+      LD=/usr/ccs/bin/ld
+else
+  ifdef NS_USE_GCC
+    ifdef USE_HYBRID
+      ARCHFLAG=-mcpu=v9 -Wa,-xarch=v8plus
+    else
+      ARCHFLAG=-mcpu=v8
+    endif
+  else
+    ifdef USE_HYBRID
+      ARCHFLAG=-xarch=v8plus
+    else
+      ARCHFLAG=-xarch=v8
+    endif
+  endif
+endif
+
 #
 # The default implementation strategy for Solaris is classic nspr.
 #
 ifeq ($(USE_PTHREADS),1)
 	IMPL_STRATEGY = _PTH
 else
 	ifeq ($(LOCAL_THREADS_ONLY),1)
 		IMPL_STRATEGY = _LOCAL
@@ -82,16 +100,17 @@ ifdef NS_USE_GCC
 	CCC        = g++
 	CCC       += -Wall -Wno-format
 	ASFLAGS	  += -x assembler-with-cpp
 	ifdef NO_MDUPDATE
 		OS_CFLAGS += $(NOMD_OS_CFLAGS)
 	else
 		OS_CFLAGS += $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
 	endif
+	OS_CFLAGS += $(ARCHFLAG)
 else
 	CC         = cc
 	CCC        = CC
 	ASFLAGS   += -Wa,-P
 	OS_CFLAGS += $(NOMD_OS_CFLAGS) $(ARCHFLAG)
 	ifndef BUILD_OPT
 		OS_CFLAGS  += -xs
 #	else
--- a/security/coreconf/UNIX.mk
+++ b/security/coreconf/UNIX.mk
@@ -41,20 +41,20 @@ LDOPTS     += -L$(SOURCE_LIB_DIR)
 ifdef BUILD_OPT
 	OPTIMIZER  += -O
 	DEFINES    += -UDEBUG -DNDEBUG
 else
 	OPTIMIZER  += -g
 	DEFINES    += -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)
 endif
 
-NSINSTALL_DIR  = $(CORE_DEPTH)/coreconf/nsinstall
+NSINSTALL_DIR  = $(MOD_DEPTH)/coreconf/nsinstall
 NSINSTALL      = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
 
-MKDEPEND_DIR    = $(CORE_DEPTH)/coreconf/mkdepend
+MKDEPEND_DIR    = $(MOD_DEPTH)/coreconf/mkdepend
 MKDEPEND        = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
 MKDEPENDENCIES  = $(OBJDIR_NAME)/depend.mk
 
 ####################################################################
 #
 # One can define the makefile variable NSDISTMODE to control
 # how files are published to the 'dist' directory.  If not
 # defined, the default is "install using relative symbolic
--- a/security/coreconf/UNIXWARE2.1.mk
+++ b/security/coreconf/UNIXWARE2.1.mk
@@ -30,17 +30,17 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 
 #
 # Config stuff for SCO Unixware 2.1
 #
 
-include $(CORE_DEPTH)/coreconf/UNIX.mk
+include $(CORECONF_SOURCE)/UNIX.mk
 
 DEFAULT_COMPILER = $(CORE_DEPTH)/build/hcc
 
 CC         = $(CORE_DEPTH)/build/hcc
 CCC         = $(CORE_DEPTH)/build/hcpp
 RANLIB      = true
 OS_CFLAGS   = -KPIC -DSVR4 -DSYSV -DUNIXWARE
 MKSHLIB     = $(LD)
--- a/security/coreconf/WIN16.mk
+++ b/security/coreconf/WIN16.mk
@@ -68,17 +68,17 @@ CC           = wcc
 CCC          = wcl
 LINK         = wlink
 AR           = wlib
 AR          += -q $@
 RC           = wrc.exe
 RC          += /r /dWIN16=1 /bt=windows
 RANLIB       = echo
 BSDECHO      = echo
-NSINSTALL_DIR  = $(CORE_DEPTH)/coreconf/nsinstall
+NSINSTALL_DIR  = $(CORECONF_SOURCE)/nsinstall
 NSINSTALL      = nsinstall
 INSTALL	     = $(NSINSTALL)
 MAKE_OBJDIR  = mkdir
 MAKE_OBJDIR += $(OBJDIR)
 XP_DEFINE   += -DXP_PC
 LIB_SUFFIX   = lib
 DLL_SUFFIX   = dll
 
--- a/security/coreconf/WIN32.mk
+++ b/security/coreconf/WIN32.mk
@@ -41,20 +41,20 @@ DEFAULT_COMPILER = cl
 CC           = cl
 CCC          = cl
 LINK         = link
 AR           = lib
 AR          += -NOLOGO -OUT:"$@"
 RANLIB       = echo
 BSDECHO      = echo
 
-NSINSTALL_DIR  = $(CORE_DEPTH)/coreconf/nsinstall
+NSINSTALL_DIR  = $(MOD_DEPTH)/coreconf/nsinstall
 NSINSTALL      = nsinstall
 
-MKDEPEND_DIR    = $(CORE_DEPTH)/coreconf/mkdepend
+MKDEPEND_DIR    = $(MOD_DEPTH)/coreconf/mkdepend
 MKDEPEND        = $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend.exe
 # Note: MKDEPENDENCIES __MUST__ be a relative pathname, not absolute.
 # If it is absolute, gmake will crash unless the named file exists.
 MKDEPENDENCIES  = $(OBJDIR_NAME)/depend.mk
 
 INSTALL      = $(NSINSTALL)
 MAKE_OBJDIR  = mkdir
 MAKE_OBJDIR += $(OBJDIR)
--- a/security/coreconf/WIN954.0.mk
+++ b/security/coreconf/WIN954.0.mk
@@ -33,17 +33,17 @@
 
 #
 # Config stuff for WIN95
 #
 # This makefile defines the following variables:
 # CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
 # PROCESSOR is an internal variable.
 
-include $(CORE_DEPTH)/coreconf/WIN32.mk
+include $(CORECONF_SOURCE)/WIN32.mk
 
 PROCESSOR := $(shell uname -p)
 ifeq ($(PROCESSOR), I386)
 	CPU_ARCH   = x386
 	OS_CFLAGS += -W3 -nologo
 	DEFINES += -D_X86_
 else 
 	ifeq ($(PROCESSOR), MIPS)
--- a/security/coreconf/WINNT3.51.mk
+++ b/security/coreconf/WINNT3.51.mk
@@ -34,17 +34,17 @@
 #
 # Config stuff for WINNT 3.51
 #
 # This makefile defines the following variables:
 # CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
 # It has the following internal variables:
 # OS_PROC_CFLAGS and OS_WIN_CFLAGS.
 
-include $(CORE_DEPTH)/coreconf/WIN32.mk
+include $(CORECONF_SOURCE)/WIN32.mk
 
 PROCESSOR := $(shell uname -p)
 ifeq ($(PROCESSOR), I386)
 	CPU_ARCH        = x386
 	OS_PROC_CFLAGS += -D_X86_
 else 
 	ifeq ($(PROCESSOR), MIPS)
 		CPU_ARCH        = MIPS
--- a/security/coreconf/WINNT4.0.mk
+++ b/security/coreconf/WINNT4.0.mk
@@ -33,17 +33,17 @@
 
 #
 # Config stuff for WINNT 4.0
 #
 # This makefile defines the following variables:
 # CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
 # PROCESSOR is an internal variable.
 
-include $(CORE_DEPTH)/coreconf/WIN32.mk
+include $(CORECONF_SOURCE)/WIN32.mk
 
 PROCESSOR := $(shell uname -p)
 ifeq ($(PROCESSOR), I386)
 	CPU_ARCH   = x386
 	OS_CFLAGS += -W3 -nologo
 	DEFINES += -D_X86_
 else 
 	ifeq ($(PROCESSOR), MIPS)
--- a/security/coreconf/WINNT5.0.mk
+++ b/security/coreconf/WINNT5.0.mk
@@ -33,17 +33,17 @@
 
 #
 # Config stuff for WINNT 5.0 (Windows 2000)
 #
 # This makefile defines the following variables:
 # CPU_ARCH, OS_CFLAGS, and OS_DLLFLAGS.
 # PROCESSOR is an internal variable.
 
-include $(CORE_DEPTH)/coreconf/WIN32.mk
+include $(CORECONF_SOURCE)/WIN32.mk
 
 PROCESSOR := $(shell uname -p)
 ifeq ($(PROCESSOR), I386)
 	CPU_ARCH   = x386
 	OS_CFLAGS += -W3 -nologo
 	DEFINES += -D_X86_
 else 
 	ifeq ($(PROCESSOR), MIPS)
new file mode 100644
--- /dev/null
+++ b/security/coreconf/autoconf.mk.in
@@ -0,0 +1,71 @@
+USE_AUTOCONF	= 1
+NO_MDUPDATE	= 1
+OBJDIR_NAME	= .
+
+prefix		= @prefix@
+exec_prefix	= @exec_prefix@
+bindir		= @bindir@
+includedir	= @includedir@
+libdir		= @libdir@
+datadir		= @datadir@
+
+dist_prefix	= @dist_prefix@
+dist_bindir	= @dist_bindir@
+dist_includedir = @dist_includedir@
+dist_libdir	= @dist_libdir@
+
+DIST		= $(dist_prefix)
+
+CORECONF_SOURCE	= @CORECONF_SOURCE@
+
+MOZILLA_CLIENT  = @MOZILLA_CLIENT@
+ENABLE_CMD	= @ENABLE_CMD@
+
+GNU_CC		= @GNU_CC@
+GNU_CXX		= @GNU_CXX@
+CC		= @CC@
+CCC		= @CXX@
+OS_CFLAGS	= @CFLAGS@ @DSO_CFLAGS@
+CXXFLAGS	= @CXXFLAGS@ @DSO_CFLAGS@
+HOST_CC		= @HOST_CC@
+HOST_CFLAGS	= @HOST_CFLAGS@
+LDFLAGS		= @LDFLAGS@
+
+COMPILER_DEPEND	= @COMPILER_DEPEND@
+MDDEPDIR	:= @MDDEPDIR@
+
+USE_PTHREADS	= @USE_PTHREADS@
+
+LIB_SUFFIX	= @LIB_SUFFIX@
+DLL_SUFFIX	= @DLL_SUFFIX@
+MKSHLIB		= @MKSHLIB@
+DSO_CFLAGS	= @DSO_CFLAGS@
+DSO_LDOPTS	= @DSO_LDOPTS@
+
+CPU_ARCH	= @CPU_ARCH@
+
+OS_TARGET	= @OS_TARGET@
+OS_ARCH		= @OS_ARCH@
+OS_RELEASE	= @OS_RELEASE@
+OS_TEST		= @OS_TEST@
+
+DEFINES		= @DEFINES@ @DEFS@
+AR		= @AR@
+AR_FLAGS	= @AR_FLAGS@
+AS		= @AS@
+ASFLAGS		= @ASFLAGS@
+LD		= @LD@
+RANLIB		= @RANLIB@
+PERL		= @PERL@
+XARGS		= @XARGS@
+
+OS_LIBS		= @OS_LIBS@
+
+RC		= @RC@
+DLLFLAGS	= @DLLFLAGS@
+
+NSPR_CFLAGS	= @NSPR_CFLAGS@
+NSPR_LIBS	= @NSPR_LIBS@
+
+DBM_CFLAGS	= @DBM_CFLAGS@
+DBM_LIBS	= @DBM_LIBS@
--- a/security/coreconf/command.mk
+++ b/security/coreconf/command.mk
@@ -31,24 +31,40 @@
 # GPL.
 #
 
 #######################################################################
 # Master "Core Components" default command macros;                    #
 # can be overridden in <arch>.mk                                      #
 #######################################################################
 
-AS            = $(CC)
-ASFLAGS      += $(CFLAGS)
 CCF           = $(CC) $(CFLAGS)
 LINK_DLL      = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
 LINK_EXE      = $(LINK) $(OS_LFLAGS) $(LFLAGS)
 NFSPWD        = $(NSINSTALL_DIR)/nfspwd
 CFLAGS       += $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
 		$(XCFLAGS)
-RANLIB        = echo
+CXXFLAGS       += $(DEFINES) $(INCLUDES) $(XCFLAGS)
 TAR           = /bin/tar
+
+NSINSTALL = $(NSINSTALL_DIR)/nsinstall
+ifeq ($(NSDISTMODE),copy)
+        # copy files, but preserve source mtime
+        INSTALL  = $(NSINSTALL)
+        INSTALL += -t
+else
+        ifeq ($(NSDISTMODE),absolute_symlink)
+                # install using absolute symbolic links
+                INSTALL  = $(NSINSTALL)
+                INSTALL += -L `$(NFSPWD)`
+        else
+                # install using relative symbolic links
+                INSTALL  = $(NSINSTALL)
+                INSTALL += -R
+        endif
+endif
+
 #
 # For purify
 #
 NOMD_CFLAGS  += $(OPTIMIZER) $(NOMD_OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
 		$(XCFLAGS)
 
--- a/security/coreconf/config.mk
+++ b/security/coreconf/config.mk
@@ -29,122 +29,99 @@
 # the GPL.  If you do not delete the provisions above, a recipient
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 # Configuration information for building in the "Core Components" source module
 #
 
 #######################################################################
-# [1.0] Master "Core Components" source and release <architecture>    #
-#       tags                                                          #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/arch.mk
-
-#######################################################################
-# [2.0] Master "Core Components" default command macros               #
+# [1.0] Master "Core Components" default command macros               #
 #       (NOTE: may be overridden in $(OS_CONFIG).mk)                  #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/command.mk
+include $(CORECONF_SOURCE)/command.mk
 
 #######################################################################
-# [3.0] Master "Core Components" <architecture>-specific macros       #
-#       (dependent upon <architecture> tags)                          #
-#                                                                     #
-#       We are moving towards just having a $(OS_TARGET).mk file      #
-#       as opposed to multiple $(OS_CONFIG).mk files, one for         #
-#       each OS release.                                              #
-#######################################################################
-
-ifeq (,$(filter-out BSD_OS NetBSD OS2,$(OS_TARGET)))
-include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
-else
-include $(CORE_DEPTH)/coreconf/$(OS_CONFIG).mk
-endif
-
-#######################################################################
-# [4.0] Master "Core Components" source and release <platform> tags   #
+# [2.0] Master "Core Components" source and release <platform> tags   #
 #       (dependent upon <architecture> tags)                          #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/platform.mk
+include $(CORECONF_SOURCE)/platform.mk
 
 #######################################################################
-# [5.0] Master "Core Components" release <tree> tags                  #
+# [3.0] Master "Core Components" release <tree> tags                  #
 #       (dependent upon <architecture> tags)                          #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/tree.mk
+include $(CORECONF_SOURCE)/tree.mk
 
 #######################################################################
-# [6.0] Master "Core Components" source and release <component> tags  #
+# [4.0] Master "Core Components" source and release <component> tags  #
 #       NOTE:  A component is also called a module or a subsystem.    #
 #       (dependent upon $(MODULE) being defined on the                #
 #        command line, as an environment variable, or in individual   #
 #        makefiles, or more appropriately, manifest.mn)               #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/module.mk
+include $(CORECONF_SOURCE)/module.mk
 
 #######################################################################
-# [7.0] Master "Core Components" release <version> tags               #
+# [5.0] Master "Core Components" release <version> tags               #
 #       (dependent upon $(MODULE) being defined on the                #
 #        command line, as an environment variable, or in individual   #
 #        makefiles, or more appropriately, manifest.mn)               #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/version.mk
+include $(CORECONF_SOURCE)/version.mk
 
 #######################################################################
-# [8.0] Master "Core Components" macros to figure out                 #
+# [6.0] Master "Core Components" macros to figure out                 #
 #       binary code location                                          #
 #       (dependent upon <platform> tags)                              #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/location.mk
+include $(CORECONF_SOURCE)/location.mk
 
 #######################################################################
-# [9.0] Master "Core Components" <component>-specific source path     #
+# [7.0] Master "Core Components" <component>-specific source path     #
 #       (dependent upon <user_source_tree>, <source_component>,       #
 #        <version>, and <platform> tags)                              #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/source.mk
+include $(CORECONF_SOURCE)/source.mk
 
 #######################################################################
-# [10.0] Master "Core Components" include switch for support header   #
+# [8.0] Master "Core Components" include switch for support header    #
 #        files                                                        #
 #        (dependent upon <tree>, <component>, <version>,              #
 #         and <platform> tags)                                        #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/headers.mk
+include $(CORECONF_SOURCE)/headers.mk
 
 #######################################################################
-# [11.0] Master "Core Components" for computing program prefixes      #
+# [9.0] Master "Core Components" for computing program prefixes       #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/prefix.mk
+include $(CORECONF_SOURCE)/prefix.mk
 
 #######################################################################
-# [12.0] Master "Core Components" for computing program suffixes      #
+# [10.0] Master "Core Components" for computing program suffixes      #
 #        (dependent upon <architecture> tags)                         #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/suffix.mk
+include $(CORECONF_SOURCE)/suffix.mk
 
 #######################################################################
-# [13.0] Master "Core Components" for defining JDK                    #
+# [11.0] Master "Core Components" for defining JDK                    #
 #        (dependent upon <architecture>, <source>, and <suffix>  tags)#
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/jdk.mk
+include $(CORECONF_SOURCE)/jdk.mk
 
 #######################################################################
-# [14.0] Master "Core Components" rule set                            #
+# [12.0] Master "Core Components" rule set                            #
 #        (should always be the last file included by config.mk)       #
 #######################################################################
 
-include $(CORE_DEPTH)/coreconf/ruleset.mk
--include $(MKDEPENDENCIES)
+include $(CORECONF_SOURCE)/ruleset.mk
 
--- a/security/coreconf/location.mk
+++ b/security/coreconf/location.mk
@@ -37,18 +37,27 @@
 
 #
 # Figure out where the binary code lives.
 #
 
 BUILD         = $(PLATFORM)
 OBJDIR        = $(PLATFORM)
 
-DIST          = $(CORE_DEPTH)/../dist/$(PLATFORM)
+DEPENDENCIES  = $(PLATFORM)/.md
+MKDEPEND_DIR = $(MOD_DEPTH)/coreconf/mkdepend
+MKDEPEND_SRCDIR = $(CORECONF_SOURCE)/mkdepend
+MKDEPEND = $(MKDEPEND_DIR)/mkdepend
+MKDEPENDENCIES = depend.mk
+NSINSTALL_DIR = $(MOD_DEPTH)/coreconf/nsinstall
 
-VPATH         = $(NSINSTALL_DIR)/$(PLATFORM)
-DEPENDENCIES  = $(PLATFORM)/.md
+ifeq ($(OS_ARCH),WINNT)
+NSINSTALL	= nsinstall
+MKDEPEND	= $(MKDEPEND_DIR)/mkdepend.exe
+endif
 
 ifdef BUILD_DEBUG_GC
 	DEFINES += -DDEBUG_GC
 endif
 
-GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
+GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*) vc20.pdb vc40.pdb
+BUILD_TOOLS = $(topsrcdir)/build/unix
+AUTOCONF_TOOLS = $(topsrcdir)/build/autoconf
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/.cvsignore
@@ -0,0 +1,1 @@
+Makefile
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/Makefile.in
@@ -0,0 +1,58 @@
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+# 
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+# 
+# The Original Code is the Netscape security libraries.
+# 
+# The Initial Developer of the Original Code is Netscape
+# Communications Corporation.  Portions created by Netscape are 
+# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
+# Rights Reserved.
+# 
+# Contributor(s):
+# 
+# Alternatively, the contents of this file may be used under the
+# terms of the GNU General Public License Version 2 or later (the
+# "GPL"), in which case the provisions of the GPL are applicable 
+# instead of those above.  If you wish to allow use of your 
+# version of this file only under the terms of the GPL and not to
+# allow others to use your version of this file under the MPL,
+# indicate your decision by deleting the provisions above and
+# replace them with the notice and other provisions required by
+# the GPL.  If you do not delete the provisions above, a recipient
+# may use your version of this file under either the MPL or the
+# GPL.
+#
+
+CORE_DEPTH	= ../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@:$(CORECONF_SOURCE)/mkdepend
+
+MODULE		= coreconf
+
+CSRCS		= \
+		cppsetup.c \
+		ifparser.c \
+		include.c \
+		main.c \
+		parse.c \
+		pr.c \
+		$(NULL)
+
+PROGRAM		= mkdepend
+
+include ../autoconf.mk
+include $(CORECONF_SOURCE)/config.mk
+
+include $(CORECONF_SOURCE)/rules.mk
+
+DEFINES         += -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".o\"
+
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/cppsetup.c
@@ -0,0 +1,244 @@
+/* $XConsortium: cppsetup.c,v 1.13 94/04/17 20:10:32 gildea Exp $ */
+/*
+
+Copyright (c) 1993, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#include "def.h"
+
+#ifdef	CPP
+/*
+ * This file is strictly for the sake of cpy.y and yylex.c (if
+ * you indeed have the source for cpp).
+ */
+#define IB 1
+#define SB 2
+#define NB 4
+#define CB 8
+#define QB 16
+#define WB 32
+#define SALT '#'
+#if pdp11 | vax | ns16000 | mc68000 | ibm032
+#define COFF 128
+#else
+#define COFF 0
+#endif
+/*
+ * These variables used by cpy.y and yylex.c
+ */
+extern char	*outp, *inp, *newp, *pend;
+extern char	*ptrtab;
+extern char	fastab[];
+extern char	slotab[];
+
+/*
+ * cppsetup
+ */
+struct filepointer	*currentfile;
+struct inclist		*currentinc;
+
+cppsetup(line, filep, inc)
+	register char	*line;
+	register struct filepointer	*filep;
+	register struct inclist		*inc;
+{
+	register char *p, savec;
+	static boolean setupdone = FALSE;
+	boolean	value;
+
+	if (!setupdone) {
+		cpp_varsetup();
+		setupdone = TRUE;
+	}
+
+	currentfile = filep;
+	currentinc = inc;
+	inp = newp = line;
+	for (p=newp; *p; p++)
+		;
+
+	/*
+	 * put a newline back on the end, and set up pend, etc.
+	 */
+	*p++ = '\n';
+	savec = *p;
+	*p = '\0';
+	pend = p;
+
+	ptrtab = slotab+COFF;
+	*--inp = SALT; 
+	outp=inp; 
+	value = yyparse();
+	*p = savec;
+	return(value);
+}
+
+struct symtab *lookup(symbol)
+	char	*symbol;
+{
+	static struct symtab    undefined;
+	struct symtab   *sp;
+
+	sp = isdefined(symbol, currentinc, NULL);
+	if (sp == NULL) {
+		sp = &undefined;
+		sp->s_value = NULL;
+	}
+	return (sp);
+}
+
+pperror(tag, x0,x1,x2,x3,x4)
+	int	tag,x0,x1,x2,x3,x4;
+{
+	warning("\"%s\", line %d: ", currentinc->i_file, currentfile->f_line);
+	warning(x0,x1,x2,x3,x4);
+}
+
+
+yyerror(s)
+	register char	*s;
+{
+	fatalerr("Fatal error: %s\n", s);
+}
+#else /* not CPP */
+
+#include "ifparser.h"
+struct _parse_data {
+    struct filepointer *filep;
+    struct inclist *inc;
+    const char *line;
+};
+
+static const char *
+_my_if_errors (ip, cp, expecting)
+    IfParser *ip;
+    const char *cp;
+    const char *expecting;
+{
+#ifdef DEBUG_MKDEPEND
+    struct _parse_data *pd = (struct _parse_data *) ip->data;
+    int lineno = pd->filep->f_line;
+    char *filename = pd->inc->i_file;
+    char prefix[300];
+    int prefixlen;
+    int i;
+
+    sprintf (prefix, "\"%s\":%d", filename, lineno);
+    prefixlen = strlen(prefix);
+    fprintf (stderr, "%s:  %s", prefix, pd->line);
+    i = cp - pd->line;
+    if (i > 0 && pd->line[i-1] != '\n') {
+	putc ('\n', stderr);
+    }
+    for (i += prefixlen + 3; i > 0; i--) {
+	putc (' ', stderr);
+    }
+    fprintf (stderr, "^--- expecting %s\n", expecting);
+#endif /* DEBUG_MKDEPEND */
+    return NULL;
+}
+
+
+#define MAXNAMELEN 256
+
+static struct symtab *
+_lookup_variable (ip, var, len)
+    IfParser *ip;
+    const char *var;
+    int len;
+{
+    char tmpbuf[MAXNAMELEN + 1];
+    struct _parse_data *pd = (struct _parse_data *) ip->data;
+
+    if (len > MAXNAMELEN)
+	return 0;
+
+    strncpy (tmpbuf, var, len);
+    tmpbuf[len] = '\0';
+    return isdefined (tmpbuf, pd->inc, NULL);
+}
+
+
+static int
+_my_eval_defined (ip, var, len)
+    IfParser *ip;
+    const char *var;
+    int len;
+{
+    if (_lookup_variable (ip, var, len))
+	return 1;
+    else
+	return 0;
+}
+
+#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
+
+static int
+_my_eval_variable (ip, var, len)
+    IfParser *ip;
+    const char *var;
+    int len;
+{
+    struct symtab *s;
+
+    s = _lookup_variable (ip, var, len);
+    if (!s)
+	return 0;
+    do {
+	var = s->s_value;
+	if (!isvarfirstletter(*var))
+	    break;
+	s = _lookup_variable (ip, var, strlen(var));
+    } while (s);
+
+    return atoi(var);
+}
+
+
+cppsetup(line, filep, inc)
+	register char	*line;
+	register struct filepointer	*filep;
+	register struct inclist		*inc;
+{
+    IfParser ip;
+    struct _parse_data pd;
+    int val = 0;
+
+    pd.filep = filep;
+    pd.inc = inc;
+    pd.line = line;
+    ip.funcs.handle_error = _my_if_errors;
+    ip.funcs.eval_defined = _my_eval_defined;
+    ip.funcs.eval_variable = _my_eval_variable;
+    ip.data = (char *) &pd;
+
+    (void) ParseIfExpression (&ip, line, &val);
+    if (val)
+	return IF;
+    else
+	return IFFALSE;
+}
+#endif /* CPP */
+
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/def.h
@@ -0,0 +1,150 @@
+/* $XConsortium: def.h,v 1.25 94/04/17 20:10:33 gildea Exp $ */
+/*
+
+Copyright (c) 1993, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#ifndef NO_X11
+#include <X11/Xosdefs.h>
+#ifdef WIN32
+#include <X11/Xw32defs.h>
+#endif
+#ifndef SUNOS4
+#include <X11/Xfuncproto.h>
+#endif /* SUNOS4 */
+#endif /* NO_X11 */
+
+#include <stdio.h>
+#include <ctype.h>
+#ifndef X_NOT_POSIX
+#ifndef _POSIX_SOURCE
+#define _POSIX_SOURCE
+#endif
+#endif
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define MAXDEFINES	512
+#define MAXFILES	1024  /* Increased from 512. -mcafee */
+#define MAXDIRS		64
+#define SYMTABINC	10	/* must be > 1 for define() to work right */
+#define	TRUE		1
+#define	FALSE		0
+
+/* the following must match the directives table in main.c */
+#define	IF		0
+#define	IFDEF		1
+#define	IFNDEF		2
+#define	ELSE		3
+#define	ENDIF		4
+#define	DEFINE		5
+#define	UNDEF		6
+#define	INCLUDE		7
+#define	LINE		8
+#define	PRAGMA		9
+#define ERROR           10
+#define IDENT           11
+#define SCCS            12
+#define ELIF            13
+#define EJECT           14
+#define IFFALSE         15     /* pseudo value --- never matched */
+#define ELIFFALSE       16     /* pseudo value --- never matched */
+#define INCLUDEDOT      17     /* pseudo value --- never matched */
+#define IFGUESSFALSE    18     /* pseudo value --- never matched */
+#define ELIFGUESSFALSE  19     /* pseudo value --- never matched */
+
+#ifdef DEBUG
+extern int	_debugmask;
+/*
+ * debug levels are:
+ * 
+ *     0	show ifn*(def)*,endif
+ *     1	trace defined/!defined
+ *     2	show #include
+ *     3	show #include SYMBOL
+ *     4-6	unused
+ */
+#define debug(level,arg) { if (_debugmask & (1 << level)) warning arg; }
+#else
+#define	debug(level,arg) /**/
+#endif /* DEBUG */
+
+typedef	unsigned char boolean;
+
+struct symtab {
+	char	*s_name;
+	char	*s_value;
+};
+
+struct	inclist {
+	char		*i_incstring;	/* string from #include line */
+	char		*i_file;	/* path name of the include file */
+	struct inclist	**i_list;	/* list of files it itself includes */
+	int		i_listlen;	/* length of i_list */
+	struct symtab	*i_defs;	/* symbol table for this file */
+	int		i_ndefs;	/* current # defines */
+	int		i_deflen;	/* amount of space in table */
+	boolean		i_defchecked;	/* whether defines have been checked */
+	boolean		i_notified;	/* whether we have revealed includes */
+	boolean		i_marked;	/* whether it's in the makefile */
+	boolean		i_searched;	/* whether we have read this */
+	boolean         i_included_sym; /* whether #include SYMBOL was found */
+					/* Can't use i_list if TRUE */
+};
+
+struct filepointer {
+	char	*f_p;
+	char	*f_base;
+	char	*f_end;
+	long	f_len;
+	long	f_line;
+};
+
+#ifndef X_NOT_STDC_ENV
+#include <stdlib.h>
+#if defined(macII) && !defined(__STDC__)  /* stdlib.h fails to define these */
+char *malloc(), *realloc();
+#endif /* macII */
+#else
+char			*malloc();
+char			*realloc();
+#endif
+
+char			*copy();
+char			*base_name();
+char			*getline();
+struct symtab		*slookup();
+struct symtab		*isdefined();
+struct symtab		*fdefined();
+struct filepointer	*getfile();
+struct inclist		*newinclude();
+struct inclist		*inc_path();
+
+#if NeedVarargsPrototypes
+extern fatalerr(char *, ...);
+extern warning(char *, ...);
+extern warning1(char *, ...);
+#endif
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/ifparser.c
@@ -0,0 +1,458 @@
+/*
+ * $XConsortium: ifparser.c,v 1.8 95/06/03 00:01:41 gildea Exp $
+ *
+ * Copyright 1992 Network Computing Devices, Inc.
+ * 
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Network Computing Devices may not be
+ * used in advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission.  Network Computing Devices makes
+ * no representations about the suitability of this software for any purpose.
+ * It is provided ``as is'' without express or implied warranty.
+ * 
+ * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ * 
+ * Author:  Jim Fulton
+ *          Network Computing Devices, Inc.
+ * 
+ * Simple if statement processor
+ *
+ * This module can be used to evaluate string representations of C language
+ * if constructs.  It accepts the following grammar:
+ * 
+ *     EXPRESSION	:=	VALUE
+ * 			 |	VALUE  BINOP	EXPRESSION
+ * 
+ *     VALUE		:=	'('  EXPRESSION  ')'
+ * 			 |	'!'  VALUE
+ * 			 |	'-'  VALUE
+ * 			 |	'defined'  '('  variable  ')'
+ * 			 |	'defined'  variable
+ *			 |	# variable '(' variable-list ')'
+ * 			 |	variable
+ * 			 |	number
+ * 
+ *     BINOP		:=	'*'	|  '/'	|  '%'
+ * 			 |	'+'	|  '-'
+ * 			 |	'<<'	|  '>>'
+ * 			 |	'<'	|  '>'	|  '<='  |  '>='
+ * 			 |	'=='	|  '!='
+ * 			 |	'&'	|  '|'
+ * 			 |	'&&'	|  '||'
+ * 
+ * The normal C order of precidence is supported.
+ * 
+ * 
+ * External Entry Points:
+ * 
+ *     ParseIfExpression		parse a string for #if
+ */
+
+#include "ifparser.h"
+#include <ctype.h>
+
+/****************************************************************************
+		   Internal Macros and Utilities for Parser
+ ****************************************************************************/
+
+#define DO(val) if (!(val)) return NULL
+#define CALLFUNC(ggg,fff) (*((ggg)->funcs.fff))
+#define SKIPSPACE(ccc) while (isspace(*ccc)) ccc++
+#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
+
+
+static const char *
+parse_variable (g, cp, varp)
+    IfParser *g;
+    const char *cp;
+    const char **varp;
+{
+    SKIPSPACE (cp);
+
+    if (!isvarfirstletter (*cp))
+	return CALLFUNC(g, handle_error) (g, cp, "variable name");
+
+    *varp = cp;
+    /* EMPTY */
+    for (cp++; isalnum(*cp) || *cp == '_'; cp++) ;
+    return cp;
+}
+
+
+static const char *
+parse_number (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    SKIPSPACE (cp);
+
+    if (!isdigit(*cp))
+	return CALLFUNC(g, handle_error) (g, cp, "number");
+
+#ifdef WIN32
+    *valp = strtol(cp, &cp, 0);
+#else
+    *valp = atoi (cp);
+    /* EMPTY */
+    for (cp++; isdigit(*cp); cp++) ;
+#endif
+    return cp;
+}
+
+
+static const char *
+parse_value (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    const char *var;
+
+    *valp = 0;
+
+    SKIPSPACE (cp);
+    if (!*cp)
+	return cp;
+
+    switch (*cp) {
+      case '(':
+	DO (cp = ParseIfExpression (g, cp + 1, valp));
+	SKIPSPACE (cp);
+	if (*cp != ')') 
+	    return CALLFUNC(g, handle_error) (g, cp, ")");
+
+	return cp + 1;			/* skip the right paren */
+
+      case '!':
+	DO (cp = parse_value (g, cp + 1, valp));
+	*valp = !(*valp);
+	return cp;
+
+      case '-':
+	DO (cp = parse_value (g, cp + 1, valp));
+	*valp = -(*valp);
+	return cp;
+
+      case '#':
+	DO (cp = parse_variable (g, cp + 1, &var));
+	SKIPSPACE (cp);
+	if (*cp != '(')
+	    return CALLFUNC(g, handle_error) (g, cp, "(");
+	do {
+	    DO (cp = parse_variable (g, cp + 1, &var));
+	    SKIPSPACE (cp);
+	} while (*cp && *cp != ')');
+	if (*cp != ')')
+	    return CALLFUNC(g, handle_error) (g, cp, ")");
+	*valp = 1; /* XXX */
+	return cp + 1;
+
+      case 'd':
+	if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) {
+	    int paren = 0;
+	    int len;
+
+	    cp += 7;
+	    SKIPSPACE (cp);
+	    if (*cp == '(') {
+		paren = 1;
+		cp++;
+	    }
+	    DO (cp = parse_variable (g, cp, &var));
+	    len = cp - var;
+	    SKIPSPACE (cp);
+	    if (paren && *cp != ')')
+		return CALLFUNC(g, handle_error) (g, cp, ")");
+	    *valp = (*(g->funcs.eval_defined)) (g, var, len);
+	    return cp + paren;		/* skip the right paren */
+	}
+	/* fall out */
+    }
+
+    if (isdigit(*cp)) {
+	DO (cp = parse_number (g, cp, valp));
+    } else if (!isvarfirstletter(*cp))
+	return CALLFUNC(g, handle_error) (g, cp, "variable or number");
+    else {
+	DO (cp = parse_variable (g, cp, &var));
+	*valp = (*(g->funcs.eval_variable)) (g, var, cp - var);
+    }
+    
+    return cp;
+}
+
+
+
+static const char *
+parse_product (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    int rightval;
+
+    DO (cp = parse_value (g, cp, valp));
+    SKIPSPACE (cp);
+
+    switch (*cp) {
+      case '*':
+	DO (cp = parse_product (g, cp + 1, &rightval));
+	*valp = (*valp * rightval);
+	break;
+
+      case '/':
+	DO (cp = parse_product (g, cp + 1, &rightval));
+
+	/* Do nothing in the divide-by-zero case. */
+	if (rightval) {
+		*valp = (*valp / rightval);
+	}
+	break;
+
+      case '%':
+	DO (cp = parse_product (g, cp + 1, &rightval));
+	*valp = (*valp % rightval);
+	break;
+    }
+    return cp;
+}
+
+
+static const char *
+parse_sum (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    int rightval;
+
+    DO (cp = parse_product (g, cp, valp));
+    SKIPSPACE (cp);
+
+    switch (*cp) {
+      case '+':
+	DO (cp = parse_sum (g, cp + 1, &rightval));
+	*valp = (*valp + rightval);
+	break;
+
+      case '-':
+	DO (cp = parse_sum (g, cp + 1, &rightval));
+	*valp = (*valp - rightval);
+	break;
+    }
+    return cp;
+}
+
+
+static const char *
+parse_shift (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    int rightval;
+
+    DO (cp = parse_sum (g, cp, valp));
+    SKIPSPACE (cp);
+
+    switch (*cp) {
+      case '<':
+	if (cp[1] == '<') {
+	    DO (cp = parse_shift (g, cp + 2, &rightval));
+	    *valp = (*valp << rightval);
+	}
+	break;
+
+      case '>':
+	if (cp[1] == '>') {
+	    DO (cp = parse_shift (g, cp + 2, &rightval));
+	    *valp = (*valp >> rightval);
+	}
+	break;
+    }
+    return cp;
+}
+
+
+static const char *
+parse_inequality (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    int rightval;
+
+    DO (cp = parse_shift (g, cp, valp));
+    SKIPSPACE (cp);
+
+    switch (*cp) {
+      case '<':
+	if (cp[1] == '=') {
+	    DO (cp = parse_inequality (g, cp + 2, &rightval));
+	    *valp = (*valp <= rightval);
+	} else {
+	    DO (cp = parse_inequality (g, cp + 1, &rightval));
+	    *valp = (*valp < rightval);
+	}
+	break;
+
+      case '>':
+	if (cp[1] == '=') {
+	    DO (cp = parse_inequality (g, cp + 2, &rightval));
+	    *valp = (*valp >= rightval);
+	} else {
+	    DO (cp = parse_inequality (g, cp + 1, &rightval));
+	    *valp = (*valp > rightval);
+	}
+	break;
+    }
+    return cp;
+}
+
+
+static const char *
+parse_equality (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    int rightval;
+
+    DO (cp = parse_inequality (g, cp, valp));
+    SKIPSPACE (cp);
+
+    switch (*cp) {
+      case '=':
+	if (cp[1] == '=')
+	    cp++;
+	DO (cp = parse_equality (g, cp + 1, &rightval));
+	*valp = (*valp == rightval);
+	break;
+
+      case '!':
+	if (cp[1] != '=')
+	    break;
+	DO (cp = parse_equality (g, cp + 2, &rightval));
+	*valp = (*valp != rightval);
+	break;
+    }
+    return cp;
+}
+
+
+static const char *
+parse_band (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    int rightval;
+
+    DO (cp = parse_equality (g, cp, valp));
+    SKIPSPACE (cp);
+
+    switch (*cp) {
+      case '&':
+	if (cp[1] != '&') {
+	    DO (cp = parse_band (g, cp + 1, &rightval));
+	    *valp = (*valp & rightval);
+	}
+	break;
+    }
+    return cp;
+}
+
+
+static const char *
+parse_bor (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    int rightval;
+
+    DO (cp = parse_band (g, cp, valp));
+    SKIPSPACE (cp);
+
+    switch (*cp) {
+      case '|':
+	if (cp[1] != '|') {
+	    DO (cp = parse_bor (g, cp + 1, &rightval));
+	    *valp = (*valp | rightval);
+	}
+	break;
+    }
+    return cp;
+}
+
+
+static const char *
+parse_land (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    int rightval;
+
+    DO (cp = parse_bor (g, cp, valp));
+    SKIPSPACE (cp);
+
+    switch (*cp) {
+      case '&':
+	if (cp[1] != '&')
+	    return CALLFUNC(g, handle_error) (g, cp, "&&");
+	DO (cp = parse_land (g, cp + 2, &rightval));
+	*valp = (*valp && rightval);
+	break;
+    }
+    return cp;
+}
+
+
+static const char *
+parse_lor (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    int rightval;
+
+    DO (cp = parse_land (g, cp, valp));
+    SKIPSPACE (cp);
+
+    switch (*cp) {
+      case '|':
+	if (cp[1] != '|')
+	    return CALLFUNC(g, handle_error) (g, cp, "||");
+	DO (cp = parse_lor (g, cp + 2, &rightval));
+	*valp = (*valp || rightval);
+	break;
+    }
+    return cp;
+}
+
+
+/****************************************************************************
+			     External Entry Points
+ ****************************************************************************/
+
+const char *
+ParseIfExpression (g, cp, valp)
+    IfParser *g;
+    const char *cp;
+    int *valp;
+{
+    return parse_lor (g, cp, valp);
+}
+
+
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/ifparser.h
@@ -0,0 +1,76 @@
+/*
+ * $XConsortium: ifparser.h,v 1.1 92/08/22 13:05:39 rws Exp $
+ *
+ * Copyright 1992 Network Computing Devices, Inc.
+ * 
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Network Computing Devices may not be
+ * used in advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission.  Network Computing Devices makes
+ * no representations about the suitability of this software for any purpose.
+ * It is provided ``as is'' without express or implied warranty.
+ * 
+ * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ * 
+ * Author:  Jim Fulton
+ *          Network Computing Devices, Inc.
+ * 
+ * Simple if statement processor
+ *
+ * This module can be used to evaluate string representations of C language
+ * if constructs.  It accepts the following grammar:
+ * 
+ *     EXPRESSION	:=	VALUE
+ * 			 |	VALUE  BINOP	EXPRESSION
+ * 
+ *     VALUE		:=	'('  EXPRESSION  ')'
+ * 			 |	'!'  VALUE
+ * 			 |	'-'  VALUE
+ * 			 |	'defined'  '('  variable  ')'
+ * 			 |	variable
+ * 			 |	number
+ * 
+ *     BINOP		:=	'*'	|  '/'	|  '%'
+ * 			 |	'+'	|  '-'
+ * 			 |	'<<'	|  '>>'
+ * 			 |	'<'	|  '>'	|  '<='  |  '>='
+ * 			 |	'=='	|  '!='
+ * 			 |	'&'	|  '|'
+ * 			 |	'&&'	|  '||'
+ * 
+ * The normal C order of precidence is supported.
+ * 
+ * 
+ * External Entry Points:
+ * 
+ *     ParseIfExpression		parse a string for #if
+ */
+
+#include <stdio.h>
+
+#define const /**/
+typedef int Bool;
+#define False 0
+#define True 1
+
+typedef struct _if_parser {
+    struct {				/* functions */
+	char *(*handle_error) (/* struct _if_parser *, const char *,
+				 const char * */);
+	int (*eval_variable) (/* struct _if_parser *, const char *, int */);
+	int (*eval_defined) (/* struct _if_parser *, const char *, int */);
+    } funcs;
+    char *data;
+} IfParser;
+
+char *ParseIfExpression (/* IfParser *, const char *, int * */);
+
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/imakemdep.h
@@ -0,0 +1,730 @@
+
+/* $XConsortium: imakemdep.h,v 1.83 95/04/07 19:47:46 kaleb Exp $ */
+/* $XFree86: xc/config/imake/imakemdep.h,v 3.12 1995/07/08 10:22:17 dawes Exp $ */
+/*
+
+Copyright (c) 1993, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+
+/* 
+ * This file contains machine-dependent constants for the imake utility.
+ * When porting imake, read each of the steps below and add in any necessary
+ * definitions.  In general you should *not* edit ccimake.c or imake.c!
+ */
+
+#ifdef CCIMAKE
+/*
+ * Step 1:  imake_ccflags
+ *     Define any special flags that will be needed to get imake.c to compile.
+ *     These will be passed to the compile along with the contents of the
+ *     make variable BOOTSTRAPCFLAGS.
+ */
+#ifdef hpux
+#ifdef hp9000s800
+#define imake_ccflags "-DSYSV"
+#else
+#define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
+#endif
+#endif
+
+#if defined(macII) || defined(_AUX_SOURCE)
+#define imake_ccflags "-DmacII -DSYSV"
+#endif
+
+#ifdef stellar
+#define imake_ccflags "-DSYSV"
+#endif
+
+#if defined(USL) || defined(Oki) || defined(NCR)
+#define imake_ccflags "-Xc -DSVR4"
+#endif
+
+#ifdef sony
+#if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
+#define imake_ccflags "-DSVR4"
+#else
+#include <sys/param.h>
+#if NEWSOS < 41
+#define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
+#else
+#if NEWSOS < 42
+#define imake_ccflags "-Dbsd43"
+#endif
+#endif
+#endif
+#endif
+
+#ifdef _CRAY
+#define imake_ccflags "-DSYSV -DUSG"
+#endif
+
+#if defined(_IBMR2) || defined(aix)
+#define imake_ccflags "-Daix -DSYSV"
+#endif
+
+#ifdef Mips
+#  if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
+#    define imake_ccflags "-DBSD43"
+#  else 
+#    define imake_ccflags "-DSYSV"
+#  endif
+#endif 
+
+#ifdef is68k
+#define imake_ccflags "-Dluna -Duniosb"
+#endif
+
+#ifdef SYSV386
+# ifdef SVR4
+#  define imake_ccflags "-Xc -DSVR4"
+# else
+#  define imake_ccflags "-DSYSV"
+# endif
+#endif
+
+#ifdef SVR4
+# ifdef i386
+#  define imake_ccflags "-Xc -DSVR4"
+# endif
+#endif
+
+#ifdef SYSV
+# ifdef i386
+#  define imake_ccflags "-DSYSV"
+# endif
+#endif
+
+#ifdef __convex__
+#define imake_ccflags "-fn -tm c1"
+#endif
+
+#ifdef apollo
+#define imake_ccflags "-DX_NOT_POSIX"
+#endif
+
+#ifdef WIN32
+#define imake_ccflags "-nologo -batch -D__STDC__"
+#endif
+
+#ifdef __uxp__
+#define imake_ccflags "-DSVR4 -DANSICPP"
+#endif
+
+#ifdef __sxg__
+#define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
+#endif
+
+#ifdef sequent
+#define imake_ccflags "-DX_NOT_STDC_ENV -DX_NOT_POSIX"
+#endif
+
+#ifdef _SEQUENT_
+#define imake_ccflags "-DSYSV -DUSG"
+#endif
+
+#if defined(SX) || defined(PC_UX)
+#define imake_ccflags "-DSYSV"
+#endif
+
+#ifdef nec_ews_svr2
+#define imake_ccflags "-DUSG"
+#endif
+
+#if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
+#define imake_ccflags "-DSVR4"
+#endif
+
+#ifdef	MACH
+#define imake_ccflags "-DNOSTDHDRS"
+#endif
+
+/* this is for OS/2 under EMX. This won't work with DOS */
+#if defined(__EMX__) 
+#define imake_ccflags "-DBSD43"
+#endif
+
+#else /* not CCIMAKE */
+#ifndef MAKEDEPEND
+/*
+ * Step 2:  dup2
+ *     If your OS doesn't have a dup2() system call to duplicate one file
+ *     descriptor onto another, define such a mechanism here (if you don't
+ *     already fall under the existing category(ies).
+ */
+#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_)
+#define	dup2(fd1,fd2)	((fd1 == fd2) ? fd1 : (close(fd2), \
+					       fcntl(fd1, F_DUPFD, fd2)))
+#endif
+
+
+/*
+ * Step 3:  FIXUP_CPP_WHITESPACE
+ *     If your cpp collapses tabs macro expansions into a single space and
+ *     replaces escaped newlines with a space, define this symbol.  This will
+ *     cause imake to attempt to patch up the generated Makefile by looking
+ *     for lines that have colons in them (this is why the rules file escapes
+ *     all colons).  One way to tell if you need this is to see whether or not
+ *     your Makefiles have no tabs in them and lots of @@ strings.
+ */
+#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || (defined(AMOEBA) && defined(CROSS_COMPILE))
+#define FIXUP_CPP_WHITESPACE
+#endif
+#ifdef WIN32
+#define REMOVE_CPP_LEADSPACE
+#define INLINE_SYNTAX
+#define MAGIC_MAKE_VARS
+#endif
+#ifdef __minix_vmd
+#define FIXUP_CPP_WHITESPACE
+#endif
+
+/*
+ * Step 4:  USE_CC_E, DEFAULT_CC, DEFAULT_CPP
+ *     If you want to use cc -E instead of cpp, define USE_CC_E.
+ *     If use cc -E but want a different compiler, define DEFAULT_CC.
+ *     If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
+ */
+#ifdef hpux
+#define USE_CC_E
+#endif
+#ifdef WIN32
+#define USE_CC_E
+#define DEFAULT_CC "cl"
+#endif
+#ifdef apollo
+#define DEFAULT_CPP "/usr/lib/cpp"
+#endif
+#if defined(_IBMR2) && !defined(DEFAULT_CPP)
+#define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp"
+#endif
+#if defined(sun) && defined(SVR4)
+#define DEFAULT_CPP "/usr/ccs/lib/cpp"
+#endif
+#ifdef __bsdi__
+#define DEFAULT_CPP "/usr/bin/cpp"
+#endif
+#ifdef __uxp__
+#define DEFAULT_CPP "/usr/ccs/lib/cpp"
+#endif
+#ifdef __sxg__
+#define DEFAULT_CPP "/usr/lib/cpp"
+#endif
+#ifdef _CRAY
+#define DEFAULT_CPP "/lib/pcpp"
+#endif
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#define DEFAULT_CPP "/usr/libexec/cpp"
+#endif
+#ifdef	MACH
+#define USE_CC_E
+#endif
+#ifdef __minix_vmd
+#define DEFAULT_CPP "/usr/lib/cpp"
+#endif
+#if defined(__EMX__)
+/* expects cpp in PATH */
+#define DEFAULT_CPP "cpp"
+#endif
+
+/*
+ * Step 5:  cpp_argv
+ *     The following table contains the flags that should be passed
+ *     whenever a Makefile is being generated.  If your preprocessor 
+ *     doesn't predefine any unique symbols, choose one and add it to the
+ *     end of this table.  Then, do the following:
+ * 
+ *         a.  Use this symbol in Imake.tmpl when setting MacroFile.
+ *         b.  Put this symbol in the definition of BootstrapCFlags in your
+ *             <platform>.cf file.
+ *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol" 
+ *             to the end of the command line.
+ * 
+ *     Note that you may define more than one symbol (useful for platforms 
+ *     that support multiple operating systems).
+ */
+
+#define	ARGUMENTS 50	/* number of arguments in various arrays */
+char *cpp_argv[ARGUMENTS] = {
+	"cc",		/* replaced by the actual program to exec */
+	"-I.",		/* add current directory to include path */
+#ifdef unix
+	"-Uunix",	/* remove unix symbol so that filename unix.c okay */
+#endif
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(MACH)
+# ifdef __i386__
+	"-D__i386__",
+# endif
+# ifdef __GNUC__
+	"-traditional",
+# endif
+#endif
+#ifdef M4330
+	"-DM4330",	/* Tektronix */
+#endif
+#ifdef M4310
+	"-DM4310",	/* Tektronix */
+#endif
+#if defined(macII) || defined(_AUX_SOURCE)
+	"-DmacII",	/* Apple A/UX */
+#endif
+#ifdef USL
+	"-DUSL",	/* USL */
+#endif
+#ifdef sony
+	"-Dsony",	/* Sony */
+#if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
+	"-Dbsd43",
+#endif
+#endif
+#ifdef _IBMR2
+	"-D_IBMR2",	/* IBM RS-6000 (we ensured that aix is defined above */
+#ifndef aix
+#define aix		/* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
+#endif
+#endif /* _IBMR2 */
+#ifdef aix
+	"-Daix",	/* AIX instead of AOS */
+#ifndef ibm
+#define ibm		/* allow BOOTSTRAPCFLAGS="-Daix" */
+#endif
+#endif /* aix */
+#ifdef ibm
+	"-Dibm",	/* IBM PS/2 and RT under both AOS and AIX */
+#endif
+#ifdef luna
+	"-Dluna",	/* OMRON luna 68K and 88K */
+#ifdef luna1
+	"-Dluna1",
+#endif
+#ifdef luna88k		/* need not on UniOS-Mach Vers. 1.13 */
+	"-traditional", /* for some older version            */
+#endif			/* instead of "-DXCOMM=\\#"          */
+#ifdef uniosb
+	"-Duniosb",
+#endif
+#ifdef uniosu
+	"-Duniosu",
+#endif
+#endif /* luna */
+#ifdef _CRAY		/* Cray */
+	"-Ucray",
+#endif
+#ifdef Mips
+	"-DMips",	/* Define and use Mips for Mips Co. OS/mach. */
+# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
+	"-DBSD43",	/* Mips RISCOS supports two environments */
+# else
+	"-DSYSV",	/* System V environment is the default */
+# endif
+#endif /* Mips */
+#ifdef MOTOROLA
+	"-DMOTOROLA",    /* Motorola Delta Systems */
+# ifdef SYSV
+	"-DSYSV", 
+# endif
+# ifdef SVR4
+	"-DSVR4",
+# endif
+#endif /* MOTOROLA */
+#ifdef i386
+	"-Di386",
+# ifdef SVR4
+	"-DSVR4",
+# endif
+# ifdef SYSV
+	"-DSYSV",
+#  ifdef ISC
+	"-DISC",
+#   ifdef ISC40
+	"-DISC40",       /* ISC 4.0 */
+#   else
+#    ifdef ISC202
+	"-DISC202",      /* ISC 2.0.2 */
+#    else
+#     ifdef ISC30
+	"-DISC30",       /* ISC 3.0 */
+#     else
+	"-DISC22",       /* ISC 2.2.1 */
+#     endif
+#    endif
+#   endif
+#  endif
+#  ifdef SCO
+	"-DSCO",
+#   ifdef SCO324
+	"-DSCO324",
+#   endif
+#  endif
+# endif
+# ifdef ESIX
+	"-DESIX",
+# endif
+# ifdef ATT
+	"-DATT",
+# endif
+# ifdef DELL
+	"-DDELL",
+# endif
+#endif
+#ifdef SYSV386           /* System V/386 folks, obsolete */
+	"-Di386",
+# ifdef SVR4
+	"-DSVR4",
+# endif
+# ifdef ISC
+	"-DISC",
+#  ifdef ISC40
+	"-DISC40",       /* ISC 4.0 */
+#  else
+#   ifdef ISC202
+	"-DISC202",      /* ISC 2.0.2 */
+#   else
+#    ifdef ISC30
+	"-DISC30",       /* ISC 3.0 */
+#    else
+	"-DISC22",       /* ISC 2.2.1 */
+#    endif
+#   endif
+#  endif
+# endif
+# ifdef SCO
+	"-DSCO",
+#  ifdef SCO324
+	"-DSCO324",
+#  endif
+# endif
+# ifdef ESIX
+	"-DESIX",
+# endif
+# ifdef ATT
+	"-DATT",
+# endif
+# ifdef DELL
+	"-DDELL",
+# endif
+#endif
+#ifdef __osf__
+	"-D__osf__",
+# ifdef __mips__
+	"-D__mips__",
+# endif
+# ifdef __alpha
+	"-D__alpha",
+# endif
+# ifdef __i386__
+	"-D__i386__",
+# endif
+# ifdef __GNUC__
+	"-traditional",
+# endif
+#endif
+#ifdef Oki
+	"-DOki",
+#endif
+#ifdef sun
+#ifdef SVR4
+	"-DSVR4",
+#endif
+#endif
+#ifdef WIN32
+	"-DWIN32",
+	"-nologo",
+	"-batch",
+	"-D__STDC__",
+#endif
+#ifdef NCR
+	"-DNCR",	/* NCR */
+#endif
+#ifdef linux
+        "-traditional",
+        "-Dlinux",
+#endif
+#ifdef __uxp__
+	"-D__uxp__",
+#endif
+#ifdef __sxg__
+	"-D__sxg__",
+#endif
+#ifdef nec_ews_svr2
+	"-Dnec_ews_svr2",
+#endif
+#ifdef AMOEBA
+	"-DAMOEBA",
+# ifdef CROSS_COMPILE
+	"-DCROSS_COMPILE",
+#  ifdef CROSS_i80386
+	"-Di80386",
+#  endif
+#  ifdef CROSS_sparc
+	"-Dsparc",
+#  endif
+#  ifdef CROSS_mc68000
+	"-Dmc68000",
+#  endif
+# else
+#  ifdef i80386
+	"-Di80386",
+#  endif
+#  ifdef sparc
+	"-Dsparc",
+#  endif
+#  ifdef mc68000
+	"-Dmc68000",
+#  endif
+# endif
+#endif
+#ifdef __minix_vmd
+        "-Dminix",
+#endif
+
+#if defined(__EMX__)
+	"-traditional",
+	"-Demxos2",
+#endif
+
+};
+#else /* else MAKEDEPEND */
+/*
+ * Step 6:  predefs
+ *     If your compiler and/or preprocessor define any specific symbols, add
+ *     them to the the following table.  The definition of struct symtab is
+ *     in util/makedepend/def.h.
+ */
+struct symtab	predefs[] = {
+#ifdef apollo
+	{"apollo", "1"},
+#endif
+#ifdef ibm032
+	{"ibm032", "1"},
+#endif
+#ifdef ibm
+	{"ibm", "1"},
+#endif
+#ifdef aix
+	{"aix", "1"},
+#endif
+#ifdef sun
+	{"sun", "1"},
+#endif
+#ifdef sun2
+	{"sun2", "1"},
+#endif
+#ifdef sun3
+	{"sun3", "1"},
+#endif
+#ifdef sun4
+	{"sun4", "1"},
+#endif
+#ifdef sparc
+	{"sparc", "1"},
+#endif
+#ifdef __sparc__
+	{"__sparc__", "1"},
+#endif
+#ifdef hpux
+	{"hpux", "1"},
+#endif
+#ifdef __hpux
+	{"__hpux", "1"},
+#endif
+#ifdef __hp9000s800
+	{"__hp9000s800", "1"},
+#endif
+#ifdef __hp9000s700
+	{"__hp9000s700", "1"},
+#endif
+#ifdef vax
+	{"vax", "1"},
+#endif
+#ifdef VMS
+	{"VMS", "1"},
+#endif
+#ifdef cray
+	{"cray", "1"},
+#endif
+#ifdef CRAY
+	{"CRAY", "1"},
+#endif
+#ifdef _CRAY
+	{"_CRAY", "1"},
+#endif
+#ifdef att
+	{"att", "1"},
+#endif
+#ifdef mips
+	{"mips", "1"},
+#endif
+#ifdef __mips__
+	{"__mips__", "1"},
+#endif
+#ifdef ultrix
+	{"ultrix", "1"},
+#endif
+#ifdef stellar
+	{"stellar", "1"},
+#endif
+#ifdef mc68000
+	{"mc68000", "1"},
+#endif
+#ifdef mc68020
+	{"mc68020", "1"},
+#endif
+#ifdef __GNUC__
+	{"__GNUC__", "1"},
+#endif
+#if __STDC__
+	{"__STDC__", "1"},
+#endif
+#ifdef __HIGHC__
+	{"__HIGHC__", "1"},
+#endif
+#ifdef CMU
+	{"CMU", "1"},
+#endif
+#ifdef luna
+	{"luna", "1"},
+#ifdef luna1
+	{"luna1", "1"},
+#endif
+#ifdef luna2
+	{"luna2", "1"},
+#endif
+#ifdef luna88k
+	{"luna88k", "1"},
+#endif
+#ifdef uniosb
+	{"uniosb", "1"},
+#endif
+#ifdef uniosu
+	{"uniosu", "1"},
+#endif
+#endif
+#ifdef ieeep754
+	{"ieeep754", "1"},
+#endif
+#ifdef is68k
+	{"is68k", "1"},
+#endif
+#ifdef m68k
+        {"m68k", "1"},
+#endif
+#ifdef m88k
+        {"m88k", "1"},
+#endif
+#ifdef __m88k__
+	{"__m88k__", "1"},
+#endif
+#ifdef bsd43
+	{"bsd43", "1"},
+#endif
+#ifdef hcx
+	{"hcx", "1"},
+#endif
+#ifdef sony
+	{"sony", "1"},
+#ifdef SYSTYPE_SYSV
+	{"SYSTYPE_SYSV", "1"},
+#endif
+#ifdef _SYSTYPE_SYSV
+	{"_SYSTYPE_SYSV", "1"},
+#endif
+#endif
+#ifdef __OSF__
+	{"__OSF__", "1"},
+#endif
+#ifdef __osf__
+	{"__osf__", "1"},
+#endif
+#ifdef __alpha
+	{"__alpha", "1"},
+#endif
+#ifdef __DECC
+	{"__DECC",  "1"},
+#endif
+#ifdef __decc
+	{"__decc",  "1"},
+#endif
+#ifdef __uxp__
+	{"__uxp__", "1"},
+#endif
+#ifdef __sxg__
+	{"__sxg__", "1"},
+#endif
+#ifdef _SEQUENT_
+	{"_SEQUENT_", "1"},
+	{"__STDC__", "1"},
+#endif
+#ifdef __bsdi__
+	{"__bsdi__", "1"},
+#endif
+#ifdef nec_ews_svr2
+	{"nec_ews_svr2", "1"},
+#endif
+#ifdef nec_ews_svr4
+	{"nec_ews_svr4", "1"},
+#endif
+#ifdef _nec_ews_svr4
+	{"_nec_ews_svr4", "1"},
+#endif
+#ifdef _nec_up
+	{"_nec_up", "1"},
+#endif
+#ifdef SX
+	{"SX", "1"},
+#endif
+#ifdef nec
+	{"nec", "1"},
+#endif
+#ifdef _nec_ft
+	{"_nec_ft", "1"},
+#endif
+#ifdef PC_UX
+	{"PC_UX", "1"},
+#endif
+#ifdef sgi
+	{"sgi", "1"},
+#endif
+#ifdef __sgi
+	{"__sgi", "1"},
+#endif
+#ifdef __FreeBSD__
+	{"__FreeBSD__", "1"},
+#endif
+#ifdef __NetBSD__
+	{"__NetBSD__", "1"},
+#endif
+#ifdef __OpenBSD__
+	{"__OpenBSD__", "1"},
+#endif
+#ifdef __EMX__
+	{"__EMX__", "1"},
+#endif
+	/* add any additional symbols before this line */
+	{NULL, NULL}
+};
+
+#endif /* MAKEDEPEND */
+#endif /* CCIMAKE */
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/include.c
@@ -0,0 +1,308 @@
+/* $XConsortium: include.c,v 1.17 94/12/05 19:33:08 gildea Exp $ */
+/*
+
+Copyright (c) 1993, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+
+#include "def.h"
+
+extern struct	inclist	inclist[ MAXFILES ],
+			*inclistp;
+extern char	*includedirs[ ];
+extern char	*notdotdot[ ];
+extern boolean show_where_not;
+extern boolean warn_multiple;
+
+struct inclist *inc_path(file, include, dot)
+	register char	*file,
+			*include;
+	boolean	dot;
+{
+	static char	path[ BUFSIZ ];
+	register char		**pp, *p;
+	register struct inclist	*ip;
+	struct stat	st;
+	boolean	found = FALSE;
+
+	/*
+	 * Check all previously found include files for a path that
+	 * has already been expanded.
+	 */
+	for (ip = inclist; ip->i_file; ip++)
+	    if ((strcmp(ip->i_incstring, include) == 0) && !ip->i_included_sym)
+	    {
+		found = TRUE;
+		break;
+	    }
+
+	/*
+	 * If the path was surrounded by "" or is an absolute path,
+	 * then check the exact path provided.
+	 */
+	if (!found && (dot || *include == '/')) {
+		if (stat(include, &st) == 0) {
+			ip = newinclude(include, include);
+			found = TRUE;
+		}
+		else if (show_where_not)
+			warning1("\tnot in %s\n", include);
+	}
+
+	/*
+	 * See if this include file is in the directory of the
+	 * file being compiled.
+	 */
+	if (!found) {
+		for (p=file+strlen(file); p>file; p--)
+			if (*p == '/')
+				break;
+		if (p == file)
+			strcpy(path, include);
+		else {
+			strncpy(path, file, (p-file) + 1);
+			path[ (p-file) + 1 ] = '\0';
+			strcpy(path + (p-file) + 1, include);
+		}
+		remove_dotdot(path);
+		if (stat(path, &st) == 0) {
+			ip = newinclude(path, include);
+			found = TRUE;
+		}
+		else if (show_where_not)
+			warning1("\tnot in %s\n", path);
+	}
+
+	/*
+	 * Check the include directories specified. (standard include dir
+	 * should be at the end.)
+	 */
+	if (!found)
+		for (pp = includedirs; *pp; pp++) {
+			sprintf(path, "%s/%s", *pp, include);
+			remove_dotdot(path);
+			if (stat(path, &st) == 0) {
+				ip = newinclude(path, include);
+				found = TRUE;
+				break;
+			}
+			else if (show_where_not)
+				warning1("\tnot in %s\n", path);
+		}
+
+	if (!found)
+		ip = NULL;
+	return(ip);
+}
+
+/*
+ * Occasionally, pathnames are created that look like .../x/../y
+ * Any of the 'x/..' sequences within the name can be eliminated.
+ * (but only if 'x' is not a symbolic link!!)
+ */
+remove_dotdot(path)
+	char	*path;
+{
+	register char	*end, *from, *to, **cp;
+	char		*components[ MAXFILES ],
+			newpath[ BUFSIZ ];
+	boolean		component_copied;
+
+	/*
+	 * slice path up into components.
+	 */
+	to = newpath;
+	if (*path == '/')
+		*to++ = '/';
+	*to = '\0';
+	cp = components;
+	for (from=end=path; *end; end++)
+		if (*end == '/') {
+			while (*end == '/')
+				*end++ = '\0';
+			if (*from)
+				*cp++ = from;
+			from = end;
+		}
+	*cp++ = from;
+	*cp = NULL;
+
+	/*
+	 * Recursively remove all 'x/..' component pairs.
+	 */
+	cp = components;
+	while(*cp) {
+		if (!isdot(*cp) && !isdotdot(*cp) && isdotdot(*(cp+1))
+		    && !issymbolic(newpath, *cp))
+		{
+		    char **fp = cp + 2;
+		    char **tp = cp;
+
+		    do 
+			*tp++ = *fp; /* move all the pointers down */
+		    while (*fp++);
+		    if (cp != components)
+			cp--;	/* go back and check for nested ".." */
+		} else {
+		    cp++;
+		}
+	}
+	/*
+	 * Concatenate the remaining path elements.
+	 */
+	cp = components;
+	component_copied = FALSE;
+	while(*cp) {
+		if (component_copied)
+			*to++ = '/';
+		component_copied = TRUE;
+		for (from = *cp; *from; )
+			*to++ = *from++;
+		*to = '\0';
+		cp++;
+	}
+	*to++ = '\0';
+
+	/*
+	 * copy the reconstituted path back to our pointer.
+	 */
+	strcpy(path, newpath);
+}
+
+isdot(p)
+	register char	*p;
+{
+	if(p && *p++ == '.' && *p++ == '\0')
+		return(TRUE);
+	return(FALSE);
+}
+
+isdotdot(p)
+	register char	*p;
+{
+	if(p && *p++ == '.' && *p++ == '.' && *p++ == '\0')
+		return(TRUE);
+	return(FALSE);
+}
+
+issymbolic(dir, component)
+	register char	*dir, *component;
+{
+#ifdef S_IFLNK
+	struct stat	st;
+	char	buf[ BUFSIZ ], **pp;
+
+	sprintf(buf, "%s%s%s", dir, *dir ? "/" : "", component);
+	for (pp=notdotdot; *pp; pp++)
+		if (strcmp(*pp, buf) == 0)
+			return (TRUE);
+	if (lstat(buf, &st) == 0
+	&& (st.st_mode & S_IFMT) == S_IFLNK) {
+		*pp++ = copy(buf);
+		if (pp >= &notdotdot[ MAXDIRS ])
+			fatalerr("out of .. dirs, increase MAXDIRS\n");
+		return(TRUE);
+	}
+#endif
+	return(FALSE);
+}
+
+/*
+ * Add an include file to the list of those included by 'file'.
+ */
+struct inclist *newinclude(newfile, incstring)
+	register char	*newfile, *incstring;
+{
+	register struct inclist	*ip;
+
+	/*
+	 * First, put this file on the global list of include files.
+	 */
+	ip = inclistp++;
+	if (inclistp == inclist + MAXFILES - 1)
+		fatalerr("out of space: increase MAXFILES\n");
+	ip->i_file = copy(newfile);
+	ip->i_included_sym = FALSE;
+	if (incstring == NULL)
+		ip->i_incstring = ip->i_file;
+	else
+		ip->i_incstring = copy(incstring);
+
+	return(ip);
+}
+
+included_by(ip, newfile)
+	register struct inclist	*ip, *newfile;
+{
+	register i;
+
+	if (ip == NULL)
+		return;
+	/*
+	 * Put this include file (newfile) on the list of files included
+	 * by 'file'.  If 'file' is NULL, then it is not an include
+	 * file itself (i.e. was probably mentioned on the command line).
+	 * If it is already on the list, don't stick it on again.
+	 */
+	if (ip->i_list == NULL)
+		ip->i_list = (struct inclist **)
+			malloc(sizeof(struct inclist *) * ++ip->i_listlen);
+	else {
+		for (i=0; i<ip->i_listlen; i++)
+			if (ip->i_list[ i ] == newfile) {
+			    i = strlen(newfile->i_file);
+			    if (!ip->i_included_sym &&
+				!(i > 2 &&
+				  newfile->i_file[i-1] == 'c' &&
+				  newfile->i_file[i-2] == '.'))
+			    {
+				/* only complain if ip has */
+				/* no #include SYMBOL lines  */
+				/* and is not a .c file */
+				if (warn_multiple)
+				{
+					warning("%s includes %s more than once!\n",
+						ip->i_file, newfile->i_file);
+					warning1("Already have\n");
+					for (i=0; i<ip->i_listlen; i++)
+						warning1("\t%s\n", ip->i_list[i]->i_file);
+				}
+			    }
+			    return;
+			}
+		ip->i_list = (struct inclist **) realloc(ip->i_list,
+			sizeof(struct inclist *) * ++ip->i_listlen);
+	}
+	ip->i_list[ ip->i_listlen-1 ] = newfile;
+}
+
+inc_clean ()
+{
+	register struct inclist *ip;
+
+	for (ip = inclist; ip < inclistp; ip++) {
+		ip->i_marked = FALSE;
+	}
+}
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/main.c
@@ -0,0 +1,710 @@
+/* $XConsortium: main.c,v 1.84 94/11/30 16:10:44 kaleb Exp $ */
+/* $XFree86: xc/config/makedepend/main.c,v 3.4 1995/07/15 14:53:49 dawes Exp $ */
+/*
+
+Copyright (c) 1993, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#include "def.h"
+#ifdef hpux
+#define sigvec sigvector
+#endif /* hpux */
+
+#ifdef X_POSIX_C_SOURCE
+#define _POSIX_C_SOURCE X_POSIX_C_SOURCE
+#include <signal.h>
+#undef _POSIX_C_SOURCE
+#else
+#if defined(X_NOT_POSIX) || defined(_POSIX_SOURCE)
+#include <signal.h>
+#else
+#define _POSIX_SOURCE
+#include <signal.h>
+#undef _POSIX_SOURCE
+#endif
+#endif
+
+#if NeedVarargsPrototypes
+#include <stdarg.h>
+#endif
+
+#ifdef MINIX
+#define USE_CHMOD	1
+#endif
+
+#ifdef DEBUG
+int	_debugmask;
+#endif
+
+char *ProgramName;
+
+char	*directives[] = {
+	"if",
+	"ifdef",
+	"ifndef",
+	"else",
+	"endif",
+	"define",
+	"undef",
+	"include",
+	"line",
+	"pragma",
+	"error",
+	"ident",
+	"sccs",
+	"elif",
+	"eject",
+	NULL
+};
+
+#define MAKEDEPEND
+#include "imakemdep.h"	/* from config sources */
+#undef MAKEDEPEND
+
+struct	inclist inclist[ MAXFILES ],
+		*inclistp = inclist,
+		maininclist;
+
+char	*filelist[ MAXFILES ];
+char	*includedirs[ MAXDIRS + 1 ];
+char	*notdotdot[ MAXDIRS ];
+char	*objprefix = "";
+char	*objsuffix = OBJSUFFIX;
+char	*startat = "# DO NOT DELETE";
+int	width = 78;
+boolean	append = FALSE;
+boolean	printed = FALSE;
+boolean	verbose = FALSE;
+boolean	show_where_not = FALSE;
+boolean warn_multiple = FALSE;	/* Warn on multiple includes of same file */
+
+static
+#ifdef SIGNALRETURNSINT
+int
+#else
+void
+#endif
+catch (sig)
+    int sig;
+{
+	fflush (stdout);
+	fatalerr ("got signal %d\n", sig);
+}
+
+#if defined(USG) || (defined(i386) && defined(SYSV)) || defined(WIN32) || defined(__EMX__) || defined(Lynx_22)
+#define USGISH
+#endif
+
+#ifndef USGISH
+#ifndef _POSIX_SOURCE
+#define sigaction sigvec
+#define sa_handler sv_handler
+#define sa_mask sv_mask
+#define sa_flags sv_flags
+#endif
+struct sigaction sig_act;
+#endif /* USGISH */
+
+main(argc, argv)
+	int	argc;
+	char	**argv;
+{
+	register char	**fp = filelist;
+	register char	**incp = includedirs;
+	register char	*p;
+	register struct inclist	*ip;
+	char	*makefile = NULL;
+	struct filepointer	*filecontent;
+	struct symtab *psymp = predefs;
+	char *endmarker = NULL;
+	char *defincdir = NULL;
+
+	ProgramName = argv[0];
+
+	while (psymp->s_name)
+	{
+	    define2(psymp->s_name, psymp->s_value, &maininclist);
+	    psymp++;
+	}
+	if (argc == 2 && argv[1][0] == '@') {
+	    struct stat ast;
+	    int afd;
+	    char *args;
+	    char **nargv;
+	    int nargc;
+	    char quotechar = '\0';
+
+	    nargc = 1;
+	    if ((afd = open(argv[1]+1, O_RDONLY)) < 0)
+		fatalerr("cannot open \"%s\"\n", argv[1]+1);
+	    fstat(afd, &ast);
+	    args = (char *)malloc(ast.st_size + 1);
+	    if ((ast.st_size = read(afd, args, ast.st_size)) < 0)
+		fatalerr("failed to read %s\n", argv[1]+1);
+	    args[ast.st_size] = '\0';
+	    close(afd);
+	    for (p = args; *p; p++) {
+		if (quotechar) {
+		    if (quotechar == '\\' ||
+			(*p == quotechar && p[-1] != '\\'))
+			quotechar = '\0';
+		    continue;
+		}
+		switch (*p) {
+		case '\\':
+		case '"':
+		case '\'':
+		    quotechar = *p;
+		    break;
+		case ' ':
+		case '\n':
+		    *p = '\0';
+		    if (p > args && p[-1])
+			nargc++;
+		    break;
+		}
+	    }
+	    if (p[-1])
+		nargc++;
+	    nargv = (char **)malloc(nargc * sizeof(char *));
+	    nargv[0] = argv[0];
+	    argc = 1;
+	    for (p = args; argc < nargc; p += strlen(p) + 1)
+		if (*p) nargv[argc++] = p;
+	    argv = nargv;
+	}
+	for(argc--, argv++; argc; argc--, argv++) {
+	    	/* if looking for endmarker then check before parsing */
+		if (endmarker && strcmp (endmarker, *argv) == 0) {
+		    endmarker = NULL;
+		    continue;
+		}
+		if (**argv != '-') {
+			/* treat +thing as an option for C++ */
+			if (endmarker && **argv == '+')
+				continue;
+			*fp++ = argv[0];
+			continue;
+		}
+		switch(argv[0][1]) {
+		case '-':
+			endmarker = &argv[0][2];
+			if (endmarker[0] == '\0') endmarker = "--";
+			break;
+		case 'D':
+			if (argv[0][2] == '\0') {
+				argv++;
+				argc--;
+			}
+			for (p=argv[0] + 2; *p ; p++)
+				if (*p == '=') {
+					*p = ' ';
+					break;
+				}
+			define(argv[0] + 2, &maininclist);
+			break;
+		case 'I':
+			if (incp >= includedirs + MAXDIRS)
+			    fatalerr("Too many -I flags.\n");
+			*incp++ = argv[0]+2;
+			if (**(incp-1) == '\0') {
+				*(incp-1) = *(++argv);
+				argc--;
+			}
+			break;
+		case 'Y':
+			defincdir = argv[0]+2;
+			break;
+		/* do not use if endmarker processing */
+		case 'a':
+			if (endmarker) break;
+			append = TRUE;
+			break;
+		case 'w':
+			if (endmarker) break;
+			if (argv[0][2] == '\0') {
+				argv++;
+				argc--;
+				width = atoi(argv[0]);
+			} else
+				width = atoi(argv[0]+2);
+			break;
+		case 'o':
+			if (endmarker) break;
+			if (argv[0][2] == '\0') {
+				argv++;
+				argc--;
+				objsuffix = argv[0];
+			} else
+				objsuffix = argv[0]+2;
+			break;
+		case 'p':
+			if (endmarker) break;
+			if (argv[0][2] == '\0') {
+				argv++;
+				argc--;
+				objprefix = argv[0];
+			} else
+				objprefix = argv[0]+2;
+			break;
+		case 'v':
+			if (endmarker) break;
+			verbose = TRUE;
+#ifdef DEBUG
+			if (argv[0][2])
+				_debugmask = atoi(argv[0]+2);
+#endif
+			break;
+		case 's':
+			if (endmarker) break;
+			startat = argv[0]+2;
+			if (*startat == '\0') {
+				startat = *(++argv);
+				argc--;
+			}
+			if (*startat != '#')
+				fatalerr("-s flag's value should start %s\n",
+					"with '#'.");
+			break;
+		case 'f':
+			if (endmarker) break;
+			makefile = argv[0]+2;
+			if (*makefile == '\0') {
+				makefile = *(++argv);
+				argc--;
+			}
+			break;
+
+		case 'm':
+			warn_multiple = TRUE;
+			break;
+			
+		/* Ignore -O, -g so we can just pass ${CFLAGS} to
+		   makedepend
+		 */
+		case 'O':
+		case 'g':
+			break;
+		default:
+			if (endmarker) break;
+	/*		fatalerr("unknown opt = %s\n", argv[0]); */
+			warning("ignoring option %s\n", argv[0]);
+		}
+	}
+	if (!defincdir) {
+#ifdef PREINCDIR
+	    if (incp >= includedirs + MAXDIRS)
+		fatalerr("Too many -I flags.\n");
+	    *incp++ = PREINCDIR;
+#endif
+	    if (incp >= includedirs + MAXDIRS)
+		fatalerr("Too many -I flags.\n");
+	    *incp++ = INCLUDEDIR;
+#ifdef POSTINCDIR
+	    if (incp >= includedirs + MAXDIRS)
+		fatalerr("Too many -I flags.\n");
+	    *incp++ = POSTINCDIR;
+#endif
+	} else if (*defincdir) {
+	    if (incp >= includedirs + MAXDIRS)
+		fatalerr("Too many -I flags.\n");
+	    *incp++ = defincdir;
+	}
+
+	redirect(startat, makefile);
+
+	/*
+	 * catch signals.
+	 */
+#ifdef USGISH
+/*  should really reset SIGINT to SIG_IGN if it was.  */
+#ifdef SIGHUP
+	signal (SIGHUP, catch);
+#endif
+	signal (SIGINT, catch);
+#ifdef SIGQUIT
+	signal (SIGQUIT, catch);
+#endif
+	signal (SIGILL, catch);
+#ifdef SIGBUS
+	signal (SIGBUS, catch);
+#endif
+	signal (SIGSEGV, catch);
+#ifdef SIGSYS
+	signal (SIGSYS, catch);
+#endif
+	signal (SIGFPE, catch);
+#else
+	sig_act.sa_handler = catch;
+#ifdef _POSIX_SOURCE
+	sigemptyset(&sig_act.sa_mask);
+	sigaddset(&sig_act.sa_mask, SIGINT);
+	sigaddset(&sig_act.sa_mask, SIGQUIT);
+#ifdef SIGBUS
+	sigaddset(&sig_act.sa_mask, SIGBUS);
+#endif
+	sigaddset(&sig_act.sa_mask, SIGILL);
+	sigaddset(&sig_act.sa_mask, SIGSEGV);
+	sigaddset(&sig_act.sa_mask, SIGHUP);
+	sigaddset(&sig_act.sa_mask, SIGPIPE);
+#ifdef SIGSYS
+	sigaddset(&sig_act.sa_mask, SIGSYS);
+#endif
+#else
+	sig_act.sa_mask = ((1<<(SIGINT -1))
+			   |(1<<(SIGQUIT-1))
+#ifdef SIGBUS
+			   |(1<<(SIGBUS-1))
+#endif
+			   |(1<<(SIGILL-1))
+			   |(1<<(SIGSEGV-1))
+			   |(1<<(SIGHUP-1))
+			   |(1<<(SIGPIPE-1))
+#ifdef SIGSYS
+			   |(1<<(SIGSYS-1))
+#endif
+			   );
+#endif /* _POSIX_SOURCE */
+	sig_act.sa_flags = 0;
+	sigaction(SIGHUP, &sig_act, (struct sigaction *)0);
+	sigaction(SIGINT, &sig_act, (struct sigaction *)0);
+	sigaction(SIGQUIT, &sig_act, (struct sigaction *)0);
+	sigaction(SIGILL, &sig_act, (struct sigaction *)0);
+#ifdef SIGBUS
+	sigaction(SIGBUS, &sig_act, (struct sigaction *)0);
+#endif
+	sigaction(SIGSEGV, &sig_act, (struct sigaction *)0);
+#ifdef SIGSYS
+	sigaction(SIGSYS, &sig_act, (struct sigaction *)0);
+#endif
+#endif /* USGISH */
+
+	/*
+	 * now peruse through the list of files.
+	 */
+	for(fp=filelist; *fp; fp++) {
+		filecontent = getfile(*fp);
+		ip = newinclude(*fp, (char *)NULL);
+
+		find_includes(filecontent, ip, ip, 0, FALSE);
+		freefile(filecontent);
+		recursive_pr_include(ip, ip->i_file, base_name(*fp));
+		inc_clean();
+	}
+	if (printed)
+		printf("\n");
+	exit(0);
+}
+
+struct filepointer *getfile(file)
+	char	*file;
+{
+	register int	fd;
+	struct filepointer	*content;
+	struct stat	st;
+
+	content = (struct filepointer *)malloc(sizeof(struct filepointer));
+	if ((fd = open(file, O_RDONLY)) < 0) {
+		warning("cannot open \"%s\"\n", file);
+		content->f_p = content->f_base = content->f_end = (char *)malloc(1);
+		*content->f_p = '\0';
+		return(content);
+	}
+	fstat(fd, &st);
+	content->f_base = (char *)malloc(st.st_size+1);
+	if (content->f_base == NULL)
+		fatalerr("cannot allocate mem\n");
+	if ((st.st_size = read(fd, content->f_base, st.st_size)) < 0)
+		fatalerr("failed to read %s\n", file);
+	close(fd);
+	content->f_len = st.st_size+1;
+	content->f_p = content->f_base;
+	content->f_end = content->f_base + st.st_size;
+	*content->f_end = '\0';
+	content->f_line = 0;
+	return(content);
+}
+
+freefile(fp)
+	struct filepointer	*fp;
+{
+	free(fp->f_base);
+	free(fp);
+}
+
+char *copy(str)
+	register char	*str;
+{
+	register char	*p = (char *)malloc(strlen(str) + 1);
+
+	strcpy(p, str);
+	return(p);
+}
+
+match(str, list)
+	register char	*str, **list;
+{
+	register int	i;
+
+	for (i=0; *list; i++, list++)
+		if (strcmp(str, *list) == 0)
+			return(i);
+	return(-1);
+}
+
+/*
+ * Get the next line.  We only return lines beginning with '#' since that
+ * is all this program is ever interested in.
+ */
+char *getline(filep)
+	register struct filepointer	*filep;
+{
+	register char	*p,	/* walking pointer */
+			*eof,	/* end of file pointer */
+			*bol;	/* beginning of line pointer */
+	register	lineno;	/* line number */
+
+	p = filep->f_p;
+	eof = filep->f_end;
+	if (p >= eof)
+		return((char *)NULL);
+	lineno = filep->f_line;
+
+	for(bol = p--; ++p < eof; ) {
+		if (*p == '/' && *(p+1) == '*') { /* consume comments */
+			*p++ = ' ', *p++ = ' ';
+			while (*p) {
+				if (*p == '*' && *(p+1) == '/') {
+					*p++ = ' ', *p = ' ';
+					break;
+				}
+				else if (*p == '\n')
+					lineno++;
+				*p++ = ' ';
+			}
+			continue;
+		}
+#ifdef WIN32
+		else if (*p == '/' && *(p+1) == '/') { /* consume comments */
+			*p++ = ' ', *p++ = ' ';
+			while (*p && *p != '\n')
+				*p++ = ' ';
+			lineno++;
+			continue;
+		}
+#endif
+		else if (*p == '\\') {
+			if (*(p+1) == '\n') {
+				*p = ' ';
+				*(p+1) = ' ';
+				lineno++;
+			}
+		}
+		else if (*p == '\n') {
+			lineno++;
+			if (*bol == '#') {
+				register char *cp;
+
+				*p++ = '\0';
+				/* punt lines with just # (yacc generated) */
+				for (cp = bol+1; 
+				     *cp && (*cp == ' ' || *cp == '\t'); cp++);
+				if (*cp) goto done;
+			}
+			bol = p+1;
+		}
+	}
+	if (*bol != '#')
+		bol = NULL;
+done:
+	filep->f_p = p;
+	filep->f_line = lineno;
+	return(bol);
+}
+
+/*
+ * Strip the file name down to what we want to see in the Makefile.
+ * It will have objprefix and objsuffix around it.
+ */
+char *base_name(file)
+	register char	*file;
+{
+	register char	*p;
+
+	file = copy(file);
+	for(p=file+strlen(file); p>file && *p != '.'; p--) ;
+
+	if (*p == '.')
+		*p = '\0';
+	return(file);
+}
+
+#if defined(USG) && !defined(CRAY) && !defined(SVR4) && !defined(__EMX__)
+int rename (from, to)
+    char *from, *to;
+{
+    (void) unlink (to);
+    if (link (from, to) == 0) {
+	unlink (from);
+	return 0;
+    } else {
+	return -1;
+    }
+}
+#endif /* USGISH */
+
+redirect(line, makefile)
+	char	*line,
+		*makefile;
+{
+	struct stat	st;
+	FILE	*fdin, *fdout;
+	char	backup[ BUFSIZ ],
+		buf[ BUFSIZ ];
+	boolean	found = FALSE;
+	int	len;
+
+	/*
+	 * if makefile is "-" then let it pour onto stdout.
+	 */
+	if (makefile && *makefile == '-' && *(makefile+1) == '\0')
+		return;
+
+	/*
+	 * use a default makefile is not specified.
+	 */
+	if (!makefile) {
+		if (stat("Makefile", &st) == 0)
+			makefile = "Makefile";
+		else if (stat("makefile", &st) == 0)
+			makefile = "makefile";
+		else
+			fatalerr("[mM]akefile is not present\n");
+	}
+	else
+	    stat(makefile, &st);
+	if ((fdin = fopen(makefile, "r")) == NULL)
+		fatalerr("cannot open \"%s\"\n", makefile);
+	sprintf(backup, "%s.bak", makefile);
+	unlink(backup);
+#if defined(WIN32) || defined(__EMX__)
+	fclose(fdin);
+#endif
+	if (rename(makefile, backup) < 0)
+		fatalerr("cannot rename %s to %s\n", makefile, backup);
+#if defined(WIN32) || defined(__EMX__)
+	if ((fdin = fopen(backup, "r")) == NULL)
+		fatalerr("cannot open \"%s\"\n", backup);
+#endif
+	if ((fdout = freopen(makefile, "w", stdout)) == NULL)
+		fatalerr("cannot open \"%s\"\n", backup);
+	len = strlen(line);
+	while (!found && fgets(buf, BUFSIZ, fdin)) {
+		if (*buf == '#' && strncmp(line, buf, len) == 0)
+			found = TRUE;
+		fputs(buf, fdout);
+	}
+	if (!found) {
+		if (verbose)
+		warning("Adding new delimiting line \"%s\" and dependencies...\n",
+			line);
+		puts(line); /* same as fputs(fdout); but with newline */
+	} else if (append) {
+	    while (fgets(buf, BUFSIZ, fdin)) {
+		fputs(buf, fdout);
+	    }
+	}
+	fflush(fdout);
+#if defined(USGISH) || defined(_SEQUENT_) || defined(USE_CHMOD)
+	chmod(makefile, st.st_mode);
+#else
+        fchmod(fileno(fdout), st.st_mode);
+#endif /* USGISH */
+}
+
+#if NeedVarargsPrototypes
+fatalerr(char *msg, ...)
+#else
+/*VARARGS*/
+fatalerr(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9)
+    char *msg;
+#endif
+{
+#if NeedVarargsPrototypes
+	va_list args;
+#endif
+	fprintf(stderr, "%s: error:  ", ProgramName);
+#if NeedVarargsPrototypes
+	va_start(args, msg);
+	vfprintf(stderr, msg, args);
+	va_end(args);
+#else
+	fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9);
+#endif
+	exit (1);
+}
+
+#if NeedVarargsPrototypes
+warning(char *msg, ...)
+#else
+/*VARARGS0*/
+warning(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9)
+    char *msg;
+#endif
+{
+#ifdef DEBUG_MKDEPEND
+#if NeedVarargsPrototypes
+	va_list args;
+#endif
+	fprintf(stderr, "%s: warning:  ", ProgramName);
+#if NeedVarargsPrototypes
+	va_start(args, msg);
+	vfprintf(stderr, msg, args);
+	va_end(args);
+#else
+	fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9);
+#endif
+#endif /* DEBUG_MKDEPEND */
+}
+
+#if NeedVarargsPrototypes
+warning1(char *msg, ...)
+#else
+/*VARARGS0*/
+warning1(msg,x1,x2,x3,x4,x5,x6,x7,x8,x9)
+    char *msg;
+#endif
+{
+#ifdef DEBUG_MKDEPEND
+#if NeedVarargsPrototypes
+	va_list args;
+	va_start(args, msg);
+	vfprintf(stderr, msg, args);
+	va_end(args);
+#else
+	fprintf(stderr, msg,x1,x2,x3,x4,x5,x6,x7,x8,x9);
+#endif
+#endif /* DEBUG_MKDEPEND */
+}
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/mkdepend.man
@@ -0,0 +1,368 @@
+.\" $XConsortium: mkdepend.man,v 1.15 94/04/17 20:10:37 gildea Exp $
+.\" Copyright (c) 1993, 1994  X Consortium
+.\" 
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"), 
+.\" to deal in the Software without restriction, including without limitation 
+.\" the rights to use, copy, modify, merge, publish, distribute, sublicense, 
+.\" and/or sell copies of the Software, and to permit persons to whom the 
+.\" Software furnished to do so, subject to the following conditions:
+.\" 
+.\" The above copyright notice and this permission notice shall be included in
+.\" all copies or substantial portions of the Software.
+.\" 
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL 
+.\" THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
+.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 
+.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
+.\" SOFTWARE.
+.\" 
+.\" Except as contained in this notice, the name of the X Consortium shall not 
+.\" be used in advertising or otherwise to promote the sale, use or other 
+.\" dealing in this Software without prior written authorization from the 
+.\" X Consortium.
+.TH MAKEDEPEND 1 "Release 6" "X Version 11"
+.UC 4
+.SH NAME
+makedepend \- create dependencies in makefiles
+.SH SYNOPSIS
+.B makedepend
+[
+.B \-Dname=def
+] [
+.B \-Dname
+] [
+.B \-Iincludedir
+] [
+.B \-Yincludedir
+] [
+.B \-a
+] [
+.B \-fmakefile
+] [
+.B \-oobjsuffix
+] [
+.B \-pobjprefix
+] [
+.B \-sstring
+] [
+.B \-wwidth
+] [
+.B \-v
+] [
+.B \-m
+] [
+\-\^\-
+.B otheroptions
+\-\^\-
+]
+sourcefile .\|.\|.
+.br
+.SH DESCRIPTION
+.B Makedepend
+reads each
+.I sourcefile
+in sequence and parses it like a C-preprocessor,
+processing all
+.I #include,
+.I #define,
+.I #undef,
+.I #ifdef,
+.I #ifndef,
+.I #endif,
+.I #if
+and
+.I #else
+directives so that it can correctly tell which
+.I #include,
+directives would be used in a compilation.
+Any
+.I #include,
+directives can reference files having other
+.I #include
+directives, and parsing will occur in these files as well.
+.PP
+Every file that a
+.I sourcefile
+includes,
+directly or indirectly,
+is what
+.B makedepend
+calls a "dependency".
+These dependencies are then written to a
+.I makefile
+in such a way that
+.B make(1)
+will know which object files must be recompiled when a dependency has changed.
+.PP
+By default,
+.B makedepend
+places its output in the file named
+.I makefile
+if it exists, otherwise
+.I Makefile.
+An alternate makefile may be specified with the
+.B \-f
+option.
+It first searches the makefile for
+the line
+.sp
+    # DO NOT DELETE THIS LINE \-\^\- make depend depends on it.
+.sp
+or one provided with the
+.B \-s
+option,
+as a delimiter for the dependency output.
+If it finds it, it will delete everything
+following this to the end of the makefile
+and put the output after this line.
+If it doesn't find it, the program
+will append the string to the end of the makefile
+and place the output following that.
+For each
+.I sourcefile
+appearing on the command line,
+.B makedepend
+puts lines in the makefile of the form
+.sp
+     sourcefile.o:\0dfile .\|.\|.
+.sp
+Where "sourcefile.o" is the name from the command
+line with its suffix replaced with ".o",
+and "dfile" is a dependency discovered in a
+.I #include
+directive while parsing
+.I sourcefile
+or one of the files it included.
+.SH EXAMPLE
+Normally,
+.B makedepend
+will be used in a makefile target so that typing "make depend" will
+bring the dependencies up to date for the makefile.
+For example,
+.nf
+    SRCS\0=\0file1.c\0file2.c\0.\|.\|.
+    CFLAGS\0=\0\-O\0\-DHACK\0\-I\^.\^.\^/foobar\0\-xyz
+    depend:
+            makedepend\0\-\^\-\0$(CFLAGS)\0\-\^\-\0$(SRCS)
+.fi
+.SH OPTIONS
+.B Makedepend
+will ignore any option that it does not understand so that you may use
+the same arguments that you would for
+.B cc(1).
+.TP 5
+.B \-Dname=def or \-Dname
+Define.
+This places a definition for
+.I name
+in
+.B makedepend's
+symbol table.
+Without 
+.I =def
+the symbol becomes defined as "1".
+.TP 5
+.B \-Iincludedir
+Include directory.
+This option tells
+.B makedepend
+to prepend
+.I includedir
+to its list of directories to search when it encounters
+a
+.I #include
+directive.
+By default,
+.B makedepend
+only searches the standard include directories (usually /usr/include
+and possibly a compiler-dependent directory).
+.TP 5
+.B \-Yincludedir
+Replace all of the standard include directories with the single specified
+include directory; you can omit the
+.I includedir
+to simply prevent searching the standard include directories.
+.TP 5
+.B \-a
+Append the dependencies to the end of the file instead of replacing them. 
+.TP 5
+.B \-fmakefile
+Filename.
+This allows you to specify an alternate makefile in which
+.B makedepend
+can place its output.
+.TP 5
+.B \-oobjsuffix
+Object file suffix.
+Some systems may have object files whose suffix is something other
+than ".o".
+This option allows you to specify another suffix, such as
+".b" with
+.I -o.b
+or ":obj"
+with
+.I -o:obj
+and so forth.
+.TP 5
+.B \-pobjprefix
+Object file prefix.
+The prefix is prepended to the name of the object file. This is
+usually used to designate a different directory for the object file.
+The default is the empty string.
+.TP 5
+.B \-sstring
+Starting string delimiter.
+This option permits you to specify
+a different string for
+.B makedepend
+to look for in the makefile.
+.TP 5
+.B \-wwidth
+Line width.
+Normally,
+.B makedepend
+will ensure that every output line that it writes will be no wider than
+78 characters for the sake of readability.
+This option enables you to change this width.
+.TP 5
+.B \-v
+Verbose operation.
+This option causes 
+.B makedepend
+to emit the list of files included by each input file on standard output.
+.TP 5
+.B \-m
+Warn about multiple inclusion.
+This option causes 
+.B makedepend
+to produce a warning if any input file includes another file more than
+once.  In previous versions of 
+.B makedepend
+this was the default behavior; the default has been changed to better
+match the behavior of the C compiler, which does not consider multiple
+inclusion to be an error.  This option is provided for backward 
+compatibility, and to aid in debugging problems related to multiple
+inclusion.
+.TP 5
+.B "\-\^\- options \-\^\-"
+If
+.B makedepend
+encounters a double hyphen (\-\^\-) in the argument list,
+then any unrecognized argument following it
+will be silently ignored; a second double hyphen terminates this
+special treatment.
+In this way,
+.B makedepend
+can be made to safely ignore esoteric compiler arguments that might
+normally be found in a CFLAGS
+.B make
+macro (see the
+.B EXAMPLE
+section above).
+All options that
+.B makedepend
+recognizes and appear between the pair of double hyphens
+are processed normally.
+.SH ALGORITHM
+The approach used in this program enables it to run an order of magnitude
+faster than any other "dependency generator" I have ever seen.
+Central to this performance are two assumptions:
+that all files compiled by a single
+makefile will be compiled with roughly the same
+.I -I
+and
+.I -D
+options;
+and that most files in a single directory will include largely the
+same files.
+.PP
+Given these assumptions,
+.B makedepend
+expects to be called once for each makefile, with
+all source files that are maintained by the
+makefile appearing on the command line.
+It parses each source and include
+file exactly once, maintaining an internal symbol table
+for each.
+Thus, the first file on the command line will take an amount of time
+proportional to the amount of time that a normal C preprocessor takes.
+But on subsequent files, if it encounter's an include file
+that it has already parsed, it does not parse it again.
+.PP
+For example,
+imagine you are compiling two files,
+.I file1.c
+and
+.I file2.c,
+they each include the header file
+.I header.h,
+and the file
+.I header.h
+in turn includes the files
+.I def1.h
+and
+.I def2.h.
+When you run the command
+.sp
+    makedepend\0file1.c\0file2.c
+.sp
+.B makedepend
+will parse
+.I file1.c
+and consequently,
+.I header.h
+and then
+.I def1.h
+and
+.I def2.h.
+It then decides that the dependencies for this file are
+.sp
+    file1.o:\0header.h\0def1.h\0def2.h
+.sp
+But when the program parses
+.I file2.c
+and discovers that it, too, includes
+.I header.h,
+it does not parse the file,
+but simply adds
+.I header.h,
+.I def1.h
+and
+.I def2.h
+to the list of dependencies for
+.I file2.o.
+.SH "SEE ALSO"
+cc(1), make(1)
+.SH BUGS
+.B makedepend
+parses, but does not currently evaluate, the SVR4
+#predicate(token-list) preprocessor expression;
+such expressions are simply assumed to be true.
+This may cause the wrong
+.I #include
+directives to be evaluated.
+.PP
+Imagine you are parsing two files,
+say
+.I file1.c
+and
+.I file2.c,
+each includes the file
+.I def.h.
+The list of files that
+.I def.h
+includes might truly be different when
+.I def.h
+is included by
+.I file1.c
+than when it is included by
+.I file2.c.
+But once
+.B makedepend
+arrives at a list of dependencies for a file,
+it is cast in concrete.
+.SH AUTHOR
+Todd Brunhoff, Tektronix, Inc. and MIT Project Athena
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/parse.c
@@ -0,0 +1,567 @@
+/* $XConsortium: parse.c,v 1.30 94/04/17 20:10:38 gildea Exp $ */
+/*
+
+Copyright (c) 1993, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#include "def.h"
+
+extern char	*directives[];
+extern struct inclist	maininclist;
+
+find_includes(filep, file, file_red, recursion, failOK)
+	struct filepointer	*filep;
+	struct inclist		*file, *file_red;
+	int			recursion;
+	boolean			failOK;
+{
+	register char	*line;
+	register int	type;
+	boolean recfailOK;
+
+	while (line = getline(filep)) {
+		switch(type = deftype(line, filep, file_red, file, TRUE)) {
+		case IF:
+		doif:
+			type = find_includes(filep, file,
+				file_red, recursion+1, failOK);
+			while ((type == ELIF) || (type == ELIFFALSE) ||
+			       (type == ELIFGUESSFALSE))
+				type = gobble(filep, file, file_red);
+			if (type == ELSE)
+				gobble(filep, file, file_red);
+			break;
+		case IFFALSE:
+		case IFGUESSFALSE:
+		    doiffalse:
+			if (type == IFGUESSFALSE || type == ELIFGUESSFALSE)
+			    recfailOK = TRUE;
+			else
+			    recfailOK = failOK;
+			type = gobble(filep, file, file_red);
+			if (type == ELSE)
+			    find_includes(filep, file,
+					  file_red, recursion+1, recfailOK);
+			else
+			if (type == ELIF)
+			    goto doif;
+			else
+			if ((type == ELIFFALSE) || (type == ELIFGUESSFALSE))
+			    goto doiffalse;
+			break;
+		case IFDEF:
+		case IFNDEF:
+			if ((type == IFDEF && isdefined(line, file_red, NULL))
+			 || (type == IFNDEF && !isdefined(line, file_red, NULL))) {
+				debug(1,(type == IFNDEF ?
+				    "line %d: %s !def'd in %s via %s%s\n" : "",
+				    filep->f_line, line,
+				    file->i_file, file_red->i_file, ": doit"));
+				type = find_includes(filep, file,
+					file_red, recursion+1, failOK);
+				while (type == ELIF || type == ELIFFALSE || type == ELIFGUESSFALSE)
+					type = gobble(filep, file, file_red);
+				if (type == ELSE)
+					gobble(filep, file, file_red);
+			}
+			else {
+				debug(1,(type == IFDEF ?
+				    "line %d: %s !def'd in %s via %s%s\n" : "",
+				    filep->f_line, line,
+				    file->i_file, file_red->i_file, ": gobble"));
+				type = gobble(filep, file, file_red);
+				if (type == ELSE)
+					find_includes(filep, file,
+						file_red, recursion+1, failOK);
+				else if (type == ELIF)
+				    	goto doif;
+				else if (type == ELIFFALSE || type == ELIFGUESSFALSE)
+				    	goto doiffalse;
+			}
+			break;
+		case ELSE:
+		case ELIFFALSE:
+		case ELIFGUESSFALSE:
+		case ELIF:
+			if (!recursion)
+				gobble(filep, file, file_red);
+		case ENDIF:
+			if (recursion)
+				return(type);
+		case DEFINE:
+			define(line, file);
+			break;
+		case UNDEF:
+			if (!*line) {
+			    warning("%s, line %d: incomplete undef == \"%s\"\n",
+				file_red->i_file, filep->f_line, line);
+			    break;
+			}
+			undefine(line, file_red);
+			break;
+		case INCLUDE:
+			add_include(filep, file, file_red, line, FALSE, failOK);
+			break;
+		case INCLUDEDOT:
+			add_include(filep, file, file_red, line, TRUE, failOK);
+			break;
+		case ERROR:
+		    	warning("%s: %d: %s\n", file_red->i_file,
+				 filep->f_line, line);
+		    	break;
+		    
+		case PRAGMA:
+		case IDENT:
+		case SCCS:
+		case EJECT:
+			break;
+		case -1:
+			warning("%s", file_red->i_file);
+			if (file_red != file)
+			    warning1(" (reading %s)", file->i_file);
+			warning1(", line %d: unknown directive == \"%s\"\n",
+				 filep->f_line, line);
+			break;
+		case -2:
+			warning("%s", file_red->i_file);
+			if (file_red != file)
+			    warning1(" (reading %s)", file->i_file);
+			warning1(", line %d: incomplete include == \"%s\"\n",
+				 filep->f_line, line);
+			break;
+		}
+	}
+	return(-1);
+}
+
+gobble(filep, file, file_red)
+	register struct filepointer *filep;
+	struct inclist		*file, *file_red;
+{
+	register char	*line;
+	register int	type;
+
+	while (line = getline(filep)) {
+		switch(type = deftype(line, filep, file_red, file, FALSE)) {
+		case IF:
+		case IFFALSE:
+		case IFGUESSFALSE:
+		case IFDEF:
+		case IFNDEF:
+			type = gobble(filep, file, file_red);
+			while ((type == ELIF) || (type == ELIFFALSE) ||
+			       (type == ELIFGUESSFALSE))
+			    type = gobble(filep, file, file_red);
+			if (type == ELSE)
+			        (void)gobble(filep, file, file_red);
+			break;
+		case ELSE:
+		case ENDIF:
+			debug(0,("%s, line %d: #%s\n",
+				file->i_file, filep->f_line,
+				directives[type]));
+			return(type);
+		case DEFINE:
+		case UNDEF:
+		case INCLUDE:
+		case INCLUDEDOT:
+		case PRAGMA:
+		case ERROR:
+		case IDENT:
+		case SCCS:
+		case EJECT:
+			break;
+		case ELIF:
+		case ELIFFALSE:
+		case ELIFGUESSFALSE:
+			return(type);
+		case -1:
+			warning("%s, line %d: unknown directive == \"%s\"\n",
+				file_red->i_file, filep->f_line, line);
+			break;
+		}
+	}
+	return(-1);
+}
+
+/*
+ * Decide what type of # directive this line is.
+ */
+int deftype (line, filep, file_red, file, parse_it)
+	register char	*line;
+	register struct filepointer *filep;
+	register struct inclist *file_red, *file;
+	int	parse_it;
+{
+	register char	*p;
+	char	*directive, savechar;
+	register int	ret;
+
+	/*
+	 * Parse the directive...
+	 */
+	directive=line+1;
+	while (*directive == ' ' || *directive == '\t')
+		directive++;
+
+	p = directive;
+	while (*p >= 'a' && *p <= 'z')
+		p++;
+	savechar = *p;
+	*p = '\0';
+	ret = match(directive, directives);
+	*p = savechar;
+
+	/* If we don't recognize this compiler directive or we happen to just
+	 * be gobbling up text while waiting for an #endif or #elif or #else
+	 * in the case of an #elif we must check the zero_value and return an
+	 * ELIF or an ELIFFALSE.
+	 */
+
+	if (ret == ELIF && !parse_it)
+	{
+	    while (*p == ' ' || *p == '\t')
+		p++;
+	    /*
+	     * parse an expression.
+	     */
+	    debug(0,("%s, line %d: #elif %s ",
+		   file->i_file, filep->f_line, p));
+	    ret = zero_value(p, filep, file_red);
+	    if (ret != IF)
+	    {
+		debug(0,("false...\n"));
+		if (ret == IFFALSE)
+		    return(ELIFFALSE);
+		else
+		    return(ELIFGUESSFALSE);
+	    }
+	    else
+	    {
+		debug(0,("true...\n"));
+		return(ELIF);
+	    }
+	}
+
+	if (ret < 0 || ! parse_it)
+		return(ret);
+
+	/*
+	 * now decide how to parse the directive, and do it.
+	 */
+	while (*p == ' ' || *p == '\t')
+		p++;
+	switch (ret) {
+	case IF:
+		/*
+		 * parse an expression.
+		 */
+		ret = zero_value(p, filep, file_red);
+		debug(0,("%s, line %d: %s #if %s\n",
+			 file->i_file, filep->f_line, ret?"false":"true", p));
+		break;
+	case IFDEF:
+	case IFNDEF:
+		debug(0,("%s, line %d: #%s %s\n",
+			file->i_file, filep->f_line, directives[ret], p));
+	case UNDEF:
+		/*
+		 * separate the name of a single symbol.
+		 */
+		while (isalnum(*p) || *p == '_')
+			*line++ = *p++;
+		*line = '\0';
+		break;
+	case INCLUDE:
+		debug(2,("%s, line %d: #include %s\n",
+			file->i_file, filep->f_line, p));
+
+		/* Support ANSI macro substitution */
+		{
+		    struct symtab *sym = isdefined(p, file_red, NULL);
+		    while (sym) {
+			p = sym->s_value;
+			debug(3,("%s : #includes SYMBOL %s = %s\n",
+			       file->i_incstring,
+			       sym -> s_name,
+			       sym -> s_value));
+			/* mark file as having included a 'soft include' */
+			file->i_included_sym = TRUE; 
+			sym = isdefined(p, file_red, NULL);
+		    }
+		}
+
+		/*
+		 * Separate the name of the include file.
+		 */
+		while (*p && *p != '"' && *p != '<')
+			p++;
+		if (! *p)
+			return(-2);
+		if (*p++ == '"') {
+			ret = INCLUDEDOT;
+			while (*p && *p != '"')
+				*line++ = *p++;
+		} else
+			while (*p && *p != '>')
+				*line++ = *p++;
+		*line = '\0';
+		break;
+	case DEFINE:
+		/*
+		 * copy the definition back to the beginning of the line.
+		 */
+		strcpy (line, p);
+		break;
+	case ELSE:
+	case ENDIF:
+	case ELIF:
+	case PRAGMA:
+	case ERROR:
+	case IDENT:
+	case SCCS:
+	case EJECT:
+		debug(0,("%s, line %d: #%s\n",
+			file->i_file, filep->f_line, directives[ret]));
+		/*
+		 * nothing to do.
+		 */
+		break;
+	}
+	return(ret);
+}
+
+struct symtab *isdefined(symbol, file, srcfile)
+	register char	*symbol;
+	struct inclist	*file;
+	struct inclist	**srcfile;
+{
+	register struct symtab	*val;
+
+	if (val = slookup(symbol, &maininclist)) {
+		debug(1,("%s defined on command line\n", symbol));
+		if (srcfile != NULL) *srcfile = &maininclist;
+		return(val);
+	}
+	if (val = fdefined(symbol, file, srcfile))
+		return(val);
+	debug(1,("%s not defined in %s\n", symbol, file->i_file));
+	return(NULL);
+}
+
+struct symtab *fdefined(symbol, file, srcfile)
+	register char	*symbol;
+	struct inclist	*file;
+	struct inclist	**srcfile;
+{
+	register struct inclist	**ip;
+	register struct symtab	*val;
+	register int	i;
+	static int	recurse_lvl = 0;
+
+	if (file->i_defchecked)
+		return(NULL);
+	file->i_defchecked = TRUE;
+	if (val = slookup(symbol, file))
+		debug(1,("%s defined in %s as %s\n", symbol, file->i_file, val->s_value));
+	if (val == NULL && file->i_list)
+		{
+		for (ip = file->i_list, i=0; i < file->i_listlen; i++, ip++)
+			if (val = fdefined(symbol, *ip, srcfile)) {
+				break;
+			}
+		}
+	else if (val != NULL && srcfile != NULL) *srcfile = file;
+	recurse_lvl--;
+	file->i_defchecked = FALSE;
+
+	return(val);
+}
+
+/*
+ * Return type based on if the #if expression evaluates to 0
+ */
+zero_value(exp, filep, file_red)
+	register char	*exp;
+	register struct filepointer *filep;
+	register struct inclist *file_red;
+{
+	if (cppsetup(exp, filep, file_red))
+	    return(IFFALSE);
+	else
+	    return(IF);
+}
+
+define(def, file)
+	char	*def;
+	struct inclist	*file;
+{
+    char *val;
+
+    /* Separate symbol name and its value */
+    val = def;
+    while (isalnum(*val) || *val == '_')
+	val++;
+    if (*val)
+	*val++ = '\0';
+    while (*val == ' ' || *val == '\t')
+	val++;
+
+    if (!*val)
+	val = "1";
+    define2(def, val, file);
+}
+
+define2(name, val, file)
+	char	*name, *val;
+	struct inclist	*file;
+{
+    int first, last, below;
+    register struct symtab *sp = NULL, *dest;
+
+    /* Make space if it's needed */
+    if (file->i_defs == NULL)
+    {
+	file->i_defs = (struct symtab *)
+			malloc(sizeof (struct symtab) * SYMTABINC);
+	file->i_deflen = SYMTABINC;
+	file->i_ndefs = 0;
+    }
+    else if (file->i_ndefs == file->i_deflen)
+	file->i_defs = (struct symtab *)
+			realloc(file->i_defs,
+			    sizeof(struct symtab)*(file->i_deflen+=SYMTABINC));
+
+    if (file->i_defs == NULL)
+	fatalerr("malloc()/realloc() failure in insert_defn()\n");
+
+    below = first = 0;
+    last = file->i_ndefs - 1;
+    while (last >= first)
+    {
+	/* Fast inline binary search */
+	register char *s1;
+	register char *s2;
+	register int middle = (first + last) / 2;
+
+	/* Fast inline strchr() */
+	s1 = name;
+	s2 = file->i_defs[middle].s_name;
+	while (*s1++ == *s2++)
+	    if (s2[-1] == '\0') break;
+
+	/* If exact match, set sp and break */
+	if (*--s1 == *--s2) 
+	{
+	    sp = file->i_defs + middle;
+	    break;
+	}
+
+	/* If name > i_defs[middle] ... */
+	if (*s1 > *s2) 
+	{
+	    below = first;
+	    first = middle + 1;
+	}
+	/* else ... */
+	else
+	{
+	    below = last = middle - 1;
+	}
+    }
+
+    /* Search is done.  If we found an exact match to the symbol name,
+       just replace its s_value */
+    if (sp != NULL)
+    {
+	free(sp->s_value);
+	sp->s_value = copy(val);
+	return;
+    }
+
+    sp = file->i_defs + file->i_ndefs++;
+    dest = file->i_defs + below + 1;
+    while (sp > dest)
+    {
+	*sp = sp[-1];
+	sp--;
+    }
+    sp->s_name = copy(name);
+    sp->s_value = copy(val);
+}
+
+struct symtab *slookup(symbol, file)
+	register char	*symbol;
+	register struct inclist	*file;
+{
+	register int first = 0;
+	register int last = file->i_ndefs - 1;
+
+	if (file) while (last >= first)
+	{
+	    /* Fast inline binary search */
+	    register char *s1;
+	    register char *s2;
+	    register int middle = (first + last) / 2;
+
+	    /* Fast inline strchr() */
+	    s1 = symbol;
+	    s2 = file->i_defs[middle].s_name;
+	    while (*s1++ == *s2++)
+	        if (s2[-1] == '\0') break;
+
+	    /* If exact match, we're done */
+	    if (*--s1 == *--s2) 
+	    {
+	        return file->i_defs + middle;
+	    }
+
+	    /* If symbol > i_defs[middle] ... */
+	    if (*s1 > *s2) 
+	    {
+	        first = middle + 1;
+	    }
+	    /* else ... */
+	    else
+	    {
+	        last = middle - 1;
+	    }
+	}
+	return(NULL);
+}
+
+undefine(symbol, file)
+	char	*symbol;
+	register struct inclist	*file;
+{
+	register struct symtab *ptr;
+	struct inclist *srcfile;
+	while ((ptr = isdefined(symbol, file, &srcfile)) != NULL)
+	{
+	    srcfile->i_ndefs--;
+	    for (; ptr < srcfile->i_defs + srcfile->i_ndefs; ptr++)
+		*ptr = ptr[1];
+	}
+}
new file mode 100644
--- /dev/null
+++ b/security/coreconf/mkdepend/pr.c
@@ -0,0 +1,132 @@
+/* $XConsortium: pr.c,v 1.17 94/04/17 20:10:38 gildea Exp $ */
+/*
+
+Copyright (c) 1993, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+
+*/
+
+#include "def.h"
+
+extern struct	inclist	inclist[ MAXFILES ],
+			*inclistp;
+extern char	*objprefix;
+extern char	*objsuffix;
+extern int	width;
+extern boolean	printed;
+extern boolean	verbose;
+extern boolean	show_where_not;
+
+add_include(filep, file, file_red, include, dot, failOK)
+	struct filepointer	*filep;
+	struct inclist	*file, *file_red;
+	char	*include;
+	boolean	dot;
+{
+	register struct inclist	*newfile;
+	register struct filepointer	*content;
+
+	/*
+	 * First decide what the pathname of this include file really is.
+	 */
+	newfile = inc_path(file->i_file, include, dot);
+	if (newfile == NULL) {
+		if (failOK)
+		    return;
+		if (file != file_red)
+			warning("%s (reading %s, line %d): ",
+				file_red->i_file, file->i_file, filep->f_line);
+		else
+			warning("%s, line %d: ", file->i_file, filep->f_line);
+		warning1("cannot find include file \"%s\"\n", include);
+		show_where_not = TRUE;
+		newfile = inc_path(file->i_file, include, dot);
+		show_where_not = FALSE;
+	}
+
+	if (newfile) {
+
+		/* Only add new dependency files if they don't have "/usr/include" in them. */
+		if (!(newfile && newfile->i_file && strstr(newfile->i_file, "/usr/"))) {
+			included_by(file, newfile);
+		}
+
+		if (!newfile->i_searched) {
+			newfile->i_searched = TRUE;
+			content = getfile(newfile->i_file);
+			find_includes(content, newfile, file_red, 0, failOK);
+			freefile(content);
+		}
+	}
+}
+
+recursive_pr_include(head, file, base)
+	register struct inclist	*head;
+	register char	*file, *base;
+{
+	register int	i;
+
+	if (head->i_marked)
+		return;
+	head->i_marked = TRUE;
+	if (head->i_file != file)
+		pr(head, file, base);
+	for (i=0; i<head->i_listlen; i++)
+		recursive_pr_include(head->i_list[ i ], file, base);
+}
+
+pr(ip, file, base)
+	register struct inclist  *ip;
+	char	*file, *base;
+{
+	static char	*lastfile;
+	static int	current_len;
+	register int	len, i;
+	char	buf[ BUFSIZ ];
+
+	printed = TRUE;
+	len = strlen(ip->i_file)+1;
+	if (current_len + len > width || file != lastfile) {
+		lastfile = file;
+		sprintf(buf, "\n%s%s%s: %s", objprefix, base, objsuffix,
+			ip->i_file);
+		len = current_len = strlen(buf);
+	}
+	else {
+		buf[0] = ' ';
+		strcpy(buf+1, ip->i_file);
+		current_len += len;
+	}
+	fwrite(buf, len, 1, stdout);
+
+	/*
+	 * If verbose is set, then print out what this file includes.
+	 */
+	if (! verbose || ip->i_list == NULL || ip->i_notified)
+		return;
+	ip->i_notified = TRUE;
+	lastfile = NULL;
+	printf("\n# %s includes:", ip->i_file);
+	for (i=0; i<ip->i_listlen; i++)
+		printf("\n#\t%s", ip->i_list[ i ]->i_incstring);
+}
new file mode 100644
--- /dev/null
+++ b/security/coreconf/nsinstall/.cvsignore
@@ -0,0 +1,1 @@
+Makefile
deleted file mode 100644
--- a/security/coreconf/nsinstall/Makefile
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-DEPTH		= ../..
-CORE_DEPTH	= ../..
-
-MODULE		= coreconf
-
-CSRCS		= nsinstall.c pathsub.c
-
-PLSRCS		= nfspwd.pl
-
-PROGRAM		= nsinstall
-
-include $(DEPTH)/coreconf/config.mk
-
-ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
-PROGRAM		=
-else
-TARGETS		= $(PROGRAM) $(PLSRCS:.pl=)
-endif
-
-include $(DEPTH)/coreconf/rules.mk
-
-# Redefine MAKE_OBJDIR for just this directory
-define MAKE_OBJDIR
-if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); fi
-endef
-
new file mode 100644
--- /dev/null
+++ b/security/coreconf/nsinstall/Makefile.in
@@ -0,0 +1,58 @@
+#
+# The contents of this file are subject to the Mozilla Public
+# License Version 1.1 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+# 
+# Software distributed under the License is distributed on an "AS
+# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# rights and limitations under the License.
+# 
+# The Original Code is the Netscape security libraries.
+# 
+# The Initial Developer of the Original Code is Netscape
+# Communications Corporation.  Portions created by Netscape are 
+# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
+# Rights Reserved.
+# 
+# Contributor(s):
+# 
+# Alternatively, the contents of this file may be used under the
+# terms of the GNU General Public License Version 2 or later (the
+# "GPL"), in which case the provisions of the GPL are applicable 
+# instead of those above.  If you wish to allow use of your 
+# version of this file only under the terms of the GPL and not to
+# allow others to use your version of this file under the MPL,
+# indicate your decision by deleting the provisions above and
+# replace them with the notice and other provisions required by
+# the GPL.  If you do not delete the provisions above, a recipient
+# may use your version of this file under either the MPL or the
+# GPL.
+#
+
+MOD_DEPTH	= ../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@:$(CORECONF_SOURCE)/nsinstall
+
+MODULE		= coreconf
+
+CSRCS		= nsinstall.c pathsub.c
+
+PLSRCS		= nfspwd.pl
+
+PROGRAM		= nsinstall
+
+include ../autoconf.mk
+include $(CORECONF_SOURCE)/config.mk
+
+ifeq ($(OS_ARCH),WINNT)
+PROGRAM		=
+else
+TARGETS		= $(PROGRAM) $(PLSRCS:.pl=)
+endif
+
+include $(CORECONF_SOURCE)/rules.mk
+
+export:: libs
--- a/security/coreconf/rules.mk
+++ b/security/coreconf/rules.mk
@@ -59,46 +59,53 @@ platform::
 # of a component, and traverse the IMPORTS keyword from the
 # "manifest.mn" file located at this level only.
 #
 # note: if there is a trailing slash, the component will be appended
 #       (see import.pl - only used for xpheader.jar)
 
 import::
 	@echo "== import.pl =="
-	@perl -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/import.pl \
+	@perl -I$(CORECONF_SOURCE) $(CORECONF_SOURCE)/import.pl \
 		"RELEASE_TREE=$(RELEASE_TREE)"   \
 		"IMPORTS=$(IMPORTS)"             \
 		"VERSION=$(VERSION)" \
 		"OS_ARCH=$(OS_ARCH)"             \
 		"PLATFORM=$(PLATFORM)" \
 		"OVERRIDE_IMPORT_CHECK=$(OVERRIDE_IMPORT_CHECK)"   \
 		"ALLOW_VERSION_OVERRIDE=$(ALLOW_VERSION_OVERRIDE)" \
 		"SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)"   \
 		"SOURCE_MD_DIR=$(SOURCE_MD_DIR)"      \
 		"SOURCE_XP_DIR=$(SOURCE_XP_DIR)"      \
 		"FILES=$(IMPORT_XPCLASS_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \
 		"$(IMPORT_XPCLASS_JAR)=$(IMPORT_XP_DIR)|$(IMPORT_XPCLASS_DIR)|"    \
 		"$(XPHEADER_JAR)=$(IMPORT_XP_DIR)|$(SOURCE_XP_DIR)/public/|v" \
 		"$(MDHEADER_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)/include|"        \
 		"$(MDBINARY_JAR)=$(IMPORT_MD_DIR)|$(SOURCE_MD_DIR)|"
 
-export::
-	+$(LOOP_OVER_DIRS)
+makefiles: $(SUBMAKEFILES)
+ifdef DIRS
+	@for d in $(filter-out $(STATIC_MAKEFILES), $(DIRS)); do\
+		$(MAKE) -C $$d $@                               \
+	done
+endif
 
-private_export::
+export:: $(SUBMAKEFILES) $(MAKE_DIRS)
 	+$(LOOP_OVER_DIRS)
 
-release_export::
+private_export:: $(SUBMAKEFILES)
 	+$(LOOP_OVER_DIRS)
 
-release_classes::
+release_export:: $(SUBMAKEFILES)
 	+$(LOOP_OVER_DIRS)
 
-libs program install:: $(TARGETS)
+release_classes:: $(SUBMAKEFILES)
+	+$(LOOP_OVER_DIRS)
+
+libs program install:: $(SUBMAKEFILES) $(TARGETS) $(MAKE_DIRS)
 ifdef LIBRARY
 	$(INSTALL) -m 664 $(LIBRARY) $(SOURCE_LIB_DIR)
 endif
 ifdef SHARED_LIBRARY
 	$(INSTALL) -m 775 $(SHARED_LIBRARY) $(SOURCE_LIB_DIR)
 ifeq ($(OS_ARCH),OpenVMS)
 	$(INSTALL) -m 775 $(SHARED_LIBRARY:$(DLL_SUFFIX)=vms) $(SOURCE_LIB_DIR)
 endif
@@ -109,27 +116,35 @@ endif
 ifdef PROGRAM
 	$(INSTALL) -m 775 $(PROGRAM) $(SOURCE_BIN_DIR)
 endif
 ifdef PROGRAMS
 	$(INSTALL) -m 775 $(PROGRAMS) $(SOURCE_BIN_DIR)
 endif
 	+$(LOOP_OVER_DIRS)
 
-tests::
+tests:: $(SUBMAKEFILES)
 	+$(LOOP_OVER_DIRS)
 
-clean clobber::
+clean clobber:: $(SUBMAKEFILES)
 	rm -rf $(ALL_TRASH)
 	+$(LOOP_OVER_DIRS)
 
-realclean clobber_all::
+realclean clobber_all:: $(SUBMAKEFILES)
 	rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH)
 	+$(LOOP_OVER_DIRS)
 
+distclean:: $(SUBMAKEFILES)
+	+$(LOOP_OVER_DIRS)
+	rm -rf $(ALL_TRASH) ; \
+	rm -rf $(wildcard *.map) \
+	Makefile .HSancillary \
+	$(wildcard *.$(OBJ_SUFFIX)) $(wildcard *.ho) \
+	$(wildcard *.$(LIB_SUFFIX)) $(wildcard *.$(DLL_SUFFIX))
+
 #ifdef ALL_PLATFORMS
 #all_platforms:: $(NFSPWD)
 #	@d=`$(NFSPWD)`;							\
 #	if test ! -d LOGS; then rm -rf LOGS; mkdir LOGS; fi;		\
 #	for h in $(PLATFORM_HOSTS); do					\
 #		echo "On $$h: $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log";\
 #		rsh $$h -n "(chdir $$d;					\
 #			     $(MAKE) $(ALL_PLATFORMS) >& LOGS/$$h.log;	\
@@ -141,24 +156,24 @@ realclean clobber_all::
 #	cd $(@D); $(MAKE) $(@F)
 #endif
 
 #######################################################################
 # Double-Colon rules for populating the binary release model.         #
 #######################################################################
 
 
-release_clean::
+release_clean:: $(SUBMAKEFILES)
 	rm -rf $(SOURCE_XP_DIR)/release/$(RELEASE_MD_DIR)
 
-release:: release_clean release_export release_classes release_policy release_md release_jars release_cpdistdir
+release:: release_clean release_export release_classes release_md release_jars release_cpdistdir
 
-release_cpdistdir::
+release_cpdistdir:: $(SUBMAKEFILES)
 	@echo "== cpdist.pl =="
-	@perl -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/cpdist.pl \
+	@perl -I$(CORECONF_SOURCE) $(CORECONF_SOURCE)/cpdist.pl \
 		"RELEASE_TREE=$(RELEASE_TREE)" \
 		"CORE_DEPTH=$(CORE_DEPTH)" \
 		"MODULE=${MODULE}" \
 		"OS_ARCH=$(OS_ARCH)" \
 		"RELEASE=$(RELEASE)" \
 		"PLATFORM=$(PLATFORM)" \
 		"RELEASE_VERSION=$(RELEASE_VERSION)" \
 		"SOURCE_RELEASE_PREFIX=$(SOURCE_RELEASE_XP_DIR)" \
@@ -172,19 +187,19 @@ release_cpdistdir::
 		"$(MDBINARY_JAR)=$(SOURCE_RELEASE_MD_DIR)|m" \
 		"XP_FILES=$(XP_FILES)|xf" \
 		"MD_FILES=$(MD_FILES)|mf"
 
 
 # $(SOURCE_RELEASE_xxx_JAR) is a name like yyy.jar
 # $(SOURCE_RELEASE_xx_DIR)  is a name like 
 
-release_jars::
+release_jars:: $(SUBMAKEFILES)
 	@echo "== release.pl =="
-	@perl -I$(CORE_DEPTH)/coreconf $(CORE_DEPTH)/coreconf/release.pl \
+	@perl -I$(CORECONF_SOURCE) $(CORECONF_SOURCE)/release.pl \
 		"RELEASE_TREE=$(RELEASE_TREE)" \
 		"PLATFORM=$(PLATFORM)" \
 		"OS_ARCH=$(OS_ARCH)" \
 		"RELEASE_VERSION=$(RELEASE_VERSION)" \
 		"SOURCE_RELEASE_DIR=$(SOURCE_RELEASE_DIR)" \
 		"FILES=$(XPCLASS_JAR) $(XPCLASS_DBG_JAR) $(XPHEADER_JAR) $(MDHEADER_JAR) $(MDBINARY_JAR)" \
 		"$(XPCLASS_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)|b"\
 		"$(XPCLASS_DBG_JAR)=$(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)|b"\
@@ -227,39 +242,16 @@ release_classes::
 	$(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DIR)/$(PACKAGE)
 else
 release_classes::
 	$(INSTALL) -m 444 $(subst $$,\$$,$(RELEASE_DBG_FILES)) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_CLASSES_DBG_DIR)/$(PACKAGE)
 endif
 
 endif
 
-ifneq ($(POLICY),)
-release_policy::
-ifdef LIBRARY
-	-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(LIBRARY)
-endif
-ifdef SHARED_LIBRARY
-	-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(SHARED_LIBRARY)
-endif
-ifdef IMPORT_LIBRARY
-	-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(IMPORT_LIBRARY)
-endif
-ifdef PROGRAM
-	-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(PROGRAM)
-endif
-ifdef PROGRAMS
-	-$(PLCYPATCH) $(PLCYPATCH_ARGS) $(PROGRAMS)
-endif
-	+$(LOOP_OVER_DIRS)
-else
-release_policy::
-	+$(LOOP_OVER_DIRS)
-endif
-
 release_md::
 ifdef LIBRARY
 	$(INSTALL) -m 444 $(LIBRARY) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR)
 endif
 ifdef SHARED_LIBRARY
 	$(INSTALL) -m 555 $(SHARED_LIBRARY) $(SOURCE_RELEASE_PREFIX)/$(SOURCE_RELEASE_LIB_DIR)
 endif
 ifdef IMPORT_LIBRARY
@@ -275,17 +267,16 @@ endif
 
 
 alltags:
 	rm -f TAGS
 	find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
 	find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a
 
 $(PROGRAM): $(OBJS) $(EXTRA_LIBS)
-	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH),WINNT)
 ifeq ($(OS_TARGET),WIN16)
 	echo system windows >w16link
 	echo option map >>w16link
 	echo option oneautodata >>w16link
 	echo option heapsize=32K >>w16link
 	echo debug watcom all >>w16link
 	echo name $@ >>w16link
@@ -301,47 +292,42 @@ else
 endif
 else
 ifdef XP_OS2_VACPP
 	$(MKPROG) -Fe$@ $(CFLAGS) $(OBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
 else
 	$(MKPROG) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
 endif
 endif
-ifneq ($(POLICY),)
-	-$(PLCYPATCH) $(PLCYPATCH_ARGS) $@
-endif
 
 get_objs:
 	@echo $(OBJS)
 
-$(LIBRARY): $(OBJS)
-	@$(MAKE_OBJDIR)
+$(LIBRARY): $(OBJS) Makefile Makefile.in
 	rm -f $@
-	$(AR) $(OBJS)
+	$(AR) $(AR_FLAGS) $(OBJS)
 	$(RANLIB) $@
 
 ifeq ($(OS_TARGET), WIN16)
 $(IMPORT_LIBRARY): $(SHARED_LIBRARY)
 	wlib +$(SHARED_LIBRARY)
 endif
 
 ifeq ($(OS_ARCH),OS2)
 $(IMPORT_LIBRARY): $(OBJS)
 	rm -f $@
 	$(IMPLIB) $@ $(patsubst %.lib,%.dll.def,$@)
 	$(RANLIB) $@
 endif
 
 ifdef SHARED_LIBRARY_LIBS
-SUB_SHLOBJS = $(foreach dir,$(SHARED_LIBRARY_DIRS),$(addprefix $(dir)/,$(shell $(MAKE) -C $(dir) --no-print-directory get_objs)))
+SUB_SHLOBJS = $(foreach dir,$(SHARED_LIBRARY_DIRS),$(addprefix $(dir)/,$(shell $(MAKE) -C $(dir) --no-print-directory get_objs MDDEPEND_FILES=)))
 endif
 
-$(SHARED_LIBRARY): $(OBJS) $(MAPFILE)
-	@$(MAKE_OBJDIR)
+$(SHARED_LIBRARY): $(OBJS) $(MAPFILE) Makefile Makefile.in
 	rm -f $@
 ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
 	echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms
 	nm -B -C -g $(OBJS) \
 	| awk '/ [T,D] / {print $$3}' \
 	| sed -e 's/^\.//' \
 	| sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms
 	$(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \
@@ -379,178 +365,194 @@ else
 	$(MKSHLIB) -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
 endif
 	chmod +x $@
 ifeq ($(OS_ARCH),OpenVMS)
 	@echo "`translate $@`" > $(@:$(DLL_SUFFIX)=vms)
 endif
 endif
 endif
-ifneq ($(POLICY),)
-	-$(PLCYPATCH) $(PLCYPATCH_ARGS) $@
-endif
 
 ifeq ($(OS_ARCH), WINNT)
 $(RES): $(RESNAME)
-	@$(MAKE_OBJDIR)
 # The resource compiler does not understand the -U option.
 	$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
 	@echo $(RES) finished
 endif
 
 $(MAPFILE): $(LIBRARY_NAME).def
-	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH),SunOS)
-	grep -v ';-' $(LIBRARY_NAME).def | \
+	grep -v ';-' $(srcdir)/$(LIBRARY_NAME).def | \
 	 sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
 endif
 ifeq ($(OS_ARCH),Linux)
-	grep -v ';-' $(LIBRARY_NAME).def | \
+	grep -v ';-' $(srcdir)/$(LIBRARY_NAME).def | \
 	 sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
 endif
 ifeq ($(OS_ARCH),AIX)
-	grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \
+	grep -v ';+' $(srcdir)/$(LIBRARY_NAME).def | grep -v ';-' | \
 		sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@
 endif
 ifeq ($(OS_ARCH), HP-UX)
-	grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \
+	grep -v ';+' $(srcdir)/$(LIBRARY_NAME).def | grep -v ';-' | \
 	 sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,+e ,' > $@
 endif
 ifeq ($(OS_ARCH), OSF1)
-	grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \
+	grep -v ';+' $(srcdir)/$(LIBRARY_NAME).def | grep -v ';-' | \
  sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,-exported_symbol ,' > $@
 endif
 
 
 
 $(OBJDIR)/$(PROG_PREFIX)%$(PROG_SUFFIX): $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX)
-	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH),WINNT)
 	$(MKPROG) $(OBJDIR)/$(PROG_PREFIX)$*$(OBJ_SUFFIX) -Fe$@ -link \
 	$(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
 else
 	$(MKPROG) -o $@ $(OBJDIR)/$(PROG_PREFIX)$*$(OBJ_SUFFIX) \
 	$(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
 endif
 
 WCCFLAGS1 := $(subst /,\\,$(CFLAGS))
 WCCFLAGS2 := $(subst -I,-i=,$(WCCFLAGS1))
 WCCFLAGS3 := $(subst -D,-d,$(WCCFLAGS2))
 
 $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c
-	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
 ifeq ($(OS_TARGET), WIN16)
 	echo $(WCCFLAGS3) >w16wccf
 	$(CC) -zq -fo$(OBJDIR)\\$(PROG_PREFIX)$*$(OBJ_SUFFIX)  @w16wccf $*.c
 	rm w16wccf
 else
-	$(CC) -Fo$@ -c $(CFLAGS) $*.c
+	$(CC) -Fo$@ -c $(CFLAGS) $<
 endif
 else
 ifdef XP_OS2_VACPP
-	$(CC) -Fo$@ -c $(CFLAGS) $*.c
+	$(CC) -Fo$@ -c $(CFLAGS) $<
 else
-	$(CC) -o $@ -c $(CFLAGS) $*.c
+	$(CC) -o $@ -c $(CFLAGS) $<
 endif
 endif
 
 ifneq ($(OS_ARCH), WINNT)
 $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.s
-	@$(MAKE_OBJDIR)
-	$(AS) -o $@ $(ASFLAGS) -c $*.s
+	$(AS) -o $@ $(ASFLAGS) -c $<
 endif
 
 $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.asm
-	@$(MAKE_OBJDIR)
-	$(AS) -Fo$@ $(ASFLAGS) -c $*.asm
+	$(AS) -Fo$@ $(ASFLAGS) -c $<
 
 $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.S
-	@$(MAKE_OBJDIR)
-	$(AS) -o $@ $(ASFLAGS) -c $*.S
+	$(AS) -o $@ $(ASFLAGS) -c $<
 
 $(OBJDIR)/$(PROG_PREFIX)%: %.cpp
-	@$(MAKE_OBJDIR)
 ifeq ($(OS_ARCH), WINNT)
-	$(CCC) -Fo$@ -c $(CFLAGS) $<
+	$(CCC) -Fo$@ -c $(CXXFLAGS) $<
 else
-	$(CCC) -o $@ -c $(CFLAGS) $<
+	$(CCC) -o $@ -c $(CXXFLAGS) $<
 endif
 
 #
 # Please keep the next two rules in sync.
 #
 $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cc
-	@$(MAKE_OBJDIR)
 	$(CCC) -o $@ -c $(CFLAGS) $*.cc
 
 $(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.cpp
-	@$(MAKE_OBJDIR)
 ifdef STRICT_CPLUSPLUS_SUFFIX
 	echo "#line 1 \"$*.cpp\"" | cat - $*.cpp > $(OBJDIR)/t_$*.cc
-	$(CCC) -o $@ -c $(CFLAGS) $(OBJDIR)/t_$*.cc
+	$(CCC) -o $@ -c $(CXXFLAGS) $(OBJDIR)/t_$*.cc
 	rm -f $(OBJDIR)/t_$*.cc
 else
 ifeq ($(OS_ARCH),WINNT)
-	$(CCC) -Fo$@ -c $(CFLAGS) $*.cpp
+	$(CCC) -Fo$@ -c $(CXXFLAGS) $<
 else
 ifdef XP_OS2_VACPP
-	$(CCC) -Fo$@ -c $(CFLAGS) $*.cpp
+	$(CCC) -Fo$@ -c $(CXXFLAGS) $<
 else
-	$(CCC) -o $@ -c $(CFLAGS) $*.cpp
+	$(CCC) -o $@ -c $(CXXFLAGS) $<
 endif
 endif
 endif #STRICT_CPLUSPLUS_SUFFIX
 
 %.i: %.cpp
 ifeq ($(OS_TARGET), WIN16)
 	echo $(WCCFLAGS3) >w16wccf
-	$(CCC) -pl -fo=$* @w16wccf $*.cpp
+	$(CCC) -pl -fo=$* @w16wccf $<
 	rm w16wccf
 else
-	$(CCC) -C -E $(CFLAGS) $< > $*.i
+	$(CCC) -C -E $(CXXFLAGS) $< > $*.i
 endif
 
 %.i: %.c
 ifeq ($(OS_TARGET), WIN16)
 	echo $(WCCFLAGS3) >w16wccf
-	$(CC) -pl -fo=$* @w16wccf $*.c
+	$(CC) -pl -fo=$* @w16wccf $<
 	rm w16wccf
 else
 ifeq ($(OS_ARCH),WINNT)
 	$(CC) -C /P $(CFLAGS) $< 
 else
 	$(CC) -C -E $(CFLAGS) $< > $*.i
 endif
 endif
 
 ifneq ($(OS_ARCH), WINNT)
 %.i: %.s
 	$(CC) -C -E $(CFLAGS) $< > $*.i
 endif
 
 %: %.pl
-	rm -f $@; cp $*.pl $@; chmod +x $@
+	rm -f $@; cp $< $@; chmod +x $@
 
 %: %.sh
-	rm -f $@; cp $*.sh $@; chmod +x $@
+	rm -f $@; cp $< $@; chmod +x $@
+
+# Cancel these implicit rules
+#
+%: %,v
+
+%: RCS/%,v
+
+%: s.%      
+
+%: SCCS/s.%
 
 ifdef DIRS
 $(DIRS)::
 	@if test -d $@; then				\
 		set $(EXIT_ON_ERROR);			\
 		echo "cd $@; $(MAKE)";			\
 		cd $@; $(MAKE);				\
 		set +e;					\
 	else						\
 		echo "Skipping non-directory $@...";	\
 	fi;						\
 	$(CLICK_STOPWATCH)
 endif
 
+###############################################################################
+# Update Makefiles
+###############################################################################
+# Note: Passing depth to make-makefile is optional.
+#       It saves the script some work, though.
+Makefile: Makefile.in $(topsrcdir)/configure
+	@$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(MOD_DEPTH)
+
+ifdef SUBMAKEFILES
+# VPATH does not work on some machines in this case, so add $(srcdir)
+$(SUBMAKEFILES):
+	@$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(MOD_DEPTH) $@
+endif
+
+ifdef AUTOUPDATE_CONFIGURE
+$(topsrcdir)/configure: $(topsrcdir)/configure.in
+	(cd $(topsrcdir) && $(AUTOCONF)) && (cd $(DEPTH) && ./config.status --recheck)
+endif
+
 ################################################################################
 # Bunch of things that extend the 'export' rule (in order):
 ################################################################################
 
 $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE) $(JMCSRCDIR)::
 	@if test ! -d $@; then	    \
 		echo Creating $@;   \
 		rm -rf $@;	    \
@@ -580,17 +582,17 @@ endif
 ###
 
 ifneq ($(JSRCS),)
 ifneq ($(JAVAC),)
 ifdef NETLIBDEPTH
 	CORE_DEPTH := $(NETLIBDEPTH)
 endif
 
-JAVA_EXPORT_SRCS=$(shell perl $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG)	-d $(JAVA_DESTPATH)/$(PACKAGE) $(JSRCS) $(PRIVATE_JSRCS))
+JAVA_EXPORT_SRCS=$(shell perl $(CORECONF_SOURCE)/outofdate.pl $(PERLARG)	-d $(JAVA_DESTPATH)/$(PACKAGE) $(JSRCS) $(PRIVATE_JSRCS))
 
 export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE)
 ifneq ($(JAVA_EXPORT_SRCS),)
 	$(JAVAC) $(JAVA_EXPORT_SRCS)
 endif
 
 all:: export
 
@@ -616,17 +618,17 @@ ifdef NETLIBDEPTH
 	CORE_DEPTH := $(NETLIBDEPTH)
 endif
 
 export:: $(JAVA_DESTPATH) $(JAVA_DESTPATH)/$(PACKAGE)
 	@for d in $(JDIRS); do							\
 		if test -d $$d; then						\
 			set $(EXIT_ON_ERROR);					\
 			files=`echo $$d/*.java`;				\
-			list=`perl $(CORE_DEPTH)/coreconf/outofdate.pl $(PERLARG)	\
+			list=`perl $(CORECONF_SOURCE)/outofdate.pl $(PERLARG)	 \
 				    -d $(JAVA_DESTPATH)/$(PACKAGE) $$files`;	\
 			if test "$${list}x" != "x"; then			\
 			    echo Building all java files in $$d;		\
 			    echo $(JAVAC) $$list;				\
 			    $(JAVAC) $$list;					\
 			fi;							\
 			set +e;							\
 		else								\
@@ -668,25 +670,25 @@ JDK_STUB_CFILES		:= $(patsubst %,$(JDK_S
 $(JDK_STUB_CFILES): $(JDK_STUB_CLASSFILES)
 
 export::
 	@echo Generating/Updating JDK headers 
 	$(JAVAH) -d $(JDK_GEN_DIR) $(JDK_PACKAGE_CLASSES)
 	@echo Generating/Updating JDK stubs
 	$(JAVAH) -stubs -d $(JDK_STUB_DIR) $(JDK_PACKAGE_CLASSES)
 ifndef NO_MAC_JAVA_SHIT
-	@if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then						\
+	@if test ! -d $(topsrcdir)/lib/mac/Java/; then						\
 		echo "!!! You need to have a ns/lib/mac/Java directory checked out.";		\
 		echo "!!! This allows us to automatically update generated files for the mac.";	\
 		echo "!!! If you see any modified files there, please check them in.";		\
 	fi
 	@echo Generating/Updating JDK headers for the Mac
-	$(JAVAH) -mac -d $(CORE_DEPTH)/lib/mac/Java/_gen $(JDK_PACKAGE_CLASSES)
+	$(JAVAH) -mac -d $(topsrcdir)/lib/mac/Java/_gen $(JDK_PACKAGE_CLASSES)
 	@echo Generating/Updating JDK stubs for the Mac
-	$(JAVAH) -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_stubs $(JDK_PACKAGE_CLASSES)
+	$(JAVAH) -mac -stubs -d $(topsrcdir)/lib/mac/Java/_stubs $(JDK_PACKAGE_CLASSES)
 endif
 endif
 endif
 
 #
 # JRI_GEN -- for generating "old style" JRI native methods
 #
 # Generate JRI Headers and Stubs into the 'jri' directory
@@ -717,25 +719,25 @@ JRI_STUB_CFILES		:= $(patsubst %,$(JRI_G
 $(JRI_STUB_CFILES): $(JRI_STUB_CLASSFILES)
 
 export::
 	@echo Generating/Updating JRI headers 
 	$(JAVAH) -jri -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES)
 	@echo Generating/Updating JRI stubs
 	$(JAVAH) -jri -stubs -d $(JRI_GEN_DIR) $(JRI_PACKAGE_CLASSES)
 ifndef NO_MAC_JAVA_SHIT
-	@if test ! -d $(CORE_DEPTH)/lib/mac/Java/; then						\
+	@if test ! -d $(topsrcdir)/lib/mac/Java/; then						\
 		echo "!!! You need to have a ns/lib/mac/Java directory checked out.";		\
 		echo "!!! This allows us to automatically update generated files for the mac.";	\
 		echo "!!! If you see any modified files there, please check them in.";		\
 	fi
 	@echo Generating/Updating JRI headers for the Mac
-	$(JAVAH) -jri -mac -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
+	$(JAVAH) -jri -mac -d $(TOPSRCDIR)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
 	@echo Generating/Updating JRI stubs for the Mac
-	$(JAVAH) -jri -mac -stubs -d $(CORE_DEPTH)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
+	$(JAVAH) -jri -mac -stubs -d $(TOPSRCDIR)/lib/mac/Java/_jri $(JRI_PACKAGE_CLASSES)
 endif
 endif
 endif
 
 #
 # JNI_GEN -- for generating JNI native methods
 #
 # Generate JNI Headers into the 'jni' directory
@@ -745,17 +747,17 @@ ifneq ($(JAVAH),)
 JNI_HEADERS		:= $(patsubst %,$(JNI_GEN_DIR)/%.h,$(JNI_GEN))
 
 export::
 	@if test ! -d $(JNI_GEN_DIR); then						\
 		echo $(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN);			\
 		$(JAVAH) -jni -d $(JNI_GEN_DIR) $(JNI_GEN);				\
 	else										\
 		echo "Checking for out of date header files" ;                          \
-		cmd="perl $(CORE_DEPTH)/coreconf/jniregen.pl $(PERLARG)			\
+		cmd="perl $(CORECONF_SOURCE)/jniregen.pl $(PERLARG)			\
 				-d $(JAVA_DESTPATH) $(JNI_GEN)";			\
 		echo $$cmd;								\
 		list=`$$cmd`;								\
 		if test "$${list}x" != "x"; then					\
 			echo $(JAVAH) -jni -d $(JNI_GEN_DIR) $$list;			\
 			$(JAVAH) -jni -d $(JNI_GEN_DIR) $$list;				\
 		fi									\
 	fi
@@ -792,17 +794,16 @@ ifneq ($(JMC),)
 
 $(JMC_GEN_DIR)/M%.h: $(JMCSRCDIR)/%.class
 	$(JMC) -d $(JMC_GEN_DIR) -interface $(JMC_GEN_FLAGS) $(?F:.class=)
 
 $(JMC_GEN_DIR)/M%.c: $(JMCSRCDIR)/%.class
 	$(JMC) -d $(JMC_GEN_DIR) -module $(JMC_GEN_FLAGS) $(?F:.class=)
 
 $(OBJDIR)/M%$(OBJ_SUFFIX): $(JMC_GEN_DIR)/M%.h $(JMC_GEN_DIR)/M%.c
-	@$(MAKE_OBJDIR)
 	$(CC) -o $@ -c $(CFLAGS) $(JMC_GEN_DIR)/M$*.c
 
 export:: $(JMC_HEADERS) $(JMC_STUBS)
 endif
 endif
 
 #
 # Copy each element of EXPORTS to $(SOURCE_XP_DIR)/public/$(MODULE)/
@@ -810,16 +811,18 @@ endif
 PUBLIC_EXPORT_DIR = $(SOURCE_XP_DIR)/public/$(MODULE)
 ifeq ($(OS_ARCH),WINNT)
 ifeq ($(OS_TARGET),WIN16)
 PUBLIC_EXPORT_DIR = $(SOURCE_XP_DIR)/public/win16
 endif
 endif
 
 ifneq ($(EXPORTS),)
+EXPORTS := $(addprefix $(srcdir)/, $(EXPORTS))
+EXPORTS += $(GEN_EXPORTS)
 $(PUBLIC_EXPORT_DIR)::
 	@if test ! -d $@; then	    \
 		echo Creating $@;   \
 		$(NSINSTALL) -D $@; \
 	fi
 
 export:: $(EXPORTS) $(PUBLIC_EXPORT_DIR)
 	$(INSTALL) -m 444 $(EXPORTS) $(PUBLIC_EXPORT_DIR)
@@ -836,16 +839,17 @@ endif
 
 ifneq ($(PRIVATE_EXPORTS),)
 $(PRIVATE_EXPORT_DIR)::
 	@if test ! -d $@; then	    \
 		echo Creating $@;   \
 		$(NSINSTALL) -D $@; \
 	fi
 
+PRIVATE_EXPORTS := $(addprefix $(srcdir)/, $(PRIVATE_EXPORTS))
 private_export:: $(PRIVATE_EXPORTS) $(PRIVATE_EXPORT_DIR)
 	$(INSTALL) -m 444 $(PRIVATE_EXPORTS) $(PRIVATE_EXPORT_DIR)
 else
 private_export:: 
 	@echo There are no private exports.;
 endif
 
 ##########################################################################
@@ -889,16 +893,17 @@ release_export:: $(EXPORTS) $(SOURCE_REL
 	$(INSTALL) -m 444 $(EXPORTS) $(SOURCE_RELEASE_XP_DIR)/include
 endif
 
 
 
 
 ################################################################################
 
+ifndef NO_MDUPDATE
 -include $(DEPENDENCIES)
 
 ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
 # Can't use sed because of its 4000-char line length limit, so resort to perl
 .DEFAULT:
 	@perl -e '                                                            \
 	    open(MD, "< $(DEPENDENCIES)");                                    \
 	    while (<MD>) {                                                    \
@@ -923,68 +928,106 @@ ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH
 		if (!rename($$tmpname, "$(DEPENDENCIES)")) {                  \
 		    unlink(($$tmpname));                                      \
 		}                                                             \
 	    } elsif ("$<" ne "$(DEPENDENCIES)") {                             \
 		print "$(MAKE): *** No rule to make target $<.  Stop.\n";     \
 		exit(1);                                                      \
 	    }'
 endif
+endif
 
 #############################################################################
 # X dependency system
 #############################################################################
 
 ifdef MKDEPENDENCIES
 
 # For Windows, $(MKDEPENDENCIES) must be -included before including rules.mk
+DEPEND_SOURCES = $(addprefix $(srcdir)/, $(CSRCS) $(CPPSRCS) $(ASFILES))
 
 $(MKDEPENDENCIES)::
-	@$(MAKE_OBJDIR)
 	touch $(MKDEPENDENCIES) 
 	chmod u+w $(MKDEPENDENCIES) 
 #on NT, the preceeding touch command creates a read-only file !?!?!
 #which is why we have to explicitly chmod it.
-	$(MKDEPEND) -p$(OBJDIR_NAME)/ -o'$(OBJ_SUFFIX)' -f$(MKDEPENDENCIES) \
-$(NOMD_CFLAGS) $(YOPT) $(CSRCS) $(CPPSRCS) $(ASFILES)
+	$(MKDEPEND) $(OBJDIR_OPTION) -o'$(OBJ_SUFFIX)' -f$(MKDEPENDENCIES) \
+$(NOMD_CFLAGS) $(YOPT) $(DEPEND_SOURCES)
+	@mv $(MKDEPENDENCIES) depend.mk.old && cat depend.mk.old | sed "s|^$(srcdir)/||g" > $(MKDEPENDENCIES) && rm -f depend.mk.old
 
-$(MKDEPEND):: $(MKDEPEND_DIR)/*.c $(MKDEPEND_DIR)/*.h
+$(MKDEPEND):: $(MKDEPEND_SRCDIR)/*.c $(MKDEPEND_SRCDIR)/*.h
+	cd $(NSINSTALL_DIR); $(MAKE) nsinstall
 	cd $(MKDEPEND_DIR); $(MAKE)
 
 ifdef OBJS
-depend:: $(MKDEPEND) $(MKDEPENDENCIES)
+depend:: $(SUBMAKEFILES) $(MAKE_DIRS) $(MKDEPEND) $(MKDEPENDENCIES)
 else
 depend::
 endif
 	+$(LOOP_OVER_DIRS)
 
 dependclean::
 	rm -f $(MKDEPENDENCIES)
 	+$(LOOP_OVER_DIRS)
 
-#-include $(NSINSTALL_DIR)/$(OBJDIR)/depend.mk
+-include $(MKDEPENDENCIES)
 
 else
 depend::
 endif
 
+#############################################################################
+# Yet another depend system: -MD (configure switch: --enable-md)
+ifdef COMPILER_DEPEND
+ifdef OBJS
+# MDDEPDIR is the subdirectory where all the dependency files are placed.
+#   This uses a make rule (instead of a macro) to support parallel
+#   builds (-jN). If this were done in the LOOP_OVER_DIRS macro, two
+#   processes could simultaneously try to create the same directory.
+#   
+$(MDDEPDIR):
+	@if test ! -d $@; then echo Creating $@; rm -rf $@; mkdir $@; else true; fi
+
+MDDEPEND_FILES          := $(wildcard $(MDDEPDIR)/*.pp)
+
+ifdef MDDEPEND_FILES
+ifdef PERL
+# The script mddepend.pl checks the dependencies and writes to stdout
+# one rule to force out-of-date objects. For example,
+#   foo.o boo.o: FORCE
+# The script has an advantage over including the *.pp files directly
+# because it handles the case when header files are removed from the build.
+# 'make' would complain that there is no way to build missing headers.   
+$(MDDEPDIR)/.all.pp: FORCE
+	@$(PERL) $(BUILD_TOOLS)/mddepend.pl $@ $(MDDEPEND_FILES)
+-include $(MDDEPDIR)/.all.pp
+else
+include $(MDDEPEND_FILES)
+endif
+endif
+endif
+endif
+
 ################################################################################
 # Special gmake rules.
 ################################################################################
 
 #
 # Re-define the list of default suffixes, so gmake won't have to churn through
 # hundreds of built-in suffix rules for stuff we don't need.
 #
 .SUFFIXES:
-.SUFFIXES: .out .a .ln .o .obj .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .class .java .html .asm
+.SUFFIXES: .out .a .ln .o .obj .c .cc .C .cpp .y .l .s .S .h .sh .i .pl .class .java .html .asm .pp .mk .in .mn
 
 #
 # Don't delete these files if we get killed.
 #
 .PRECIOUS: .java $(JDK_HEADERS) $(JDK_STUBS) $(JRI_HEADERS) $(JRI_STUBS) $(JMC_HEADERS) $(JMC_STUBS) $(JNI_HEADERS)
 
 #
 # Fake targets.  Always run these rules, even if a file/directory with that
 # name already exists.
 #
-.PHONY: all all_platforms alltags boot clean clobber clobber_all export install libs realclean release $(OBJDIR) $(DIRS)
+.PHONY: all all_platforms alltags boot clean clobber clobber_all export install libs realclean release $(OBJDIR) $(DIRS) FORCE
 
+# Used as a dependency to force targets to rebuild
+FORCE:
+
--- a/security/coreconf/ruleset.mk
+++ b/security/coreconf/ruleset.mk
@@ -107,24 +107,17 @@ ifeq ($(OS_ARCH), OpenVMS)
 endif
 
 #
 #  At this time, the COMPILER_TAG value is actually assigned.
 #
 
 ifndef COMPILER_TAG
 ifneq ($(DEFAULT_COMPILER), $(CC))
-#
-# Temporary define for the Client; to be removed when binary release is used
-#
-	ifdef MOZILLA_CLIENT
-		COMPILER_TAG =
-	else
-		COMPILER_TAG = _$(CC)
-	endif
+	COMPILER_TAG = _$(CC)
 else
 	COMPILER_TAG =
 endif
 endif
 
 #
 #  At this time, a default value of $(CC) is assigned to MKPROG.
 #
@@ -210,28 +203,38 @@ ifeq ($(OS_TARGET), WIN16)
 		W16LIBS := library $(subst $(space),$(comma)$(space),$(strip $(W16TEMP)))
 	endif
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 	ifneq ($(OS_TARGET), WIN16)
 		OBJS += $(RES)
 	endif
-	MAKE_OBJDIR		= $(INSTALL) -D $(OBJDIR)
-else
-	define MAKE_OBJDIR
-	if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
-	endef
 endif
 
 ifndef PACKAGE
 	PACKAGE = .
 endif
 
-ALL_TRASH :=	$(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \
+# SUBMAKEFILES: List of Makefiles for next level down.
+#   This is used to update or create the Makefiles before invoking them.
+ifneq ($(DIRS),)
+SUBMAKEFILES            := $(addsuffix /Makefile, $(filter-out $(STATIC_MAKEFILES), $(DIRS)))
+endif
+
+ALL_TRASH =	$(TARGETS) $(OBJS)
+
+ifdef COMPILER_DEPEND
+ifdef OBJS
+MAKE_DIRS		+= $(MDDEPDIR)
+ALL_TRASH		+= $(MDDEPDIR)
+endif
+endif
+
+ALL_TRASH +=	LOGS TAGS $(GARBAGE) \
 		$(NOSUCHFILE) $(JDK_HEADER_CFILES) $(JDK_STUB_CFILES) \
 		$(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) $(JNI_HEADERS) $(JMC_STUBS) \
 		$(JMC_HEADERS) $(JMC_EXPORT_FILES) so_locations \
 		_gen _jmc _jri _jni _stubs \
 		$(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class)
 
 ifdef JDIRS
 	ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS))
@@ -246,42 +249,46 @@ ifdef NSBUILDROOT
 else
 	JDK_GEN_DIR  = _gen
 	JMC_GEN_DIR  = _jmc
 	JNI_GEN_DIR  = _jni
 	JRI_GEN_DIR  = _jri
 	JDK_STUB_DIR = _stubs
 endif
 
-#
-# If this is an "official" build, try to build everything.
-# I.e., don't exit on errors.
-#
-
+EXIT_ON_ERROR	= -e
 ifdef BUILD_OFFICIAL
-	EXIT_ON_ERROR		= +e
 	CLICK_STOPWATCH		= date
 else
-	EXIT_ON_ERROR		= -e
 	CLICK_STOPWATCH		= true
 endif
 
 ifdef REQUIRES
 ifeq ($(OS_TARGET),WIN16)
 	INCLUDES        += -I$(SOURCE_XP_DIR)/public/win16
 else
 	MODULE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/public/, $(REQUIRES))
 	INCLUDES        += $(MODULE_INCLUDES)
 	ifeq ($(MODULE), sectools)
 		PRIVATE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/private/, $(REQUIRES))
 		INCLUDES         += $(PRIVATE_INCLUDES)
 	endif
 endif
 endif
 
+ifdef NSPR_CFLAGS
+INCLUDES += $(NSPR_CFLAGS)
+else
+INCLUDES += -I$(SYSTEM_XP_DIR)/include/nspr
+endif
+
+ifdef DBM_CFLAGS
+INCLUDES += $(DBM_CFLAGS)
+endif
+
 ifdef SYSTEM_INCL_DIR
 	YOPT = -Y$(SYSTEM_INCL_DIR)
 endif
 
 ifdef DIRS
 	LOOP_OVER_DIRS		=						\
 		@for directory in $(DIRS); do					\
 			if test -d $$directory; then				\
@@ -296,37 +303,14 @@ ifdef DIRS
 		done
 endif
 
 
 
 # special stuff for tests rule in rules.mk
 
 ifneq ($(OS_ARCH),WINNT)
-	REGDATE = $(subst \ ,, $(shell perl  $(CORE_DEPTH)/$(MODULE)/scripts/now))
+	REGDATE = $(subst \ ,, $(shell perl  $(topsrcdir)/$(MODULE)/scripts/now))
 else
-	REGCOREDEPTH = $(subst \\,/,$(CORE_DEPTH))
-	REGDATE = $(subst \ ,, $(shell perl  $(CORE_DEPTH)/$(MODULE)/scripts/now))
+	REGCOREDEPTH = $(subst \\,/,$(topsrcdir))
+	REGDATE = $(subst \ ,, $(shell perl  $(topsrcdir)/$(MODULE)/scripts/now))
 endif
 
-#
-# export control policy patcher program and arguments
-#
-
-PLCYPATCH     = $(SOURCE_BIN_DIR)/plcypatch$(PROG_SUFFIX)
-
-DOMESTIC_POLICY = -us
-EXPORT_POLICY   = -ex
-FRANCE_POLICY   = -fr
-
-ifeq ($(POLICY), domestic)
-	PLCYPATCH_ARGS = $(DOMESTIC_POLICY)
-else
-	ifeq ($(POLICY), export)
-		PLCYPATCH_ARGS = $(EXPORT_POLICY)
-	else
-		ifeq ($(POLICY), france)
-			PLCYPATCH_ARGS = $(FRANCE_POLICY)
-		else
-			PLCYPATCH_ARGS =
-		endif
-	endif
-endif
--- a/security/coreconf/source.mk
+++ b/security/coreconf/source.mk
@@ -34,17 +34,17 @@
 #######################################################################
 # Master <component>-specific source import/export directories        #
 #######################################################################
 
 #
 # <user_source_tree> master import/export directory prefix
 #
 
-SOURCE_PREFIX = $(CORE_DEPTH)/../dist
+SOURCE_PREFIX = $(DIST)
 
 #
 # <user_source_tree> cross-platform (xp) master import/export directory
 #
 
 SOURCE_XP_DIR        = $(SOURCE_PREFIX)
 
 #
@@ -76,43 +76,16 @@ SOURCE_BIN_DIR       = $(SOURCE_MD_DIR)/
 SOURCE_LIB_DIR       = $(SOURCE_MD_DIR)/lib
 SOURCE_MDHEADERS_DIR = $(SOURCE_MD_DIR)/include
 
 #######################################################################
 # Master <component>-specific source release directories and files    #
 #######################################################################
 
 #
-# <user_source_tree> source-side master release directory prefix
-# NOTE:  export control policy enforced for XP and MD files released to
-#        the staging area
-#
-
-ifeq ($(POLICY), domestic)
-	SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/domestic
-else
-	ifeq ($(POLICY), export)
-		SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/export
-	else
-		ifeq ($(POLICY), france)
-			SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/france
-		else
-#We shouldn't have to put another directory under here, but without it the perl
-#script for releasing doesn't find the directory. It thinks it doesn't exist.
-#So we're adding this no-policy directory so that the script for releasing works
-#in all casese when policy is not set. This doesn't affect where the final jar
-#files land, only where they are placed in the local tree when building the jar
-#files. When there is no policy, the jar files will still land in
-#<dist>/<module>/<date>/<platform> like they used to.
-			SOURCE_RELEASE_PREFIX = $(SOURCE_PREFIX)/release/no-policy
-		endif
-	endif
-endif
-
-#
 # <user_source_tree> cross-platform (xp) source-side master release directory
 #
 
 SOURCE_RELEASE_XP_DIR = $(SOURCE_RELEASE_PREFIX)
 
 #
 # <user_source_tree> cross-platform (xp) source-side release directories
 #
--- a/security/coreconf/tree.mk
+++ b/security/coreconf/tree.mk
@@ -30,17 +30,17 @@
 # may use your version of this file under either the MPL or the
 # GPL.
 #
 
 #######################################################################
 # Master "Core Components" file system "release" prefixes             #
 #######################################################################
 
-#	RELEASE_TREE = $(CORE_DEPTH)/../coredist
+#	RELEASE_TREE = $(MOD_DEPTH)/../coredist
 
 
 ifndef RELEASE_TREE
 	ifdef BUILD_SHIP
 		ifdef USE_SHIPS 
 			RELEASE_TREE = $(BUILD_SHIP)
 		else
 			RELEASE_TREE = /share/builds/components
@@ -79,36 +79,12 @@ ifndef RELEASE_TREE
 			RELEASE_TREE = //hs-sca15c/components
 		endif
 	else
 		RELEASE_TREE = //hs-sca15c/components
 	endif
 	endif
 endif
 
-#
-# NOTE:  export control policy enforced for XP and MD files
-#        released to the binary release tree
-#
-
-ifeq ($(POLICY), domestic)
-	RELEASE_XP_DIR = domestic
-	RELEASE_MD_DIR = domestic/$(PLATFORM)
-else
-	ifeq ($(POLICY), export)
-		RELEASE_XP_DIR = export
-		RELEASE_MD_DIR = export/$(PLATFORM)
-	else
-		ifeq ($(POLICY), france)
-			RELEASE_XP_DIR = france
-			RELEASE_MD_DIR = france/$(PLATFORM)
-		else
-			RELEASE_XP_DIR = 
-			RELEASE_MD_DIR = $(PLATFORM)
-		endif
-	endif
-endif
-
-
 REPORTER_TREE = $(subst \,\\,$(RELEASE_TREE))
 
 IMPORT_XP_DIR = 
 IMPORT_MD_DIR = $(PLATFORM)
deleted file mode 100644
--- a/security/dbm/Makefile
+++ /dev/null
@@ -1,80 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-#######################################################################
-# (1) Include initial platform-independent assignments (MANDATORY).   #
-#######################################################################
-
-include manifest.mn
-
-#######################################################################
-# (2) Include "global" configuration information. (OPTIONAL)          #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/config.mk
-
-#######################################################################
-# (3) Include "component" configuration information. (OPTIONAL)       #
-#######################################################################
-
-
-
-#######################################################################
-# (4) Include "local" platform-dependent assignments (OPTIONAL).      #
-#######################################################################
-
-
-
-#######################################################################
-# (5) Execute "global" rules. (OPTIONAL)                              #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/rules.mk
-
-#######################################################################
-# (6) Execute "component" rules. (OPTIONAL)                           #
-#######################################################################
-
-
-
-#######################################################################
-# (7) Execute "local" rules. (OPTIONAL).                              #
-#######################################################################
-
-coreconf_hack:
-	cd ../coreconf; gmake
-	gmake import
-
-RelEng_bld: coreconf_hack
-	gmake
deleted file mode 100644
--- a/security/dbm/include/Makefile
+++ /dev/null
@@ -1,96 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-#######################################################################
-# (1) Include initial platform-independent assignments (MANDATORY).   #
-#######################################################################
-
-include manifest.mn
-
-#######################################################################
-# (2) Include "global" configuration information. (OPTIONAL)          #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/config.mk
-
-#######################################################################
-# (3) Include "component" configuration information. (OPTIONAL)       #
-#######################################################################
-
-
-
-#######################################################################
-# (4) Include "local" platform-dependent assignments (OPTIONAL).      #
-#######################################################################
-
-
-
-#######################################################################
-# (5) Execute "global" rules. (OPTIONAL)                              #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/rules.mk
-
-#######################################################################
-# (6) Execute "component" rules. (OPTIONAL)                           #
-#######################################################################
-
-
-
-#######################################################################
-# (7) Execute "local" rules. (OPTIONAL).                              #
-#######################################################################
-
-CPORLN = ln -s
-ifeq ($(OS_ARCH),WINNT)
-CPORLN = cp
-endif
-
-DBM_SRCS = $(EXPORTS) $(PRIVATE_EXPORTS) watcomfx.h
-
-ALL_TRASH += $(DBM_SRCS)
-
-$(DBM_SRCS) : % : $(CORE_DEPTH)/../dbm/include/%
-	-$(CPORLN) $< .
-
-export:: $(DBM_SRCS)
-
-libs:: $(DBM_SRCS)
-
-program:: $(DBM_SRCS)
-
-private_export:: $(DBM_SRCS)
-
-echo::
-	echo "$(DBM_SRCS)"
deleted file mode 100644
--- a/security/dbm/include/manifest.mn
+++ /dev/null
@@ -1,55 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-CORE_DEPTH = ../..
-
-MODULE = dbm
-
-EXPORTS =	nsres.h   \
-		cdefs.h   \
-		mcom_db.h \
-		ncompat.h \
-		winfile.h \
-		$(NULL)
-
-PRIVATE_EXPORTS =	hsearch.h \
-			page.h    \
-			extern.h  \
-			ndbm.h    \
-			queue.h   \
-			hash.h    \
-			mpool.h   \
-			search.h  \
-			$(NULL)
-
deleted file mode 100644
--- a/security/dbm/manifest.mn
+++ /dev/null
@@ -1,46 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-CORE_DEPTH = ..
-
-MODULE = dbm
-
-#IMPORTS = nspr20/v3.5
-IMPORTS = nspr20/v4.0
-
-RELEASE = dbm
-
-DIRS =  include \
-        src     \
-	$(NULL)
deleted file mode 100644
--- a/security/dbm/src/Makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-#######################################################################
-# (1) Include initial platform-independent assignments (MANDATORY).   #
-#######################################################################
-
-include manifest.mn
-
-#######################################################################
-# (2) Include "global" configuration information. (OPTIONAL)          #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/config.mk
-
-#######################################################################
-# (3) Include "component" configuration information. (OPTIONAL)       #
-#######################################################################
-
-
-
-#######################################################################
-# (4) Include "local" platform-dependent assignments (OPTIONAL).      #
-#######################################################################
-
-include config.mk
-
-#######################################################################
-# (5) Execute "global" rules. (OPTIONAL)                              #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/rules.mk
-
-#######################################################################
-# (6) Execute "component" rules. (OPTIONAL)                           #
-#######################################################################
-
-ifeq ($(OS_CONFIG),OSF1V4.0D)
-INCLUDES	+= -I/usr/sys/include/arch/alpha
-endif
-
-#######################################################################
-# (7) Execute "local" rules. (OPTIONAL).                              #
-#######################################################################
-
-
-CPORLN = ln -s
-ifeq ($(OS_ARCH),WINNT)
-CPORLN = cp
-endif
-
-DBM_SRCS = $(CSRCS)
-
-ALL_TRASH += $(DBM_SRCS)
-
-$(DBM_SRCS) : % : $(CORE_DEPTH)/../dbm/src/%
-	-$(CPORLN) $< .
-
-export:: $(DBM_SRCS)
-
-libs:: $(DBM_SRCS)
-
-program:: $(DBM_SRCS)
-
-private_export:: $(DBM_SRCS)
-
-echo::
-	echo "$(DBM_SRCS)"
deleted file mode 100644
--- a/security/dbm/src/config.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG) -DNSPR20=1
-
-INCLUDES += -I../include
-
-#
-#  Currently, override TARGETS variable so that only static libraries
-#  are specifed as dependencies within rules.mk.
-#
-
-TARGETS        = $(LIBRARY)
-SHARED_LIBRARY =
-IMPORT_LIBRARY =
-PURE_LIBRARY   =
-PROGRAM        =
-
-ifdef SHARED_LIBRARY
-	ifeq ($(OS_ARCH),WINNT)
-		ifneq ($(OS_TARGET),WIN16)
-			DLLBASE=/BASE:0x30000000
-			RES=$(OBJDIR)/dbm.res
-			RESNAME=../include/dbm.rc
-		endif
-	endif
-	ifeq ($(DLL_SUFFIX),dll)
-		DEFINES += -D_DLL
-	endif
-endif
-
-ifeq ($(OS_ARCH),AIX)
-	OS_LIBS += -lc_r
-endif
deleted file mode 100644
--- a/security/dbm/src/manifest.mn
+++ /dev/null
@@ -1,55 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-CORE_DEPTH = ../..
-
-MODULE = dbm
-
-CSRCS = db.c	   \
-	h_bigkey.c \
-	h_func.c   \
-	h_log2.c   \
-	h_page.c   \
-	hash.c	   \
-	hash_buf.c \
-	hsearch.c  \
-	memmove.c  \
-	mktemp.c   \
-	ndbm.c	   \
-#	snprintf.c \
-	strerror.c \
-	nsres.c	   \
-	$(NULL)
-
-LIBRARY_NAME = dbm
deleted file mode 100644
--- a/security/dbm/tests/Makefile
+++ /dev/null
@@ -1,131 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-DEPTH		= ../..
-CORE_DEPTH	= ../..
-
-MODULE		= dbm
-
-CSRCS		= lots.c
-
-PROGRAM		= lots
-
-include $(DEPTH)/coreconf/config.mk
-
-ifeq ($(OS_ARCH),WINNT)
-DEFINES		+= -DSTDARG
-LIBDBM		= ../src/$(PLATFORM)/dbm$(STATIC_LIB_SUFFIX)
-else
-LIBDBM		= ../src/$(PLATFORM)/libdbm$(STATIC_LIB_SUFFIX)
-endif
-
-ifeq ($(OS_ARCH),AIX)
-CFLAGS		+= -DSTDARG
-endif
-
-ifeq ($(OS_ARCH),BSD_386)
-CFLAGS		+= -g -I../../../include -DXP_UNIX -g -DBSDI -DHAVE_STRERROR -D__386BSD__ -DDEBUG -DMEMMOVE -D__DBINTERFACE_PRIVATE 
-endif
-
-ifeq ($(OS_ARCH),FreeBSD)
-CFLAGS		+= -DSTDARG
-endif
-
-ifeq ($(OS_ARCH),HP-UX)
-CFLAGS		+= -DSTDARG
-endif
-
-ifeq ($(OS_ARCH),IRIX)
-CFLAGS		+= -g -I../../../include -DDEBUG -DSTDARG
-endif
-
-ifeq ($(OS_ARCH),OSF1)
-CFLAGS		+= -DSTDARG
-endif
-
-ifeq ($(OS_ARCH),Linux)
-CFLAGS		+= -DSTDARG
-endif
-
-ifeq ($(OS_ARCH),NCR)
-CFLAGS		+= -DSTDARG
-endif
-
-ifeq ($(OS_ARCH),SCO_SV)
-CFLAGS		+= -DSTDARG
-endif
-
-ifeq ($(OS_ARCH),SunOS)
-CFLAGS		+= -g -I../../../include -D_sun_
-endif
-
-ifeq ($(OS_ARCH),UNIXWARE)
-CFLAGS		+= -DSTDARG
-endif
-
-INCLUDES	+= -I../include
-
-LDFLAGS		= $(LDOPTS) $(LIBDBM)
-
-include $(DEPTH)/coreconf/rules.mk
-
-lots.pure: lots
-	purify $(CC) -o lots.pure $(CFLAGS) $(OBJS) $(MYLIBS)
-
-crash: crash.o $(MYLIBS)
-	$(CC) -o crash $(CFLAGS) crash.o $(MYLIBS)
-
-crash.pure: crash.o $(MYLIBS)
-	purify $(CC) -o crash.pure $(CFLAGS) crash.o $(MYLIBS)
-
-
-CPORLN = ln -s
-ifeq ($(OS_ARCH),WINNT)
-CPORLN = cp
-endif
-
-DBM_SRCS = $(CSRCS)
-
-ALL_TRASH += $(DBM_SRCS)
-
-$(DBM_SRCS) : % : $(CORE_DEPTH)/../dbm/tests/%
-	-$(CPORLN) $< .
-
-export:: $(DBM_SRCS)
-
-libs:: $(DBM_SRCS)
-
-program:: $(DBM_SRCS)
-
-private_export:: $(DBM_SRCS)
-
new file mode 100644
--- /dev/null
+++ b/security/nss/.cvsignore
@@ -0,0 +1,1 @@
+Makefile
deleted file mode 100644
--- a/security/nss/Makefile
+++ /dev/null
@@ -1,122 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Mozilla Public
-# License Version 1.1 (the "License"); you may not use this file
-# except in compliance with the License. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-# 
-# Software distributed under the License is distributed on an "AS
-# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-# implied. See the License for the specific language governing
-# rights and limitations under the License.
-# 
-# The Original Code is the Netscape security libraries.
-# 
-# The Initial Developer of the Original Code is Netscape
-# Communications Corporation.  Portions created by Netscape are 
-# Copyright (C) 1994-2000 Netscape Communications Corporation.  All
-# Rights Reserved.
-# 
-# Contributor(s):
-# 
-# Alternatively, the contents of this file may be used under the
-# terms of the GNU General Public License Version 2 or later (the
-# "GPL"), in which case the provisions of the GPL are applicable 
-# instead of those above.  If you wish to allow use of your 
-# version of this file only under the terms of the GPL and not to
-# allow others to use your version of this file under the MPL,
-# indicate your decision by deleting the provisions above and
-# replace them with the notice and other provisions required by
-# the GPL.  If you do not delete the provisions above, a recipient
-# may use your version of this file under either the MPL or the
-# GPL.
-#
-
-#######################################################################
-# (1) Include initial platform-independent assignments (MANDATORY).   #
-#######################################################################
-
-include manifest.mn
-
-#######################################################################
-# (2) Include "global" configuration information. (OPTIONAL)          #
-#######################################################################
-
-include $(CORE_DEPTH)/coreconf/config.mk
-
-#######################################################################
-# (3) Include "component" configuration information. (OPTIONAL)       #
-#######################################################################
-
-
-
-#######################################################################
-# (4) Include "local" platform-dependent assignments (OPTIONAL).      #
-################################