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

This commit is contained in:
Erik de Castro Lopo 2012-02-01 17:55:15 +11:00
parent 7b0d8f1027
commit 64b7d0ce6d

View File

@ -20,6 +20,7 @@
AC_INIT(src/flac/main.c)
AM_INIT_AUTOMAKE(flac, 1.2.1)
AM_SILENT_RULES([yes])
# Don't automagically regenerate autoconf/automake generated files unless
# explicitly requested. Eases autobuilding -mdz
@ -57,6 +58,10 @@ if test $ac_cv_c_vararrays = yes; then
fi
AC_LANG_POP(C++)
# c flavor
AC_HEADER_STDC
AC_CHECK_HEADERS(inttypes.h)
AC_C_VARARRAYS
AC_C_BIGENDIAN
@ -133,6 +138,7 @@ AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byt
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)
dnl ' Terminate the damn single quote
AM_CONDITIONAL(FLaC__NO_ASM, test "x$asm_opt" = xno)
if test "x$asm_opt" = xno ; then
AC_DEFINE(FLAC__NO_ASM)
@ -210,6 +216,9 @@ FLAC__TEST_LEVEL=2
fi
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_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]),
[case "${enableval}" in
@ -270,7 +279,7 @@ AC_ARG_ENABLE([ogg],
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]))
fi
AM_CONDITIONAL(FLaC__HAS_OGG, [test "x$have_ogg" = xyes])
if test "x$have_ogg" = xyes ; then
AC_DEFINE(FLAC__HAS_OGG)
@ -330,6 +339,15 @@ else
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_GAS__TEMPORARILY_DISABLED, test "yes" = "no")