diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2014-05-06 09:28:14 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-07-21 12:09:48 +0200 |
commit | 3ac444d2b7266512b53070cdda17e158697c89cf (patch) | |
tree | 49f043286e82b36fb9ccbd2a965a188997726d03 /configure.ac | |
parent | c42595cc69271cce58b2187b3a77fcdd6fcb7b5d (diff) | |
download | gstreamer-plugins-bad-3ac444d2b7266512b53070cdda17e158697c89cf.tar.gz |
openjpeg: Win32-compatible OpenJPEG-2.0 detection
OpenJPEG 2.0 API uses stdcall on W32 by default. This prevents normal
autoconf library macros from finding its functions.
A more compatible check is to acutally link a program that includes a
real header.
https://bugzilla.gnome.org/show_bug.cgi?id=733487
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 839ab7753..0eccfb39d 100644 --- a/configure.ac +++ b/configure.ac @@ -2553,7 +2553,18 @@ translit(dnm, m, l) AM_CONDITIONAL(USE_OPENJPEG, true) AG_GST_CHECK_FEATURE(OPENJPEG, [openjpeg library], openjpeg, [ HAVE_OPENJPEG="no" - AG_GST_CHECK_LIBHEADER(OPENJPEG, openjp2, opj_version, ,openjpeg-2.0/openjpeg.h, OPENJPEG_LIBS="-lopenjp2") + 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 PKG_CHECK_MODULES(OPENJPEG, libopenjpeg1, HAVE_OPENJPEG="yes", |