Commit 04d2e753 authored by Rafaël Carré's avatar Rafaël Carré

add a check to lrintf for systems that define it in libm

parent c2725e1e
......@@ -801,7 +801,7 @@ DISTCLEAN_PKG += speex-$(SPEEX_VERSION).tar.gz
# @echo "*** Please type return here : ***"
# cvs -d $(FAAD2_CVSROOT) login
# cvs -d $(FAAD2_CVSROOT) co faad2
# (cd $@; patch -p0 < ../Patches/faad2.patch)
# (cd $@; patch -p1 < ../Patches/faad2.patch)
# (cd $@; sh ./bootstrap)
faad2-$(FAAD2_VERSION).tar.bz2:
......@@ -809,7 +809,7 @@ faad2-$(FAAD2_VERSION).tar.bz2:
faad: faad2-$(FAAD2_VERSION).tar.bz2
$(EXTRACT_BZ2)
(cd $@; patch -p0 < ../Patches/faad2.patch && ./bootstrap)
(cd $@; patch -p1 < ../Patches/faad2.patch && ./bootstrap)
.faad: faad
(cd $< && $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) CFLAGS="-O3" && sed -i.orig "s/shrext_cmds/shrext/g" libtool && make -C libfaad && make -C libfaad install)
......
--- libfaad/bits.h 2005-11-22 23:41:28.000000000 +0000
+++ libfaad/bits.h 2005-11-22 23:40:15.000000000 +0000
diff -ru a/configure.in b/configure.in
--- a/configure.in Wed Nov 22 23:42:56 2006
+++ b/configure.in Wed Nov 22 23:30:04 2006
@@ -76,6 +76,8 @@
fi
])
+dnl check for lrintf()
+AC_SEARCH_LIBS(lrintf,m,[AC_DEFINE([HAVE_LRINTF], [1], [Define if lrintf exists])], [])
MY_CHECK_TYPEDEF_FROM_INCLUDE([float32_t temp],
[#include <sys/types.h>,
diff -ru a/libfaad/bits.h b/libfaad/bits.h
--- a/libfaad/bits.h Wed Nov 22 23:43:10 2006
+++ b/libfaad/bits.h Wed Nov 22 23:44:20 2006
@@ -58,7 +58,7 @@
#if defined (_WIN32) && !defined(_WIN32_WCE) && !defined(__MINGW32__)
......@@ -9,14 +22,10 @@
#define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) )
#else
#define BSWAP(a) \
Index: libfaad/common.h
===================================================================
RCS file: /cvsroot/faac/faad2/libfaad/common.h,v
retrieving revision 1.66
diff -u -r1.66 common.h
--- libfaad/common.h 1 Feb 2005 13:23:35 -0000 1.66
+++ libfaad/common.h 22 Nov 2005 22:46:50 -0000
@@ -162,7 +162,7 @@
diff -ru a/libfaad/common.h b/libfaad/common.h
--- a/libfaad/common.h Wed Nov 22 23:43:04 2006
+++ b/libfaad/common.h Wed Nov 22 23:45:04 2006
@@ -147,7 +147,7 @@
/* END COMPILE TIME DEFINITIONS */
......@@ -25,16 +34,26 @@ diff -u -r1.66 common.h
#include <stdlib.h>
@@ -309,8 +309,11 @@
@@ -288,8 +288,11 @@
*y2 = MUL_F(x2, c1) - MUL_F(x1, c2);
}
-
- #if defined(_WIN32) && !defined(__MINGW32__)
+#ifndef HAVE_LRINTF
+ #if defined(__MINGWCE__)
+ #elif defined(__MINGW32__) || defined(__APPLE__)
#define HAS_LRINTF
+ #elif defined(_WIN32)
+ #define HAS_LRINTF
+ #elif defined(_WIN32)
#define HAS_LRINTF
static INLINE int lrintf(float f)
{
int i;
@@ -315,7 +318,7 @@
return i;
}
#endif
-
+#endif
#ifdef __ICL /* only Intel C compiler has fmath ??? */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment