[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.
This commit is contained in:
Derex 2010-07-04 21:45:35 +03:00
parent ba5de6eb8c
commit 0cb3a01833
3 changed files with 6 additions and 4 deletions

View file

@ -156,6 +156,7 @@ fi
# Use libc-malloc or libtbb-malloc? # Use libc-malloc or libtbb-malloc?
AC_MSG_CHECKING(whether to use libc malloc) AC_MSG_CHECKING(whether to use libc malloc)
MANGOSD_STD_MALLOC=no MANGOSD_STD_MALLOC=no
TBB_LIBS="-L\$(top_builddir)/dep/tbb -ltbb -ltbbmalloc"
AC_ARG_WITH(std-malloc, AC_ARG_WITH(std-malloc,
[ [
Memory allocation options: Memory allocation options:
@ -166,6 +167,7 @@ Memory allocation options:
CFLAGS="-DUSE_STANDARD_MALLOC $CFLAGS" CFLAGS="-DUSE_STANDARD_MALLOC $CFLAGS"
CXXFLAGS="-DUSE_STANDARD_MALLOC $CXXFLAGS" CXXFLAGS="-DUSE_STANDARD_MALLOC $CXXFLAGS"
MANGOSD_STD_MALLOC=yes MANGOSD_STD_MALLOC=yes
TBB_LIBS=""
elif test "$withval" != "no" ; then elif test "$withval" != "no" ; then
AC_MSG_ERROR(Please choose yes or no) AC_MSG_ERROR(Please choose yes or no)
fi 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. ## 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 ). # 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_INCLUDES="$ACE_INCLUDES $POSTGRE_INCLUDES $MYSQL_INCLUDES $OPENSSL_INCLUDES"
MANGOS_LIBS="$ACE_LIBS $POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $OPENSSL_LDFLAGS $OPENSSL_LIBS $MANGOS_LIBS" MANGOS_LIBS="$ACE_LIBS $POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $OPENSSL_LDFLAGS $OPENSSL_LIBS $TBB_LIBS"
## Export defined variables ## Export defined variables
AC_SUBST(DOXYGEN) AC_SUBST(DOXYGEN)

View file

@ -25,6 +25,7 @@ AM_CPPFLAGS = $(MANGOS_INCLUDES) -I$(srcdir)
# libMaNGOSScript shared library will later be reused by world server daemon. # libMaNGOSScript shared library will later be reused by world server daemon.
noinst_LIBRARIES = libmangosframework.a noinst_LIBRARIES = libmangosframework.a
libmangosframework_a_SOURCES = \ libmangosframework_a_SOURCES = \
Policies/MemoryManagement.cpp \
Policies/ObjectLifeTime.cpp \ Policies/ObjectLifeTime.cpp \
Utilities/EventProcessor.cpp Utilities/EventProcessor.cpp
@ -46,7 +47,6 @@ EXTRA_DIST = \
Platform/Define.h \ Platform/Define.h \
Policies/CreationPolicy.h \ Policies/CreationPolicy.h \
Policies/ObjectLifeTime.h \ Policies/ObjectLifeTime.h \
Policies/MemoryManagement.cpp \
Policies/Singleton.h \ Policies/Singleton.h \
Policies/SingletonImp.h \ Policies/SingletonImp.h \
Policies/ThreadingModel.h \ Policies/ThreadingModel.h \

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "10148" #define REVISION_NR "10149"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__