+# Double check SSE2 (Darwin, Linux and FreeBSD supported, may end up disabling SSE2 on other platforms incorrectly)
+if [ "$sse2" = "true" ]
+then
+ case $targetos in
+ Darwin)
+ sysctl -a hw | grep "sse2: 1" > /dev/null || sse2=false
+ ;;
+ Linux)
+ grep sse2 /proc/cpuinfo > /dev/null 2>&1 || sse2=false
+ ;;
+ FreeBSD)
+ [ "$(make -V MACHINE_CPU:Msse2)" ] || sse2=false
+ ;;
+ *)
+ grep sse2 /proc/cpuinfo > /dev/null 2>&1 || sse2=false
+ ;;
+ esac
+fi
+