diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.in | 64 | ||||
-rw-r--r-- | doc/installation.html | 54 |
3 files changed, 91 insertions, 29 deletions
diff --git a/Makefile.am b/Makefile.am index 13a6b8e..07835a3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,5 +2,7 @@ # have all needed files, that a GNU package needs AUTOMAKE_OPTIONS = foreign 1.4 +ACLOCAL_AMFLAGS = -I m4 + SUBDIRS = src diff --git a/configure.in b/configure.in index ede99bf..e33b46b 100644 --- a/configure.in +++ b/configure.in @@ -16,6 +16,8 @@ AC_LANG_CPLUSPLUS AC_PROG_CXX AM_PROG_LIBTOOL +AC_CONFIG_MACRO_DIR([m4]) + dnl KDE_FIND_PATH(programm-name, variable-name, list of directories, dnl if-not-found, test-parameter) AC_DEFUN([KDE_FIND_PATH], @@ -150,9 +152,7 @@ dnl AC_MSG_CHECKING(whether to abort on compiler warnings) WARN_CFLAGS="" AC_ARG_ENABLE(warn, - AC_HELP_STRING( - [--disable-warn], [do not abort on compiler warnings] - ), + AC_HELP_STRING([--disable-warn], [do not abort on compiler warnings]), AC_MSG_RESULT(no), AC_MSG_RESULT(yes) WARN_CFLAGS="$WARN_CFLAGS -Wall -Werror" @@ -165,9 +165,7 @@ dnl AC_MSG_CHECKING(whether to include debug messages) AC_ARG_ENABLE(debug_messages, - AC_HELP_STRING( - [--disable-debug-messages], [build without extra debug messages] - ), + AC_HELP_STRING([--disable-debug-messages], [build without extra debug messages]), AC_MSG_RESULT(no), AC_MSG_RESULT(yes) AC_DEFINE_UNQUOTED(HAVE_DEBUG_MESSAGES, 1, [Define this to enable debug messages]) @@ -237,35 +235,59 @@ dnl HAVE_BULLET=no +AC_ARG_ENABLE(static_bullet, + AC_HELP_STRING([--enable-static-bullet], [staticly link with bullet physics libraries]), + AC_MSG_RESULT(yes), + STATIC_BULLET="yes" + AC_MSG_RESULT(no) + STATIC_BULLET="no" +) + AC_ARG_WITH(bullet, - AC_HELP_STRING([--with-bullet=DIR], - [use the bullet physics library in DIR (read the documentation)] + AC_HELP_STRING([--with-bullet=PREFIX], + [link with bullet physics library installed in PREFIX] ) ) LD_FLAGS_save="$LD_FLAGS" CPPFLAGS_save="$CPPFLAGS" -AC_MSG_CHECKING(for bullet directory) - -BULLET_DIR="/usr/local" +BULLET_DIRS="/usr/local /usr" if test "x${with_bullet}" != "x"; then - BULLET_DIR="${with_bullet}" + BULLET_DIRS="${with_bullet}" fi -AC_MSG_RESULT([$BULLET_DIR]) -BULLET_CPPFLAGS="-I${BULLET_DIR}/include/bullet" -BULLET_LIBS="$BULLET_DIR/lib/libBulletDynamics.a $BULLET_DIR/lib/libBulletCollision.a $BULLET_DIR/lib/libLinearMath.a" +for dir_to_test in ${BULLET_DIRS}; do + if test "x${BULLET_DIR}" = "x"; then + CPPFLAGS="-I${dir_to_test}/include/bullet" + AC_CHECK_HEADER(btBulletDynamicsCommon.h, + BULLET_DIR="${dir_to_test}", + [] + ) + fi +done + +if test "x${BULLET_DIR}" = "x"; then + AC_MSG_ERROR([bullet physics library not found in ${BULLET_DIRS}]) +fi + +AC_MSG_CHECKING([for bullet prefix]) +AC_MSG_RESULT([${BULLET_DIR}]) + +AC_MSG_CHECKING([if static linking of the bullet libraries is requested]) +if test "x${enable_static_bullet}" = "xyes"; then + BULLET_CPPFLAGS="-I${BULLET_DIR}/include/bullet" + BULLET_LIBS="$BULLET_DIR/lib/libBulletDynamics.a $BULLET_DIR/lib/libBulletCollision.a $BULLET_DIR/lib/libLinearMath.a" + AC_MSG_RESULT([yes]) +else + BULLET_CPPFLAGS="-I${BULLET_DIR}/include/bullet" + BULLET_LIBS="-lBulletDynamics -lBulletCollision -lLinearMath" + AC_MSG_RESULT([no]) +fi CPPFLAGS="$CPPFLAGS_save $BULLET_CPPFLAGS" LD_FLAGS="$LD_FLAGS_save $BULLET_LIBS" -AC_CHECK_HEADER(btBulletDynamicsCommon.h, - AC_DEFINE(HAVE_BULLET, yes, [Define this if you have the bullet physics library]) - HAVE_BULLET="yes", - AC_MSG_ERROR([bullet physics library not found (http://bulletphysics.org)]) -) - CPPFLAGS="$CPPFLAGS_save" LD_FLAGS="$LD_FLAGS_save" diff --git a/doc/installation.html b/doc/installation.html index ebfe223..0e06100 100644 --- a/doc/installation.html +++ b/doc/installation.html @@ -83,12 +83,20 @@ <div class="text"> <p> + Requirements:<br> + To run the client, tour system will need to have the following packages installed: libSDL, libjpeg, libpng and libz. + You do not need to have the bullet libraries installed. To run the dedicated server you need libz and ncurses. + These are common packages and most systems will already have them installed. +</p> +<p> Linux download:<br> <a href="http://ingar.satgnu.net/osirion/files/osirion-linux-latest.zip">osirion-linux-latest.zip</a> (32- and 64-bit)<br> This package contains the linux version of the client and the server. +</p> <p> Extract the package, a new subdirectory will be created. The actual directory name will depend on the version number. Enter the new subdirectory. +</p> <div class="code"> tar jxvf osirion-latest.tar.bz2<br> cd osirion-linux-740 @@ -96,18 +104,22 @@ cd osirion-linux-740 <p> Dowload the game data package:<br> <a href="http://ingar.satgnu.net/osirion/files/osirion-data-latest.zip">osirion-data-latest.zip</a><br> +</p> <p> Unzip it: +</p> <div class="code"> unzip ../osirion-data-latest.zip </div> <p> To run the 32 bit client: +</p> <div class="code"> ./osirion.x86 </div> <p> To run the 64 bit client: +</p> <div class="code"> ./osirion.x86_64 </div> @@ -149,8 +161,17 @@ unzip ../osirion-data-latest.zip </p> <p> You will also need a recent version of gcc, GNU make, automake and libtool. - In theory, the source should compile on any POSIX-compatible platform - supported by SDL. +</p> +</div> + +<div class="subtitle"> + Building on windows +</div> +<div class="text"> +<p> + You can build the source on windows using a MinGW/MSYS environment. You can use + the instructions in <a href="http://ingar.satgnu.net/devenv/mingw32/">this document</a> + to create a complete environment, capable of building the Project::OSiRiON source code. </p> </div> @@ -178,6 +199,9 @@ cd bullet-2.77<br> make<br> sudo make install<br> </div> +<p> + I recommend you use this specific version of the library, physics behaviour could be different in other versions. +</p> </div> <div class="subtitle"> @@ -228,22 +252,36 @@ autoreconf -fi<br> If you do not need the client and want to build the dedicated server only you can pass the <span class="fixed">--without-client</span> option to <span class="fixed">configure</span>: </p> +<div class="code"> +./configure --without-client +</div> <p> - Configure will automaticly detect the bullet library if it was installed in <span class=fixed>/usr/local</span>. - If it was installed somewhere else you will have to pass the <span class="fixed">--with-bullet=directory</span> option - to configure. For example, <span class="fixed">--with-bullet=/usr</span> will use the bullet libraries installed in - <span class="fixed">/usr/lib</span> and the includes in <span class="fixed">/usr/include/bullet</span>. + Configure will automaticly detect the bullet library if it was installed in + <span class=fixed>/usr</span> or <span class=fixed>/usr/local</span>. + If it was installed somewhere else you will have to pass the <span class="fixed">--with-bullet=prefix</span> option + to configure. For example, <span class="fixed">--with-bullet=/opt/bullet</span> will use the bullet libraries installed in + <span class="fixed">/opt/bullet/lib</span> and the includes in <span class="fixed">/opt/bullet/include/bullet</span>. </p> - <div class="code"> -./configure --without-client --with-bullet=/usr +./configure --with-bullet=/opt/bullet </div> <p> + If you add the <span class=fixed>--enable-static-bullet</span> option, the resulting binary will be staticly + linked with the bullet libraries. They will work on systems that do not have bullet installed. +</p> +<div class="code"> +./configure --with-bullet=/opt/bullet --enable-static-bullet +</div> + +<p> If <span class="fixed">configure</span> finds ncurses or pdcurses, the dedicated server will use this library and a have a curses console. To disable curses detection, pass the <span class="fixed">--without-curses</span> option to <span class="fixed">configure</span>. </p> +<div class="code"> +./configure --without-client --without-curses +</div> <p> Compile the source code: </p> |