summaryrefslogtreecommitdiffstats
path: root/jemalloc/configure.ac
diff options
context:
space:
mode:
authorJason Evans <je@facebook.com>2010-03-02 22:12:58 (GMT)
committerJason Evans <je@facebook.com>2010-03-02 22:12:58 (GMT)
commitca6bd4f1c8081275f9bb98d351e5fb2b0b1fa135 (patch)
tree02e6d7b54266d30437bb08e3f4571ba6f3e5aa7a /jemalloc/configure.ac
parenta40bc7afe8ae71b05eba81805c87d92e9bf6ce27 (diff)
downloadjemalloc-ca6bd4f1c8081275f9bb98d351e5fb2b0b1fa135.zip
jemalloc-ca6bd4f1c8081275f9bb98d351e5fb2b0b1fa135.tar.gz
jemalloc-ca6bd4f1c8081275f9bb98d351e5fb2b0b1fa135.tar.bz2
Add the --with-static-libunwind configure option.
Diffstat (limited to 'jemalloc/configure.ac')
-rw-r--r--jemalloc/configure.ac15
1 files changed, 14 insertions, 1 deletions
diff --git a/jemalloc/configure.ac b/jemalloc/configure.ac
index 4d2d66a..b963e0e 100644
--- a/jemalloc/configure.ac
+++ b/jemalloc/configure.ac
@@ -366,6 +366,19 @@ fi
],
[enable_prof_libunwind="0"]
)
+AC_ARG_WITH([static_libunwind],
+ [AS_HELP_STRING([--with-static-libunwind=<libunwind.a>],
+ [Path to static libunwind library; use rather than dynamically linking])],
+if test "x$with_static_libunwind" = "xno" ; then
+ LUNWIND="-lunwind"
+else
+ if test ! -f "$with_static_libunwind" ; then
+ AC_MSG_ERROR([Static libunwind not found: $with_static_libunwind])
+ fi
+ LUNWIND="$with_static_libunwind"
+fi,
+ LUNWIND="-lunwind"
+)
dnl Finish prof-related definitions below, once TLS configuration is done.
dnl Enable tiny allocations by default.
@@ -665,7 +678,7 @@ if test "x$enable_prof" = "x1" ; then
AC_DEFINE([JEMALLOC_PROF], [ ])
if test "x$enable_prof_libunwind" = "x1" ; then
AC_CHECK_HEADERS([libunwind.h], , [enable_prof_libunwind="0"])
- AC_CHECK_LIB([unwind], [backtrace], [LIBS="$LIBS -lunwind"],
+ AC_CHECK_LIB([unwind], [backtrace], [LIBS="$LIBS $LUNWIND"],
[enable_prof_libunwind="0"])
if test "x${enable_prof_libunwind}" = "x1" ; then
AC_DEFINE([JEMALLOC_PROF_LIBUNWIND], [ ])