If ffmpeg-spice exists use ffmpeg-spice. If ffmpeg-spice does not exist and ffmpeg exists, use ffmpeg If none exist, fail.
Signed-off-by: Uri Lublin <u...@redhat.com> --- configure.ac.shared | 22 ++++++++++++++++------ 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/configure.ac.shared b/configure.ac.shared index 88bc8be..0cb9859 100644 --- a/configure.ac.shared +++ b/configure.ac.shared @@ -99,12 +99,22 @@ AC_SUBST(CELT051_LIBS) AC_SUBST(CELT051_LIBDIR) SPICE_REQUIRES+=" celt051 >= 0.5.1.1" -PKG_CHECK_MODULES(FFMPEG, libavcodec libavutil) -AC_SUBST(FFMPEG_CFLAGS) -AC_SUBST(FFMPEG_LIBS) -FFMPEG_LIBDIR=`pkg-config --variable=libdir libavutil` -AC_SUBST(FFMPEG_LIBDIR) -SPICE_REQUIRES+=" libavcodec libavutil" +AC_MSG_CHECKING(for ffmpeg-spice) +PKG_CHECK_EXISTS(libavcodec-spice libavutil-spice, [use_ffmpeg_spice=yes], [use_ffmpeg_spice=no]) +AC_MSG_RESULT($use_ffmpeg_spice) +AC_MSG_CHECKING(for ffmpeg) +PKG_CHECK_EXISTS(libavcodec libavutil, [use_ffmpeg=yes], [use_ffmpeg=no]) +AC_MSG_RESULT($use_ffmpeg) +if test "$use_ffmpeg_spice" = "yes"; then + PKG_CHECK_MODULES(FFMPEG, libavcodec-spice libavutil-spice) + FFMPEG_LIBDIR=`pkg-config --variable=libdir libavutil-spice` +elif test "$use_ffmpeg" = "yes"; then + PKG_CHECK_MODULES(FFMPEG, libavcodec libavutil) + FFMPEG_LIBDIR=`pkg-config --variable=libdir libavutil` +else + echo "please install ffmpeg-spice or ffmpeg devel package" + exit 1 +fi saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS" -- 1.6.5.2 ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Spice-space-devel mailing list Spice-space-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spice-space-devel