summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2002-06-10 10:25:55 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2002-06-10 10:25:55 +0000
commit6c98f7f08cb07731c6ade89449f90433ea69c5e3 (patch)
treed56fb3bfdb9ce9be9776354d9ec1d424155557ac /m4
parentdc461761f7045dda80afa475531d1aeacdc4db1d (diff)
downloadgstreamer-plugins-bad-6c98f7f08cb07731c6ade89449f90433ea69c5e3.tar.gz
added rc3 check, rc2 will now not be detected anymore
Original commit message from CVS: added rc3 check, rc2 will now not be detected anymore
Diffstat (limited to 'm4')
-rw-r--r--m4/vorbis.m456
1 files changed, 35 insertions, 21 deletions
diff --git a/m4/vorbis.m4 b/m4/vorbis.m4
index 417bb66ab..73e3b43af 100644
--- a/m4/vorbis.m4
+++ b/m4/vorbis.m4
@@ -1,6 +1,7 @@
# Configure paths for libvorbis
# Jack Moffitt <jack@icecast.org> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
+# thomasvs added check for vorbis_bitrate_addblock which is new in rc3
dnl AM_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
@@ -9,29 +10,31 @@ AC_DEFUN(AM_PATH_VORBIS,
[dnl
dnl Get the cflags and libraries
dnl
-AC_ARG_WITH(vorbis-prefix,
- AC_HELP_STRING([--with-vorbis-prefix=PFX],
- [prefix where libvorbis is installed (optional)]),
- vorbis_prefix="$withval", vorbis_prefix="")
+AC_ARG_WITH(vorbis,[ --with-vorbis=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="")
+AC_ARG_WITH(vorbis-libraries,[ --with-vorbis-libraries=DIR Directory where libvorbis library is installed (optional)], vorbis_libraries="$withval", vorbis_libraries="")
+AC_ARG_WITH(vorbis-includes,[ --with-vorbis-includes=DIR Directory where libvorbis header files are installed (optional)], vorbis_includes="$withval", vorbis_includes="")
+AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes)
-AC_ARG_ENABLE(vorbistest,
- AC_HELP_STRING([--disable-vorbistest],
- [do not try to compile and run a test Vorbis program]),
- , enable_vorbistest=yes)
+ if test "x$vorbis_libraries" != "x" ; then
+ VORBIS_LIBS="-L$vorbis_libraries"
+ elif test "x$vorbis_prefix" != "x" ; then
+ VORBIS_LIBS="-L$vorbis_prefix/lib"
+ elif test "x$prefix" != "xNONE"; then
+ VORBIS_LIBS="-L$prefix/lib"
+ fi
+
+ VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
+ VORBISFILE_LIBS="-lvorbisfile"
+ VORBISENC_LIBS="-lvorbisenc"
- if test "x$vorbis_prefix" != "xNONE" ; then
- vorbis_args="$vorbis_args --prefix=$vorbis_prefix"
+ if test "x$vorbis_includes" != "x" ; then
+ VORBIS_CFLAGS="-I$vorbis_includes"
+ elif test "x$vorbis_prefix" != "x" ; then
VORBIS_CFLAGS="-I$vorbis_prefix/include"
- VORBIS_LIBDIR="-L$vorbis_prefix/lib"
- elif test "$prefix" != ""; then
- vorbis_args="$vorbis_args --prefix=$prefix"
+ elif test "x$prefix" != "xNONE"; then
VORBIS_CFLAGS="-I$prefix/include"
- VORBIS_LIBDIR="-L$prefix/lib"
fi
- VORBIS_LIBS="$VORBIS_LIBDIR -lvorbis -lm"
- VORBISFILE_LIBS="-lvorbisfile"
- VORBISENC_LIBS="-lvorbisenc"
AC_MSG_CHECKING(for Vorbis)
no_vorbis=""
@@ -40,8 +43,8 @@ AC_ARG_ENABLE(vorbistest,
if test "x$enable_vorbistest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $VORBIS_CFLAGS"
- LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
+ CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
+ LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
dnl
dnl Now check if the installed Vorbis is sufficiently new.
dnl
@@ -54,8 +57,19 @@ dnl
int main ()
{
- system("touch conf.vorbistest");
- return 0;
+ vorbis_block vb;
+ vorbis_dsp_state vd;
+ vorbis_info vi;
+
+ vorbis_info_init (&vi);
+ vorbis_encode_init (&vi, 2, 44100, -1, 128, -1);
+ vorbis_analysis_init (&vd, &vi);
+ vorbis_block_init (&vd, &vb);
+ /* this function was added in 1.0rc3, so this is what we're testing for */
+ vorbis_bitrate_addblock (&vb);
+
+ system("touch conf.vorbistest");
+ return 0;
}
],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])