diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 3043e7e..11a6a85 100644 --- a/configure.ac +++ b/configure.ac @@ -162,6 +162,11 @@ fi AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [compile with debugging support [default=no]]), [], [enable_debug=no]) +AC_ARG_WITH(gobject-leak-tracker, + AS_HELP_STRING([--with-gobject-leak-tracker], + [track remaining GObject instances at exit (imply --enable-debug and GLib support) [default=no]]), + [], [with_gobject_leak_tracker=no]) + AC_ARG_WITH(local-resources, AS_HELP_STRING([--with-local-resources], [discard resources from local sources [default=yes]]), [], [with_local_resources=yes]) @@ -172,6 +177,10 @@ CFLAGS="$CFLAGS -fshort-enums -D_LARGEFILE64_SOURCE" #--- Is debug mode needed ? +if test "x$with_gobject_leak_tracker" = "xyes"; then + enable_debug="yes" +fi + if test "x$enable_debug" = "xyes"; then DEBUG_CFLAGS="$DEBUG_CFLAGS -O0 -ggdb -gdwarf-2 -DDEBUG" else @@ -180,6 +189,13 @@ fi AC_SUBST(DEBUG_CFLAGS) +AM_CONDITIONAL([TRACK_GOBJECT_LEAKS], [test "x$with_gobject_leak_tracker" = "xyes"]) + +if test "x$with_gobject_leak_tracker" = "xyes"; then + AC_DEFINE(TRACK_GOBJECT_LEAKS, 1, + [Define to 1 to enable code for dumping remaining GObject instances at exit.]) +fi + #--- Discard local sources when looking for resources ? if test "x$with_local_resources" = "xno"; then |