-dnl Debugging
-dnl ---------
-
-UNWINDLIBS=
-AC_ARG_ENABLE(gc-debug,
-[AC_HELP_STRING([--enable-gc-debug],
- [include full support for pointer backtracing etc.])],
-[ if test "$enable_gc_debug" = "yes"; then
- AC_MSG_WARN("Should define GC_DEBUG and use debug alloc. in clients.")
- AC_DEFINE([KEEP_BACK_PTRS], 1, [keep back ptrs])
- AC_DEFINE([DBG_HDRS_ALL], 1, [dbg hdrs all])
- case $host in
- ia64-*-linux* )
- AC_DEFINE([MAKE_BACK_GRAPH], 1, [make back graph])
- AC_DEFINE([SAVE_CALL_COUNT], 8, [save call count])
- AC_CHECK_LIB(unwind, backtrace, [
- AC_DEFINE([GC_HAVE_BUILTIN_BACKTRACE], 1, [have builtin backtrace])
- UNWINDLIBS=-lunwind
- AC_MSG_WARN("Client code may need to link against libunwind.")
- ])
- ;;
- x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
- AC_DEFINE([MAKE_BACK_GRAPH], 1, [make back graph])
- AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
- AC_DEFINE([SAVE_CALL_COUNT], 8, [save call count])
- ;;
- i[3456]86-*-dgux*)
- AC_DEFINE([MAKE_BACK_GRAPH], 1, [make back graph])
- ;;
- esac ]
- fi)
-