Index: configure.in =================================================================== --- configure.in (revision 65) +++ configure.in (working copy) @@ -31,6 +31,12 @@ [with_r2test=no]) AM_CONDITIONAL([WANT_R2TEST], [test "x$with_r2test" != xno]) +AC_ARG_WITH([trace-stacks], [AS_HELP_STRING([--with-trace-stacks], + [enable r2's stacks debugging.])], + [], + [with_tracestacks=no]) +AM_CONDITIONAL([WANT_OR2_TRACE_STACKS], [test "x$with_tracestacks" != xno]) + AC_PATH_PROGS(svnversioncommand,svnversion) if [test "x$svnversioncommand" = "x"] Index: src/Makefile.am =================================================================== --- src/Makefile.am (revision 65) +++ src/Makefile.am (working copy) @@ -20,6 +20,10 @@ INCLUDES = -Iopenr2 LIBS = -lm +if WANT_OR2_TRACE_STACKS +AM_CFLAGS := -DOR2_TRACE_STACKS +endif + if HAVE_SVNVERSION SVNDEF := -DREVISION=\"$(shell svnversion -n .)\" AM_CFLAGS := -ggdb3 -O0 -Wall -Werror $(SVNDEF)