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