diff options
author | Uri Lublin <uril@redhat.com> | 2010-01-03 09:04:06 +0200 |
---|---|---|
committer | Yaniv Kamay <ykamay@redhat.com> | 2010-01-10 19:45:26 +0200 |
commit | 49e532c327b1ee0d2f83e98812708d58a8496c94 (patch) | |
tree | db64923ed644cd6c5faa0f83ff7c2b14ded21f8c /configure.ac.shared | |
parent | bfba2971bc3363ad6bd1dfeea5ce002b93431db7 (diff) | |
download | spice-49e532c327b1ee0d2f83e98812708d58a8496c94.tar.gz spice-49e532c327b1ee0d2f83e98812708d58a8496c94.tar.xz spice-49e532c327b1ee0d2f83e98812708d58a8496c94.zip |
configure.ac.shared: prefer ffmpeg-spice (if exists) over ffmpeg (subdir config)
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 <uril@redhat.com>
Diffstat (limited to 'configure.ac.shared')
-rw-r--r-- | configure.ac.shared | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/configure.ac.shared b/configure.ac.shared index 88bc8bef..0cb98593 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" |