mirror of https://gitee.com/bigwinds/arangodb
Add optional support to link against tcmalloc.
Just do --enable-tcmalloc at ./configure. You need a system-wide installation such that -ltcmalloc works without further -L.
This commit is contained in:
parent
4d8863070d
commit
c81d8410e8
|
@ -140,6 +140,7 @@ AM_LDFLAGS = \
|
|||
################################################################################
|
||||
|
||||
LIBS = \
|
||||
@TCMALLOC_LIBS@ \
|
||||
@RT_LIBS@ \
|
||||
@LIBEV_LIBS@ \
|
||||
@MATH_LIBS@ \
|
||||
|
|
|
@ -15,9 +15,15 @@
|
|||
/* define if the compiler supports basic C++11 syntax */
|
||||
#undef HAVE_CXX11
|
||||
|
||||
/* Define to 1 if you have the `futimes' function. */
|
||||
#undef HAVE_FUTIMES
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `tcmalloc' library (-ltcmalloc). */
|
||||
#undef HAVE_LIBTCMALLOC
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
|
|
19
configure.ac
19
configure.ac
|
@ -114,6 +114,25 @@ if test "x$tr_INTERNAL_GO" = "xno"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------------------------------
|
||||
dnl tcmalloc
|
||||
dnl ----------------------------------------------------------------------------
|
||||
|
||||
AC_ARG_ENABLE(tcmalloc,
|
||||
AS_HELP_STRING([--enable-tcmalloc], [use system-installed tcmalloc library (default: no)]),
|
||||
[tr_TCMALLOC="${enableval:-yes}"],
|
||||
[tr_TCMALLOC=no]
|
||||
)
|
||||
|
||||
AM_CONDITIONAL(ENABLE_TCMALLOC, test "x$tr_TCMALLOC" = xyes)
|
||||
|
||||
if test "x$tr_TCMALLOC" = "xyes"; then
|
||||
TCMALLOC_LIBS="-ltcmalloc"
|
||||
else
|
||||
TCMALLOC_LIBS=""
|
||||
fi
|
||||
AC_SUBST(TCMALLOC_LIBS)
|
||||
|
||||
dnl ============================================================================
|
||||
dnl --SECTION-- OPTIONS
|
||||
dnl ============================================================================
|
||||
|
|
Loading…
Reference in New Issue