forked from enlightenment/enlightenment
parent
09e9b162f3
commit
f31a511494
27
configure.in
27
configure.in
|
@ -35,7 +35,32 @@ if test "x$res" = "xno"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(fnmatch_libs)
|
AC_SUBST(fnmatch_libs)
|
||||||
|
|
||||||
|
# Setting have_valgrind to "no" seems pointless, but we just need to
|
||||||
|
# put something in as the 4th parameter, so configure doesn't abort
|
||||||
|
# when valgrind.pc isn't found.
|
||||||
|
have_valgrind="no"
|
||||||
|
PKG_CHECK_MODULES(VALGRIND, valgrind >= 2.4.0, have_valgrind=yes, have_valgrind=no)
|
||||||
|
AC_ARG_ENABLE(valgrind,
|
||||||
|
[ --enable-valgrind enable valgrind support], [
|
||||||
|
if [ test "$enableval" = "yes" ]; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
have_valgrind="yes"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
have_valgrind="no"
|
||||||
|
VALGRIND_CFLAGS=""
|
||||||
|
VALGRIND_LIBS=""
|
||||||
|
fi
|
||||||
|
], [
|
||||||
|
have_valgrind=$have_valgrind
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test x$have_valgrind = "xyes"; then
|
||||||
|
AC_DEFINE(HAVE_VALGRIND, 1, [Valgrind support])
|
||||||
|
fi
|
||||||
|
|
||||||
MODULE_ARCH="$host_os-$host_cpu"
|
MODULE_ARCH="$host_os-$host_cpu"
|
||||||
AC_SUBST(MODULE_ARCH)
|
AC_SUBST(MODULE_ARCH)
|
||||||
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
|
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
|
||||||
|
|
|
@ -6,6 +6,7 @@ INCLUDES = -I$(includedir) \
|
||||||
@e_cflags@ \
|
@e_cflags@ \
|
||||||
@x_cflags@ \
|
@x_cflags@ \
|
||||||
@cf_cflags@ \
|
@cf_cflags@ \
|
||||||
|
@VALGRIND_CFLAGS@ \
|
||||||
@EDJE_DEF@
|
@EDJE_DEF@
|
||||||
|
|
||||||
bin_PROGRAMS = \
|
bin_PROGRAMS = \
|
||||||
|
@ -148,7 +149,7 @@ enlightenment_SOURCES = \
|
||||||
e_main.c \
|
e_main.c \
|
||||||
$(enlightenment_src)
|
$(enlightenment_src)
|
||||||
|
|
||||||
enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@ @cf_libs@
|
enlightenment_LDFLAGS = -export-dynamic @e_libs@ @x_libs@ @dlopen_libs@ @cf_libs@ @VALGRIND_LIBS@
|
||||||
|
|
||||||
enlightenment_remote_SOURCES = \
|
enlightenment_remote_SOURCES = \
|
||||||
e.h \
|
e.h \
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_VALGRIND
|
||||||
|
# include <memcheck.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* TODO List:
|
/* TODO List:
|
||||||
*
|
*
|
||||||
* * add module types/classes
|
* * add module types/classes
|
||||||
|
@ -65,6 +69,14 @@ int
|
||||||
e_module_shutdown(void)
|
e_module_shutdown(void)
|
||||||
{
|
{
|
||||||
Evas_List *l, *tmp;
|
Evas_List *l, *tmp;
|
||||||
|
|
||||||
|
#ifdef HAVE_VALGRIND
|
||||||
|
/* do a leak check now before we dlclose() all those plugins, cause
|
||||||
|
* that means we won't get a decent backtrace to leaks in there
|
||||||
|
*/
|
||||||
|
VALGRIND_DO_LEAK_CHECK
|
||||||
|
#endif
|
||||||
|
|
||||||
for (l = _e_modules; l;)
|
for (l = _e_modules; l;)
|
||||||
{
|
{
|
||||||
tmp = l;
|
tmp = l;
|
||||||
|
|
Loading…
Reference in New Issue