mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
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
This commit is contained in:
parent
c42595cc69
commit
3ac444d2b7
1 changed files with 12 additions and 1 deletions
13
configure.ac
13
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",
|
||||
|
|
Loading…
Reference in a new issue