加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/alibaba/tfs
克隆/下载
tcmalloc.m4 1.98 KB
一键复制 编辑 原始数据 按行查看 历史
duanfei@taobao.com 提交于 2012-07-11 08:51 . create release-2.2.7
dnl
dnl tcmalloc.m4: tfs's tcmalloc autoconf macros
dnl TCMALLOC_LDFLAGS
AC_DEFUN([TS_CHECK_TCMALLOC],
[
AC_ARG_WITH([tcmalloc],
AS_HELP_STRING([--with-tcmalloc=DIR],
[use tcmalloc (default is no) specify the root directory for tcmalloc library (optional)]),
[
if test "$withval" = "no"; then
want_tcmalloc="no"
elif test "$withval" = "yes"; then
want_tcmalloc="yes"
ac_tcmalloc_path=""
else
want_tcmalloc="yes"
ac_tcmalloc_path="$withval"
fi
],
[want_tcmalloc="yes"]
)
if test "x$want_tcmalloc" = "xyes"; then
if test "$ac_tcmalloc_path" != ""; then
ax_tclib="tcmalloc -L$ac_tcmalloc_path/lib"
else
ax_tclib="tcmalloc"
fi
AC_CHECK_LIB($ax_tclib, tc_cfree,TCMALLOC_LDFLAGS="-l$ax_tclib" AC_SUBST(TCMALLOC_LDFLAGS),
[AC_MSG_FAILURE([tcmalloc link failed (--without-tcmalloc to disable)])]
)
fi
AC_ARG_WITH([tcmalloc_minimal],
AS_HELP_STRING([--with-tcmalloc_minimal=DIR],
[use tcmalloc_minimal(default is no) specify the root directory for tcmalloc_minimal library (optional)]),
[
if test "$withval" = "no"; then
want_tcmalloc_minimal="no"
elif test "$withval" = "yes"; then
want_tcmalloc_minimal="yes"
ac_tcmalloc_minimal_path=""
else
want_tcmalloc_minimal="yes"
ac_tcmalloc_minimal_path="$withval"
fi
],
[want_tcmalloc_minimal="no"]
)
if test "x$want_tcmalloc_minimal" = "xyes"; then
if test "$ac_tcmalloc_minimal_path" != ""; then
ax_tclib="tcmalloc_minimal -L$ac_tcmalloc_minimal_path/lib"
else
ax_tclib="tcmalloc_minimal"
fi
AC_CHECK_LIB($ax_tclib, tc_cfree,TCMALLOC_LDFLAGS="-l$ax_tclib" AC_SUBST(TCMALLOC_LDFLAGS),
[AC_MSG_FAILURE([tcmalloc_minimal link failed (--without-tcmalloc_minimal to disable)])]
)
fi
])
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化