1 ## ----------------------------------- ## -*- Autoconf -*-
2 ## Check if --with-dmalloc was given. ##
3 ## From Franc,ois Pinard ##
4 ## ----------------------------------- ##
6 # Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2010,
7 # 2011 Free Software Foundation, Inc.
9 # This file is free software; the Free Software Foundation
10 # gives unlimited permission to copy and/or distribute it,
11 # with or without modifications, as long as this notice is preserved.
15 AC_DEFUN([AM_WITH_DMALLOC],
16 [AC_MSG_CHECKING([if malloc debugging is wanted])
17 AC_ARG_WITH([dmalloc],
18 [AS_HELP_STRING([--with-dmalloc],
19 [use dmalloc, as in http://www.dmalloc.com])],
20 [if test "$withval" = yes; then
22 AC_DEFINE([WITH_DMALLOC], [1],
23 [Define if using the dmalloc debugging malloc package])
24 LIBS="$LIBS -ldmalloc"
28 fi], [AC_MSG_RESULT([no])])
31 AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])