From 6ad8b294a83f41502458acb8b18945c3e345f901 Mon Sep 17 00:00:00 2001 From: pjwilliams Date: Wed, 2 Feb 2011 20:06:52 +0000 Subject: [PATCH] Add --with-tcmalloc option to ./configure to enable linking against Google's TCMalloc library. Currently assumes tcmalloc is installed in a standard system directory. git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3865 1f5c12ca-751b-0410-a591-d2e778427230 --- configure.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.in b/configure.in index 583f2523..8125e8d5 100644 --- a/configure.in +++ b/configure.in @@ -85,6 +85,12 @@ AC_ARG_WITH(zlib, [with_zlib=no] ) +AC_ARG_WITH(tcmalloc, + [AC_HELP_STRING([--with-tcmalloc], [(optional) link with tcmalloc; default is no])], + [with_tcmalloc=$withval], + [with_tcmalloc=no], + ) + AM_CONDITIONAL([INTERNAL_LM], false) AM_CONDITIONAL([SRI_LM], false) AM_CONDITIONAL([IRST_LM], false) @@ -226,6 +232,10 @@ then AM_CONDITIONAL([RAND_LM], true) fi +if test "x$with_tcmalloc" != 'xno' +then + AC_CHECK_LIB([tcmalloc], [malloc], [], [AC_MSG_ERROR([Cannot find tcmalloc])]) +fi AM_CONDITIONAL([WITH_MERT],false)