X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=6355f726a1546781cdfcbedb0cb483b7abc46540;hb=b09ee0177ce4b220db4e46bf9eea0312535bf15b;hp=3a847ab060c77687239c8d79f417e489b1dd257f;hpb=2860f1780ca92c779ee0a2c545ae1b9c4818dc53;p=platform%2Fupstream%2Fflac.git diff --git a/configure.ac b/configure.ac index 3a847ab..6355f72 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.0], [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)]) @@ -123,16 +124,23 @@ case "$host" in esac AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue) +os_is_windows=no case "$host" in - *-*-cygwin|*mingw*|*emx*) + *-*-cygwin|*mingw*) # define this variable for enabling strict exports with libtool; for now, it's supported by Win32 and OS/2 LT_NO_UNDEFINED="-no-undefined" + CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS" + os_is_windows=yes + ;; + *emx*) + LT_NO_UNDEFINED="-no-undefined" ;; *) LT_NO_UNDEFINED= ;; esac AC_SUBST(LT_NO_UNDEFINED) +AM_CONDITIONAL(OS_IS_WINDOWS, test "x$os_is_windows" = xyes) case "$host" in *-pc-linux-gnu) @@ -234,7 +242,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]), @@ -300,9 +311,11 @@ fi AM_CONDITIONAL(FLaC__HAS_OGG, [test "x$have_ogg" = xyes]) if test "x$have_ogg" = xyes ; then AC_DEFINE_UNQUOTED([FLAC__HAS_OGG],1,[define if you have the ogg library]) + OGG_PACKAGE="ogg" else AC_DEFINE_UNQUOTED([FLAC__HAS_OGG],0) fi +AC_SUBST(OGG_PACKAGE) dnl check for i18n(internationalization); these are from libiconv/gettext AM_ICONV @@ -357,9 +370,13 @@ 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" + CFLAGS="$CFLAGS -Wall -Wextra -Werror " + CXXFLAGS="$CXXFLAGS -Wall -Wextra -Werror " fi if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elf; then @@ -375,16 +392,13 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then XIPH_ADD_CFLAGS([-Wextra]) +XIPH_ADD_CFLAGS([-Wdeclaration-after-statement]) XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2]) -case "$host_os" in - mingw32msvc | mingw32 | freebsd* ) - # Stack protector not working on these platforms 2013/03/09. - ;; - *) - 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") @@ -412,13 +426,6 @@ AC_CONFIG_FILES([ \ src/plugin_common/Makefile \ src/plugin_xmms/Makefile \ src/share/Makefile \ - src/share/getopt/Makefile \ - src/share/grabbag/Makefile \ - src/share/replaygain_analysis/Makefile \ - src/share/replaygain_synthesis/Makefile \ - src/share/replaygain_synthesis/include/Makefile \ - src/share/replaygain_synthesis/include/private/Makefile \ - src/share/utf8/Makefile \ src/test_grabbag/Makefile \ src/test_grabbag/cuesheet/Makefile \ src/test_grabbag/picture/Makefile \