NOTE: This patch has been committed.
First patch of an old build ws.
nt/ChangeLog addition:
2005-09-26 Ben Wing <ben(a)xemacs.org>
* README:
Major rewrite. Document how to compile various optional libs.
* config.inc.samp:
Update to recent versions of optional libs. Add support for
gmp, db, postgresql, ldap. Turn on optimization when not debug.
* minitar.c:
Include config.h.
* xemacs.mak:
* xemacs.mak (HAVE_WIDGETS):
* xemacs.mak (OPT_DEFINES):
* xemacs.mak (OPT_OBJS):
* xemacs.mak (BROWSERFLAGS):
* xemacs.mak (INCLUDES):
* xemacs.mak (DEFINES):
* xemacs.mak (TEMACS_COMMON_OBJS):
* xemacs.mak (TEMACS_OBJS):
* xemacs.mak ($(OUTDIR)\postgresql.obj):
* xemacs.mak ($(BLDLIB_SRC)/minitar.exe):
* xemacs.mak ( NOTE):
* xemacs.mak (TEMACS_LIBS):
* xemacs.mak ($(RAW_EXE)):
* xemacs.mak (mostlyclean):
* xemacs.mak (versionclean):
Figure out VC++ version and use it to set debug and browser flags
appropriately.
Add support for building gmp, db, postgresql, ldap.
Rewrite handling of optional stuff so it is all added to single
variables OPT_* rather than to various FOO_* variables.
Pass -I$(SRC) to minitar.c so it compiles.
Pass module sources, not objects, to make-docfile.
Delete more stuff in `make clean'.
build source patch:
Diff command: bash -ci "cvs-diff --show-c-function -no-changelog "
Files affected: nt/xemacs.mak nt/minitar.c nt/config.inc.samp nt/README
Mon Sep 26 03:12:21 CDT 2005
cvs server: Diffing nt
Index: nt/README
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/README,v
retrieving revision 1.26
diff -u -p -r1.26 README
--- nt/README 2003/11/06 15:12:33 1.26
+++ nt/README 2005/09/26 08:12:38
@@ -1,18 +1,21 @@
Building and Installing XEmacs on Windows 95/98/NT/2000/XP -*- mode:outline -*-
+ Ben Wing
+
+ based on old version by
+
David Hobley
Marc Paquette
Jonathan Harris
- Ben Wing
-This is a port of XEmacs to Windows 95/98/NT/2000/XP. If you are looking for a
-port of GNU Emacs, get the latest release of the 21.x series from
gnu.org.
-(At the time of writing, GNU Emacs does not support images but does support
-Mule.) NT 4.0 or later is required for building on Windows NT. Note that the
-developers typically use NT 4.0 and Windows 2000, and there may possibly be
-problems under Windows 95/98. If so, please report them to
-xemacs-nt(a)xemacs.org; we are committed to maintaining compatibility with all
-systems listed.
+This is a port of XEmacs to Windows 95/98/ME/NT/2000/XP. If you are
+looking for a port of GNU Emacs, get the latest release of the 21.x series
+from
gnu.org. NT 4.0 or later is required for building on Windows NT.
+Note that the developers typically use NT 4.0 and Windows 2000 or XP, and
+there may possibly be problems under Windows 95/98. (One developer has
+successfully built on Windows ME, though, which is the successor of Windows
+98.) If so, please report them to xemacs-nt(a)xemacs.org; we are committed
+to maintaining compatibility with all systems listed.
* Required tools and sources
============================
@@ -38,7 +41,7 @@ systems listed.
2. Grab the latest XEmacs source from
-
ftp://ftp.xemacs.org/pub/xemacs/
+
http://ftp.xemacs.org/pub/xemacs/
or one of its mirrors listed at
http://www.xemacs.org/Download/index.html.
@@ -48,16 +51,16 @@ systems listed.
You'll also need the packages. You probably want to get the unified
packages bundle from
-
ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz
+
http://ftp.xemacs.org/pub/xemacs/packages/xemacs-sumo.tar.gz
If you are building with international support, you also need
-
ftp://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz
+
http://ftp.xemacs.org/pub/xemacs/packages/xemacs-mule-sumo.tar.gz
Although we don't recommend it, you can also retrieve just the packages
you really need if you have an extremely slow net connection or are very
short on disk space. You can find the various packages in
-
ftp://ftp.xemacs.org/pub/xemacs/packages/. You will need the xemacs-base
+
http://ftp.xemacs.org/pub/xemacs/packages/. You will need the xemacs-base
package (and mule-base, if building with international support). You'll
also need the texinfo package unless you have a copy of makeinfo.exe on
your machine. If you want to download additional or updated packages
@@ -75,40 +78,119 @@ systems listed.
* Optional libraries
====================
+
+The easiest way to get the optional libraries is to grab the appropriate
+set of precompiled versions for your compiler:
+
+http://www.xemacs.org/Download/win32/optional-libs.exe
+
+or for VC++ 2005 (VC8)
+
+http://www.xemacs.org/Download/win32/optional-libs-vc8.exe
+
+unpack them somewhere and set the OPTIONAL_LIBRARY_DIR in config.inc
+to point to where you put them. This will automatically give you
+all the graphics libraries. (NOTE: optional-libs.exe was compiled with
+VC++ .NET and may or may not work with VC++ 6.0. If not, you will have
+to build them yourself until we provide VC6 binaries.)
+
+* Alternative: Building the optional libraries yourself
+=======================================================
+
+If you need to build the libraries yourself, grab them from
+http://ftp.xemacs.org/pub/xemacs/aux or get the latest version from the
+home page of the appropriate library, as listed on
+http://www.xemacs.org/Download/optLibs.html. The following instructions
+assume that you have the appropriate libraries and have unpacked them
+somewhere, e.g. c:\src.
+
+Directions for building the various libraries:
+
+1. You really want the XPM library. Copy nt\xpm.mak from the xemacs sources
+ to the lib/ subdirectory of the XPM sources, cd to that directory and
+ build xpm with 'nmake -f xpm.mak'.
+
+2. You probably also want PNG image support. Get PNG and ZLIB and read the
+ respective READMEs for details on how to build them.
+
+ cd to the ZLIB source directory and type 'nmake -f win32\Makefile.msc'.
+
+ cd to the libpng source directory, rename or move the zlib directory to
+ ..\zlib and type 'nmake -f scripts\makefile.vcawin32'.
+
+3. If you want TIFF support, cd to the TIFF source directory and type
+ 'nmake -f Makefile.vc'.
+
+4. If you want JPEG support, cd to the JPEG source directory and type
+ 'nmake -f makefile.vc'.
+
+5. If you want X-Face support, copy nt\compface.mak from the xemacs sources
+ to the compface directory, cd to that directory and build libcompface
+ with 'nmake -f compface.mak'.
+
+6. It's also possible to build the Sleepycat DB libraries. Open up the file
+
+ DB-SOURCE-DIR\docs\ref\build_win\intro.html
+
+ in a browser, where DB-SOURCE-DIR is the top-level source directory for
+ the Sleepcat DB libraries, and follow the directions. You should build the
+ `Release_static' target if you want to use the static version of this
+ library, or the `Release' target if you want to use the DLL version of
+ the library. To use the DLL version, you need to set BUILD_DATABASE_SHARED
+ to 1 in config.inc. The DLL version will make the executable much smaller,
+ but you will have to have the DLL present at run-time -- either in the
+ same directory as the XEmacs executable or somewhere in your path.
+
+7. It's possible, but difficult, to build shared libraries for GNU MP.
+ (Static libraries are not yet possible, as there is no makefile.vc for
+ this; you can't build static libraries for VC++ using MinGW.) Basically,
+ you need to build using MinGW and then generate native import libraries.
+ This is more or less described in the documentation, but the following
+ procedure seems to work:
+
+ -- In the top level of the GMP sources, configure using
-1. You really want the XPM library. Grab the latest version of the xpm
- sources (xpm-3.4k.tar.gz as of 2003-10-27) from
-
ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack them somewhere. Copy
- nt\xpm.mak from the xemacs sources to the lib subdirectory of the xpm
- sources, cd to that directory and build xpm with 'nmake -f xpm.mak'.
-
-2. You probably also want PNG image support. Grab the latest versions of
- zlib and libpng (zlib-1.1.4 and libpng-1.2.5 as of 2003-10-27) from
-
ftp://ftp.xemacs.org/pub/xemacs/aux/, unpack them somewhere and read the
- respective READMEs for details on how to build them. The following
- build procedure works for zlib-1.1.4 and libpng-1.2.5:
-
- cd to the zlib directory and type 'nmake -f nt\Makefile.nt'.
-
- cd to the libpng directory, rename or move the zlib directory to ..\zlib
- and type 'nmake -f scripts\makefile.vcwin32'.
-
-3. If you want TIFF support, grab the latest version of libtiff (tiff-v3.5.7
- as of 2003-10-27) from
ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack
- it somewhere. Then cd to the libtiff subdirectory of the tiff directory
- and type 'nmake -f makefile.vc'.
-
-4. If you want JPEG support grab the latest version of jpegsrc (jpeg-6b as
- of 2003-10-27) from
ftp://ftp.xemacs.org/pub/xemacs/aux/ and read the
- README for details on how to build it.
-
-5. If you want X-Face support, grab the latest version of the compface
- distribution (1.4 as of 2003-10-27) from
-
ftp://ftp.xemacs.org/pub/xemacs/aux/ and unpack it somewhere.
- Copy nt\compface.mak from the xemacs sources to the compface directory.
- cd to that directory and build libcompface with 'nmake -f compface.mak'.
+ CC='gcc -mno-cygwin' configure --build=pentium3-pc-mingw32
--disable-static --enable-shared
+ -- Edit the `libtool' script in the same directory and change the value
+ of CC from `gcc' to `gcc -mno-cygwin'.
+ -- Run `make'.
+
+ -- Run these commands:
+
+ lib /machine:IX86 /def:.libs/libgmp-3.dll-def
+ cp .libs/libgmp-3.dll-exp libgmp-3.exp
+ cp .libs/libgmp-3.dll .
+
+ -- You should now have an import library named libgmp-3.lib and a DLL
+ libgmp-3.dll.
+
+ -- NOTE: You will need to have this DLL accessible when XEmacs runs.
+ It either needs to be in the same directory as the XEmacs executable
+ or in your path.
+
+8. There are also pre-built binaries for GMP-4.1.2 at
+
+
http://www.cs.nyu.edu/exact/core/gmp/.
+
+ However, they don't seem to work properly for our purposes, as they
+ require LIBC.LIB rather than MSVCRT.DLL.
+
+9. You can build the client library for PostgreSQL by cd'ing to the src/
+ subdirectory of the PostgreSQL sources and running `nmake -f win32.mak'.
+
+10. It does not appear to be very easy to build OpenLDAP under
+ native MS Windows, as it is only experimentally supported. However, there
+ is a mailing list for this, which contains postings of recent binaries and
+ build patches; see
+
+
http://lucas.bergmans.us/hacks/openldap/
+
+ If you know how to build OpenLDAP, please write up a description of the
+ process and send it to us at xemacs-beta(a)xemacs.org.
+
+
* Building
==========
@@ -120,32 +202,47 @@ systems listed.
line in config.inc as follows:
MULE=1
+
+ -- If you're using the pre-supplied optional library pack, all you should
+ have to do is set OPTIONAL_LIBRARY_DIR to the top-level directory
+ where you unpacked everything.
+
+ -- By default, support is enabled for all graphics formats, but not
+ currently for any of the other libraries in the optional library
+ pack. If you want support for GMP, Berkeley DB or PostgreSQL, set
+ the appropriate flag (HAVE_BIGNUM, HAVE_DATABASE or HAVE_POSTGRESQL,
+ respectively) to 1. We do not currently enable these by default
+ because of lack of sufficient testing, questionable usefulness in
+ the case of Berkeley DB and PostgreSQL, excessive library size in
+ the case of Berkeley DB (more than 2 MB for the static library!),
+ and lack of a static library in the case of GMP.
+
+ -- If you want to turn off support for any of the graphics libraries,
+ set the appropriate flag (HAVE_XPM, HAVE_GIF, HAVE_PNG, HAVE_JPEG,
+ HAVE_TIFF or HAVE_XFACE) to 0.
+
+ -- If you have compiled some of the libraries yourself, you will have to
+ specify the location of the top-level source directory for each of
+ these libraries. XEmacs assumes that the directory structure under
+ these directories is as it is in the sources, rather than in any
+ installed format.
- -- If you're building with XPM support, modify the appropriate lines in
+ For example, for XPM support, modify the appropriate lines in
config.inc as follows:
HAVE_XPM=1
XPM_DIR="x:\location\of\your\xpm\sources"
- and similarly for JPEG and TIFF support.
-
- -- If you're building with PNG support, modify the appropriate lines in
- config.inc as follows:
-
- HAVE_PNG=1
- PNG_DIR="x:\location\of\your\png\sources"
- ZLIB_DIR="x:\location\of\your\zlib\sources"
-
- -- If you're building with GIF support, modify the appropriate lines in
- config.inc as follows:
-
- HAVE_GIF=1
-
- -- If you're building with X-Face support, modify the appropriate lines in
- config.inc as follows:
+ Similarly for JPEG, TIFF, etc. support.
- HAVE_XFACE=1
- COMPFACE_DIR="x:\location\of\your\compface\sources"
+ For PNG support, you also need to specify ZLIB_DIR.
+ For GIF support, no directory is necessary as the appropriate code
+ is already in XEmacs.
+
+ If you want to use the DLL version of the Sleepycat DB library,
+ set BUILD_DATABASE_SHARED to 1. You will have to have the DLL
+ present at run-time -- either in the same directory as the XEmacs
+ executable or somewhere in your path.
-- By default, XEmacs will expect to find its packages in the
subdirectories "site-packages", "mule-packages" and
"xemacs-packages"
@@ -201,12 +298,16 @@ systems listed.
Start Menu.
5. To build using MS Visual Studio, you can use the workspace file
- `nt/xemacs.dsw'. This was prepared for Visual C++ 6.0. If you have a
- different version and neither file works, just open up `nt/xemacs.mak'
- from within Visual Studio and it will offer to wrap this Makefile in a
- workspace file, from which you can build. Assuming you want to run from
- the build directory (which you will want to do if you are planning on
- doing any development work on XEmacs), use the following settings in
+ `nt/xemacs.dsw'. This was prepared for Visual C++ 6.0. If you are using
+ Visual Studio .NET, open this file up inside of it and it will offer to
+ convert it to a .NET "solution" file. The same procedure should work
+ for newer versions of Visual Studio (e.g. Visual Studio 2005). If this
+ doesn't work (e.g. you are using Visual C++ 5 or even earlier), just
+ open up `nt/xemacs.mak' from within Visual Studio and it will offer to
+ wrap this Makefile in a workspace file, from which you can build.
+ Assuming you want to run from the build directory (which you will want
+ to do if you are planning on doing any development work on XEmacs), use
+ the following settings (for Visual C++ 6.0, at least) in
Project/Settings...:
Under the General tab:
@@ -267,8 +368,8 @@ Ben Wing (current primary MS Windows mai
Mule code and some of the dialog box code)
Andy Piper (MS Windows contributor; author of the Cygwin support and the
MS Windows glyph and widget code)
-Jonathan Harris (MS Windows contributor; author of the MS Windows redisplay
- and underlying GUI code)
+Jonathan Harris (MS Windows contributor; original author of the MS Windows
+ redisplay and underlying GUI code)
Kirill Katsnelson (MS Windows contributor; author of the MS Windows process
and printing code and some of the dialog box code;
general guru on obscure MS Windows programming topics)
Index: nt/config.inc.samp
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/config.inc.samp,v
retrieving revision 1.21
diff -u -p -r1.21 config.inc.samp
--- nt/config.inc.samp 2005/05/28 04:51:41 1.21
+++ nt/config.inc.samp 2005/09/26 08:12:38
@@ -35,34 +35,36 @@ OPTIONAL_LIBRARY_DIR=c:\src
# Set this to enable XPM support (virtually mandatory), and specify
# the directory containing xpm. Get the library from
-#
http://ftp.xemacs.org/aux/xpm-3.4k.tar.gz.
+#
http://ftp.xemacs.org/pub/xemacs/aux/xpm-3.4k.tar.gz, or the latest
+# version (note that the library hasn't been updated in years) from
+#
http://www.inria.fr/koala/lehors/xpm.html.
HAVE_XPM=1
XPM_DIR=$(OPTIONAL_LIBRARY_DIR)\xpm-3.4k
# Set this to enable GIF support (built-in).
HAVE_GIF=1
-# Set this to enable PNG support (virtually mandatory), and specify
-# the directories containing png and zlib. Get the latest version from
-#
ftp://ftp.uu.net/graphics/png/. NOTE: In order to compile libpng,
-# you will have to rename the zlib directory to just `zlib'. We don't
-# do that here so we can preserve the version number, like for the other
-# libraries.
+# Set this to enable PNG support (virtually mandatory), and specify the
+# directories containing png and zlib. Get the latest version of PNG from
+#
http://www.libpng.org/pub/png/libpng.html. Get the latest version of ZLIB
+# from
http://www.gzip.org/zlib/. NOTE: In order to compile libpng, you will
+# have to rename the zlib directory to just `zlib'. We don't do that here
+# so we can preserve the version number, like for the other libraries.
HAVE_PNG=1
PNG_DIR=$(OPTIONAL_LIBRARY_DIR)\libpng-1.2.8
-ZLIB_DIR=$(OPTIONAL_LIBRARY_DIR)\zlib-1.2.1
+ZLIB_DIR=$(OPTIONAL_LIBRARY_DIR)\zlib-1.2.3
# Set this to enable JPEG support (useful, but not necessary), and specify
# the directory containing jpeg. Get the latest version from
-#
ftp://ftp.uu.net/graphics/jpeg/.
+#
http://www.ijg.org/ or
ftp://ftp.uu.net/graphics/jpeg/.
HAVE_JPEG=1
JPEG_DIR=$(OPTIONAL_LIBRARY_DIR)\jpeg-6b
# Set this to enable TIFF support (not very important), and specify the
# directory containing tiff. Get the latest version from
-#
ftp://ftp.uu.net/graphics/tiff/.
+#
http://www.remotesensing.org/libtiff/.
HAVE_TIFF=1
-TIFF_DIR=$(OPTIONAL_LIBRARY_DIR)\tiff-v3.5.7
+TIFF_DIR=$(OPTIONAL_LIBRARY_DIR)\tiff-3.7.3
# Set this to enable XFace support (not very important), and specify the
# directory containing compface. Get the library from
@@ -70,6 +72,39 @@ TIFF_DIR=$(OPTIONAL_LIBRARY_DIR)\tiff-v3
HAVE_XFACE=1
COMPFACE_DIR=$(OPTIONAL_LIBRARY_DIR)\compface-1.5.1
+# Set this to enable bignum support (useful, but not necessary), and specify
+# the directory containing GNU MP. Get the latest version from
+#
http://www.swox.com/gmp/.
+HAVE_BIGNUM=0
+BIGNUM_DIR=$(OPTIONAL_LIBRARY_DIR)\gmp-4.1.4
+
+# Set this to enable Berkeley DB support (not very important), and specify
+# the directory containing Sleepcat DB. Get the latest version from
+#
http://www.sleepycat.com/products/db.shtml. If you want to use the
+# shared-library (DLL) version instead of the static library, set
+# BUILD_DATABASE_SHARED to 1.
+HAVE_DATABASE=0
+BUILD_DATABASE_SHARED=0
+DATABASE_DIR=$(OPTIONAL_LIBRARY_DIR)\db-4.3.28
+
+# Set this to enable PostgreSQL support (not very important), and specify
+# the directory containing PostgreSQL. Get the latest version from
+#
http://www.postgresql.org/.
+HAVE_POSTGRESQL=0
+POSTGRESQL_DIR=$(OPTIONAL_LIBRARY_DIR)\postgresql-8.0.3
+
+# Set this to enable LDAP support (not very important), and specify
+# the directory containing LDAP. It is not easy to build OpenLDAP under
+# native MS Windows, as it is only experimentally supported. However, there
+# is a mailing list for this, which contains postings of recent binaries and
+# build patches; see
+#
+#
http://lucas.bergmans.us/hacks/openldap/
+#
+# Get the latest version of OpenLDAP from
http://www.openldap.org/.
+HAVE_LDAP=0
+LDAP_DIR=$(OPTIONAL_LIBRARY_DIR)\openldap-2.3.4
+
############################################################################
# Build settings #
############################################################################
@@ -116,8 +151,21 @@ COMPFACE_DIR=$(OPTIONAL_LIBRARY_DIR)\com
# the actual file system).
MAKEINFO=c:\cygwin\bin\makeinfo.exe
-# Set this to turn on optimization when compiling.
+# Set this to enable debug code in XEmacs that doesn't slow things down,
+# and to add debugging information to the executable. (The code that's
+# enabled in XEmacs is primarily extra commands that aid in debugging
+# problems. The kind of debugging code that slows things down --
+# i.e. internal error-checking -- is controlled by the ERROR_CHECK_ALL
+# variable, below.)
+DEBUG_XEMACS=1
+
+# Set this to turn on optimization when compiling. Normally this should
+# be the opposite of DEBUG_XEMACS.
+!if $(DEBUG_XEMACS)
OPTIMIZED_BUILD=0
+!else
+OPTIMIZED_BUILD=1
+!endif
# Set this to build with the fastcall calling convention, which uses registers
# instead of the stack and should speed things up a bit
@@ -131,14 +179,6 @@ USE_FASTCALL=0
# Set this to compile in support for profiling. If you want line-by-line
# profiling under VC++, you also need debugging turned on.
PROFILE_SUPPORT=0
-
-# Set this to enable debug code in XEmacs that doesn't slow things down,
-# and to add debugging information to the executable. (The code that's
-# enabled in XEmacs is primarily extra commands that aid in debugging
-# problems. The kind of debugging code that slows things down --
-# i.e. internal error-checking -- is controlled by the ERROR_CHECK_ALL
-# variable, below.)
-DEBUG_XEMACS=1
# Set this to enable support for edit-and-continue under VC++.
# WARNING: This turns on incremental linking, which is known to lead to
Index: nt/minitar.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/minitar.c,v
retrieving revision 1.8
diff -u -p -r1.8 minitar.c
--- nt/minitar.c 2003/11/06 22:53:31 1.8
+++ nt/minitar.c 2005/09/26 08:12:38
@@ -12,6 +12,10 @@
If it breaks, you get to keep both pieces */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
Index: nt/xemacs.mak
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/xemacs.mak,v
retrieving revision 1.115
diff -u -p -r1.115 xemacs.mak
--- nt/xemacs.mak 2005/09/25 19:13:43 1.115
+++ nt/xemacs.mak 2005/09/26 08:12:38
@@ -1,7 +1,7 @@
# Makefile for Microsoft NMAKE -*- Makefile -*-
#
# Copyright (C) 1995 Board of Trustees, University of Illinois.
-# Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004 Ben Wing.
+# Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004, 2005 Ben Wing.
# Copyright (C) 1997, 1998, 2000 Jonathan Harris.
# Copyright (C) 1995 Sun Microsystems, Inc.
# Copyright (C) 1998 Free Software Foundation, Inc.
@@ -95,6 +95,14 @@ BLDSRC=$(BLDROOT)\src
# This appears in the dependency file
LWLIB_SRCDIR=$(SRCROOT)\lwlib
+########################### Figure out current version of VC++.
+
+!if [echo MSC_VER=_MSC_VER > $(OUTDIR)\vcversion.c]
+!endif
+!if [cl /nologo /EP $(OUTDIR)\vcversion.c > $(OUTDIR)\vcversion.tmp]
+!endif
+!include "$(OUTDIR)\vcversion.tmp"
+
########################### Process the config.inc options.
!if !defined(INFODOCK)
@@ -148,6 +156,21 @@ HAVE_NATIVE_SOUND=1
!if !defined(HAVE_WIDGETS)
HAVE_WIDGETS=1
!endif
+!if !defined(HAVE_DATABASE)
+HAVE_DATABASE=0
+!endif
+!if !defined(BUILD_DATABASE_SHARED)
+BUILD_DATABASE_SHARED=0
+!endif
+!if !defined(HAVE_POSTGRESQL)
+HAVE_POSTGRESQL=0
+!endif
+!if !defined(HAVE_LDAP)
+HAVE_LDAP=0
+!endif
+!if !defined(HAVE_BIGNUM)
+HAVE_BIGNUM=0
+!endif
!if !defined(OPTIMIZED_BUILD)
OPTIMIZED_BUILD=1
!endif
@@ -249,6 +272,7 @@ CONFIG_ERROR=1
!message Please specify root directory for your GTK installation: GTK_DIR=path
CONFIG_ERROR=1
!endif
+
!if $(HAVE_MS_WINDOWS) && $(HAVE_XPM) && !defined(XPM_DIR)
!message Please specify root directory for your XPM installation: XPM_DIR=path
CONFIG_ERROR=1
@@ -257,6 +281,7 @@ CONFIG_ERROR=1
!message Specified XPM directory does not contain "$(XPM_DIR)\lib\Xpm.lib"
CONFIG_ERROR=1
!endif
+
!if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(PNG_DIR)
!message Please specify root directory for your PNG installation: PNG_DIR=path
CONFIG_ERROR=1
@@ -265,6 +290,7 @@ CONFIG_ERROR=1
!message Specified PNG directory does not contain "$(PNG_DIR)\libpng.lib"
CONFIG_ERROR=1
!endif
+
!if $(HAVE_MS_WINDOWS) && $(HAVE_PNG) && !defined(ZLIB_DIR)
!message Please specify root directory for your ZLIB installation: ZLIB_DIR=path
CONFIG_ERROR=1
@@ -273,6 +299,7 @@ CONFIG_ERROR=1
!message Specified ZLIB directory does not contain "$(ZLIB_DIR)\zlib.lib"
CONFIG_ERROR=1
!endif
+
!if $(HAVE_MS_WINDOWS) && $(HAVE_TIFF) && !defined(TIFF_DIR)
!message Please specify root directory for your TIFF installation: TIFF_DIR=path
CONFIG_ERROR=1
@@ -281,6 +308,7 @@ CONFIG_ERROR=1
!message Specified TIFF directory does not contain
"$(TIFF_DIR)\libtiff\libtiff.lib"
CONFIG_ERROR=1
!endif
+
!if $(HAVE_MS_WINDOWS) && $(HAVE_JPEG) && !defined(JPEG_DIR)
!message Please specify root directory for your JPEG installation: JPEG_DIR=path
CONFIG_ERROR=1
@@ -289,6 +317,7 @@ CONFIG_ERROR=1
!message Specified JPEG directory does not contain "$(JPEG_DIR)\libjpeg.lib"
CONFIG_ERROR=1
!endif
+
!if $(HAVE_MS_WINDOWS) && $(HAVE_XFACE) && !defined(COMPFACE_DIR)
!message Please specify root directory for your COMPFACE installation: COMPFACE_DIR=path
CONFIG_ERROR=1
@@ -297,10 +326,71 @@ CONFIG_ERROR=1
!message Specified COMPFACE directory does not contain
"$(COMPFACE_DIR)\libcompface.lib"
CONFIG_ERROR=1
!endif
+
!if $(HAVE_MS_WINDOWS) && $(HAVE_TOOLBARS) && !$(HAVE_XPM)
!message Toolbars require XPM support
CONFIG_ERROR=1
!endif
+
+!if $(HAVE_MS_WINDOWS) && $(HAVE_BIGNUM) && !defined(BIGNUM_DIR)
+!message Please specify root directory for your BIGNUM installation: BIGNUM_DIR=path
+CONFIG_ERROR=1
+!endif
+!if $(HAVE_MS_WINDOWS) && $(HAVE_BIGNUM) && defined(BIGNUM_DIR)
+!if $(BUILD_BIGNUM_MINGW_SHARED)
+!if !exist("$(BIGNUM_DIR)\libgmp-3.lib")
+!message Specified BIGNUM directory does not contain
"$(BIGNUM_DIR)\libgmp-3.lib"
+CONFIG_ERROR=1
+!endif
+!else
+!if $(BUILD_BIGNUM_NATIVE_SHARED)
+!if !exist("$(BIGNUM_DIR)\gmp-dynamic\gmp.lib")
+!message Specified BIGNUM directory does not contain
"$(BIGNUM_DIR)\gmp-dynamic\gmp.lib"
+CONFIG_ERROR=1
+!endif
+!else
+!if !exist("$(BIGNUM_DIR)\gmp-static\gmp.lib")
+!message Specified BIGNUM directory does not contain
"$(BIGNUM_DIR)\gmp-static\gmp.lib"
+CONFIG_ERROR=1
+!endif
+!endif
+!endif
+!endif
+
+!if $(HAVE_MS_WINDOWS) && $(HAVE_DATABASE) && !defined(DATABASE_DIR)
+!message Please specify root directory for your DATABASE installation: DATABASE_DIR=path
+CONFIG_ERROR=1
+!endif
+!if $(HAVE_MS_WINDOWS) && $(HAVE_DATABASE) && defined(DATABASE_DIR)
+!if $(BUILD_DATABASE_SHARED)
+!if !exist("$(DATABASE_DIR)\build_win32\Release\libdb43.lib")
+!message Specified DATABASE directory does not contain
"$(DATABASE_DIR)\build_win32\Release\libdb43.lib"
+CONFIG_ERROR=1
+!endif
+!else
+!if !exist("$(DATABASE_DIR)\build_win32\Release_static\libdb43s.lib")
+!message Specified DATABASE directory does not contain
"$(DATABASE_DIR)\build_win32\Release_static\libdb43s.lib"
+CONFIG_ERROR=1
+!endif
+!endif
+!endif
+
+!if $(HAVE_MS_WINDOWS) && $(HAVE_POSTGRESQL) && !defined(POSTGRESQL_DIR)
+!message Please specify root directory for your POSTGRESQL installation:
POSTGRESQL_DIR=path
+CONFIG_ERROR=1
+!endif
+!if $(HAVE_MS_WINDOWS) && $(HAVE_POSTGRESQL) && defined(POSTGRESQL_DIR)
&& !exist("$(POSTGRESQL_DIR)\src\interfaces\libpq\Release\libpq.lib")
+!message Specified POSTGRESQL directory does not contain
"$(POSTGRESQL_DIR)\src\interfaces\libpq\Release\libpq.lib"
+CONFIG_ERROR=1
+!endif
+!if $(HAVE_MS_WINDOWS) && $(HAVE_LDAP) && !defined(LDAP_DIR)
+!message Please specify root directory for your LDAP installation: LDAP_DIR=path
+CONFIG_ERROR=1
+!endif
+!if $(HAVE_MS_WINDOWS) && $(HAVE_LDAP) && defined(LDAP_DIR) &&
!exist("$(LDAP_DIR)\openldap.lib")
+!message Specified LDAP directory does not contain "$(LDAP_DIR)\openldap.lib"
+CONFIG_ERROR=1
+!endif
!if $(CONFIG_ERROR)
!error Configuration error(s) found
!endif
@@ -385,137 +475,175 @@ EMACS_CONFIGURATION=ppc-pc-win32
STACK_TRACE_EYE_CATCHER=$(XEMACS_VERSION_STRING:.=_)
STACK_TRACE_EYE_CATCHER=xemacs_$(STACK_TRACE_EYE_CATCHER:-=_)_$(EMACS_CONFIGURATION:-=_)
PROGRAM_DEFINES=$(PROGRAM_DEFINES) -DSTACK_TRACE_EYE_CATCHER=$(STACK_TRACE_EYE_CATCHER)
+
+########################### Determine includes/defines/object files/libraries
+########################### for all configuration options given.
-########################### Determine includes/defines/object file for
-########################### various options.
+OPT_DEFINES=
+OPT_INCLUDES=
+OPT_LIBS=
+OPT_OBJS=
+TEMACS_MODULE_OBJS=
+TEMACS_MODULE_SRCS=
!if $(HAVE_MS_WINDOWS)
-MSW_DEFINES=-DHAVE_MS_WINDOWS
-MSW_INCLUDES=
-MSW_LIBS=comctl32.lib
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_MS_WINDOWS
+OPT_LIBS=$(OPT_LIBS) comctl32.lib
+OPT_OBJS=$(OPT_OBJS) \
+ $(OUTDIR)\console-msw.obj \
+ $(OUTDIR)\device-msw.obj \
+ $(OUTDIR)\event-msw.obj \
+ $(OUTDIR)\frame-msw.obj \
+ $(OUTDIR)\glyphs-msw.obj \
+ $(OUTDIR)\gui-msw.obj \
+ $(OUTDIR)\objects-msw.obj \
+ $(OUTDIR)\redisplay-msw.obj \
+ $(OUTDIR)\select-msw.obj \
+ $(OUTDIR)\dired-msw.obj
+!if $(HAVE_MENUBARS)
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_MENUBARS
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\menubar.obj $(OUTDIR)\menubar-msw.obj
+!endif
+!if $(HAVE_SCROLLBARS)
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_SCROLLBARS
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\scrollbar.obj $(OUTDIR)\scrollbar-msw.obj
+!endif
+!if $(HAVE_TOOLBARS)
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_TOOLBARS
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\toolbar.obj $(OUTDIR)\toolbar-msw.obj
+!endif
+!if $(HAVE_WIDGETS)
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_WIDGETS
+!endif
+!if $(HAVE_DIALOGS)
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_DIALOGS
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj
+!endif
+# end !if $(HAVE_MS_WINDOWS)
+!endif
!if $(HAVE_XPM)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_XPM -DFOR_MSW
-MSW_INCLUDES=$(MSW_INCLUDES) -I"$(XPM_DIR)" -I"$(XPM_DIR)\lib"
-MSW_LIBS=$(MSW_LIBS) "$(XPM_DIR)\lib\Xpm.lib"
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_XPM -DFOR_MSW
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(XPM_DIR)" -I"$(XPM_DIR)\lib"
+OPT_LIBS=$(OPT_LIBS) "$(XPM_DIR)\lib\Xpm.lib"
!endif
!if $(HAVE_GIF)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_GIF
-MSW_GIF_OBJ=$(OUTDIR)\dgif_lib.obj $(OUTDIR)\gif_io.obj
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_GIF
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\dgif_lib.obj $(OUTDIR)\gif_io.obj
!endif
!if $(HAVE_PNG)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_PNG
-MSW_INCLUDES=$(MSW_INCLUDES) -I"$(PNG_DIR)" -I"$(ZLIB_DIR)"
-MSW_LIBS=$(MSW_LIBS) "$(PNG_DIR)\libpng.lib" "$(ZLIB_DIR)\zlib.lib"
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_PNG
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(PNG_DIR)" -I"$(ZLIB_DIR)"
+OPT_LIBS=$(OPT_LIBS) "$(PNG_DIR)\libpng.lib" "$(ZLIB_DIR)\zlib.lib"
!endif
!if $(HAVE_TIFF)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TIFF
-MSW_INCLUDES=$(MSW_INCLUDES) -I"$(TIFF_DIR)\libtiff"
-MSW_LIBS=$(MSW_LIBS) "$(TIFF_DIR)\libtiff\libtiff.lib"
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_TIFF
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(TIFF_DIR)\libtiff"
+OPT_LIBS=$(OPT_LIBS) "$(TIFF_DIR)\libtiff\libtiff.lib"
!endif
!if $(HAVE_JPEG)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_JPEG
-MSW_INCLUDES=$(MSW_INCLUDES) -I"$(JPEG_DIR)"
-MSW_LIBS=$(MSW_LIBS) "$(JPEG_DIR)\libjpeg.lib"
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_JPEG
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(JPEG_DIR)"
+OPT_LIBS=$(OPT_LIBS) "$(JPEG_DIR)\libjpeg.lib"
!endif
!if $(HAVE_XFACE)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_XFACE
-MSW_INCLUDES=$(MSW_INCLUDES) -I"$(COMPFACE_DIR)"
-MSW_LIBS=$(MSW_LIBS) "$(COMPFACE_DIR)\libcompface.lib"
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_XFACE
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(COMPFACE_DIR)"
+OPT_LIBS=$(OPT_LIBS) "$(COMPFACE_DIR)\libcompface.lib"
!endif
!if $(HAVE_ZLIB)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_ZLIB
-MSW_INCLUDES=$(MSW_INCLUDES) -I"$(ZLIB_DIR)"
-MSW_LIBS=$(MSW_LIBS) "$(ZLIB_DIR)\zlib.lib"
-!endif
-!if $(HAVE_MENUBARS)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_MENUBARS
-MSW_MENUBAR_OBJ=$(OUTDIR)\menubar.obj $(OUTDIR)\menubar-msw.obj
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_ZLIB
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(ZLIB_DIR)"
+OPT_LIBS=$(OPT_LIBS) "$(ZLIB_DIR)\zlib.lib"
+!endif
+!if $(HAVE_BIGNUM)
+OPT_DEFINES=$(OPT_DEFINES) -DWITH_NUMBER_TYPES -DWITH_GMP
+!if $(BUILD_BIGNUM_MINGW_SHARED)
+OPT_LIBS=$(OPT_LIBS) "$(BIGNUM_DIR)\libgmp-3.lib"
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(BIGNUM_DIR)"
+!else
+!if $(BUILD_BIGNUM_NATIVE_SHARED)
+OPT_LIBS=$(OPT_LIBS) "$(BIGNUM_DIR)\gmp-dynamic\gmp.lib"
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(BIGNUM_DIR)\gmp-dynamic"
+!else
+OPT_LIBS=$(OPT_LIBS) "$(BIGNUM_DIR)\gmp-static\gmp.lib"
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(BIGNUM_DIR)\gmp-static"
+!endif
+!endif
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\number-gmp.obj $(OUTDIR)\number.obj
+!endif
+!if $(HAVE_DATABASE)
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_DATABASE -DHAVE_BERKELEY_DB
-DDB_H_FILE=\"db.h\"
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(DATABASE_DIR)\build_win32"
+!if $(BUILD_DATABASE_SHARED)
+OPT_LIBS=$(OPT_LIBS) "$(DATABASE_DIR)\build_win32\Release\libdb43.lib"
+!else
+OPT_LIBS=$(OPT_LIBS) "$(DATABASE_DIR)\build_win32\Release_static\libdb43s.lib"
+!endif
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\database.obj
+!endif
+!if $(HAVE_POSTGRESQL)
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_POSTGRESQL -DHAVE_POSTGRESQLV7
-DLIBPQ_FE_H_FILE=\"libpq-fe.h\"
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(POSTGRESQL_DIR)\src\include"
-I"$(POSTGRESQL_DIR)\src\interfaces\libpq"
+OPT_LIBS=$(OPT_LIBS)
"$(POSTGRESQL_DIR)\src\interfaces\libpq\Release\libpq.lib"
+TEMACS_MODULE_OBJS=$(TEMACS_MODULE_OBJS) $(OUTDIR)\postgresql.obj
+TEMACS_MODULE_SRCS=$(TEMACS_MODULE_SRCS) $(SRCROOT)\modules\postgresql\postgresql.c
+!endif
+!if $(HAVE_LDAP)
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_LDAP -DHAVE_LDAP_SET_OPTION -DHAVE_LDAP_RESULT2ERROR
-DHAVE_LDAP_PARSE_RESULT
+OPT_INCLUDES=$(OPT_INCLUDES) -I"$(LDAP_DIR)"
+OPT_LIBS=$(OPT_LIBS) "$(LDAP_DIR)\openldap.lib"
+TEMACS_MODULE_OBJS=$(TEMACS_MODULE_OBJS) $(OUTDIR)\eldap.obj
+TEMACS_MODULE_SRCS=$(TEMACS_MODULE_SRCS) $(SRCROOT)\modules\ldap\eldap.c
!endif
-!if $(HAVE_SCROLLBARS)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_SCROLLBARS
-MSW_SCROLLBAR_OBJ=$(OUTDIR)\scrollbar.obj $(OUTDIR)\scrollbar-msw.obj
-!endif
-!if $(HAVE_TOOLBARS)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TOOLBARS
-MSW_TOOLBAR_OBJ=$(OUTDIR)\toolbar.obj $(OUTDIR)\toolbar-msw.obj
-!endif
-!if $(HAVE_WIDGETS)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_WIDGETS
-!endif
-!if $(HAVE_DIALOGS)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_DIALOGS
-MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj
-!endif
!if $(HAVE_NATIVE_SOUND)
-MSW_DEFINES=$(MSW_DEFINES) -DHAVE_NATIVE_SOUND
+OPT_DEFINES=$(OPT_DEFINES) -DHAVE_NATIVE_SOUND
!endif
-TEMACS_MSW_OBJS=\
- $(OUTDIR)\console-msw.obj \
- $(OUTDIR)\device-msw.obj \
- $(OUTDIR)\event-msw.obj \
- $(OUTDIR)\frame-msw.obj \
- $(OUTDIR)\glyphs-msw.obj \
- $(OUTDIR)\gui-msw.obj \
- $(OUTDIR)\objects-msw.obj \
- $(OUTDIR)\redisplay-msw.obj \
- $(OUTDIR)\select-msw.obj \
- $(OUTDIR)\dired-msw.obj \
- $(MSW_MENUBAR_OBJ) \
- $(MSW_SCROLLBAR_OBJ) \
- $(MSW_TOOLBAR_OBJ) \
- $(MSW_DIALOG_OBJ) \
- $(MSW_GIF_OBJ)
-
-# end !if $(HAVE_MS_WINDOWS)
-!endif
-
!if $(MULE)
-MULE_DEFINES=-DMULE
-TEMACS_MULE_OBJS=\
+OPT_DEFINES=$(OPT_DEFINES) -DMULE
+OPT_OBJS=$(OPT_OBJS) \
$(OUTDIR)\mule-ccl.obj \
$(OUTDIR)\mule-charset.obj \
$(OUTDIR)\mule-coding.obj
!endif
!if $(DEBUG_XEMACS)
-TEMACS_DEBUG_OBJS=$(OUTDIR)\debug.obj $(OUTDIR)\tests.obj
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\debug.obj $(OUTDIR)\tests.obj
!endif
!if $(QUICK_BUILD)
-QUICK_DEFINES=-DQUICK_BUILD
+OPT_DEFINES=$(OPT_DEFINES) -DQUICK_BUILD
!endif
!if $(ERROR_CHECK_ALL)
-ERROR_CHECK_DEFINES=-DERROR_CHECK_ALL
+OPT_DEFINES=$(OPT_DEFINES) -DERROR_CHECK_ALL
!endif
!if $(USE_UNION_TYPE)
-UNION_DEFINES=-DUSE_UNION_TYPE
+OPT_DEFINES=$(OPT_DEFINES) -DUSE_UNION_TYPE
!endif
!if $(USE_PORTABLE_DUMPER)
-DUMPER_DEFINES=-DPDUMP
-TEMACS_DUMP_OBJS=$(OUTDIR)\dumper.obj
+OPT_DEFINES=$(OPT_DEFINES) -DPDUMP
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\dumper.obj
!else
-TEMACS_DUMP_OBJS=$(OUTDIR)\unexnt.obj
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\unexnt.obj
!endif
!if $(USE_KKCC)
-KKCC_DEFINES=-DUSE_KKCC
+OPT_DEFINES=$(OPT_DEFINES) -DUSE_KKCC
!endif
-
!if $(MC_ALLOC)
-MC_ALLOC_DEFINES=-DMC_ALLOC
-TEMACS_MC_ALLOC_OBJS=$(OUTDIR)\mc-alloc.obj
+OPT_DEFINES=$(OPT_DEFINES) -DMC_ALLOC
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\mc-alloc.obj
!endif
!if $(USE_SYSTEM_MALLOC)
-MALLOC_DEFINES=-DSYSTEM_MALLOC
+OPT_DEFINES=$(OPT_DEFINES) -DSYSTEM_MALLOC
!else
-MALLOC_DEFINES=-DGNU_MALLOC
-TEMACS_ALLOC_OBJS=$(OUTDIR)\free-hook.obj $(OUTDIR)\gmalloc.obj \
+OPT_DEFINES=$(OPT_DEFINES) -DGNU_MALLOC
+OPT_OBJS=$(OPT_OBJS) $(OUTDIR)\free-hook.obj $(OUTDIR)\gmalloc.obj \
$(OUTDIR)\ntheap.obj $(OUTDIR)\vm-limit.obj
!endif
@@ -533,27 +661,46 @@ CCV=@$(CC)
!if $(DEBUG_XEMACS)
# ---- Debugging support ----
+! if $(MSC_VER) >= 1400
+# VC 7 sets opt:noref automatically with -debug. VC 8 apparently doesn't
+# do this, and then complains if you try to use edit-and-continue without
+# giving it.
+DEBUG_FLAG_LINK_DEBUG=-debug -opt:noref
+# This turns on additional run-time checking
+# For some reason it causes spawning of make-docfile to crash in VC 7
+DEBUG_FLAG_COMPILE_DEBUG=-RTC1
+! else
+DEBUG_FLAG_LINK_DEBUG=-debug:full
+DEBUG_FLAG_COMPILE_DEBUG=
+! endif
+
! if $(SUPPORT_EDIT_AND_CONTINUE)
# support edit-and-continue
-DEBUG_FLAGS_COMPILE=-ZI
+DEBUG_FLAGS_COMPILE=$(DEBUG_FLAG_COMPILE_DEBUG) -ZI
# WARNING: There is a very good reason for -incremental:no, as it can cause
# all sorts of weird crashes in or after a pdump load. We must allow
# incremental linking for edit-and-continue to work, however.
-DEBUG_FLAGS_LINK=-debug:full
+DEBUG_FLAGS_LINK=$(DEBUG_FLAG_LINK_DEBUG)
! else
-DEBUG_FLAGS_COMPILE=-Zi
-DEBUG_FLAGS_LINK=-debug:full -incremental:no
+DEBUG_FLAGS_COMPILE=$(DEBUG_FLAG_COMPILE_DEBUG) -Zi
+DEBUG_FLAGS_LINK=$(DEBUG_FLAG_LINK_DEBUG) -incremental:no
! endif
-DEBUG_DEFINES=-DDEBUG_XEMACS -D_DEBUG
+
+OPT_DEFINES=$(OPT_DEFINES) -DDEBUG_XEMACS -D_DEBUG
+
+! if $(MSC_VER) >= 1300
+#BROWSERFLAGS=-FR -Fd$(OUTDIR)\temacs.pdb
+BROWSERFLAGS=-FR$*.sbr -Fd$(OUTDIR)\temacs.pdb
+! else
#BROWSERFLAGS=-Fr -Fd$(OUTDIR)\temacs.pdb
BROWSERFLAGS=-Fr$*.sbr -Fd$(OUTDIR)\temacs.pdb
+! endif
!else
# ---- No debugging support ----
DEBUG_FLAGS_COMPILE=
DEBUG_FLAGS_LINK=-incremental:no
-DEBUG_DEFINES=
BROWSERFLAGS=
!endif
@@ -572,6 +719,9 @@ LIBC_LIB=libc.lib
!endif
!if $(OPTIMIZED_BUILD)
+!if $(SUPPORT_EDIT_AND_CONTINUE)
+!error Edit-and-continue is not compatible with optimization.
+!endif
# -G5 means optimize for Pentium. (According to the code-optimization
# article, -GB is the same as -G5, and -G6, i.e. optimze for Pentium Pro,
# gains you little over -G5 for PPro's but causes big slowdowns for
@@ -610,12 +760,10 @@ CPLUSPLUS_COMPILE_FLAGS=
########################### Determine generic includes/defines/flags.
-INCLUDES=-I$(NT)\inc -I$(SRC) $(MSW_INCLUDES)
+INCLUDES=-I$(NT)\inc -I$(SRC) $(OPT_INCLUDES)
-DEFINES=$(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \
- $(DUMPER_DEFINES) $(KKCC_DEFINES) $(MC_ALLOC_DEFINES) \
- $(MALLOC_DEFINES) $(QUICK_DEFINES) $(ERROR_CHECK_DEFINES) \
- $(DEBUG_DEFINES) -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \
+DEFINES=$(OPT_DEFINES) \
+ -DWIN32_LEAN_AND_MEAN -DWIN32_NATIVE -Demacs \
-DHAVE_CONFIG_H $(PROGRAM_DEFINES) $(PATH_DEFINES)
CFLAGS_NO_OPT=-nologo -W3 -DSTRICT $(DEBUG_FLAGS_COMPILE)
@@ -653,13 +801,8 @@ TEMACS_CPP_CDECL_FLAGS=$(CFLAGS_CDECL) $
########################### Determine XEmacs object files.
-TEMACS_OBJS= \
- $(TEMACS_MSW_OBJS)\
- $(TEMACS_MULE_OBJS)\
- $(TEMACS_DEBUG_OBJS)\
- $(TEMACS_ALLOC_OBJS)\
- $(TEMACS_DUMP_OBJS)\
- $(TEMACS_MC_ALLOC_OBJS)\
+TEMACS_COMMON_OBJS= \
+ $(OPT_OBJS)\
$(OUTDIR)\abbrev.obj \
$(OUTDIR)\alloc.obj \
$(OUTDIR)\alloca.obj \
@@ -753,6 +896,14 @@ TEMACS_OBJS= \
$(OUTDIR)\window.obj \
$(OUTDIR)\win32.obj
+TEMACS_OBJS= \
+ $(TEMACS_COMMON_OBJS) \
+ $(TEMACS_MODULE_OBJS)
+
+TEMACS_DOC_SOURCES= \
+ $(TEMACS_COMMON_OBJS) \
+ $(TEMACS_MODULE_SRCS)
+
#########################################################################
## Implicit rules ##
#########################################################################
@@ -822,6 +973,12 @@ $(OUTDIR)\emacs.obj: $(SRCROOT)\version.
$(OUTDIR)\libinterface.obj: $(SRC)\libinterface.c
$(CCV) $(TEMACS_CPP_CDECL_FLAGS) $(SRC)\$((a)B).c -Fo$@ $(BROWSERFLAGS)
+$(OUTDIR)\postgresql.obj: $(SRCROOT)\modules\postgresql\postgresql.c
+ $(CCV) -I$(SRC) $(TEMACS_CPP_FLAGS) $(SRCROOT)\modules\postgresql\postgresql.c -Fo$@
$(BROWSERFLAGS)
+
+$(OUTDIR)\eldap.obj: $(SRCROOT)\modules\ldap\eldap.c
+ $(CCV) -I$(SRC) $(TEMACS_CPP_FLAGS) $(SRCROOT)\modules\ldap\eldap.c -Fo$@
$(BROWSERFLAGS)
+
###################### Generated source files
$(OUTDIR)\nul:
@@ -920,7 +1077,7 @@ $(BLDLIB_SRC)/movemail.exe : $(LIB_SRC)/
# Minitar uses zlib so just use cdecl to simplify things
$(BLDLIB_SRC)/minitar.exe : $(NT)/minitar.c
- $(CCV) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) $(CFLAGS_CDECL_NO_LIB) -MD
$(LINK_DEPENDENCY_ARGS) "$(ZLIB_DIR)\zlib.lib"
+ $(CCV) -I$(SRC) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) $(CFLAGS_CDECL_NO_LIB) -MD
$(LINK_DEPENDENCY_ARGS) "$(ZLIB_DIR)\zlib.lib"
LIB_SRC_TOOLS = \
$(BLDLIB_SRC)/etags.exe \
@@ -1034,6 +1191,22 @@ XEmacs $(XEMACS_VERSION_STRING) $(xemacs
!if $(HAVE_WIDGETS)
Compiling in support for widgets.
!endif
+!if $(HAVE_BIGNUM)
+ Compiling in support for arbitrary-precision numbers.
+!endif
+!if $(HAVE_DATABASE)
+!if $(BUILD_DATABASE_SHARED)
+ Compiling in support for Berkeley Databases (DLL version).
+!else
+ Compiling in support for Berkeley Databases (static-library version).
+!endif
+!endif
+!if $(HAVE_POSTGRESQL)
+ Compiling in support for PostgreSQL.
+!endif
+!if $(HAVE_LDAP)
+ Compiling in support for LDAP.
+!endif
!if $(HAVE_NATIVE_SOUND)
Compiling in support for native sounds.
!endif
@@ -1096,7 +1269,7 @@ TEMACS_ENTRYPOINT=-entry:mainCRTStartup
!endif
TEMACS_BROWSE=$(BLDSRC)\temacs.bsc
-TEMACS_LIBS=$(LASTFILE) $(MSW_LIBS) \
+TEMACS_LIBS=$(LASTFILE) $(OPT_LIBS) \
oldnames.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib \
shell32.lib wsock32.lib netapi32.lib winmm.lib winspool.lib ole32.lib \
mpr.lib uuid.lib imm32.lib $(LIBC_LIB)
@@ -1162,6 +1335,7 @@ TEMACS_DUMP_DEP = $(OUTDIR)\temacs.res
!endif
$(RAW_EXE): $(TEMACS_OBJS) $(LASTFILE) $(TEMACS_DUMP_DEP)
+ @echo link $(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS)
link.exe @<<
$(TEMACS_LFLAGS) -out:$@ $(TEMACS_OBJS) $(TEMACS_DUMP_DEP) $(TEMACS_LIBS)
<<
@@ -1188,10 +1362,10 @@ docfile ::
docfile :: $(DOC)
# We need to write the QUICK_BUILD stuff as-is (and not just have no
-# dependencies for DOC) because DOC needs TEMACS_OBJS as dependencies to
+# dependencies for DOC) because DOC needs TEMACS_DOC_SOURCES as dependencies to
# get $(**) right. The `touch' is needed because of the way nmake
# calculates dependencies; see comments in src/Makefile.in.in.
-$(DOC): $(BLDLIB_SRC)\make-docfile.exe $(BLDSRC)\NEEDTODUMP $(TEMACS_OBJS)
+$(DOC): $(BLDLIB_SRC)\make-docfile.exe $(BLDSRC)\NEEDTODUMP $(TEMACS_DOC_SOURCES)
!if $(QUICK_BUILD)
if not exist $(DOC) $(TEMACS_BATCH) -l $(LISP)\make-docfile.el -- -o $(DOC) -i
$(SRCROOT)\site-packages @<<
$(**)
@@ -1421,7 +1595,7 @@ $(INFODIR)\new-users-guide.info: $(NEW_U
info: makeinfo-test $(INFO_FILES)
#########################################################################
-## Testing-related targets ##
+## Testing, TAGS, install, clean, etc. ##
#########################################################################
########################### Automated tests
@@ -1502,18 +1676,24 @@ mostlyclean:
-$(DEL) $(OUTDIR)\*.lib
-$(DEL) $(OUTDIR)\*.obj
-$(DEL) $(OUTDIR)\*.pdb
+ -$(DEL) $(OUTDIR)\*.idb
+ -$(DEL) $(OUTDIR)\*.ilk
-$(DEL) $(OUTDIR)\*.res
-$(DEL) $(OUTDIR)\*.sbr
-$(DEL) $(BLDSRC)\*.exe
-$(DEL) $(BLDSRC)\*.dmp
-$(DEL) $(BLDSRC)\*.map
-$(DEL) $(BLDSRC)\*.pdb
+ -$(DEL) $(BLDSRC)\*.idb
+ -$(DEL) $(BLDSRC)\*.ilk
-$(DEL) $(BLDSRC)\NEEDTODUMP
-$(DEL) $(BLDSRC)\dump-id.c
-$(DEL) $(SRC)\*.bsc
-$(DEL) $(BLDLIB_SRC)\*.exe
-$(DEL) $(BLDLIB_SRC)\*.obj
-$(DEL) $(BLDLIB_SRC)\*.pdb
+ -$(DEL) $(BLDLIB_SRC)\*.idb
+ -$(DEL) $(BLDLIB_SRC)\*.ilk
-$(DEL) $(BLDLIB_SRC)\*.res
versionclean:
cvs server: Diffing nt/installer
cvs server: Diffing nt/installer/Wise