dmalloc.m4 906 B

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