win_utf8_io.c : Comment only.
[flac.git] / configure.ac
index c3970b9..db5402d 100644 (file)
@@ -113,8 +113,8 @@ case "$host_cpu" in
                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])
+                       AC_DEFINE(FLAC__CPU_X86_64)
+                       AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
                        fi
                asm_optimisation=$asm_opt
                ;;
@@ -137,7 +137,7 @@ case "$host_cpu" in
                asm_optimisation=$asm_opt
                ;;
 esac
-AM_CONDITIONAL(FLaC__CPU_X86_64, test "x$cpu_x86_64" = xtrue)
+AM_CONDITIONAL(FLAC__CPU_X86_64, test "x$cpu_x86_64" = xtrue)
 AM_CONDITIONAL(FLaC__CPU_IA32, test "x$cpu_ia32" = xtrue)
 AM_CONDITIONAL(FLaC__CPU_PPC, test "x$cpu_ppc" = xtrue)
 AM_CONDITIONAL(FLaC__CPU_SPARC, test "x$cpu_sparc" = xtrue)
@@ -358,41 +358,20 @@ AC_DEFINE(FLAC__HAS_NASM)
 AH_TEMPLATE(FLAC__HAS_NASM, [define if you are compiling for x86 and have the NASM assembler])
 fi
 
-# only matters for PowerPC
-AC_CHECK_PROGS(AS, as, as)
-AC_CHECK_PROGS(GAS, gas, gas)
-
-# try -v (apple as) and --version (gas) at the same time
-test "$AS" = "as" && as --version -v < /dev/null 2>&1 | grep Apple >/dev/null || AS=gas
-
-AM_CONDITIONAL(FLaC__HAS_AS, test "$AS" = "as")
-AM_CONDITIONAL(FLaC__HAS_GAS, test "$AS" = "gas")
-if test "$AS" = "as" ; then
-AC_DEFINE(FLAC__HAS_AS)
-AH_TEMPLATE(FLAC__HAS_AS, [define if you are compiling for PowerPC and have the 'as' assembler])
-fi
-if test "$AS" = "gas" ; then
-# funniest. macro. ever.
-AC_DEFINE(FLAC__HAS_GAS)
-AH_TEMPLATE(FLAC__HAS_GAS, [define if you are compiling for PowerPC and have the 'gas' assembler])
-fi
-
 if test "x$debug" = xtrue; then
        CPPFLAGS="-DDEBUG $CPPFLAGS"
+       CFLAGS=$(echo "$CFLAGS" | sed 's/-g//')
        CFLAGS="-g $CFLAGS"
 else
        CPPFLAGS="-DNDEBUG $CPPFLAGS"
-       if test "x$GCC" = xyes; then
-               if test "x$user_cflags" = x; then
-                       CFLAGS="-O3 -funroll-loops -Wall -W -Winline"
-               fi
-       fi
+       CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//')
+       CFLAGS="-O3 -funroll-loops $CFLAGS"
 fi
 
 XIPH_GCC_VERSION
 
 if test x$ac_cv_c_compiler_gnu = xyes ; then
-       CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Winline -Wconversion
+       CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Wunreachable-code -Winline " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Wconversion
        CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef -Wunreachable-code " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
 
        XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
@@ -418,7 +397,7 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
                XIPH_ADD_CFLAGS([-fgnu89-inline])
                fi
 
-       if test "x$asm_optimisation" = "xyes" ; then
+       if test "x$asm_optimisation$sse_os" = "xyesyes" ; then
                XIPH_ADD_CFLAGS([-msse2])
                fi
 
@@ -433,25 +412,17 @@ if test x$enable_werror = "xyes" ; then
        AC_LANG_POP([C++])
        fi
 
-
 if test x$enable_stack_smash_protection = "xyes" ; then
        XIPH_GCC_STACK_PROTECTOR
        XIPH_GXX_STACK_PROTECTOR
        fi
 
-#@@@
-AM_CONDITIONAL(FLaC__HAS_AS__TEMPORARILY_DISABLED, test "yes" = "no")
-AM_CONDITIONAL(FLaC__HAS_GAS__TEMPORARILY_DISABLED, test "yes" = "no")
-
 AC_CONFIG_FILES([ \
        Makefile \
        src/Makefile \
        src/libFLAC/Makefile \
        src/libFLAC/flac.pc \
        src/libFLAC/ia32/Makefile \
-       src/libFLAC/ppc/Makefile \
-       src/libFLAC/ppc/as/Makefile \
-       src/libFLAC/ppc/gas/Makefile \
        src/libFLAC/include/Makefile \
        src/libFLAC/include/private/Makefile \
        src/libFLAC/include/protected/Makefile \