+ AC_PATH_PROGS([GROFF], [groff])
+ if test x$GROFF = x
+ then
+ AC_MSG_WARN([The groff program is needed to create the manual page.])
+ fi
+elif test x$NETBSD = xyes
+then
+ AC_PATH_PROGS([PKGLINT], [pkglint])
+fi
+
+AM_CONDITIONAL([HAVE_MAKENSIS], [test x$MAKENSIS != x])
+
+####
+AC_MSG_NOTICE([Checks for libraries.])
+####
+
+##### SDL #####
+website="http://www.libsdl.org/"
+PKG_CHECK_MODULES([SDL], [sdl],
+ [LIBS="$LIBS $SDL_LIBS"
+ CFLAGS="$CFLAGS $SDL_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"],
+ [missing=yes
+ AC_MSG_WARN([Missing SDL ($website)])])
+
+##### opengl, glu #####
+website="http://www.mesa3d.org/"
+PKG_CHECK_MODULES([OPENGL], [gl glu],
+ [LIBS="$LIBS $OPENGL_LIBS"
+ CFLAGS="$CFLAGS $OPENGL_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $OPENGL_CFLAGS"],
+ [missing=yes
+ AC_MSG_WARN([Missing OpenGL ($website)])])
+
+##### libpng #####
+website="http://www.libpng.org/pub/png/libpng.html"
+PKG_CHECK_MODULES([PNG], [libpng],
+ [LIBS="$LIBS $PNG_LIBS"
+ CFLAGS="$CFLAGS $PNG_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $PNG_CFLAGS"],
+ [missing=yes
+ AC_MSG_WARN([Missing libpng ($website)])])
+
+##### openal #####
+website="http://connect.creativelabs.com/openal/"
+PKG_CHECK_MODULES([OPENAL], [openal],
+ [LIBS="$LIBS $OPENAL_LIBS"
+ CFLAGS="$CFLAGS $OPENAL_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $OPENAL_CFLAGS"],
+ [missing=yes
+ AC_MSG_WARN([Missing OpenAL ($website)])])
+
+##### libvorbis #####
+website="http://www.xiph.org/downloads/"
+PKG_CHECK_MODULES([VORBIS], [vorbisfile],
+ [LIBS="$LIBS $VORBIS_LIBS"
+ CFLAGS="$CFLAGS $VORBIS_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $VORBIS_CFLAGS"],
+ [missing=yes
+ AC_MSG_WARN([Missing libvorbisfile ($website)])])
+
+##### liblua #####
+website="http://www.lua.org/"
+PKG_CHECK_MODULES([LUA], [lua],
+ [LIBS="$LIBS $LUA_LIBS"
+ CFLAGS="$CFLAGS $LUA_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $LUA_CFLAGS"],
+ [missing=yes
+ AC_MSG_WARN([Missing liblua ($website)])])
+
+##### GTK+ 2.0 #####
+if test x$gtk = xyes
+then
+ website="http://www.gtk.org/"
+ PKG_CHECK_MODULES([GTK], [gtk+-2.0],
+ [LIBS="$LIBS $GTK_LIBS"
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"],
+ [missing=yes
+ AC_MSG_WARN([Missing GTK+-2.0 ($website)])])
+fi