[Spice-commits] 2 commits - configure.ac Makefile.am
Marc-André Lureau
elmarco at kemper.freedesktop.org
Thu Jun 21 02:32:05 PDT 2012
Makefile.am | 12 +++++++++---
configure.ac | 6 ++++++
2 files changed, 15 insertions(+), 3 deletions(-)
New commits:
commit 0bb7ed936354a776cb10582090310efb915911ac
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Thu Jun 21 11:31:45 2012 +0200
Add configure --enable-debug
diff --git a/Makefile.am b/Makefile.am
index f954a8c..ed602f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,7 +8,10 @@ INCLUDES = \
AM_CXXFLAGS = -flto -fwhole-program
AM_CPPFLAGS = -DUNICODE -D_UNICODE -DOLDMSVCRT
-AM_LDFLAGS = -static -s
+AM_LDFLAGS = -static
+if !ENABLE_DEBUG
+AM_LDFLAGS += -s
+endif
# -lversion is needed for the GetFileVersion* API which is used by vdlog.cpp
LIBS = -lversion
diff --git a/configure.ac b/configure.ac
index 0b5f498..af25a99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,11 @@ AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_CHECK_TOOL(WINDRES, [windres])
+AC_ARG_ENABLE([debug],
+ AS_HELP_STRING([--enable-debug], [Enable debugging]))
+
+AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = "xyes"])
+
dnl ---------------------------------------------------------------------------
dnl - Extra verbose warning switches
dnl ---------------------------------------------------------------------------
commit a095f4806e3b75c717a3b8b728c412443ab6d780
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Fri Jun 8 12:30:33 2012 +0200
build-sys: statically build agent
Fix build by default when using mingw (when more compiler are
supported we could do case by case)
Since we are statically building, strip resulting binary (we
also use lto, whole-program but that doesn't seem to change
much..)
diff --git a/Makefile.am b/Makefile.am
index 5f0c9dc..f954a8c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,15 +6,18 @@ INCLUDES = \
-I$(top_srcdir)/spice-protocol \
$(NULL)
-AM_CPPFLAGS = -DUNICODE -D_UNICODE
+AM_CXXFLAGS = -flto -fwhole-program
+AM_CPPFLAGS = -DUNICODE -D_UNICODE -DOLDMSVCRT
+AM_LDFLAGS = -static -s
+
# -lversion is needed for the GetFileVersion* API which is used by vdlog.cpp
LIBS = -lversion
bin_PROGRAMS = vdagent vdservice
vdagent_LDADD = $(CXIMAGE_LIBS) vdagent_rc.$(OBJEXT)
-vdagent_CXXFLAGS = $(CXIMAGE_CFLAGS)
-vdagent_LDFLAGS = -Wl,--subsystem,windows
+vdagent_CXXFLAGS = $(AM_CXXFLAGS) $(CXIMAGE_CFLAGS)
+vdagent_LDFLAGS = $(AM_LDFLAGS) -Wl,--subsystem,windows
vdagent_SOURCES = \
common/vdcommon.h \
common/vdlog.cpp \
diff --git a/configure.ac b/configure.ac
index 597e724..0b5f498 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,7 @@ dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(CXIMAGE, [cximage])
+CXIMAGE_LIBS=`$PKG_CONFIG --static --libs cximage`
dnl ---------------------------------------------------------------------------
dnl - Makefiles, etc.
More information about the Spice-commits
mailing list