Installation
------------

First, a couple of things to note:

* You need to be on Windows, Linux, or OS X.
* You need to have the libraries and headers for libavutil,
  libavcodec, and libswscale installed.
* You need to have either GCC, Clang, MSVC, or ICC/ICL installed.
  Both a C and C++ compiler are required.
* You need to have Yasm installed.
* You need Python 3 for VSScript and to build the Python module.
* You need to have Cython installed in your Python 3 environment
  in order to invoke the Python wrapper setup script.
* You need Sphinx if you want to build the documentation.

First off, you'll want to fetch Waf which is the build tool
VapourSynth uses:

    $ ./bootstrap.py

You don't have to fetch it with this script; you can also
simply download it from the official Google Code repository:
http://code.google.com/p/waf

Then, configure the project:

    $ ./waf configure

The configure operation has some options which can be used to
fine-tune the build:

* --prefix=path (default: /usr/local)
  Specifies where to install the final VapourSynth artifacts.
* --libdir=path (default: ${PREFIX}/lib)
  Specifies where to install VapourSynth libraries.
* --plugindir=path (default: ${LIBDIR}/vapoursynth)
  Specifies where to install plugins/filters.
* --docdir=path (default: ${PREFIX}/share/doc/vapoursynth)
  Specifies where to install Sphinx documentation and examples.
* --includedir=path (default: ${PREFIX}/include/vapoursynth)
  Specifies where to install C/C++ headers.
* --mode=debug/release (default: release)
  Specifies what mode to compile C and C++ code in. When in
  debug mode, debug info and debugging helpers will be emitted
  by the compiler, and no optimization will be done. In release
  mode, all (safe) optimizations are performed and no debug
  info is generated.
* --shared=true/false (default: true)
  Specifies whether to build a shared library.
* --static=true/false (default: false)
  Specifies whether to build a static library.
* --core=true/false (default: true)
  Specifies whether to build libvapoursynth.
* --avisynth=true/false (default: true)
  Specifies whether to build the Avisynth compatibility layer
  when building on Windows (has no effect on other OSs).
* --script=true/false (default: true)
  Specifies whether to build libvapoursynth-script.
* --pipe=true/false (default: true)
  Specifies whether to build VSPipe.
* --filters=true/false (default: true)
  Specifies whether to build the included filters. These are
  always built as shared libraries.
* --examples=true/false (default: false)
  Specifies whether to install the SDK examples.
* --docs=true/false (default: false)
  Specifies whether to build the Sphinx-based documentation.

Once the project is configured, simply execute:

    $ ./waf build

By default, Waf builds tasks in parallel. You can control the
level of parallelism with the -j option, like with Make.

If you want to build the Cython wrapper, you can do so now by
executing:

    $ ./setup.py build

Finally, to install VapourSynth:

    $ ./waf install

And to uninstall:

    $ ./waf uninstall

The install and uninstall commands accept a --destdir option
which prepends a value to the prefix given earlier in the
configure phase, in case this may be of use to you.

To install the Cython wrapper:

    $ ./setup.py install

Note that the setup script has a --prefix option like Waf.

Finally, you can run the Python tests if you have installed
the Python module:

    $ ./waf test
