Some incredibly braindamaged operating systems, such as FreeBSD, blatantly ignore the C specification and omit certain functions that are required by ISO C.
log2f is one of these functions that periodically goes missing in such operating systems.
#include <inttypes.h>
#endif
+#ifndef HAVE_LOG2F
+#define log2f(x) (logf((x))/0.693147180559945f)
+#endif
+
#ifdef _WIN32
#include <io.h> // _setmode()
#include <fcntl.h> // _O_BINARY
LDFLAGS="$LDFLAGS $libpthread"
fi
+if cc_check "math.h" "-Werror" "return log2f(2);" ; then
+ CFLAGS="$CFLAGS -DHAVE_LOG2F"
+fi
+
if [ "$lavf_input" = "auto" ] ; then
lavf_input="no"
if ${cross_prefix}pkg-config --exists libavformat libavcodec libswscale 2>$DEVNULL; then