Configuring jemalloc on FreeBSD.

Mahadevan R mdevan.foobar at gmail.com
Sat Apr 16 09:10:30 PDT 2011


Hi.

jemalloc 2.2.1 tarball fails to ./configure on FreeBSD 8.2 (!),
because of attempting to check for dlopen() in libdl (this is in libc
for FreeBSD). The patch below fixes this.

Cheers,
-Mahadevan.

diff --git a/jemalloc/configure.ac b/jemalloc/configure.ac
index 412d3d1..c543f2d 100644
--- a/jemalloc/configure.ac
+++ b/jemalloc/configure.ac
@@ -727,8 +727,8 @@ fi
 )
 if test "x$enable_lazy_lock" = "x1" ; then
   AC_CHECK_HEADERS([dlfcn.h], , [AC_MSG_ERROR([dlfcn.h is missing])])
-  AC_CHECK_LIB([dl], [dlopen], [LIBS="$LIBS -ldl"],
-               [AC_MSG_ERROR([libdl is missing])])
+  AC_SEARCH_LIBS([dlopen], [dl], ,
+               [AC_MSG_ERROR([dlopen not found anywhere])])
   AC_DEFINE([JEMALLOC_LAZY_LOCK], [ ])
 fi
 AC_SUBST([enable_lazy_lock])



More information about the jemalloc-discuss mailing list