Here is a summary of the configure options that are most frequently used when building Octave:
--help
--prefix=
prefix--srcdir=
dir--enable-64
--enable-bounds-check
--disable-docs
--enable-float-truncate
--enable-readline
--enable-shared
You may also want to build a shared version of libstdc++
, if your
system doesn't already have one.
--enable-dl
dlopen
and friends to make Octave capable of dynamically
linking externally compiled functions (this is the default if
--enable-shared is specified). This option only works on
systems that actually have these functions. If you plan on using this
feature, you should probably also use --enable-shared to reduce
the size of your .oct files.
--with-blas=<lib>
--with-lapack=<lib>
--with-magick=<lib>
--with-sepchar=<char>
--without-amd
--without-camd
--without-colamd
--without-ccolamd
--without-cholmod
--without-curl
urlread
and
urlwrite
functions.
--without-cxsparse
--without-fftw3
--without-fftw3f
--without-glpk
--without-hdf5
--without-opengl
gnuplot
installed in order to make plots.
--without-qhull
delaunay
, convhull
, and
related functions.
--without-qrupdate
--without-umfpack
--without-zlib
--without-framework-carbon
--without-framework-opengl
See the file INSTALL for more general information about the command line options used by configure. That file also contains instructions for compiling in a directory other than the one where the source is located.
You will need a recent version of GNU Make as Octave relies on certain features not generally available in all versions of make. Modifying Octave's makefiles to work with other make programs is probably not worth your time; instead, we simply recommend installing GNU Make.
There are currently two options for plotting in Octave: (1) the external program gnuplot, or (2) the internal graphics engine using OpenGL and FLTK. Gnuplot is a command-driven interactive function plotting program. Gnuplot is copyrighted, but freely distributable. As of Octave release 3.4, gnuplot is the default option for plotting. But, the internal graphics engine is nearly 100% compatible, certainly for most ordinary plots, and users are encouraged to test it. It is anticipated that the internal engine will become the default option at the next major release of Octave.
To compile Octave, you will need a recent version of g++
or other
ANSI C++ compiler. In addition, you will need a Fortran 77 compiler or
f2c
. If you use f2c
, you will need a script like
fort77
that works like a normal Fortran compiler by combining
f2c
with your C compiler in a single script.
If you plan to modify the parser you will also need GNU bison
and
flex
. If you modify the documentation, you will need GNU
Texinfo.
GNU Make, gcc
(and libstdc++
), gnuplot
,
bison
, flex
, and Texinfo are all available from many
anonymous ftp archives. The primary site is ftp.gnu.org, but it
is often very busy. A list of sites that mirror the software on
ftp.gnu.org is available by anonymous ftp from
ftp://ftp.gnu.org/pub/gnu/GNUinfo/FTP.
Octave requires approximately 1.4 GB of disk storage to unpack and compile from source (significantly less, 400 MB, if you don't compile with debugging symbols). To compile without debugging symbols try the command
make CFLAGS=-O CXXFLAGS=-O LDFLAGS=
instead of just make.
make install
.
This will install a copy of Octave, its libraries, and its documentation in the destination directory. As distributed, Octave is installed in the following directories. In the table below, prefix defaults to /usr/local, version stands for the current version number of the interpreter, and arch is the type of computer on which Octave is installed (for example, ‘i586-unknown-gnu’).