summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTushar Gohad <tushar.gohad@intel.com>2014-07-17 20:57:54 -0700
committerTushar Gohad <tushar.gohad@intel.com>2014-07-17 20:57:54 -0700
commita21e6e1a794cac5e9b353b0b0f8009f6a3295e26 (patch)
tree77988f87400544663dc20cbcb69c89b33c2e38c3 /configure.ac
parentf033e1c74201648e7b1de7b9a63a184e76bc14f4 (diff)
downloadliberasurecode-a21e6e1a794cac5e9b353b0b0f8009f6a3295e26.tar.gz
Fix --enable-debug target, make debug CFLAGS consistent (global)
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 15 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index e60052e..c64eeb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,17 +49,22 @@ AC_CHECK_LIB([gf_complete], [gf_init_easy],
AM_CONDITIONAL([GF_COMPLETE_INSTALLED], [false])
])
-
-AC_ARG_ENABLE(debug,
-AS_HELP_STRING([--enable-debug],
- [enable debugging, default: no]),
+AC_ARG_ENABLE([debug],
+[ --enable-debug Turn on debugging],
[case "${enableval}" in
- yes) debug=true ;;
- no) debug=false ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
-esac],
-[debug=false])
-AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
+ yes) debug=true ;;
+ no) debug=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
+esac],[debug=false])
+if test x$debug = xtrue ; then
+ DEBUG=1
+ CXXFLAGS=""
+ CFLAGS="-O0 -ggdb -g3 -Werror -D_GNU_SOURCE=1"
+else
+ DEBUG=0
+ CXXFLAGS=""
+ CFLAGS="-O2 -g -Werror -D_GNU_SOURCE=1"
+fi
dnl Expand the sources and objects needed to build the library
AC_SUBST(ac_aux_dir)