Adds check for log2 and only use it in exif library if it is
available.
AC_CHECK_FUNCS([localtime_r gmtime_r])
dnl *** checks for math functions ***
+LIBS_SAVE=$LIBS
+LIBS="$LIBS $LIBM"
+AC_CHECK_FUNCS(log2)
+LIBS=$LIBS_SAVE
dnl *** checks for types/defines ***
gst_util_fraction_to_double (gst_value_get_fraction_numerator (value),
gst_value_get_fraction_denominator (value), &num);
+#ifdef HAVE_LOG2
num = -log2 (num);
+#else
+ num = -log (num) / M_LN2;
+#endif
/* now the value */
gst_exif_writer_write_signed_rational_tag_from_double (writer,
GST_WARNING ("Failed to get focal ratio from from tag list");
return;
}
+#ifdef HAVE_LOG2
num = 2 * log2 (num);
+#else
+ num = 2 * (log (num) / M_LN2);
+#endif
/* now the value */
gst_exif_writer_write_rational_tag_from_double (writer,