diff --git a/NEWS.md b/NEWS.md index 0badc0b78..835bdfa72 100644 --- a/NEWS.md +++ b/NEWS.md @@ -22,6 +22,11 @@ being copied when very large values were present in source files, or in error messages when very large values were used as command-line parameters. +## Build system changes + +* Release v8.0.0 of the `fmt` library is now required. If not found, the + bundled copy will be used. + # Version 83.0 "Circle Of Friends" 2024-03-10 diff --git a/README.md b/README.md index 4b288742d..545643710 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ distribution instead of relying on the bundled versions. These libraries are: - [fmt](http://fmtlib.net/) — a small, safe and fast formatting - library. Version 6.1.0 or later is required. + library. Version 8.0.0 or later is required. - [libEBML v1.4.4](http://dl.matroska.org/downloads/libebml/) or later and [libMatroska v1.7.1](http://dl.matroska.org/downloads/libmatroska/) diff --git a/ac/fmt.m4 b/ac/fmt.m4 index 1d857593d..b04a5edb7 100644 --- a/ac/fmt.m4 +++ b/ac/fmt.m4 @@ -15,28 +15,15 @@ AC_CACHE_CHECK([fmt],[ac_cv_fmt],[ #include #include - #if !defined(FMT_VERSION) || (FMT_VERSION < 60100) - #error fmtlib is too old, need 6.1.0 or later + #if !defined(FMT_VERSION) || (FMT_VERSION < 80000) + #error fmtlib is too old, need 8.0.0 or later #endif ]], [[ - fmt::format("{0:02}", fmt::to_string(4254)); + fmt::format("{0}", fmt::to_string(4254)); + std::string moo{"'{0}' says the cow"}; + fmt::format(fmt::runtime(moo), "moo"); ]])],[ac_cv_fmt=yes],[ac_cv_fmt=no]) - AC_CACHE_VAL(ac_cv_fmt_v8, [ - if test $ac_cv_fmt=yes; then - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - - #if !defined(FMT_VERSION) || (FMT_VERSION < 80000) - #error fmt is older than v8 - #endif - ]], [[ - fmt::format("{0:02}", fmt::to_string(4254)); - ]])],[ac_cv_fmt_v8=yes],[ac_cv_fmt_v8=no]) - fi - ]) - CXXFLAGS="$ac_save_CXXFLAGS" LIBS="$ac_save_LIBS" @@ -48,10 +35,6 @@ if test x"$ac_cv_fmt" = xyes; then else AC_MSG_NOTICE([Using the internal version of fmt]) FMT_INTERNAL=yes - ac_cv_fmt_v8=yes fi -if test $ac_cv_fmt_v8 = yes; then - AC_DEFINE([HAVE_FMT_V8],[1],[Define if the fmt library is v8 or newer]) -fi AC_SUBST(FMT_INTERNAL) diff --git a/src/common/common.h b/src/common/common.h index a81b0022f..68a129fab 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -33,12 +33,6 @@ #include -#if !defined(HAVE_FMT_V8) || !HAVE_FMT_V8 -// Don't support user-defined literals in fmt as they aren't used by -// MKVToolNix and produce a compiler warning in -Wpedantic with fmt < v8 -# define FMT_USE_USER_DEFINED_LITERALS 0 -#endif - #include #include