
                  Compiling and Installing SML#

== Requirements

The following softwares are required to build and install SML#:

  * C/C++ compiler: GCC (4.7 or above) or Clang
  * GNU make or BSD make
  * LLVM 3.7.1
  * GNU MP library
  * YAJL (2.0.0 or above)

== Quick Start

  $ ./configure
  $ make
  $ make install

Things will be installed under /usr/local/bin and /usr/local/lib/smlsharp.

== Configurations

If you meet some troubles caused by C compiler, rerun configure
to try to compile with another compiler.

  $ ./configure CC=<C_COMPILER> CXX=<C++_COMPILER>

If LLVM are not installed in a non-standard directory on your system,
specify the directory by --with-llvm option.  For example:

  $ ./configure --with-llvm=/usr/local/lib/llvm-3.7.1

If other required libraries are in a non-standard directory, specify
CPPFLAGS and LDFLAGS so that compiler can find them. For example:

  $ ./configure CPPFLAGS=-I/opt/pkg/include LDFLAGS=-L/opt/pkg/lib

You will see all configuration options by invoking configure with
--help option.

  $ ./configure --help

== Customizing install location

Run configure with --prefix option to specify where to install.

  $ ./configure --prefix=<PREFIX>

If the --prefix option is omitted, /usr/local is assumed as PREFIX.
Things are installed in those locations:

  <PREFIX>/bin/smlsharp          SML# compiler
  <PREFIX>/bin/smlformat         SMLFormat
  <PREFIX>/bin/smllex            SML# variant of ML-lex
  <PREFIX>/bin/smlyacc           SML# variant of ML-yacc
  <PREFIX>/lib/smlsharp/         Directory for libraries of SML#
