\input texinfo @c
@setfilename INSTALL.info
@include topdocs/defs.texi
@settitle INSTALL
@node Top, , , (dir)
@top

@contents

@chapter INSTALL - how to compile and install GNU Solfege @value{SOLFEGEVERSION} on a GNU like system

This file contains info on how to build and install GNU Solfege.
For run-time info, check the README file and the man page.

@section Obtaining

The latest version is available from
@uref{http://download.sourceforge.net/solfege} or (same server, other
look) @uref{http://sourceforge.net/project/showfiles.php?group_id=1465}.

The source code is also available from the GNU ftp sites and their mirrors:
@uref{ftp://alpha.gnu.org/gnu/solfege} and 
@uref{ftp://ftp.gnu.org/gnu/solfege}.

The homepage for GNU Solfege is @uref{http://www.solfege.org}.


@section You need this
@itemize @bullet
@item GNU Make
@item Gettext
@item Python header files (Python 2.1 or later)
@item C compiler (only GCC is tested, nothing else is expected to work.)
@item GNU m4 macro processor (for documentation preprocessing)
@item texinfo (ftp://ftp.gnu.org/gnu/texinfo)
@item swig (Simplified Wrapper and Interface Generator) found at
   @uref{http://www.swig.org}.
@end itemize

These programs are usually included with your linux distro.

If you edit @file{configure.in}, you need GNU Autoconf.

@section Configuring and compiling

@example
./configure
make
su -c "make install"
@end example

should work, and will install into

@example
  /usr/local/bin
  /usr/local/share
  /usr/local/lib
  /etc/solfege@value{SOLFEGESHORTVERSION}
@end example

Since Solfege require GNU m4 and GNU make, FreeBSD should do something
like this:

@example
M4=/usr/local/bin/gm4 ./configure
gmake
su -c "gmake install"
@end example

(If you first try without setting the @env{M4} variable, and see
configure fail, then you have to delete the file @file{config.cache}
before running the example above.)

Use the @option{--prefix} and @option{--sysconfdir} command line options
to install elsewhere. For example to install in your home directory:

@example
./configure --prefix=$HOME/usr --sysconfdir=$HOME/etc
make 
make install
@end example

If you just want to run Solfege without installing, do this:
@example
./configure
make
./solfege.py
@end example

The @command{configure} script can be given a number of options to
enable and disable various features. Some of them are described below.
For a complete list, type:

@example
./configure --help
@end example

@subsection @option{--without-gnome}
You can build Solfege without using the gnome libraries if you give
@command{configure} the @option{--without-gnome} command line option.

This is a ugly stripped down version of Solfege without html support
and without the id-tone exercise and piano and guitar widgets.

@subsection @option{--disable-oss-sound}
Use this if you are compiling on an OS that dont have the OSS.
The default is @option{--enable-oss-sound}.

@section Packaging
To create a debian package, configure and type @code{make deb}.

To create rpm and src.rpm package, configure and type @code{make rpm}.
You need write access to @file{/usr/src/redhat} to do this.


@bye
