To compile and use SWIG, you will need the following on your machine:

        A C++ compiler  (ie. g++)
        An ANSI C compiler (ie. gcc)
        yacc or bison

To compile and install SWIG, type the following :

        ./configure
        make
        make install

There are a number of configuration options that you can
give to 'configure' :

        --prefix=/usr/local     

          Set the installation prefix.  SWIG installs into
          /usr/local by default.

        --exec_prefix=/usr/local

          Set the prefix used to install platform specific
          files (binaries and libraries).  Use this if the
          location is different than that given with --prefix.

        --with-lang={TCL,PERL5,PYTHON,PERL4,GUILE3}

          This lets you choose the default SWIG target language.
          By default, SWIG chooses TCL, but you can select
          another as shown :

                ./configure --with-lang=PYTHON

        --with-doc={ASCII,LaTeX,HTML,NODOC}

          This lets you choose the default SWIG documentation
          method.  By default, SWIG chooses ASCII.

        --without-yacc
 
          Try to compile without using yacc/bison.  Only use
          this if compilation fails.

To test the SWIG parser after compilation, type 'make test'.  This
will print out lots of stuff and may take awhile.  However, if it
works you will get a message at the end.  If the tests core dump or
die an unexpected death, please send me e-mail!


Troubleshooting
--------------

This is the first autoconf script that has been used with SWIG so there
may be some glitches :

1.  Get errors compiling scanner.cxx or parser.cxx.  

    Try
         ./configure --without-yacc
 
    and recompile.   This will copy the parser.cxx files created
    under Solaris.   Not guaranteed to work, but better than nothing.

2.  Unable to locate yacc or bison.

    Try

	./configure --without-yacc

3.  SWIG can't seem to find Perl5 correctly

    It seems like every version of Perl5 has installed critical files
    in a different location.  SWIG seems to do a fairly good job
    with Perl5.002 and later versions.   If the configure script
    can't find the right files, you'll have to edit the file
    "Makefile.template" by hand in order to compile the examples.

4.  What if certain packages are missing?

    SWIG does not need Tcl, Perl, Python, or Guile to compile.  The
    configure script tries to build a makefile for the examples.
    If packages aren't found, it just means that those examples
    won't compile (which doesn't matter if you don't have the
    package installed anyways).


If you experience any problems with the configure script, please
let me know.



    