--- configure.in
+++ configure.in
@@ -81,6 +81,16 @@
 AC_CHECK_LIB(audio, alOpenPort, HAVE_SGIAUDIO_LIB=yes, HAVE_SGIAUDIO_LIB=no)
 AC_CHECK_LIB(asound, snd_pcm_open, HAVE_ALSA=yes, HAVE_ALSA=no)
 
+dnl Check for libm for cos()
+AC_SEARCH_LIBS([cos], [m], [], [
+	AC_MSG_ERROR([unable to find the cos() function])
+])
+
+dnl Check for libm for floor()
+AC_SEARCH_LIBS([floor], [m], [], [
+	AC_MSG_ERROR([unable to find the floor() function])
+])
+
 AC_PATH_XTRA
 AC_CONFIG_HEADER(src/sysconfig.h)
 
