summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSage Weil <sage.weil@dreamhost.com>2011-02-24 06:00:27 -0800
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>2011-03-01 06:44:37 -0800
commit863631319bbf838ad15690805d7bf59c5a20b89b (patch)
tree3e97f5591f52fc6215adbf2fbd2bec55d8070cc6 /configure.ac
parenta466800820b2202e2b9fe4a94f602855b5770388 (diff)
downloadceph-863631319bbf838ad15690805d7bf59c5a20b89b.tar.gz
add --with-profiler to link in google perftools libprofiler
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ecbadb2a70e..9985e0b5c77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,20 @@ AC_CHECK_LIB([pthread], [pthread_create], [true], AC_MSG_FAILURE([libpthread not
PKG_CHECK_MODULES([CRYPTOPP], [libcrypto++], [], [
AC_SEARCH_LIBS([_ZTIN8CryptoPP14CBC_EncryptionE], [crypto++ cryptopp], [true], AC_MSG_FAILURE([libcrypto++ not found]), [-lpthread])])
+# profiler?
+AC_ARG_WITH([profiler],
+ [AS_HELP_STRING([--with-profiler], [build extra profiler binaries])],
+ [with_profiler=yes],
+ [with_profiler=no])
+AS_IF([test "x$with_profiler" != xyes],
+ [AC_CHECK_LIB([profiler], [ProfilerFlush], [],
+ [AC_MSG_FAILURE([--with-profiler was given but libprofiler (libgoogle-perftools-dev on debian) not found])])],
+ [])
+AM_CONDITIONAL(WITH_PROFILER, test "$with_profiler" = "yes")
+AS_IF([test "$with_profiler" = "yes"],
+ [AC_DEFINE([HAVE_PROFILER], [1], [Define if you have perftools profiler enabled])],
+ [])
+
# debug crap?
AC_ARG_WITH([debug],
[AS_HELP_STRING([--with-debug], [build extra debug binaries])],