stream_encoder/decoder : Comment fixes.
[flac.git] / configure.ac
index 2c4e527..19320a4 100644 (file)
@@ -35,6 +35,8 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 LT_INIT([win32-dll disable-static pic-only])
 AM_PROG_AS
 AC_PROG_CXX
+XIPH_C_COMPILER_IS_CLANG
+XIPH_GCC_REALLY_IS_GCC
 AC_PROG_MAKE_SET
 
 AC_SYS_LARGEFILE
@@ -183,7 +185,7 @@ esac
 AM_CONDITIONAL(FLaC__SYS_DARWIN, test "x$sys_darwin" = xtrue)
 AM_CONDITIONAL(FLaC__SYS_LINUX, test "x$sys_linux" = xtrue)
 
-if test "x$cpu_ia32" = xtrue ; then
+if test "x$cpu_ia32" = xtrue || test "x$cpu_x86_64" = xtrue ; then
 AC_DEFINE(FLAC__ALIGN_MALLOC_DATA)
 AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byte boundaries])
 fi
@@ -332,6 +334,7 @@ if test "x$have_ogg" = xyes ; then
        OGG_PACKAGE="ogg"
 else
        AC_DEFINE_UNQUOTED([FLAC__HAS_OGG],0)
+       have_ogg=no
 fi
 AC_SUBST(OGG_PACKAGE)
 
@@ -388,15 +391,22 @@ fi
 XIPH_GCC_VERSION
 
 if test x$ac_cv_c_compiler_gnu = xyes ; then
-       CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Winline -Wconversion
-       CXXFLAGS="$CXXFLAGS -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
+       CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Winline -Wconversion
+       CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
 
 
        if test x$enable_gcc_werror = "xyes" ; then
-               CFLAGS="$CFLAGS -Wall -Wextra -Werror "
-               CXXFLAGS="$CXXFLAGS -Wall -Wextra -Werror "
+               CFLAGS="$CFLAGS -Werror "
+               CXXFLAGS="$CXXFLAGS -Werror "
                fi
 
+       XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
+       XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
+
+       AC_LANG_PUSH([C++])
+       XIPH_ADD_CXXFLAGS([-Weffc++])
+       AC_LANG_POP([C++])
+
        if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elf; then
                CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
                CFLAGS="$CFLAGS -fvisibility=hidden"
@@ -406,12 +416,14 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
        if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
                XIPH_ADD_CFLAGS([-fgnu89-inline])
                fi
-       fi
 
+       if test "x$asm_optimisation" = "xyes" ; then
+               XIPH_ADD_CFLAGS([-msse2])
+               fi
+
+       fi
 
 XIPH_ADD_CFLAGS([-Wextra])
-XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
-XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
 
 if test x$enable_stack_smash_protection = "xyes" ; then
        XIPH_GCC_STACK_PROTECTOR
@@ -476,10 +488,9 @@ AC_CONFIG_FILES([ \
        doc/Makefile \
        doc/html/Makefile \
        doc/html/images/Makefile \
-       doc/html/images/hw/Makefile \
-       doc/html/ru/Makefile \
        m4/Makefile \
        man/Makefile \
+       test/common.sh \
        test/Makefile \
        test/cuesheets/Makefile \
        test/flac-to-flac-metadata-test-files/Makefile \
@@ -512,5 +523,7 @@ AC_MSG_RESULT([
 if test x$ac_cv_c_compiler_gnu = xyes ; then
        echo "    GCC version : ......................... ${GCC_VERSION}"
 fi
-       echo "    Asm optimiizations : .................. ${asm_optimisation}"
+       echo "    Compiler is Clang : ................... ${xiph_cv_c_compiler_clang}"
+       echo "    Asm optimizations : ................... ${asm_optimisation}"
+       echo "    Ogg/FLAC support : .................... ${have_ogg}"
 echo