summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-19 03:05:16 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-19 03:05:16 +0000
commitaee3755b6d780c3261bdec2aef4d517bc7c7b148 (patch)
tree71dd1e301aab7780c23db9dd62de0ce7ce85a1d8 /configure.in
parenta0a93b21ebfbf51e3926a6819b46632703c33d90 (diff)
downloadhercules-aee3755b6d780c3261bdec2aef4d517bc7c7b148.tar.gz
hercules-aee3755b6d780c3261bdec2aef4d517bc7c7b148.tar.bz2
hercules-aee3755b6d780c3261bdec2aef4d517bc7c7b148.tar.xz
hercules-aee3755b6d780c3261bdec2aef4d517bc7c7b148.zip
* Nullpo's disabled on release builds.
* Added timestamps to the log of memory leaks. * Moved definition of __func__ to cbasetypes.h. * Configure script updated: - added option to select the memory manager - added option to enable MAPREGSQL - added option to enable DEBUG * common's Makefile deleting svnversion.h on 'clean' target. (run ./configure again to update your Makefile) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11760 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in118
1 files changed, 117 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index dc5da9c54..1ac99c495 100644
--- a/configure.in
+++ b/configure.in
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_INIT(eAthena)
-AC_REVISION($Revision: 11695$)
+AC_REVISION($Revision$)
AC_PREREQ([2.61])
AC_CONFIG_SRCDIR([src/common/cbasetypes.h])
AC_CONFIG_FILES([Makefile src/common/Makefile])
@@ -12,6 +12,73 @@ AC_CONFIG_FILES([src/map/Makefile src/plugins/Makefile src/tool/Makefile])
#
+# Memory managers
+#
+AC_ARG_ENABLE(
+ [manager],
+ AC_HELP_STRING(
+ [--enable-manager=ARG],
+ [memory managers: no, builtin, memwatch, dmalloc, gcollect, bcheck (defaults to builtin)]
+ ),
+ [
+ enable_manager="$enableval"
+ case $enableval in
+ "no");;
+ "builtin");;
+ "memwatch");;
+ "dmalloc");;
+ "gcollect");;
+ "bcheck");;
+ *) AC_MSG_ERROR([[unknown memory manager '$enable_manager'... stopping]]);;
+ esac
+ ],
+ [enable_manager="builtin"]
+)
+
+
+#
+# mapregsql
+#
+AC_ARG_ENABLE(
+ [mapregsql],
+ AC_HELP_STRING(
+ [--enable-mapregsql],
+ [Makes map-wide script variables be saved to SQL instead of TXT files in the sql map-server. (defauts to no)]
+ ),
+ [
+ enable_mapregsql="$enableval"
+ case $enableval in
+ no);;
+ yes);;
+ *) AC_MSG_ERROR([[invalid argument --enable-mapregsql=$enable_mapregsql... stopping]]);;
+ esac
+ ],
+ [enable_mapregsql="no"]
+)
+
+
+#
+# debug
+#
+AC_ARG_ENABLE(
+ [debug],
+ AC_HELP_STRING(
+ [--enable-debug],
+ [Compiles in debug mode. (defauts to no)]
+ ),
+ [
+ enable_debug="$enableval"
+ case $enableval in
+ no);;
+ yes);;
+ *) AC_MSG_ERROR([[invalid argument --enable-debug=$enable_mapregsql... stopping]]);;
+ esac
+ ],
+ [enable_debug="no"]
+)
+
+
+#
# Enable/disable MySql and optionally specify the path (optional library)
#
AC_ARG_WITH(
@@ -165,6 +232,55 @@ AC_COMPILE_IFELSE(
dnl
+dnl Memory manager
+dnl
+
+case $enableval in
+ "no")
+ CFLAGS="$CFLAGS -DNO_MEMMGR"
+ ;;
+ "builtin")
+ # enabled by default
+ ;;
+ "memwatch")
+ CFLAGS="$CFLAGS -DMEMWATCH"
+ AC_CHECK_HEADER([memwatch.h], , [AC_MSG_ERROR([memwatch header not found... stopping])])
+ ;;
+ "dmalloc")
+ CFLAGS="$CFLAGS -DDMALLOC -DDMALLOC_FUNC_CHECK"
+ LIBS="$LIBS -ldmalloc"
+ AC_CHECK_HEADER([dmalloc.h], , [AC_MSG_ERROR([dmalloc header not found... stopping])])
+ ;;
+ "gcollect")
+ CFLAGS="$CFLAGS -DGCOLLECT"
+ LIBS="$LIBS -lgc"
+ AC_CHECK_HEADER([gc.h], , [AC_MSG_ERROR([gcollect header not found... stopping])])
+ ;;
+ "bcheck")
+ CFLAGS="$CFLAGS -DBCHECK"
+ ;;
+esac
+
+
+dnl
+dnl Memory manager
+dnl
+
+if test "$enable_mapregsql" = "yes" ; then
+ CFLAGS="$CFLAGS -DMAPREGSQL"
+fi
+
+
+dnl
+dnl Debug
+dnl
+
+if test "$enable_debug" = "yes" ; then
+ CFLAGS="$CFLAGS -DDEBUG"
+fi
+
+
+dnl
dnl Check MySQL library (optional)
dnl