Detect x86 SSE availability for architecture specific convolutional
decoding. Use the GNU autoconf macro AX_EXT to provide built time
detection and set the following definitions.
http://www.gnu.org/software/autoconf-archive/ax_ext.html
HAVE_SSE3
HAVE_SSE4_1
AX_EXT is generally packaged with autoconf-archive and requires the
following macro files.
ax_check_compile_flag.m4
ax_ext.m4
ax_gcc_x86_avx_xgetbv.m4
ax_gcc_x86_cpuid.m4
Set -march=native for automatic compile flag setting. Combined, this
allows automatic detection on x86 and pass-through support for non-x86
platforms (e.g. ARM).
Signed-off-by: Thomas Tsou <tom(a)tsou.cc>
---
configure.ac | 1 +
src/Makefile.am | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index eaaab50..4b0c572 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,6 +179,7 @@ then
AC_DEFINE([PANIC_INFLOOP],[1],[Use infinite loop on panic rather than fprintf/abort])
fi
+AX_EXT
AC_OUTPUT(
libosmocore.pc
diff --git a/src/Makefile.am b/src/Makefile.am
index 0ecf4b0..c0b78a8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,7 +2,7 @@
# Please read Chapter 6 "Library interface versions" of the libtool
documentation before making any modification
LIBVERSION=4:0:0
-AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CFLAGS = -Wall $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include
-march=native
lib_LTLIBRARIES = libosmocore.la
--
1.9.0