From 871ec4693c813ee0bab96d8d76df11487351b82a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 22 Oct 2014 13:03:30 +0100 Subject: [PATCH] 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. --- configure.ac | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index e915ea8..f78971f 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 +#include ]], [[ + 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) ]) -- 2.7.4