From 37b77e87ac370d3efaf6864b69d9df4e9ab01600 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Thu, 5 Mar 2009 00:36:18 +0000 Subject: [PATCH] Added irrlicht support to build environment. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@3210 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- configure.ac | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/configure.ac b/configure.ac index b76167ffa..08a6d4082 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,15 @@ else SUMMARY="$SUMMARY\nDisabled compiler optimizations." fi +AC_ARG_ENABLE(irrlicht, [AS_HELP_STRING(--enable-irrlicht, + [enable irrlicht compilation (still early pre-alpha)])],, + enable_irrlicht=false) +if test x$enable_irrlicht = xyes; then + AC_DEFINE([HAVE_IRRLICHT], [], [enable irrlicht compilation]) + SUMMARY="$SUMMARY\nCompiling for irrlicht - be warned, pre-alpha!!" +fi + + dnl =================== dnl Checks for programs. dnl =================== @@ -261,6 +270,30 @@ case "${host}" in esac +dnl =============================== +dnl Check for irrlicht (if enabled) +dnl =============================== +if test x$enable_irrlicht = xyes; then + AC_ARG_WITH(irrlicht, [AS_HELP_STRING(--with-irrlicht=PREFIX, + [specify the prefix path to irrlicht])]) + if test "x$with_irrlicht" != "x" ; then + CPPFLAGS="${CPPFLAGS} -I $with_irrlicht/include" + fi + AC_CHECK_HEADER(irrlicht.h, have_irrlicht_hdr=yes) + dnl how to use irr namespace here?? g++: 'irr' has not been declared + dnl AC_SEARCH_LIBS(createDevice, irrlicht, have_SDL_lib=yes) + + if test x$have_irrlicht_hdr != xyes; then + AC_MSG_ERROR([Can't find irrlicht installation, use --with-irrlicht...]) + fi + case "${host}" in + *-*-linux* ) + irrlicht_LIBS="-L/$with_irrlicht/lib/Linux -lIrrlicht" + ;; + esac + +fi + dnl ====================================================== dnl Try to supply the SVN revision number for the compiler dnl ====================================================== @@ -387,6 +420,7 @@ esac # ========================= # subst bars in Makefile.am # ========================= +AC_SUBST(irrlicht_LIBS) AC_SUBST(bullet_LIBS) AC_SUBST(enet_LIBS) AC_SUBST(opengl_LIBS)