Description:FTBFS with ld --as-needed
 Use Autotools to find/link against libm instead of
 manually appending -lm to LDFLAGS to fix FTBFS with ld --as-needed.
Author: Logan Rosen <logan@ubuntu.com>
Acked-by: Christian T. Steigies <cts@debian.org>
Bug-Debian: http://bugs.debian.org/916660
Last-Update: 2018-12-18
--- 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
