Commit b30609a9 authored by j's avatar j
Browse files

copy vorbis 1.0.1 as a basis for the aotuv branch


svn path=/branches/vorbis-aotuv/; revision=12022
parents
aclocal.m4
config.h.in
Makefile.in
Makefile
config.status
libtool
ltmain.sh
config.cache
config.log
config.sub
config.guess
configure
*.gz
*.zip
.libs
.deps
*.ogg
vorbis-config
Monty <monty@xiph.org>
and the rest of the Xiph.org Foundation.
Copyright (c) 2002, Xiph.org Foundation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Note that these instructions are *not* necessary for distribution
tarballs; they have separate configure/build instructions.
Building this package from CVS is mainly intended for developers.
General users should obtain official distribution packages; both
source and binary distributions are available at
http://www.vorbis.com/.
-----
These are *brief* instructions on how to build this package from CVS.
Yes, there are details left out.
There are generally four steps necessary when building from CVS (i.e.,
a developer's copy):
1. cvs checkout of the sources, or cvs update. RTFM from your
favorite flavor of CVS documentation; information on the xiph.org
CVS repository can be found at http://www.xiph.org/cvs.html.
2. [re-]generate files such as "configure" and "Makefile.in" with the
GNU autoconf/automake tools. Run the "autogen.sh" script to
perform this step.
*** IF YOU ARE NOT BUILDING WITH GNU MAKE *AND* GCC: you must set
the AUTOMAKE_FLAGS environment variable to "--include-deps"
before running autogen.sh. For example:
csh% setenv AUTOMAKE_FLAGS --include-deps
csh% ./autogen.sh
or
sh% AUTOMAKE_FLAGS=--include-deps ./autogen.sh
3. Run configure. There are several options available; see
"./configure --help" for more information.
4. Run "make" to build the source.
In general, steps 2 and 3 need to be re-run every time any of the
following files are modified (either manually or by a cvs update):
configure.in
acinclude.m4
Running "make clean" after running steps 2 and 3 is generally also
advisable before running step 4. It isn't *always* necessary, but
unless you understand the workings of autoconf/automake, it's safest
to just do it.
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = foreign dist-zip
SUBDIRS = lib include doc examples win32 debian vq
m4datadir = $(datadir)/aclocal
m4data_DATA = vorbis.m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = vorbis.pc vorbisenc.pc vorbisfile.pc
EXTRA_DIST = HACKING todo.txt macos macosx autogen.sh libvorbis.spec \
vorbis.m4 vorbis.pc.in vorbisenc.pc.in vorbisfile.pc.in
dist-hook:
rm -rf `find $(distdir)/macos -name CVS`
rm -rf `find $(distdir)/macosx -name CVS`
debug:
$(MAKE) all CFLAGS="@DEBUG@"
profile:
$(MAKE) all CFLAGS="@PROFILE@"
********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
* by the Xiph.org Foundation, http://www.xiph.org/ *
* *
********************************************************************
NEW AND IMPORTANT:
If you're used to the source distribution from the first two beta
releases, things are now rearranged a bit. Specifically, the
'vorbis' CVS module contains only the libvorbis, libvorbisfile, and
libvorbisenc libraries. Because Ogg bitstreams are to be used by other
Ogg codecs, Ogg framing and streaming functionality is now in libogg
(the 'ogg' CVS module). Vorbis utilities are in 'vorbis-tools' and various
player plugins are in 'vorbis-plugins'. For now, you'll need to check
out these other modules seperately. (Note: the xmms plugin is in the xmms
CVS tree in xmms/Input/vorbis.)
Secondly, the Ogg/Vorbis build systems now use automake. Instead of
'./configure; make', the proper build sequence (in each module) is
'./autogen.sh; make'.
You will also need the newest versions of autoconf, automake, and libtool
in order to compile vorbis from CVS. configure scripts are provided for you
in tarball distributions.
WHAT'S HERE:
This source distribution includes libvorbis and an example
encoder/player to demonstrate use of libvorbis and documentation on
the Ogg Vorbis audio coding format.
Directory:
./lib The source for the libraries, a BSD-license implementation
of the public domain Ogg Vorbis audio encoding format.
./include Library API headers
./debian Rules/spec files for building Debian .deb packages
./doc Vorbis documentation
./examples Example code illustrating programmatic use of libvorbis,
libvorbisfile and libvorbisenc
./mac Codewarrior project files and build tweaks for MacOS.
./macosx Project files for MacOS X.
./win32 Win32 projects files and build automation
./vq Internal utilities for training/building new LSP/residue
and auxiliary codebooks.
WHAT IS VORBIS:
Vorbis is a general purpose audio and music encoding format
contemporary to MPEG-4's AAC and TwinVQ, the next generation beyond
MPEG audio layer 3. Unlike the MPEG sponsored formats (and other
proprietary formats such as RealAudio G2 and Windows' flavor of the
month), the Vorbis CODEC specification belongs to the public domain.
All the technical details are published and documented, and any
software entity may make full use of the format without royalty or
patent concerns.
This package contains:
.) libvorbis, a BSD-style license software implementation of
the Vorbis specification by the Xiph.Org Foundation (http://www.xiph.org/)
.) libvorbisfile, a BSD-style license convenience library
built on Vorbis designed to simplify common uses and a number of GPL
example programs
.) libvorbisenc, a BSD-style license library that provides a simple,
programmatic encoding setup interface
.) example code making use of libogg, libvorbis, libvorbisfile and
libvorbisenc
CONTACT:
The Ogg homepage is located at 'http://www.xiph.org/ogg/'.
Vorbis's homepage is located at 'http://www.xiph.org/ogg/vorbis/'.
Up to date technical documents, contact information, source code and
pre-built utilities may be found there.
BUILDING FROM CVS:
./autogen.sh
make
and as root if desired:
make install
This will install the vorbis libraries (static and shared) into
/usr/local/lib, includes into /usr/local/include and API manpages
(once we write some) into /usr/local/man.
BUILDING FROM TARBALL DISTRIBUTIONS:
./configure
make
and optionally (as root):
make install
BUILDING RPMS:
after normal configuring:
make dist
rpm -ta libvorbis-<version>.tar.gz
BUILDING ON MACOS 9:
Vorbis on MacOS 9 is built using CodeWarrior 5.3. To build it, first
verify that the Ogg libraries are already built following the
instructions in the Ogg module README. Open vorbis/mac/libvorbis.mcp,
switch to the "Targets" pane, select everything, and make the project.
Do the same thing to build libvorbisenc.mcp, and libvorbisfile.mcp (in
that order). In vorbis/mac/Output you will now have both debug and final
versions of Vorbis shared libraries to link your projects against.
To build a project using Ogg Vorbis, add access paths to your
CodeWarrior project for the ogg/include, ogg/mac/Output,
vorbis/include, and vorbis/mac/Output folders. Be sure that
"interpret DOS and Unix paths" is turned on in your project; it can
be found in the "access paths" pane in your project settings. Now
simply add the shared libraries you need to your project (OggLib and
VorbisLib at least) and #include "ogg/ogg.h" and "vorbis/codec.h"
wherever you need to access Ogg and Vorbis functionality.
# acinclude.m4
# all .m4 files needed that might not be installed go here
# Configure paths for libogg
# Jack Moffitt <jack@icecast.org> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
dnl
AC_DEFUN(XIPH_PATH_OGG,
[dnl
dnl Get the cflags and libraries
dnl
AC_ARG_WITH(ogg,[ --with-ogg=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
AC_ARG_WITH(ogg-libraries,[ --with-ogg-libraries=DIR Directory where libogg library is installed (optional)], ogg_libraries="$withval", ogg_libraries="")
AC_ARG_WITH(ogg-includes,[ --with-ogg-includes=DIR Directory where libogg header files are installed (optional)], ogg_includes="$withval", ogg_includes="")
AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
if test "x$ogg_libraries" != "x" ; then
OGG_LIBS="-L$ogg_libraries"
elif test "x$ogg_prefix" != "x" ; then
OGG_LIBS="-L$ogg_prefix/lib"
elif test "x$prefix" != "xNONE" ; then
OGG_LIBS="-L$prefix/lib"
fi
OGG_LIBS="$OGG_LIBS -logg"
if test "x$ogg_includes" != "x" ; then
OGG_CFLAGS="-I$ogg_includes"
elif test "x$ogg_prefix" != "x" ; then
OGG_CFLAGS="-I$ogg_prefix/include"
elif test "x$prefix" != "xNONE"; then
OGG_CFLAGS="-I$prefix/include"
fi
AC_MSG_CHECKING(for Ogg)
no_ogg=""
if test "x$enable_oggtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
dnl
dnl Now check if the installed Ogg is sufficiently new.
dnl
rm -f conf.oggtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ogg/ogg.h>
int main ()
{
system("touch conf.oggtest");
return 0;
}
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_ogg" = "x" ; then
AC_MSG_RESULT(yes)
ifelse([$1], , :, [$1])
else
AC_MSG_RESULT(no)
if test -f conf.oggtest ; then
:
else
echo "*** Could not run Ogg test program, checking why..."
CFLAGS="$CFLAGS $OGG_CFLAGS"
LIBS="$LIBS $OGG_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <ogg/ogg.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding Ogg or finding the wrong"
echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
echo "*** or that you have moved Ogg since it was installed. In the latter case, you"
echo "*** may want to edit the ogg-config script: $OGG_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
OGG_CFLAGS=""
OGG_LIBS=""
ifelse([$2], , :, [$2])
fi
AC_SUBST(OGG_CFLAGS)
AC_SUBST(OGG_LIBS)
rm -f conf.oggtest
])
#!/bin/sh
# Run this to set up the build system: configure, makefiles, etc.
# (based on the version in enlightenment's cvs)
package="vorbis"
olddir=`pwd`
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
cd "$srcdir"
DIE=0
echo "checking for autoconf... "
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $package."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
echo "checking for automake... "
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have automake installed to compile $package."
echo "Download the appropriate package for your system,"
echo "or get the source from one of the GNU ftp sites"
echo "listed in http://www.gnu.org/order/ftp.html"
DIE=1
}
echo -n "checking for libtool... "
for LIBTOOLIZE in libtoolize glibtoolize nope; do
(which $LIBTOOLIZE) > /dev/null 2>&1 && break
done
if test x$LIBTOOLIZE = xnope; then
echo "nope."
LIBTOOLIZE=libtoolize
else
echo $LIBTOOLIZE
fi
($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile $package."
echo "Download the appropriate package for your system,"
echo "or get the source from one of the GNU ftp sites"
echo "listed in http://www.gnu.org/order/ftp.html"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
echo "Generating configuration files for $package, please wait...."
echo " aclocal $ACLOCAL_FLAGS"
aclocal $ACLOCAL_FLAGS
#echo " autoheader"
#autoheader
echo " $LIBTOOLIZE --automake"
$LIBTOOLIZE --automake
echo " automake --add-missing $AUTOMAKE_FLAGS"
automake --add-missing $AUTOMAKE_FLAGS
echo " autoconf"
autoconf
cd $olddir
$srcdir/configure "$@" && echo
dnl Process this file with autoconf to produce a configure script
dnl ------------------------------------------------
dnl Initialization and Versioning
dnl ------------------------------------------------
AC_INIT(lib/mdct.c)
AM_INIT_AUTOMAKE(libvorbis,1.0.1)
AM_MAINTAINER_MODE
dnl Library versioning
V_LIB_CURRENT=3
V_LIB_REVISION=0
V_LIB_AGE=3
VF_LIB_CURRENT=4
VF_LIB_REVISION=0
VF_LIB_AGE=1
VE_LIB_CURRENT=2
VE_LIB_REVISION=0
VE_LIB_AGE=0
AC_SUBST(V_LIB_CURRENT)
AC_SUBST(V_LIB_REVISION)
AC_SUBST(V_LIB_AGE)
AC_SUBST(VF_LIB_CURRENT)
AC_SUBST(VF_LIB_REVISION)
AC_SUBST(VF_LIB_AGE)
AC_SUBST(VE_LIB_CURRENT)
AC_SUBST(VE_LIB_REVISION)
AC_SUBST(VE_LIB_AGE)
dnl --------------------------------------------------
dnl Check for programs
dnl --------------------------------------------------
dnl save $CFLAGS since AC_PROG_CC likes to insert "-g -O2"
dnl if $CFLAGS is blank
cflags_save="$CFLAGS"
AC_PROG_CC
AC_PROG_CPP
CFLAGS="$cflags_save"
AM_PROG_LIBTOOL
dnl docbook xml transform and processing tools
AC_ARG_ENABLE(docs,
[ --enable-docs build the documentation],
[case "${enableval}" in
yes) build_docs=true;;
no) build_docs=false;;
*) AC_MSG_ERROR(unknown value ${enableval} for --enable-docs);;
esac],[build_docs=false])
dnl ideally we'd look for other tools and support them
if test x$build_docs = xtrue; then
AC_CHECK_PROGS([XSLTPROC], xsltproc, [/bin/false])
AC_CHECK_PROGS([PDFXMLTEX], pdfxmltex, [/bin/false])
if test "x$XSLTPROC" = "x/bin/false" || test "x$PDFXMLTEX" = "x/bin/false"; then
build_docs=false
AC_MSG_WARN([Documentation will not be built])
fi
fi
AM_CONDITIONAL(BUILD_DOCS, [test x$build_docs = xtrue])
dnl --------------------------------------------------
dnl Set build flags based on environment
dnl --------------------------------------------------
AC_CANONICAL_HOST
dnl Set some target options
cflags_save="$CFLAGS"
ldflags_save="$LDFLAGS"
if test -z "$GCC"; then
case $host in
*-*-irix*)
dnl If we're on IRIX, we wanna use cc even if gcc
dnl is there (unless the user has overriden us)...
if test -z "$CC"; then
CC=cc
fi
DEBUG="-g -signed"
CFLAGS="-O2 -w -signed"
PROFILE="-p -g3 -O2 -signed" ;;
sparc-sun-solaris*)
DEBUG="-v -g"
CFLAGS="-xO4 -fast -w -fsimple -native -xcg92"
PROFILE="-v -xpg -g -xO4 -fast -native -fsimple -xcg92 -Dsuncc" ;;
*)
DEBUG="-g"
CFLAGS="-O"
PROFILE="-g -p" ;;
esac
else
case $host in
*86-*-linux*)
DEBUG="-g -Wall -W -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
CFLAGS="-O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char"
# PROFILE="-Wall -W -pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static"
PROFILE="-Wall -W -pg -g -O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline"
# glibc < 2.1.3 has a serious FP bug in the math inline header
# that will cripple Vorbis. Look to see if the magic FP stack
# clobber is missing in the mathinline header, thus indicating
# the buggy version
AC_EGREP_CPP(log10.*fldlg2.*fxch,[
#define __LIBC_INTERNAL_MATH_INLINES 1
#define __OPTIMIZE__
#include <math.h>
],bad=maybe,bad=no)
if test ${bad} = "maybe" ;then
AC_EGREP_CPP(log10.*fldlg2.*fxch.*st\([[0123456789]]*\),
[
#define __LIBC_INTERNAL_MATH_INLINES 1
#define __OPTIMIZE__
#include <math.h>
],bad=no,bad=yes)
fi
if test ${bad} = "yes" ;then
AC_MSG_WARN([ ])
AC_MSG_WARN([********************************************************])
AC_MSG_WARN([* The glibc headers on this machine have a serious bug *])
AC_MSG_WARN([* in /usr/include/bits/mathinline.h This bug affects *])
AC_MSG_WARN([* all floating point code, not just Ogg, built on this *])
AC_MSG_WARN([* machine. Upgrading to glibc 2.1.3 is strongly urged *])
AC_MSG_WARN([* to correct the problem. Note that upgrading glibc *])
AC_MSG_WARN([* will not fix any previously built programs; this is *])
AC_MSG_WARN([* a compile-time time bug. *])
AC_MSG_WARN([* To work around the problem for this build of Ogg, *])
AC_MSG_WARN([* autoconf is disabling all math inlining. This will *])
AC_MSG_WARN([* hurt Ogg performace but is necessary for an Ogg that *])
AC_MSG_WARN([* will actually work. Once glibc is upgraded, rerun *])
AC_MSG_WARN([* configure and make to build with inlining. *])
AC_MSG_WARN([********************************************************])
AC_MSG_WARN([ ])
CFLAGS=${OPT}" -D__NO_MATH_INLINES"
PROFILE=${PROFILE}" -D__NO_MATH_INLINES"
fi;;
powerpc-*-linux*)
DEBUG="-g -Wall -W -D_REENTRANT -D__NO_MATH_INLINES"
CFLAGS="-O3 -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT"
PROFILE="-pg -g -O3 -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT";;
*-*-linux*)
DEBUG="-g -Wall -W -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
CFLAGS="-O20 -ffast-math -D_REENTRANT -fsigned-char"
PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
sparc-sun-*)
DEBUG="-g -Wall -W -D__NO_MATH_INLINES -fsigned-char -mv8"
CFLAGS="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
PROFILE="-pg -g -O20 -D__NO_MATH_INLINES -fsigned-char -mv8" ;;
*-*-darwin*)
DEBUG="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -O0 -fsigned-char"
CFLAGS="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -O4 -ffast-math -fsigned-char"
PROFILE="-DDARWIN -fno-common -force_cpusubtype_ALL -Wall -g -pg -O4 -ffast-math -fsigned-char";;
*)
DEBUG="-g -Wall -W -D__NO_MATH_INLINES -fsigned-char"
CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char"
PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
esac
fi
CFLAGS="$CFLAGS $cflags_save"
LDFLAGS="$LDFLAGS $ldflags_save"
dnl --------------------------------------------------
dnl Check for headers
dnl --------------------------------------------------
AC_CHECK_HEADER(memory.h,CFLAGS="$CFLAGS -DUSE_MEMORY_H",:)
dnl --------------------------------------------------
dnl Check for typedefs, structures, etc
dnl --------------------------------------------------
dnl none