aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.ac
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-06-01 18:20:18 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-06-01 18:20:18 +0000
commita68ffae9e6c0accaa925972ec9d222f4e3340339 (patch)
treecbd97af5c95c1c8279b669f94e0f2b1253f1d518 /gdb/configure.ac
parent89dc0afdc93f3688377cab4c5ddae1630e8d50eb (diff)
downloadgdb-a68ffae9e6c0accaa925972ec9d222f4e3340339.zip
gdb-a68ffae9e6c0accaa925972ec9d222f4e3340339.tar.gz
gdb-a68ffae9e6c0accaa925972ec9d222f4e3340339.tar.bz2
gdb/
* configure.ac (development): Define new variable. Call AC_CHECK_LIB for mcheck if $development. (ERROR_ON_WARNING): Enable it by default only if $development. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'gdb/configure.ac')
-rw-r--r--gdb/configure.ac14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/configure.ac b/gdb/configure.ac
index d7409d0..5ae3a6b 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -18,6 +18,11 @@ dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl Process this file with autoconf to produce a configure script.
+dnl Provide more thorough testing by -lmcheck.
+dnl Set it to 'true' for development snapshots, 'false' for releases or
+dnl pre-releases.
+development=true
+
AC_PREREQ(2.59)dnl
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config.in)
@@ -640,6 +645,11 @@ 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
+ AC_CHECK_LIB(mcheck, main)
+fi
+
# Generate jit-reader.h
# This is typedeffed to GDB_CORE_ADDR in jit-reader.h
@@ -1822,8 +1832,8 @@ AC_ARG_ENABLE(werror,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-werror) ;;
esac])
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+# Enable -Werror by default when using gcc. Turn it off for releases.
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
ERROR_ON_WARNING=yes
fi