Add configure option --disable-libdl.
This makes it possible to build full static binary.
This commit is contained in:
parent
8e9a613122
commit
1f55a15467
@ -269,6 +269,11 @@ any of the following arguments (not a definitive list) to 'configure':
|
|||||||
in the same process, which will almost certainly result in confusing runtime
|
in the same process, which will almost certainly result in confusing runtime
|
||||||
crashes if pointers leak from one implementation to the other.
|
crashes if pointers leak from one implementation to the other.
|
||||||
|
|
||||||
|
* `--disable-libdl`
|
||||||
|
|
||||||
|
Disable the usage of libdl, namely dlsym(3) which is required by the lazy
|
||||||
|
lock option. This can allow building static binaries.
|
||||||
|
|
||||||
The following environment variables (not a definitive list) impact configure's
|
The following environment variables (not a definitive list) impact configure's
|
||||||
behavior:
|
behavior:
|
||||||
|
|
||||||
|
37
configure.ac
37
configure.ac
@ -1587,6 +1587,21 @@ if test "x${LG_PAGE}" != "xundefined" -a \
|
|||||||
fi
|
fi
|
||||||
AC_DEFINE_UNQUOTED([LG_HUGEPAGE], [${je_cv_lg_hugepage}])
|
AC_DEFINE_UNQUOTED([LG_HUGEPAGE], [${je_cv_lg_hugepage}])
|
||||||
|
|
||||||
|
dnl ============================================================================
|
||||||
|
dnl Enable libdl by default.
|
||||||
|
AC_ARG_ENABLE([libdl],
|
||||||
|
[AS_HELP_STRING([--disable-libdl],
|
||||||
|
[Do not use libdl])],
|
||||||
|
[if test "x$enable_libdl" = "xno" ; then
|
||||||
|
enable_libdl="0"
|
||||||
|
else
|
||||||
|
enable_libdl="1"
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
[enable_libdl="1"]
|
||||||
|
)
|
||||||
|
AC_SUBST([libdl])
|
||||||
|
|
||||||
dnl ============================================================================
|
dnl ============================================================================
|
||||||
dnl Configure pthreads.
|
dnl Configure pthreads.
|
||||||
|
|
||||||
@ -1600,15 +1615,21 @@ if test "x$abi" != "xpecoff" ; then
|
|||||||
AC_MSG_ERROR([libpthread is missing]))])
|
AC_MSG_ERROR([libpthread is missing]))])
|
||||||
wrap_syms="${wrap_syms} pthread_create"
|
wrap_syms="${wrap_syms} pthread_create"
|
||||||
have_pthread="1"
|
have_pthread="1"
|
||||||
dnl Check if we have dlsym support.
|
|
||||||
have_dlsym="1"
|
dnl Check if we have dlsym support.
|
||||||
AC_CHECK_HEADERS([dlfcn.h],
|
if test "x$enable_libdl" = "x1" ; then
|
||||||
AC_CHECK_FUNC([dlsym], [],
|
have_dlsym="1"
|
||||||
[AC_CHECK_LIB([dl], [dlsym], [LIBS="$LIBS -ldl"], [have_dlsym="0"])]),
|
AC_CHECK_HEADERS([dlfcn.h],
|
||||||
[have_dlsym="0"])
|
AC_CHECK_FUNC([dlsym], [],
|
||||||
if test "x$have_dlsym" = "x1" ; then
|
[AC_CHECK_LIB([dl], [dlsym], [LIBS="$LIBS -ldl"], [have_dlsym="0"])]),
|
||||||
AC_DEFINE([JEMALLOC_HAVE_DLSYM], [ ])
|
[have_dlsym="0"])
|
||||||
|
if test "x$have_dlsym" = "x1" ; then
|
||||||
|
AC_DEFINE([JEMALLOC_HAVE_DLSYM], [ ])
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
have_dlsym="0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
JE_COMPILABLE([pthread_atfork(3)], [
|
JE_COMPILABLE([pthread_atfork(3)], [
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
], [
|
], [
|
||||||
|
Loading…
Reference in New Issue
Block a user