summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-12 00:06:05 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-12 00:06:05 +0000
commita065c7dc482ea280d7f30f23626171a8303ec488 (patch)
tree13d772054bacf6230dab7e398517ecd906e69245 /configure.ac
parentea9a0462ef4b08279957e281e2e6bc33ff4ca7ee (diff)
downloadxine-lib-a065c7dc482ea280d7f30f23626171a8303ec488.tar.gz
xine-lib-a065c7dc482ea280d7f30f23626171a8303ec488.tar.bz2
Rewrite external ffmpeg support by using pkg-config rather than ad-hoc tests. To change the prefix, simply change the variables from outside or add the directory containing the .pc files to PKG_CONFIG_PATH environment variable.
CVS patchset: 8222 CVS date: 2006/09/12 00:06:05
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 30 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 68fc6824d..83b8239da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -346,10 +346,36 @@ dnl mpeg2lib and ffmpeg stuff
dnl ---------------------------------------------
AC_SUBST(LIBMPEG2_CFLAGS)
-AC_SUBST(LIBFFMPEG_CPPFLAGS)
+
+AC_ARG_WITH([external-ffmpeg], AC_HELP_STRING([--with-external-ffmpeg], [use external ffmpeg library]))
+
+if test "x$with_external_ffmpeg" = "xyes"; then
+ PKG_CHECK_MODULES([FFMPEG], [libavcodec >= 51.11.0])
+ PKG_CHECK_MODULES([FFMPEG_POSTPROC], [libpostproc >= 51.11.0])
+ AC_SUBST([FFMPEG_CFLAGS])
+ AC_SUBST([FFMPEG_LIBS])
+ AC_SUBST([FFMPEG_POSTPROC_CFLAGS])
+ AC_SUBST([FFMPEG_POSTPROC_LIBS])
+ AC_DEFINE([HAVE_FFMPEG], [1], [Define this if you have ffmpeg library])
+
+ AC_MSG_NOTICE([
+*********************************************************************
+xine is configured with external ffmpeg.
+
+This requires the same version of ffmpeg what is included in xine and
+you should know what you do. If some problems occur, please try to
+use internal ffmpeg.
+*********************************************************************])
+else
+ AC_MSG_RESULT([using included ffmpeg])
+ LIBFFMPEG_CPPFLAGS="-DSIMPLE_IDCT -DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DCONFIG_RISKY -DCONFIG_DECODERS -DXINE_MPEG_ENCODER -DCONFIG_ZLIB -DCONFIG_GPL"
+ AC_SUBST([LIBFFMPEG_CPPFLAGS])
+
+ AC_CHECK_TYPES(int_fast8_t, [], [LIBFFMPEG_CPPFLAGS="$LIBFFMPEG_CPPFLAGS -DEMULATE_FAST_INT"])
+fi
+AM_CONDITIONAL(HAVE_FFMPEG, test "x$with_external_ffmpeg" = "xyes")
LIBMPEG2_CFLAGS=""
-LIBFFMPEG_CPPFLAGS="-DSIMPLE_IDCT -DHAVE_AV_CONFIG_H -DRUNTIME_CPUDETECT -DCONFIG_RISKY -DCONFIG_DECODERS -DXINE_MPEG_ENCODER -DCONFIG_ZLIB -DCONFIG_GPL"
AC_CHECK_DECL(lrintf,[
AC_DEFINE(HAVE_LRINTF,1,[Define this if the 'lrintf' function is declared in math.h])
@@ -364,8 +390,6 @@ AC_CHECK_DECL(rintf,[
#include <math.h>
])
-AC_CHECK_TYPES(int_fast8_t, [], [LIBFFMPEG_CFLAGS="$LIBFFMPEG_CFLAGS -DEMULATE_FAST_INT"])
-
AC_ARG_ENABLE([altivec],
AS_HELP_STRING([--disable-altivec], [do not use assembly codes for Motorola 74xx CPUs]))
@@ -413,10 +437,6 @@ AM_CONDITIONAL(HAVE_MLIB, test x$ac_have_mlib = "xyes")
AC_SUBST(MLIB_LIBS)
AC_SUBST(MLIB_CFLAGS)
-AM_PATH_FFMPEG(AC_DEFINE(HAVE_FFMPEG, 1, [Define this if you have ffmpeg library]))
-AM_CONDITIONAL(HAVE_FFMPEG, test x"$external_ffmpeg_found" = "xyes")
-
-
dnl ---------------------------------------------
dnl Checks for X11
dnl ---------------------------------------------
@@ -2507,7 +2527,7 @@ dnl video decoders
echo " * video decoder plugins:"
echo " - MPEG 1,2 - Amiga Bitplane"
echo " - Raw RGB - Raw YUV"
-if test x"$external_ffmpeg_found" = "xyes"; then
+if test "x$with_external_ffmpeg" = "xyes"; then
echo " - ffmpeg (external library):"
else
echo " - ffmpeg (internal library):"
@@ -2550,7 +2570,7 @@ dnl audio decoders
echo " * audio decoder plugins:"
echo " - GSM 06.10"
echo " - linear PCM - Nosefart (NSF)"
-if test x"$external_ffmpeg_found" = "xyes"; then
+if test "x$with_external_ffmpeg" = "xyes"; then
echo " - ffmpeg (external library):"
else
echo " - ffmpeg (internal library):"