nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nel] GNU/Linux compilation patches


From: Loic Dachary
Subject: [Nel] GNU/Linux compilation patches
Date: Tue, 27 Aug 2002 18:35:47 +0200

        Hi,

        Here is a set of patches exclusively related to GNU/Linux
compilation (autotools). Note that it adds a dependency to SDL,
preparing the ground for the patch I'll submit tomorrow morning.
Other than that it fixes minor problems that I will gladly explain
if someone is interested. I'll spare the details to the list since
I guess it's boring to almost everyone.

        The patch is relative to the code cvs directory (as of today)
and can be applied with patch -p0.

        Cheers,

Index: nel/Makefile.am
===================================================================
RCS file: /home/cvsroot/code/nel/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- nel/Makefile.am     14 May 2002 13:33:59 -0000      1.9
+++ nel/Makefile.am     27 Aug 2002 16:27:33 -0000
@@ -6,9 +6,10 @@
                        config.sub ltconfig aclocal.m4 config.h.in \
                        install-sh missing mkinstalldirs ltmain.sh \
                        include/nelconfig.h include/nelconfig.h.in \
-                       include/nel/nelconfig.h
+                       include/nel/nelconfig.h $(DISTCLEANFILES)
 
-DISTCLEANFILES       = include/stamp-h include/stamp-h.in 
+DISTCLEANFILES       = include/stamp-h include/stamp-h.in depcomp config.cache 
\
+                      config.status py-compile
 
 SUBDIRS              = include src
 
Index: nel/acconfig.h
===================================================================
RCS file: /home/cvsroot/code/nel/acconfig.h,v
retrieving revision 1.2
diff -u -r1.2 acconfig.h
--- nel/acconfig.h      15 Apr 2002 12:54:16 -0000      1.2
+++ nel/acconfig.h      27 Aug 2002 16:27:33 -0000
@@ -12,4 +12,9 @@
  */
 #undef NEL_LOG_IN_FILE
 
+/*
+ * Define if libsdl is available
+ */
+#undef HAVE_SDL
+
 #undef HAVE_X86
Index: nel/configure.in
===================================================================
RCS file: /home/cvsroot/code/nel/configure.in,v
retrieving revision 1.73
diff -u -r1.73 configure.in
--- nel/configure.in    21 Aug 2002 09:35:15 -0000      1.73
+++ nel/configure.in    27 Aug 2002 16:27:33 -0000
@@ -192,10 +191,10 @@
 dnl Test endianness
 AC_C_BIGENDIAN
 
-dnl Supress GCC "multi-character character constant" warnings.
+dnl Set the gcc specific warning level
 if test "X$CC" = "Xgcc";
 then
-    if test "$with_debug" = "yes"
+    if test "$with_debug" != "no"
     then
        #
        # When debugging variables are declared for the sole purpose of
@@ -274,9 +273,20 @@
 
 LIBS="$LIBS $XML_LIBS"
 
+dnl ====================================================================
+dnl SDL
+
+AM_PATH_SDL(1.2.0,,AC_MSG_ERROR([libsdl 1.2.0 or higher must be installed]))
+
+AC_DEFINE(HAVE_SDL)
+
+CFLAGS="$CFLAGS $SDL_CFLAGS"
+CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+
+LIBS="$LIBS $SDL_LIBS"
+
 dnl Use C++ compiler as a default for the compilation tests.
 AC_LANG_CPLUSPLUS
-
 
 dnl ====================================================================
 dnl Checks for libraries.
Index: nel/src/misc/Makefile.am
===================================================================
RCS file: /home/cvsroot/code/nel/src/misc/Makefile.am,v
retrieving revision 1.56
diff -u -r1.56 Makefile.am
--- nel/src/misc/Makefile.am    23 Aug 2002 12:38:33 -0000      1.56
+++ nel/src/misc/Makefile.am    27 Aug 2002 16:27:43 -0000
@@ -24,6 +24,7 @@
                         debug.cpp                          \
                         displayer.cpp                      \
                         event_emitter.cpp                  \
+                        event_emitter_multi.cpp            \
                         event_listener.cpp                 \
                         event_server.cpp                   \
                         events.cpp                         \
Index: nel/src/misc/config_file/Makefile.am
===================================================================
RCS file: /home/cvsroot/code/nel/src/misc/config_file/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- nel/src/misc/config_file/Makefile.am        20 Aug 2002 11:37:36 -0000      
1.3
+++ nel/src/misc/config_file/Makefile.am        27 Aug 2002 16:27:43 -0000
@@ -2,7 +2,7 @@
 # $Id: Makefile.am,v 1.3 2002/08/20 11:37:36 lecroart Exp $
 #
 
