diff options
author | Dan McGee <dan@archlinux.org> | 2007-10-26 20:31:25 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-10-26 20:31:25 -0500 |
commit | a8731ff2f7be564b745a4447df9c2157c5ee0777 (patch) | |
tree | ac2732cd62fbcbcfb4d995fe14beae049261be21 | |
parent | b38e046621e173a1194eb354e6b8d2525fa60242 (diff) | |
download | pacman-a8731ff2f7be564b745a4447df9c2157c5ee0777.tar.xz |
Fix mcheck detection and usage
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | src/pacman/pacman.c | 4 |
2 files changed, 9 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 96d8f167..4feb9dd1 100644 --- a/configure.ac +++ b/configure.ac @@ -174,7 +174,7 @@ AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_CHECK_FUNCS([getcwd gettimeofday memmove memset mkdir realpath regcomp \ rmdir setenv setlocale sqrt strcasecmp strchr strdup strerror \ - strndup strrchr strsep strstr strverscmp uname mtrace geteuid]) + strndup strrchr strsep strstr strverscmp uname geteuid]) # Enable large file support if available AC_SYS_LARGEFILE @@ -267,20 +267,22 @@ AM_CONDITIONAL(USE_ASCIIDOC, test "x$useasciidoc" = "xyes") # Enable or disable debug code AC_MSG_CHECKING(for debug mode request) if test "x$debug" = "xyes" ; then + AC_MSG_RESULT(yes) AC_DEFINE([PACMAN_DEBUG], , [Enable debug code]) + # Check for mcheck + AC_CHECK_HEADERS([mcheck.h]) + CFLAGS="$CFLAGS -g -Wall -Werror -fstack-protector-all -std=c99" - LDFLAGS="$LDFLAGS -lmcheck" - AC_MSG_RESULT(yes) else - CFLAGS="$CFLAGS -Wall -std=c99" AC_MSG_RESULT(no) + CFLAGS="$CFLAGS -Wall -std=c99" fi # Enable or disable inclusion of abs script AC_MSG_CHECKING(for inclusion of abs script) if test "x$includeabs" = "xyes" ; then - AC_DEFINE([INCLUDE_ABS], , [Include abs script]) AC_MSG_RESULT(yes) + AC_DEFINE([INCLUDE_ABS], , [Include abs script]) else AC_MSG_RESULT(no) fi diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 705edafa..05ae8d13 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -32,7 +32,7 @@ #include <sys/utsname.h> /* uname */ #include <locale.h> /* setlocale */ #include <time.h> /* time_t */ -#if defined(PACMAN_DEBUG) && defined(HAVE_MTRACE) +#if defined(PACMAN_DEBUG) && defined(HAVE_MCHECK_H) #include <mcheck.h> /* debug tracing (mtrace) */ #endif @@ -720,7 +720,7 @@ int main(int argc, char *argv[]) uid_t myuid = geteuid(); #endif -#if defined(PACMAN_DEBUG) && defined(HAVE_MTRACE) +#if defined(PACMAN_DEBUG) && defined(HAVE_MCHECK_H) /*setenv("MALLOC_TRACE","pacman.mtrace", 0);*/ mtrace(); #endif |