[Freeciv-Dev] [patch] config.h
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Someone posted a patch earlier which included moving most -D compile
options to config.h. I have tested this a bit and below is a patch to cvs
current that does this. You should run automake ; autoconf ; autoheader
after applying this patch to create config.h and update stuff in general.
I believe that using config.h gives us more flexibility in passing options
to the sources from configure, and it is _a lot_ easier to see what is
going on during compilation (besides looking nicer).
Yours,
Per
? stamp-h.in
? config.h.in
Index: acconfig.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/acconfig.h,v
retrieving revision 1.1
diff -u -2 -r1.1 acconfig.h
--- acconfig.h 1998/05/25 19:32:50 1.1
+++ acconfig.h 1998/10/26 12:25:28
@@ -3,8 +3,8 @@
* by Falk Hüffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
*/
-@TOP@
-/* Define to the name of the distribution. */
#undef PACKAGE
-
-/* Define to the version of the distribution. */
#undef VERSION
+#undef MAJOR_VERSION
+#undef MINOR_VERSION
+#undef PATCH_VERSION
+#undef VERSION_STRING
Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.15
diff -u -2 -r1.15 configure.in
--- configure.in 1998/09/02 20:37:02 1.15
+++ configure.in 1998/10/26 12:25:28
@@ -4,16 +4,21 @@
dnl Initialize with some random file to ensure the source is here.
AC_INIT(common/game.c)
-AM_INIT_AUTOMAKE(freeciv,1.7.1)
+AM_CONFIG_HEADER(config.h)
PACKAGE=freeciv
-VERSION=1.7.1
+
+MAJOR_VERSION=1
+MINOR_VERSION=7
+PATCH_VERSION=1
+
+AC_DEFINE_UNQUOTED(PACKAGE, $PACKAGE)
+AC_DEFINE_UNQUOTED(VERSION, $VERSION)
+AC_DEFINE_UNQUOTED(MAJOR_VERSION, $MAJOR_VERSION)
+AC_DEFINE_UNQUOTED(MINOR_VERSION, $MINOR_VERSION)
+AC_DEFINE_UNQUOTED(PATCH_VERSION, $PATCH_VERSION)
+AC_DEFINE_UNQUOTED(VERSION_STRING,
"${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
-
-dnl Evaluate options. Example:
-dnl AC_ARG_ENABLE(debug,
-dnl [ --enable-debug include debugging code],
-dnl AC_DEFINE(DEBUG)
-dnl )
dnl Checks for programs.
Index: client/clinet.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/clinet.c,v
retrieving revision 1.5
diff -u -2 -r1.5 clinet.c
--- clinet.c 1998/09/21 09:19:25 1.5
+++ clinet.c 1998/10/26 12:25:29
@@ -11,4 +11,6 @@
GNU General Public License for more details.
***********************************************************************/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
Index: client/connectdlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/connectdlg.c,v
retrieving revision 1.7
diff -u -2 -r1.7 connectdlg.c
--- connectdlg.c 1998/10/17 12:04:27 1.7
+++ connectdlg.c 1998/10/26 12:25:29
@@ -1,2 +1,4 @@
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
Index: client/graphics.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/graphics.c,v
retrieving revision 1.9
diff -u -2 -r1.9 graphics.c
--- graphics.c 1998/09/19 16:03:41 1.9
+++ graphics.c 1998/10/26 12:25:29
@@ -11,4 +11,6 @@
GNU General Public License for more details.
***********************************************************************/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
Index: client/graphics.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/graphics.h,v
retrieving revision 1.5
diff -u -2 -r1.5 graphics.h
--- graphics.h 1998/07/23 22:51:18 1.5
+++ graphics.h 1998/10/26 12:25:29
@@ -14,4 +14,6 @@
#define __GRAPHICS_H
+#include <config.h>
+
#include <X11/Xlib.h>
Index: client/helpdlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/helpdlg.c,v
retrieving revision 1.14
diff -u -2 -r1.14 helpdlg.c
--- helpdlg.c 1998/10/20 12:44:11 1.14
+++ helpdlg.c 1998/10/26 12:25:30
@@ -11,4 +11,6 @@
GNU General Public License for more details.
***********************************************************************/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
Index: client/xmain.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/xmain.c,v
retrieving revision 1.22
diff -u -2 -r1.22 xmain.c
--- xmain.c 1998/10/24 13:43:34 1.22
+++ xmain.c 1998/10/26 12:25:31
@@ -12,4 +12,6 @@
***********************************************************************/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
Index: common/shared.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/shared.h,v
retrieving revision 1.18
diff -u -2 -r1.18 shared.h
--- shared.h 1998/09/02 20:37:05 1.18
+++ shared.h 1998/10/26 12:25:31
@@ -14,10 +14,5 @@
#define __SHARED_H
-/* client/server should always have the same major and minor versions */
-/* different patch versions are compatible */
-#define MAJOR_VERSION 1
-#define MINOR_VERSION 7
-#define PATCH_VERSION 1
-#define VERSION_STRING "1.7.1"
+#include <config.h>
#if MINOR_VERSION < 7
Index: server/civserver.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/civserver.c,v
retrieving revision 1.44
diff -u -2 -r1.44 civserver.c
--- civserver.c 1998/10/25 04:07:57 1.44
+++ civserver.c 1998/10/26 12:25:32
@@ -11,4 +11,6 @@
GNU General Public License for more details.
***********************************************************************/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
Index: server/gamehand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/gamehand.c,v
retrieving revision 1.18
diff -u -2 -r1.18 gamehand.c
--- gamehand.c 1998/10/21 13:08:59 1.18
+++ gamehand.c 1998/10/26 12:25:32
@@ -11,4 +11,6 @@
GNU General Public License for more details.
***********************************************************************/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
Index: server/meta.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/meta.h,v
retrieving revision 1.2
diff -u -2 -r1.2 meta.h
--- meta.h 1998/07/23 22:51:24 1.2
+++ meta.h 1998/10/26 12:25:32
@@ -20,4 +20,6 @@
#define _META_H
+#include <config.h>
+
#include <shared.h>
Index: server/registry.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/registry.c,v
retrieving revision 1.9
diff -u -2 -r1.9 registry.c
--- registry.c 1998/10/17 02:10:58 1.9
+++ registry.c 1998/10/26 12:25:34
@@ -111,4 +111,6 @@
***************************************************************************/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
- [Freeciv-Dev] [patch] config.h,
Per Mathisen <=
|
|