summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2014-10-22 13:03:30 +0100
committerTim-Philipp Müller <tim@centricular.com>2014-10-22 13:03:30 +0100
commit871ec4693c813ee0bab96d8d76df11487351b82a (patch)
treea7cbfc775009e01a521e0632474ff9a4d10d31fa /configure.ac
parent6c8446ffa6eb11d83d6df8908adf10ad65961493 (diff)
downloadgstreamer-plugins-bad-871ec4693c813ee0bab96d8d76df11487351b82a.tar.gz
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index e915ea881..f78971f38 100644
--- a/configure.ac
+++ b/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)
])