1
0
Fork 0

fixed configure.ac - tcmalloc was added too early

This commit is contained in:
Jan Steemann 2015-06-03 16:17:40 +02:00
parent 91ee0bf060
commit 89d82f435d
1 changed files with 29 additions and 34 deletions

View File

@ -114,40 +114,6 @@ 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]
)
if test "x$tr_TCMALLOC" = "xyes" ; then
AC_MSG_CHECKING([for tcmalloc])
AC_SEARCH_LIBS([tc_malloc], [tcmalloc tcmalloc_minimal tcmalloc_debug], [], [
AC_MSG_ERROR([unable to find the tc_malloc library function])
])
fi
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)
if test "x$tr_TCMALLOC" = "xyes"; then
BASIC_INFO="$BASIC_INFO|TCMALLOC support: enabled ($TCMALLOC_LIBS)"
else
BASIC_INFO="$BASIC_INFO|TCMALLOC support: disabled"
fi
dnl ============================================================================
dnl --SECTION-- OPTIONS
dnl ============================================================================
@ -190,6 +156,35 @@ dnl ============================================================================
dnl --SECTION-- EXTERNAL LIBRARIES
dnl ============================================================================
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]
)
if test "x$tr_TCMALLOC" = "xyes"; then
AC_MSG_CHECKING([tcmalloc])
AC_SEARCH_LIBS([tc_malloc], [tcmalloc tcmalloc_minimal tcmalloc_debug], [ ], [ AC_MSG_ERROR([unable to find the tc_malloc library function]) ])
fi
AM_CONDITIONAL(ENABLE_TCMALLOC, test "x$tr_TCMALLOC" = xyes)
if test "x$tr_TCMALLOC" = "xyes"; then
TCMALLOC_LIBS="-ltcmalloc"
fi
AC_SUBST(TCMALLOC_LIBS)
if test "x$tr_TCMALLOC" = "xyes"; then
BASIC_INFO="$BASIC_INFO|TCMALLOC support: enabled ($TCMALLOC_LIBS)"
else
BASIC_INFO="$BASIC_INFO|TCMALLOC support: disabled"
fi
dnl ----------------------------------------------------------------------------
dnl -lrt
dnl ----------------------------------------------------------------------------