diff options
author | Joel Brobecker <brobecker@gnat.com> | 2012-07-25 18:27:11 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2012-07-25 18:27:11 +0000 |
commit | a22d44ff78d262f07f777bc57098574da5afb827 (patch) | |
tree | 86db22ca03c6ad31cea85ca3b2b67037dcb35993 /gdb/configure.ac | |
parent | d6b289409bc58646f2a8ca2744e78fbee349497e (diff) | |
download | gdb-a22d44ff78d262f07f777bc57098574da5afb827.zip gdb-a22d44ff78d262f07f777bc57098574da5afb827.tar.gz gdb-a22d44ff78d262f07f777bc57098574da5afb827.tar.bz2 |
Add support for --enable-lmcheck configure option.
This allows the user to enable this option at configure time if building
a release, or to disable it if building a snapshot.
gdb/ChangeLog:
* configure.ac: Add --enable-lmcheck configure option.
* configure: Regenerate.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r-- | gdb/configure.ac | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac index f3d75b1..b33de61 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -645,8 +645,25 @@ AC_SUBST(READLINE_DEPS) AC_SUBST(READLINE_CFLAGS) AC_SUBST(READLINE_TEXI_INCFLAG) -dnl -lmcheck provides cheap enough memory mangling for debugging purposes. -if $development; then +# Provide a --enable-libmcheck/--disable-libmcheck set of options +# allowing a user to enable this option even when building releases, +# or to disable it when building a snapshot. +AC_ARG_ENABLE(libmcheck, + AS_HELP_STRING([--enable-libmcheck], + [Try building GDB with -lmcheck if available]), + [case "${enableval}" in + yes | y) ENABLE_LIBMCHECK="yes" ;; + no | n) ENABLE_LIBMCHECK="no" ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-libmcheck) ;; + esac]) + +# Enable -lmcheck by default (it provides cheap-enough memory mangling), +# but turn it off for releases. +if test -z "${ENABLE_LIBMCHECK}" && $development; then + ENABLE_LIBMCHECK=yes +fi + +if test "$ENABLE_LIBMCHECK" = "yes" ; then AC_CHECK_LIB(mcheck, main) fi |