Committer: Rene Hummen <rene.hummen@xxxxxxxxxxxxxxxxx> Date: 28/05/2010 at 14:29:36 Revision: 4612 Revision-id: rene.hummen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Branch nick: trunk Log: made unresolved warnings (-Wno-error=...) configurable at config time this change is needed due to maemo sdk gcc being unable to process -Wno-error=... and therefore throughing compilation errors Modified: M configure.ac M debian/rules === modified file 'configure.ac' --- configure.ac 2010-05-28 09:55:32 +0000 +++ configure.ac 2010-05-28 11:25:28 +0000 @@ -76,10 +76,6 @@ AC_SUBST(AM_CFLAGS, "$AM_CFLAGS -Wno-deprecated-declarations -Wpointer-arith") AC_SUBST(AM_CFLAGS, "$AM_CFLAGS -Wwrite-strings") -# The flags below should be converted into errors once all warnings are fixed. -AC_SUBST(AM_CFLAGS, "$AM_CFLAGS -Wshadow -Wno-error=shadow") -AC_SUBST(AM_CFLAGS, "$AM_CFLAGS -Wcast-qual -Wno-error=cast-qual") -AC_SUBST(AM_CFLAGS, "$AM_CFLAGS -Winline -Wno-error=inline") #TODO fix the code and get rid of this one AC_SUBST(AM_CFLAGS, "$AM_CFLAGS -fno-strict-aliasing") @@ -88,6 +84,21 @@ AC_SUBST(AM_CPPFLAGS, "-D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=500") +# The flags below should be converted into errors once all warnings are fixed. +AC_ARG_ENABLE(gcc-warn, + AS_HELP_STRING([--enable-gcc-warn], + [enables additional compiler warnings (default is YES)]), + [ac_cv_use_gcc_warn=$enableval], + [ac_cv_use_gcc_warn=yes]) +AC_CACHE_CHECK([whether to use gcc-warn], + [ac_cv_use_gcc_warn], + [ac_cv_use_gcc_warn=yes]) +if test x"$ac_cv_use_gcc_warn" = x"yes"; then + AC_SUBST(AM_CFLAGS, "$AM_CFLAGS -Wshadow -Wno-error=shadow") + AC_SUBST(AM_CFLAGS, "$AM_CFLAGS -Wcast-qual -Wno-error=cast-qual") + AC_SUBST(AM_CFLAGS, "$AM_CFLAGS -Winline -Wno-error=inline") +fi + AC_ARG_ENABLE(firewall, AS_HELP_STRING([--enable-firewall], [HIP enabled firewall daemon (default is YES)]), === modified file 'debian/rules' --- debian/rules 2010-05-20 16:14:34 +0000 +++ debian/rules 2010-05-28 11:25:28 +0000 @@ -33,6 +33,7 @@ endif ./configure $(CROSS) --prefix=/usr --sysconfdir=/etc \ --enable-shared \ + --disable-gcc-warn \ --disable-debug