summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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