* configure.in (AC_DEBUG): add test
* acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG, or NDEBUG according to its value.
This commit is contained in:
parent
d7b935b645
commit
e2e59d3e49
3 changed files with 28 additions and 0 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
|
2006-11-16 Jochen Küpper <jochen@fhi-berlin.mpg.de>
|
||||||
|
|
||||||
|
* configure.in (AC_DEBUG): add test
|
||||||
|
|
||||||
|
* acinclude.m4 (AC_DEBUG): Define debug-feature and set DEBUG, NODEBUG,
|
||||||
|
or NDEBUG according to its value.
|
||||||
|
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* coding: iso-8859-1
|
* coding: iso-8859-1
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,29 @@ AC_DEFUN([AC_APPLICATIONS],[dnl
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# AC_DEBUG()
|
||||||
|
#
|
||||||
|
# Check for commandline options requesting DEBUG feature.
|
||||||
|
# Might define DEBUG, NODEBUG, or NDEBUG, depending on flags given.
|
||||||
|
AC_DEFUN([AC_DEBUG],[dnl
|
||||||
|
AC_ARG_ENABLE([debug],
|
||||||
|
AC_HELP_STRING([--enable-debug], [include debugging code (default=no)]),
|
||||||
|
[ case "${enableval}" in
|
||||||
|
yes) debug=true ;;
|
||||||
|
no) debug=false ;;
|
||||||
|
*) AC_MSG_ERROR(bad value ${enableval} for debug option) ;;
|
||||||
|
esac],
|
||||||
|
[debug=false])
|
||||||
|
if test "$debug" = true; then
|
||||||
|
AC_DEFINE([DEBUG], true, [Debugging flag])
|
||||||
|
else
|
||||||
|
AC_DEFINE([NDEBUG], true, [no debugging])
|
||||||
|
AC_DEFINE([NODEBUG], true, [no debugging])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# AC_GNUPLOT()
|
# AC_GNUPLOT()
|
||||||
#
|
#
|
||||||
# Compile applications unless user requests not to do it.
|
# Compile applications unless user requests not to do it.
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ AC_CHECK_LIB(m, cos)
|
||||||
|
|
||||||
dnl user-switches
|
dnl user-switches
|
||||||
AC_APPLICATIONS
|
AC_APPLICATIONS
|
||||||
|
AC_DEBUG
|
||||||
AC_GNUPLOT
|
AC_GNUPLOT
|
||||||
AC_TUTORIAL
|
AC_TUTORIAL
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue