This fixes two 'undefined reference' errors when building with a recent
glibc. One in effi.c for 'dlsym', and the other in emacs.c for
'memory_warnings'.
* configure.ac: Fix mmap detection.
Include -ldl in FFI_LIBS.
Ensure that vm-limit.o is added to the objects when using the
system malloc.
Default to using the system malloc.
* m4/sxe-emodffi.m4 (SXE_CHECK_FFI): Include -ldl in FFI_LIBS.
Signed-off-by: Steve Youngs <steve@sxemacs.org>
OG_ARG_WITH([system-malloc],
AS_HELP_STRING([--with-system-malloc],
[Use a system malloc instead of GNU.]),
OG_ARG_WITH([system-malloc],
AS_HELP_STRING([--with-system-malloc],
[Use a system malloc instead of GNU.]),
- [default], [YES if using quantify or purify; NO otherwise])
OG_ARG_WITH([regex-malloc],
AS_HELP_STRING([--with-regex-malloc],
OG_ARG_WITH([regex-malloc],
AS_HELP_STRING([--with-regex-malloc],
int main (int argc, char *argv[])
{
int fd = -1;
int main (int argc, char *argv[])
{
int fd = -1;
#ifndef MAP_ANONYMOUS
fd = open ("/dev/zero", O_RDWR);
if (fd < 0)
#ifndef MAP_ANONYMOUS
fd = open ("/dev/zero", O_RDWR);
if (fd < 0)
## additional actions
AC_DEFINE([HAVE_LIBFFI], [1], [Description here!])
HAVE_LIBFFI=yes
## additional actions
AC_DEFINE([HAVE_LIBFFI], [1], [Description here!])
HAVE_LIBFFI=yes
SXE_ADD_CRUFT_OBJS([effi.o])
])
SXE_ADD_CRUFT_OBJS([effi.o])
])
:
fi
elif test "$with_system_malloc" = "yes" -o "$system_malloc" = "yes"; then
:
fi
elif test "$with_system_malloc" = "yes" -o "$system_malloc" = "yes"; then
+ if test "$after_morecore_hook_exists" = "yes"; then
+ SXE_ADD_MEMALLOC_OBJS(vm-limit.o)
+ fi
AC_DEFINE([USE_SYSTEM_MALLOC], [1], [Description here!])
AC_DEFINE([SYSTEM_MALLOC], [1], [Description here!])
elif test "$with_debug_malloc" = "yes"; then
AC_DEFINE([USE_SYSTEM_MALLOC], [1], [Description here!])
AC_DEFINE([SYSTEM_MALLOC], [1], [Description here!])
elif test "$with_debug_malloc" = "yes"; then
"$ac_cv_lib_ffi_ffi_call" = "yes"; then
sxe_cv_feat_ffi="yes"
have_ffi="yes"
"$ac_cv_lib_ffi_ffi_call" = "yes"; then
sxe_cv_feat_ffi="yes"
have_ffi="yes"
else
sxe_cv_feat_ffi="no"
have_ffi="no"
else
sxe_cv_feat_ffi="no"
have_ffi="no"