--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,7 @@
 #AC_CHECK_LIB(pthread, main,, AC_MSG_ERROR(SDL needs pthread !))
 AC_CHECK_LIB([SDL_image],[main],[],AC_MSG_ERROR(SDL_image is needed))
 AC_CHECK_LIB([z],[main],[],AC_MSG_ERROR(libz is needed))
+AC_SEARCH_LIBS([hypot],[m],[],AC_MSG_ERROR(libm is needed))
 
 AC_CONFIG_FILES([Makefile
                  contrib/Makefile
