From 0cb3a018337c152d8c08c59ee57b5140ebe04ffb Mon Sep 17 00:00:00 2001 From: Derex Date: Sun, 4 Jul 2010 21:45:35 +0300 Subject: [PATCH] [10149] Build tbb on linux/unix Unix specific notes: * Use --with-std-malloc in configure to disable tbb, if you have problems or you want to use the default or another allocator. * Even if you disable tbb, the library will still be built and installed, so you can still use it manually. --- configure.ac | 6 ++++-- src/framework/Makefile.am | 2 +- src/shared/revision_nr.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 1c9435ec6..931543fdb 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,7 @@ fi # Use libc-malloc or libtbb-malloc? AC_MSG_CHECKING(whether to use libc malloc) MANGOSD_STD_MALLOC=no +TBB_LIBS="-L\$(top_builddir)/dep/tbb -ltbb -ltbbmalloc" AC_ARG_WITH(std-malloc, [ Memory allocation options: @@ -166,6 +167,7 @@ Memory allocation options: CFLAGS="-DUSE_STANDARD_MALLOC $CFLAGS" CXXFLAGS="-DUSE_STANDARD_MALLOC $CXXFLAGS" MANGOSD_STD_MALLOC=yes + TBB_LIBS="" elif test "$withval" != "no" ; then AC_MSG_ERROR(Please choose yes or no) fi @@ -253,8 +255,8 @@ AM_CONDITIONAL([MANGOS_BUILD_ACE], [test X$enable_builtin_ace_support = Xyes]) ## Unify all additional includes/libs in one variable. # TODO this looks kinda ugly, but when we add m4 folder I will make it look very pritey ( by Derex ). -MANGOS_INCLUDES="$ACE_INCLUDES $POSTGRE_INCLUDES $MYSQL_INCLUDES $OPENSSL_INCLUDES $MANGOS_INCLUDES" -MANGOS_LIBS="$ACE_LIBS $POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $OPENSSL_LDFLAGS $OPENSSL_LIBS $MANGOS_LIBS" +MANGOS_INCLUDES="$ACE_INCLUDES $POSTGRE_INCLUDES $MYSQL_INCLUDES $OPENSSL_INCLUDES" +MANGOS_LIBS="$ACE_LIBS $POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $OPENSSL_LDFLAGS $OPENSSL_LIBS $TBB_LIBS" ## Export defined variables AC_SUBST(DOXYGEN) diff --git a/src/framework/Makefile.am b/src/framework/Makefile.am index 4102e98dd..c80ad71a2 100644 --- a/src/framework/Makefile.am +++ b/src/framework/Makefile.am @@ -25,6 +25,7 @@ AM_CPPFLAGS = $(MANGOS_INCLUDES) -I$(srcdir) # libMaNGOSScript shared library will later be reused by world server daemon. noinst_LIBRARIES = libmangosframework.a libmangosframework_a_SOURCES = \ + Policies/MemoryManagement.cpp \ Policies/ObjectLifeTime.cpp \ Utilities/EventProcessor.cpp @@ -46,7 +47,6 @@ EXTRA_DIST = \ Platform/Define.h \ Policies/CreationPolicy.h \ Policies/ObjectLifeTime.h \ - Policies/MemoryManagement.cpp \ Policies/Singleton.h \ Policies/SingletonImp.h \ Policies/ThreadingModel.h \ diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 111b3e258..c5cf18a25 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10148" + #define REVISION_NR "10149" #endif // __REVISION_NR_H__