=== modified file 'configure.ac' --- configure.ac 2013-05-15 15:41:43 +0000 +++ configure.ac 2013-05-18 09:48:20 +0000 @@ -35,9 +35,20 @@ AC_LANG([C++]) AC_CANONICAL_HOST -# might be cross-compiling +# Clang 3.2 on some CPUs requires -march-native to detect correctly +# GCC 4.3+ can also produce faster executables when its used +SQUID_CC_CHECK_ARGUMENT([ac_cv_check_marchnative],[-march=native]) + +# might be cross-compiling. if test "x$HOSTCXX" = "x"; then HOSTCXX="$CXX" + if test "x$ac_cv_check_marchnative" = "xyes"; then + CXXFLAGS="$CXXFLAGS -march=native" + fi +fi +if test "x$ac_cv_check_marchnative" = "xyes"; then + # always valid for the Host compiler. + HOSTCXX="$HOSTCXX -march=native" fi AC_SUBST(HOSTCXX)