Test if irrlicht needs -lXxf86vm when linking (note: this test
is not perfect, feel free to improve!!) git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@3219 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
542f2628ab
commit
0bba19cd1f
27
configure.ac
27
configure.ac
@ -277,12 +277,9 @@ if test x$enable_irrlicht = xyes; then
|
|||||||
AC_ARG_WITH(irrlicht, [AS_HELP_STRING(--with-irrlicht=PREFIX,
|
AC_ARG_WITH(irrlicht, [AS_HELP_STRING(--with-irrlicht=PREFIX,
|
||||||
[specify the prefix path to irrlicht])])
|
[specify the prefix path to irrlicht])])
|
||||||
if test "x$with_irrlicht" != "x" ; then
|
if test "x$with_irrlicht" != "x" ; then
|
||||||
CPPFLAGS="${CPPFLAGS} -I$with_irrlicht/include/irrlicht"
|
CPPFLAGS="${CPPFLAGS} -I$with_irrlicht/include"
|
||||||
fi
|
fi
|
||||||
AC_CHECK_HEADER(irrlicht.h, have_irrlicht_hdr=yes)
|
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
|
if test x$have_irrlicht_hdr != xyes; then
|
||||||
AC_MSG_ERROR([Can't find irrlicht installation, use --with-irrlicht...])
|
AC_MSG_ERROR([Can't find irrlicht installation, use --with-irrlicht...])
|
||||||
fi
|
fi
|
||||||
@ -290,14 +287,30 @@ if test x$enable_irrlicht = xyes; then
|
|||||||
*-*-linux* )
|
*-*-linux* )
|
||||||
irrlicht_LIBS="-L/$with_irrlicht/lib/Linux -lIrrlicht"
|
irrlicht_LIBS="-L/$with_irrlicht/lib/Linux -lIrrlicht"
|
||||||
;;
|
;;
|
||||||
esac
|
|
||||||
|
|
||||||
case "${host}" in
|
|
||||||
*darwin*|*macosx*)
|
*darwin*|*macosx*)
|
||||||
irrlicht_LIBS="-L/$with_irrlicht/lib/ -lIrrlicht"
|
irrlicht_LIBS="-L/$with_irrlicht/lib/ -lIrrlicht"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
dnl Test if we need Xxf86vm. For now assume that if any problems
|
||||||
|
dnl occur with this simple program, it must be caused by this
|
||||||
|
dnl missing library. FIXME: better tests should be done here!!
|
||||||
|
dnl FIXME: this program when run prints out two lines (version numbers) to stdout
|
||||||
|
echo "checking for irrlicht libraries."
|
||||||
|
save_LIBS=$LIBS
|
||||||
|
LIBS="$LIBS $irrlicht_LIBS $opengl_LIBS"
|
||||||
|
AC_TRY_RUN([
|
||||||
|
# include "irrlicht.h"
|
||||||
|
int main() {
|
||||||
|
irr::createDevice(irr::video::EDT_NULL);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
],
|
||||||
|
,
|
||||||
|
irrlicht_LIBS="$irrlicht_LIBS -lXxf86vm"
|
||||||
|
)
|
||||||
|
LIBS=$save_LIBS
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ======================================================
|
dnl ======================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user