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
|
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
|
noinst_PROGRAMS = umem_test umem_test2 umem_test3
|
||||||
|
|
||||||
libumem_la_LDFLAGS = -lpthread -ldl
|
libumem_la_LDFLAGS = -lpthread -ldl
|
||||||
|
@ -37,9 +37,8 @@ libumem_la_SOURCES = init_lib.c \
|
||||||
sys/vmem.h \
|
sys/vmem.h \
|
||||||
sys/vmem_impl_user.h
|
sys/vmem_impl_user.h
|
||||||
|
|
||||||
if MALLOC_REPLACEMENT
|
libumem_malloc_la_SOURCES = malloc.c
|
||||||
libumem_la_SOURCES += malloc.c
|
libumem_malloc_la_LDFLAGS = -lpthread -ldl -lumem
|
||||||
endif
|
|
||||||
|
|
||||||
nobase_include_HEADERS = umem.h sys/vmem.h
|
nobase_include_HEADERS = umem.h sys/vmem.h
|
||||||
|
|
||||||
|
|
18
configure.ac
18
configure.ac
|
@ -1,15 +1,15 @@
|
||||||
AC_INIT([umem], [1.0], [], [umem])
|
AC_INIT([umem], [1.0], [], [umem])
|
||||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||||
|
|
||||||
AC_ARG_ENABLE([malloc-replacement],
|
dnl AC_ARG_ENABLE([malloc-replacement],
|
||||||
AS_HELP_STRING([--enable-malloc-replacement],
|
dnl AS_HELP_STRING([--enable-malloc-replacement],
|
||||||
[Include implementations of malloc/free/etc. in libumem (default is no)]),
|
dnl [Include implementations of malloc/free/etc. in libumem (default is no)]),
|
||||||
[case "${enableval}" in
|
dnl [case "${enableval}" in
|
||||||
yes) malloc_replacement=true ;;
|
dnl yes) malloc_replacement=true ;;
|
||||||
no) malloc_replacement=false ;;
|
dnl no) malloc_replacement=false ;;
|
||||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-malloc-replacement) ;;
|
dnl *) AC_MSG_ERROR(bad value ${enableval} for --enable-malloc-replacement) ;;
|
||||||
esac],[malloc_replacement=false])
|
dnl esac],[malloc_replacement=false])
|
||||||
AM_CONDITIONAL(MALLOC_REPLACEMENT, test x$malloc_replacement = xtrue)
|
dnl AM_CONDITIONAL(MALLOC_REPLACEMENT, test x$malloc_replacement = xtrue)
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_AS
|
AM_PROG_AS
|
||||||
|
|
Loading…
Reference in a new issue