libFLAC/stream_encoder_intrin_*.c: More refactoring
[flac.git] / configure.ac
index 3b1c037..46cb916 100644 (file)
@@ -105,19 +105,30 @@ AC_CHECK_SIZEOF(void*,1)
 asm_optimisation=no
 case "$host_cpu" in
        amd64|x86_64)
-               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.
-                       cpu_ia32=true
-                       AC_DEFINE(FLAC__CPU_IA32)
-                       AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
-               else
-                       # x86_64 user space and kernel.
-                       cpu_x86_64=true
-                       AC_DEFINE(FLAC__CPU_X86_64)
-                       AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
-                       fi
-               asm_optimisation=$asm_opt
+               case "$host" in
+                       *gnux32)
+                               # x32 user space and 64 bit kernel.
+                               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.
+                                       cpu_ia32=true
+                                       AC_DEFINE(FLAC__CPU_IA32)
+                                       AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
+                       else
+                                       # x86_64 user space and kernel.
+                                       cpu_x86_64=true
+                                       AC_DEFINE(FLAC__CPU_X86_64)
+                                       AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
+                               fi
+                               asm_optimisation=$asm_opt
+                               ;;
+               esac
                ;;
        i*86)
                cpu_ia32=true
@@ -386,12 +397,23 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
                XIPH_ADD_CFLAGS([-fgnu89-inline])
                fi
 
+       if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x47" ; then
+               XIPH_ADD_CFLAGS([-fno-inline-small-functions])
+               fi
+
        if test "x$asm_optimisation$sse_os" = "xyesyes" ; then
                XIPH_ADD_CFLAGS([-msse2])
                fi
 
        fi
 
+case "$host_os" in
+       "mingw32"|"os2")
+       if test "$host_cpu" = "i686"; then
+               XIPH_ADD_CFLAGS([-mstackrealign])
+               fi
+       esac
+
 XIPH_ADD_CFLAGS([-Wextra])
 
 if test x$enable_werror = "xyes" ; then
@@ -470,6 +492,7 @@ AC_CONFIG_FILES([ \
        objs/release/Makefile \
        objs/release/bin/Makefile \
        objs/release/lib/Makefile \
+       microbench/Makefile
 ])
 AC_OUTPUT