+##### boost #####
+website="http://www.boost.org/"
+BOOST_SMART_PTR
+BOOST_STRING_ALGO
+BOOST_BIND
+BOOST_FUNCTION
+
+##### SDL #####
+website="http://www.libsdl.org/"
+AM_PATH_SDL([1.2.10],
+ [CFLAGS="$CFLAGS $SDL_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
+ LIBS="$LIBS $SDL_LIBS"])
+
+##### opengl, glu #####
+website="http://www.mesa3d.org/"
+AC_CHECK_HEADERS([GL/gl.h GL/glu.h],,
+ [missing=yes
+ echo "***** Missing GL headers ($website) *****"])
+if test x$WIN32 == xyes
+then
+# autoconf library search macro doesn't find opengl32 on windows because it uses
+# different name hashing, but it links fine; assume it's there
+ LIBS="$LIBS -lglu32 -lopengl32"
+else
+ AC_SEARCH_LIBS([glEnable], [GL MesaGL],,
+ [missing=yes
+ echo "***** Missing libGL ($website) *****"])
+ AC_SEARCH_LIBS([gluDisk], [GLU MesaGLU],,
+ [missing=yes
+ echo "***** Missing libGLU ($website) *****"])
+fi
+
+##### openal, alut #####
+website="http://connect.creativelabs.com/openal/"
+AC_CHECK_HEADERS([AL/al.h AL/alut.h],,
+ [missing=yes
+ echo "***** Missing OpenAL headers ($website) *****"])
+AC_SEARCH_LIBS([alEnable], [openal openal32],,
+ [missing=yes
+ echo "***** Missing libopenal ($website) *****"])
+AC_SEARCH_LIBS([alutInit], [alut],,
+ [missing=yes
+ echo "***** Missing libalut ($website) *****"])
+
+##### SDL_image #####
+website="http://www.libsdl.org/projects/SDL_image/"
+AC_CHECK_HEADERS([SDL/SDL_image.h],,
+ [missing=yes
+ echo "***** Missing SDL_image header ($website) *****"])
+AC_SEARCH_LIBS([IMG_Load], [SDL_image],,
+ [missing=yes
+ echo "***** Missing libSDL_image ($website) *****"])
+
+##### libvorbis #####
+website="http://www.xiph.org/downloads/"
+AC_CHECK_HEADERS([vorbis/codec.h vorbis/vorbisfile.h],,
+ [missing=yes
+ echo "***** Missing vorbis headers ($website) *****"])
+AC_SEARCH_LIBS([ov_open], [vorbisfile],,
+ [missing=yes
+ echo "***** Missing libvorbisfile ($website) *****"])
+
+##### liblua #####
+website="http://www.lua.org/"
+AC_CHECK_HEADERS([lua.h],,
+ [missing=yes
+ echo "***** Missing lua headers ($website) *****"])
+AC_SEARCH_LIBS([lua_load], [lua],,
+ [missing=yes
+ echo "***** Missing liblua ($website) *****"])
+
+##### librt (optional) #####
+AC_SEARCH_LIBS([clock_gettime], [rt],
+ [AC_DEFINE([HAVE_CLOCK_GETTIME], 1,
+ [Define to 1 if you have the 'clock_gettime' function.])])
+
+
+if test x$missing == xyes
+then
+ AC_MSG_ERROR([please install missing dependencies (see messages above)])
+fi