Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: (PR#2746) Include debug setting in config.h
Home

[Freeciv-Dev] Re: (PR#2746) Include debug setting in config.h

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2746) Include debug setting in config.h
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 10 Jan 2003 14:14:34 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Raimar Falke via RT wrote:
> On Tue, Jan 07, 2003 at 03:55:32AM -0800, Raimar Falke via RT wrote:

>>This is necessary because we don't include the debug setting in
>>config.h (which we should). A patch should be easy.
> 
> And the patch.

For it to work with autoconf-2.13 you also need to add the values to 
acconfig.old.  See attached patch.

But I'm unable to test this since I don't have autoconf-2.13...

jason

Index: acconfig.old
===================================================================
RCS file: /home/freeciv/CVS/freeciv/acconfig.old,v
retrieving revision 1.3
diff -u -r1.3 acconfig.old
--- acconfig.old        2002/11/14 09:28:31     1.3
+++ acconfig.old        2003/01/10 22:12:26
@@ -26,6 +26,8 @@
 #undef IS_DEVEL_VERSION
 #undef IS_BETA_VERSION
 #undef VERSION_STRING
+#undef DEBUG
+#undef NDEBUG
 #undef HAVE_LIBICE
 #undef HAVE_LIBSM
 #undef HAVE_LIBX11
Index: m4/debug.m4
===================================================================
RCS file: /home/freeciv/CVS/freeciv/m4/debug.m4,v
retrieving revision 1.3
diff -u -r1.3 debug.m4
--- m4/debug.m4 2002/11/26 10:44:09     1.3
+++ m4/debug.m4 2003/01/10 22:12:27
@@ -10,10 +10,10 @@
 
 dnl -g is added by AC_PROG_CC if the compiler understands it
 if test "x$enable_debug" = "xyes"; then
-  CPPFLAGS="$CPPFLAGS -DDEBUG"
+  AC_DEFINE(DEBUG, 1, [Define if you want extra debugging.])
 else
   if test "x$enable_debug" = "xno"; then
-    CPPFLAGS="$CPPFLAGS -DNDEBUG"
+    AC_DEFINE(NDEBUG, 1, [Define if you want no debug support.])
   fi
 fi
 ])

[Prev in Thread] Current Thread [Next in Thread]