create a separate library, libumem_malloc, for people that want to replace
malloc with the umem routines.
This commit is contained in:
parent
a6a20ffacf
commit
a97a02fa4c
2 changed files with 12 additions and 13 deletions
|
@ -1,6 +1,6 @@
|
|||
EXTRA_DIST = COPYRIGHT OPENSOLARIS.LICENSE umem.spec Doxyfile umem_test4
|
||||
|
||||
lib_LTLIBRARIES = libumem.la
|
||||
lib_LTLIBRARIES = libumem.la libumem_malloc.la
|
||||
noinst_PROGRAMS = umem_test umem_test2 umem_test3
|
||||
|
||||
libumem_la_LDFLAGS = -lpthread -ldl
|
||||
|
@ -37,9 +37,8 @@ libumem_la_SOURCES = init_lib.c \
|
|||
sys/vmem.h \
|
||||
sys/vmem_impl_user.h
|
||||
|
||||
if MALLOC_REPLACEMENT
|
||||
libumem_la_SOURCES += malloc.c
|
||||
endif
|
||||
libumem_malloc_la_SOURCES = malloc.c
|
||||
libumem_malloc_la_LDFLAGS = -lpthread -ldl -lumem
|
||||
|
||||
nobase_include_HEADERS = umem.h sys/vmem.h
|
||||
|
||||
|
|
18
configure.ac
18
configure.ac
|
@ -1,15 +1,15 @@
|
|||
AC_INIT([umem], [1.0], [], [umem])
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
|
||||
AC_ARG_ENABLE([malloc-replacement],
|
||||
AS_HELP_STRING([--enable-malloc-replacement],
|
||||
[Include implementations of malloc/free/etc. in libumem (default is no)]),
|
||||
[case "${enableval}" in
|
||||
yes) malloc_replacement=true ;;
|
||||
no) malloc_replacement=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-malloc-replacement) ;;
|
||||
esac],[malloc_replacement=false])
|
||||
AM_CONDITIONAL(MALLOC_REPLACEMENT, test x$malloc_replacement = xtrue)
|
||||
dnl AC_ARG_ENABLE([malloc-replacement],
|
||||
dnl AS_HELP_STRING([--enable-malloc-replacement],
|
||||
dnl [Include implementations of malloc/free/etc. in libumem (default is no)]),
|
||||
dnl [case "${enableval}" in
|
||||
dnl yes) malloc_replacement=true ;;
|
||||
dnl no) malloc_replacement=false ;;
|
||||
dnl *) AC_MSG_ERROR(bad value ${enableval} for --enable-malloc-replacement) ;;
|
||||
dnl esac],[malloc_replacement=false])
|
||||
dnl AM_CONDITIONAL(MALLOC_REPLACEMENT, test x$malloc_replacement = xtrue)
|
||||
|
||||
AC_PROG_CC
|
||||
AM_PROG_AS
|
||||
|
|
Loading…
Reference in a new issue