mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
configure: detect new gperftool
this is a follow-up of 6edaf4e, when tcmalloc is enabled, perfglue/heap_profiler.cc is also compiled, it includes the google/heap-profiler.h. so to silence the the warnings like warning: /usr/include/google/heap-profiler.h:35:2: #warning "google/heap-profiler.h is deprecated. Use gperftools/heap-profiler.h instead" [-Wcpp] we also check the new location of these header files if tcmalloc is enabled. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
3b5e940b91
commit
ce8558216a
14
configure.ac
14
configure.ac
@ -454,11 +454,6 @@ AC_ARG_WITH([profiler],
|
||||
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])])
|
||||
AC_LANG_PUSH([C++])
|
||||
AC_CHECK_HEADERS([gperftools/heap-profiler.h \
|
||||
gperftools/malloc_extension.h \
|
||||
gperftools/profiler.h])
|
||||
AC_LANG_POP([C++])
|
||||
],
|
||||
[])
|
||||
AM_CONDITIONAL(WITH_PROFILER, test "$with_profiler" = "yes")
|
||||
@ -591,6 +586,15 @@ AS_IF([test "x$with_tcmalloc" != xno],
|
||||
[no tcmalloc found (use --without-tcmalloc to disable)])])])
|
||||
AM_CONDITIONAL(WITH_TCMALLOC, [test "$HAVE_LIBTCMALLOC" = "1"])
|
||||
|
||||
AS_IF([test "$with_profiler" = yes -o \
|
||||
"$HAVE_LIBTCMALLOC" = "1" -o \
|
||||
"$HAVE_LIBTCMALLOC_MINIMAL" = "1"],
|
||||
[AC_LANG_PUSH([C++])
|
||||
AC_CHECK_HEADERS([gperftools/heap-profiler.h \
|
||||
gperftools/malloc_extension.h \
|
||||
gperftools/profiler.h])
|
||||
AC_LANG_POP([C++])])
|
||||
|
||||
# error out if --with-jemalloc and ! --without-tcmalloc
|
||||
if test "x$with_jemalloc" = "xyes"; then
|
||||
if test "x$with_tcmalloc" != "xno"; then
|
||||
|
Loading…
Reference in New Issue
Block a user