-MAINTAINERCLEANFILES    = Makefile.in
+MAINTAINERCLEANFILES    = Makefile.in cf_gramatical.cxx cf_lexical.cxx
 
 noinst_LTLIBRARIES      = libconfig.la
 
Index: nelns/Makefile.am
===================================================================
RCS file: /home/cvsroot/code/nelns/Makefile.am,v
retrieving revision 1.8
diff -u -r1.8 Makefile.am
--- nelns/Makefile.am   3 May 2002 08:11:14 -0000       1.8
+++ nelns/Makefile.am   27 Aug 2002 16:27:58 -0000
@@ -4,7 +4,9 @@
 
 MAINTAINERCLEANFILES = Makefile.in configure config.guess missing \
                        config.sub ltconfig aclocal.m4 config.h.in \
-                       install-sh mkinstalldirs 
+                       install-sh mkinstalldirs $(DISTCLEANFILES)
+
+DISTCLEANFILES       = stamp-h.in depcomp config.cache config.status
 
 EXTRA_DIST          = acconfig.h services.dsw bootstrap doc
 
Index: nelns/configure.in
===================================================================
RCS file: /home/cvsroot/code/nelns/configure.in,v
retrieving revision 1.15
diff -u -r1.15 configure.in
--- nelns/configure.in  16 Apr 2002 12:01:39 -0000      1.15
+++ nelns/configure.in  27 Aug 2002 16:27:58 -0000
@@ -12,9 +12,11 @@
 
 AC_INIT(admin_service/admin_service.cpp)
 
+AC_CANONICAL_SYSTEM
+
 MAJOR_VERSION=0
 MINOR_VERSION=3
-PICO_VERSION=0
+PICO_VERSION=0
 
 AM_INIT_AUTOMAKE(nelns, $MAJOR_VERSION.$MINOR_VERSION.$PICO_VERSION)
 
@@ -36,19 +38,16 @@
 AC_PROG_CC
 AC_PROG_CXX
 
-AM_PROG_LIBTOOL
-
 AM_SANITY_CHECK
 
 AC_PROG_INSTALL
 
-AM_PATH_CCACHE
-
-
 dnl ====================================================================
 dnl Configure Settings
 dnl ====================================================================
 
+dnl Set the C++ compiler as the default compiler for the configure script
+dnl compilation tests
 AC_LANG_CPLUSPLUS
 
 
@@ -58,6 +57,21 @@
 
 AM_NEL_DEBUG
 
+dnl Set the gcc specific warning level
+if test "X$CC" = "Xgcc";
+then
+    if test "$with_debug" != "no"
+    then
+       #
+       # When debugging variables are declared for the sole purpose of
+       # inspecting their content with a debugger. They are not used
+       # in the code itself and this is legitimate, hence the -Wno-unused
+       #
+        CXXFLAGS="$CXXFLAGS -Wall -Wno-multichar -Wno-unused"
+    else
+        CXXFLAGS="$CXXFLAGS -Wall -Wno-multichar"
+    fi
+fi
 
 dnl ====================================================================
 dnl Checks for typedefs, structures, and compiler characteristics.
@@ -77,6 +91,12 @@
 AC_STDC_HEADERS
 AC_CHECK_HEADERS(fcntl.h unistd.h)
 
+
+dnl ====================================================================
+dnl Checks compilation accelerator
+dnl ====================================================================
+
+AM_PATH_CCACHE
 
 dnl ====================================================================
 dnl Checks for libraries.
Index: snowballs2/Makefile.am
===================================================================
RCS file: /home/cvsroot/code/snowballs2/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- snowballs2/Makefile.am      10 Apr 2002 07:32:46 -0000      1.4
+++ snowballs2/Makefile.am      27 Aug 2002 16:27:59 -0000
@@ -4,7 +4,9 @@
 
 MAINTAINERCLEANFILES = Makefile.in configure config.guess missing \
                        config.sub ltconfig aclocal.m4 config.h.in \
-                       install-sh mkinstalldirs
+                       install-sh mkinstalldirs $(DISTCLEANFILES)
+
+DISTCLEANFILES       = depcomp config.cache config.status stamp-h.in
 
 EXTRA_DIST          = acconfig.h bootstrap \
                       snowballs2.dsw
