summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMark Nauwelaerts <manauw@skynet.be>2008-03-05 05:38:06 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-03-05 05:38:06 +0000
commit646ac4cdf2054e5cd38c1869701a4e839f8436b2 (patch)
tree1b3a85ca8e1109983e8fc3c8c9138eb92c48615c /configure.ac
parent15ac9f5a1398cc7a65f5d44fd53452c2cdf27bc6 (diff)
downloadgst-plugins-bad-646ac4cdf2054e5cd38c1869701a4e839f8436b2.tar.gz
gst-plugins-bad-646ac4cdf2054e5cd38c1869701a4e839f8436b2.tar.bz2
gst-plugins-bad-646ac4cdf2054e5cd38c1869701a4e839f8436b2.zip
configure.ac: Clean up detection of different mjpegtoolsAPI versions.
Original commit message from CVS: Patch by: Mark Nauwelaerts <manauw at skynet dot be> * configure.ac: Clean up detection of different mjpegtoolsAPI versions. * ext/mpeg2enc/gstmpeg2enc.cc: * ext/mpeg2enc/gstmpeg2enc.hh: * ext/mpeg2enc/gstmpeg2encoder.cc: * ext/mpeg2enc/gstmpeg2encoptions.cc: * ext/mpeg2enc/gstmpeg2encpicturereader.cc: * ext/mpeg2enc/gstmpeg2encpicturereader.hh: * ext/mpeg2enc/gstmpeg2encstreamwriter.cc: * ext/mpeg2enc/gstmpeg2encstreamwriter.hh: Streamline conditional code for evolving mjpegtools API, optimize and fix/prevent crash in log handling, use names/nicks for enums in the usual way andm inor updates in code and properties/settings. Partially fixes bug #520329.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac50
1 files changed, 30 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index 8dde6323..6967dd05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -608,18 +608,34 @@ AC_SUBST(LIBMMS_LIBS)
dnl *** mjpegtools version info ***
dnl some may prefer older version (given quirks above)
dnl hm, no version info seems available within mjpegtools headers
-
-PKG_CHECK_EXISTS(mjpegtools >= 1.9.0 mjpegtools < 1.10.0, [
- AC_DEFINE(GST_MJPEGTOOLS_19x, 1, [mjpegtools >= 1.9.0 is used])
- have_mpjegtools_19x=yes
- ], [
- have_mpjegtools_19x=no])
-
-PKG_CHECK_EXISTS(mjpegtools >= 1.8.0, [
- AC_DEFINE(GST_MJPEGTOOLS_18x, 1, [mjpegtools >= 1.8.0 is used])
- have_mpjegtools_18x=yes
+dnl and API really moves along
+echo
+PKG_CHECK_EXISTS(mjpegtools >= 1.6.1.93 mjpegtools < 1.8.0, [
+ mjpegtools_api=10601
+], [
+ PKG_CHECK_EXISTS(mjpegtools >= 1.8.0 mjpegtools < 1.9.0, [
+ mjpegtools_api=10800
], [
- have_mpjegtools_18x=no])
+ 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 -lm -lpthread"
+ AC_CHECK_FUNC(mjpeg_loglev_t, [
+ mjpegtools_api=10903
+ ], [
+ mjpegtools_api=10900
+ ])
+ CFLAGS="$OLD_CFLAGS"
+ LIBS="$OLD_LIBS"
+ ], [
+ mjpegtools_api=0
+ ])
+ ])
+])
+AC_DEFINE_UNQUOTED(GST_MJPEGTOOLS_API, $mjpegtools_api,
+ [mjpegtools API evolution])
dnl *** mpeg2enc ***
translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true)
@@ -665,21 +681,15 @@ AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [
dnl mpeg2syntaxcodes.h header by default, and a new release
dnl is not in sight, so check for this oversight in case
dnl distros or folks have fixed this themselves
- if test "x$have_mpjegtools_18x" = "xyes"; then
+ if test "$mjpegtools_api" -ge "10800"; then
AC_CHECK_HEADER([mpeg2syntaxcodes.h], [
mpeg2enc_headers_ok=yes
], [
mpeg2enc_headers_ok=no
])
- else
- mpeg2enc_headers_ok=yes
+ else
+ mpeg2enc_headers_ok=yes
fi
-
- if test "x$have_mpjegtools_19x" = "xyes"; then
- AG_GST_CHECK_LIBHEADER(MJPEGTOOLS_19rc3, mpeg2encpp, mjpeg_loglev_t, $MPEG2ENC_LIBS, mjpeg_logging.h,
- AC_DEFINE(GST_MJPEGTOOLS_19rc3, 1, [mjpegtools >= 1.9.3rc3 is used]))
- fi
-
if test "x$mpeg2enc_headers_ok" = "xyes"; then
HAVE_MPEG2ENC="yes"
fi