]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
autoconf: Complain if tcmalloc is not found.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Fri, 11 Mar 2011 20:53:33 +0000 (12:53 -0800)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Fri, 11 Mar 2011 21:09:13 +0000 (13:09 -0800)
Use --without-tcmalloc if you don't want it.

Fixes part of #826.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
configure.ac

index 39e401745627c0920c74290447b1dddf31ac3646..6a68af69e4d1725b892b64ea899d0b1426941b14 100644 (file)
@@ -95,9 +95,9 @@ AM_CONDITIONAL(WITH_FUSE, [test "$HAVE_LIBFUSE" = "1"])
 
 # tcmalloc?
 AC_ARG_WITH([tcmalloc],
-           [AS_HELP_STRING([--with--tcmalloc], [use tcmalloc instead of ptmallc])],
+           [AS_HELP_STRING([--without-tcmalloc], [disable tcmalloc for memory allocations])],
            [],
-           [with_tcmalloc=check])
+           [with_tcmalloc=yes])
 TCMALLOC=
 AS_IF([test "x$with_tcmalloc" != xno],
            [AC_CHECK_LIB([tcmalloc], [malloc],
@@ -106,11 +106,8 @@ AS_IF([test "x$with_tcmalloc" != xno],
                         [Define if you have tcmalloc])
               HAVE_LIBTCMALLOC=1
             ],
-           [if test "x$with_tcmalloc" != xcheck; then
-               AC_MSG_FAILURE(
-                 [--with-tcmalloc was given but test failed])
-             fi
-           ])])
+           [AC_MSG_FAILURE(
+                 [no tcmalloc found (use --without-tcmalloc to disable)])])])
 AM_CONDITIONAL(WITH_TCMALLOC, [test "$HAVE_LIBTCMALLOC" = "1"])
 
 # jni?