mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
make system utf8cpp check more robust
Check if utf8to32() and utf32to8() methods are available.
This commit is contained in:
parent
fcd92036b4
commit
b4ca4862b4
@ -6,9 +6,22 @@ AC_LANG_PUSH(C++)
|
||||
|
||||
AC_CHECK_HEADERS([utf8.h])
|
||||
|
||||
if test x"$ac_cv_header_utf8_h" = xyes; then
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <utf8.h>
|
||||
#include <vector>
|
||||
]],[
|
||||
std::string s("ÁÂÃÄÅÆ");
|
||||
std::vector<int> utf32result;
|
||||
std::vector<unsigned char> utf8result;
|
||||
utf8::utf8to32(s.begin(),s.end(),std::back_inserter(utf32result));
|
||||
utf8::utf32to8(utf32result.begin(),utf32result.end(),std::back_inserter(utf8result));
|
||||
])],[ac_cv_utf8cpp=yes],[ac_cv_utf8cpp=no])
|
||||
fi
|
||||
|
||||
AC_LANG_POP
|
||||
|
||||
if test x"$ac_cv_header_utf8_h" = xyes; then
|
||||
if test x"$ac_cv_utf8cpp" = xyes; then
|
||||
AC_MSG_NOTICE([Using the system version of UTF8-CPP])
|
||||
UTF8CPP_INTERNAL=no
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user