[gexiv2] Revert "build: Use AX_CHECK_ENABLE_DEBUG"
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gexiv2] Revert "build: Use AX_CHECK_ENABLE_DEBUG"
- Date: Sun, 19 Mar 2017 17:01:29 +0000 (UTC)
commit 4738b4632f70d3882e4333406092e94f8aa4ff04
Author: Jens Georg <mail jensge org>
Date: Sun Mar 19 18:01:05 2017 +0100
Revert "build: Use AX_CHECK_ENABLE_DEBUG"
This reverts commit 23c77b8d8781e3299e5e6bb05a921344454f3b97.
configure.ac | 31 +++++++++--
m4/ax_check_enable_debug.m4 | 124 -------------------------------------------
2 files changed, 25 insertions(+), 130 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f9b10fd..5f61976 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,12 +15,6 @@ AM_INIT_AUTOMAKE([1.11 -Wall no-define foreign dist-xz no-dist-gzip tar-ustar
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
-##############
-# Debug Mode #
-##############
-
-AX_CHECK_ENABLE_DEBUG([no])
-
AM_PROG_AR
LT_PREREQ([2.2])
LT_INIT([disable-static win32-dll])
@@ -100,6 +94,31 @@ PKG_CHECK_MODULES(EXIV2,
,
AC_MSG_ERROR([exiv2 is required. Please install it.]))
+##############
+# Debug Mode #
+##############
+
+AC_MSG_CHECKING([debugging mode])
+AC_ARG_ENABLE(debug,
+ [ --enable-debug enable debug mode [[default=no]]],
+ if eval "test x$enable_debug = xyes"; then
+ DEBUG_CFLAGS="-O0"
+ fi)
+
+if test -n "$DEBUG_CFLAGS"; then
+ AC_MSG_RESULT([yes])
+ if test -z "$CXXFLAGS"; then
+ CXXFLAGS="-O0 -g -pipe -nostdlib -shared"
+ else
+ CXXFLAGS="$DEBUG_CFLAGS $CXXFLAGS"
+ fi
+else
+ AC_MSG_RESULT([no])
+ if test -z "$CXXFLAGS"; then
+ CXXFLAGS="-O2 -g -pipe -nostdlib -shared"
+ fi
+fi
+
#################
# Introspection #
#################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]