summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwez <wez@1665872d-e22b-0410-9e5d-a57ad4215e6d>2007-03-17 18:22:16 +0000
committerwez <wez@1665872d-e22b-0410-9e5d-a57ad4215e6d>2007-03-17 18:22:16 +0000
commitd8a814faf4037e0e35bb5c1d2423ac7d32b5afdb (patch)
treed66136ec06e14346c87b96fdb98e0ef714d5ddde
parente44a5d20e842c4defdb5b1b6db132a3b002b3e5c (diff)
downloadportableumem-d8a814faf4037e0e35bb5c1d2423ac7d32b5afdb.tar.gz
create a separate library, libumem_malloc, for people that want to replace
malloc with the umem routines. git-svn-id: https://labs.omniti.com/portableumem/trunk@31 1665872d-e22b-0410-9e5d-a57ad4215e6d
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac18
2 files changed, 12 insertions, 13 deletions
diff --git a/Makefile.am b/Makefile.am
index dc3ff41..993c17a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/configure.ac b/configure.ac
index 474253f..04a72fe 100644
--- a/configure.ac
+++ b/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