configure: Test for isinf and isnan needs link to -lm.
diff --git a/configure b/configure
index 61efbd9..2694c59 100755
--- a/configure
+++ b/configure
@@ -14270,6 +14270,8 @@
 
 fi
 
+ac_save_LIBS="$LIBS"
+LIBS="$LIBS -lm"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf" >&5
 $as_echo_n "checking for isinf... " >&6; }
 if ${ac_cv_have_isinf+:} false; then :
@@ -14335,6 +14337,7 @@
 $as_echo "#define HAVE_ISNAN 1" >>confdefs.h
 
 fi
+LIBS="$ac_save_LIBS"
 
 
 case $host_cpu in