mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
configure: improve openh264 check
The openh264 API is still unstable, so check for structure member that we need to prevent building against an older incompatible version.
This commit is contained in:
parent
6c8446ffa6
commit
871ec4693c
1 changed files with 17 additions and 1 deletions
18
configure.ac
18
configure.ac
|
@ -2575,8 +2575,24 @@ AG_GST_CHECK_FEATURE(OPENEXR, [openexr library], openexr, [
|
|||
dnl *** openh264 ***
|
||||
translit(dnm, m, l) AM_CONDITIONAL(USE_OPENH264, true)
|
||||
AG_GST_CHECK_FEATURE(OPENH264, [openh264 library], openh264, [
|
||||
AC_LANG_PUSH([C++])
|
||||
AG_GST_CHECK_LIBHEADER(OPENH264, openh264, WelsSnprintf, $PTHREAD_LIBS,
|
||||
wels/codec_api.h, OPENH264_LIBS="-lopenh264 $PTHREAD_LIBS")
|
||||
wels/codec_api.h, [
|
||||
AC_MSG_CHECKING([for right openh264 version/snapshot])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <wels/codec_app_def.h>
|
||||
#include <wels/codec_api.h>]], [[
|
||||
SFrameBSInfo frame_info;
|
||||
int *p = (int *) &frame_info.eFrameType;
|
||||
*p = 0;
|
||||
]])], [
|
||||
AC_MSG_RESULT(yes)
|
||||
OPENH264_LIBS="-lopenh264 $PTHREAD_LIBS"
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
HAVE_OPENH264="no"
|
||||
])
|
||||
])
|
||||
AC_LANG_POP([C++])
|
||||
AC_SUBST(OPENH264_LIBS)
|
||||
])
|
||||
|
||||
|
|
Loading…
Reference in a new issue