Fix --enable-debug target, make debug CFLAGS consistent (global)
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
This commit is contained in:
parent
f033e1c742
commit
a21e6e1a79
|
@ -4,12 +4,6 @@ ACLOCAL_AMFLAGS = -I m4
|
|||
SUBDIRS = src test
|
||||
EXTRA_DIST = autogen.sh
|
||||
|
||||
if DEBUG
|
||||
AM_CFLAGS = -g3 -O0 -D_GNU_SOURCE=1 -Werror
|
||||
else
|
||||
AM_CFLAGS = -O2 -D_GNU_SOURCE=1 -Werror
|
||||
endif
|
||||
|
||||
INCLUDE = -I$(abs_top_builddir)/include \
|
||||
-I$(abs_top_builddir)/include/erasurecode \
|
||||
-I$(abs_top_builddir)/include/xor_codes
|
||||
|
@ -17,7 +11,7 @@ INCLUDE = -I$(abs_top_builddir)/include \
|
|||
AM_CPPFLAGS = $(CPPFLAGS) $(INCLUDE)
|
||||
AM_CPPFLAGS += -Werror
|
||||
|
||||
AM_CFLAGS += -fPIC $(AM_CPPFLAGS) -L/usr/local/lib
|
||||
AM_CFLAGS = -fPIC $(AM_CPPFLAGS) -L/usr/local/lib
|
||||
|
||||
include_HEADERS = \
|
||||
include/erasurecode/alg_sig.h \
|
||||
|
|
25
configure.ac
25
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)
|
||||
|
|
Loading…
Reference in New Issue