|
From: <sv...@va...> - 2011-05-15 17:05:47
|
Author: bart Date: 2011-05-15 18:05:36 +0100 (Sun, 15 May 2011) New Revision: 11757 Log: Added configure tests for the compiler flags -Wno-nonnull and -Wno-overflow. Modified: trunk/configure.in Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2011-05-15 16:45:42 UTC (rev 11756) +++ trunk/configure.in 2011-05-15 17:05:36 UTC (rev 11757) @@ -1282,6 +1282,52 @@ CFLAGS=$safe_CFLAGS +# does this compiler support -Wno-nonnull ? + +AC_MSG_CHECKING([if gcc accepts -Wno-nonnull]) + +safe_CFLAGS=$CFLAGS +CFLAGS="-Wno-nonnull" + +AC_TRY_COMPILE( +[ ], +[ + return 0; +], +[ +AC_SUBST([FLAG_W_NO_NONNULL], [-Wno-nonnull]) +AC_MSG_RESULT([yes]) +], +[ +AC_SUBST([FLAG_W_NO_NONNULL], []) +AC_MSG_RESULT([no]) +]) +CFLAGS=$safe_CFLAGS + + +# does this compiler support -Wno-overflow ? + +AC_MSG_CHECKING([if gcc accepts -Wno-overflow]) + +safe_CFLAGS=$CFLAGS +CFLAGS="-Wno-overflow" + +AC_TRY_COMPILE( +[ ], +[ + return 0; +], +[ +AC_SUBST([FLAG_W_NO_OVERFLOW], [-Wno-overflow]) +AC_MSG_RESULT([yes]) +], +[ +AC_SUBST([FLAG_W_NO_OVERFLOW], []) +AC_MSG_RESULT([no]) +]) +CFLAGS=$safe_CFLAGS + + # does this compiler support -Wno-uninitialized ? AC_MSG_CHECKING([if gcc accepts -Wno-uninitialized]) |