=== modified file 'configure.in' --- configure.in 2010-05-28 14:15:11 +0000 +++ configure.in 2010-05-29 06:46:14 +0000 @@ -2611,26 +2611,12 @@ fi dnl end rip - AC_CHECK_LIB(gnumalloc, main) - if test "$ac_cv_lib_gnumalloc_main" = "yes"; then - AC_MSG_NOTICE([Disabling extended malloc functions when using gnumalloc]) - ac_cv_func_mallinfo=no - ac_cv_func_mallocblksize=no - ac_cv_func_mallopt=no - else - case "$host" in - *-sun-solaris*) - AC_MSG_NOTICE([skipping libmalloc check for $host]) - ;; - i386-*-freebsd*) - AC_MSG_NOTICE([skipping libmalloc check for $host]) - ;; - *) - - AC_CHECK_LIB(malloc, main) - ;; - esac - fi +dnl Search for a fast malloc implementation explicitly +dnl If none of these are found rely on the libc default implementation +saved_flags=$CXXFLAGS +CXXFLAGS="$CXXFLAGS -nostdlib" +AC_SEARCH_LIBS([malloc],[tcmalloc jemalloc dlmalloc ptmalloc3 nedmalloc ptmalloc2 malloc]) +CXXFLAGS=$saved_flags AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"]) case "$host_os" in @@ -3747,7 +3733,7 @@ dnl Need the debugging version of malloc if available XTRA_OBJS='' -if test "$ac_cv_lib_malloc_main" = "yes" ; then +if test "$ac_cv_search_malloc" = "-lmalloc" ; then if test -r /usr/lib/debug/malloc.o ; then XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o" fi