diff options
Diffstat (limited to 'recipes/lesstif/files/ac_debug.m4.diff')
-rw-r--r-- | recipes/lesstif/files/ac_debug.m4.diff | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/recipes/lesstif/files/ac_debug.m4.diff b/recipes/lesstif/files/ac_debug.m4.diff new file mode 100644 index 0000000000..3fe6e8357d --- /dev/null +++ b/recipes/lesstif/files/ac_debug.m4.diff @@ -0,0 +1,95 @@ +Index: lesstif2-0.95.0/ac_debug.m4 +=================================================================== +--- lesstif2-0.95.0.orig/ac_debug.m4 2004-02-01 16:49:40.000000000 +0100 ++++ lesstif2-0.95.0/ac_debug.m4 2006-07-11 11:11:36.000000000 +0200 +@@ -4,6 +4,90 @@ + dnl Source code which depends on this is mostly in + dnl DebugUtil.c/.h + dnl ++AC_DEFUN(LT_WITH_DMALLOC, ++[AC_MSG_CHECKING(if malloc debugging is wanted) ++AC_ARG_WITH(dmalloc, ++[ --with-dmalloc[=path] use dmalloc, see INSTALL(.html) for reference], ++[if test "$withval" = no; then ++ AC_MSG_RESULT(no) ++else ++dnl We overwrite the variables since we won't continue in ++dnl case of an error! ++dnl We modify CFLAGS, and also link libs (LDFLAGS) and programs (LIBS) ++ if test "$withval" != yes; then ++dnl a path was given ++ CFLAGS="$CFLAGS -I$withval/include -DDMALLOC_FUNC_CHECK" ++ ++ LDFLAGS="$LDFLAGS -L$withval/lib -ldmalloc" ++ LIBS="$LIBS -L$withval/lib -ldmalloc" ++ else ++dnl no path was given ++ CFLAGS="$CFLAGS -DDMALLOC_FUNC_CHECK" ++ LDFLAGS="$LDFLAGS -ldmalloc" ++ LIBS="$LIBS -ldmalloc" ++ fi ++ AC_TRY_LINK( ++ [#include <dmalloc.h>], ++ [char *ptr; ++ ptr=malloc(1); ++ free(ptr); ++ ], ++ [AC_DEFINE(WITH_DMALLOC,1, ++ [Define if using the dmalloc debugging malloc package]) ++ AC_MSG_RESULT(Using dmalloc)], ++ AC_MSG_ERROR(dmalloc not found) ++ ) ++fi], ++[AC_MSG_RESULT(no)]) ++]) ++ ++ ++dnl ++dnl Enable another malloc checker for debugging purposes ++dnl Source code which depends on this is mostly in ++dnl DebugUtil.c/.h ++dnl ++AC_DEFUN(LT_WITH_DBMALLOC, ++[AC_MSG_CHECKING(if malloc debugging is wanted) ++AC_ARG_WITH(dbmalloc, ++[ --with-dbmalloc[=path] use dbmalloc, see INSTALL(.html) for reference], ++[if test "$withval" = no; then ++ AC_MSG_RESULT(no) ++else ++dnl We overwrite the variables since we won't continue in ++dnl case of an error! ++dnl We modify CFLAGS, and also link libs (LDFLAGS) and programs (LIBS) ++ if test "$withval" != yes; then ++dnl a path was given ++ CFLAGS="$CFLAGS -I$withval/include" ++ ++ LDFLAGS="$LDFLAGS -L$withval/lib -ldbmalloc" ++ LIBS="$LIBS -L$withval/lib -ldbmalloc" ++ else ++dnl no path was given ++ LDFLAGS="$LDFLAGS -ldbmalloc" ++ LIBS="$LIBS -ldbmalloc" ++ fi ++ AC_TRY_LINK( ++ [#include <dbmalloc.h>], ++ [char *ptr; ++ ptr=malloc(1); ++ free(ptr); ++ ], ++ [AC_DEFINE(WITH_DBMALLOC,1, ++ [Define if using the dbmalloc debugging malloc package]) ++ AC_MSG_RESULT(Using dbmalloc)], ++ AC_MSG_ERROR(dbmalloc not found) ++ ) ++fi], ++[AC_MSG_RESULT(no)]) ++]) ++dnl ++dnl Enable malloc checker for debugging purposes ++dnl See http://dmalloc.com, INSTALL(.html) for references to this. ++dnl Source code which depends on this is mostly in ++dnl DebugUtil.c/.h ++dnl + AC_DEFUN([LT_WITH_DMALLOC], + [AC_MSG_CHECKING(if malloc debugging is wanted) + AC_ARG_WITH(dmalloc, |