Skip to content

Commit

Permalink
Add --with-tcmalloc option to ./configure to enable linking against G…
Browse files Browse the repository at this point in the history
…oogle'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
  • Loading branch information
pjwilliams committed Feb 2, 2011
1 parent 63fa365 commit 6ad8b29
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6ad8b29

Please sign in to comment.