Allow configure to override assertion settings, but by default this comes from the build optimization level.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404405
This commit is contained in:
parent
34ea846ca1
commit
803375d590
9 changed files with 25 additions and 45 deletions
43
configure.in
43
configure.in
|
@ -137,28 +137,27 @@ AC_C_VOLATILE
|
|||
dnl See whether we want assertions for debugging/sanity checking SDL itself.
|
||||
AC_ARG_ENABLE(assertions,
|
||||
AC_HELP_STRING([--enable-assertions],
|
||||
[Enable internal sanity checks (yes/no/release/paranoid) [[default=release]]]),
|
||||
, enable_assertions=release)
|
||||
sdl_valid_assertion_level=no
|
||||
if test x$enable_assertions = xno; then
|
||||
sdl_valid_assertion_level=yes
|
||||
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 0)
|
||||
fi
|
||||
if test x$enable_assertions = xrelease; then
|
||||
sdl_valid_assertion_level=yes
|
||||
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 1)
|
||||
fi
|
||||
if test x$enable_assertions = xyes; then
|
||||
sdl_valid_assertion_level=yes
|
||||
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 2)
|
||||
fi
|
||||
if test x$enable_assertions = xparanoid; then
|
||||
sdl_valid_assertion_level=yes
|
||||
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 3)
|
||||
fi
|
||||
if test x$sdl_valid_assertion_level = xno; then
|
||||
AC_MSG_ERROR([*** unknown assertion level. stop.])
|
||||
fi
|
||||
[Enable internal sanity checks (auto/disabled/release/enabled/paranoid) [[default=auto]]]),
|
||||
, enable_assertions=auto)
|
||||
case "$enable_assertions" in
|
||||
auto) # Use optimization settings to determine assertion level
|
||||
;;
|
||||
disabled)
|
||||
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 0)
|
||||
;;
|
||||
release)
|
||||
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 1)
|
||||
;;
|
||||
enabled)
|
||||
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 2)
|
||||
;;
|
||||
paranoid)
|
||||
AC_DEFINE(SDL_DEFAULT_ASSERT_LEVEL, 3)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([*** unknown assertion level. stop.])
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl See whether we can use gcc style dependency tracking
|
||||
AC_ARG_ENABLE(dependency-tracking,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue