diff options
author | Mark Nauwelaerts | 2008-03-04 23:38:06 -0600 |
---|---|---|
committer | Sebastian Dröge | 2008-03-04 23:38:06 -0600 |
commit | 646ac4cdf2054e5cd38c1869701a4e839f8436b2 (patch) | |
tree | 1b3a85ca8e1109983e8fc3c8c9138eb92c48615c /configure.ac | |
parent | 15ac9f5a1398cc7a65f5d44fd53452c2cdf27bc6 (diff) | |
download | gst-plugins-bad0-10-646ac4cdf2054e5cd38c1869701a4e839f8436b2.tar.gz gst-plugins-bad0-10-646ac4cdf2054e5cd38c1869701a4e839f8436b2.tar.xz gst-plugins-bad0-10-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.ac | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac index 8dde6323b..6967dd058 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -608,18 +608,34 @@ AC_SUBST(LIBMMS_LIBS) | |||
608 | dnl *** mjpegtools version info *** | 608 | dnl *** mjpegtools version info *** |
609 | dnl some may prefer older version (given quirks above) | 609 | dnl some may prefer older version (given quirks above) |
610 | dnl hm, no version info seems available within mjpegtools headers | 610 | dnl hm, no version info seems available within mjpegtools headers |
611 | 611 | dnl and API really moves along | |
612 | PKG_CHECK_EXISTS(mjpegtools >= 1.9.0 mjpegtools < 1.10.0, [ | 612 | echo |
613 | AC_DEFINE(GST_MJPEGTOOLS_19x, 1, [mjpegtools >= 1.9.0 is used]) | 613 | PKG_CHECK_EXISTS(mjpegtools >= 1.6.1.93 mjpegtools < 1.8.0, [ |
614 | have_mpjegtools_19x=yes | 614 | mjpegtools_api=10601 |
615 | ], [ | 615 | ], [ |
616 | have_mpjegtools_19x=no]) | 616 | PKG_CHECK_EXISTS(mjpegtools >= 1.8.0 mjpegtools < 1.9.0, [ |
617 | 617 | mjpegtools_api=10800 | |
618 | PKG_CHECK_EXISTS(mjpegtools >= 1.8.0, [ | ||
619 | AC_DEFINE(GST_MJPEGTOOLS_18x, 1, [mjpegtools >= 1.8.0 is used]) | ||
620 | have_mpjegtools_18x=yes | ||
621 | ], [ | 618 | ], [ |
622 | have_mpjegtools_18x=no]) | 619 | PKG_CHECK_MODULES(MJPEG, mjpegtools >= 1.9.0, [ |
620 | dnl logging API changed in release candidates | ||
621 | OLD_CFLAGS="$CFLAGS" | ||
622 | OLD_LIBS="$LIBS" | ||
623 | CFLAGS="$MJPEG_CFLAGS" | ||
624 | LIBS="$LIBS $MJPEG_LIBS -lmjpegutils -lm -lpthread" | ||
625 | AC_CHECK_FUNC(mjpeg_loglev_t, [ | ||
626 | mjpegtools_api=10903 | ||
627 | ], [ | ||
628 | mjpegtools_api=10900 | ||
629 | ]) | ||
630 | CFLAGS="$OLD_CFLAGS" | ||
631 | LIBS="$OLD_LIBS" | ||
632 | ], [ | ||
633 | mjpegtools_api=0 | ||
634 | ]) | ||
635 | ]) | ||
636 | ]) | ||
637 | AC_DEFINE_UNQUOTED(GST_MJPEGTOOLS_API, $mjpegtools_api, | ||
638 | [mjpegtools API evolution]) | ||
623 | 639 | ||
624 | dnl *** mpeg2enc *** | 640 | dnl *** mpeg2enc *** |
625 | translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true) | 641 | translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2ENC, true) |
@@ -665,21 +681,15 @@ AG_GST_CHECK_FEATURE(MPEG2ENC, [mpeg2enc], mpeg2enc, [ | |||
665 | dnl mpeg2syntaxcodes.h header by default, and a new release | 681 | dnl mpeg2syntaxcodes.h header by default, and a new release |
666 | dnl is not in sight, so check for this oversight in case | 682 | dnl is not in sight, so check for this oversight in case |
667 | dnl distros or folks have fixed this themselves | 683 | dnl distros or folks have fixed this themselves |
668 | if test "x$have_mpjegtools_18x" = "xyes"; then | 684 | if test "$mjpegtools_api" -ge "10800"; then |
669 | AC_CHECK_HEADER([mpeg2syntaxcodes.h], [ | 685 | AC_CHECK_HEADER([mpeg2syntaxcodes.h], [ |
670 | mpeg2enc_headers_ok=yes | 686 | mpeg2enc_headers_ok=yes |
671 | ], [ | 687 | ], [ |
672 | mpeg2enc_headers_ok=no | 688 | mpeg2enc_headers_ok=no |
673 | ]) | 689 | ]) |
674 | else | 690 | else |
675 | mpeg2enc_headers_ok=yes | 691 | mpeg2enc_headers_ok=yes |
676 | fi | 692 | fi |
677 | |||
678 | if test "x$have_mpjegtools_19x" = "xyes"; then | ||
679 | AG_GST_CHECK_LIBHEADER(MJPEGTOOLS_19rc3, mpeg2encpp, mjpeg_loglev_t, $MPEG2ENC_LIBS, mjpeg_logging.h, | ||
680 | AC_DEFINE(GST_MJPEGTOOLS_19rc3, 1, [mjpegtools >= 1.9.3rc3 is used])) | ||
681 | fi | ||
682 | |||
683 | if test "x$mpeg2enc_headers_ok" = "xyes"; then | 693 | if test "x$mpeg2enc_headers_ok" = "xyes"; then |
684 | HAVE_MPEG2ENC="yes" | 694 | HAVE_MPEG2ENC="yes" |
685 | fi | 695 | fi |