[vlc-commits] contrib: make HAVE_FPU check consistent with vlc_cpu.h

Rafaël Carré git at videolan.org
Sat Jan 28 19:52:46 CET 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Sat Jan 28 12:39:14 2012 -0500| [25a6c75b57ef09c829cf2fca2af3cd5e98a1c3a7] | committer: Jean-Baptiste Kempf

contrib: make HAVE_FPU check consistent with vlc_cpu.h
(cherry picked from commit 7a7f12fa3256a4dd58b46e9f16fff9700a574edc)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=25a6c75b57ef09c829cf2fca2af3cd5e98a1c3a7
---

 contrib/src/main.mak |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 5ef4fbf..168a0d7 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -29,6 +29,8 @@ CONTRIB_VIDEOLAN := $(VIDEOLAN)/testing/contrib
 #
 # Machine-dependent variables
 #
+cppcheck = $(shell $(CC) $(CFLAGS) -E -dM - < /dev/null | grep -E $(1))
+
 PREFIX ?= $(TOPDST)/$(HOST)
 PREFIX := $(abspath $(PREFIX))
 ifneq ($(HOST),$(BUILD))
@@ -38,6 +40,12 @@ ARCH := $(shell $(SRC)/get-arch.sh $(HOST))
 ifneq ($(findstring $(ARCH),i386 sparc sparc64 ppc ppc64 x86_64),)
 # This should be consistent with include/vlc_cpu.h
 HAVE_FPU = 1
+else ifneq ($(findstring $(ARCH),arm),)
+ifneq ($(call cppcheck, __VFP_FP__)),)
+ifeq ($(call cppcheck, __SOFT_FP__),)
+HAVE_FPU = 1
+endif
+endif
 endif
 ifeq ($(ARCH)-$(HAVE_WIN32),x86_64-1)
 HAVE_WIN64 := 1



More information about the vlc-commits mailing list