Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fun.git;a=commitdiff;h=eee174a0e5bed27395f3c4dad507498f30ce6927
commit eee174a0e5bed27395f3c4dad507498f30ce6927 Author: crazy <[email protected]> Date: Wed Mar 11 14:39:06 2009 +0100 configure.ac: Added strict compiler flags and -std=c99 to CFLAGS by default diff --git a/configure.ac b/configure.ac index 92bfaf3..cd065e6 100644 --- a/configure.ac +++ b/configure.ac @@ -38,6 +38,29 @@ else AC_MSG_RESULT(no) fi +dnl Build with strict +AC_ARG_ENABLE(strict, + AC_HELP_STRING([ --enable-strict], [Enable building with 'Strict' flags]), + [strict=$enableval], [strict=no]) + +dnl Enable or disable building with 'strict' flags +AC_MSG_CHECKING(for building with 'strict' flags) +if test x$strict = xyes ; then + CFLAGS="$CFLAGS -Wextra -Wall -pedantic -Wshadow \ + -Wmissing-declarations -Wpointer-arith -Wcast-align \ + -Wfloat-equal -Wstrict-prototypes -Wmissing-prototypes \ + -Wredundant-decls -Wunused-variable -Wunused-parameter \ + -Wparentheses -Wno-long-long -Wwrite-strings -Wimplicit \ + -Wnested-externs -Wno-unused -Wundef -Wpacked \ + -Wbad-function-cast -Wunused-function -Wunused-label \ + -Wunused-value -Wfloat-equal -Wchar-subscripts -Wswitch \ + -Wmissing-braces -Wsequence-point -Wunknown-pragmas \ + -Wdeclaration-after-statement -Wsign-compare" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + dnl Check if debug is enabled AC_MSG_CHECKING(for debug support) if test "x$debug" = "xyes" ; then @@ -73,7 +96,7 @@ fi AC_SUBST(DBUS_SYS_DIR) -CFLAGS="${CFLAGS}" +CFLAGS="${CFLAGS} -std=c99" dnl ========================================================================== @@ -99,4 +122,6 @@ FUN $VERSION configuration summary: compiler flags : ${CFLAGS} debug support : ${debug} werror support : ${werror} + strict flags : ${strict} + " _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
