diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-05-10 16:24:08 +0530 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-05-10 14:03:33 +0300 |
commit | 1536f30cc2a0f68841b7b779c28b9b31726309ee (patch) | |
tree | 65a4f3642347cdb0de1e963a21a75f0b771414e8 /configure.ac | |
parent | ddcc1c64429904e08ea513b1431690e8e473f7d2 (diff) | |
download | gstreamer-plugins-bad-1536f30cc2a0f68841b7b779c28b9b31726309ee.tar.gz |
openjpeg: Port to 2.1 and require a pkg-config file for 2.0 and 2.1
The port was trivial, and according to the NEWS file nothing else has changed,
but it is possible that other API was changed without proper notification.
OpenJPEG upstream has shipped a pkg-config file for the past 4 years, and all
distros should be shipping it by now.
https://bugzilla.gnome.org/show_bug.cgi?id=766213
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac index 23120c515..0d6851b94 100644 --- a/configure.ac +++ b/configure.ac @@ -2739,20 +2739,15 @@ dnl *** OpenJPEG *** translit(dnm, m, l) AM_CONDITIONAL(USE_OPENJPEG, true) AG_GST_CHECK_FEATURE(OPENJPEG, [openjpeg library], openjpeg, [ HAVE_OPENJPEG="no" - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - OPENJPEG_LIBS="-lopenjp2" - LIBS="$LIBS $OPENJPEG_LIBS" - CFLAGS="$CFLAGS $OPENJPEG_CFLAGS" - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([#include <openjpeg-2.0/openjpeg.h>], - [return (int) *opj_version ();]) - ], [HAVE_OPENJPEG=yes], [HAVE_OPENJPEG=no]) - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - if test x"$HAVE_OPENJPEG" = x"no"; then + AG_GST_PKG_CHECK_MODULES(OPENJPEG, libopenjp2 >= 2.0) + if test x"$HAVE_OPENJPEG" = x"yes"; then + dnl minor API changes in v2.1 + AG_GST_PKG_CHECK_MODULES(OPENJPEG_2_1, libopenjp2 >= 2.1) + if test x"$HAVE_OPENJPEG" = x"yes"; then + AC_DEFINE([HAVE_OPENJPEG_2_1], 1, [Define if OpenJPEG 2.1 is used]) + fi + else + # Fallback to v1.5 OPENJPEG_LIBS="" PKG_CHECK_MODULES(OPENJPEG, libopenjpeg1, HAVE_OPENJPEG="yes", |