From dfeaa7709b6b1243e3782c5e75f411a31ba1d8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 29 Jun 2010 11:21:06 +0200 Subject: [PATCH] vdpau: Check for log2 and only use it if it's available --- configure.ac | 5 +++++ sys/vdpau/h264/gsth264parser.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index 532671adb5..e1fe0765c3 100644 --- a/configure.ac +++ b/configure.ac @@ -167,6 +167,11 @@ dnl *** checks for compiler characteristics *** dnl *** checks for library functions *** AC_CHECK_FUNCS([gmtime_r]) +LIBS_SAVE=$LIBS +LIBS="$LIBS $LIBM" +AC_CHECK_FUNCS([log2]) +LIBS=$LIBS_SAVE + dnl *** checks for headers *** AC_CHECK_HEADERS([sys/utsname.h]) diff --git a/sys/vdpau/h264/gsth264parser.c b/sys/vdpau/h264/gsth264parser.c index 861bab2443..659498226c 100644 --- a/sys/vdpau/h264/gsth264parser.c +++ b/sys/vdpau/h264/gsth264parser.c @@ -18,9 +18,17 @@ * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include +#ifndef HAVE_LOG2 +#define log2(x) (log(x)/log(2)) +#endif + #include "gstnalreader.h" #include "gsth264parser.h"