aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-08-04 20:48:44 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-08-04 20:48:44 +0200
commitfe0c8e9f09e8562ba919661b8246351f4eb0a03c (patch)
tree42cef2715d0ddba558dd5a8ae85ac5f9e058b767 /configure.ac
parent0c96ac35b3d6758a556959b37ee2316357e0ae0c (diff)
parentfcc6b39a136349870357ace9e431ff0e437f46d4 (diff)
downloaddabmod-fe0c8e9f09e8562ba919661b8246351f4eb0a03c.tar.gz
dabmod-fe0c8e9f09e8562ba919661b8246351f4eb0a03c.tar.bz2
dabmod-fe0c8e9f09e8562ba919661b8246351f4eb0a03c.zip
Merge branch 'next' into next_memless
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac33
1 files changed, 19 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index d39e318..4d94592 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,10 @@ AC_ARG_ENABLE([zeromq],
[AS_HELP_STRING([--disable-zeromq], [Disable ZeroMQ input, output and remote control])],
[], [enable_zeromq=yes])
+AC_ARG_ENABLE([native],
+ [AS_HELP_STRING([--disable-native], [Do not compile with -march=native])],
+ [], [enable_native=yes])
+
# UHD support control
AC_ARG_ENABLE([output_uhd],
[AS_HELP_STRING([--disable-output-uhd], [Disable UHD output])],
@@ -162,20 +166,21 @@ AC_LANG_POP([C++])
# Check for march
-AC_MSG_CHECKING(if we can add -march=native to CFLAGS)
-
-save_CXXFLAGS="$CXXFLAGS"
-CXXFLAGS="$CXXFLAGS -march=native"
-AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[
-void testfunc(void) {}
-]])],
-[supports_march_native=yes],
-[supports_march_native=no]
-)
-AC_MSG_RESULT($supports_march_native)
-if test x"$supports_march_native" = xno; then
- CXXFLAGS="$save_CXXFLAGS"
-fi
+AS_IF([test "x$enable_native" = "xyes"],
+ [AC_MSG_CHECKING(if we can add -march=native to CFLAGS)
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -march=native"
+ AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[
+ void testfunc(void) {}
+ ]])],
+ [supports_march_native=yes],
+ [supports_march_native=no]
+ )
+ AC_MSG_RESULT($supports_march_native)
+ if test x"$supports_march_native" = xno; then
+ CXXFLAGS="$save_CXXFLAGS"
+ fi
+ ])
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([bzero floor ftime gettimeofday memset sqrt strchr strerror strtol])