Install msysDTK-1.0.1
[msysgit.git] / share / aclocal-1.7 / dmalloc.m4
blobce96de4d35cea32511ec47d8e0808a432a5c5070
1 ## ----------------------------------- ##
2 ## Check if --with-dmalloc was given.  ##
3 ## From Franc,ois Pinard               ##
4 ## ----------------------------------- ##
6 # Copyright 1996, 1998, 1999, 2000, 2001, 2002  Free Software Foundation, Inc.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 # 02111-1307, USA.
23 # serial 2
25 AC_DEFUN([AM_WITH_DMALLOC],
26 [AC_MSG_CHECKING([if malloc debugging is wanted])
27 AC_ARG_WITH(dmalloc,
28 [  --with-dmalloc          use dmalloc, as in
29                           http://www.dmalloc.com/dmalloc.tar.gz],
30 [if test "$withval" = yes; then
31   AC_MSG_RESULT(yes)
32   AC_DEFINE(WITH_DMALLOC,1,
33             [Define if using the dmalloc debugging malloc package])
34   LIBS="$LIBS -ldmalloc"
35   LDFLAGS="$LDFLAGS -g"
36 else
37   AC_MSG_RESULT(no)
38 fi], [AC_MSG_RESULT(no)])
41 AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])