From 996345a00f7f267ba404edda50cab359fd60666e Mon Sep 17 00:00:00 2001 From: John Ralls Date: Wed, 3 Dec 2014 16:24:16 -0800 Subject: [PATCH] Fix gperformance-tools setup and apply it to src/engine/tests. --- configure.ac | 2 +- src/engine/test/Makefile.am | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0324d9e279..139c8e14c6 100644 --- a/configure.ac +++ b/configure.ac @@ -757,7 +757,7 @@ enable_google_profile=no AC_ARG_ENABLE( google-profiler, [AS_HELP_STRING([--enable-google-profiler], [link in Google Performance Tools profiler; allows enabling profiling by setting $CPUPROFILE=/path/to/logfile.])], [AC_MSG_CHECKING([Google PerfTools Profiler]) - AC_CHECK_LIB([profiler], [enable_google_profile=yes], + AC_CHECK_LIB([profiler], [ProfilerEnable], [enable_google_profile=yes], [AC_MSG_WARN([Google Profiling Enabled but the library was not found.])]) ]) AM_CONDITIONAL(WITH_GOOGLE_PROFILER, [test x$enable_google_profile = xyes]) diff --git a/src/engine/test/Makefile.am b/src/engine/test/Makefile.am index 11c301fb65..3a5dccf51d 100644 --- a/src/engine/test/Makefile.am +++ b/src/engine/test/Makefile.am @@ -81,6 +81,10 @@ test_link_LDADD = ../libgncmod-engine.la \ ${top_builddir}/src/libqof/qof/libgnc-qof.la \ ${top_builddir}/src/core-utils/libgnc-core-utils.la +if WITH_GOOGLE_PROFILER +LDADD += -lprofiler +endif + EXTRA_DIST += \ test-create-account \ test-create-account.scm \