Skip to content

Commit

Permalink
fix SIMD detection script
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementPernet committed Nov 23, 2017
1 parent e00b6b1 commit 98f7f5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ LT_INIT


echo "DEFAULT_CFLAGS=${DEFAULT_CFLAGS}"
echo "DEBUG_CFLAGS=${DEBIG_CFLAGS}"
echo "DEBUG_CFLAGS=${DEBUG_CFLAGS}"
echo "TESTS_CFLAGS=${TESTS_CFLAGS}"
echo "-----------------------------------------------"
echo " START FFLAS-FFPACK CONFIG "
Expand Down
6 changes: 5 additions & 1 deletion macros/instr_set.m4
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ AC_DEFUN([INSTR_SET],
AC_ARG_ENABLE(fma,[AC_HELP_STRING([--disable-fma], [ disable FMA instruction set (enabled by default when available)])],[],[])
AC_ARG_ENABLE(fma4,[AC_HELP_STRING([--disable-fma4], [ disable FMA4 instruction set (enabled by default when available)])],[],[])
AC_TRY_RUN([
BACKUP_CPPFLAGS=${CPPFLAGS}
CPPFLAGS=-I${srcdir}
AC_TRY_RUN([
#include "macros/CodeChunk/instrset_detect.cpp"
// increment by one to distinguish from compilation failure error code
int main(){return instrset_detect()+1;}
Expand Down Expand Up @@ -81,4 +83,6 @@ AC_DEFUN([INSTR_SET],
SIMD_CFLAGS="${SIMD_CFLAGS} -mfma4"
],[AS_ECHO("FMA4 disabled")])
],[AS_ECHO("FMA4 disabled")])
CPPFLAGS=${BACKUP_CPPFLAGS}
])

0 comments on commit 98f7f5e

Please sign in to comment.