mpeg2enc: fix build with 1.9.0 release again after recent fixes for mjpegtools 2.0.0

https://bugzilla.gnome.org/show_bug.cgi?id=650970
This commit is contained in:
Tim-Philipp Müller 2011-05-25 14:42:38 +01:00
parent 4a7057048f
commit 202a548030
2 changed files with 19 additions and 15 deletions

View file

@ -1071,21 +1071,25 @@ PKG_CHECK_EXISTS(mjpegtools >= 1.6.1.93 mjpegtools < 1.8.0, [
PKG_CHECK_EXISTS(mjpegtools >= 1.8.0 mjpegtools < 1.9.0, [
mjpegtools_api=10800
], [
PKG_CHECK_MODULES(MJPEG, mjpegtools >= 1.9.0, [
dnl logging API changed in release candidates
OLD_CFLAGS="$CFLAGS"
OLD_LIBS="$LIBS"
CFLAGS="$MJPEG_CFLAGS"
LIBS="$LIBS $MJPEG_LIBS -lmjpegutils $LIBM -lpthread"
AC_CHECK_FUNC(mjpeg_loglev_t, [
mjpegtools_api=10903
], [
mjpegtools_api=10900
])
CFLAGS="$OLD_CFLAGS"
LIBS="$OLD_LIBS"
PKG_CHECK_EXISTS(mjpegtools >= 2.0.0, [
mjpegtools_api=20000
], [
mjpegtools_api=0
PKG_CHECK_MODULES(MJPEG, mjpegtools >= 1.9.0 mjpegtools < 2.0.0, [
dnl logging API changed in release candidates
OLD_CFLAGS="$CFLAGS"
OLD_LIBS="$LIBS"
CFLAGS="$MJPEG_CFLAGS"
LIBS="$LIBS $MJPEG_LIBS -lmjpegutils $LIBM -lpthread"
AC_CHECK_FUNC(mjpeg_loglev_t, [
mjpegtools_api=10903
], [
mjpegtools_api=10900
])
CFLAGS="$OLD_CFLAGS"
LIBS="$OLD_LIBS"
], [
mjpegtools_api=0
])
])
])
])

View file

@ -26,7 +26,7 @@
#include <mpegconsts.h>
#include <quantize.hh>
#if GST_MJPEGTOOLS_API >= 10903
#if GST_MJPEGTOOLS_API >= 20000
#include <ontheflyratectlpass1.hh>
#include <ontheflyratectlpass2.hh>
#elif GST_MJPEGTOOLS_API >= 10900