summaryrefslogtreecommitdiff
path: root/main/libresample/configure.in
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-12-31 21:22:31 +0000
committerRussell Bryant <russell@russellbryant.com>2007-12-31 21:22:31 +0000
commit21cb767db7d4854769d6a9d15e2008ab27c404a5 (patch)
tree823393d4498b07581162c3e5266a494aa638a45c /main/libresample/configure.in
parentf3e2f0bb0a0bed2960871087e3555b5acb239a78 (diff)
Merge changes from team/russell/codec_resample
This commit imports libresample for use in Asterisk. It also adds a new codec module, codec_resample. This module uses libresample to re-sample signed linear audio between 8 kHz and 16 kHz. It also provides an alternative for converting between 16 kHz G.722 and 8 kHz signed linear when using G.722, which will likely be useful as some people have complained about volume issues when the current codec_g722 converts to 8 kHz signed linear. But, to test this, you will have to disable the g722-to-slin and g722-to-slin16 translators in codec_g722.c. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/libresample/configure.in')
-rw-r--r--main/libresample/configure.in68
1 files changed, 68 insertions, 0 deletions
diff --git a/main/libresample/configure.in b/main/libresample/configure.in
new file mode 100644
index 000000000..e676b69f2
--- /dev/null
+++ b/main/libresample/configure.in
@@ -0,0 +1,68 @@
+dnl
+dnl libresample configure.in script
+dnl
+dnl Dominic Mazzoni
+dnl
+
+dnl Require autoconf >= 2.13
+AC_PREREQ(2.13)
+
+dnl Init autoconf and make sure configure is being called
+dnl from the right directory
+AC_INIT([src/resample.c])
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_RANLIB
+
+AC_PATH_PROG(AR, ar, no)
+if [[ $AR = "no" ]] ; then
+ AC_MSG_ERROR("Could not find ar - needed to create a library");
+fi
+
+AC_SUBST(TARGETS)
+TARGETS="libresample.a tests/testresample"
+
+AC_CHECK_LIB(sndfile, sf_open, have_libsndfile=yes, have_libsndfile=no)
+AC_CHECK_HEADER(sndfile.h, , have_libsndfile=no)
+
+if [[ $have_libsndfile = "yes" ]] ; then
+ TARGETS="$TARGETS tests/resample-sndfile"
+fi
+
+AC_CHECK_LIB(samplerate, src_simple, have_libsamplerate=yes, have_libsamplerate=no)
+AC_CHECK_HEADER(samplerate.h, , have_libsamplerate=no)
+
+if [[ $have_libsamplerate = "yes" ]] ; then
+ TARGETS="$TARGETS tests/compareresample"
+fi
+
+AC_CHECK_HEADERS(inttypes.h)
+
+AC_CONFIG_HEADER(src/config.h:src/configtemplate.h)
+AC_OUTPUT([Makefile])
+
+echo ""
+
+if [[ $have_libsamplerate = "yes" ]] ; then
+ echo "Configured to build tests/resample-sndfile using libsndfile"
+ echo ""
+else
+ echo "Could not find libsndfile - needed if you want to"
+ echo "compile tests/resample-sndfile"
+ echo ""
+fi
+
+if [[ $have_libsamplerate = "yes" ]] ; then
+ echo "Configured to build tests/compareresample to compare against"
+ echo "Erik de Castro Lopo's libsamplerate library."
+ echo ""
+else
+ echo "Could not find libsamplerate - only needed if you want to"
+ echo "compile tests/compareresample to compare their performance."
+ echo ""
+fi
+
+echo "Type 'configure --help' to see options."
+echo ""
+echo "Type 'make' to build libresample and tests."