From 285025fd76476cc152f9392f83df0412076fb22c Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Fri, 16 May 2008 12:53:33 +0000 Subject: [PATCH] Add STL assertions to debug builds. --- stepmania/configure.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/stepmania/configure.ac b/stepmania/configure.ac index b067f34dbd..7fcc1982dd 100644 --- a/stepmania/configure.ac +++ b/stepmania/configure.ac @@ -58,11 +58,19 @@ CFLAGS="$CFLAGS $sc_option" CXXFLAGS="$CXXFLAGS $sc_option" AC_LANG_POP([C]) +AC_CHECK_HEADERS([sys/param.h]) + +if test x$with_debug = xyes; then + AC_LANG_PUSH([C++]) + AC_CHECK_HEADER([debug/debug.h],[ + AC_DEFINE([_GLIBCXX_DEBUG],1,[STL debug]) + AC_DEFINE([_GLIBCXX_DEBUG_PEDANTIC],1,[STL pedantic debug])]) + AC_LANG_POP([C++]) +fi + # Define UNIX for all Unix-like systems. Don't define it for cross-compiling to # non-Unix-like systems. (-DUNIX selects the archutils and ArchHooks to use; if # your platform doesn't use the Unix ones, you probably don't want to define UNIX.) - -AC_CHECK_HEADERS([sys/param.h]) case $host_os in *linux*) AC_DEFINE(LINUX, 1, [Linux])