Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-07-07 13:43:05 +0000
committerStijn Buys <ingar@osirion.org>2009-07-07 13:43:05 +0000
commit7e15b99c01616999496155fe5d2ce89d7608932b (patch)
tree226d5c23b0a931ccbbf490aaf2da647ed6ebe5d4 /configure.in
parent1f71cc5e127f6163e9163afd42453fe145defbeb (diff)
Initial bullet physics support
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in82
1 files changed, 69 insertions, 13 deletions
diff --git a/configure.in b/configure.in
index 74551a2..a66fb24 100644
--- a/configure.in
+++ b/configure.in
@@ -229,6 +229,52 @@ AC_SUBST(CURSES_CFLAGS)
AC_SUBST(CURSES_LIBS)
dnl ----------------------------------------------------------------
+dnl bullet
+dnl
+
+HAVE_BULLET=no
+
+AC_ARG_WITH(bullet,
+ AC_HELP_STRING([--with-bullet=DIR],
+ [use the bullet physics library in DIR (read the documentation)]
+ )
+)
+
+if test "x${with_bullet}" != "xno"; then
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+
+ AC_MSG_CHECKING(for bullet directory)
+
+ BULLET_DIR="/usr/local"
+ if test "x${with_bullet}" != "x"; then
+ BULLET_DIR="${with_bullet}"
+ fi
+ AC_MSG_RESULT([$BULLET_DIR])
+
+ BULLET_CFLAGS="-I${BULLET_DIR}/include/bullet"
+ BULLET_LIBS="-L${BULLET_DIR}/lib"
+
+ CPPFLAGS="$save_CPPFLAGS $BULLET_CFLAGS"
+ LDFLAGS="$save_LDFLAGS $BULLET_LIBS"
+
+ AC_CHECK_HEADER(btBulletDynamicsCommon.h,
+ AC_DEFINE(HAVE_BULLET, yes, [Define this if you have the bullet physics library])
+ BULLET_LIBS="$BULLET_LIBS -lbulletmath -lbulletdynamics -lbulletcollision"
+ HAVE_BULLET="yes",
+ BULLET_LIBS=""
+ BULLET_CFLAGS=""
+ HAVE_BULLET="no"
+ )
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+fi
+
+AC_SUBST(BULLET_CFLAGS)
+AC_SUBST(BULLET_LIBS)
+
+dnl ----------------------------------------------------------------
dnl zlib
dnl
@@ -392,6 +438,9 @@ fi
CXXFLAGS="-pipe $DEBUG_CFLAGS $WARN_CFLAGS $CXXFLAGS"
AC_SUBST(CXXFLAGS)
+CPPFLAGS="$CPPFLAGS $BULLET_CFLAGS"
+AC_SUBST(CPPFLAGS)
+
dnl ---------------------------------------------------------------
dnl Installation paths
@@ -442,20 +491,27 @@ AC_MSG_RESULT([
Project::OSiRiON $VERSION
Configuration summary:
- platform ........... $host
- flags .............. $CXXFLAGS
- libraries .......... $HOST_LIBS $LIBJPG_LIBS $LIBPNG_LIBS
- curses ............. $HAVE_CURSES
- build client ....... $BUILD_CLIENT
- SDL .................$LIBSDL_LIBS
- opengl ............. $GL_LIBS
- openal ............. $AL_LIBS
+platform ........... $host
+flags .............. $CPPFLAGS $CXXFLAGS
+libraries .......... $HOST_LIBS $LIBJPG_LIBS $LIBPNG_LIBS $CURSES_LIBS $BULLET_LIBS
+curses ............. $HAVE_CURSES
+bullet ............. $HAVE_BULLET
+build client ....... $BUILD_CLIENT])
+
+if test "x$BUILD_CLIENT" = xyes; then
+AC_MSG_RESULT([SDL .................$LIBSDL_LIBS
+opengl ............. $GL_LIBS
+openal ............. $AL_LIBS])
+fi
+
+AC_MSG_RESULT([
Installation directories:
- installation type .. $INSTALLTYPE
- prefix ............. $prefix
- binaries ........... $bindir
- documentation ...... $docdir
- game data .......... $PACKAGE_DATADIR
+
+installation type .. $INSTALLTYPE
+prefix ............. $prefix
+binaries ........... $bindir
+documentation ...... $docdir
+game data .......... $PACKAGE_DATADIR
])