From 89d82f435d5ffcd34348431c6f5425026aeed853 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Wed, 3 Jun 2015 16:17:40 +0200 Subject: [PATCH] fixed configure.ac - tcmalloc was added too early --- configure.ac | 63 ++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/configure.ac b/configure.ac index 478b75e6a0..25e84ce965 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ----------------------------------------------------------------------------