+@@ -105,6 +105,14 @@
+ asm_optimisation=no
+ case "$host_cpu" in
+ x86_64)
++ case "$host" in
++ *gnux32)
++ cpu_x86_64=true
++ AC_DEFINE(FLAC__CPU_X86_64)
++ AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
++ asm_optimisation=$asm_opt
++ ;;
++ *)
+ if test $ac_cv_sizeof_voidp = 4 ; then
+ # This must be a 32 bit user space running on 64 bit kernel so treat
+ # this as ia32.
+@@ -118,6 +126,8 @@
+ AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
+ fi
+ asm_optimisation=$asm_opt
++ ;;
++ esac
+ ;;
+ i*86)
+ cpu_ia32=true