* m4/debug.m4, m4/devel.m4, m4/gccoptim.m4, m4/ndebug.m4: New files.

* Makefile.am (EXTRA_DIST): Add them.
* configure.ac: Call adl_ENABLE_DEVEL, adl_ENABLE_DEBUG, ad_GCC_OPTIM,
and adl_NDEBUG.
This commit is contained in:
Alexandre Duret-Lutz 2003-10-01 11:44:57 +00:00
parent 2e97e6447b
commit e5641f5b69
7 changed files with 98 additions and 3 deletions

20
m4/debug.m4 Normal file
View file

@ -0,0 +1,20 @@
AC_DEFUN([adl_ENABLE_DEBUG],
[AC_ARG_ENABLE([debug],
[AC_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"
fi
;;
no)
;;
*)
if test "${ac_cv_prog_cc_g}" = yes; then
CFLAGS="$CFLAGS -g"
fi
;;
esac])