----------------------------------------------------------------------
             HOW TO INSTALL SSWF FROM THE SOURCE TAR BALL
----------------------------------------------------------------------


          SUMMARY

     I. PREFACE
    II. COMPILING WITH AMAKE
   III. COMPILING WITH GNU MAKE
    IV. COMPILING WITH VISUAL C++


----------------------------------------------------------------------

I. PREFACE

This file was added in order to give some information about how to
compile and install sswf from the source files. If you want, you can
also download a pre-made package which will automatically install on
your system. How to install these packages is not available in this
file. See one of the INSTALL-<system>.txt file instead.

First of all, I suspect you extracted the files in a directory. There
you have a set of source files you can compile using either amake or
GNUmake (note that GNUmake is often called make or gmake).


----------------------------------------------------------------------

II. COMPILING WITH AMAKE

NOTE: if you don't yet have amake, you can find it on SourceForge and
at the FTP site of Made to Order Software Corp. See the webpage here:

	http://amake.sf.net

Download from here:

	ftp://ftp.m2osw.com/amake/current

or

	http://www.sourceforge.net/projects/amake


Before to run amake, if you are not under Linux RedHat 9, you may have
to edit the libsswf-config.h file (you may need to do that even on
RedHat). That file includes a list of #define which are used to set or
not available features and also to ensure some compiler or system
dependent things are properly handled.

At this time, the flags are:

	USE_WCHAR_T		used to know whether the
				printf(3C) uses wchar_t
				or wint_t for %lc formats

To compile under a Unix system or MinGW 3.3 just type that on your
command line:

	amake

Under Linux, you can install the result with the install target. Watch
out, the destination directory may not be valid for your system. The
following is the command line to install as on my Linux system:

	amake install

If you first want to check out where files will be installed use the
-n option as in:

	amake -n install


----------------------------------------------------------------------

III. COMPILING WITH GNU MAKE

To compile using GNUmake under Linux, IRIX, Mac OS/X, and surely many
other Unix systems and also under MinGW, one can use the configure
script first to generate the necessary Makefile's as follow:

	./configure [-options]
	make
	make install

In order to see what the options are, type this:

	./configure --help | less

(I suggest piping to less because usually it's several pages).

At this time, the following are the different flags which are
available:

	--enable-notes-to-html		Only useful if you want to
					transforms the CHANGES.txt
					and NOTES.txt in HTML files.
					You may of course use it for
					your own purpose in your own
					project. (disabled by default)

	--enable-docs			Will ensure that the
					documentation gets installed.
					You need to extract the src
					and doc tar balls to be able
					to specify this option.
					(enabled by default when the
					docs are present)

	--enable-cpp-to-c		Only useful if you want to
					regenerate the C header file
					and .c++ file. See the
					cpp-to-c.c++ file for more
					info (in src/misc)

	--enable-debug			Turn the debug ON. This is
					still the default (mainly
					because many errors are
					actually asserts!)

	--enable-yydebug		Turn the yacc debug ON. This
					is like --enable-debug, it
					will generate errors that you
					wouldn't otherwise see. Errors
					which at times are
					"legitimate" (i.e. possible in
					the input files)

Note that if you don't have freetype 2.1.2 or better installed, the
ft2sswf tool won't be rebuilt. Anything else missing will usually
break the configure script.

Under Mac OS/X you at least need to specify these directories so it
all works well (by default, configure doesn't find fink):

	./configure --prefix=/sw --mandir=/sw/share/man


----------------------------------------------------------------------

IV. COMPILING WITH VISUAL C++

For Visual C++ users, you can use the pre-created files available in
the VC directory. At time of writing, the following extra files are
present in this directory:

	sswf_grammar.c
	sswf_grammar.h
	rename_all.bat

These are automatically generated from the sswf_grammer.y found in the
src/sswf directory. It requires bison to be regenerated.

The main source files are all in the src directory. All the C++ files
use the extension .c++ and that is not compatible with cl (the Visual
C++ compiler). If you want to compile these files, you need to rename
them. To do so, type these commands from the main directory:

	cd VC
	rename_all

IMPORTANT: this is automatically run if you get the .exe installer and
	   you install the source code with it.

There is one sub-directory for each tool and one for each library.

You will need to download the JPEG, zlib, iconv and freetype packages
if you want to use all the features in SSWF. The header files can be
put in the include directory. The libraries can be put in the main
lib directory or a directory you like to use for .lib files.

The libraries from MinGW do work very well with cl. You can download
them from:

	http://www.sourceforge.net/projects/gnuwin32

Note that I'm not currently maintaining anything in regard to cl and
thus it is likely that you will have some work to do in order to make
it compile in your project. I have however had several emails of people
who succeeded in doing so. There is also someone who posted a message
saying he would help. At this time, I do not know whether he replies
to these posts however.

