diff options
Diffstat (limited to 'configure.sh')
| -rwxr-xr-x | configure.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.sh b/configure.sh index 9a790ca..b9779c2 100755 --- a/configure.sh +++ b/configure.sh | |||
| @@ -1,8 +1,13 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | cc -mavx2 utils/detect-immintrin.c && detected="AVX2" && rm a.out | 3 | detect() { cc -march=native -dM -E - < /dev/null | grep "$1"; } |
| 4 | |||
| 5 | [ -n "$(detect __AVX2__)" ] && detected="AVX2" | ||
| 6 | |||
| 4 | TYPE=${TYPE-"$detected"} | 7 | TYPE=${TYPE-"$detected"} |
| 5 | 8 | ||
| 9 | echo "Using CUBE_$TYPE" | ||
| 10 | |||
| 6 | STD="-std=c99" | 11 | STD="-std=c99" |
| 7 | WFLAGS="-pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-function" | 12 | WFLAGS="-pedantic -Wall -Wextra -Wno-unused-parameter -Wno-unused-function" |
| 8 | [ "$TYPE" = "AVX2" ] && AVX="-mavx2" | 13 | [ "$TYPE" = "AVX2" ] && AVX="-mavx2" |
