[gnome-boxes] Add --debug configure option to set Vala & C debug flags
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Add --debug configure option to set Vala & C debug flags
- Date: Tue, 3 Jul 2012 02:22:11 +0000 (UTC)
commit d732b9420e7e8a0844a5c10859779b4f914efca6
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Jul 3 03:47:57 2012 +0300
Add --debug configure option to set Vala & C debug flags
https://bugzilla.gnome.org/show_bug.cgi?id=679293
autogen.sh | 2 +-
configure.ac | 11 +++++++++++
src/Makefile.am | 1 +
3 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 33aca92..a9d2730 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,5 +9,5 @@ autoreconf -v --force --install
intltoolize -f
if [ -z "$NOCONFIGURE" ]; then
- "$srcdir"/configure --enable-maintainer-mode --enable-vala ${1+"$@"}
+ "$srcdir"/configure --enable-maintainer-mode --enable-vala --enable-debug ${1+"$@"}
fi
diff --git a/configure.ac b/configure.ac
index 6853ebc..829100f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,6 +96,17 @@ AC_ARG_ENABLE([strict-cc],
AS_IF([test "x$enable_strict_cc" = "xyes"], [CFLAGS="$CFLAGS -Wall -Werror"],
[CFLAGS="$CFLAGS -w"])
+dnl Debugging
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug],[enable debugging]),,
+ enable_debug=no)
+if test "x$enable_debug" = "xyes"; then
+ CFLAGS="$CFLAGS -O0 -ggdb3"
+ VALA_DEBUG_FLAGS="-g"
+fi
+
+AC_SUBST(VALA_DEBUG_FLAGS)
+
dnl Distribute logos?
AC_ARG_ENABLE([logos],
AS_HELP_STRING([--enable-logos],
diff --git a/src/Makefile.am b/src/Makefile.am
index cdeb9b0..324179c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,6 +27,7 @@ AM_VALAFLAGS = \
--pkg posix \
--pkg spice-client-gtk-3.0 \
--pkg tracker-sparql-0.14 \
+ $(VALA_DEBUG_FLAGS) \
$(NULL)
bin_PROGRAMS = gnome-boxes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]