X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpandora_have_better_malloc.m4;h=c984cbaf915cdda73f63653abf5aeefdfa1f8650;hb=66dcfb211cc2ca7dc6630754a6fd68343569e29a;hp=4563e3b5496298f6f27464c7d998e7098152ea12;hpb=8edeaed834e4a4396fb60647cdee7850c9c81de7;p=awesomized%2Flibmemcached diff --git a/m4/pandora_have_better_malloc.m4 b/m4/pandora_have_better_malloc.m4 index 4563e3b5..c984cbaf 100644 --- a/m4/pandora_have_better_malloc.m4 +++ b/m4/pandora_have_better_malloc.m4 @@ -1,18 +1,24 @@ -dnl Copyright (C) 2009 Sun Microsystems -dnl This file is free software; Sun Microsystems +dnl Copyright (C) 2009 Sun Microsystems, Inc. +dnl This file is free software; Sun Microsystems, Inc. dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[ - AC_REQUIRE([AC_FUNC_MALLOC]) - AC_REQUIRE([AC_FUNC_REALLOC]) AC_REQUIRE([AC_LIB_PREFIX]) AC_ARG_ENABLE([umem], [AS_HELP_STRING([--enable-umem], [Enable linking with libumem @<:@default=off@:>@])], - [ac_enable_umem="$enableval"], - [ac_enable_umem="no"]) + [ac_enable_umem="$enableval"],[ + case "$target_os" in + *solaris*) + ac_enable_umem="yes" + ;; + *) + ac_enable_umem="no" + ;; + esac + ]) AC_ARG_ENABLE([tcmalloc], [AS_HELP_STRING([--enable-tcmalloc], @@ -52,3 +58,9 @@ AC_DEFUN([PANDORA_HAVE_BETTER_MALLOC],[ AC_SUBST([BETTER_MALLOC_LIBS]) ]) + +AC_DEFUN([PANDORA_USE_BETTER_MALLOC],[ + AC_REQUIRE([PANDORA_HAVE_BETTER_MALLOC]) + LIBS="${LIBS} ${BETTER_MALLOC_LIBS}" +]) +