diff --git a/configure b/configure index 6d2879d832f1072574a32733dee83a792b0c82e0..68bc6b70e129a558a1d0a507dfabf2c6b3d11402 100755 --- a/configure +++ b/configure @@ -1125,6 +1125,7 @@ HAVE_LIST=" attribute_may_alias attribute_packed bswap + cbrtf closesocket cmov dcbzl @@ -2999,6 +3000,7 @@ check_lib math.h sin -lm && LIBM="-lm" disabled crystalhd || check_lib libcrystalhd/libcrystalhd_if.h DtsCrystalHDVersion -lcrystalhd || disable crystalhd enabled vaapi && require vaapi va/va.h vaInitialize -lva +check_mathfunc cbrtf check_mathfunc exp2 check_mathfunc exp2f check_mathfunc llrint diff --git a/libavutil/libm.h b/libavutil/libm.h index 7e5f668e1694b8ed20fd1868a4b4f704575a3dca..62faea45bec6edcd16dd23f16c5bedcd5dc95d74 100644 --- a/libavutil/libm.h +++ b/libavutil/libm.h @@ -28,6 +28,11 @@ #include "config.h" #include "attributes.h" +#if !HAVE_CBRTF +#undef cbrtf +#define cbrtf(x) powf(x, 1.0/3.0) +#endif /* HAVE_CBRTF */ + #if !HAVE_EXP2 #undef exp2 #define exp2(x) exp((x) * 0.693147180559945)