Index: snowballs2/acconfig.h
===================================================================
RCS file: /home/cvsroot/code/snowballs2/acconfig.h,v
retrieving revision 1.1
diff -u -r1.1 acconfig.h
--- snowballs2/acconfig.h       19 Mar 2002 17:42:49 -0000      1.1
+++ snowballs2/acconfig.h       27 Aug 2002 16:27:59 -0000
@@ -10,3 +10,7 @@
  */
 #undef SNOWBALLS_LOGS
 
+/*
+ * Define if libsdl is available
+ */
+#undef HAVE_SDL
Index: snowballs2/configure.in
===================================================================
RCS file: /home/cvsroot/code/snowballs2/configure.in,v
retrieving revision 1.16
diff -u -r1.16 configure.in
--- snowballs2/configure.in     8 Jul 2002 15:10:16 -0000       1.16
+++ snowballs2/configure.in     27 Aug 2002 16:27:59 -0000
@@ -12,15 +12,16 @@
 
 AC_INIT(client/src/client.cpp)
 
+AC_CANONICAL_SYSTEM
+
 MAJOR_VERSION=0
 MINOR_VERSION=2
-PICO_VERSION=0
+PICO_VERSION=0
 
 AM_INIT_AUTOMAKE(snowballs, $MAJOR_VERSION.$MINOR_VERSION.$PICO_VERSION)
 
 AM_CONFIG_HEADER(config.h)
 
-
 dnl The following hack should ensure that configure doesn't add optimizing
 dnl or debugging flags to CFLAGS or CXXFLAGS
 CFLAGS="$CFLAGS "
@@ -63,8 +64,17 @@
 
 AC_PROG_INSTALL
 
-AM_PATH_CCACHE
+dnl ====================================================================
+dnl SDL
+
+AM_PATH_SDL(1.2.0,,AC_MSG_ERROR([libsdl 1.2.0 or higher must be installed]))
 
+AC_DEFINE(HAVE_SDL)
+
+CFLAGS="$CFLAGS $SDL_CFLAGS"
+CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+
+LIBS="$LIBS $SDL_LIBS"
 
 dnl ====================================================================
 dnl Configure Settings
@@ -81,11 +91,32 @@
 
 AM_NEL_DEBUG
 
+dnl Set the gcc specific warning level
+if test "X$CC" = "Xgcc";
+then
+    if test "$with_debug" != "no"
+    then
+       #
+       # When debugging variables are declared for the sole purpose of
+       # inspecting their content with a debugger. They are not used
+       # in the code itself and this is legitimate, hence the -Wno-unused
+       #
+        CXXFLAGS="$CXXFLAGS -Wall -Wno-multichar -Wno-unused"
+    else
+        CXXFLAGS="$CXXFLAGS -Wall -Wno-multichar"
+    fi
+fi
 
 dnl ====================================================================
 dnl Checks for typedefs, structures, and compiler characteristics.
 dnl ====================================================================
 
+dnl Add the define _REENTRANT for a correct use of the threads
+if test "X$CC" = "Xgcc";
+then
+    CXXFLAGS="$CXXFLAGS -D_REENTRANT"
+fi
+
 
 dnl ====================================================================
 dnl Checks for header files.
@@ -118,6 +149,12 @@
 
 
 dnl ====================================================================
+dnl Checks compilation accelerator
+dnl ====================================================================
+
+AM_PATH_CCACHE
+
+dnl ====================================================================
 dnl Checks for libraries.
 dnl ====================================================================
 
@@ -125,7 +162,6 @@
 dnl STLPort
 
 AM_PATH_STLPORT
-
 
 dnl ====================================================================
 dnl OpenAL
Index: snowballs2/client/Makefile.am
===================================================================
RCS file: /home/cvsroot/code/snowballs2/client/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- snowballs2/client/Makefile.am       10 Apr 2002 07:32:46 -0000      1.3
+++ snowballs2/client/Makefile.am       27 Aug 2002 16:27:59 -0000
@@ -2,6 +2,8 @@
 # $Id: Makefile.am,v 1.3 2002/04/10 07:32:46 lecroart Exp $
 #
 
+MAINTAINERCLEANFILES    = Makefile.in
+
 SUBDIRS              = src
 
 EXTRA_DIST          = client.cfg.in \

-- 
Loic   Dachary         http://www.dachary.org/  address@hidden
12 bd  Magenta         http://www.senga.org/      address@hidden
75010    Paris         T: 33 1 42 45 07 97          address@hidden
        GPG Public Key: http://www.dachary.org/loic/gpg.txt




reply via email to

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