mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
build system: try detecting pugixml via pkg-config with fallback
Implements #1891.
This commit is contained in:
parent
6f7b760d34
commit
c1213feac3
4
NEWS.md
4
NEWS.md
@ -67,6 +67,10 @@
|
|||||||
In order to facilitate finding the new requirements new options have been
|
In order to facilitate finding the new requirements new options have been
|
||||||
added to confiure: "--with-xsltproc=prog", "--with-docbook-xsl=dir",
|
added to confiure: "--with-xsltproc=prog", "--with-docbook-xsl=dir",
|
||||||
"--with-po4a=prog" and "--with-po4a-translate=prog.
|
"--with-po4a=prog" and "--with-po4a-translate=prog.
|
||||||
|
* pugixml detection will be attempted via "pkg-config" first. If that fails,
|
||||||
|
"configure" will fall back to the previous method of trying just to compile
|
||||||
|
and link a test program with the standard include and library locations.
|
||||||
|
Implements #1891.
|
||||||
|
|
||||||
|
|
||||||
# Version 9.8.0 "Kuglblids" 2017-01-22
|
# Version 9.8.0 "Kuglblids" 2017-01-22
|
||||||
|
2
Rakefile
2
Rakefile
@ -126,7 +126,7 @@ def setup_globals
|
|||||||
cflags_common += " -fsanitize=undefined" if c?(:UBSAN)
|
cflags_common += " -fsanitize=undefined" if c?(:UBSAN)
|
||||||
cflags_common += " -fsanitize=address -fno-omit-frame-pointer" if c?(:ADDRSAN)
|
cflags_common += " -fsanitize=address -fno-omit-frame-pointer" if c?(:ADDRSAN)
|
||||||
cflags_common += " -Ilib/libebml -Ilib/libmatroska" if c?(:EBML_MATROSKA_INTERNAL)
|
cflags_common += " -Ilib/libebml -Ilib/libmatroska" if c?(:EBML_MATROSKA_INTERNAL)
|
||||||
cflags_common += " #{c(:MATROSKA_CFLAGS)} #{c(:EBML_CFLAGS)} #{c(:EXTRA_CFLAGS)} #{c(:DEBUG_CFLAGS)} #{c(:PROFILING_CFLAGS)} #{c(:USER_CPPFLAGS)}"
|
cflags_common += " #{c(:MATROSKA_CFLAGS)} #{c(:EBML_CFLAGS)} #{c(:PUGIXML_CFLAGS)} #{c(:EXTRA_CFLAGS)} #{c(:DEBUG_CFLAGS)} #{c(:PROFILING_CFLAGS)} #{c(:USER_CPPFLAGS)}"
|
||||||
cflags_common += " -mno-ms-bitfields -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 " if c?(:MINGW)
|
cflags_common += " -mno-ms-bitfields -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 " if c?(:MINGW)
|
||||||
cflags_common += " -march=i686" if c?(:MINGW) && /i686/.match(c(:host))
|
cflags_common += " -march=i686" if c?(:MINGW) && /i686/.match(c(:host))
|
||||||
cflags_common += " -fPIC " if c?(:USE_QT) && !c?(:MINGW)
|
cflags_common += " -fPIC " if c?(:USE_QT) && !c?(:MINGW)
|
||||||
|
@ -2,17 +2,29 @@ dnl
|
|||||||
dnl Check for pugixml
|
dnl Check for pugixml
|
||||||
dnl
|
dnl
|
||||||
|
|
||||||
AC_LANG_PUSH(C++)
|
PKG_CHECK_EXISTS([pugixml],[pugixml_found=yes],[pugixml_found=no])
|
||||||
|
|
||||||
AC_CHECK_HEADERS([pugixml.hpp])
|
if test x"$pugixml_found" = xyes; then
|
||||||
|
PKG_CHECK_MODULES([PUGIXML],[pugixml],[pugixml_found=yes],[pugixml_found=no])
|
||||||
if test x"$ac_cv_header_pugixml_hpp" = xyes; then
|
|
||||||
AC_CHECK_LIB([pugixml], [main])
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_LANG_POP
|
if test x"$pugixml_found" = xno; then
|
||||||
|
AC_LANG_PUSH(C++)
|
||||||
|
|
||||||
if test x"$ac_cv_header_pugixml_hpp" = xyes -a x"$ac_cv_lib_pugixml_main" = xyes ; then
|
AC_CHECK_HEADERS([pugixml.hpp])
|
||||||
|
|
||||||
|
if test x"$ac_cv_header_pugixml_hpp" = xyes; then
|
||||||
|
AC_CHECK_LIB([pugixml], [main])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_LANG_POP
|
||||||
|
|
||||||
|
if test x"$ac_cv_header_pugixml_hpp" = xyes -a x"$ac_cv_lib_pugixml_main" = xyes ; then
|
||||||
|
pugixml_found=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $pugixml_found = yes; then
|
||||||
AC_MSG_NOTICE([Using the system version of the pugixml library])
|
AC_MSG_NOTICE([Using the system version of the pugixml library])
|
||||||
PUGIXML_INTERNAL=no
|
PUGIXML_INTERNAL=no
|
||||||
else
|
else
|
||||||
|
@ -107,7 +107,9 @@ PO4A_TRANSLATE_FLAGS = @PO4A_TRANSLATE_FLAGS@
|
|||||||
PO4A_WORKS = @PO4A_WORKS@
|
PO4A_WORKS = @PO4A_WORKS@
|
||||||
PROFILING_CFLAGS = @PROFILING_CFLAGS@
|
PROFILING_CFLAGS = @PROFILING_CFLAGS@
|
||||||
PROFILING_LIBS = @PROFILING_LIBS@
|
PROFILING_LIBS = @PROFILING_LIBS@
|
||||||
|
PUGIXML_CFLAGS = @PUGIXML_CFLAGS@
|
||||||
PUGIXML_INTERNAL = @PUGIXML_INTERNAL@
|
PUGIXML_INTERNAL = @PUGIXML_INTERNAL@
|
||||||
|
PUGIXML_LIBS = @PUGIXML_LIBS@
|
||||||
QT_CFLAGS = @QT_CFLAGS@
|
QT_CFLAGS = @QT_CFLAGS@
|
||||||
QT_LIBS = @QT_LIBS@
|
QT_LIBS = @QT_LIBS@
|
||||||
QUNUSED_ARGUMENTS = @QUNUSED_ARGUMENTS@
|
QUNUSED_ARGUMENTS = @QUNUSED_ARGUMENTS@
|
||||||
|
@ -131,6 +131,7 @@ class Target
|
|||||||
when :boost_regex then c(:BOOST_REGEX_LIB)
|
when :boost_regex then c(:BOOST_REGEX_LIB)
|
||||||
when :boost_filesystem then c(:BOOST_FILESYSTEM_LIB)
|
when :boost_filesystem then c(:BOOST_FILESYSTEM_LIB)
|
||||||
when :boost_system then c(:BOOST_SYSTEM_LIB)
|
when :boost_system then c(:BOOST_SYSTEM_LIB)
|
||||||
|
when :pugixml then c(:PUGIXML_LIBS)
|
||||||
when :qt then c(:QT_LIBS)
|
when :qt then c(:QT_LIBS)
|
||||||
when :static then c(:LINK_STATICALLY)
|
when :static then c(:LINK_STATICALLY)
|
||||||
when :mpegparser then [ '-Lsrc/mpegparser', '-lmpegparser' ]
|
when :mpegparser then [ '-Lsrc/mpegparser', '-lmpegparser' ]
|
||||||
|
Loading…
Reference in New Issue
Block a user