X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=8b6edcb5b2bc526a1fea7c89f1c39b6bb1b0378e;hb=3c84f9e86b40b64bb42af6dff8c61521c5439ecd;hp=24696fea4b523be2b15c8023eda8a5566fc57d19;hpb=d5b03bcc36474ff1c9f2da2dcb5212e810208a6f;p=platform%2Fupstream%2Fflac.git diff --git a/configure.ac b/configure.ac index 24696fe..8b6edcb 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ # instead of FLAC__ since autoconf triggers off 'AC_' in strings AC_PREREQ(2.60) -AC_INIT([flac], [1.3.0pre1], [flac-dev@xiph.org], [flac], [https://www.xiph.org/flac/]) +AC_INIT([flac], [1.3.0pre2], [flac-dev@xiph.org], [flac], [https://www.xiph.org/flac/]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([src/flac/main.c]) AC_CONFIG_MACRO_DIR([m4]) @@ -40,6 +40,7 @@ AC_PROG_MAKE_SET AC_SYS_LARGEFILE AC_FUNC_FSEEKO +AC_CHECK_SIZEOF(off_t,1) # Fake default value. AC_CHECK_SIZEOF([void*]) AC_SEARCH_LIBS([lround],[m], [AC_DEFINE(HAVE_LROUND,1,lround support)]) @@ -234,7 +235,10 @@ fi AC_SUBST(FLAC__TEST_LEVEL) AC_ARG_ENABLE(gcc-werror, - AC_HELP_STRING([--enable-gcc-werror], [enable -Werror in all Makefiles])) + AC_HELP_STRING([--enable-gcc-werror], [Enable -Werror in all Makefiles])) + +AC_ARG_ENABLE(stack-smash-protection, + AC_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection])) AC_ARG_ENABLE(valgrind-testing, AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]), @@ -357,30 +361,35 @@ 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 + + if test x$enable_gcc_werror = "xyes" ; then - CFLAGS="-Wall -Wextra -Werror $CFLAGS" - CXXFLAGS="-Wall -Wextra -Werror $CXXFLAGS" - fi + CFLAGS="$CFLAGS -Wall -Wextra -Werror " + CXXFLAGS="$CXXFLAGS -Wall -Wextra -Werror " + fi if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elf; then CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR" CFLAGS="$CFLAGS -fvisibility=hidden" CXXFLAGS="$CXXFLAGS -fvisibility=hidden" + fi + + if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then + XIPH_ADD_CFLAGS([-fgnu89-inline]) + fi fi -fi XIPH_ADD_CFLAGS([-Wextra]) +XIPH_ADD_CFLAGS([-Wdeclaration-after-statement]) XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) -case "$host_os" in - mingw32msvc | mingw32) - # Disable for MinGW. Had reports of it not working. - ;; - *) - XIPH_ADD_CFLAGS([-fstack-protector --param ssp-buffer-size=4]) - ;; - esac +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")