From e1d7b101fdea41fb23413d1d6d582f6f9812ea75 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 20 Oct 2005 21:01:57 +0000 Subject: [PATCH] theora --- stepmania/autoconf/m4/video.m4 | 25 +++++++++++++++++++++++++ stepmania/src/Makefile.am | 4 ++++ 2 files changed, 29 insertions(+) diff --git a/stepmania/autoconf/m4/video.m4 b/stepmania/autoconf/m4/video.m4 index 9ab11bf6dd..152c15ea16 100644 --- a/stepmania/autoconf/m4/video.m4 +++ b/stepmania/autoconf/m4/video.m4 @@ -34,4 +34,29 @@ if test "$have_libavformat" = "yes" -a "$have_libavcodec" = "yes"; then fi AM_CONDITIONAL(HAVE_FFMPEG, test "$have_ffmpeg" = "yes") + + +AC_ARG_WITH(theora, AC_HELP_STRING([--without-theora], [Disable Theora support]), with_theora=$enableval, with_theora=yes) + +have_vorbis=no +if test "$with_theora" = "yes"; then + AC_CHECK_LIB(ogg, ogg_stream_init, have_libogg=yes, have_libogg=no) + AC_CHECK_LIB(theora, theora_decode_init, have_libtheora=yes, have_libtheora=no, [-logg]) + if test "$have_libtheora" = "yes" -a "$have_libogg" = "yes" -a "$have_ffmpeg" = "yes"; then + have_theora=yes + LIBS="$LIBS -ltheora -logg" + AC_DEFINE(HAVE_THEORA, 1, [Theora support available]) + else + echo Not all theora libraries found. + + # Special note for unintuitive requirement (for color space conversion). + if test "$have_libtheora" = "yes" -a "$have_libogg" = "yes"; then + echo Ogg Theora support requires ffmpeg. + fi + fi + +fi + +AM_CONDITIONAL(HAVE_THEORA, test "$have_theora" = "yes" ) + ]) diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index 6b7b028b35..21e1194dcd 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -169,6 +169,10 @@ MovieTexture = arch/MovieTexture/MovieTexture.cpp arch/MovieTexture/MovieTexture arch/MovieTexture/MovieTexture_Generic.cpp arch/MovieTexture/MovieTexture_Generic.h \ arch/MovieTexture/MovieTexture_Null.cpp arch/MovieTexture/MovieTexture_Null.h +if HAVE_THEORA +MovieTexture += arch/MovieTexture/MovieTexture_Theora.cpp arch/MovieTexture/MovieTexture_Theora.h +endif + if HAVE_FFMPEG MovieTexture += arch/MovieTexture/MovieTexture_FFMpeg.cpp arch/MovieTexture/MovieTexture_FFMpeg.h endif