alogg requires the following:

  libogg-1.0rc3       (or newer, available at http://www.vorbis.com/)
  libvorbis-1.0rc3    (or newer, available at http://www.vorbis.com/)
  allegro-4.0.0       (or newer, available at http://alleg.sf.net/)

To compile with Tremor, a fixed point implementation of the Ogg/Vorbis
decoder, you also a copy of the Tremor library. Tremor can be found at
http://www.xiph.org/.

To compile with URL support, you also need libcurl 7.10 or newer. libcurl
is a library for transferring data specified with URL syntax, available at
http://curl.haxx.se.
Note that URL streaming is experimental is not ready for production use yet.
In particular, I have not yet tried to stream off an Icecast server.

To compile with threaded streaming support, you also need pthreads. pthreads
is the most widely used library for thread support, and is supplied with
most operating systems. You can even get a version of pthreads for MS-DOS
and MS-Windows. For the latter, it can be found somewhere at
http://www.redhat.com.

Integration with Allegro's load_sample requires Allegro 4.1.1.
If you have an older version of Allegro and want to be able to use
load_sample to load Ogg/Vorbis streams, you can patch Allegro this way:

cd /home/user/allegro # or wherever you put Allegro
patch -p1 < /home/user/alogg-1.3.7/sample.diff # or wherever you put alogg

If you want to add Ogg/Vorbis support to the grabber and dat utilities,
you have to copy the datogg.* files into the tools/plugins directory in
your Allegro tree, and recompile Allegro. You must have already installed
alogg itself prior to doing that, since grabber and dat will try to find
it to compile.
You also have to link against the Ogg/Vorbis libraries in order for the
grabber to link. If you use Unix, DJGPP or Mingw32, the supplied linker
scripts will do this for you automatically, as they have been copied to
the plugins directory (the linker scripts are named datogg.sc*). If you use
another platform, or want to use Tremor, you will have to apply a patch to
Allegro's makefile. If you want to use libvorbis, use libs.diff; if you want
to use Tremor, use tremor.diff. The datogg grabber plugin needs to be told
that Tremor is to be used instead of libvorbis, and Allegro has no support
for plugin specific compile time scripts, so this must be done by hand.
You can apply the patch to the Allegro distribution like this:

cd /home/user/allegro # or wherever you put Allegro
patch -p0 < /home/user/alogg-1.3.7/libs.diff # or wherever you put alogg

or, if using Tremor:

cd /home/user/allegro # or wherever you put Allegro
patch -p0 < /home/user/alogg-1.3.7/tremor.diff # or wherever you put alogg

If you do not have patch, then your mileage may vary. You might have to
modify a project file, depending on how your compiler does this.



alogg is written in C, and should be compilable with any C compiler that
can build Allegro. It was written using GCC 2.95 on Linux, and has been
reported to build on DOS/DJGPP and Win32/Mingw32.
If you are using GCC and GNU make, then building is a very simple matter:
make
You may also want to install the library:
make install
or, if you want to install it somewhere else than /usr/local:
make install PREFIX=/home/user/alogg

Note that if you specify flags when building alogg, you should specify the
exact same flags when installing it. For instance, if you build alogg using:
make FOO=1 BAR=1
then you should install it using:
make install FOO=1 BAR=1


You can build alogg as a shared library too:
make SHARED=1
To install, you must specify this flag too:
make install SHARED=1

To build with the Tremor fixed point implementation of the Ogg/Vorbis
decoder, you have to specify this when building alogg:
make TREMOR=1
Note that since Tremor is only a decoder, neither the encoding part
of alogg nor alogg_encode will be compiled in.

To build in the URL streaming support, you need to specify it when building
alogg:
make CURL=1

To build in the threaded streaming support, you also need to specify it
when building:
make PTHREAD=1

You can of course mix these, so to build alogg as a shared library with
Tremor, URL streaming, and pthreads support:
make SHARED=1 TREMOR=1 CURL=1 PTHREAD=1

Note that when passing such parameters to make, you should be consistent
when issuing other make commands. For instance, if you build the library
with Tremor support (make TREMOR=1), then you should specify it again
when installing (make install TREMOR=1), or cleaning (make clean TREMOR=1).


A separate part of alogg is datogg, a plugin for Allegro's grabber utility.
It allows one to create Ogg/Vorbis stream objects. Since the grabber only
recognizes plugins at compile time, you will have, after having compiled
and installed alogg, to copy the files datogg.* in the plugins directory,
located in tools/plugins where you have put your Allegro tree, or symlink
them.
Then, go to the main Allegro directory, and type:
make depend
make
The first command will make Allegro notice a new plugin was added,
and the second will recompile it with support for datogg. See above for
instructions on how to link the Ogg/Vorbis libraries to the grabber
if your platform can't use the supplied linker scripts.

If you use Tremor and you have followed the steps to patch Allegro's
makefile detailed above, the grabber should have been built with Tremor.

When this is done, the grabber (don't forget to install it first, or
you'll likely be running an old version) will be able to create and
load Ogg/Vorbis streams, which you can then use in your programs.


The documentation for alogg can be generated in several formats.
To generate the documentation in:
 - HTML, type "make docs TYPE=html"
 - texinfo, type "make docs TYPE=texi"
etc.
Make sure that Allegro's makedoc program is in your path, as it will be
used to generate the documentation. For a complete list of the formats
the doc can be generated in, see makedoc in the Allegro distribution.

