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.
This commit is contained in:
Moritz Bunkus 2019-05-25 17:48:24 +02:00
parent 0c3bd93bd5
commit 598fe5e69e
No known key found for this signature in database
GPG Key ID: 74AF00ADF2E32C85

View File

@ -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 <matroska/KaxInfo.h>
#include <matroska/KaxSegment.h>
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