build: Only pass -g when debugging is enabled
authorJens Georg <mail@jensge.org>
Sat, 22 Oct 2011 06:43:49 +0000 (08:43 +0200)
committerJens Georg <mail@jensge.org>
Sat, 22 Oct 2011 06:45:24 +0000 (08:45 +0200)
common.am
configure.ac

index 8d114eb..7f99e9e 100644 (file)
--- a/common.am
+++ b/common.am
@@ -47,7 +47,8 @@ RYGEL_COMMON_PLUGIN_VALAFLAGS = \
 RYGEL_COMMON_VALAFLAGS = \
        --pkg rygel-build-config --pkg gupnp-1.0 \
        --vapidir=$(rygeldir) \
-       --pkg gupnp-av-1.0 --pkg gee-1.0 -g
+       --pkg gupnp-av-1.0 --pkg gee-1.0 \
+       $(RYGEL_DEBUG_VALAFLAGS)
 
 RYGEL_PLUGIN_LINKER_FLAGS = -shared -fPIC -module -avoid-version
 
index 3d60160..ea09712 100644 (file)
@@ -104,8 +104,11 @@ AC_ARG_ENABLE(debug,
         enable_debug=no)
 if test "x$enable_debug" = "xyes"; then
         CFLAGS="$CFLAGS -O0 -g"
+        RYGEL_DEBUG_VALAFLAGS="-g"
 fi
 
+AC_SUBST(RYGEL_DEBUG_VALAFLAGS)
+
 dnl Strict compiler
 AC_ARG_ENABLE(strict-cc,
        AS_HELP_STRING([--enable-strict-cc],[enable strict C compiler]),,