Skip to content

Commit

Permalink
[10149] Build tbb on linux/unix
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
derex committed Jul 4, 2010
1 parent edc9c4a commit 61ad909
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions configure.ac
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/framework/Makefile.am
Expand Up @@ -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

Expand All @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion 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__

0 comments on commit 61ad909

Please sign in to comment.