summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-06-21 11:31:45 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-06-21 11:31:45 +0200
commit0bb7ed936354a776cb10582090310efb915911ac (patch)
tree7988625888c801b053a83925f20f627951ab8a69
parenta095f4806e3b75c717a3b8b728c412443ab6d780 (diff)
Add configure --enable-debug
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac5
2 files changed, 9 insertions, 1 deletions
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 ---------------------------------------------------------------------------