aboutsummaryrefslogtreecommitdiff
path: root/configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'configure.sh')
-rwxr-xr-xconfigure.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.sh b/configure.sh
index fdebf27..c297623 100755
--- a/configure.sh
+++ b/configure.sh
@@ -1,9 +1,12 @@
1#!/bin/sh 1#!/bin/sh
2 2
3detectarch() { cc -march=native -dM -E - </dev/null | grep "$1"; } 3cc=${CC:-cc}
4detectsan() { cc -fsanitize=$1 -dM -E -x c - </dev/null | grep "SANITIZE"; } 4
5detectarch() { ${cc} -march=native -dM -E - </dev/null | grep "$1"; }
6detectsan() { ${cc} -fsanitize=$1 -dM -E -x c - </dev/null | grep "SANITIZE"; }
5 7
6[ -n "$(detectarch __AVX2__)" ] && detected="AVX2" 8[ -n "$(detectarch __AVX2__)" ] && detected="AVX2"
9[ -n "$(detectarch __ARM_NEON)" ] && detected="NEON"
7 10
8TYPE=${TYPE-"$detected"} 11TYPE=${TYPE-"$detected"}
9 12
@@ -26,5 +29,5 @@ echo "";
26echo "CFLAGS = $CFLAGS"; 29echo "CFLAGS = $CFLAGS";
27echo "DBGFLAGS = $DBGFLAGS"; 30echo "DBGFLAGS = $DBGFLAGS";
28echo ""; 31echo "";
29echo "CC = ${CC:-cc}" 32echo "CC = ${cc}"
30} > config.mk 33} > config.mk

Generated with cgit - Back to sebastiano.tronto.net