Install Instructions for libsamplerate
======================================

The following instructions explain how to install libsamplerate under
Linux and other Unix-like systems, including macOS. (For Windows,
see http://libsndfile.github.io/libsamplerate/win32.html).

Preliminaries
-------------
1) Included with libsamplerate are example programs which use libsndfile:

        http://libsndfile.github.io/libsndfile/

   for file I/O. If you want to build them, you need to
   ensure that libsndfile is correctly installed first. If it is, the
   command "pkg-config --cflags --libs sndfile" should print out
   something like this:

     -lsndfile

   If pkg-config doesn't exist, you will need need to install it. If
   pkg-config cannot find libsndfile, you may need to install it. If you
   install from from a Linux distribution package, make sure you also
   install the libsndfile-devel package which contains the header files.

   If libsndfile is installed, you may need to set the PKG_CONFIG_PATH
   environment variable. If libsndfile is installed in /usr/local/lib,
   you will need to set PKG_CONFIG_PATH using:

       export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

2) The included tests suite for libsamplerate needs libfftw3 which is
   available here:

       http://www.fftw.org/

   If FFTW3 is not available, libsamplerate should still compile and
   install without problems, but the test suite will not be as
   comprehensive as it normally is.

Building
--------
Building and verifying libsamplerate is a four or five step process.

1) The first step is to run configure

        ./configure

   which should print out something like the following:

       checking build system type...
       ...
       ...
       -=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-

         Configuration summary :

           Version : ..................... X.Y.Z
           Enable debugging : ............ no

         Tools :

           Compiler is GCC : ............. yes
           GCC major version : ........... 3

         Extra tools required for testing and examples :

           Use FFTW : .................... yes
           Have libsndfile : ............. yes

         Installation directories :

           Library directory : ........... /usr/local/lib
           Program directory : ........... /usr/local/bin
           Pkgconfig directory : ......... /usr/local/lib/pkgconfig

       Compiling some other packages against libsamplerate may require
       the addition of "/usr/local/lib/pkgconfig" to the
       PKG_CONFIG_PATH environment variable.

   There are a number of configure options. See the output of
   configure when run with the --help command line option.

2) If all goes well with the above then compiling the library can be
   done with

       make

3) When that has finished, the test suite can be run using:

       make check

4) The final step is to install the library. This step needs to be
   carried out as the root user (or with sudo):

       make install

   This command will by default install the library in the directory
   /usr/local/lib. It can be installed in other locations by using the
   --prefix option in step 1).

5) On Linux, one more step is required, the registering of the library
   with the system. This is done by running the following command
   (also as the root user):

        ldconfig -v
