Installation on Win32 (WinNT, Win95 et al) using the MSVC
=========================================================
development environment, using native system calls
==================================================

** Note! Binaries created with MSVC 7.0 (and later) with MFLAGS=-MD depend
   on a closed-source library 'Msvcr70.dll' (or similar) which is not
   normally part of a Woe32 installation.
   While Microsoft (see article Q326922 "Redistribution of the shared C
   runtime component in Visual C++" http://support.microsoft.com/kb/326922)
   seems to permit redistribution of these files, they _cannot_ be
   _bundled_ with CLISP in a _single_ distribution - this would be a
   violation of the GPL.  You must distribute it in a separate file.

** Note! The easiest way to get a native win32 version of CLISP is to use
   -- cygwin <http://cywgin.com> or
   -- mingw/msys <http://www.mingw.org/>.
   Either way, read ../unix/INSTALL, get libsigsegv, libffcall &c, and do
   $ ./configure --with-mingw --cbc build-mingw --with-module=...
   $ cd build-mingw
   $ make distrib
   unzip the distribution in your preferred location, and run install.bat.
   The GCC builds should be faster than the MSVC builds
   because CLISP uses some GCC-specific assembly code.

If you still want to use the MS C compiler, here are the steps:

1. Build a few recommended libraries: libiconv and libsigsegv.
   - GNU libsigsegv (highly recommended for C stack overflow detection
     and high-performance Generational GC),
   - GNU libffcall (for the foreign language interface),
   - GNU libiconv (for more character set conversions).

2. Unpack the source, start a console with a shell.
   Make sure that the MSVC utilities ("cl" etc.) are found in PATH.
   For example, I use the following settings:

        set MSDEVDIR=C:\Program Files\Microsoft Visual Studio
        set MSVCDIR=%MSDEVDIR%\VC98
        set Include=%MSDEVDIR%\VC98\include
        set Lib=%MSDEVDIR%\VC98\lib
        set PATH=%MSDEVDIR%\VC98\bin;%MSDEVDIR%\Common\MSDev98\Bin;%PATH%

   Alternatively you can use a file vcvars32.bat supplied with MSVC. Copy
   it to some location in the PATH and add the following line to its end:

        %1 %2 %3 %4 %5 %6 %7 %8 %9

   Now you can call VC command line utilities in the proper environment
   prepending it with vcvars32. For example

        vcvars32 nmake

3. Ensure unix-like command-line utilities used in the build: sed, grep,
   touch, rm (more the better) are in the PATH.
   There are quite a few such packages available, for example
   - UnxUtils <http://unxutils.sourceforge.net/>,
   - GnuWin32 <http://gnuwin32.sourceforge.net/> or
   - cygwin <http://cywgin.com> (overkill for this particular case).

4. Copy the appropriate makefile from win32msvc to src\makefile:

   Check that environment variable MSVCDIR points to VC98 directory
   or uncomment and modify the value of MSVCDIR in src\makefile to
   match your site.

   Now that the libraries recommended in 1. are not distributed with
   CLISP anymore, the makefiles do not make use of them.
   To actually use libsigsegv with CLISP, here is a way to go:
        a) Compile the library as per libsigsegv\README.woe32
        b) Copy sigsegv.lib and sigsegv.h to src
        c) Add sigsegv.lib to LIBS in src\makefile

        cd src
        nmake

5. (optional) Using cygwin:

        cd src
        make distrib

