From 0bdeb409207ddef32548eb0e6e9b87fb41fcb969 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 21 Aug 2003 04:38:27 +0000 Subject: [PATCH] Add --enable-poisoning option, and make it default to off in normal releases, on in ./autogen.sh configuration. Add ... Original commit message from CVS: Add --enable-poisoning option, and make it default to off in normal releases, on in ./autogen.sh configuration. Add automake17 as a possible automake name. --- autogen.sh | 4 ++-- configure.ac | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index f8f8c96e47..9fb56443e0 100755 --- a/autogen.sh +++ b/autogen.sh @@ -19,7 +19,7 @@ then fi . common/gst-autogen.sh -CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-failing-tests' +CONFIGURE_DEF_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-failing-tests --enable-poisoning' autogen_options $@ @@ -27,7 +27,7 @@ echo -n "+ check for build tools" if test ! -z "$NOCHECK"; then echo ": skipped version checks"; else echo; fi version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autoconf-2.52" \ "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1 -version_check "automake" "$AUTOMAKE automake automake-1.7 automake-1.6" \ +version_check "automake" "$AUTOMAKE automake automake-1.7 automake17 automake-1.6" \ "ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1 version_check "libtoolize" "libtoolize libtoolize14" \ "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1 diff --git a/configure.ac b/configure.ac index d755ddc376..d9fc0ba2a0 100644 --- a/configure.ac +++ b/configure.ac @@ -336,6 +336,16 @@ esac], [BUILD_EXAMPLES=yes]) dnl Default value AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes") +dnl poison destroyed objects +AC_ARG_ENABLE(poisoning, +AC_HELP_STRING([--enable-poisoning],[enable poisoning of deallocated objects]), +[case "${enableval}" in + yes) USE_POISONING=yes ;; + no) USE_POISONING=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-poisoning) ;; +esac], +[USE_POISONING=no]) dnl Default value + dnl Next, check for the optional components: dnl ======================================== @@ -394,6 +404,10 @@ if test "x$USE_FAST_STACK_TRASH" = xyes; then AC_DEFINE(USE_FAST_STACK_TRASH, 1, [Define if we should use i586 optimized stack functions]) fi +if test "x$USE_POISONING" = xyes; then + AC_DEFINE(USE_POISONING, 1, [Define if we should poison deallocated memory]) +fi + dnl test if we have pthread_attr_setstack; if not use the older calls AC_CHECK_LIB(pthread, pthread_attr_setstack, AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACK, 1,