Sfoglia il codice sorgente

* Improved: added --enable-debug=gdb option in configure script to use gdb optimized debug mode [akrus]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13024 54d463be-8e91-2dee-dedb-b68131a5f0ec
akrus 17 anni fa
parent
commit
24aa1138f5
3 ha cambiato i file con 33 aggiunte e 12 eliminazioni
  1. 1 0
      Changelog-Trunk.txt
  2. 16 6
      configure
  3. 16 6
      configure.in

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2008/07/31
+	* Improved: added --enable-debug=gdb option in configure script to use gdb optimized debug mode [akrus]
 	* Removed the mob controller system, now a customization (see topic:194375) [ultramage]
 	* Fixed: commented out loginlog in convert engine sql tables (loginlog table is in logs database now) [akrus]
 2008/07/30

+ 16 - 6
configure

@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 13000 .
+# From configure.in Revision: 13024 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -1260,6 +1260,7 @@ Optional Features:
                           instead of TXT files in the sql map-server.
                           (disabled by default)
   --enable-debug          Compiles extra debug code. (disabled by default)
+                          (available options: yes, no, gdb)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1793,8 +1794,9 @@ if test "${enable_debug+set}" = set; then
   enableval=$enable_debug;
 		enable_debug="$enableval"
 		case $enableval in
-			no);;
-			yes);;
+			"no");;
+			"yes");;
+			"gdb");;
 			*) { { echo "$as_me:$LINENO: error: invalid argument --enable-debug=$enableval... stopping" >&5
 echo "$as_me: error: invalid argument --enable-debug=$enableval... stopping" >&2;}
    { (exit 1); exit 1; }; };;
@@ -4525,9 +4527,17 @@ fi
 #
 # Debug
 #
-if test "$enable_debug" = "yes" ; then
-	CFLAGS="$CFLAGS -g -DDEBUG"
-fi
+case $enable_debug in
+	"no")
+		# default value
+		;;
+	"yes")
+		CFLAGS="$CFLAGS -g -DDEBUG"
+		;;
+	"gdb")
+		CFLAGS="$CFLAGS -ggdb -DDEBUG"
+		;;
+esac
 
 
 #

+ 16 - 6
configure.in

@@ -78,13 +78,15 @@ AC_ARG_ENABLE(
 	[debug],
 	AC_HELP_STRING(
 		[--enable-debug],
-		[Compiles extra debug code. (disabled by default)]
+		[Compiles extra debug code. (disabled by default)],
+		[(available options: yes, no, gdb)]
 	),
 	[
 		enable_debug="$enableval"
 		case $enableval in
-			no);;
-			yes);;
+			"no");;
+			"yes");;
+			"gdb");;
 			*) AC_MSG_ERROR([[invalid argument --enable-debug=$enableval... stopping]]);;
 		esac
 	],
@@ -347,9 +349,17 @@ fi
 #
 # Debug
 #
-if test "$enable_debug" = "yes" ; then
-	CFLAGS="$CFLAGS -g -DDEBUG"
-fi
+case $enable_debug in
+	"no")
+		# default value
+		;;
+	"yes")
+		CFLAGS="$CFLAGS -g -DDEBUG"
+		;;
+	"gdb")
+		CFLAGS="$CFLAGS -ggdb -DDEBUG"
+		;;
+esac
 
 
 #