Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in82
-rw-r--r--src/Makefile.am9
2 files changed, 84 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 8bdbd92..3b0b911 100644
--- a/configure.in
+++ b/configure.in
@@ -62,6 +62,52 @@ AC_DEFUN(KDE_FIND_PATH,
fi
])
+AC_MSG_CHECKING(whether to abort on compiler warnings)
+WARN_CFLAGS=""
+AC_ARG_ENABLE(warn,
+ AC_HELP_STRING(
+ [--disable-warn], [don't abort on compiler warnings]
+ ),
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(yes)
+ WARN_CFLAGS="$WARN_CFLAGS -Wall -Werror"
+)
+AC_SUBST(WARN_CFLAGS)
+
+
+AC_MSG_CHECKING(whether to build a debug version)
+DEBUG_CFLAGS=""
+AC_ARG_ENABLE(debug,
+ AC_HELP_STRING(
+ [--disable-debug], [build without extra debug information]
+ ),
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_DEBUG, 1, [Defines if debug information is enabled])
+ HAVE_DEBUG="-g"
+)
+
+AC_CHECK_HEADER(GL/gl.h,
+ HAVE_OPENGL=yes
+ AC_DEFINE(HAVE_OPENGL, 1, [Define this if you have OpenGL]),
+ HAVE_OPENGL=no
+)
+
+AC_CHECK_HEADER(GL/glext.h,
+ HAVE_OPENGL_GLEXT=yes
+ AC_DEFINE(HAVE_OPENGL_GLEXT, 1, [Define this if you have OpenGL Extensions]),
+ HAVE_OPENGL_GLEXT=no,
+ [#include <GL/gl.h>]
+)
+
+AC_CHECK_LIB(GL, glVertex3f,
+ GL_LIBS="$GL_LIBS -lGL"
+
+)
+AC_SUBST(GL_LIBS)
+AC_SUBST(GL_CFLAGS)
+
+AC_MSG_CHECKING([looking for SDL])
KDE_FIND_PATH(sdl-config, LIBSDL_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
AC_MSG_WARN([Could not find libsdl anywhere, check http://www.sdl.org])
])
@@ -82,10 +128,42 @@ if test -n "$LIBSDL_CONFIG"; then
AC_DEFINE_UNQUOTED(HAVE_LIBSDL, 1, [Defines if your system has the LIBSDL library])
fi
+AC_MSG_RESULT($HAVE_LIBSDL)
AC_SUBST(LIBSDL_LIBS)
AC_SUBST(LIBSDL_CFLAGS)
AC_SUBST(LIBSDL_RPATH)
-AC_OUTPUT(Makefile src/Makefile src/client/Makefile src/common/Makefile \
- src/game/Makefile src/gl/Makefile src/server/Makefile)
+
+CXXFLAGS="-pipe $DEBUG_CFLAGS $WARN_CFLAGS $CXXFLAGS"
+AC_SUBST(CXXFLAGS)
+
+AC_OUTPUT(Makefile src/Makefile \
+ src/client/Makefile \
+ src/common/Makefile \
+ src/core/Makefile \
+ src/game/Makefile \
+ src/gl/Makefile \
+ src/math/Makefile \
+ src/server/Makefile \
+ src/filesystem/Makefile)
+
+AC_MSG_RESULT([
+The Osirion Project $VERSION
+
+Configuration summary:
+
+ platform ...................... $host
+
+ flags ......................... $CXXFLAGS
+ debug information ............. $HAVE_DEBUG
+
+Installation directories:
+
+ prefix ........................ $PREFIX
+ program binaries .............. $BINDIR
+ libraries ..................... $LIBDIR
+ data .......................... $DATADIR
+
+])
+
diff --git a/src/Makefile.am b/src/Makefile.am
index 499aaed..a41d88f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,6 @@
-
# set the include path found by configure
-AM_CPPFLAGS = $(LIBSDL_CFLAGS) $(all_includes)
+AM_CPPFLAGS = $(DEBUG_CFLAGS) $(WARN_CFLAGS) $(all_includes)
+
+SUBDIRS = common filesystem math core game server gl client
+
-# the library search path.
-SUBDIRS = common game server gl client
-noinst_HEADERS = osirion.h