From 598fe5e69ed0eba9eabf0745940caab2852ec53b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 25 May 2019 17:48:24 +0200 Subject: [PATCH] configure: fix detection of libebml::FindNextChild The internal libEBML was updated to v1.3.9. That version contains changes to cmake to build an additional header file, ebml_export.h. In MKVToolNix, which isn't cmake-based, that file has to be created manually, and the Rakefile does so. However, when configure runs the file doesn't exist yet. This means that any attempt to compile a test program with the internal libebml will fail due to the header not being found. configure's compilation checks will therefore fail. For the detection of libebml::FindNextChild doing a compilation check against the internal libebml isn't really needed as we know that the version does include it. So just hardcode that knowledge and avoid the compilation check. --- ac/matroska.m4 | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/ac/matroska.m4 b/ac/matroska.m4 index b5e1634f3..fef8dbf3c 100644 --- a/ac/matroska.m4 +++ b/ac/matroska.m4 @@ -32,34 +32,33 @@ fi AC_DEFUN([AX_EBML_FINDNEXTCHILD],[ AC_CACHE_CHECK([if libEBML contains FindNextChild], [ax_cv_ebml_findnextchild],[ - CXXFLAGS_SAVED=$CXXFLAGS - if test x"$EBML_MATROSKA_INTERNAL" = xyes; then - CXXFLAGS="-Ilib/libebml -Ilib/libmatroska" + ax_cv_ebml_findnextchild=yes else + CXXFLAGS_SAVED=$CXXFLAGS CXXFLAGS="$EBML_CFLAGS $MATROSKA_CFLAGS" - fi - export CXXFLAGS + export CXXFLAGS - AC_LANG_PUSH(C++) - AC_TRY_COMPILE( - [ + AC_LANG_PUSH(C++) + AC_TRY_COMPILE( + [ #include #include using namespace libebml; using namespace libmatroska; - ], - [ + ], + [ EbmlMaster *m = new KaxSegment; EbmlElement *e = new KaxTitle; FindNextChild(*m, *e); - ], - [ax_cv_ebml_findnextchild="yes"], - [ax_cv_ebml_findnextchild="no"]) - AC_LANG_POP + ], + [ax_cv_ebml_findnextchild="yes"], + [ax_cv_ebml_findnextchild="no"]) + AC_LANG_POP - CXXFLAGS="$CXXFLAGS_SAVED" + CXXFLAGS="$CXXFLAGS_SAVED" + fi ]) if test x"$ax_cv_ebml_findnextchild" = xyes; then