spot/m4/debug.m4
Alexandre Duret-Lutz e076645382 update obsolete autoconf constructs
Part of #447.

* configure.ac, m4/debug.m4, m4/devel.m4, m4/gccoptim.m4,
m4/ndebug.m4: Replace AC_ERROR and AC_HELP_STRING by
by AC_MSG_ERROR and AS_HELP_STRING.
2021-01-14 15:15:39 +01:00

22 lines
619 B
Text

AC_DEFUN([adl_ENABLE_DEBUG],
[AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],[enable debugging symbols])])
case "${enable_debug}" in
yes)
AC_DEFINE([DEBUG],1,[Define if you want debugging code.])
# We used to use -ggdb3 when supported, but not all tools
# are able to grok the resulting debug infos.
if test "${ac_cv_prog_cc_g}" = yes; then
CFLAGS="$CFLAGS -g"
CXXFLAGS="$CXXFLAGS -g"
fi
;;
no)
;;
*)
if test "${ac_cv_prog_cc_g}" = yes; then
CFLAGS="$CFLAGS -g"
CXXFLAGS="$CXXFLAGS -g"
fi
;;
esac])