The glibc 2.14 NEWS file says __malloc_hook will be removed
in the next release, so future-proof our use by checking
for this symbol at configure time and only compiling the
malloc failure tests if it is present.
Doxygen is a tool for generating programming documentation
based on comments in header and source files. This commit
adds the necessary configuration file and associated support
in the autotools build.
Right now it doesn't generate much documentation because our
public header files aren't marked up. Warnings are printed
for undocumented members and arguments.
With subdir-objects, both the top-level makefile, and
libcelt/Makefile, which runs celt-specific unit tests,
were sharing libcelt/.deps for generated dependencies.
Each thought it owned the directory, and so would remove
the files it created in that directory, followed by the
directory itself. The second makefile would then fail to
because the files it created weren't there to remove,
blocking a successful 'make distcheck' with in runs
'make distclean' as part of its verification tests.
We can work around the problem by generating the makefile
for the tests in the actual test directory, so it doesn't
share autotools scratch space with the top level makefile.
These files allow compiling and linking against the reference
implementation with an invocation like `pkg-config --cflags
--libs opus`. They're optional within the opus build system,
but can simplify compilation for clients and are generally
considered part of a normal autotools build these days.
The -uninstalled version refers to local build products
within the tree, which is helpful for testing and unprivileged
builds. opus.pc is used once 'make install' has put the
libraries and headers somewhere more permanent.
Previously the autotools build litered whatever directory
'make' was invoked from with intermediate files. Adding
'subdir-objects' to AUTOMAKE_OPTIONS tells it to put them
in subdirectories according to the relative paths to the
source files, .i.e. silk/schur.o for $(srcdir)/silk/schur.c
The change to autogen.sh is necessary to handle the
(apparently new) case where an AUTOMAKE_OPTIONS line is
given without a minimum version number.
Rather than compiling in the fixed version number from the configure
file, it's more helpful for testing and debugging to directly embed
the repository's revision. We use 'git describe --tags' for this, since
for tagged revisions it just returns the tag name, and in other cases
is more readable than a raw commit id.
If git isn't present or can't find a repository to query, we fall back
to the static version number in the configure script.
Automake version 1.11 and above provide a build mode where
each build command is replaced by a single-line annotation.
Since autotools build lines for libraries typically each fill
an entire terminal screen, this mode makes it easier to keep
track of build progress, and warnings stand out more clearly.
For debugging the build process, the old behaviour can be
recovered by running 'make V=1' at bulid time, or by passing
--disable-silent-rules to configure.
Since Automake 1.11 is still very recent, we only invoke
the AM_SILENT_RULES macro if it is defined, allowing fallback
to the old behaviour under previous versions of automake.