re PR other/46840 (libgo should link against libm)

	PR other/46840
Link libgo against -lm.

From-SVN: r167582
diff --git a/libgo/configure.ac b/libgo/configure.ac
index db74974..d2cc290 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -187,6 +187,11 @@
 	    [Define if the linker support split stack adjustments])
 fi
 
+dnl Test for the -lm library.
+MATH_LIBS=
+AC_CHECK_LIB([m], [sqrt], MATH_LIBS=-lm)
+AC_SUBST(MATH_LIBS)
+
 dnl Test whether the compiler supports the -pthread option.
 AC_CACHE_CHECK([whether -pthread is supported],
 [ac_cv_libgo_pthread_supported],