Add a new flag: --disable-compiler-flags which disables *all* default

compiler flags.

Originally committed to SVN as r2727.
This commit is contained in:
Amar Takhar 2009-02-10 20:50:28 +00:00
parent 82f91ce1fc
commit 90c6172db9
1 changed files with 17 additions and 13 deletions

View File

@ -203,6 +203,10 @@ CC="$PTHREAD_CC";
###################### ######################
# Check compiler flags # Check compiler flags
###################### ######################
AC_ARG_ENABLE(compiler-flags, [ --disable-compiler-flags
Disable *all* additional compiler flags. (default=no)])
if test "$enable_compiler_flags" != "no"; then
AC_C_FLAG([-Wall]) AC_C_FLAG([-Wall])
AC_C_FLAG([-O2]) AC_C_FLAG([-O2])
AC_C_FLAG([-Wextra],[AC_C_FLAG([-W])]) AC_C_FLAG([-Wextra],[AC_C_FLAG([-W])])
@ -216,7 +220,7 @@ AC_CXX_FLAG([-O2])
AC_CXX_FLAG([-fpermissive]) AC_CXX_FLAG([-fpermissive])
AC_CXX_FLAG([-fno-strict-aliasing]) AC_CXX_FLAG([-fno-strict-aliasing])
AC_CXX_FLAG([-std=c++98]) AC_CXX_FLAG([-std=c++98])
fi
###################################### ######################################
# Check Headers / Features / Libraries # Check Headers / Features / Libraries