configure: add ABIGAIL_DEBUG options

When exporting ABIGAIL_DEBUG=1, the binaries compiled are especially
suitable for debugging. The CFLAGS and CXXFLAGS that are added reduce
optimization to a reasonable amount and increase debug information levels.

	* configure.ac: add ABIGAIL_DEBUG environment variable for
	improved debugging capabilities

Signed-off-by: Matthias Maennich <maennich@google.com>
This commit is contained in:
Matthias Maennich 2020-05-15 11:19:55 +02:00 committed by Dodji Seketeli
parent 38504ab66c
commit 6c23841d98

View File

@ -621,6 +621,11 @@ if test x$ABIGAIL_DEVEL != x; then
CXXFLAGS="-g -Wall -Wextra -Werror"
fi
if test x$ABIGAIL_DEBUG != x; then
CFLAGS="$CFLAGS -Og -g3 -ggdb"
CXXFLAGS="$CXXFLAGS -Og -g3 -ggdb"
fi
if test x$ENABLE_ASAN = xyes; then
CFLAGS="$CFLAGS -fsanitize=address"
CXXFLAGS="$CXXFLAGS -fsanitize=address"