Modified: trunk/configure.ac (115 => 116)
--- trunk/configure.ac 2009-11-03 23:12:32 UTC (rev 115)
+++ trunk/configure.ac 2009-11-04 00:38:43 UTC (rev 116)
@@ -115,6 +115,11 @@
AC_PROG_LIBTOOL
AC_PATH_PROGS(MIG, mig)
+AC_CHECK_TARGET_TOOLS(LEAKS, leaks)
+AS_IF([test "x$LEAKS" != "x"],
+ [AC_DEFINE(HAVE_LEAKS, 1, [Define if Apple leaks program is present])]
+)
+
AM_INIT_AUTOMAKE([foreign])
DISPATCH_C_ATOMIC_BUILTINS
Modified: trunk/testing/dispatch_test.c (115 => 116)
--- trunk/testing/dispatch_test.c 2009-11-03 23:12:32 UTC (rev 115)
+++ trunk/testing/dispatch_test.c 2009-11-04 00:38:43 UTC (rev 116)
@@ -123,14 +123,17 @@
void
test_stop_after_delay(void *delay) {
+#if HAVE_LEAKS
int res;
pid_t pid;
char pidstr[10];
+#endif
if (delay != NULL) {
sleep((int)(intptr_t)delay);
}
+#if HAVE_LEAKS
if (getenv("NOLEAKS")) _exit(EXIT_SUCCESS);
/* leaks doesn't work against debug variant malloc */
@@ -146,6 +149,6 @@
} else {
perror(args[0]);
}
-
+#endif
_exit(EXIT_SUCCESS);
}