]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Select CPU optimizations based on target cpu rather than the host.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 2 Mar 2013 09:57:04 +0000 (10:57 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 2 Mar 2013 09:57:04 +0000 (10:57 +0100)
configure.ac

index 03f937dfd8ea7f2cf8d480f58e36c6c1a804fd5a..4b32e39b1f8828e77d6acc1c5b7739fffdd95b9b 100644 (file)
@@ -34,6 +34,7 @@ AC_MSG_RESULT([***
 ])
 
 dnl Checks for programs.
+AC_CANONICAL_TARGET
 AC_PROG_CC
 AM_PROG_AS
 AC_PROG_CXX
@@ -87,17 +88,14 @@ hw_accel=none
 
 
 if test "$use_accel" != "no"; then
-case $host_cpu in
+case $target_cpu in
   i?86 | x86_64 | amd64)
-dnl    GCC_FLAG_ADD([-maes -mpclmul],[X86])
-dnl    if test "x$X86" = "xyes";then
       AC_CHECK_HEADERS(cpuid.h)
-      if test "$host_cpu" = "x86_64" || test "$host_cpu" = "amd64"; then
+      if test "$target_cpu" = "x86_64" || test "$target_cpu" = "amd64"; then
         hw_accel="x86-64"
       else
         hw_accel="x86"
       fi
-dnl    fi
   ;;
   *)
   ;;