speex: configure in float or fixed mode based on TARGET_FPU
authorFahad Arslan <Fahad_Arslan@mentor.com>
Mon, 20 Jan 2014 10:38:20 +0000 (15:38 +0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Jan 2014 00:52:32 +0000 (00:52 +0000)
Decide float or fixed mode usage depending on whether hardware
FPU is present or not.

(From OE-Core rev: e8f707f16a38d85535593a32efff6dcbf4ddb203)

Signed-off-by: Fahad Arslan <Fahad_Arslan@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-multimedia/speex/speex-fpu.inc [new file with mode: 0644]
meta/recipes-multimedia/speex/speex_1.2rc1.bb

diff --git a/meta/recipes-multimedia/speex/speex-fpu.inc b/meta/recipes-multimedia/speex/speex-fpu.inc
new file mode 100644 (file)
index 0000000..2571d32
--- /dev/null
@@ -0,0 +1,4 @@
+def get_speex_fpu_setting(bb, d):
+     if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+             return "--enable-fixed-point --disable-float-api --disable-vbr"
+     return ""
index 5de0169..9fd88a3 100644 (file)
@@ -19,5 +19,7 @@ PARALLEL_MAKE = ""
 inherit autotools pkgconfig lib_package
 
 EXTRA_OECONF = " --enable-fixed-point --with-ogg-libraries=${STAGING_LIBDIR} \
-                 --disable-float-api --disable-vbr \
                  --with-ogg-includes=${STAGING_INCDIR} --disable-oggtest"
+
+require speex-fpu.inc
+EXTRA_OECONF += "${@get_speex_fpu_setting(bb, d)}"