Commit 64b7d0ce authored by Erik de Castro Lopo's avatar Erik de Castro Lopo
Browse files

configure.in : Add AM_SILENT_RULES. Check for <inttypes.h>. Add --enable-gcc-werror option.

parent 7b0d8f10
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
AC_INIT(src/flac/main.c) AC_INIT(src/flac/main.c)
AM_INIT_AUTOMAKE(flac, 1.2.1) AM_INIT_AUTOMAKE(flac, 1.2.1)
AM_SILENT_RULES([yes])
# Don't automagically regenerate autoconf/automake generated files unless # Don't automagically regenerate autoconf/automake generated files unless
# explicitly requested. Eases autobuilding -mdz # explicitly requested. Eases autobuilding -mdz
...@@ -57,6 +58,10 @@ if test $ac_cv_c_vararrays = yes; then ...@@ -57,6 +58,10 @@ if test $ac_cv_c_vararrays = yes; then
fi fi
AC_LANG_POP(C++) AC_LANG_POP(C++)
# c flavor # c flavor
AC_HEADER_STDC
AC_CHECK_HEADERS(inttypes.h)
AC_C_VARARRAYS AC_C_VARARRAYS
AC_C_BIGENDIAN AC_C_BIGENDIAN
...@@ -133,6 +138,7 @@ AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byt ...@@ -133,6 +138,7 @@ AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byt
fi fi
AC_ARG_ENABLE(asm-optimizations, AC_HELP_STRING([--disable-asm-optimizations], [Don't use any assembly optimization routines]), asm_opt=no, asm_opt=yes) AC_ARG_ENABLE(asm-optimizations, AC_HELP_STRING([--disable-asm-optimizations], [Don't use any assembly optimization routines]), asm_opt=no, asm_opt=yes)
dnl ' Terminate the damn single quote
AM_CONDITIONAL(FLaC__NO_ASM, test "x$asm_opt" = xno) AM_CONDITIONAL(FLaC__NO_ASM, test "x$asm_opt" = xno)
if test "x$asm_opt" = xno ; then if test "x$asm_opt" = xno ; then
AC_DEFINE(FLAC__NO_ASM) AC_DEFINE(FLAC__NO_ASM)
...@@ -210,6 +216,9 @@ FLAC__TEST_LEVEL=2 ...@@ -210,6 +216,9 @@ FLAC__TEST_LEVEL=2
fi fi
AC_SUBST(FLAC__TEST_LEVEL) AC_SUBST(FLAC__TEST_LEVEL)
AC_ARG_ENABLE(gcc-werror,
AC_HELP_STRING([--enable-gcc-werror], [enable -Werror in all Makefiles]))
AC_ARG_ENABLE(valgrind-testing, AC_ARG_ENABLE(valgrind-testing,
AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]), AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]),
[case "${enableval}" in [case "${enableval}" in
...@@ -270,7 +279,7 @@ AC_ARG_ENABLE([ogg], ...@@ -270,7 +279,7 @@ AC_ARG_ENABLE([ogg],
if test "x$want_ogg" != "xno"; then if test "x$want_ogg" != "xno"; then
XIPH_PATH_OGG(have_ogg=yes, AC_MSG_WARN([*** Ogg development enviroment not installed - Ogg support will not be built])) XIPH_PATH_OGG(have_ogg=yes, AC_MSG_WARN([*** Ogg development enviroment not installed - Ogg support will not be built]))
fi fi
AM_CONDITIONAL(FLaC__HAS_OGG, [test "x$have_ogg" = xyes]) AM_CONDITIONAL(FLaC__HAS_OGG, [test "x$have_ogg" = xyes])
if test "x$have_ogg" = xyes ; then if test "x$have_ogg" = xyes ; then
AC_DEFINE(FLAC__HAS_OGG) AC_DEFINE(FLAC__HAS_OGG)
...@@ -330,6 +339,15 @@ else ...@@ -330,6 +339,15 @@ else
fi fi
fi fi
if test x$ac_cv_c_compiler_gnu = xyes ; then
if test x$enable_gcc_werror = "xyes" ; then
CFLAGS="-Werror $CFLAGS"
CXXFLAGS="-Werror $CXXFLAGS"
fi
fi
#@@@ #@@@
AM_CONDITIONAL(FLaC__HAS_AS__TEMPORARILY_DISABLED, test "yes" = "no") AM_CONDITIONAL(FLaC__HAS_AS__TEMPORARILY_DISABLED, test "yes" = "no")
AM_CONDITIONAL(FLaC__HAS_GAS__TEMPORARILY_DISABLED, test "yes" = "no") AM_CONDITIONAL(FLaC__HAS_GAS__TEMPORARILY_DISABLED, test "yes" = "no")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment