summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorrobbeh <robbeh@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-14 23:24:36 +0000
committerrobbeh <robbeh@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-14 23:24:36 +0000
commitbba7d1aaaf7a4cf2c2af0b3e6f92cb115bdd48c1 (patch)
treeac3da0905cd70c4eebed1c3df567c6cea030b694 /configure.in
parent6c55e0a529c7f1216ff6f63a4fc77ea06a2a3a38 (diff)
Added --with-debugsym and --with-optimization=0|1|2|3 etc... - defaults are now --with-debugsym and no optimisation (we can change this to 2 later once we are not debugging so often :) )
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1682 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 7bbc76488..b0556ed63 100644
--- a/configure.in
+++ b/configure.in
@@ -11,6 +11,9 @@ dnl codemastr from UnrealIRCD.
AC_INIT
+# Clear out any CFLAGS (cept -g) the os is using, usually -g -O2
+CFLAGS="-g"
+
# If no bindir, we tell him to run ./Config.
if test "${with_bindir+set}" != set || test "${with_datadir+set}" != set; then
echo "You might want to run ./Config or provide some parameters to this script."
@@ -140,7 +143,6 @@ AC_SUBST(ANOPELIBS)
AC_SUBST(LDFLAGS)
AC_CHECK_HEADER(sys/types.h,AC_DEFINE(HAS_SYS_TYPES_H,1,"Has sys/types.h"))
-
dnl module checking based on Unreal's module checking code
AC_DEFUN(AC_ENABLE_DYN,
[
@@ -241,6 +243,7 @@ AC_ARG_WITH(rungroup, [ --with-rungroup=group Specify the rungroup for anope
AC_DEFINE_UNQUOTED(RUNGROUP,"$withval","Run group")
RUNGROUP=$withval
])
+
AC_SUBST(RUNGROUP)
dnl AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`","uname")
@@ -271,6 +274,15 @@ AC_ARG_WITH(datadir, [ --with-datadir=datadir Specify the location of the serv
AC_SUBST(DATDEST)
AC_SUBST(MODULE_PATH)
+AC_ARG_WITH(optimization, [ --with-optimisation=1|2|3|4|5 Specify the optimisation level], [
+ CFLAGS="$CFLAGS -O$withval"
+])
+
+AC_ARG_WITH(debugsym, [ --with-debugsym Include debugging symbols], [
+ CFLAGS="$CFLAGS -g"
+])
+
+
AC_CONFIG_FILES( \
Makefile \
src/bin/anoperc \
@@ -283,6 +295,8 @@ cat <<EOT
$DIS_MODULES
$DIS_MYSQL
+
+
All done! Now run "make" (or possibly "gmake") to compile Anope.
See the INSTALL, README and FAQ files if you have any problems.
EOT